code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private void parse( FormattableContainer currentRule ) { try { for( ;; ) { int ch = reader.nextBlockMarker(); switch( ch ) { case -1: return; // end of input reached case ';': parseSemicolon( currentRule ); break; case '{': parseBlock( currentRule ); break; default: throw createException( "Unrecognized input: '" + reader.getLookAhead() + "'" ); } } } catch( LessException ex ) { ex.addPosition( reader.getFileName(), reader.getLine(), reader.getColumn() ); throw ex; } catch( RuntimeException ex ) { LessException lessEx = new LessException( ex ); lessEx.addPosition( reader.getFileName(), reader.getLine(), reader.getColumn() ); throw lessEx; } }
class class_name[name] begin[{] method[parse, return_type[void], modifier[private], parameter[currentRule]] begin[{] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nextBlockMarker, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), name=ch)], modifiers=set(), type=BasicType(dimensions=[], name=int)), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], statements=[ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=';')], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=currentRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseSemicolon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='{')], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=currentRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseBlock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unrecognized input: '"), operandr=MethodInvocation(arguments=[], member=getLookAhead, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], member=createException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=ForControl(condition=None, init=None, update=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFileName, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getLine, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getColumn, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None)], member=addPosition, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['LessException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LessException, sub_type=None)), name=lessEx)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LessException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFileName, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getLine, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getColumn, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None)], member=addPosition, postfix_operators=[], prefix_operators=[], qualifier=lessEx, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=lessEx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['RuntimeException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[parse] operator[SEP] identifier[FormattableContainer] identifier[currentRule] operator[SEP] { Keyword[try] { Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[ch] operator[=] identifier[reader] operator[SEP] identifier[nextBlockMarker] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[ch] operator[SEP] { Keyword[case] operator[-] Other[1] operator[:] Keyword[return] operator[SEP] Keyword[case] literal[String] operator[:] identifier[parseSemicolon] operator[SEP] identifier[currentRule] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[parseBlock] operator[SEP] identifier[currentRule] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] identifier[createException] operator[SEP] literal[String] operator[+] identifier[reader] operator[SEP] identifier[getLookAhead] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[LessException] identifier[ex] operator[SEP] { identifier[ex] operator[SEP] identifier[addPosition] operator[SEP] identifier[reader] operator[SEP] identifier[getFileName] operator[SEP] operator[SEP] , identifier[reader] operator[SEP] identifier[getLine] operator[SEP] operator[SEP] , identifier[reader] operator[SEP] identifier[getColumn] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[ex] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[ex] operator[SEP] { identifier[LessException] identifier[lessEx] operator[=] Keyword[new] identifier[LessException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] identifier[lessEx] operator[SEP] identifier[addPosition] operator[SEP] identifier[reader] operator[SEP] identifier[getFileName] operator[SEP] operator[SEP] , identifier[reader] operator[SEP] identifier[getLine] operator[SEP] operator[SEP] , identifier[reader] operator[SEP] identifier[getColumn] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[lessEx] operator[SEP] } }
protected final CacheControl getCacheControl( final HttpServletRequest request, final HttpServletResponse response, final Object handler) { if (handler == null || !(handler instanceof HandlerMethod)) { return null; } final HandlerMethod handlerMethod = (HandlerMethod) handler; CacheControl cacheControl = handlerMethod.getMethodAnnotation(CacheControl.class); if (cacheControl == null) { return handlerMethod.getBeanType().getAnnotation(CacheControl.class); } return cacheControl; }
class class_name[name] begin[{] method[getCacheControl, return_type[type[CacheControl]], modifier[final protected], parameter[request, response, handler]] begin[{] if[binary_operation[binary_operation[member[.handler], ==, literal[null]], ||, binary_operation[member[.handler], instanceof, type[HandlerMethod]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[HandlerMethod], handlerMethod] local_variable[type[CacheControl], cacheControl] if[binary_operation[member[.cacheControl], ==, literal[null]]] begin[{] return[call[handlerMethod.getBeanType, parameter[]]] else begin[{] None end[}] return[member[.cacheControl]] end[}] END[}]
Keyword[protected] Keyword[final] identifier[CacheControl] identifier[getCacheControl] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[request] , Keyword[final] identifier[HttpServletResponse] identifier[response] , Keyword[final] identifier[Object] identifier[handler] operator[SEP] { Keyword[if] operator[SEP] identifier[handler] operator[==] Other[null] operator[||] operator[!] operator[SEP] identifier[handler] Keyword[instanceof] identifier[HandlerMethod] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[final] identifier[HandlerMethod] identifier[handlerMethod] operator[=] operator[SEP] identifier[HandlerMethod] operator[SEP] identifier[handler] operator[SEP] identifier[CacheControl] identifier[cacheControl] operator[=] identifier[handlerMethod] operator[SEP] identifier[getMethodAnnotation] operator[SEP] identifier[CacheControl] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cacheControl] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[handlerMethod] operator[SEP] identifier[getBeanType] operator[SEP] operator[SEP] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[CacheControl] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[return] identifier[cacheControl] operator[SEP] }
@Override public List<CommerceNotificationTemplate> filterFindByGroupId(long groupId) { return filterFindByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
class class_name[name] begin[{] method[filterFindByGroupId, return_type[type[List]], modifier[public], parameter[groupId]] begin[{] return[call[.filterFindByGroupId, parameter[member[.groupId], member[QueryUtil.ALL_POS], member[QueryUtil.ALL_POS], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommerceNotificationTemplate] operator[>] identifier[filterFindByGroupId] operator[SEP] Keyword[long] identifier[groupId] operator[SEP] { Keyword[return] identifier[filterFindByGroupId] operator[SEP] identifier[groupId] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , Other[null] operator[SEP] operator[SEP] }
public static EntityActionOperation createFileInfos(String assetId) { String encodedId; try { encodedId = URLEncoder.encode(assetId, "UTF-8"); } catch (UnsupportedEncodingException ex) { // This can never happen unless JVM is broken throw new RuntimeException(ex); } return new DefaultActionOperation("CreateFileInfos").addQueryParameter( "assetid", "'" + encodedId + "'"); }
class class_name[name] begin[{] method[createFileInfos, return_type[type[EntityActionOperation]], modifier[public static], parameter[assetId]] begin[{] local_variable[type[String], encodedId] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=encodedId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=assetId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], member=encode, postfix_operators=[], prefix_operators=[], qualifier=URLEncoder, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['UnsupportedEncodingException']))], finally_block=None, label=None, resources=None) return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CreateFileInfos")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="assetid"), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operandr=MemberReference(member=encodedId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], member=addQueryParameter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=DefaultActionOperation, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[EntityActionOperation] identifier[createFileInfos] operator[SEP] identifier[String] identifier[assetId] operator[SEP] { identifier[String] identifier[encodedId] operator[SEP] Keyword[try] { identifier[encodedId] operator[=] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[assetId] , literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnsupportedEncodingException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[DefaultActionOperation] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[addQueryParameter] operator[SEP] literal[String] , literal[String] operator[+] identifier[encodedId] operator[+] literal[String] operator[SEP] operator[SEP] }
public static int lastIndexOfIgnoreCase(String pString, String pLookFor, int pPos) { if ((pString == null) || (pLookFor == null)) { return -1; } if (pLookFor.length() == 0) { return pPos;// All strings "contains" the empty string } if (pLookFor.length() > pString.length()) { return -1;// Cannot contain string longer than itself } // Get first char char firstL = Character.toLowerCase(pLookFor.charAt(0)); char firstU = Character.toUpperCase(pLookFor.charAt(0)); int indexLower = pPos; int indexUpper = pPos; for (int i = pPos; i >= 0; i--) { // Peek for first char indexLower = ((indexLower >= 0) && (indexLower >= i)) ? pString.lastIndexOf(firstL, i) : indexLower; indexUpper = ((indexUpper >= 0) && (indexUpper >= i)) ? pString.lastIndexOf(firstU, i) : indexUpper; if (indexLower < 0) { if (indexUpper < 0) { return -1;// First char not found } else { i = indexUpper;// Only upper } } else if (indexUpper < 0) { i = indexLower;// Only lower } else { // Both found, select last occurence i = (indexLower > indexUpper) ? indexLower : indexUpper; } // Only one? if (pLookFor.length() == 1) { return i;// The only char found! } // Test if we still have enough chars else if (i > (pString.length() - pLookFor.length())) { //return -1; continue; } // Test if last char equals! (regionMatches is expensive) else if ((pString.charAt(i + pLookFor.length() - 1) != Character.toLowerCase(pLookFor.charAt(pLookFor.length() - 1))) && (pString.charAt(i + pLookFor.length() - 1) != Character.toUpperCase(pLookFor.charAt(pLookFor.length() - 1)))) { continue;// Nope, try next } // Test from second char, until second-last char else if ((pLookFor.length() <= 2) || pString.regionMatches(true, i + 1, pLookFor, 1, pLookFor.length() - 2)) { return i; } } return -1; }
class class_name[name] begin[{] method[lastIndexOfIgnoreCase, return_type[type[int]], modifier[public static], parameter[pString, pLookFor, pPos]] begin[{] if[binary_operation[binary_operation[member[.pString], ==, literal[null]], ||, binary_operation[member[.pLookFor], ==, literal[null]]]] begin[{] return[literal[1]] else begin[{] None end[}] if[binary_operation[call[pLookFor.length, parameter[]], ==, literal[0]]] begin[{] return[member[.pPos]] else begin[{] None end[}] if[binary_operation[call[pLookFor.length, parameter[]], >, call[pString.length, parameter[]]]] begin[{] return[literal[1]] else begin[{] None end[}] local_variable[type[char], firstL] local_variable[type[char], firstU] local_variable[type[int], indexLower] local_variable[type[int], indexUpper] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=indexLower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=indexLower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=indexLower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operator=&&), if_false=MemberReference(member=indexLower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[MemberReference(member=firstL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=pString, selectors=[], type_arguments=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=indexUpper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=indexUpper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=indexUpper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operator=&&), if_false=MemberReference(member=indexUpper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[MemberReference(member=firstU, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=pString, selectors=[], type_arguments=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=indexLower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=indexUpper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=indexLower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=indexUpper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), if_false=MemberReference(member=indexUpper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=indexLower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=indexLower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=indexUpper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=indexUpper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=pLookFor, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=pString, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=pLookFor, selectors=[], type_arguments=None), operator=-), operator=>), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=pLookFor, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pString, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=pLookFor, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pLookFor, selectors=[], type_arguments=None)], member=toLowerCase, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=pLookFor, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pString, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=pLookFor, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pLookFor, selectors=[], type_arguments=None)], member=toUpperCase, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), operator=!=), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=pLookFor, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=<=), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=pLookFor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=pLookFor, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=-)], member=regionMatches, postfix_operators=[], prefix_operators=[], qualifier=pString, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=pPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[1]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[lastIndexOfIgnoreCase] operator[SEP] identifier[String] identifier[pString] , identifier[String] identifier[pLookFor] , Keyword[int] identifier[pPos] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[pString] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[pLookFor] operator[==] Other[null] operator[SEP] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[pLookFor] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[pPos] operator[SEP] } Keyword[if] operator[SEP] identifier[pLookFor] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[pString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[char] identifier[firstL] operator[=] identifier[Character] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[pLookFor] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[char] identifier[firstU] operator[=] identifier[Character] operator[SEP] identifier[toUpperCase] operator[SEP] identifier[pLookFor] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[indexLower] operator[=] identifier[pPos] operator[SEP] Keyword[int] identifier[indexUpper] operator[=] identifier[pPos] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[pPos] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { identifier[indexLower] operator[=] operator[SEP] operator[SEP] identifier[indexLower] operator[>=] Other[0] operator[SEP] operator[&&] operator[SEP] identifier[indexLower] operator[>=] identifier[i] operator[SEP] operator[SEP] operator[?] identifier[pString] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[firstL] , identifier[i] operator[SEP] operator[:] identifier[indexLower] operator[SEP] identifier[indexUpper] operator[=] operator[SEP] operator[SEP] identifier[indexUpper] operator[>=] Other[0] operator[SEP] operator[&&] operator[SEP] identifier[indexUpper] operator[>=] identifier[i] operator[SEP] operator[SEP] operator[?] identifier[pString] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[firstU] , identifier[i] operator[SEP] operator[:] identifier[indexUpper] operator[SEP] Keyword[if] operator[SEP] identifier[indexLower] operator[<] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[indexUpper] operator[<] Other[0] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[else] { identifier[i] operator[=] identifier[indexUpper] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[indexUpper] operator[<] Other[0] operator[SEP] { identifier[i] operator[=] identifier[indexLower] operator[SEP] } Keyword[else] { identifier[i] operator[=] operator[SEP] identifier[indexLower] operator[>] identifier[indexUpper] operator[SEP] operator[?] identifier[indexLower] operator[:] identifier[indexUpper] operator[SEP] } Keyword[if] operator[SEP] identifier[pLookFor] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { Keyword[return] identifier[i] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[i] operator[>] operator[SEP] identifier[pString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] identifier[pLookFor] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[pString] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[+] identifier[pLookFor] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[!=] identifier[Character] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[pLookFor] operator[SEP] identifier[charAt] operator[SEP] identifier[pLookFor] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[pString] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[+] identifier[pLookFor] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[!=] identifier[Character] operator[SEP] identifier[toUpperCase] operator[SEP] identifier[pLookFor] operator[SEP] identifier[charAt] operator[SEP] identifier[pLookFor] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[pLookFor] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<=] Other[2] operator[SEP] operator[||] identifier[pString] operator[SEP] identifier[regionMatches] operator[SEP] literal[boolean] , identifier[i] operator[+] Other[1] , identifier[pLookFor] , Other[1] , identifier[pLookFor] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[2] operator[SEP] operator[SEP] { Keyword[return] identifier[i] operator[SEP] } } Keyword[return] operator[-] Other[1] operator[SEP] }
private boolean dumpCache(){ if (CacheDumpLogger.isDebugEnabled()) { try { List<ModelService> services = new ArrayList<ModelService>(); services.addAll(getCache().values()); StringBuilder sb = new StringBuilder(); sb.append("LookupManager dumpped Service Cache at: ").append(System.currentTimeMillis()).append("\n"); for (ModelService service : services) { sb.append(new String(serialize(service))).append("\n"); } CacheDumpLogger.debug(sb.toString()); } catch (Exception e) { LOGGER.warn("Dump Service Cache failed. Set Logger {} to INFO to disable this message.", CacheDumpLogger.getName()); if (LOGGER.isTraceEnabled()) { LOGGER.trace("Dump Service Cache failed. ", e); } return false; } return true; } return false; }
class class_name[name] begin[{] method[dumpCache, return_type[type[boolean]], modifier[private], parameter[]] begin[{] if[call[CacheDumpLogger.isDebugEnabled, parameter[]]] begin[{] 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ModelService, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=services)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ModelService, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=values, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=services, selectors=[], type_arguments=None), label=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=None, dimensions=None, name=StringBuilder, sub_type=None)), name=sb)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="LookupManager dumpped Service Cache at: ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=service, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=serialize, 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=String, sub_type=None))], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=services, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=service)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ModelService, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=CacheDumpLogger, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Dump Service Cache failed. Set Logger {} to INFO to disable this message."), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=CacheDumpLogger, selectors=[], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isTraceEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Dump Service Cache failed. "), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=trace, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[dumpCache] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[CacheDumpLogger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[List] operator[<] identifier[ModelService] operator[>] identifier[services] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[ModelService] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[services] operator[SEP] identifier[addAll] operator[SEP] identifier[getCache] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ModelService] identifier[service] operator[:] identifier[services] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[serialize] operator[SEP] identifier[service] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[CacheDumpLogger] operator[SEP] identifier[debug] operator[SEP] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[CacheDumpLogger] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[LOGGER] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static Distribution guessC(DataSet d) { double maxLambda = LinearTools.maxLambdaLogisticL1((ClassificationDataSet) d); double minC = 1/(2*maxLambda*d.size()); return new LogUniform(minC*10, minC*1000); }
class class_name[name] begin[{] method[guessC, return_type[type[Distribution]], modifier[public static], parameter[d]] begin[{] local_variable[type[double], maxLambda] local_variable[type[double], minC] return[ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=minC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operator=*), BinaryOperation(operandl=MemberReference(member=minC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000), operator=*)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LogUniform, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Distribution] identifier[guessC] operator[SEP] identifier[DataSet] identifier[d] operator[SEP] { Keyword[double] identifier[maxLambda] operator[=] identifier[LinearTools] operator[SEP] identifier[maxLambdaLogisticL1] operator[SEP] operator[SEP] identifier[ClassificationDataSet] operator[SEP] identifier[d] operator[SEP] operator[SEP] Keyword[double] identifier[minC] operator[=] Other[1] operator[/] operator[SEP] Other[2] operator[*] identifier[maxLambda] operator[*] identifier[d] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[LogUniform] operator[SEP] identifier[minC] operator[*] Other[10] , identifier[minC] operator[*] Other[1000] operator[SEP] operator[SEP] }
private CalendarDay findAccessibilityFocus() { final int childCount = getChildCount(); for (int i = 0; i < childCount; i++) { final View child = getChildAt(i); if (child instanceof SimpleMonthView) { final CalendarDay focus = ((SimpleMonthView) child).getAccessibilityFocus(); if (focus != null) { // Clear focus to avoid ListView bug in Jelly Bean MR1. ((SimpleMonthView) child).clearAccessibilityFocus(); return focus; } } } return null; }
class class_name[name] begin[{] method[findAccessibilityFocus, return_type[type[CalendarDay]], modifier[private], parameter[]] begin[{] local_variable[type[int], childCount] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getChildAt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=child)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=View, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=SimpleMonthView, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SimpleMonthView, sub_type=None)), name=focus)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=CalendarDay, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=focus, 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=Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SimpleMonthView, sub_type=None)), label=None), ReturnStatement(expression=MemberReference(member=focus, 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=childCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[null]] end[}] END[}]
Keyword[private] identifier[CalendarDay] identifier[findAccessibilityFocus] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[childCount] operator[=] identifier[getChildCount] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[childCount] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[View] identifier[child] operator[=] identifier[getChildAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[child] Keyword[instanceof] identifier[SimpleMonthView] operator[SEP] { Keyword[final] identifier[CalendarDay] identifier[focus] operator[=] operator[SEP] operator[SEP] identifier[SimpleMonthView] operator[SEP] identifier[child] operator[SEP] operator[SEP] identifier[getAccessibilityFocus] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[focus] operator[!=] Other[null] operator[SEP] { operator[SEP] operator[SEP] identifier[SimpleMonthView] operator[SEP] identifier[child] operator[SEP] operator[SEP] identifier[clearAccessibilityFocus] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[focus] operator[SEP] } } } Keyword[return] Other[null] operator[SEP] }
public static void assertNodeExistByPath(final Session session, final String absPath) throws RepositoryException { try { session.getNode(absPath); } catch (final PathNotFoundException e) { LOG.debug("Node path {} does not exist", absPath, e); fail(e.getMessage()); } }
class class_name[name] begin[{] method[assertNodeExistByPath, return_type[void], modifier[public static], parameter[session, absPath]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=absPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNode, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Node path {} does not exist"), MemberReference(member=absPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=fail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['PathNotFoundException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[assertNodeExistByPath] operator[SEP] Keyword[final] identifier[Session] identifier[session] , Keyword[final] identifier[String] identifier[absPath] operator[SEP] Keyword[throws] identifier[RepositoryException] { Keyword[try] { identifier[session] operator[SEP] identifier[getNode] operator[SEP] identifier[absPath] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[PathNotFoundException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[absPath] , identifier[e] operator[SEP] operator[SEP] identifier[fail] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public List<StringValue> getDateAsString(final List<StringValue> _date, final List<StringValue> _hour, final List<StringValue> _minute, final List<StringValue> _ampm) throws EFapsException { final List<StringValue> ret = new ArrayList<>(); final List<DateTime> dates = getDateList(_date, _hour, _minute, _ampm); for (final DateTime date : dates) { final DateTimeFormatter isofmt = ISODateTimeFormat.dateTime(); ret.add(StringValue.valueOf(date.toString(isofmt))); } return ret; }
class class_name[name] begin[{] method[getDateAsString, return_type[type[List]], modifier[public], parameter[_date, _hour, _minute, _ampm]] begin[{] local_variable[type[List], ret] local_variable[type[List], dates] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=dateTime, postfix_operators=[], prefix_operators=[], qualifier=ISODateTimeFormat, selectors=[], type_arguments=None), name=isofmt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=DateTimeFormatter, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=isofmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=date, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=StringValue, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=dates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=date)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=DateTime, sub_type=None))), label=None) return[member[.ret]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[StringValue] operator[>] identifier[getDateAsString] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[StringValue] operator[>] identifier[_date] , Keyword[final] identifier[List] operator[<] identifier[StringValue] operator[>] identifier[_hour] , Keyword[final] identifier[List] operator[<] identifier[StringValue] operator[>] identifier[_minute] , Keyword[final] identifier[List] operator[<] identifier[StringValue] operator[>] identifier[_ampm] operator[SEP] Keyword[throws] identifier[EFapsException] { Keyword[final] identifier[List] operator[<] identifier[StringValue] operator[>] identifier[ret] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[DateTime] operator[>] identifier[dates] operator[=] identifier[getDateList] operator[SEP] identifier[_date] , identifier[_hour] , identifier[_minute] , identifier[_ampm] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[DateTime] identifier[date] operator[:] identifier[dates] operator[SEP] { Keyword[final] identifier[DateTimeFormatter] identifier[isofmt] operator[=] identifier[ISODateTimeFormat] operator[SEP] identifier[dateTime] operator[SEP] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[add] operator[SEP] identifier[StringValue] operator[SEP] identifier[valueOf] operator[SEP] identifier[date] operator[SEP] identifier[toString] operator[SEP] identifier[isofmt] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[ret] operator[SEP] }
public String asString(String charset) throws IOException { Reader reader = buildReader(charset); return consumeReader(reader); }
class class_name[name] begin[{] method[asString, return_type[type[String]], modifier[public], parameter[charset]] begin[{] local_variable[type[Reader], reader] return[call[.consumeReader, parameter[member[.reader]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[asString] operator[SEP] identifier[String] identifier[charset] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Reader] identifier[reader] operator[=] identifier[buildReader] operator[SEP] identifier[charset] operator[SEP] operator[SEP] Keyword[return] identifier[consumeReader] operator[SEP] identifier[reader] operator[SEP] operator[SEP] }
public void check(BioCSentence sentence) { String text = checkText(sentence); check(sentence, sentence.getOffset(), text); }
class class_name[name] begin[{] method[check, return_type[void], modifier[public], parameter[sentence]] begin[{] local_variable[type[String], text] call[.check, parameter[member[.sentence], call[sentence.getOffset, parameter[]], member[.text]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[check] operator[SEP] identifier[BioCSentence] identifier[sentence] operator[SEP] { identifier[String] identifier[text] operator[=] identifier[checkText] operator[SEP] identifier[sentence] operator[SEP] operator[SEP] identifier[check] operator[SEP] identifier[sentence] , identifier[sentence] operator[SEP] identifier[getOffset] operator[SEP] operator[SEP] , identifier[text] operator[SEP] operator[SEP] }
public List<IconType<ApplicationDescriptor>> getAllIcon() { List<IconType<ApplicationDescriptor>> list = new ArrayList<IconType<ApplicationDescriptor>>(); List<Node> nodeList = model.get("icon"); for(Node node: nodeList) { IconType<ApplicationDescriptor> type = new IconTypeImpl<ApplicationDescriptor>(this, "icon", model, node); list.add(type); } return list; }
class class_name[name] begin[{] method[getAllIcon, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], list] local_variable[type[List], nodeList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="icon"), MemberReference(member=model, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ApplicationDescriptor, sub_type=None))], dimensions=None, name=IconTypeImpl, sub_type=None)), name=type)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ApplicationDescriptor, sub_type=None))], dimensions=[], name=IconType, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=nodeList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None))), label=None) return[member[.list]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[IconType] operator[<] identifier[ApplicationDescriptor] operator[>] operator[>] identifier[getAllIcon] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[IconType] operator[<] identifier[ApplicationDescriptor] operator[>] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[IconType] operator[<] identifier[ApplicationDescriptor] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Node] operator[>] identifier[nodeList] operator[=] identifier[model] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Node] identifier[node] operator[:] identifier[nodeList] operator[SEP] { identifier[IconType] operator[<] identifier[ApplicationDescriptor] operator[>] identifier[type] operator[=] Keyword[new] identifier[IconTypeImpl] operator[<] identifier[ApplicationDescriptor] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[model] , identifier[node] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[type] operator[SEP] operator[SEP] } Keyword[return] identifier[list] operator[SEP] }
public static List<File> listDirectories( File root ) { List<File> result = new ArrayList<> (); File[] files = root.listFiles( new DirectoryFileFilter()); if( files != null ) result.addAll( Arrays.asList( files )); Collections.sort( result, new FileNameComparator()); return result; }
class class_name[name] begin[{] method[listDirectories, return_type[type[List]], modifier[public static], parameter[root]] begin[{] local_variable[type[List], result] local_variable[type[File], files] if[binary_operation[member[.files], !=, literal[null]]] begin[{] call[result.addAll, parameter[call[Arrays.asList, parameter[member[.files]]]]] else begin[{] None end[}] call[Collections.sort, parameter[member[.result], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileNameComparator, sub_type=None))]] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[File] operator[>] identifier[listDirectories] operator[SEP] identifier[File] identifier[root] operator[SEP] { identifier[List] operator[<] identifier[File] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[File] operator[SEP] operator[SEP] identifier[files] operator[=] identifier[root] operator[SEP] identifier[listFiles] operator[SEP] Keyword[new] identifier[DirectoryFileFilter] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[files] operator[!=] Other[null] operator[SEP] identifier[result] operator[SEP] identifier[addAll] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[files] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[result] , Keyword[new] identifier[FileNameComparator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
private void logSummary(final List<IncidentImpl> incidents) { if (incidents.isEmpty()) return; // summaryFile can be replaced so hold on to a local copy File outFile = summaryFile; if (outFile == null) { outFile = summaryFile = createNewSummaryFile(); } // outFile can still be null, the create above can still fail if (outFile != null) { synchronized (outFile) { OutputStream os = null; try { os = createSummaryStream(outFile); new IncidentSummaryLogger().logIncidentSummary(os, incidents); } catch (FileNotFoundException e) { // This is FFDC not being able to find itself... we're in bad // shape if this doesn't work.. e.printStackTrace(); } catch (IOException e) { } finally { LoggingFileUtils.tryToClose(os); } } } }
class class_name[name] begin[{] method[logSummary, return_type[void], modifier[private], parameter[incidents]] begin[{] if[call[incidents.isEmpty, parameter[]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[File], outFile] if[binary_operation[member[.outFile], ==, literal[null]]] begin[{] assign[member[.outFile], assign[member[.summaryFile], call[.createNewSummaryFile, parameter[]]]] else begin[{] None end[}] if[binary_operation[member[.outFile], !=, literal[null]]] begin[{] SYNCHRONIZED[member[.outFile]] BEGIN[{] local_variable[type[OutputStream], os] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=os, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=outFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createSummaryStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=os, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=incidents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logIncidentSummary, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=IncidentSummaryLogger, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['FileNotFoundException'])), CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=os, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tryToClose, postfix_operators=[], prefix_operators=[], qualifier=LoggingFileUtils, selectors=[], type_arguments=None), label=None)], label=None, resources=None) END[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[logSummary] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[IncidentImpl] operator[>] identifier[incidents] operator[SEP] { Keyword[if] operator[SEP] identifier[incidents] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[File] identifier[outFile] operator[=] identifier[summaryFile] operator[SEP] Keyword[if] operator[SEP] identifier[outFile] operator[==] Other[null] operator[SEP] { identifier[outFile] operator[=] identifier[summaryFile] operator[=] identifier[createNewSummaryFile] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[outFile] operator[!=] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[outFile] operator[SEP] { identifier[OutputStream] identifier[os] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[os] operator[=] identifier[createSummaryStream] operator[SEP] identifier[outFile] operator[SEP] operator[SEP] Keyword[new] identifier[IncidentSummaryLogger] operator[SEP] operator[SEP] operator[SEP] identifier[logIncidentSummary] operator[SEP] identifier[os] , identifier[incidents] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[FileNotFoundException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { } Keyword[finally] { identifier[LoggingFileUtils] operator[SEP] identifier[tryToClose] operator[SEP] identifier[os] operator[SEP] operator[SEP] } } } }
void removeOutStandingDatanodes(boolean logOutStandingOnly) { try { removeOutstandingDatanodesInternal(outStandingHeartbeats, logOutStandingOnly); removeOutstandingDatanodesInternal(outStandingReports, logOutStandingOnly); } catch (Exception e) { LOG.warn( "Failover - caught exception when removing outstanding datanodes", e); } }
class class_name[name] begin[{] method[removeOutStandingDatanodes, return_type[void], modifier[default], parameter[logOutStandingOnly]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=outStandingHeartbeats, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=logOutStandingOnly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeOutstandingDatanodesInternal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=outStandingReports, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=logOutStandingOnly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeOutstandingDatanodesInternal, 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="Failover - caught exception when removing outstanding datanodes"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, 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) end[}] END[}]
Keyword[void] identifier[removeOutStandingDatanodes] operator[SEP] Keyword[boolean] identifier[logOutStandingOnly] operator[SEP] { Keyword[try] { identifier[removeOutstandingDatanodesInternal] operator[SEP] identifier[outStandingHeartbeats] , identifier[logOutStandingOnly] operator[SEP] operator[SEP] identifier[removeOutstandingDatanodesInternal] operator[SEP] identifier[outStandingReports] , identifier[logOutStandingOnly] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public static String escapeHtml(CharSequence cs) { if (null == cs) return null; char[] cas = cs.toString().toCharArray(); StringBuilder sb = new StringBuilder(); for (char c : cas) { switch (c) { case '&': sb.append("&amp;"); break; case '<': sb.append("&lt;"); break; case '>': sb.append("&gt;"); break; case '\'': sb.append("&#x27;"); break; case '"': sb.append("&quot;"); break; default: sb.append(c); } } return sb.toString(); }
class class_name[name] begin[{] method[escapeHtml, return_type[type[String]], modifier[public static], parameter[cs]] begin[{] if[binary_operation[literal[null], ==, member[.cs]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[char], cas] local_variable[type[StringBuilder], sb] ForStatement(body=BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='&')], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="&amp;")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='<')], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="&lt;")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='>')], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="&gt;")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\'')], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="&#x27;")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='"')], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="&quot;")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=cas, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char))), label=None) return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[escapeHtml] operator[SEP] identifier[CharSequence] identifier[cs] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[cs] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[cas] operator[=] identifier[cs] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[char] identifier[c] operator[:] identifier[cas] operator[SEP] { Keyword[switch] operator[SEP] identifier[c] operator[SEP] { Keyword[case] literal[String] operator[:] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[String] operator[:] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] } } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void pay(PayReq requ, final PayHandler handler) { HMSAgentLog.i("pay:requ=" + StrUtils.objDesc(requ) + " handler=" + StrUtils.objDesc(handler)); if (payReq != null) { HMSAgentLog.e("pay:has already a pay to dispose"); if (handler != null) { new Handler(Looper.getMainLooper()).post(new CallbackResultRunnable<PayResultInfo>(handler, HMSAgent.AgentResultCode.REQUEST_REPEATED, null)); } return; } this.payReq = requ; this.handler = handler; retryTimes = MAX_RETRY_TIMES; connect(); }
class class_name[name] begin[{] method[pay, return_type[void], modifier[public], parameter[requ, handler]] begin[{] call[HMSAgentLog.i, parameter[binary_operation[binary_operation[binary_operation[literal["pay:requ="], +, call[StrUtils.objDesc, parameter[member[.requ]]]], +, literal[" handler="]], +, call[StrUtils.objDesc, parameter[member[.handler]]]]]] if[binary_operation[member[.payReq], !=, literal[null]]] begin[{] call[HMSAgentLog.e, parameter[literal["pay:has already a pay to dispose"]]] if[binary_operation[member[.handler], !=, literal[null]]] begin[{] ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMainLooper, postfix_operators=[], prefix_operators=[], qualifier=Looper, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=REQUEST_REPEATED, postfix_operators=[], prefix_operators=[], qualifier=HMSAgent.AgentResultCode, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=PayResultInfo, sub_type=None))], dimensions=None, name=CallbackResultRunnable, sub_type=None))], member=post, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Handler, sub_type=None)) else begin[{] None end[}] return[None] else begin[{] None end[}] assign[THIS[member[None.payReq]], member[.requ]] assign[THIS[member[None.handler]], member[.handler]] assign[member[.retryTimes], member[.MAX_RETRY_TIMES]] call[.connect, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[pay] operator[SEP] identifier[PayReq] identifier[requ] , Keyword[final] identifier[PayHandler] identifier[handler] operator[SEP] { identifier[HMSAgentLog] operator[SEP] identifier[i] operator[SEP] literal[String] operator[+] identifier[StrUtils] operator[SEP] identifier[objDesc] operator[SEP] identifier[requ] operator[SEP] operator[+] literal[String] operator[+] identifier[StrUtils] operator[SEP] identifier[objDesc] operator[SEP] identifier[handler] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[payReq] operator[!=] Other[null] operator[SEP] { identifier[HMSAgentLog] operator[SEP] identifier[e] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[handler] operator[!=] Other[null] operator[SEP] { Keyword[new] identifier[Handler] operator[SEP] identifier[Looper] operator[SEP] identifier[getMainLooper] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[post] operator[SEP] Keyword[new] identifier[CallbackResultRunnable] operator[<] identifier[PayResultInfo] operator[>] operator[SEP] identifier[handler] , identifier[HMSAgent] operator[SEP] identifier[AgentResultCode] operator[SEP] identifier[REQUEST_REPEATED] , Other[null] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[payReq] operator[=] identifier[requ] operator[SEP] Keyword[this] operator[SEP] identifier[handler] operator[=] identifier[handler] operator[SEP] identifier[retryTimes] operator[=] identifier[MAX_RETRY_TIMES] operator[SEP] identifier[connect] operator[SEP] operator[SEP] operator[SEP] }
public Future<ClientResponse> executeAsync(String procedure, Object... parameters) throws NoConnectionsException, IOException { ClientImpl currentClient = this.getClient(); final JDBC4ExecutionFuture future = new JDBC4ExecutionFuture(this.defaultAsyncTimeout); try { currentClient.callProcedure(new TrackingCallback(this, procedure, new ProcedureCallback() { @SuppressWarnings("unused") final JDBC4ExecutionFuture result; { this.result = future; } @Override public void clientCallback(ClientResponse response) throws Exception { future.set(response); } }), procedure, parameters); } catch (NoConnectionsException e) { this.dropClient(currentClient); throw e; } return future; }
class class_name[name] begin[{] method[executeAsync, return_type[type[Future]], modifier[public], parameter[procedure, parameters]] begin[{] local_variable[type[ClientImpl], currentClient] local_variable[type[JDBC4ExecutionFuture], future] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=procedure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unused"), name=SuppressWarnings)], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=result)], documentation=None, modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JDBC4ExecutionFuture, sub_type=None)), [StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=result, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=future, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=future, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=clientCallback, parameters=[FormalParameter(annotations=[], modifiers=set(), name=response, type=ReferenceType(arguments=None, dimensions=[], name=ClientResponse, sub_type=None), varargs=False)], return_type=None, throws=['Exception'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProcedureCallback, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TrackingCallback, sub_type=None)), MemberReference(member=procedure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=callProcedure, postfix_operators=[], prefix_operators=[], qualifier=currentClient, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=currentClient, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=dropClient, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoConnectionsException']))], finally_block=None, label=None, resources=None) return[member[.future]] end[}] END[}]
Keyword[public] identifier[Future] operator[<] identifier[ClientResponse] operator[>] identifier[executeAsync] operator[SEP] identifier[String] identifier[procedure] , identifier[Object] operator[...] identifier[parameters] operator[SEP] Keyword[throws] identifier[NoConnectionsException] , identifier[IOException] { identifier[ClientImpl] identifier[currentClient] operator[=] Keyword[this] operator[SEP] identifier[getClient] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[JDBC4ExecutionFuture] identifier[future] operator[=] Keyword[new] identifier[JDBC4ExecutionFuture] operator[SEP] Keyword[this] operator[SEP] identifier[defaultAsyncTimeout] operator[SEP] operator[SEP] Keyword[try] { identifier[currentClient] operator[SEP] identifier[callProcedure] operator[SEP] Keyword[new] identifier[TrackingCallback] operator[SEP] Keyword[this] , identifier[procedure] , Keyword[new] identifier[ProcedureCallback] operator[SEP] operator[SEP] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[final] identifier[JDBC4ExecutionFuture] identifier[result] operator[SEP] { Keyword[this] operator[SEP] identifier[result] operator[=] identifier[future] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[clientCallback] operator[SEP] identifier[ClientResponse] identifier[response] operator[SEP] Keyword[throws] identifier[Exception] { identifier[future] operator[SEP] identifier[set] operator[SEP] identifier[response] operator[SEP] operator[SEP] } } operator[SEP] , identifier[procedure] , identifier[parameters] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoConnectionsException] identifier[e] operator[SEP] { Keyword[this] operator[SEP] identifier[dropClient] operator[SEP] identifier[currentClient] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[return] identifier[future] operator[SEP] }
public Matrix solve (Matrix B) { return (m == n ? (new LUDecomposition(this)).solve(B) : (new QRDecomposition(this)).solve(B)); }
class class_name[name] begin[{] method[solve, return_type[type[Matrix]], modifier[public], parameter[B]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), if_false=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=B, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=solve, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=QRDecomposition, sub_type=None)), if_true=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=B, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=solve, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=LUDecomposition, sub_type=None)))] end[}] END[}]
Keyword[public] identifier[Matrix] identifier[solve] operator[SEP] identifier[Matrix] identifier[B] operator[SEP] { Keyword[return] operator[SEP] identifier[m] operator[==] identifier[n] operator[?] operator[SEP] Keyword[new] identifier[LUDecomposition] operator[SEP] Keyword[this] operator[SEP] operator[SEP] operator[SEP] identifier[solve] operator[SEP] identifier[B] operator[SEP] operator[:] operator[SEP] Keyword[new] identifier[QRDecomposition] operator[SEP] Keyword[this] operator[SEP] operator[SEP] operator[SEP] identifier[solve] operator[SEP] identifier[B] operator[SEP] operator[SEP] operator[SEP] }
public boolean isUserInRole(String roleName) { LoginHandler lh = Handlers.get( getServletContext() ).getLoginHandler(); return lh.isUserInRole(getHandlerContext(), roleName); }
class class_name[name] begin[{] method[isUserInRole, return_type[type[boolean]], modifier[public], parameter[roleName]] begin[{] local_variable[type[LoginHandler], lh] return[call[lh.isUserInRole, parameter[call[.getHandlerContext, parameter[]], member[.roleName]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isUserInRole] operator[SEP] identifier[String] identifier[roleName] operator[SEP] { identifier[LoginHandler] identifier[lh] operator[=] identifier[Handlers] operator[SEP] identifier[get] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getLoginHandler] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[lh] operator[SEP] identifier[isUserInRole] operator[SEP] identifier[getHandlerContext] operator[SEP] operator[SEP] , identifier[roleName] operator[SEP] operator[SEP] }
public static void enableSni(final String host, final SSLParameters sslParameters) { if (SNI_SSL_HELPER != null) { SNI_SSL_HELPER.enableSni(host, sslParameters); } }
class class_name[name] begin[{] method[enableSni, return_type[void], modifier[public static], parameter[host, sslParameters]] begin[{] if[binary_operation[member[.SNI_SSL_HELPER], !=, literal[null]]] begin[{] call[SNI_SSL_HELPER.enableSni, parameter[member[.host], member[.sslParameters]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[enableSni] operator[SEP] Keyword[final] identifier[String] identifier[host] , Keyword[final] identifier[SSLParameters] identifier[sslParameters] operator[SEP] { Keyword[if] operator[SEP] identifier[SNI_SSL_HELPER] operator[!=] Other[null] operator[SEP] { identifier[SNI_SSL_HELPER] operator[SEP] identifier[enableSni] operator[SEP] identifier[host] , identifier[sslParameters] operator[SEP] operator[SEP] } }
public static CallbackResult<Void> removeRenderable(Chunk chunk, BlockPos pos, IBlockState oldState, IBlockState newState) { if (oldState.getBlock() == newState.getBlock()) //same block, so same components return CallbackResult.noResult(); if (!chunk.getWorld().isRemote) return CallbackResult.noResult();//callback is also called on server thread in SSP AnimatedModelComponent comp = IComponent.getComponent(AnimatedModelComponent.class, oldState.getBlock()); if (comp != null) animatedRenderables.remove(pos); return CallbackResult.noResult(); }
class class_name[name] begin[{] method[removeRenderable, return_type[type[CallbackResult]], modifier[public static], parameter[chunk, pos, oldState, newState]] begin[{] if[binary_operation[call[oldState.getBlock, parameter[]], ==, call[newState.getBlock, parameter[]]]] begin[{] return[call[CallbackResult.noResult, parameter[]]] else begin[{] None end[}] if[call[chunk.getWorld, parameter[]]] begin[{] return[call[CallbackResult.noResult, parameter[]]] else begin[{] None end[}] local_variable[type[AnimatedModelComponent], comp] if[binary_operation[member[.comp], !=, literal[null]]] begin[{] call[animatedRenderables.remove, parameter[member[.pos]]] else begin[{] None end[}] return[call[CallbackResult.noResult, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CallbackResult] operator[<] identifier[Void] operator[>] identifier[removeRenderable] operator[SEP] identifier[Chunk] identifier[chunk] , identifier[BlockPos] identifier[pos] , identifier[IBlockState] identifier[oldState] , identifier[IBlockState] identifier[newState] operator[SEP] { Keyword[if] operator[SEP] identifier[oldState] operator[SEP] identifier[getBlock] operator[SEP] operator[SEP] operator[==] identifier[newState] operator[SEP] identifier[getBlock] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[CallbackResult] operator[SEP] identifier[noResult] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[chunk] operator[SEP] identifier[getWorld] operator[SEP] operator[SEP] operator[SEP] identifier[isRemote] operator[SEP] Keyword[return] identifier[CallbackResult] operator[SEP] identifier[noResult] operator[SEP] operator[SEP] operator[SEP] identifier[AnimatedModelComponent] identifier[comp] operator[=] identifier[IComponent] operator[SEP] identifier[getComponent] operator[SEP] identifier[AnimatedModelComponent] operator[SEP] Keyword[class] , identifier[oldState] operator[SEP] identifier[getBlock] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[comp] operator[!=] Other[null] operator[SEP] identifier[animatedRenderables] operator[SEP] identifier[remove] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[return] identifier[CallbackResult] operator[SEP] identifier[noResult] operator[SEP] operator[SEP] operator[SEP] }
@Override public String transformDML(String dml) { return transformQuery(super.transformDML(dml), asTextQueryTransformer, castGeoAsVarcharQueryTransformer, pointFromTextQueryTransformer, polygonFromTextQueryTransformer, longitudeQueryTransformer, latitudeQueryTransformer, isValidQueryTransformer, isInvalidReasonQueryTransformer, numPointsQueryTransformer, numInteriorRingsQueryTransformer, containsQueryTransformer, distanceQueryTransformer, areaQueryTransformer, centroidQueryTransformer, dWithinQueryTransformer); }
class class_name[name] begin[{] method[transformDML, return_type[type[String]], modifier[public], parameter[dml]] begin[{] return[call[.transformQuery, parameter[SuperMethodInvocation(arguments=[MemberReference(member=dml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=transformDML, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), member[.asTextQueryTransformer], member[.castGeoAsVarcharQueryTransformer], member[.pointFromTextQueryTransformer], member[.polygonFromTextQueryTransformer], member[.longitudeQueryTransformer], member[.latitudeQueryTransformer], member[.isValidQueryTransformer], member[.isInvalidReasonQueryTransformer], member[.numPointsQueryTransformer], member[.numInteriorRingsQueryTransformer], member[.containsQueryTransformer], member[.distanceQueryTransformer], member[.areaQueryTransformer], member[.centroidQueryTransformer], member[.dWithinQueryTransformer]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[transformDML] operator[SEP] identifier[String] identifier[dml] operator[SEP] { Keyword[return] identifier[transformQuery] operator[SEP] Keyword[super] operator[SEP] identifier[transformDML] operator[SEP] identifier[dml] operator[SEP] , identifier[asTextQueryTransformer] , identifier[castGeoAsVarcharQueryTransformer] , identifier[pointFromTextQueryTransformer] , identifier[polygonFromTextQueryTransformer] , identifier[longitudeQueryTransformer] , identifier[latitudeQueryTransformer] , identifier[isValidQueryTransformer] , identifier[isInvalidReasonQueryTransformer] , identifier[numPointsQueryTransformer] , identifier[numInteriorRingsQueryTransformer] , identifier[containsQueryTransformer] , identifier[distanceQueryTransformer] , identifier[areaQueryTransformer] , identifier[centroidQueryTransformer] , identifier[dWithinQueryTransformer] operator[SEP] operator[SEP] }
@NotNull private BoundStatement createBoundStatement(@NotNull PreparedStatement prepare, @NotNull V entity, @NotNull List<ColumnMetadata> columns) { BoundStatement boundStatement = new BoundStatement(prepare); boundStatement.setConsistencyLevel(getEntityMetadata().getWriteConsistencyLevel()); for (int i = 0; i < columns.size(); i++) { ColumnMetadata column = columns.get(i); Object value = column.readValue(entity); boundStatement.setBytesUnsafe(i, column.serialize(value)); } return boundStatement; }
class class_name[name] begin[{] method[createBoundStatement, return_type[type[BoundStatement]], modifier[private], parameter[prepare, entity, columns]] begin[{] local_variable[type[BoundStatement], boundStatement] call[boundStatement.setConsistencyLevel, parameter[call[.getEntityMetadata, parameter[]]]] 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=columns, selectors=[], type_arguments=None), name=column)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ColumnMetadata, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readValue, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=serialize, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[], type_arguments=None)], member=setBytesUnsafe, postfix_operators=[], prefix_operators=[], qualifier=boundStatement, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=columns, 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) return[member[.boundStatement]] end[}] END[}]
annotation[@] identifier[NotNull] Keyword[private] identifier[BoundStatement] identifier[createBoundStatement] operator[SEP] annotation[@] identifier[NotNull] identifier[PreparedStatement] identifier[prepare] , annotation[@] identifier[NotNull] identifier[V] identifier[entity] , annotation[@] identifier[NotNull] identifier[List] operator[<] identifier[ColumnMetadata] operator[>] identifier[columns] operator[SEP] { identifier[BoundStatement] identifier[boundStatement] operator[=] Keyword[new] identifier[BoundStatement] operator[SEP] identifier[prepare] operator[SEP] operator[SEP] identifier[boundStatement] operator[SEP] identifier[setConsistencyLevel] operator[SEP] identifier[getEntityMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getWriteConsistencyLevel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[columns] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ColumnMetadata] identifier[column] operator[=] identifier[columns] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[Object] identifier[value] operator[=] identifier[column] operator[SEP] identifier[readValue] operator[SEP] identifier[entity] operator[SEP] operator[SEP] identifier[boundStatement] operator[SEP] identifier[setBytesUnsafe] operator[SEP] identifier[i] , identifier[column] operator[SEP] identifier[serialize] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[boundStatement] operator[SEP] }
public static <R> DoubleFunction<R> doubleFunction(CheckedDoubleFunction<R> function, Consumer<Throwable> handler) { return t -> { try { return function.apply(t); } catch (Throwable e) { handler.accept(e); throw new IllegalStateException("Exception handler must throw a RuntimeException", e); } }; }
class class_name[name] begin[{] method[doubleFunction, return_type[type[DoubleFunction]], modifier[public static], parameter[function, handler]] begin[{] return[LambdaExpression(body=[TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=function, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception handler must throw a RuntimeException"), 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=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None)], parameters=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[DoubleFunction] operator[<] identifier[R] operator[>] identifier[doubleFunction] operator[SEP] identifier[CheckedDoubleFunction] operator[<] identifier[R] operator[>] identifier[function] , identifier[Consumer] operator[<] identifier[Throwable] operator[>] identifier[handler] operator[SEP] { Keyword[return] identifier[t] operator[->] { Keyword[try] { Keyword[return] identifier[function] operator[SEP] identifier[apply] operator[SEP] identifier[t] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { identifier[handler] operator[SEP] identifier[accept] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } operator[SEP] }
public java.util.List<ReplicationGroup> getReplicationGroups() { if (replicationGroups == null) { replicationGroups = new com.amazonaws.internal.SdkInternalList<ReplicationGroup>(); } return replicationGroups; }
class class_name[name] begin[{] method[getReplicationGroups, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.replicationGroups], ==, literal[null]]] begin[{] assign[member[.replicationGroups], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ReplicationGroup, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.replicationGroups]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[ReplicationGroup] operator[>] identifier[getReplicationGroups] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[replicationGroups] operator[==] Other[null] operator[SEP] { identifier[replicationGroups] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[ReplicationGroup] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[replicationGroups] operator[SEP] }
@POST @Produces(MediaType.APPLICATION_JSON) @Path("list/{repository}/{workspace}") public Response list(@PathParam("repository") String repository, @PathParam("workspace") String workspace, @QueryParam("name") String name) { Session ses = null; try { ses = sessionProviderService.getSessionProvider(null).getSession(workspace, repositoryService.getRepository(repository)); String xpath = "//element(*, exo:groovyResourceContainer)"; Query query = ses.getWorkspace().getQueryManager().createQuery(xpath, Query.XPATH); QueryResult result = query.execute(); NodeIterator nodeIterator = result.getNodes(); ArrayList<String> scriptList = new ArrayList<String>(); if (name == null || name.length() == 0) { while (nodeIterator.hasNext()) { Node node = nodeIterator.nextNode(); scriptList.add(node.getParent().getPath()); } } else { StringBuilder p = new StringBuilder(); // add '.*' pattern at the start p.append(".*"); for (int i = 0; i < name.length(); i++) { char c = name.charAt(i); if (c == '*' || c == '?') { p.append('.'); } if (".()[]^$|".indexOf(c) != -1) { p.append('\\'); } p.append(c); } // add '.*' pattern at he end p.append(".*"); Pattern pattern = Pattern.compile(p.toString(), Pattern.CASE_INSENSITIVE); while (nodeIterator.hasNext()) { Node node = nodeIterator.nextNode(); String scriptName = node.getParent().getPath(); if (pattern.matcher(scriptName).matches()) { scriptList.add(scriptName); } } } Collections.sort(scriptList); return Response.status(Response.Status.OK).entity(new ScriptList(scriptList)).type(MediaType.APPLICATION_JSON) .build(); } catch (Exception e) { LOG.error(e.getMessage(), e); return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(e.getMessage()) .type(MediaType.TEXT_PLAIN).build(); } finally { if (ses != null) { ses.logout(); } } }
class class_name[name] begin[{] method[list, return_type[type[Response]], modifier[public], parameter[repository, workspace, name]] begin[{] local_variable[type[Session], ses] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getSessionProvider, postfix_operators=[], prefix_operators=[], qualifier=sessionProviderService, selectors=[MethodInvocation(arguments=[MemberReference(member=workspace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=repository, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRepository, postfix_operators=[], prefix_operators=[], qualifier=repositoryService, selectors=[], type_arguments=None)], member=getSession, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="//element(*, exo:groovyResourceContainer)"), name=xpath)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getWorkspace, postfix_operators=[], prefix_operators=[], qualifier=ses, selectors=[MethodInvocation(arguments=[], member=getQueryManager, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=xpath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=XPATH, postfix_operators=[], prefix_operators=[], qualifier=Query, selectors=[])], member=createQuery, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=query)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Query, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=execute, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=QueryResult, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNodes, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), name=nodeIterator)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NodeIterator, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=scriptList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=||), else_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=None, dimensions=None, name=StringBuilder, sub_type=None)), name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".*")], member=append, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=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=charAt, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='*'), operator===), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='?'), operator===), 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=p, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=indexOf, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value=".()[]^$|"), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), 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=p, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=name, 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), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".*")], member=append, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), MemberReference(member=CASE_INSENSITIVE, postfix_operators=[], prefix_operators=[], qualifier=Pattern, 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)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nextNode, postfix_operators=[], prefix_operators=[], qualifier=nodeIterator, selectors=[], type_arguments=None), name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getParent, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[MethodInvocation(arguments=[], member=getPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=scriptName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=scriptName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=pattern, selectors=[MethodInvocation(arguments=[], member=matches, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=scriptName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=scriptList, selectors=[], type_arguments=None), label=None)]))]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=nodeIterator, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nextNode, postfix_operators=[], prefix_operators=[], qualifier=nodeIterator, selectors=[], type_arguments=None), name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getParent, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[MethodInvocation(arguments=[], member=getPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=scriptList, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=nodeIterator, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=scriptList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sort, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=OK, postfix_operators=[], prefix_operators=[], qualifier=Response.Status, selectors=[])], member=status, postfix_operators=[], prefix_operators=[], qualifier=Response, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=scriptList, 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=ScriptList, sub_type=None))], member=entity, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=APPLICATION_JSON, postfix_operators=[], prefix_operators=[], qualifier=MediaType, selectors=[])], member=type, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=INTERNAL_SERVER_ERROR, postfix_operators=[], prefix_operators=[], qualifier=Response.Status, selectors=[])], member=status, postfix_operators=[], prefix_operators=[], qualifier=Response, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=entity, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=TEXT_PLAIN, postfix_operators=[], prefix_operators=[], qualifier=MediaType, selectors=[])], member=type, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ses, 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=logout, postfix_operators=[], prefix_operators=[], qualifier=ses, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
annotation[@] identifier[POST] annotation[@] identifier[Produces] operator[SEP] identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON] operator[SEP] annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Response] identifier[list] operator[SEP] annotation[@] identifier[PathParam] operator[SEP] literal[String] operator[SEP] identifier[String] identifier[repository] , annotation[@] identifier[PathParam] operator[SEP] literal[String] operator[SEP] identifier[String] identifier[workspace] , annotation[@] identifier[QueryParam] operator[SEP] literal[String] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[Session] identifier[ses] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[ses] operator[=] identifier[sessionProviderService] operator[SEP] identifier[getSessionProvider] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[getSession] operator[SEP] identifier[workspace] , identifier[repositoryService] operator[SEP] identifier[getRepository] operator[SEP] identifier[repository] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[xpath] operator[=] literal[String] operator[SEP] identifier[Query] identifier[query] operator[=] identifier[ses] operator[SEP] identifier[getWorkspace] operator[SEP] operator[SEP] operator[SEP] identifier[getQueryManager] operator[SEP] operator[SEP] operator[SEP] identifier[createQuery] operator[SEP] identifier[xpath] , identifier[Query] operator[SEP] identifier[XPATH] operator[SEP] operator[SEP] identifier[QueryResult] identifier[result] operator[=] identifier[query] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] identifier[NodeIterator] identifier[nodeIterator] operator[=] identifier[result] operator[SEP] identifier[getNodes] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[scriptList] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[||] identifier[name] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[while] operator[SEP] identifier[nodeIterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[nodeIterator] operator[SEP] identifier[nextNode] operator[SEP] operator[SEP] operator[SEP] identifier[scriptList] operator[SEP] identifier[add] operator[SEP] identifier[node] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[StringBuilder] identifier[p] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[name] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[name] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[||] identifier[c] operator[==] literal[String] operator[SEP] { identifier[p] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[indexOf] operator[SEP] identifier[c] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { identifier[p] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[p] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] } identifier[p] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Pattern] identifier[pattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[p] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[Pattern] operator[SEP] identifier[CASE_INSENSITIVE] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[nodeIterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[nodeIterator] operator[SEP] identifier[nextNode] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[scriptName] operator[=] identifier[node] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pattern] operator[SEP] identifier[matcher] operator[SEP] identifier[scriptName] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { identifier[scriptList] operator[SEP] identifier[add] operator[SEP] identifier[scriptName] operator[SEP] operator[SEP] } } } identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[scriptList] operator[SEP] operator[SEP] Keyword[return] identifier[Response] operator[SEP] identifier[status] operator[SEP] identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[OK] operator[SEP] operator[SEP] identifier[entity] operator[SEP] Keyword[new] identifier[ScriptList] operator[SEP] identifier[scriptList] operator[SEP] operator[SEP] operator[SEP] identifier[type] operator[SEP] identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[return] identifier[Response] operator[SEP] identifier[status] operator[SEP] identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[INTERNAL_SERVER_ERROR] operator[SEP] operator[SEP] identifier[entity] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[type] operator[SEP] identifier[MediaType] operator[SEP] identifier[TEXT_PLAIN] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[ses] operator[!=] Other[null] operator[SEP] { identifier[ses] operator[SEP] identifier[logout] operator[SEP] operator[SEP] operator[SEP] } } }
private ExcelWicketToDoItem createToDoItemForUser(final String description, final Category category, Subcategory subcategory, String user, final LocalDate dueBy, final BigDecimal cost, ExecutionContext executionContext) { final ExcelWicketToDoItem toDoItem = toDoItems.newToDo(description, category, subcategory, user, dueBy, cost); executionContext.add(this, toDoItem); return toDoItem; }
class class_name[name] begin[{] method[createToDoItemForUser, return_type[type[ExcelWicketToDoItem]], modifier[private], parameter[description, category, subcategory, user, dueBy, cost, executionContext]] begin[{] local_variable[type[ExcelWicketToDoItem], toDoItem] call[executionContext.add, parameter[THIS[], member[.toDoItem]]] return[member[.toDoItem]] end[}] END[}]
Keyword[private] identifier[ExcelWicketToDoItem] identifier[createToDoItemForUser] operator[SEP] Keyword[final] identifier[String] identifier[description] , Keyword[final] identifier[Category] identifier[category] , identifier[Subcategory] identifier[subcategory] , identifier[String] identifier[user] , Keyword[final] identifier[LocalDate] identifier[dueBy] , Keyword[final] identifier[BigDecimal] identifier[cost] , identifier[ExecutionContext] identifier[executionContext] operator[SEP] { Keyword[final] identifier[ExcelWicketToDoItem] identifier[toDoItem] operator[=] identifier[toDoItems] operator[SEP] identifier[newToDo] operator[SEP] identifier[description] , identifier[category] , identifier[subcategory] , identifier[user] , identifier[dueBy] , identifier[cost] operator[SEP] operator[SEP] identifier[executionContext] operator[SEP] identifier[add] operator[SEP] Keyword[this] , identifier[toDoItem] operator[SEP] operator[SEP] Keyword[return] identifier[toDoItem] operator[SEP] }
private boolean oneMatchletMagicEquals(int offset, byte[] data) { int rangeStart = content.getInt(offset); // first byte of data for check to start at int rangeLength = content.getInt(offset + 4); // last byte of data for check to start at int dataLength = content.getInt(offset + 12); // number of bytes in match data/mask int dataOffset = content.getInt(offset + 16); // contentBytes offset to the match data int maskOffset = content.getInt(offset + 20); // contentBytes offset to the mask boolean found = false; for (int i = 0; !found && (i <= rangeLength) && (i + rangeStart + dataLength <= data.length); i++) { if (maskOffset != 0) { found = subArraysEqualWithMask( contentBytes, dataOffset, data, rangeStart + i, contentBytes, maskOffset, dataLength ); } else { found = subArraysEqual( contentBytes, dataOffset, data, rangeStart + i, dataLength ); } } return found; }
class class_name[name] begin[{] method[oneMatchletMagicEquals, return_type[type[boolean]], modifier[private], parameter[offset, data]] begin[{] local_variable[type[int], rangeStart] local_variable[type[int], rangeLength] local_variable[type[int], dataLength] local_variable[type[int], dataOffset] local_variable[type[int], maskOffset] local_variable[type[boolean], found] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=maskOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=contentBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dataOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=rangeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=dataLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=subArraysEqual, 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=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=contentBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dataOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=rangeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=contentBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maskOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dataLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=subArraysEqualWithMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=found, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rangeLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rangeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=dataLength, 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=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.found]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[oneMatchletMagicEquals] operator[SEP] Keyword[int] identifier[offset] , Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[SEP] { Keyword[int] identifier[rangeStart] operator[=] identifier[content] operator[SEP] identifier[getInt] operator[SEP] identifier[offset] operator[SEP] operator[SEP] Keyword[int] identifier[rangeLength] operator[=] identifier[content] operator[SEP] identifier[getInt] operator[SEP] identifier[offset] operator[+] Other[4] operator[SEP] operator[SEP] Keyword[int] identifier[dataLength] operator[=] identifier[content] operator[SEP] identifier[getInt] operator[SEP] identifier[offset] operator[+] Other[12] operator[SEP] operator[SEP] Keyword[int] identifier[dataOffset] operator[=] identifier[content] operator[SEP] identifier[getInt] operator[SEP] identifier[offset] operator[+] Other[16] operator[SEP] operator[SEP] Keyword[int] identifier[maskOffset] operator[=] identifier[content] operator[SEP] identifier[getInt] operator[SEP] identifier[offset] operator[+] Other[20] operator[SEP] operator[SEP] Keyword[boolean] identifier[found] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] operator[!] identifier[found] operator[&&] operator[SEP] identifier[i] operator[<=] identifier[rangeLength] operator[SEP] operator[&&] operator[SEP] identifier[i] operator[+] identifier[rangeStart] operator[+] identifier[dataLength] operator[<=] identifier[data] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[maskOffset] operator[!=] Other[0] operator[SEP] { identifier[found] operator[=] identifier[subArraysEqualWithMask] operator[SEP] identifier[contentBytes] , identifier[dataOffset] , identifier[data] , identifier[rangeStart] operator[+] identifier[i] , identifier[contentBytes] , identifier[maskOffset] , identifier[dataLength] operator[SEP] operator[SEP] } Keyword[else] { identifier[found] operator[=] identifier[subArraysEqual] operator[SEP] identifier[contentBytes] , identifier[dataOffset] , identifier[data] , identifier[rangeStart] operator[+] identifier[i] , identifier[dataLength] operator[SEP] operator[SEP] } } Keyword[return] identifier[found] operator[SEP] }
public Route to(Controller controller, Method method) { Preconditions.checkNotNull(controller); Preconditions.checkNotNull(method); this.controller = controller; this.controllerMethod = method; if (!method.getReturnType().isAssignableFrom(Result.class)) { throw new IllegalArgumentException(ERROR_CTRL + method + ERROR_IN + controller .getClass() + "`, or the method does not return a " + Result.class.getName() + " object"); } return _build(); }
class class_name[name] begin[{] method[to, return_type[type[Route]], modifier[public], parameter[controller, method]] begin[{] call[Preconditions.checkNotNull, parameter[member[.controller]]] call[Preconditions.checkNotNull, parameter[member[.method]]] assign[THIS[member[None.controller]], member[.controller]] assign[THIS[member[None.controllerMethod]], member[.method]] if[call[method.getReturnType, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ERROR_CTRL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=ERROR_IN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=controller, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="`, or the method does not return a "), operator=+), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Result, sub_type=None)), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" object"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[call[._build, parameter[]]] end[}] END[}]
Keyword[public] identifier[Route] identifier[to] operator[SEP] identifier[Controller] identifier[controller] , identifier[Method] identifier[method] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[controller] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[method] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[controller] operator[=] identifier[controller] operator[SEP] Keyword[this] operator[SEP] identifier[controllerMethod] operator[=] identifier[method] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[method] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[Result] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[ERROR_CTRL] operator[+] identifier[method] operator[+] identifier[ERROR_IN] operator[+] identifier[controller] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[Result] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[_build] operator[SEP] operator[SEP] operator[SEP] }
public static Date getNextDay() { Calendar cal = GregorianCalendar.getInstance(); return new GregorianCalendar(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH) + 1).getTime(); }
class class_name[name] begin[{] method[getNextDay, return_type[type[Date]], modifier[public static], parameter[]] begin[{] local_variable[type[Calendar], cal] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=YEAR, postfix_operators=[], prefix_operators=[], qualifier=Calendar, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=cal, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=MONTH, postfix_operators=[], prefix_operators=[], qualifier=Calendar, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=cal, selectors=[], type_arguments=None), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=DAY_OF_MONTH, postfix_operators=[], prefix_operators=[], qualifier=Calendar, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=cal, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getTime, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=GregorianCalendar, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Date] identifier[getNextDay] operator[SEP] operator[SEP] { identifier[Calendar] identifier[cal] operator[=] identifier[GregorianCalendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[GregorianCalendar] operator[SEP] identifier[cal] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] operator[SEP] , identifier[cal] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[MONTH] operator[SEP] , identifier[cal] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[DAY_OF_MONTH] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] }
private static void doCopyDirectory(File srcDir, File destDir, FileFilter filter, boolean preserveFileDate, List<String> exclusionList) throws IOException { if (destDir.exists()) { if (destDir.isDirectory() == false) { throw new IOException("Destination '" + destDir + "' exists but is not a directory"); } } else { if (destDir.mkdirs() == false) { throw new IOException("Destination '" + destDir + "' directory cannot be created"); } if (preserveFileDate) { destDir.setLastModified(srcDir.lastModified()); } } if (destDir.canWrite() == false) { throw new IOException("Destination '" + destDir + "' cannot be written to"); } // recurse File[] files = filter == null ? srcDir.listFiles() : srcDir.listFiles(filter); if (files == null) { // null if security restricted throw new IOException("Failed to list contents of " + srcDir); } for (int i = 0; i < files.length; i++) { File copiedFile = new File(destDir, files[i].getName()); if (exclusionList == null || !exclusionList.contains(files[i].getCanonicalPath())) { if (files[i].isDirectory()) { doCopyDirectory(files[i], copiedFile, filter, preserveFileDate, exclusionList); } else { doCopyFile(files[i], copiedFile, preserveFileDate); } } } }
class class_name[name] begin[{] method[doCopyDirectory, return_type[void], modifier[private static], parameter[srcDir, destDir, filter, preserveFileDate, exclusionList]] begin[{] if[call[destDir.exists, parameter[]]] begin[{] if[binary_operation[call[destDir.isDirectory, parameter[]], ==, literal[false]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Destination '"), operandr=MemberReference(member=destDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' exists but is not a directory"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] if[binary_operation[call[destDir.mkdirs, parameter[]], ==, literal[false]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Destination '"), operandr=MemberReference(member=destDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' directory cannot be created"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] if[member[.preserveFileDate]] begin[{] call[destDir.setLastModified, parameter[call[srcDir.lastModified, parameter[]]]] else begin[{] None end[}] end[}] if[binary_operation[call[destDir.canWrite, parameter[]], ==, literal[false]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Destination '"), operandr=MemberReference(member=destDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' cannot be written to"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[File], files] if[binary_operation[member[.files], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to list contents of "), operandr=MemberReference(member=srcDir, 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=IOException, sub_type=None)), label=None) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=destDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), name=copiedFile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=exclusionList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getCanonicalPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=exclusionList, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=isDirectory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=copiedFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=preserveFileDate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doCopyFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=copiedFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=preserveFileDate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exclusionList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doCopyDirectory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=files, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[doCopyDirectory] operator[SEP] identifier[File] identifier[srcDir] , identifier[File] identifier[destDir] , identifier[FileFilter] identifier[filter] , Keyword[boolean] identifier[preserveFileDate] , identifier[List] operator[<] identifier[String] operator[>] identifier[exclusionList] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[destDir] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[destDir] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[==] literal[boolean] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[destDir] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[destDir] operator[SEP] identifier[mkdirs] operator[SEP] operator[SEP] operator[==] literal[boolean] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[destDir] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[preserveFileDate] operator[SEP] { identifier[destDir] operator[SEP] identifier[setLastModified] operator[SEP] identifier[srcDir] operator[SEP] identifier[lastModified] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[destDir] operator[SEP] identifier[canWrite] operator[SEP] operator[SEP] operator[==] literal[boolean] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[destDir] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[File] operator[SEP] operator[SEP] identifier[files] operator[=] identifier[filter] operator[==] Other[null] operator[?] identifier[srcDir] operator[SEP] identifier[listFiles] operator[SEP] operator[SEP] operator[:] identifier[srcDir] operator[SEP] identifier[listFiles] operator[SEP] identifier[filter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[files] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[srcDir] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[files] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[File] identifier[copiedFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[destDir] , identifier[files] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[exclusionList] operator[==] Other[null] operator[||] operator[!] identifier[exclusionList] operator[SEP] identifier[contains] operator[SEP] identifier[files] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getCanonicalPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[files] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[doCopyDirectory] operator[SEP] identifier[files] operator[SEP] identifier[i] operator[SEP] , identifier[copiedFile] , identifier[filter] , identifier[preserveFileDate] , identifier[exclusionList] operator[SEP] operator[SEP] } Keyword[else] { identifier[doCopyFile] operator[SEP] identifier[files] operator[SEP] identifier[i] operator[SEP] , identifier[copiedFile] , identifier[preserveFileDate] operator[SEP] operator[SEP] } } } }
@Override public int read() throws IOException { if (this.in != null) { int r = read0(); count(r < 0 ? -1 : 1); return r; } else { throw new IOException("stream closed"); } }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[THIS[member[None.in]], !=, literal[null]]] begin[{] local_variable[type[int], r] call[.count, parameter[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), if_true=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1))]] return[member[.r]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="stream closed")], 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) end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[read] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[in] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[r] operator[=] identifier[read0] operator[SEP] operator[SEP] operator[SEP] identifier[count] operator[SEP] identifier[r] operator[<] Other[0] operator[?] operator[-] Other[1] operator[:] Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[r] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public ClassSymbol enclClass() { Symbol c = this; while (c != null && ((c.kind & TYP) == 0 || !c.type.hasTag(CLASS))) { c = c.owner; } return (ClassSymbol)c; }
class class_name[name] begin[{] method[enclClass, return_type[type[ClassSymbol]], modifier[public], parameter[]] begin[{] local_variable[type[Symbol], c] while[binary_operation[binary_operation[member[.c], !=, literal[null]], &&, binary_operation[binary_operation[binary_operation[member[c.kind], &, member[.TYP]], ==, literal[0]], ||, call[c.type.hasTag, parameter[member[.CLASS]]]]]] begin[{] assign[member[.c], member[c.owner]] end[}] return[Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ClassSymbol, sub_type=None))] end[}] END[}]
Keyword[public] identifier[ClassSymbol] identifier[enclClass] operator[SEP] operator[SEP] { identifier[Symbol] identifier[c] operator[=] Keyword[this] operator[SEP] Keyword[while] operator[SEP] identifier[c] operator[!=] Other[null] operator[&&] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[kind] operator[&] identifier[TYP] operator[SEP] operator[==] Other[0] operator[||] operator[!] identifier[c] operator[SEP] identifier[type] operator[SEP] identifier[hasTag] operator[SEP] identifier[CLASS] operator[SEP] operator[SEP] operator[SEP] { identifier[c] operator[=] identifier[c] operator[SEP] identifier[owner] operator[SEP] } Keyword[return] operator[SEP] identifier[ClassSymbol] operator[SEP] identifier[c] operator[SEP] }
public void getImageAttributes( final Map<String, String> attributes, final I_CmsSimpleCallback<Map<String, String>> callback) { boolean requiresLink = false; for (Entry<Attribute, I_CmsFormWidget> entry : m_fields.entrySet()) { String val = entry.getValue().getFormValueAsString(); if (CmsStringUtil.isEmptyOrWhitespaceOnly(val)) { continue; } if (entry.getKey() == Attribute.linkPath) { requiresLink = true; } else { attributes.put(entry.getKey().name(), val); } } if (requiresLink) { CmsCoreProvider.get().substituteLinkForRootPath( m_fields.get(Attribute.linkPath).getFormValueAsString(), new I_CmsSimpleCallback<String>() { public void execute(String arg) { attributes.put(Attribute.linkPath.name(), arg); callback.execute(attributes); } }); } else { callback.execute(attributes); } }
class class_name[name] begin[{] method[getImageAttributes, return_type[void], modifier[public], parameter[attributes, callback]] begin[{] local_variable[type[boolean], requiresLink] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getFormValueAsString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=val)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmptyOrWhitespaceOnly, postfix_operators=[], prefix_operators=[], qualifier=CmsStringUtil, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), operandr=MemberReference(member=linkPath, postfix_operators=[], prefix_operators=[], qualifier=Attribute, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=attributes, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=requiresLink, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=m_fields, 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=Attribute, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=I_CmsFormWidget, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) if[member[.requiresLink]] begin[{] call[CmsCoreProvider.get, parameter[]] else begin[{] call[callback.execute, parameter[member[.attributes]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[getImageAttributes] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[attributes] , Keyword[final] identifier[I_CmsSimpleCallback] operator[<] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[callback] operator[SEP] { Keyword[boolean] identifier[requiresLink] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[Attribute] , identifier[I_CmsFormWidget] operator[>] identifier[entry] operator[:] identifier[m_fields] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[val] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getFormValueAsString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isEmptyOrWhitespaceOnly] operator[SEP] identifier[val] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[==] identifier[Attribute] operator[SEP] identifier[linkPath] operator[SEP] { identifier[requiresLink] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[attributes] operator[SEP] identifier[put] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] operator[SEP] , identifier[val] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[requiresLink] operator[SEP] { identifier[CmsCoreProvider] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[substituteLinkForRootPath] operator[SEP] identifier[m_fields] operator[SEP] identifier[get] operator[SEP] identifier[Attribute] operator[SEP] identifier[linkPath] operator[SEP] operator[SEP] identifier[getFormValueAsString] operator[SEP] operator[SEP] , Keyword[new] identifier[I_CmsSimpleCallback] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[execute] operator[SEP] identifier[String] identifier[arg] operator[SEP] { identifier[attributes] operator[SEP] identifier[put] operator[SEP] identifier[Attribute] operator[SEP] identifier[linkPath] operator[SEP] identifier[name] operator[SEP] operator[SEP] , identifier[arg] operator[SEP] operator[SEP] identifier[callback] operator[SEP] identifier[execute] operator[SEP] identifier[attributes] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } Keyword[else] { identifier[callback] operator[SEP] identifier[execute] operator[SEP] identifier[attributes] operator[SEP] operator[SEP] } }
public static boolean isBase64(String string, String enc) throws UnsupportedEncodingException { return isBase64(string.getBytes(enc)); }
class class_name[name] begin[{] method[isBase64, return_type[type[boolean]], modifier[public static], parameter[string, enc]] begin[{] return[call[.isBase64, parameter[call[string.getBytes, parameter[member[.enc]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isBase64] operator[SEP] identifier[String] identifier[string] , identifier[String] identifier[enc] operator[SEP] Keyword[throws] identifier[UnsupportedEncodingException] { Keyword[return] identifier[isBase64] operator[SEP] identifier[string] operator[SEP] identifier[getBytes] operator[SEP] identifier[enc] operator[SEP] operator[SEP] operator[SEP] }
@Override public void setPivot(double x, double y, double z) { this.pivot = new Point3f(x, y, z); }
class class_name[name] begin[{] method[setPivot, return_type[void], modifier[public], parameter[x, y, z]] begin[{] assign[THIS[member[None.pivot]], ClassCreator(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=z, 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=Point3f, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setPivot] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] , Keyword[double] identifier[z] operator[SEP] { Keyword[this] operator[SEP] identifier[pivot] operator[=] Keyword[new] identifier[Point3f] operator[SEP] identifier[x] , identifier[y] , identifier[z] operator[SEP] operator[SEP] }
@Override public Date convert(Object value) { if (value instanceof Calendar) { return ((Calendar) value).getTime(); } else if (value instanceof Date) { return (Date) value; } else if (value instanceof Number) { return new Date(((Number) value).longValue()); } else if (value instanceof String) { String valueString = String.valueOf(value).trim(); try { return StringUtils.isDigits(valueString) ? new Date(Long.parseLong(valueString)) : new Date(getDateFormat().parse(valueString).getTime()); } catch (NumberFormatException | ParseException cause) { throw newConversionException(cause, "[%s] is not a valid date/time", value); } } else { return super.convert(value); } }
class class_name[name] begin[{] method[convert, return_type[type[Date]], modifier[public], parameter[value]] begin[{] if[binary_operation[member[.value], instanceof, type[Calendar]]] begin[{] return[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Calendar, sub_type=None))] else begin[{] if[binary_operation[member[.value], instanceof, type[Date]]] begin[{] return[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None))] else begin[{] if[binary_operation[member[.value], instanceof, type[Number]]] begin[{] return[ClassCreator(arguments=[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))] else begin[{] if[binary_operation[member[.value], instanceof, type[String]]] begin[{] local_variable[type[String], valueString] TryStatement(block=[ReturnStatement(expression=TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=valueString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isDigits, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), if_false=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getDateFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=valueString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getTime, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None)), if_true=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=valueString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseLong, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[%s] is not a valid date/time"), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newConversionException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=cause, types=['NumberFormatException', 'ParseException']))], finally_block=None, label=None, resources=None) else begin[{] return[SuperMethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convert, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] end[}] end[}] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Date] identifier[convert] operator[SEP] identifier[Object] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Calendar] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[Calendar] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Date] operator[SEP] { Keyword[return] operator[SEP] identifier[Date] operator[SEP] identifier[value] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Number] operator[SEP] { Keyword[return] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] { identifier[String] identifier[valueString] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[StringUtils] operator[SEP] identifier[isDigits] operator[SEP] identifier[valueString] operator[SEP] operator[?] Keyword[new] identifier[Date] operator[SEP] identifier[Long] operator[SEP] identifier[parseLong] operator[SEP] identifier[valueString] operator[SEP] operator[SEP] operator[:] Keyword[new] identifier[Date] operator[SEP] identifier[getDateFormat] operator[SEP] operator[SEP] operator[SEP] identifier[parse] operator[SEP] identifier[valueString] operator[SEP] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] operator[|] identifier[ParseException] identifier[cause] operator[SEP] { Keyword[throw] identifier[newConversionException] operator[SEP] identifier[cause] , literal[String] , identifier[value] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] Keyword[super] operator[SEP] identifier[convert] operator[SEP] identifier[value] operator[SEP] operator[SEP] } }
public void copy(ConnectionContext source) { this.connection = source.connection; this.session = source.session; this.destination = source.destination; }
class class_name[name] begin[{] method[copy, return_type[void], modifier[public], parameter[source]] begin[{] assign[THIS[member[None.connection]], member[source.connection]] assign[THIS[member[None.session]], member[source.session]] assign[THIS[member[None.destination]], member[source.destination]] end[}] END[}]
Keyword[public] Keyword[void] identifier[copy] operator[SEP] identifier[ConnectionContext] identifier[source] operator[SEP] { Keyword[this] operator[SEP] identifier[connection] operator[=] identifier[source] operator[SEP] identifier[connection] operator[SEP] Keyword[this] operator[SEP] identifier[session] operator[=] identifier[source] operator[SEP] identifier[session] operator[SEP] Keyword[this] operator[SEP] identifier[destination] operator[=] identifier[source] operator[SEP] identifier[destination] operator[SEP] }
public void moveToServer ( String hostname, int[] ports, int[] datagramPorts, InvocationService.ConfirmListener obs) { // the server switcher will take care of everything for us new ServerSwitcher(hostname, ports, datagramPorts, obs).switchServers(); }
class class_name[name] begin[{] method[moveToServer, return_type[void], modifier[public], parameter[hostname, ports, datagramPorts, obs]] begin[{] ClassCreator(arguments=[MemberReference(member=hostname, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ports, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=datagramPorts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=obs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=switchServers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ServerSwitcher, sub_type=None)) end[}] END[}]
Keyword[public] Keyword[void] identifier[moveToServer] operator[SEP] identifier[String] identifier[hostname] , Keyword[int] operator[SEP] operator[SEP] identifier[ports] , Keyword[int] operator[SEP] operator[SEP] identifier[datagramPorts] , identifier[InvocationService] operator[SEP] identifier[ConfirmListener] identifier[obs] operator[SEP] { Keyword[new] identifier[ServerSwitcher] operator[SEP] identifier[hostname] , identifier[ports] , identifier[datagramPorts] , identifier[obs] operator[SEP] operator[SEP] identifier[switchServers] operator[SEP] operator[SEP] operator[SEP] }
@Override public final void setHasName(final SpecificsOfItemGroup pHasName) { this.hasName = pHasName; if (this.itsId == null) { this.itsId = new IdI18nSpecificsOfItemGroup(); } this.itsId.setHasName(this.hasName); }
class class_name[name] begin[{] method[setHasName, return_type[void], modifier[final public], parameter[pHasName]] begin[{] assign[THIS[member[None.hasName]], member[.pHasName]] if[binary_operation[THIS[member[None.itsId]], ==, literal[null]]] begin[{] assign[THIS[member[None.itsId]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IdI18nSpecificsOfItemGroup, sub_type=None))] else begin[{] None end[}] THIS[member[None.itsId]call[None.setHasName, parameter[THIS[member[None.hasName]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[setHasName] operator[SEP] Keyword[final] identifier[SpecificsOfItemGroup] identifier[pHasName] operator[SEP] { Keyword[this] operator[SEP] identifier[hasName] operator[=] identifier[pHasName] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[itsId] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[itsId] operator[=] Keyword[new] identifier[IdI18nSpecificsOfItemGroup] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[itsId] operator[SEP] identifier[setHasName] operator[SEP] Keyword[this] operator[SEP] identifier[hasName] operator[SEP] operator[SEP] }
public void assignIds(final InputContainerElements elements, final FacesContext context) { boolean refreshIds = false; if (getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) { setId(elements.getPropertyName(context)); refreshIds = true; } UIComponent label = elements.getLabel(); if (label != null) { if (label.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) { label.setId(getDefaultLabelId()); } else if (refreshIds) { label.setId(label.getId()); } } for (int i = 0, len = elements.getInputs().size(); i < len; i++) { UIComponent input = (UIComponent) elements.getInputs().get(i); if (input.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) { input.setId(getDefaultInputId() + (i == 0 ? "" : (i + 1))); } else if (refreshIds) { input.setId(input.getId()); } } for (int i = 0, len = elements.getMessages().size(); i < len; i++) { UIComponent msg = elements.getMessages().get(i); if (msg.getId().startsWith(UIViewRoot.UNIQUE_ID_PREFIX)) { msg.setId(getDefaultMessageId() + (i == 0 ? "" : (i + 1))); } else if (refreshIds) { msg.setId(msg.getId()); } } }
class class_name[name] begin[{] method[assignIds, return_type[void], modifier[public], parameter[elements, context]] begin[{] local_variable[type[boolean], refreshIds] if[call[.getId, parameter[]]] begin[{] call[.setId, parameter[call[elements.getPropertyName, parameter[member[.context]]]]] assign[member[.refreshIds], literal[true]] else begin[{] None end[}] local_variable[type[UIComponent], label] if[binary_operation[member[.label], !=, literal[null]]] begin[{] if[call[label.getId, parameter[]]] begin[{] call[label.setId, parameter[call[.getDefaultLabelId, parameter[]]]] else begin[{] if[member[.refreshIds]] begin[{] call[label.setId, parameter[call[label.getId, parameter[]]]] else begin[{] None end[}] end[}] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getInputs, postfix_operators=[], prefix_operators=[], qualifier=elements, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=UIComponent, sub_type=None)), name=input)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=UIComponent, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[MethodInvocation(arguments=[MemberReference(member=UNIQUE_ID_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=UIViewRoot, selectors=[])], member=startsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=IfStatement(condition=MemberReference(member=refreshIds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)], member=setId, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getDefaultInputId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), operator=+)], member=setId, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i), VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInputs, postfix_operators=[], prefix_operators=[], qualifier=elements, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=len)], 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=[], member=getMessages, postfix_operators=[], prefix_operators=[], qualifier=elements, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=UIComponent, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[MethodInvocation(arguments=[MemberReference(member=UNIQUE_ID_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=UIViewRoot, selectors=[])], member=startsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=IfStatement(condition=MemberReference(member=refreshIds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None)], member=setId, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getDefaultMessageId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), operator=+)], member=setId, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i), VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getMessages, postfix_operators=[], prefix_operators=[], qualifier=elements, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=len)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[assignIds] operator[SEP] Keyword[final] identifier[InputContainerElements] identifier[elements] , Keyword[final] identifier[FacesContext] identifier[context] operator[SEP] { Keyword[boolean] identifier[refreshIds] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[UIViewRoot] operator[SEP] identifier[UNIQUE_ID_PREFIX] operator[SEP] operator[SEP] { identifier[setId] operator[SEP] identifier[elements] operator[SEP] identifier[getPropertyName] operator[SEP] identifier[context] operator[SEP] operator[SEP] operator[SEP] identifier[refreshIds] operator[=] literal[boolean] operator[SEP] } identifier[UIComponent] identifier[label] operator[=] identifier[elements] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[label] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[label] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[UIViewRoot] operator[SEP] identifier[UNIQUE_ID_PREFIX] operator[SEP] operator[SEP] { identifier[label] operator[SEP] identifier[setId] operator[SEP] identifier[getDefaultLabelId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[refreshIds] operator[SEP] { identifier[label] operator[SEP] identifier[setId] operator[SEP] identifier[label] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[len] operator[=] identifier[elements] operator[SEP] identifier[getInputs] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[UIComponent] identifier[input] operator[=] operator[SEP] identifier[UIComponent] operator[SEP] identifier[elements] operator[SEP] identifier[getInputs] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[input] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[UIViewRoot] operator[SEP] identifier[UNIQUE_ID_PREFIX] operator[SEP] operator[SEP] { identifier[input] operator[SEP] identifier[setId] operator[SEP] identifier[getDefaultInputId] operator[SEP] operator[SEP] operator[+] operator[SEP] identifier[i] operator[==] Other[0] operator[?] literal[String] operator[:] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[refreshIds] operator[SEP] { identifier[input] operator[SEP] identifier[setId] operator[SEP] identifier[input] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[len] operator[=] identifier[elements] operator[SEP] identifier[getMessages] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[UIComponent] identifier[msg] operator[=] identifier[elements] operator[SEP] identifier[getMessages] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[msg] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[UIViewRoot] operator[SEP] identifier[UNIQUE_ID_PREFIX] operator[SEP] operator[SEP] { identifier[msg] operator[SEP] identifier[setId] operator[SEP] identifier[getDefaultMessageId] operator[SEP] operator[SEP] operator[+] operator[SEP] identifier[i] operator[==] Other[0] operator[?] literal[String] operator[:] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[refreshIds] operator[SEP] { identifier[msg] operator[SEP] identifier[setId] operator[SEP] identifier[msg] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public CompletableFuture<Void> kill() { return submitter.close() .thenCompose(v -> listener.close()) .thenCompose(v -> manager.kill()) .thenCompose(v -> connection.close()); }
class class_name[name] begin[{] method[kill, return_type[type[CompletableFuture]], modifier[public], parameter[]] begin[{] return[call[submitter.close, parameter[]]] end[}] END[}]
Keyword[public] identifier[CompletableFuture] operator[<] identifier[Void] operator[>] identifier[kill] operator[SEP] operator[SEP] { Keyword[return] identifier[submitter] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[thenCompose] operator[SEP] identifier[v] operator[->] identifier[listener] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[thenCompose] operator[SEP] identifier[v] operator[->] identifier[manager] operator[SEP] identifier[kill] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[thenCompose] operator[SEP] identifier[v] operator[->] identifier[connection] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public ScreenLocation getNextLocation(short position, short setNewAnchor) { if (position == ScreenConstants.NEXT_LOGICAL) position = ScreenConstants.RIGHT_OF_LAST; if (position == ScreenConstants.FIRST_LOCATION) position = ScreenConstants.FIRST_DISPLAY_LOCATION; if (position == ScreenConstants.ADD_SCREEN_VIEW_BUFFER) position = ScreenConstants.ADD_GRID_SCREEN_BUFFER; // No buffer around frame! return super.getNextLocation(position, setNewAnchor); }
class class_name[name] begin[{] method[getNextLocation, return_type[type[ScreenLocation]], modifier[public], parameter[position, setNewAnchor]] begin[{] if[binary_operation[member[.position], ==, member[ScreenConstants.NEXT_LOGICAL]]] begin[{] assign[member[.position], member[ScreenConstants.RIGHT_OF_LAST]] else begin[{] None end[}] if[binary_operation[member[.position], ==, member[ScreenConstants.FIRST_LOCATION]]] begin[{] assign[member[.position], member[ScreenConstants.FIRST_DISPLAY_LOCATION]] else begin[{] None end[}] if[binary_operation[member[.position], ==, member[ScreenConstants.ADD_SCREEN_VIEW_BUFFER]]] begin[{] assign[member[.position], member[ScreenConstants.ADD_GRID_SCREEN_BUFFER]] else begin[{] None end[}] return[SuperMethodInvocation(arguments=[MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=setNewAnchor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNextLocation, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
Keyword[public] identifier[ScreenLocation] identifier[getNextLocation] operator[SEP] Keyword[short] identifier[position] , Keyword[short] identifier[setNewAnchor] operator[SEP] { Keyword[if] operator[SEP] identifier[position] operator[==] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] operator[SEP] identifier[position] operator[=] identifier[ScreenConstants] operator[SEP] identifier[RIGHT_OF_LAST] operator[SEP] Keyword[if] operator[SEP] identifier[position] operator[==] identifier[ScreenConstants] operator[SEP] identifier[FIRST_LOCATION] operator[SEP] identifier[position] operator[=] identifier[ScreenConstants] operator[SEP] identifier[FIRST_DISPLAY_LOCATION] operator[SEP] Keyword[if] operator[SEP] identifier[position] operator[==] identifier[ScreenConstants] operator[SEP] identifier[ADD_SCREEN_VIEW_BUFFER] operator[SEP] identifier[position] operator[=] identifier[ScreenConstants] operator[SEP] identifier[ADD_GRID_SCREEN_BUFFER] operator[SEP] Keyword[return] Keyword[super] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[position] , identifier[setNewAnchor] operator[SEP] operator[SEP] }
protected void localRelease() { super.localRelease(); _state.clear(); _action = null; _value = null; _text = null; _params = null; _targetScope = null; _popupSupport = null; _disableSecondClick = false; _renderAsButton = false; }
class class_name[name] begin[{] method[localRelease, return_type[void], modifier[protected], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=localRelease, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) call[_state.clear, parameter[]] assign[member[._action], literal[null]] assign[member[._value], literal[null]] assign[member[._text], literal[null]] assign[member[._params], literal[null]] assign[member[._targetScope], literal[null]] assign[member[._popupSupport], literal[null]] assign[member[._disableSecondClick], literal[false]] assign[member[._renderAsButton], literal[false]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[localRelease] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] identifier[_state] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[_action] operator[=] Other[null] operator[SEP] identifier[_value] operator[=] Other[null] operator[SEP] identifier[_text] operator[=] Other[null] operator[SEP] identifier[_params] operator[=] Other[null] operator[SEP] identifier[_targetScope] operator[=] Other[null] operator[SEP] identifier[_popupSupport] operator[=] Other[null] operator[SEP] identifier[_disableSecondClick] operator[=] literal[boolean] operator[SEP] identifier[_renderAsButton] operator[=] literal[boolean] operator[SEP] }
public void marshall(Location location, ProtocolMarshaller protocolMarshaller) { if (location == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(location.getJdbc(), JDBC_BINDING); protocolMarshaller.marshall(location.getS3(), S3_BINDING); protocolMarshaller.marshall(location.getDynamoDB(), DYNAMODB_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[location, protocolMarshaller]] begin[{] if[binary_operation[member[.location], ==, 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=getJdbc, postfix_operators=[], prefix_operators=[], qualifier=location, selectors=[], type_arguments=None), MemberReference(member=JDBC_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=getS3, postfix_operators=[], prefix_operators=[], qualifier=location, selectors=[], type_arguments=None), MemberReference(member=S3_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=getDynamoDB, postfix_operators=[], prefix_operators=[], qualifier=location, selectors=[], type_arguments=None), MemberReference(member=DYNAMODB_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[Location] identifier[location] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[location] 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[location] operator[SEP] identifier[getJdbc] operator[SEP] operator[SEP] , identifier[JDBC_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[location] operator[SEP] identifier[getS3] operator[SEP] operator[SEP] , identifier[S3_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[location] operator[SEP] identifier[getDynamoDB] operator[SEP] operator[SEP] , identifier[DYNAMODB_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@Override public int compareTo(Object obj) { if (obj instanceof URI) { return this.toString().compareTo(obj.toString()); } else { return -1; } }
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[public], parameter[obj]] begin[{] if[binary_operation[member[.obj], instanceof, type[URI]]] begin[{] return[THIS[call[None.toString, parameter[]]call[None.compareTo, parameter[call[obj.toString, parameter[]]]]]] else begin[{] return[literal[1]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Object] identifier[obj] operator[SEP] { Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[URI] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[obj] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] operator[-] Other[1] operator[SEP] } }
private QuotaValue getQuotaValue(final CacheKey key) throws UnknownQuotaLimitException { QuotaValue quotaValue = SecurityHelper.doPrivilegedAction(new PrivilegedAction<QuotaValue>() { public QuotaValue run() { return (QuotaValue)cache.withFlags(Flag.FORCE_WRITE_LOCK).get(key); } }); if (quotaValue == null) { throw new UnknownQuotaLimitException("Quota was not set early"); } return quotaValue; }
class class_name[name] begin[{] method[getQuotaValue, return_type[type[QuotaValue]], modifier[private], parameter[key]] begin[{] local_variable[type[QuotaValue], quotaValue] if[binary_operation[member[.quotaValue], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Quota was not set early")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnknownQuotaLimitException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.quotaValue]] end[}] END[}]
Keyword[private] identifier[QuotaValue] identifier[getQuotaValue] operator[SEP] Keyword[final] identifier[CacheKey] identifier[key] operator[SEP] Keyword[throws] identifier[UnknownQuotaLimitException] { identifier[QuotaValue] identifier[quotaValue] operator[=] identifier[SecurityHelper] operator[SEP] identifier[doPrivilegedAction] operator[SEP] Keyword[new] identifier[PrivilegedAction] operator[<] identifier[QuotaValue] operator[>] operator[SEP] operator[SEP] { Keyword[public] identifier[QuotaValue] identifier[run] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[QuotaValue] operator[SEP] identifier[cache] operator[SEP] identifier[withFlags] operator[SEP] identifier[Flag] operator[SEP] identifier[FORCE_WRITE_LOCK] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[quotaValue] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnknownQuotaLimitException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[quotaValue] operator[SEP] }
@Override public CommercePriceEntry findByUuid_Last(String uuid, OrderByComparator<CommercePriceEntry> orderByComparator) throws NoSuchPriceEntryException { CommercePriceEntry commercePriceEntry = fetchByUuid_Last(uuid, orderByComparator); if (commercePriceEntry != null) { return commercePriceEntry; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("uuid="); msg.append(uuid); msg.append("}"); throw new NoSuchPriceEntryException(msg.toString()); }
class class_name[name] begin[{] method[findByUuid_Last, return_type[type[CommercePriceEntry]], modifier[public], parameter[uuid, orderByComparator]] begin[{] local_variable[type[CommercePriceEntry], commercePriceEntry] if[binary_operation[member[.commercePriceEntry], !=, literal[null]]] begin[{] return[member[.commercePriceEntry]] else begin[{] None end[}] local_variable[type[StringBundler], msg] call[msg.append, parameter[member[._NO_SUCH_ENTITY_WITH_KEY]]] call[msg.append, parameter[literal["uuid="]]] call[msg.append, parameter[member[.uuid]]] call[msg.append, parameter[literal["}"]]] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchPriceEntryException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommercePriceEntry] identifier[findByUuid_Last] operator[SEP] identifier[String] identifier[uuid] , identifier[OrderByComparator] operator[<] identifier[CommercePriceEntry] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchPriceEntryException] { identifier[CommercePriceEntry] identifier[commercePriceEntry] operator[=] identifier[fetchByUuid_Last] operator[SEP] identifier[uuid] , identifier[orderByComparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commercePriceEntry] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[commercePriceEntry] operator[SEP] } identifier[StringBundler] identifier[msg] operator[=] Keyword[new] identifier[StringBundler] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[_NO_SUCH_ENTITY_WITH_KEY] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[uuid] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[NoSuchPriceEntryException] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private String computeClasspathString( AbstractPath specifiedClasspath ) { List<String> resultList = computePath( specifiedClasspath ); StringBuffer theClasspath = new StringBuffer(); for ( String str : resultList ) { addToClasspath( theClasspath, str ); } return theClasspath.toString(); }
class class_name[name] begin[{] method[computeClasspathString, return_type[type[String]], modifier[private], parameter[specifiedClasspath]] begin[{] local_variable[type[List], resultList] local_variable[type[StringBuffer], theClasspath] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=theClasspath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addToClasspath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=resultList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=str)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[call[theClasspath.toString, parameter[]]] end[}] END[}]
Keyword[private] identifier[String] identifier[computeClasspathString] operator[SEP] identifier[AbstractPath] identifier[specifiedClasspath] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[resultList] operator[=] identifier[computePath] operator[SEP] identifier[specifiedClasspath] operator[SEP] operator[SEP] identifier[StringBuffer] identifier[theClasspath] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[str] operator[:] identifier[resultList] operator[SEP] { identifier[addToClasspath] operator[SEP] identifier[theClasspath] , identifier[str] operator[SEP] operator[SEP] } Keyword[return] identifier[theClasspath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings({ "rawtypes", "unchecked" }) public Object getObject(NodeConfig rootNode, Class rootClass, Object rootObject) throws UnmarshalException, SecurityException{ Field[] fields = getClassFields(rootClass); Map<String, Field> elementMap = new HashMap<String, Field>(); Map<String, Field> attributeMap = new HashMap<String, Field>(); Field elementValue = null; for(Field field : fields){ if(field.isAnnotationPresent(Element.class)){ Element element = (Element)field.getAnnotation(Element.class); elementMap.put(element.name(), field); continue; } if(field.isAnnotationPresent(Attribute.class)){ Attribute attribute = (Attribute)field.getAnnotation(Attribute.class); attributeMap.put(attribute.name(), field); continue; } if(field.isAnnotationPresent(ElementValue.class)){ elementValue = field; continue; } } Object targetObject = null; try { if(rootObject!=null){ Constructor constructor = rootClass.getConstructor(new Class[]{rootObject.getClass()}); targetObject = constructor.newInstance(rootObject); }else{ targetObject = rootClass.newInstance(); } } catch (Exception e) { throw new UnmarshalException(e); } boolean isNalaObject = targetObject instanceof XmlObject ? true : false; if(rootNode.hasChildren()){ List childrenNode = rootNode.getChildrenNodes(); for(Iterator iterNode = childrenNode.iterator(); iterNode.hasNext();){ NodeConfig nodeConfig = (NodeConfig)iterNode.next(); Field field = elementMap.get(nodeConfig.getName()); if(field!=null){ String fieldType = field.getType().getName(); Object fieldValue = null; List<Object> listField = null; field.setAccessible(true); if(fieldType.equals(Constant.LIST_CLASS)){ String listTypeName = field.getGenericType().toString(); fieldType = listTypeName.substring(Constant.LIST_CLASS.length() + 1, listTypeName.length() -1 ); try { listField = (List<Object>)field.get(targetObject); } catch (IllegalArgumentException e) { throw new UnmarshalException(e); } catch (IllegalAccessException e) { throw new UnmarshalException(e); } } ObjectValueCreator objectValueCreator = new ObjectValueCreator(); fieldValue = objectValueCreator.getValue(fieldType, nodeConfig); if(fieldValue==null){ //如果字段类别是带有$(表示内部类)则采用先构造外部类, 然后通过外部类生成内部类实例 if(fieldType.indexOf('$')>0){ try{ fieldValue = getObject(nodeConfig, Class.forName(fieldType), targetObject); }catch (ClassNotFoundException e) { throw new UnmarshalException(e); } }else{ try{ fieldValue = getObject(nodeConfig, Class.forName(fieldType), null); }catch (ClassNotFoundException e) { throw new UnmarshalException(e); } } } if(listField!=null){ listField.add(fieldValue); fieldValue = listField; } setField(field, targetObject, fieldValue); } } } if(rootNode.getValue()!=null && elementValue!=null){ setField(elementValue, targetObject, rootNode.getValue()); } if(rootNode.hasAttributes()){ List attributes = rootNode.getAttribute(); if(attributes!=null && attributes.size()>0){ for(Iterator iterAttribute = attributes.iterator(); iterAttribute.hasNext();){ AttributeConfig attributeConfig = (AttributeConfig)iterAttribute.next(); Field field = attributeMap.get(attributeConfig.getName()); if(field!=null){ String fieldType = field.getType().getName(); Object attributeValue = TypeConver.converValue(fieldType, attributeConfig.getValue()); setField(field, targetObject, attributeValue); } } } } if(isNalaObject){ setNameSpaces(rootNode, targetObject); } return targetObject; }
class class_name[name] begin[{] method[getObject, return_type[type[Object]], modifier[public], parameter[rootNode, rootClass, rootObject]] begin[{] local_variable[type[Field], fields] local_variable[type[Map], elementMap] local_variable[type[Map], attributeMap] local_variable[type[Field], elementValue] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Element, sub_type=None))], member=isAnnotationPresent, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Element, sub_type=None))], member=getAnnotation, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), name=element)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=None), MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=elementMap, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), IfStatement(condition=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))], member=isAnnotationPresent, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))], member=getAnnotation, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Attribute, sub_type=None)), name=attribute)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Attribute, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=attributeMap, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), IfStatement(condition=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ElementValue, sub_type=None))], member=isAnnotationPresent, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=elementValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), ContinueStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))), label=None) local_variable[type[Object], targetObject] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=rootObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=targetObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=rootClass, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=rootObject, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Class, sub_type=None))], member=getConstructor, postfix_operators=[], prefix_operators=[], qualifier=rootClass, selectors=[], type_arguments=None), name=constructor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Constructor, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=targetObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=rootObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=constructor, 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=UnmarshalException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) local_variable[type[boolean], isNalaObject] if[call[rootNode.hasChildren, parameter[]]] begin[{] local_variable[type[List], childrenNode] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=iterNode, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=NodeConfig, sub_type=None)), name=nodeConfig)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NodeConfig, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=nodeConfig, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=elementMap, selectors=[], type_arguments=None), name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=fieldType)], 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=null), name=fieldValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=listField)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAccessible, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=LIST_CLASS, postfix_operators=[], prefix_operators=[], qualifier=Constant, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=fieldType, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getGenericType, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=listTypeName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=Constant.LIST_CLASS, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=listTypeName, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=listTypeName, selectors=[], type_arguments=None)), label=None), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=listField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=targetObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=List, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnmarshalException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalArgumentException'])), 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=UnmarshalException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException']))], finally_block=None, label=None, resources=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=None, dimensions=None, name=ObjectValueCreator, sub_type=None)), name=objectValueCreator)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ObjectValueCreator, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=fieldType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nodeConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=objectValueCreator, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=fieldValue, 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=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='$')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=fieldType, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=nodeConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=fieldType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=, 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=UnmarshalException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None)]), label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=nodeConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=fieldType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), MemberReference(member=targetObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=, 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=UnmarshalException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=listField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=listField, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=listField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iterNode, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=childrenNode, selectors=[], type_arguments=None), name=iterNode)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) else begin[{] None end[}] if[binary_operation[binary_operation[call[rootNode.getValue, parameter[]], !=, literal[null]], &&, binary_operation[member[.elementValue], !=, literal[null]]]] begin[{] call[.setField, parameter[member[.elementValue], member[.targetObject], call[rootNode.getValue, parameter[]]]] else begin[{] None end[}] if[call[rootNode.hasAttributes, parameter[]]] begin[{] local_variable[type[List], attributes] if[binary_operation[binary_operation[member[.attributes], !=, literal[null]], &&, binary_operation[call[attributes.size, parameter[]], >, literal[0]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=iterAttribute, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AttributeConfig, sub_type=None)), name=attributeConfig)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AttributeConfig, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=attributeConfig, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=attributeMap, selectors=[], type_arguments=None), name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=fieldType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fieldType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=attributeConfig, selectors=[], type_arguments=None)], member=converValue, postfix_operators=[], prefix_operators=[], qualifier=TypeConver, selectors=[], type_arguments=None), name=attributeValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=attributeValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iterAttribute, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=attributes, selectors=[], type_arguments=None), name=iterAttribute)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) else begin[{] None end[}] else begin[{] None end[}] if[member[.isNalaObject]] begin[{] call[.setNameSpaces, parameter[member[.rootNode], member[.targetObject]]] else begin[{] None end[}] return[member[.targetObject]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[public] identifier[Object] identifier[getObject] operator[SEP] identifier[NodeConfig] identifier[rootNode] , identifier[Class] identifier[rootClass] , identifier[Object] identifier[rootObject] operator[SEP] Keyword[throws] identifier[UnmarshalException] , identifier[SecurityException] { identifier[Field] operator[SEP] operator[SEP] identifier[fields] operator[=] identifier[getClassFields] operator[SEP] identifier[rootClass] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Field] operator[>] identifier[elementMap] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Field] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Field] operator[>] identifier[attributeMap] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Field] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Field] identifier[elementValue] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Field] identifier[field] operator[:] identifier[fields] operator[SEP] { Keyword[if] operator[SEP] identifier[field] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[Element] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[Element] identifier[element] operator[=] operator[SEP] identifier[Element] operator[SEP] identifier[field] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[Element] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[elementMap] operator[SEP] identifier[put] operator[SEP] identifier[element] operator[SEP] identifier[name] operator[SEP] operator[SEP] , identifier[field] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[field] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[Attribute] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[Attribute] identifier[attribute] operator[=] operator[SEP] identifier[Attribute] operator[SEP] identifier[field] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[Attribute] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[attributeMap] operator[SEP] identifier[put] operator[SEP] identifier[attribute] operator[SEP] identifier[name] operator[SEP] operator[SEP] , identifier[field] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[field] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[ElementValue] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[elementValue] operator[=] identifier[field] operator[SEP] Keyword[continue] operator[SEP] } } identifier[Object] identifier[targetObject] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[rootObject] operator[!=] Other[null] operator[SEP] { identifier[Constructor] identifier[constructor] operator[=] identifier[rootClass] operator[SEP] identifier[getConstructor] operator[SEP] Keyword[new] identifier[Class] operator[SEP] operator[SEP] { identifier[rootObject] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[targetObject] operator[=] identifier[constructor] operator[SEP] identifier[newInstance] operator[SEP] identifier[rootObject] operator[SEP] operator[SEP] } Keyword[else] { identifier[targetObject] operator[=] identifier[rootClass] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnmarshalException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[boolean] identifier[isNalaObject] operator[=] identifier[targetObject] Keyword[instanceof] identifier[XmlObject] operator[?] literal[boolean] operator[:] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[rootNode] operator[SEP] identifier[hasChildren] operator[SEP] operator[SEP] operator[SEP] { identifier[List] identifier[childrenNode] operator[=] identifier[rootNode] operator[SEP] identifier[getChildrenNodes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] identifier[iterNode] operator[=] identifier[childrenNode] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[iterNode] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[NodeConfig] identifier[nodeConfig] operator[=] operator[SEP] identifier[NodeConfig] operator[SEP] identifier[iterNode] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[Field] identifier[field] operator[=] identifier[elementMap] operator[SEP] identifier[get] operator[SEP] identifier[nodeConfig] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[field] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[fieldType] operator[=] identifier[field] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[fieldValue] operator[=] Other[null] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] identifier[listField] operator[=] Other[null] operator[SEP] identifier[field] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fieldType] operator[SEP] identifier[equals] operator[SEP] identifier[Constant] operator[SEP] identifier[LIST_CLASS] operator[SEP] operator[SEP] { identifier[String] identifier[listTypeName] operator[=] identifier[field] operator[SEP] identifier[getGenericType] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[fieldType] operator[=] identifier[listTypeName] operator[SEP] identifier[substring] operator[SEP] identifier[Constant] operator[SEP] identifier[LIST_CLASS] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] Other[1] , identifier[listTypeName] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[try] { identifier[listField] operator[=] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] operator[SEP] identifier[field] operator[SEP] identifier[get] operator[SEP] identifier[targetObject] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnmarshalException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnmarshalException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } identifier[ObjectValueCreator] identifier[objectValueCreator] operator[=] Keyword[new] identifier[ObjectValueCreator] operator[SEP] operator[SEP] operator[SEP] identifier[fieldValue] operator[=] identifier[objectValueCreator] operator[SEP] identifier[getValue] operator[SEP] identifier[fieldType] , identifier[nodeConfig] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fieldValue] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[fieldType] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[try] { identifier[fieldValue] operator[=] identifier[getObject] operator[SEP] identifier[nodeConfig] , identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[fieldType] operator[SEP] , identifier[targetObject] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnmarshalException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[try] { identifier[fieldValue] operator[=] identifier[getObject] operator[SEP] identifier[nodeConfig] , identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[fieldType] operator[SEP] , Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnmarshalException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[listField] operator[!=] Other[null] operator[SEP] { identifier[listField] operator[SEP] identifier[add] operator[SEP] identifier[fieldValue] operator[SEP] operator[SEP] identifier[fieldValue] operator[=] identifier[listField] operator[SEP] } identifier[setField] operator[SEP] identifier[field] , identifier[targetObject] , identifier[fieldValue] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[rootNode] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[elementValue] operator[!=] Other[null] operator[SEP] { identifier[setField] operator[SEP] identifier[elementValue] , identifier[targetObject] , identifier[rootNode] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[rootNode] operator[SEP] identifier[hasAttributes] operator[SEP] operator[SEP] operator[SEP] { identifier[List] identifier[attributes] operator[=] identifier[rootNode] operator[SEP] identifier[getAttribute] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attributes] operator[!=] Other[null] operator[&&] identifier[attributes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[for] operator[SEP] identifier[Iterator] identifier[iterAttribute] operator[=] identifier[attributes] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[iterAttribute] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[AttributeConfig] identifier[attributeConfig] operator[=] operator[SEP] identifier[AttributeConfig] operator[SEP] identifier[iterAttribute] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[Field] identifier[field] operator[=] identifier[attributeMap] operator[SEP] identifier[get] operator[SEP] identifier[attributeConfig] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[field] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[fieldType] operator[=] identifier[field] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[attributeValue] operator[=] identifier[TypeConver] operator[SEP] identifier[converValue] operator[SEP] identifier[fieldType] , identifier[attributeConfig] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setField] operator[SEP] identifier[field] , identifier[targetObject] , identifier[attributeValue] operator[SEP] operator[SEP] } } } } Keyword[if] operator[SEP] identifier[isNalaObject] operator[SEP] { identifier[setNameSpaces] operator[SEP] identifier[rootNode] , identifier[targetObject] operator[SEP] operator[SEP] } Keyword[return] identifier[targetObject] operator[SEP] }
public List<DetectedFace> detectWithUrl(String url, DetectWithUrlOptionalParameter detectWithUrlOptionalParameter) { return detectWithUrlWithServiceResponseAsync(url, detectWithUrlOptionalParameter).toBlocking().single().body(); }
class class_name[name] begin[{] method[detectWithUrl, return_type[type[List]], modifier[public], parameter[url, detectWithUrlOptionalParameter]] begin[{] return[call[.detectWithUrlWithServiceResponseAsync, parameter[member[.url], member[.detectWithUrlOptionalParameter]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[DetectedFace] operator[>] identifier[detectWithUrl] operator[SEP] identifier[String] identifier[url] , identifier[DetectWithUrlOptionalParameter] identifier[detectWithUrlOptionalParameter] operator[SEP] { Keyword[return] identifier[detectWithUrlWithServiceResponseAsync] operator[SEP] identifier[url] , identifier[detectWithUrlOptionalParameter] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public static Collection<Subquery> subqueries( Visitable visitable, final boolean includeNestedSubqueries ) { final Collection<Subquery> subqueries = new LinkedList<Subquery>(); Visitors.visitAll(visitable, new Visitors.AbstractVisitor() { @Override public void visit( Subquery subquery ) { subqueries.add(subquery); if (includeNestedSubqueries) { // Now look for any subqueries in the subquery ... subquery.getQuery().accept(this); } } }); return subqueries; }
class class_name[name] begin[{] method[subqueries, return_type[type[Collection]], modifier[public static], parameter[visitable, includeNestedSubqueries]] begin[{] local_variable[type[Collection], subqueries] call[Visitors.visitAll, parameter[member[.visitable], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=subquery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=subqueries, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=includeNestedSubqueries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getQuery, postfix_operators=[], prefix_operators=[], qualifier=subquery, selectors=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=accept, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=visit, parameters=[FormalParameter(annotations=[], modifiers=set(), name=subquery, type=ReferenceType(arguments=None, dimensions=[], name=Subquery, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Visitors, sub_type=ReferenceType(arguments=None, dimensions=None, name=AbstractVisitor, sub_type=None)))]] return[member[.subqueries]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Collection] operator[<] identifier[Subquery] operator[>] identifier[subqueries] operator[SEP] identifier[Visitable] identifier[visitable] , Keyword[final] Keyword[boolean] identifier[includeNestedSubqueries] operator[SEP] { Keyword[final] identifier[Collection] operator[<] identifier[Subquery] operator[>] identifier[subqueries] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[Subquery] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Visitors] operator[SEP] identifier[visitAll] operator[SEP] identifier[visitable] , Keyword[new] identifier[Visitors] operator[SEP] identifier[AbstractVisitor] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] identifier[Subquery] identifier[subquery] operator[SEP] { identifier[subqueries] operator[SEP] identifier[add] operator[SEP] identifier[subquery] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[includeNestedSubqueries] operator[SEP] { identifier[subquery] operator[SEP] identifier[getQuery] operator[SEP] operator[SEP] operator[SEP] identifier[accept] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] Keyword[return] identifier[subqueries] operator[SEP] }
public void performInsert() { if(insertMap == null) return; else { PersistenceBroker broker = tx.getBroker(); Iterator it = insertMap.values().iterator(); while(it.hasNext()) { NamedEntry namedEntry = (NamedEntry) it.next(); namedEntry.prepareForStore(broker); broker.store(namedEntry, ObjectModification.INSERT); } } }
class class_name[name] begin[{] method[performInsert, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.insertMap], ==, literal[null]]] begin[{] return[None] else begin[{] local_variable[type[PersistenceBroker], broker] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[NamedEntry], namedEntry] call[namedEntry.prepareForStore, parameter[member[.broker]]] call[broker.store, parameter[member[.namedEntry], member[ObjectModification.INSERT]]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[performInsert] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[insertMap] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] Keyword[else] { identifier[PersistenceBroker] identifier[broker] operator[=] identifier[tx] operator[SEP] identifier[getBroker] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] identifier[it] operator[=] identifier[insertMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[NamedEntry] identifier[namedEntry] operator[=] operator[SEP] identifier[NamedEntry] operator[SEP] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[namedEntry] operator[SEP] identifier[prepareForStore] operator[SEP] identifier[broker] operator[SEP] operator[SEP] identifier[broker] operator[SEP] identifier[store] operator[SEP] identifier[namedEntry] , identifier[ObjectModification] operator[SEP] identifier[INSERT] operator[SEP] operator[SEP] } } }
@Override public KamInfo getKamInfo(String kamName) { if (kamName == null) throw new InvalidArgument(DEFAULT_MSG); if (!exists(kamName)) return null; try { return kamCatalogDao().getKamInfoByName(kamName); } catch (SQLException e) { final String msg = "error getting KAM info by name"; throw new KAMStoreException(msg, e); } }
class class_name[name] begin[{] method[getKamInfo, return_type[type[KamInfo]], modifier[public], parameter[kamName]] begin[{] if[binary_operation[member[.kamName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=DEFAULT_MSG, 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=InvalidArgument, sub_type=None)), label=None) else begin[{] None end[}] if[call[.exists, parameter[member[.kamName]]]] begin[{] return[literal[null]] else begin[{] None end[}] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=kamCatalogDao, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=kamName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getKamInfoByName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="error getting KAM info by name"), name=msg)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=KAMStoreException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[KamInfo] identifier[getKamInfo] operator[SEP] identifier[String] identifier[kamName] operator[SEP] { Keyword[if] operator[SEP] identifier[kamName] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[InvalidArgument] operator[SEP] identifier[DEFAULT_MSG] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[exists] operator[SEP] identifier[kamName] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[try] { Keyword[return] identifier[kamCatalogDao] operator[SEP] operator[SEP] operator[SEP] identifier[getKamInfoByName] operator[SEP] identifier[kamName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { Keyword[final] identifier[String] identifier[msg] operator[=] literal[String] operator[SEP] Keyword[throw] Keyword[new] identifier[KAMStoreException] operator[SEP] identifier[msg] , identifier[e] operator[SEP] operator[SEP] } }
public static MappingColumn[] getMappingColumns(final Class<?> entityType, final SqlKind kind) { if (entityType == null) { return new MappingColumn[0]; } Map<SqlKind, MappingColumn[]> cols; synchronized (CACHE) { cols = CACHE.get(entityType); } if (cols != null) { return cols.computeIfAbsent(kind, k -> cols.get(SqlKind.NONE)); } Map<SqlKind, Map<String, MappingColumn>> fieldsMap = Stream.of(SqlKind.NONE, SqlKind.INSERT, SqlKind.UPDATE) .collect(Collectors.toMap(e -> e, e -> new LinkedHashMap<>())); JavaType.ImplementClass implementClass = new JavaType.ImplementClass(entityType); walkFields(entityType, implementClass, fieldsMap); final Map<SqlKind, MappingColumn[]> entityCols = fieldsMap.entrySet().stream() .collect(Collectors.toConcurrentMap(e -> e.getKey(), e -> e.getValue().values().toArray(new MappingColumn[e.getValue().size()]))); synchronized (CACHE) { CACHE.put(entityType, entityCols); } return entityCols.computeIfAbsent(kind, k -> entityCols.get(SqlKind.NONE)); }
class class_name[name] begin[{] method[getMappingColumns, return_type[type[MappingColumn]], modifier[public static], parameter[entityType, kind]] begin[{] if[binary_operation[member[.entityType], ==, literal[null]]] begin[{] return[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=MappingColumn, sub_type=None))] else begin[{] None end[}] local_variable[type[Map], cols] SYNCHRONIZED[member[.CACHE]] BEGIN[{] assign[member[.cols], call[CACHE.get, parameter[member[.entityType]]]] END[}] if[binary_operation[member[.cols], !=, literal[null]]] begin[{] return[call[cols.computeIfAbsent, parameter[member[.kind], LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=NONE, postfix_operators=[], prefix_operators=[], qualifier=SqlKind, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=cols, selectors=[], type_arguments=None), parameters=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] else begin[{] None end[}] local_variable[type[Map], fieldsMap] local_variable[type[JavaType], implementClass] call[.walkFields, parameter[member[.entityType], member[.implementClass], member[.fieldsMap]]] local_variable[type[Map], entityCols] SYNCHRONIZED[member[.CACHE]] BEGIN[{] call[CACHE.put, parameter[member[.entityType], member[.entityCols]]] END[}] return[call[entityCols.computeIfAbsent, parameter[member[.kind], LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=NONE, postfix_operators=[], prefix_operators=[], qualifier=SqlKind, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=entityCols, selectors=[], type_arguments=None), parameters=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MappingColumn] operator[SEP] operator[SEP] identifier[getMappingColumns] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[entityType] , Keyword[final] identifier[SqlKind] identifier[kind] operator[SEP] { Keyword[if] operator[SEP] identifier[entityType] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[MappingColumn] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[SqlKind] , identifier[MappingColumn] operator[SEP] operator[SEP] operator[>] identifier[cols] operator[SEP] Keyword[synchronized] operator[SEP] identifier[CACHE] operator[SEP] { identifier[cols] operator[=] identifier[CACHE] operator[SEP] identifier[get] operator[SEP] identifier[entityType] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[cols] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[cols] operator[SEP] identifier[computeIfAbsent] operator[SEP] identifier[kind] , identifier[k] operator[->] identifier[cols] operator[SEP] identifier[get] operator[SEP] identifier[SqlKind] operator[SEP] identifier[NONE] operator[SEP] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[SqlKind] , identifier[Map] operator[<] identifier[String] , identifier[MappingColumn] operator[>] operator[>] identifier[fieldsMap] operator[=] identifier[Stream] operator[SEP] identifier[of] operator[SEP] identifier[SqlKind] operator[SEP] identifier[NONE] , identifier[SqlKind] operator[SEP] identifier[INSERT] , identifier[SqlKind] operator[SEP] identifier[UPDATE] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toMap] operator[SEP] identifier[e] operator[->] identifier[e] , identifier[e] operator[->] Keyword[new] identifier[LinkedHashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[JavaType] operator[SEP] identifier[ImplementClass] identifier[implementClass] operator[=] Keyword[new] identifier[JavaType] operator[SEP] identifier[ImplementClass] operator[SEP] identifier[entityType] operator[SEP] operator[SEP] identifier[walkFields] operator[SEP] identifier[entityType] , identifier[implementClass] , identifier[fieldsMap] operator[SEP] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[SqlKind] , identifier[MappingColumn] operator[SEP] operator[SEP] operator[>] identifier[entityCols] operator[=] identifier[fieldsMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toConcurrentMap] operator[SEP] identifier[e] operator[->] identifier[e] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[e] operator[->] identifier[e] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[MappingColumn] operator[SEP] identifier[e] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[CACHE] operator[SEP] { identifier[CACHE] operator[SEP] identifier[put] operator[SEP] identifier[entityType] , identifier[entityCols] operator[SEP] operator[SEP] } Keyword[return] identifier[entityCols] operator[SEP] identifier[computeIfAbsent] operator[SEP] identifier[kind] , identifier[k] operator[->] identifier[entityCols] operator[SEP] identifier[get] operator[SEP] identifier[SqlKind] operator[SEP] identifier[NONE] operator[SEP] operator[SEP] operator[SEP] }
private RenditionMetadata getVirtualRendition(Set<RenditionMetadata> candidates, long destWidth, long destHeight, double destRatio) { // if ratio is defined get first rendition with matching ratio and same or bigger size if (destRatio > 0) { for (RenditionMetadata candidate : candidates) { if (candidate.matches(destWidth, destHeight, 0, 0, destRatio)) { return getVirtualRendition(candidate, destWidth, destHeight, destRatio); } } } // otherwise get first rendition which is same or bigger in width and height else { for (RenditionMetadata candidate : candidates) { if (candidate.matches(destWidth, destHeight, 0, 0, 0d)) { return getVirtualRendition(candidate, destWidth, destHeight, 0d); } } } // none found return null; }
class class_name[name] begin[{] method[getVirtualRendition, return_type[type[RenditionMetadata]], modifier[private], parameter[candidates, destWidth, destHeight, destRatio]] begin[{] if[binary_operation[member[.destRatio], >, literal[0]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=destWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=destRatio, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matches, postfix_operators=[], prefix_operators=[], qualifier=candidate, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=candidate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destRatio, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getVirtualRendition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=candidates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=candidate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RenditionMetadata, sub_type=None))), label=None) else begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=destWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0d)], member=matches, postfix_operators=[], prefix_operators=[], qualifier=candidate, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=candidate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0d)], member=getVirtualRendition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=candidates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=candidate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RenditionMetadata, sub_type=None))), label=None) end[}] return[literal[null]] end[}] END[}]
Keyword[private] identifier[RenditionMetadata] identifier[getVirtualRendition] operator[SEP] identifier[Set] operator[<] identifier[RenditionMetadata] operator[>] identifier[candidates] , Keyword[long] identifier[destWidth] , Keyword[long] identifier[destHeight] , Keyword[double] identifier[destRatio] operator[SEP] { Keyword[if] operator[SEP] identifier[destRatio] operator[>] Other[0] operator[SEP] { Keyword[for] operator[SEP] identifier[RenditionMetadata] identifier[candidate] operator[:] identifier[candidates] operator[SEP] { Keyword[if] operator[SEP] identifier[candidate] operator[SEP] identifier[matches] operator[SEP] identifier[destWidth] , identifier[destHeight] , Other[0] , Other[0] , identifier[destRatio] operator[SEP] operator[SEP] { Keyword[return] identifier[getVirtualRendition] operator[SEP] identifier[candidate] , identifier[destWidth] , identifier[destHeight] , identifier[destRatio] operator[SEP] operator[SEP] } } } Keyword[else] { Keyword[for] operator[SEP] identifier[RenditionMetadata] identifier[candidate] operator[:] identifier[candidates] operator[SEP] { Keyword[if] operator[SEP] identifier[candidate] operator[SEP] identifier[matches] operator[SEP] identifier[destWidth] , identifier[destHeight] , Other[0] , Other[0] , literal[Float] operator[SEP] operator[SEP] { Keyword[return] identifier[getVirtualRendition] operator[SEP] identifier[candidate] , identifier[destWidth] , identifier[destHeight] , literal[Float] operator[SEP] operator[SEP] } } } Keyword[return] Other[null] operator[SEP] }
@Override public TemporaryQueue createTemporaryQueue() throws JMSException { externalAccessLock.readLock().lock(); try { checkNotClosed(); String queueName = "TEMP-QUEUE-"+UUIDProvider.getInstance().getShortUUID(); engine.createTemporaryQueue(queueName); connection.registerTemporaryQueue(queueName); return new TemporaryQueueRef(connection,queueName); } finally { externalAccessLock.readLock().unlock(); } }
class class_name[name] begin[{] method[createTemporaryQueue, return_type[type[TemporaryQueue]], modifier[public], parameter[]] begin[{] call[externalAccessLock.readLock, parameter[]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=checkNotClosed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TEMP-QUEUE-"), operandr=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=UUIDProvider, selectors=[MethodInvocation(arguments=[], member=getShortUUID, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), name=queueName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=queueName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createTemporaryQueue, postfix_operators=[], prefix_operators=[], qualifier=engine, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=queueName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=registerTemporaryQueue, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=queueName, 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=TemporaryQueueRef, sub_type=None)), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=readLock, postfix_operators=[], prefix_operators=[], qualifier=externalAccessLock, selectors=[MethodInvocation(arguments=[], member=unlock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[TemporaryQueue] identifier[createTemporaryQueue] operator[SEP] operator[SEP] Keyword[throws] identifier[JMSException] { identifier[externalAccessLock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[checkNotClosed] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[queueName] operator[=] literal[String] operator[+] identifier[UUIDProvider] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getShortUUID] operator[SEP] operator[SEP] operator[SEP] identifier[engine] operator[SEP] identifier[createTemporaryQueue] operator[SEP] identifier[queueName] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[registerTemporaryQueue] operator[SEP] identifier[queueName] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[TemporaryQueueRef] operator[SEP] identifier[connection] , identifier[queueName] operator[SEP] operator[SEP] } Keyword[finally] { identifier[externalAccessLock] operator[SEP] identifier[readLock] operator[SEP] operator[SEP] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
public Account withSupportedLicenses(License... supportedLicenses) { java.util.ArrayList<String> supportedLicensesCopy = new java.util.ArrayList<String>(supportedLicenses.length); for (License value : supportedLicenses) { supportedLicensesCopy.add(value.toString()); } if (getSupportedLicenses() == null) { setSupportedLicenses(supportedLicensesCopy); } else { getSupportedLicenses().addAll(supportedLicensesCopy); } return this; }
class class_name[name] begin[{] method[withSupportedLicenses, return_type[type[Account]], modifier[public], parameter[supportedLicenses]] begin[{] local_variable[type[java], supportedLicensesCopy] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=supportedLicensesCopy, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=supportedLicenses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=License, sub_type=None))), label=None) if[binary_operation[call[.getSupportedLicenses, parameter[]], ==, literal[null]]] begin[{] call[.setSupportedLicenses, parameter[member[.supportedLicensesCopy]]] else begin[{] call[.getSupportedLicenses, parameter[]] end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Account] identifier[withSupportedLicenses] operator[SEP] identifier[License] operator[...] identifier[supportedLicenses] operator[SEP] { identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[supportedLicensesCopy] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[supportedLicenses] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[License] identifier[value] operator[:] identifier[supportedLicenses] operator[SEP] { identifier[supportedLicensesCopy] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getSupportedLicenses] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[setSupportedLicenses] operator[SEP] identifier[supportedLicensesCopy] operator[SEP] operator[SEP] } Keyword[else] { identifier[getSupportedLicenses] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[supportedLicensesCopy] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public final void setGuaranteedCrossBusLinkName(String value) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setGuaranteedCrossBusLinkName", value); getHdr2().setField(JsHdr2Access.GUARANTEEDXBUS_SET_LINKNAME, value); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setGuaranteedCrossBusLinkName"); }
class class_name[name] begin[{] method[setGuaranteedCrossBusLinkName, return_type[void], modifier[final public], parameter[value]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["setGuaranteedCrossBusLinkName"], member[.value]]] else begin[{] None end[}] call[.getHdr2, parameter[]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["setGuaranteedCrossBusLinkName"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[setGuaranteedCrossBusLinkName] operator[SEP] identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[value] operator[SEP] operator[SEP] identifier[getHdr2] operator[SEP] operator[SEP] operator[SEP] identifier[setField] operator[SEP] identifier[JsHdr2Access] operator[SEP] identifier[GUARANTEEDXBUS_SET_LINKNAME] , identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public GetUsersResponse getUsers(String nextOpenid) { GetUsersResponse response; LOG.debug("获取关注者列表....."); String url = BASE_API_URL + "cgi-bin/user/get?access_token=#"; if (StrUtil.isNotBlank(nextOpenid)) { url += "&next_openid=" + nextOpenid; } BaseResponse r = executeGet(url); String resultJson = isSuccess(r.getErrcode()) ? r.getErrmsg() : r.toJsonString(); response = JSONUtil.toBean(resultJson, GetUsersResponse.class); return response; }
class class_name[name] begin[{] method[getUsers, return_type[type[GetUsersResponse]], modifier[public], parameter[nextOpenid]] begin[{] local_variable[type[GetUsersResponse], response] call[LOG.debug, parameter[literal["获取关注者列表....."]]] local_variable[type[String], url] if[call[StrUtil.isNotBlank, parameter[member[.nextOpenid]]]] begin[{] assign[member[.url], binary_operation[literal["&next_openid="], +, member[.nextOpenid]]] else begin[{] None end[}] local_variable[type[BaseResponse], r] local_variable[type[String], resultJson] assign[member[.response], call[JSONUtil.toBean, parameter[member[.resultJson], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GetUsersResponse, sub_type=None))]]] return[member[.response]] end[}] END[}]
Keyword[public] identifier[GetUsersResponse] identifier[getUsers] operator[SEP] identifier[String] identifier[nextOpenid] operator[SEP] { identifier[GetUsersResponse] identifier[response] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[url] operator[=] identifier[BASE_API_URL] operator[+] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[StrUtil] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[nextOpenid] operator[SEP] operator[SEP] { identifier[url] operator[+=] literal[String] operator[+] identifier[nextOpenid] operator[SEP] } identifier[BaseResponse] identifier[r] operator[=] identifier[executeGet] operator[SEP] identifier[url] operator[SEP] operator[SEP] identifier[String] identifier[resultJson] operator[=] identifier[isSuccess] operator[SEP] identifier[r] operator[SEP] identifier[getErrcode] operator[SEP] operator[SEP] operator[SEP] operator[?] identifier[r] operator[SEP] identifier[getErrmsg] operator[SEP] operator[SEP] operator[:] identifier[r] operator[SEP] identifier[toJsonString] operator[SEP] operator[SEP] operator[SEP] identifier[response] operator[=] identifier[JSONUtil] operator[SEP] identifier[toBean] operator[SEP] identifier[resultJson] , identifier[GetUsersResponse] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public double fmeasure(int numleft, int numright) { int tp = 0, fp = 0, fn = 0; tp = numpositive[numright]; fp = numright - tp; fn = numleft - numnegative[numleft]; return f1(tp, fp, fn); }
class class_name[name] begin[{] method[fmeasure, return_type[type[double]], modifier[public], parameter[numleft, numright]] begin[{] local_variable[type[int], tp] assign[member[.tp], member[.numpositive]] assign[member[.fp], binary_operation[member[.numright], -, member[.tp]]] assign[member[.fn], binary_operation[member[.numleft], -, member[.numnegative]]] return[call[.f1, parameter[member[.tp], member[.fp], member[.fn]]]] end[}] END[}]
Keyword[public] Keyword[double] identifier[fmeasure] operator[SEP] Keyword[int] identifier[numleft] , Keyword[int] identifier[numright] operator[SEP] { Keyword[int] identifier[tp] operator[=] Other[0] , identifier[fp] operator[=] Other[0] , identifier[fn] operator[=] Other[0] operator[SEP] identifier[tp] operator[=] identifier[numpositive] operator[SEP] identifier[numright] operator[SEP] operator[SEP] identifier[fp] operator[=] identifier[numright] operator[-] identifier[tp] operator[SEP] identifier[fn] operator[=] identifier[numleft] operator[-] identifier[numnegative] operator[SEP] identifier[numleft] operator[SEP] operator[SEP] Keyword[return] identifier[f1] operator[SEP] identifier[tp] , identifier[fp] , identifier[fn] operator[SEP] operator[SEP] }
void clearStructures() { if (schemaManager != null) { schemaManager.clearStructures(); } granteeManager = null; userManager = null; nameManager = null; schemaManager = null; sessionManager = null; dbInfo = null; }
class class_name[name] begin[{] method[clearStructures, return_type[void], modifier[default], parameter[]] begin[{] if[binary_operation[member[.schemaManager], !=, literal[null]]] begin[{] call[schemaManager.clearStructures, parameter[]] else begin[{] None end[}] assign[member[.granteeManager], literal[null]] assign[member[.userManager], literal[null]] assign[member[.nameManager], literal[null]] assign[member[.schemaManager], literal[null]] assign[member[.sessionManager], literal[null]] assign[member[.dbInfo], literal[null]] end[}] END[}]
Keyword[void] identifier[clearStructures] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[schemaManager] operator[!=] Other[null] operator[SEP] { identifier[schemaManager] operator[SEP] identifier[clearStructures] operator[SEP] operator[SEP] operator[SEP] } identifier[granteeManager] operator[=] Other[null] operator[SEP] identifier[userManager] operator[=] Other[null] operator[SEP] identifier[nameManager] operator[=] Other[null] operator[SEP] identifier[schemaManager] operator[=] Other[null] operator[SEP] identifier[sessionManager] operator[=] Other[null] operator[SEP] identifier[dbInfo] operator[=] Other[null] operator[SEP] }
public List<Message> removeAwaitingMessages( Instance instance ) { Instance scopedInstance = InstanceHelpers.findScopedInstance( instance ); List<Message> result = null; // We reduce the spent time in the synchronized section. synchronized( this.scopedInstanceToAwaitingMessages ) { result = this.scopedInstanceToAwaitingMessages.remove( scopedInstance ); } return result != null ? result : new ArrayList<Message>( 0 ); }
class class_name[name] begin[{] method[removeAwaitingMessages, return_type[type[List]], modifier[public], parameter[instance]] begin[{] local_variable[type[Instance], scopedInstance] local_variable[type[List], result] SYNCHRONIZED[THIS[member[None.scopedInstanceToAwaitingMessages]]] BEGIN[{] assign[member[.result], THIS[member[None.scopedInstanceToAwaitingMessages]call[None.remove, parameter[member[.scopedInstance]]]]] END[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Message, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), if_true=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Message] operator[>] identifier[removeAwaitingMessages] operator[SEP] identifier[Instance] identifier[instance] operator[SEP] { identifier[Instance] identifier[scopedInstance] operator[=] identifier[InstanceHelpers] operator[SEP] identifier[findScopedInstance] operator[SEP] identifier[instance] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Message] operator[>] identifier[result] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] identifier[scopedInstanceToAwaitingMessages] operator[SEP] { identifier[result] operator[=] Keyword[this] operator[SEP] identifier[scopedInstanceToAwaitingMessages] operator[SEP] identifier[remove] operator[SEP] identifier[scopedInstance] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[!=] Other[null] operator[?] identifier[result] operator[:] Keyword[new] identifier[ArrayList] operator[<] identifier[Message] operator[>] operator[SEP] Other[0] operator[SEP] operator[SEP] }
public BackupPlan withRules(BackupRule... rules) { if (this.rules == null) { setRules(new java.util.ArrayList<BackupRule>(rules.length)); } for (BackupRule ele : rules) { this.rules.add(ele); } return this; }
class class_name[name] begin[{] method[withRules, return_type[type[BackupPlan]], modifier[public], parameter[rules]] begin[{] if[binary_operation[THIS[member[None.rules]], ==, literal[null]]] begin[{] call[.setRules, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=rules, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=BackupRule, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rules, 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=rules, 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=BackupRule, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[BackupPlan] identifier[withRules] operator[SEP] identifier[BackupRule] operator[...] identifier[rules] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[rules] operator[==] Other[null] operator[SEP] { identifier[setRules] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[BackupRule] operator[>] operator[SEP] identifier[rules] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[BackupRule] identifier[ele] operator[:] identifier[rules] operator[SEP] { Keyword[this] operator[SEP] identifier[rules] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public void setConnectionStatuses(java.util.Collection<TerminateConnectionStatus> connectionStatuses) { if (connectionStatuses == null) { this.connectionStatuses = null; return; } this.connectionStatuses = new com.amazonaws.internal.SdkInternalList<TerminateConnectionStatus>(connectionStatuses); }
class class_name[name] begin[{] method[setConnectionStatuses, return_type[void], modifier[public], parameter[connectionStatuses]] begin[{] if[binary_operation[member[.connectionStatuses], ==, literal[null]]] begin[{] assign[THIS[member[None.connectionStatuses]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.connectionStatuses]], ClassCreator(arguments=[MemberReference(member=connectionStatuses, 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=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=TerminateConnectionStatus, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setConnectionStatuses] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[TerminateConnectionStatus] operator[>] identifier[connectionStatuses] operator[SEP] { Keyword[if] operator[SEP] identifier[connectionStatuses] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[connectionStatuses] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[connectionStatuses] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[TerminateConnectionStatus] operator[>] operator[SEP] identifier[connectionStatuses] operator[SEP] operator[SEP] }
public static void ensureNotEmptyContent( String name, boolean trim, String[] value ) { ensureNotEmpty( name, value ); for ( int i = 0; i < value.length; i++ ) { ensureNotEmpty( value[i] + "[" + i + "]", value[i] ); if ( trim ) { ensureNotEmpty( value[i] + "[" + i + "]", value[i].trim() ); } } }
class class_name[name] begin[{] method[ensureNotEmptyContent, return_type[void], modifier[public static], parameter[name, trim, value]] begin[{] call[.ensureNotEmpty, parameter[member[.name], member[.value]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="["), operator=+), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=ensureNotEmpty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=trim, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="["), operator=+), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=ensureNotEmpty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[ensureNotEmptyContent] operator[SEP] identifier[String] identifier[name] , Keyword[boolean] identifier[trim] , identifier[String] operator[SEP] operator[SEP] identifier[value] operator[SEP] { identifier[ensureNotEmpty] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[value] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[ensureNotEmpty] operator[SEP] identifier[value] operator[SEP] identifier[i] operator[SEP] operator[+] literal[String] operator[+] identifier[i] operator[+] literal[String] , identifier[value] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[trim] operator[SEP] { identifier[ensureNotEmpty] operator[SEP] identifier[value] operator[SEP] identifier[i] operator[SEP] operator[+] literal[String] operator[+] identifier[i] operator[+] literal[String] , identifier[value] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
private void addPartNumberIfNotNull(Request<?> request, Integer partNumber) { if (partNumber != null) { request.addParameter("partNumber", partNumber.toString()); } }
class class_name[name] begin[{] method[addPartNumberIfNotNull, return_type[void], modifier[private], parameter[request, partNumber]] begin[{] if[binary_operation[member[.partNumber], !=, literal[null]]] begin[{] call[request.addParameter, parameter[literal["partNumber"], call[partNumber.toString, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addPartNumberIfNotNull] operator[SEP] identifier[Request] operator[<] operator[?] operator[>] identifier[request] , identifier[Integer] identifier[partNumber] operator[SEP] { Keyword[if] operator[SEP] identifier[partNumber] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[addParameter] operator[SEP] literal[String] , identifier[partNumber] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public java.util.List<String> getClientVpnEndpointIds() { if (clientVpnEndpointIds == null) { clientVpnEndpointIds = new com.amazonaws.internal.SdkInternalList<String>(); } return clientVpnEndpointIds; }
class class_name[name] begin[{] method[getClientVpnEndpointIds, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.clientVpnEndpointIds], ==, literal[null]]] begin[{] assign[member[.clientVpnEndpointIds], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.clientVpnEndpointIds]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getClientVpnEndpointIds] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[clientVpnEndpointIds] operator[==] Other[null] operator[SEP] { identifier[clientVpnEndpointIds] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[clientVpnEndpointIds] operator[SEP] }
@Override public boolean onEvent(EventMessage<?> event) { AuthorizationResultEvent resultEvent; if (!(event.getPayload() instanceof AuthorizationResultEvent)) { // not the right type of event... not 'handled' return false; } resultEvent = (AuthorizationResultEvent) event.getPayload(); Transaction transaction = domainService.createTransaction(startTransaction.getEvseId()); NumberedTransactionId transactionId = new NumberedTransactionId(chargingStationId, protocolIdentifier, transaction.getId().intValue()); IdentifyingToken identifyingToken = resultEvent.getIdentifyingToken(); StartTransactionInfo extendedStartTransactionInfo = new StartTransactionInfo(startTransaction.getEvseId(), startTransaction.getMeterStart(), startTransaction.getTimestamp(), identifyingToken, startTransaction.getAttributes()); domainService.startTransactionNoAuthorize(chargingStationId, transactionId, extendedStartTransactionInfo, addOnIdentity); StartTransactionFutureResult futureResult = new StartTransactionFutureResult(); futureResult.setAuthorizationResultStatus(resultEvent.getAuthenticationStatus()); futureResult.setTransactionId(transactionId.getNumber()); this.setResult(futureResult); this.countDownLatch(); if (continuation != null) { // no need to wait for the continuation timeout, resume it now continuation.resume(); } return true; }
class class_name[name] begin[{] method[onEvent, return_type[type[boolean]], modifier[public], parameter[event]] begin[{] local_variable[type[AuthorizationResultEvent], resultEvent] if[binary_operation[call[event.getPayload, parameter[]], instanceof, type[AuthorizationResultEvent]]] begin[{] return[literal[false]] else begin[{] None end[}] assign[member[.resultEvent], Cast(expression=MethodInvocation(arguments=[], member=getPayload, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AuthorizationResultEvent, sub_type=None))] local_variable[type[Transaction], transaction] local_variable[type[NumberedTransactionId], transactionId] local_variable[type[IdentifyingToken], identifyingToken] local_variable[type[StartTransactionInfo], extendedStartTransactionInfo] call[domainService.startTransactionNoAuthorize, parameter[member[.chargingStationId], member[.transactionId], member[.extendedStartTransactionInfo], member[.addOnIdentity]]] local_variable[type[StartTransactionFutureResult], futureResult] call[futureResult.setAuthorizationResultStatus, parameter[call[resultEvent.getAuthenticationStatus, parameter[]]]] call[futureResult.setTransactionId, parameter[call[transactionId.getNumber, parameter[]]]] THIS[call[None.setResult, parameter[member[.futureResult]]]] THIS[call[None.countDownLatch, parameter[]]] if[binary_operation[member[.continuation], !=, literal[null]]] begin[{] call[continuation.resume, parameter[]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[onEvent] operator[SEP] identifier[EventMessage] operator[<] operator[?] operator[>] identifier[event] operator[SEP] { identifier[AuthorizationResultEvent] identifier[resultEvent] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[event] operator[SEP] identifier[getPayload] operator[SEP] operator[SEP] Keyword[instanceof] identifier[AuthorizationResultEvent] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[resultEvent] operator[=] operator[SEP] identifier[AuthorizationResultEvent] operator[SEP] identifier[event] operator[SEP] identifier[getPayload] operator[SEP] operator[SEP] operator[SEP] identifier[Transaction] identifier[transaction] operator[=] identifier[domainService] operator[SEP] identifier[createTransaction] operator[SEP] identifier[startTransaction] operator[SEP] identifier[getEvseId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[NumberedTransactionId] identifier[transactionId] operator[=] Keyword[new] identifier[NumberedTransactionId] operator[SEP] identifier[chargingStationId] , identifier[protocolIdentifier] , identifier[transaction] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[IdentifyingToken] identifier[identifyingToken] operator[=] identifier[resultEvent] operator[SEP] identifier[getIdentifyingToken] operator[SEP] operator[SEP] operator[SEP] identifier[StartTransactionInfo] identifier[extendedStartTransactionInfo] operator[=] Keyword[new] identifier[StartTransactionInfo] operator[SEP] identifier[startTransaction] operator[SEP] identifier[getEvseId] operator[SEP] operator[SEP] , identifier[startTransaction] operator[SEP] identifier[getMeterStart] operator[SEP] operator[SEP] , identifier[startTransaction] operator[SEP] identifier[getTimestamp] operator[SEP] operator[SEP] , identifier[identifyingToken] , identifier[startTransaction] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[domainService] operator[SEP] identifier[startTransactionNoAuthorize] operator[SEP] identifier[chargingStationId] , identifier[transactionId] , identifier[extendedStartTransactionInfo] , identifier[addOnIdentity] operator[SEP] operator[SEP] identifier[StartTransactionFutureResult] identifier[futureResult] operator[=] Keyword[new] identifier[StartTransactionFutureResult] operator[SEP] operator[SEP] operator[SEP] identifier[futureResult] operator[SEP] identifier[setAuthorizationResultStatus] operator[SEP] identifier[resultEvent] operator[SEP] identifier[getAuthenticationStatus] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[futureResult] operator[SEP] identifier[setTransactionId] operator[SEP] identifier[transactionId] operator[SEP] identifier[getNumber] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setResult] operator[SEP] identifier[futureResult] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[countDownLatch] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[continuation] operator[!=] Other[null] operator[SEP] { identifier[continuation] operator[SEP] identifier[resume] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public void addEnvelope(Envelope envSrc, boolean bReverse) { if (envSrc.isEmpty()) return; boolean bWasEmpty = m_pointCount == 0; Point pt = new Point(m_description);// getDescription()); for (int i = 0, n = 4; i < n; i++) { int j = bReverse ? n - i - 1 : i; envSrc.queryCornerByVal(j, pt); if (i == 0) startPath(pt); else lineTo(pt); } closePathWithLine(); m_bPathStarted = false; if (bWasEmpty && !bReverse) _setDirtyFlag(DirtyFlags.DirtyIsEnvelope, false);// now we know the // polypath is // envelope }
class class_name[name] begin[{] method[addEnvelope, return_type[void], modifier[public], parameter[envSrc, bReverse]] begin[{] if[call[envSrc.isEmpty, parameter[]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[boolean], bWasEmpty] local_variable[type[Point], pt] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MemberReference(member=bReverse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=queryCornerByVal, postfix_operators=[], prefix_operators=[], qualifier=envSrc, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=lineTo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i), VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[.closePathWithLine, parameter[]] assign[member[.m_bPathStarted], literal[false]] if[binary_operation[member[.bWasEmpty], &&, member[.bReverse]]] begin[{] call[._setDirtyFlag, parameter[member[DirtyFlags.DirtyIsEnvelope], literal[false]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addEnvelope] operator[SEP] identifier[Envelope] identifier[envSrc] , Keyword[boolean] identifier[bReverse] operator[SEP] { Keyword[if] operator[SEP] identifier[envSrc] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[boolean] identifier[bWasEmpty] operator[=] identifier[m_pointCount] operator[==] Other[0] operator[SEP] identifier[Point] identifier[pt] operator[=] Keyword[new] identifier[Point] operator[SEP] identifier[m_description] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] , identifier[n] operator[=] Other[4] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[j] operator[=] identifier[bReverse] operator[?] identifier[n] operator[-] identifier[i] operator[-] Other[1] operator[:] identifier[i] operator[SEP] identifier[envSrc] operator[SEP] identifier[queryCornerByVal] operator[SEP] identifier[j] , identifier[pt] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[==] Other[0] operator[SEP] identifier[startPath] operator[SEP] identifier[pt] operator[SEP] operator[SEP] Keyword[else] identifier[lineTo] operator[SEP] identifier[pt] operator[SEP] operator[SEP] } identifier[closePathWithLine] operator[SEP] operator[SEP] operator[SEP] identifier[m_bPathStarted] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[bWasEmpty] operator[&&] operator[!] identifier[bReverse] operator[SEP] identifier[_setDirtyFlag] operator[SEP] identifier[DirtyFlags] operator[SEP] identifier[DirtyIsEnvelope] , literal[boolean] operator[SEP] operator[SEP] }
public <V> ResultTransformer<Map<K, V>> as(FactoryExpression<V> expression) { final FactoryExpression<?> transformation = FactoryExpressionUtils.wrap(expression); List<Expression<?>> args = transformation.getArgs(); return new GroupByMap<K, V>(key, args.toArray(new Expression<?>[args.size()])) { @Override protected Map<K, V> transform(Map<K, Group> groups) { Map<K, V> results = new LinkedHashMap<K, V>((int) Math.ceil(groups.size() / 0.75), 0.75f); for (Map.Entry<K, Group> entry : groups.entrySet()) { results.put(entry.getKey(), transform(entry.getValue())); } return results; } @SuppressWarnings("unchecked") protected V transform(Group group) { // XXX Isn't group.toArray() suitable here? List<Object> args = new ArrayList<Object>(groupExpressions.size() - 1); for (int i = 1; i < groupExpressions.size(); i++) { args.add(group.getGroup(groupExpressions.get(i))); } return (V) transformation.newInstance(args.toArray()); } }; }
class class_name[name] begin[{] method[as, return_type[type[ResultTransformer]], modifier[public], parameter[expression]] begin[{] local_variable[type[FactoryExpression], transformation] local_variable[type[List], args] return[ClassCreator(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=None, name=Expression, sub_type=None))], member=toArray, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[], type_arguments=None)], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=groups, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.75), operator=/)], member=ceil, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.75f)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=LinkedHashMap, sub_type=None)), name=results)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=[], name=Map, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=transform, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=groups, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Group, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None), ReturnStatement(expression=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'protected'}, name=transform, parameters=[FormalParameter(annotations=[], modifiers=set(), name=groups, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Group, sub_type=None))], dimensions=[], name=Map, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=[], name=Map, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unchecked"), name=SuppressWarnings)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=groupExpressions, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=args)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=groupExpressions, selectors=[], type_arguments=None)], member=getGroup, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=groupExpressions, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toArray, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[], type_arguments=None)], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=transformation, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None)), label=None)], documentation=None, modifiers={'protected'}, name=transform, parameters=[FormalParameter(annotations=[], modifiers=set(), name=group, type=ReferenceType(arguments=None, dimensions=[], name=Group, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=GroupByMap, sub_type=None))] end[}] END[}]
Keyword[public] operator[<] identifier[V] operator[>] identifier[ResultTransformer] operator[<] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[as] operator[SEP] identifier[FactoryExpression] operator[<] identifier[V] operator[>] identifier[expression] operator[SEP] { Keyword[final] identifier[FactoryExpression] operator[<] operator[?] operator[>] identifier[transformation] operator[=] identifier[FactoryExpressionUtils] operator[SEP] identifier[wrap] operator[SEP] identifier[expression] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Expression] operator[<] operator[?] operator[>] operator[>] identifier[args] operator[=] identifier[transformation] operator[SEP] identifier[getArgs] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[GroupByMap] operator[<] identifier[K] , identifier[V] operator[>] operator[SEP] identifier[key] , identifier[args] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[Expression] operator[<] operator[?] operator[>] operator[SEP] identifier[args] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[protected] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[transform] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[Group] operator[>] identifier[groups] operator[SEP] { identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[results] operator[=] Keyword[new] identifier[LinkedHashMap] operator[<] identifier[K] , identifier[V] operator[>] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[ceil] operator[SEP] identifier[groups] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[/] literal[Float] operator[SEP] , literal[Float] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[K] , identifier[Group] operator[>] identifier[entry] operator[:] identifier[groups] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[results] operator[SEP] identifier[put] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[transform] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[results] operator[SEP] } annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] identifier[V] identifier[transform] operator[SEP] identifier[Group] identifier[group] operator[SEP] { identifier[List] operator[<] identifier[Object] operator[>] identifier[args] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Object] operator[>] operator[SEP] identifier[groupExpressions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[groupExpressions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[args] operator[SEP] identifier[add] operator[SEP] identifier[group] operator[SEP] identifier[getGroup] operator[SEP] identifier[groupExpressions] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[V] operator[SEP] identifier[transformation] operator[SEP] identifier[newInstance] operator[SEP] identifier[args] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] }
@FFDCIgnore(IllegalArgumentException.class) private String evaluateGroupMemberOfAttribute(boolean immediateOnly) { try { return elHelper.processString("groupMemberOfAttribute", this.idStoreDefinition.groupMemberOfAttribute(), immediateOnly); } catch (IllegalArgumentException e) { if (TraceComponent.isAnyTracingEnabled() && tc.isWarningEnabled()) { Tr.warning(tc, "JAVAEESEC_WARNING_IDSTORE_CONFIG", new Object[] { "groupMemberOfAttribute", "memberOf" }); } return "memberOf"; /* Default value from spec. */ } }
class class_name[name] begin[{] method[evaluateGroupMemberOfAttribute, return_type[type[String]], modifier[private], parameter[immediateOnly]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="groupMemberOfAttribute"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=idStoreDefinition, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=groupMemberOfAttribute, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), MemberReference(member=immediateOnly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processString, postfix_operators=[], prefix_operators=[], qualifier=elHelper, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isWarningEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JAVAEESEC_WARNING_IDSTORE_CONFIG"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="groupMemberOfAttribute"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="memberOf")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=warning, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="memberOf"), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[FFDCIgnore] operator[SEP] identifier[IllegalArgumentException] operator[SEP] Keyword[class] operator[SEP] Keyword[private] identifier[String] identifier[evaluateGroupMemberOfAttribute] operator[SEP] Keyword[boolean] identifier[immediateOnly] operator[SEP] { Keyword[try] { Keyword[return] identifier[elHelper] operator[SEP] identifier[processString] operator[SEP] literal[String] , Keyword[this] operator[SEP] identifier[idStoreDefinition] operator[SEP] identifier[groupMemberOfAttribute] operator[SEP] operator[SEP] , identifier[immediateOnly] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isWarningEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[warning] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , literal[String] } operator[SEP] operator[SEP] } Keyword[return] literal[String] operator[SEP] } }
public void denyPermissions(int pid, int uid, String... permissions) { getShadowInstrumentation().denyPermissions(pid, uid, permissions); }
class class_name[name] begin[{] method[denyPermissions, return_type[void], modifier[public], parameter[pid, uid, permissions]] begin[{] call[.getShadowInstrumentation, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[denyPermissions] operator[SEP] Keyword[int] identifier[pid] , Keyword[int] identifier[uid] , identifier[String] operator[...] identifier[permissions] operator[SEP] { identifier[getShadowInstrumentation] operator[SEP] operator[SEP] operator[SEP] identifier[denyPermissions] operator[SEP] identifier[pid] , identifier[uid] , identifier[permissions] operator[SEP] operator[SEP] }
@Override public void configureComponent(final Object component, final PlexusConfiguration configuration, final ExpressionEvaluator expressionEvaluator, final ClassRealm containerRealm, final ConfigurationListener listener) throws ComponentConfigurationException { final String serverType = getServerType(configuration); if (!serverType.startsWith("dependency-")) { addServerDependenciesToClassRealm(serverType, expressionEvaluator, containerRealm); } converterLookup.registerConverter(new ClassRealmConverter(containerRealm)); final ObjectWithFieldsConverter converter = new ObjectWithFieldsConverter(); converter.processConfiguration(converterLookup, component, containerRealm, configuration, expressionEvaluator, listener); }
class class_name[name] begin[{] method[configureComponent, return_type[void], modifier[public], parameter[component, configuration, expressionEvaluator, containerRealm, listener]] begin[{] local_variable[type[String], serverType] if[call[serverType.startsWith, parameter[literal["dependency-"]]]] begin[{] call[.addServerDependenciesToClassRealm, parameter[member[.serverType], member[.expressionEvaluator], member[.containerRealm]]] else begin[{] None end[}] call[converterLookup.registerConverter, parameter[ClassCreator(arguments=[MemberReference(member=containerRealm, 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=ClassRealmConverter, sub_type=None))]] local_variable[type[ObjectWithFieldsConverter], converter] call[converter.processConfiguration, parameter[member[.converterLookup], member[.component], member[.containerRealm], member[.configuration], member[.expressionEvaluator], member[.listener]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[configureComponent] operator[SEP] Keyword[final] identifier[Object] identifier[component] , Keyword[final] identifier[PlexusConfiguration] identifier[configuration] , Keyword[final] identifier[ExpressionEvaluator] identifier[expressionEvaluator] , Keyword[final] identifier[ClassRealm] identifier[containerRealm] , Keyword[final] identifier[ConfigurationListener] identifier[listener] operator[SEP] Keyword[throws] identifier[ComponentConfigurationException] { Keyword[final] identifier[String] identifier[serverType] operator[=] identifier[getServerType] operator[SEP] identifier[configuration] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[serverType] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[addServerDependenciesToClassRealm] operator[SEP] identifier[serverType] , identifier[expressionEvaluator] , identifier[containerRealm] operator[SEP] operator[SEP] } identifier[converterLookup] operator[SEP] identifier[registerConverter] operator[SEP] Keyword[new] identifier[ClassRealmConverter] operator[SEP] identifier[containerRealm] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ObjectWithFieldsConverter] identifier[converter] operator[=] Keyword[new] identifier[ObjectWithFieldsConverter] operator[SEP] operator[SEP] operator[SEP] identifier[converter] operator[SEP] identifier[processConfiguration] operator[SEP] identifier[converterLookup] , identifier[component] , identifier[containerRealm] , identifier[configuration] , identifier[expressionEvaluator] , identifier[listener] operator[SEP] operator[SEP] }
@Override public void setTraversableResolver(Configuration<?> apiConfig) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "setTraversableResolver", apiConfig); } Class<? extends TraversableResolver> clazz = null; TraversableResolver tr = null; if (traversableResolver != null) { try { clazz = loadClass(traversableResolver).asSubclass(TraversableResolver.class); tr = instantiateClass(clazz); } catch (Throwable t) { FFDCFilter.processException(t, CLASS_NAME + ".setTraversableResolver", "280"); // message and exception printed out in previous method called. // however since we can not create a validation factory throw validationException ValidationException e = new ValidationException(t); throw e; } } if (tr != null) { apiConfig.traversableResolver(tr); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.exit(tc, "setTraversableResolver", tr); } }
class class_name[name] begin[{] method[setTraversableResolver, return_type[void], modifier[public], parameter[apiConfig]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["setTraversableResolver"], member[.apiConfig]]] else begin[{] None end[}] local_variable[type[Class], clazz] local_variable[type[TraversableResolver], tr] if[binary_operation[member[.traversableResolver], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=traversableResolver, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TraversableResolver, sub_type=None))], member=asSubclass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=instantiateClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".setTraversableResolver"), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="280")], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=t, 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=ValidationException, sub_type=None)), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ValidationException, sub_type=None)), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[binary_operation[member[.tr], !=, literal[null]]] begin[{] call[apiConfig.traversableResolver, parameter[member[.tr]]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["setTraversableResolver"], member[.tr]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setTraversableResolver] operator[SEP] identifier[Configuration] operator[<] operator[?] operator[>] identifier[apiConfig] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , identifier[apiConfig] operator[SEP] operator[SEP] } identifier[Class] operator[<] operator[?] Keyword[extends] identifier[TraversableResolver] operator[>] identifier[clazz] operator[=] Other[null] operator[SEP] identifier[TraversableResolver] identifier[tr] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[traversableResolver] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[clazz] operator[=] identifier[loadClass] operator[SEP] identifier[traversableResolver] operator[SEP] operator[SEP] identifier[asSubclass] operator[SEP] identifier[TraversableResolver] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[tr] operator[=] identifier[instantiateClass] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[t] , identifier[CLASS_NAME] operator[+] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[ValidationException] identifier[e] operator[=] Keyword[new] identifier[ValidationException] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } } Keyword[if] operator[SEP] identifier[tr] operator[!=] Other[null] operator[SEP] { identifier[apiConfig] operator[SEP] identifier[traversableResolver] operator[SEP] identifier[tr] 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] , identifier[tr] operator[SEP] operator[SEP] } }
public static boolean isEmpty(File pFile) { if (pFile.isDirectory()) { return (pFile.list().length == 0); } return (pFile.length() == 0); }
class class_name[name] begin[{] method[isEmpty, return_type[type[boolean]], modifier[public static], parameter[pFile]] begin[{] if[call[pFile.isDirectory, parameter[]]] begin[{] return[binary_operation[call[pFile.list, parameter[]], ==, literal[0]]] else begin[{] None end[}] return[binary_operation[call[pFile.length, parameter[]], ==, literal[0]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isEmpty] operator[SEP] identifier[File] identifier[pFile] operator[SEP] { Keyword[if] operator[SEP] identifier[pFile] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[pFile] operator[SEP] identifier[list] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[pFile] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] }
private void initSeLionRemoteProxySpecificValues(RemoteProxy proxy) { if (SeLionRemoteProxy.class.getCanonicalName().equals( proxy.getOriginalRegistrationRequest().getConfiguration().proxy)) { SeLionRemoteProxy srp = (SeLionRemoteProxy) proxy; // figure out if the proxy is scheduled to shutdown isShuttingDown = srp.isScheduledForRecycle(); // update the logsLocation if the proxy supports LogServlet if (srp.supportsViewLogs()) { logsLocation = proxy.getRemoteHost().toExternalForm() + "/extra/" + LogServlet.class.getSimpleName(); } totalSessionsStarted = srp.getTotalSessionsStarted(); totalSessionsComplete = srp.getTotalSessionsComplete(); uptimeInMinutes = srp.getUptimeInMinutes(); } }
class class_name[name] begin[{] method[initSeLionRemoteProxySpecificValues, return_type[void], modifier[private], parameter[proxy]] begin[{] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOriginalRegistrationRequest, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[MethodInvocation(arguments=[], member=getConfiguration, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MemberReference(member=proxy, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=SeLionRemoteProxy, sub_type=None))] begin[{] local_variable[type[SeLionRemoteProxy], srp] assign[member[.isShuttingDown], call[srp.isScheduledForRecycle, parameter[]]] if[call[srp.supportsViewLogs, parameter[]]] begin[{] assign[member[.logsLocation], binary_operation[binary_operation[call[proxy.getRemoteHost, parameter[]], +, literal["/extra/"]], +, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=LogServlet, sub_type=None))]] else begin[{] None end[}] assign[member[.totalSessionsStarted], call[srp.getTotalSessionsStarted, parameter[]]] assign[member[.totalSessionsComplete], call[srp.getTotalSessionsComplete, parameter[]]] assign[member[.uptimeInMinutes], call[srp.getUptimeInMinutes, parameter[]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[initSeLionRemoteProxySpecificValues] operator[SEP] identifier[RemoteProxy] identifier[proxy] operator[SEP] { Keyword[if] operator[SEP] identifier[SeLionRemoteProxy] operator[SEP] Keyword[class] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[proxy] operator[SEP] identifier[getOriginalRegistrationRequest] operator[SEP] operator[SEP] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[proxy] operator[SEP] operator[SEP] { identifier[SeLionRemoteProxy] identifier[srp] operator[=] operator[SEP] identifier[SeLionRemoteProxy] operator[SEP] identifier[proxy] operator[SEP] identifier[isShuttingDown] operator[=] identifier[srp] operator[SEP] identifier[isScheduledForRecycle] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[srp] operator[SEP] identifier[supportsViewLogs] operator[SEP] operator[SEP] operator[SEP] { identifier[logsLocation] operator[=] identifier[proxy] operator[SEP] identifier[getRemoteHost] operator[SEP] operator[SEP] operator[SEP] identifier[toExternalForm] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[LogServlet] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] } identifier[totalSessionsStarted] operator[=] identifier[srp] operator[SEP] identifier[getTotalSessionsStarted] operator[SEP] operator[SEP] operator[SEP] identifier[totalSessionsComplete] operator[=] identifier[srp] operator[SEP] identifier[getTotalSessionsComplete] operator[SEP] operator[SEP] operator[SEP] identifier[uptimeInMinutes] operator[=] identifier[srp] operator[SEP] identifier[getUptimeInMinutes] operator[SEP] operator[SEP] operator[SEP] } }
public static final void finish(int block[]) { for (int i = 0; i < 64; i += 4) { block[i] = div(block[i]); block[i + 1] = div(block[i + 1]); block[i + 2] = div(block[i + 2]); block[i + 3] = div(block[i + 3]); } }
class class_name[name] begin[{] method[finish, return_type[void], modifier[final public static], parameter[block]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), type==, value=MethodInvocation(arguments=[MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))])], member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))]), type==, value=MethodInvocation(arguments=[MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+))])], member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+))]), type==, value=MethodInvocation(arguments=[MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+))])], member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=64), 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=4))]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] Keyword[void] identifier[finish] operator[SEP] Keyword[int] identifier[block] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Other[64] operator[SEP] identifier[i] operator[+=] Other[4] operator[SEP] { identifier[block] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[div] operator[SEP] identifier[block] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[block] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[=] identifier[div] operator[SEP] identifier[block] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[block] operator[SEP] identifier[i] operator[+] Other[2] operator[SEP] operator[=] identifier[div] operator[SEP] identifier[block] operator[SEP] identifier[i] operator[+] Other[2] operator[SEP] operator[SEP] operator[SEP] identifier[block] operator[SEP] identifier[i] operator[+] Other[3] operator[SEP] operator[=] identifier[div] operator[SEP] identifier[block] operator[SEP] identifier[i] operator[+] Other[3] operator[SEP] operator[SEP] operator[SEP] } }
public int read(final char[] cbuf, final int off, final int len) throws IOException { final int read = super.read(cbuf, off, len); boolean doUnfold = false; for (char[] pattern : patterns) { if (read > 0 && cbuf[0] == pattern[0]) { doUnfold = true; break; } else { for (int j = 0; j < read; j++) { if (cbuf[j] == pattern[0]) { unread(cbuf, j, read - j); return j; } } } } if (!doUnfold) { return read; } else { unread(cbuf, off, read); } unfold(); return super.read(cbuf, off, maxPatternLength); }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[public], parameter[cbuf, off, len]] begin[{] local_variable[type[int], read] local_variable[type[boolean], doUnfold] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=cbuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator===), operator=&&), else_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cbuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=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=cbuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=unread, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=read, 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=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=doUnfold, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=patterns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pattern)], modifiers=set(), type=BasicType(dimensions=[None], name=char))), label=None) if[member[.doUnfold]] begin[{] return[member[.read]] else begin[{] call[.unread, parameter[member[.cbuf], member[.off], member[.read]]] end[}] call[.unfold, parameter[]] return[SuperMethodInvocation(arguments=[MemberReference(member=cbuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxPatternLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
Keyword[public] Keyword[int] identifier[read] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[cbuf] , Keyword[final] Keyword[int] identifier[off] , Keyword[final] Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] Keyword[int] identifier[read] operator[=] Keyword[super] operator[SEP] identifier[read] operator[SEP] identifier[cbuf] , identifier[off] , identifier[len] operator[SEP] operator[SEP] Keyword[boolean] identifier[doUnfold] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[pattern] operator[:] identifier[patterns] operator[SEP] { Keyword[if] operator[SEP] identifier[read] operator[>] Other[0] operator[&&] identifier[cbuf] operator[SEP] Other[0] operator[SEP] operator[==] identifier[pattern] operator[SEP] Other[0] operator[SEP] operator[SEP] { identifier[doUnfold] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } Keyword[else] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[read] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[cbuf] operator[SEP] identifier[j] operator[SEP] operator[==] identifier[pattern] operator[SEP] Other[0] operator[SEP] operator[SEP] { identifier[unread] operator[SEP] identifier[cbuf] , identifier[j] , identifier[read] operator[-] identifier[j] operator[SEP] operator[SEP] Keyword[return] identifier[j] operator[SEP] } } } } Keyword[if] operator[SEP] operator[!] identifier[doUnfold] operator[SEP] { Keyword[return] identifier[read] operator[SEP] } Keyword[else] { identifier[unread] operator[SEP] identifier[cbuf] , identifier[off] , identifier[read] operator[SEP] operator[SEP] } identifier[unfold] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[super] operator[SEP] identifier[read] operator[SEP] identifier[cbuf] , identifier[off] , identifier[maxPatternLength] operator[SEP] operator[SEP] }
public void setPreferredCacheClusterAZs(java.util.Collection<String> preferredCacheClusterAZs) { if (preferredCacheClusterAZs == null) { this.preferredCacheClusterAZs = null; return; } this.preferredCacheClusterAZs = new com.amazonaws.internal.SdkInternalList<String>(preferredCacheClusterAZs); }
class class_name[name] begin[{] method[setPreferredCacheClusterAZs, return_type[void], modifier[public], parameter[preferredCacheClusterAZs]] begin[{] if[binary_operation[member[.preferredCacheClusterAZs], ==, literal[null]]] begin[{] assign[THIS[member[None.preferredCacheClusterAZs]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.preferredCacheClusterAZs]], ClassCreator(arguments=[MemberReference(member=preferredCacheClusterAZs, 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=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=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setPreferredCacheClusterAZs] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[preferredCacheClusterAZs] operator[SEP] { Keyword[if] operator[SEP] identifier[preferredCacheClusterAZs] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[preferredCacheClusterAZs] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[preferredCacheClusterAZs] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[preferredCacheClusterAZs] operator[SEP] operator[SEP] }
public com.google.api.ads.admanager.axis.v201808.DeliveryData getDeliveryData() { return deliveryData; }
class class_name[name] begin[{] method[getDeliveryData, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.deliveryData]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201808] operator[SEP] identifier[DeliveryData] identifier[getDeliveryData] operator[SEP] operator[SEP] { Keyword[return] identifier[deliveryData] operator[SEP] }
public void setGaugeType(final GaugeType GAUGE_TYPE) { getModel().setGaugeType(GAUGE_TYPE); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
class class_name[name] begin[{] method[setGaugeType, return_type[void], modifier[public], parameter[GAUGE_TYPE]] begin[{] call[.getModel, parameter[]] call[.init, parameter[call[.getInnerBounds, parameter[]], call[.getInnerBounds, parameter[]]]] call[.repaint, parameter[call[.getInnerBounds, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setGaugeType] operator[SEP] Keyword[final] identifier[GaugeType] identifier[GAUGE_TYPE] operator[SEP] { identifier[getModel] operator[SEP] operator[SEP] operator[SEP] identifier[setGaugeType] operator[SEP] identifier[GAUGE_TYPE] operator[SEP] operator[SEP] identifier[init] operator[SEP] identifier[getInnerBounds] operator[SEP] operator[SEP] operator[SEP] identifier[width] , identifier[getInnerBounds] operator[SEP] operator[SEP] operator[SEP] identifier[height] operator[SEP] operator[SEP] identifier[repaint] operator[SEP] identifier[getInnerBounds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public SearchQuery highlight(HighlightStyle style, String... fields) { this.highlightStyle = style; if (fields != null && fields.length > 0) { highlightFields = fields; } return this; }
class class_name[name] begin[{] method[highlight, return_type[type[SearchQuery]], modifier[public], parameter[style, fields]] begin[{] assign[THIS[member[None.highlightStyle]], member[.style]] if[binary_operation[binary_operation[member[.fields], !=, literal[null]], &&, binary_operation[member[fields.length], >, literal[0]]]] begin[{] assign[member[.highlightFields], member[.fields]] else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[SearchQuery] identifier[highlight] operator[SEP] identifier[HighlightStyle] identifier[style] , identifier[String] operator[...] identifier[fields] operator[SEP] { Keyword[this] operator[SEP] identifier[highlightStyle] operator[=] identifier[style] operator[SEP] Keyword[if] operator[SEP] identifier[fields] operator[!=] Other[null] operator[&&] identifier[fields] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[highlightFields] operator[=] identifier[fields] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static double[] latLonToMeters( double lat, double lon ) { double mx = lon * originShift / 180.0; double my = Math.log(Math.tan((90 + lat) * Math.PI / 360.0)) / (Math.PI / 180.0); my = my * originShift / 180.0; return new double[]{mx, my}; }
class class_name[name] begin[{] method[latLonToMeters, return_type[type[double]], modifier[public static], parameter[lat, lon]] begin[{] local_variable[type[double], mx] local_variable[type[double], my] assign[member[.my], binary_operation[binary_operation[member[.my], *, member[.originShift]], /, literal[180.0]]] return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=mx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=my, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] operator[SEP] operator[SEP] identifier[latLonToMeters] operator[SEP] Keyword[double] identifier[lat] , Keyword[double] identifier[lon] operator[SEP] { Keyword[double] identifier[mx] operator[=] identifier[lon] operator[*] identifier[originShift] operator[/] literal[Float] operator[SEP] Keyword[double] identifier[my] operator[=] identifier[Math] operator[SEP] identifier[log] operator[SEP] identifier[Math] operator[SEP] identifier[tan] operator[SEP] operator[SEP] Other[90] operator[+] identifier[lat] operator[SEP] operator[*] identifier[Math] operator[SEP] identifier[PI] operator[/] literal[Float] operator[SEP] operator[SEP] operator[/] operator[SEP] identifier[Math] operator[SEP] identifier[PI] operator[/] literal[Float] operator[SEP] operator[SEP] identifier[my] operator[=] identifier[my] operator[*] identifier[originShift] operator[/] literal[Float] operator[SEP] Keyword[return] Keyword[new] Keyword[double] operator[SEP] operator[SEP] { identifier[mx] , identifier[my] } operator[SEP] }
private void removeConsumerFromRegisteredMonitorMap( MonitoredConsumer mc, ArrayList monitorList, Map registeredMonitors) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, "removeConsumerFromRegisteredMonitorMap", new Object[] { registeredMonitors, mc, monitorList }); // Finally, remove this consumer from the appropriate places in the registered // consumer monitors tables Iterator i = monitorList.iterator(); while (i.hasNext()) { String tExpr = (String)i.next(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, "Remove registration entry for consumer at: " + tExpr); // Get the next monitor RegisteredCallbacks rMonitor = (RegisteredCallbacks)registeredMonitors.get(tExpr); // Retrieve the current list of consumers ArrayList matchingConsumerList = rMonitor.getMatchingConsumers(); boolean removed = matchingConsumerList.remove(mc); if(!removed) { // Couldn't find the consumer. This means we have an internal // inconsistency in our tables, so throw an SIErrorException // Build the message for the Exception if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "removeConsumerFromRegisteredMonitorMap", mc + ":" + tExpr); SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0005", new Object[] { "com.ibm.ws.sib.processor.matching.ConsumerMonitorRegistrar", "1:1067:1.10", mc + ":" + tExpr }); throw new SIErrorException( nls.getFormattedMessage( "INTERNAL_MESSAGING_ERROR_CWSIP0005", new Object[] { "com.ibm.ws.sib.processor.matching.ConsumerMonitorRegistrar", "1:1074:1.10", mc + ":" + tExpr }, null)); } // Handle the driving of the callbacks if(matchingConsumerList.isEmpty()) { // This is a transition from 1 -> 0 consumer for this monitor. // Therefore we need to drive a callback driveRegisteredCallbacks(rMonitor, true); } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "removeConsumerFromRegisteredMonitorMap"); }
class class_name[name] begin[{] method[removeConsumerFromRegisteredMonitorMap, return_type[void], modifier[private], parameter[mc, monitorList, registeredMonitors]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["removeConsumerFromRegisteredMonitorMap"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=registeredMonitors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=monitorList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] local_variable[type[Iterator], i] while[call[i.hasNext, parameter[]]] begin[{] local_variable[type[String], tExpr] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[member[.tc], binary_operation[literal["Remove registration entry for consumer at: "], +, member[.tExpr]]]] else begin[{] None end[}] local_variable[type[RegisteredCallbacks], rMonitor] local_variable[type[ArrayList], matchingConsumerList] local_variable[type[boolean], removed] if[member[.removed]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["removeConsumerFromRegisteredMonitorMap"], binary_operation[binary_operation[member[.mc], +, literal[":"]], +, member[.tExpr]]]] else begin[{] None end[}] call[SibTr.error, parameter[member[.tc], literal["INTERNAL_MESSAGING_ERROR_CWSIP0005"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.matching.ConsumerMonitorRegistrar"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:1067:1.10"), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), operator=+), operandr=MemberReference(member=tExpr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INTERNAL_MESSAGING_ERROR_CWSIP0005"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.matching.ConsumerMonitorRegistrar"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:1074:1.10"), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":"), operator=+), operandr=MemberReference(member=tExpr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getFormattedMessage, postfix_operators=[], prefix_operators=[], qualifier=nls, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SIErrorException, sub_type=None)), label=None) else begin[{] None end[}] if[call[matchingConsumerList.isEmpty, parameter[]]] begin[{] call[.driveRegisteredCallbacks, parameter[member[.rMonitor], literal[true]]] else begin[{] None end[}] end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["removeConsumerFromRegisteredMonitorMap"]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[removeConsumerFromRegisteredMonitorMap] operator[SEP] identifier[MonitoredConsumer] identifier[mc] , identifier[ArrayList] identifier[monitorList] , identifier[Map] identifier[registeredMonitors] 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] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[registeredMonitors] , identifier[mc] , identifier[monitorList] } operator[SEP] operator[SEP] identifier[Iterator] identifier[i] operator[=] identifier[monitorList] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[tExpr] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[i] operator[SEP] identifier[next] 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[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[tExpr] operator[SEP] operator[SEP] identifier[RegisteredCallbacks] identifier[rMonitor] operator[=] operator[SEP] identifier[RegisteredCallbacks] operator[SEP] identifier[registeredMonitors] operator[SEP] identifier[get] operator[SEP] identifier[tExpr] operator[SEP] operator[SEP] identifier[ArrayList] identifier[matchingConsumerList] operator[=] identifier[rMonitor] operator[SEP] identifier[getMatchingConsumers] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[removed] operator[=] identifier[matchingConsumerList] operator[SEP] identifier[remove] operator[SEP] identifier[mc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[removed] 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[mc] operator[+] literal[String] operator[+] identifier[tExpr] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , literal[String] , identifier[mc] operator[+] literal[String] operator[+] identifier[tExpr] } operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SIErrorException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , literal[String] , identifier[mc] operator[+] literal[String] operator[+] identifier[tExpr] } , Other[null] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[matchingConsumerList] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[driveRegisteredCallbacks] operator[SEP] identifier[rMonitor] , literal[boolean] 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] operator[SEP] operator[SEP] }
public void loginAnonymously(final SimpleLoginAuthenticatedHandler completionHandler) { HashMap<String, String> data = new HashMap<String, String>(); makeRequest(Constants.FIREBASE_AUTH_ANONYMOUS_PATH, data, new RequestHandler() { public void handle(FirebaseSimpleLoginError error, JSONObject data) { if (error != null) { completionHandler.authenticated(error, null); } else { try { String token = data.has("token") ? data.getString("token") : null; if (token == null) { JSONObject errorDetails = data.has("error") ? data.getJSONObject("error") : null; FirebaseSimpleLoginError theError = FirebaseSimpleLoginError.errorFromResponse(errorDetails); completionHandler.authenticated(theError, null); } else { JSONObject userData = data.has("user") ? data.getJSONObject("user") : null; if (userData == null) { FirebaseSimpleLoginError theError = FirebaseSimpleLoginError.errorFromResponse(null); completionHandler.authenticated(theError, null); } else { attemptAuthWithToken(token, Provider.ANONYMOUS, userData, completionHandler); } } } catch (JSONException e) { e.printStackTrace(); FirebaseSimpleLoginError theError = FirebaseSimpleLoginError.errorFromResponse(null); completionHandler.authenticated(theError, null); } } } }); }
class class_name[name] begin[{] method[loginAnonymously, return_type[void], modifier[public], parameter[completionHandler]] begin[{] local_variable[type[HashMap], data] call[.makeRequest, parameter[member[Constants.FIREBASE_AUTH_ANONYMOUS_PATH], member[.data], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="token")], member=has, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="token")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None)), name=token)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="user")], member=has, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="user")], member=getJSONObject, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None)), name=userData)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=userData, 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=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ANONYMOUS, postfix_operators=[], prefix_operators=[], qualifier=Provider, selectors=[]), MemberReference(member=userData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=completionHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=attemptAuthWithToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=errorFromResponse, postfix_operators=[], prefix_operators=[], qualifier=FirebaseSimpleLoginError, selectors=[], type_arguments=None), name=theError)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FirebaseSimpleLoginError, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=theError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=authenticated, postfix_operators=[], prefix_operators=[], qualifier=completionHandler, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="error")], member=has, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="error")], member=getJSONObject, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None)), name=errorDetails)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=errorDetails, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=errorFromResponse, postfix_operators=[], prefix_operators=[], qualifier=FirebaseSimpleLoginError, selectors=[], type_arguments=None), name=theError)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FirebaseSimpleLoginError, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=theError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=authenticated, postfix_operators=[], prefix_operators=[], qualifier=completionHandler, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=errorFromResponse, postfix_operators=[], prefix_operators=[], qualifier=FirebaseSimpleLoginError, selectors=[], type_arguments=None), name=theError)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FirebaseSimpleLoginError, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=theError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=authenticated, postfix_operators=[], prefix_operators=[], qualifier=completionHandler, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JSONException']))], finally_block=None, label=None, resources=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=authenticated, postfix_operators=[], prefix_operators=[], qualifier=completionHandler, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=handle, parameters=[FormalParameter(annotations=[], modifiers=set(), name=error, type=ReferenceType(arguments=None, dimensions=[], name=FirebaseSimpleLoginError, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=data, type=ReferenceType(arguments=None, dimensions=[], name=JSONObject, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RequestHandler, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[loginAnonymously] operator[SEP] Keyword[final] identifier[SimpleLoginAuthenticatedHandler] identifier[completionHandler] operator[SEP] { identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[data] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[makeRequest] operator[SEP] identifier[Constants] operator[SEP] identifier[FIREBASE_AUTH_ANONYMOUS_PATH] , identifier[data] , Keyword[new] identifier[RequestHandler] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[handle] operator[SEP] identifier[FirebaseSimpleLoginError] identifier[error] , identifier[JSONObject] identifier[data] operator[SEP] { Keyword[if] operator[SEP] identifier[error] operator[!=] Other[null] operator[SEP] { identifier[completionHandler] operator[SEP] identifier[authenticated] operator[SEP] identifier[error] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { Keyword[try] { identifier[String] identifier[token] operator[=] identifier[data] operator[SEP] identifier[has] operator[SEP] literal[String] operator[SEP] operator[?] identifier[data] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[token] operator[==] Other[null] operator[SEP] { identifier[JSONObject] identifier[errorDetails] operator[=] identifier[data] operator[SEP] identifier[has] operator[SEP] literal[String] operator[SEP] operator[?] identifier[data] operator[SEP] identifier[getJSONObject] operator[SEP] literal[String] operator[SEP] operator[:] Other[null] operator[SEP] identifier[FirebaseSimpleLoginError] identifier[theError] operator[=] identifier[FirebaseSimpleLoginError] operator[SEP] identifier[errorFromResponse] operator[SEP] identifier[errorDetails] operator[SEP] operator[SEP] identifier[completionHandler] operator[SEP] identifier[authenticated] operator[SEP] identifier[theError] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { identifier[JSONObject] identifier[userData] operator[=] identifier[data] operator[SEP] identifier[has] operator[SEP] literal[String] operator[SEP] operator[?] identifier[data] operator[SEP] identifier[getJSONObject] operator[SEP] literal[String] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[userData] operator[==] Other[null] operator[SEP] { identifier[FirebaseSimpleLoginError] identifier[theError] operator[=] identifier[FirebaseSimpleLoginError] operator[SEP] identifier[errorFromResponse] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[completionHandler] operator[SEP] identifier[authenticated] operator[SEP] identifier[theError] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { identifier[attemptAuthWithToken] operator[SEP] identifier[token] , identifier[Provider] operator[SEP] identifier[ANONYMOUS] , identifier[userData] , identifier[completionHandler] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[JSONException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] identifier[FirebaseSimpleLoginError] identifier[theError] operator[=] identifier[FirebaseSimpleLoginError] operator[SEP] identifier[errorFromResponse] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[completionHandler] operator[SEP] identifier[authenticated] operator[SEP] identifier[theError] , Other[null] operator[SEP] operator[SEP] } } } } operator[SEP] operator[SEP] }
public static Bundle of(String key, float value) { Bundle b = new Bundle(1); b.putFloat(key, value); return b; }
class class_name[name] begin[{] method[of, return_type[type[Bundle]], modifier[public static], parameter[key, value]] begin[{] local_variable[type[Bundle], b] call[b.putFloat, parameter[member[.key], member[.value]]] return[member[.b]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Bundle] identifier[of] operator[SEP] identifier[String] identifier[key] , Keyword[float] identifier[value] operator[SEP] { identifier[Bundle] identifier[b] operator[=] Keyword[new] identifier[Bundle] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[b] operator[SEP] identifier[putFloat] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] Keyword[return] identifier[b] operator[SEP] }
private static SoyValue normalizeNull(@Nullable SoyValue v) { return v == null ? NullData.INSTANCE : v; }
class class_name[name] begin[{] method[normalizeNull, return_type[type[SoyValue]], modifier[private static], parameter[v]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=INSTANCE, postfix_operators=[], prefix_operators=[], qualifier=NullData, selectors=[]))] end[}] END[}]
Keyword[private] Keyword[static] identifier[SoyValue] identifier[normalizeNull] operator[SEP] annotation[@] identifier[Nullable] identifier[SoyValue] identifier[v] operator[SEP] { Keyword[return] identifier[v] operator[==] Other[null] operator[?] identifier[NullData] operator[SEP] identifier[INSTANCE] operator[:] identifier[v] operator[SEP] }
public static boolean isClassMonomodal(Class<?> cls) { if (cls.isInterface()) return false; if (cls == Object.class) return true; for (Field f : cls.getDeclaredFields()) if (!Modifier.isStatic(f.getModifiers())) return false; for (Constructor<?> c : cls.getDeclaredConstructors()) // maybe arguments are passed to super-type so we check it too if (c.getParameterTypes().length > 0) return isClassMonomodal(cls.getSuperclass()); return true; }
class class_name[name] begin[{] method[isClassMonomodal, return_type[type[boolean]], modifier[public static], parameter[cls]] begin[{] if[call[cls.isInterface, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[member[.cls], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] begin[{] return[literal[true]] else begin[{] None end[}] ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getModifiers, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None)], member=isStatic, postfix_operators=[], prefix_operators=['!'], qualifier=Modifier, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDeclaredFields, postfix_operators=[], prefix_operators=[], qualifier=cls, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))), label=None) ForStatement(body=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSuperclass, postfix_operators=[], prefix_operators=[], qualifier=cls, selectors=[], type_arguments=None)], member=isClassMonomodal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDeclaredConstructors, postfix_operators=[], prefix_operators=[], qualifier=cls, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Constructor, sub_type=None))), label=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isClassMonomodal] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[cls] operator[SEP] { Keyword[if] operator[SEP] identifier[cls] operator[SEP] identifier[isInterface] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[cls] operator[==] identifier[Object] operator[SEP] Keyword[class] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Field] identifier[f] operator[:] identifier[cls] operator[SEP] identifier[getDeclaredFields] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Modifier] operator[SEP] identifier[isStatic] operator[SEP] identifier[f] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Constructor] operator[<] operator[?] operator[>] identifier[c] operator[:] identifier[cls] operator[SEP] identifier[getDeclaredConstructors] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] Keyword[return] identifier[isClassMonomodal] operator[SEP] identifier[cls] operator[SEP] identifier[getSuperclass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
protected void initActivityIds(List<DelayedVariableEvent> delayedEvents, Map<PvmExecutionImpl, String> activityInstanceIds, Map<PvmExecutionImpl, String> activityIds) { for (DelayedVariableEvent event : delayedEvents) { PvmExecutionImpl targetScope = event.getTargetScope(); String targetScopeActivityInstanceId = getActivityInstanceId(targetScope); activityInstanceIds.put(targetScope, targetScopeActivityInstanceId); activityIds.put(targetScope, targetScope.getActivityId()); } }
class class_name[name] begin[{] method[initActivityIds, return_type[void], modifier[protected], parameter[delayedEvents, activityInstanceIds, activityIds]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getTargetScope, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), name=targetScope)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PvmExecutionImpl, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=targetScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getActivityInstanceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=targetScopeActivityInstanceId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=targetScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetScopeActivityInstanceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=activityInstanceIds, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=targetScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getActivityId, postfix_operators=[], prefix_operators=[], qualifier=targetScope, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=activityIds, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=delayedEvents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=event)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DelayedVariableEvent, sub_type=None))), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[initActivityIds] operator[SEP] identifier[List] operator[<] identifier[DelayedVariableEvent] operator[>] identifier[delayedEvents] , identifier[Map] operator[<] identifier[PvmExecutionImpl] , identifier[String] operator[>] identifier[activityInstanceIds] , identifier[Map] operator[<] identifier[PvmExecutionImpl] , identifier[String] operator[>] identifier[activityIds] operator[SEP] { Keyword[for] operator[SEP] identifier[DelayedVariableEvent] identifier[event] operator[:] identifier[delayedEvents] operator[SEP] { identifier[PvmExecutionImpl] identifier[targetScope] operator[=] identifier[event] operator[SEP] identifier[getTargetScope] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[targetScopeActivityInstanceId] operator[=] identifier[getActivityInstanceId] operator[SEP] identifier[targetScope] operator[SEP] operator[SEP] identifier[activityInstanceIds] operator[SEP] identifier[put] operator[SEP] identifier[targetScope] , identifier[targetScopeActivityInstanceId] operator[SEP] operator[SEP] identifier[activityIds] operator[SEP] identifier[put] operator[SEP] identifier[targetScope] , identifier[targetScope] operator[SEP] identifier[getActivityId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@Override protected void checkPosition () throws AbstractRootFinder.PositionUnchangedException { if (EqualsHelper.equals (m_fXMid, m_fPrevXMid)) { throw new AbstractRootFinder.PositionUnchangedException (); } }
class class_name[name] begin[{] method[checkPosition, return_type[void], modifier[protected], parameter[]] begin[{] if[call[EqualsHelper.equals, parameter[member[.m_fXMid], member[.m_fPrevXMid]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AbstractRootFinder, sub_type=ReferenceType(arguments=None, dimensions=None, name=PositionUnchangedException, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[checkPosition] operator[SEP] operator[SEP] Keyword[throws] identifier[AbstractRootFinder] operator[SEP] identifier[PositionUnchangedException] { Keyword[if] operator[SEP] identifier[EqualsHelper] operator[SEP] identifier[equals] operator[SEP] identifier[m_fXMid] , identifier[m_fPrevXMid] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[AbstractRootFinder] operator[SEP] identifier[PositionUnchangedException] operator[SEP] operator[SEP] operator[SEP] } }
public ExpressRouteCircuitAuthorizationInner createOrUpdate(String resourceGroupName, String circuitName, String authorizationName, ExpressRouteCircuitAuthorizationInner authorizationParameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, circuitName, authorizationName, authorizationParameters).toBlocking().last().body(); }
class class_name[name] begin[{] method[createOrUpdate, return_type[type[ExpressRouteCircuitAuthorizationInner]], modifier[public], parameter[resourceGroupName, circuitName, authorizationName, authorizationParameters]] begin[{] return[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.circuitName], member[.authorizationName], member[.authorizationParameters]]]] end[}] END[}]
Keyword[public] identifier[ExpressRouteCircuitAuthorizationInner] identifier[createOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[circuitName] , identifier[String] identifier[authorizationName] , identifier[ExpressRouteCircuitAuthorizationInner] identifier[authorizationParameters] operator[SEP] { Keyword[return] identifier[createOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[circuitName] , identifier[authorizationName] , identifier[authorizationParameters] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[last] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
private void sawStore(int seen, int pc) { int reg = RegisterUtils.getStoreReg(this, seen); if (catchHandlers.get(pc)) { ignoreRegs.set(reg); ScopeBlock catchSB = findScopeBlock(rootScopeBlock, pc + 1); if ((catchSB != null) && (catchSB.getStart() < pc)) { ScopeBlock sb = new ScopeBlock(pc, catchSB.getFinish()); catchSB.setFinish(getPC() - 1); rootScopeBlock.addChild(sb); } } else if (!monitorSyncPCs.isEmpty()) { ignoreRegs.set(reg); } else if (sawNull) { ignoreRegs.set(reg); } else if (isRiskyStoreClass(reg)) { ignoreRegs.set(reg); } if (!ignoreRegs.get(reg)) { ScopeBlock sb = findScopeBlock(rootScopeBlock, pc); if (sb != null) { UserObject assoc = null; if (stack.getStackDepth() > 0) { OpcodeStack.Item srcItm = stack.getStackItem(0); assoc = (UserObject) srcItm.getUserValue(); if (assoc == null) { if (srcItm.getRegisterNumber() >= 0) { assoc = new UserObject(srcItm.getRegisterNumber()); } } } if ((assoc != null) && assoc.isRisky) { ignoreRegs.set(reg); } else { sb.addStore(reg, pc, assoc); if (sawDup) { sb.addLoad(reg, pc); } } } else { ignoreRegs.set(reg); } } ScopeBlock sb = findScopeBlock(rootScopeBlock, pc); if (sb != null) { sb.markFieldAssociatedWrites(reg); } }
class class_name[name] begin[{] method[sawStore, return_type[void], modifier[private], parameter[seen, pc]] begin[{] local_variable[type[int], reg] if[call[catchHandlers.get, parameter[member[.pc]]]] begin[{] call[ignoreRegs.set, parameter[member[.reg]]] local_variable[type[ScopeBlock], catchSB] if[binary_operation[binary_operation[member[.catchSB], !=, literal[null]], &&, binary_operation[call[catchSB.getStart, parameter[]], <, member[.pc]]]] begin[{] local_variable[type[ScopeBlock], sb] call[catchSB.setFinish, parameter[binary_operation[call[.getPC, parameter[]], -, literal[1]]]] call[rootScopeBlock.addChild, parameter[member[.sb]]] else begin[{] None end[}] else begin[{] if[call[monitorSyncPCs.isEmpty, parameter[]]] begin[{] call[ignoreRegs.set, parameter[member[.reg]]] else begin[{] if[member[.sawNull]] begin[{] call[ignoreRegs.set, parameter[member[.reg]]] else begin[{] if[call[.isRiskyStoreClass, parameter[member[.reg]]]] begin[{] call[ignoreRegs.set, parameter[member[.reg]]] else begin[{] None end[}] end[}] end[}] end[}] if[call[ignoreRegs.get, parameter[member[.reg]]]] begin[{] local_variable[type[ScopeBlock], sb] if[binary_operation[member[.sb], !=, literal[null]]] begin[{] local_variable[type[UserObject], assoc] if[binary_operation[call[stack.getStackDepth, parameter[]], >, literal[0]]] begin[{] local_variable[type[OpcodeStack], srcItm] assign[member[.assoc], Cast(expression=MethodInvocation(arguments=[], member=getUserValue, postfix_operators=[], prefix_operators=[], qualifier=srcItm, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=UserObject, sub_type=None))] if[binary_operation[member[.assoc], ==, literal[null]]] begin[{] if[binary_operation[call[srcItm.getRegisterNumber, parameter[]], >=, literal[0]]] begin[{] assign[member[.assoc], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getRegisterNumber, postfix_operators=[], prefix_operators=[], qualifier=srcItm, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UserObject, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[binary_operation[member[.assoc], !=, literal[null]], &&, member[assoc.isRisky]]] begin[{] call[ignoreRegs.set, parameter[member[.reg]]] else begin[{] call[sb.addStore, parameter[member[.reg], member[.pc], member[.assoc]]] if[member[.sawDup]] begin[{] call[sb.addLoad, parameter[member[.reg], member[.pc]]] else begin[{] None end[}] end[}] else begin[{] call[ignoreRegs.set, parameter[member[.reg]]] end[}] else begin[{] None end[}] local_variable[type[ScopeBlock], sb] if[binary_operation[member[.sb], !=, literal[null]]] begin[{] call[sb.markFieldAssociatedWrites, parameter[member[.reg]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[sawStore] operator[SEP] Keyword[int] identifier[seen] , Keyword[int] identifier[pc] operator[SEP] { Keyword[int] identifier[reg] operator[=] identifier[RegisterUtils] operator[SEP] identifier[getStoreReg] operator[SEP] Keyword[this] , identifier[seen] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[catchHandlers] operator[SEP] identifier[get] operator[SEP] identifier[pc] operator[SEP] operator[SEP] { identifier[ignoreRegs] operator[SEP] identifier[set] operator[SEP] identifier[reg] operator[SEP] operator[SEP] identifier[ScopeBlock] identifier[catchSB] operator[=] identifier[findScopeBlock] operator[SEP] identifier[rootScopeBlock] , identifier[pc] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[catchSB] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[catchSB] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[<] identifier[pc] operator[SEP] operator[SEP] { identifier[ScopeBlock] identifier[sb] operator[=] Keyword[new] identifier[ScopeBlock] operator[SEP] identifier[pc] , identifier[catchSB] operator[SEP] identifier[getFinish] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[catchSB] operator[SEP] identifier[setFinish] operator[SEP] identifier[getPC] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[rootScopeBlock] operator[SEP] identifier[addChild] operator[SEP] identifier[sb] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[monitorSyncPCs] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[ignoreRegs] operator[SEP] identifier[set] operator[SEP] identifier[reg] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[sawNull] operator[SEP] { identifier[ignoreRegs] operator[SEP] identifier[set] operator[SEP] identifier[reg] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[isRiskyStoreClass] operator[SEP] identifier[reg] operator[SEP] operator[SEP] { identifier[ignoreRegs] operator[SEP] identifier[set] operator[SEP] identifier[reg] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[ignoreRegs] operator[SEP] identifier[get] operator[SEP] identifier[reg] operator[SEP] operator[SEP] { identifier[ScopeBlock] identifier[sb] operator[=] identifier[findScopeBlock] operator[SEP] identifier[rootScopeBlock] , identifier[pc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sb] operator[!=] Other[null] operator[SEP] { identifier[UserObject] identifier[assoc] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[stack] operator[SEP] identifier[getStackDepth] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[OpcodeStack] operator[SEP] identifier[Item] identifier[srcItm] operator[=] identifier[stack] operator[SEP] identifier[getStackItem] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[assoc] operator[=] operator[SEP] identifier[UserObject] operator[SEP] identifier[srcItm] operator[SEP] identifier[getUserValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[assoc] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[srcItm] operator[SEP] identifier[getRegisterNumber] operator[SEP] operator[SEP] operator[>=] Other[0] operator[SEP] { identifier[assoc] operator[=] Keyword[new] identifier[UserObject] operator[SEP] identifier[srcItm] operator[SEP] identifier[getRegisterNumber] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] operator[SEP] identifier[assoc] operator[!=] Other[null] operator[SEP] operator[&&] identifier[assoc] operator[SEP] identifier[isRisky] operator[SEP] { identifier[ignoreRegs] operator[SEP] identifier[set] operator[SEP] identifier[reg] operator[SEP] operator[SEP] } Keyword[else] { identifier[sb] operator[SEP] identifier[addStore] operator[SEP] identifier[reg] , identifier[pc] , identifier[assoc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sawDup] operator[SEP] { identifier[sb] operator[SEP] identifier[addLoad] operator[SEP] identifier[reg] , identifier[pc] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[ignoreRegs] operator[SEP] identifier[set] operator[SEP] identifier[reg] operator[SEP] operator[SEP] } } identifier[ScopeBlock] identifier[sb] operator[=] identifier[findScopeBlock] operator[SEP] identifier[rootScopeBlock] , identifier[pc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sb] operator[!=] Other[null] operator[SEP] { identifier[sb] operator[SEP] identifier[markFieldAssociatedWrites] operator[SEP] identifier[reg] operator[SEP] operator[SEP] } }
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { Object returnValue = null; try { returnValue = method.invoke(target, args); } catch(InvocationTargetException ite) { throw ite.getTargetException(); } if (messaging != null && !exec.isShutdown()) { exec.submit(new Notifier(method, args, returnValue)); } return returnValue; }
class class_name[name] begin[{] method[invoke, return_type[type[Object]], modifier[public], parameter[proxy, method, args]] begin[{] local_variable[type[Object], returnValue] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=returnValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[], member=getTargetException, postfix_operators=[], prefix_operators=[], qualifier=ite, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ite, types=['InvocationTargetException']))], finally_block=None, label=None, resources=None) if[binary_operation[binary_operation[member[.messaging], !=, literal[null]], &&, call[exec.isShutdown, parameter[]]]] begin[{] call[exec.submit, parameter[ClassCreator(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=returnValue, 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=Notifier, sub_type=None))]] else begin[{] None end[}] return[member[.returnValue]] end[}] END[}]
Keyword[public] identifier[Object] identifier[invoke] operator[SEP] identifier[Object] identifier[proxy] , identifier[Method] identifier[method] , identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Throwable] { identifier[Object] identifier[returnValue] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[returnValue] operator[=] identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[target] , identifier[args] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvocationTargetException] identifier[ite] operator[SEP] { Keyword[throw] identifier[ite] operator[SEP] identifier[getTargetException] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[messaging] operator[!=] Other[null] operator[&&] operator[!] identifier[exec] operator[SEP] identifier[isShutdown] operator[SEP] operator[SEP] operator[SEP] { identifier[exec] operator[SEP] identifier[submit] operator[SEP] Keyword[new] identifier[Notifier] operator[SEP] identifier[method] , identifier[args] , identifier[returnValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[returnValue] operator[SEP] }
public void addTableField(String fieldLabel, JTable field, List<JButton> buttons) { validateNotTabbed(); JScrollPane scrollPane = new JScrollPane(); scrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED); scrollPane.setViewportView(field); field.setFillsViewportHeight(true); // Tables are a special case - they don't have labels and are accessed via the model if (this.fieldList.contains(field)) { throw new IllegalArgumentException("Field already added: " + field); } if (buttons == null || buttons.size() == 0) { if (fieldLabel == null) { this.getMainPanel().add(scrollPane, LayoutHelper.getGBC(1, this.fieldList.size(), 1, fieldWeight, 1.0D, GridBagConstraints.BOTH, new Insets(4,4,4,4))); } else { this.addField(fieldLabel, field, scrollPane, 1.0D); } } else { JPanel tablePanel = new JPanel(); tablePanel.setLayout(new GridBagLayout()); tablePanel.add(scrollPane, LayoutHelper.getGBC(0, 0, 1, 1.0D, 1.0D, GridBagConstraints.BOTH, new Insets(4,4,4,4))); JPanel buttonPanel = new JPanel(); buttonPanel.setLayout(new GridBagLayout()); int buttonId = 0; for (JButton button : buttons) { buttonPanel.add(button, LayoutHelper.getGBC(0, buttonId++, 1, 0D, 0D, GridBagConstraints.BOTH, new Insets(2,2,2,2))); } // Add spacer to force buttons to the top buttonPanel.add(new JLabel(), LayoutHelper.getGBC(0, buttonId++, 1, 0D, 1.0D, GridBagConstraints.BOTH, new Insets(2,2,2,2))); tablePanel.add(buttonPanel, LayoutHelper.getGBC(1, 0, 1, 0D, 0D, GridBagConstraints.BOTH, new Insets(2,2,2,2))); if (fieldLabel == null) { this.getMainPanel().add(tablePanel, LayoutHelper.getGBC(1, this.fieldList.size(), 1, fieldWeight, 1.0D, GridBagConstraints.BOTH, new Insets(4,4,4,4))); } else { this.addField(fieldLabel, field, tablePanel, 1.0D); } } this.fieldList.add(field); }
class class_name[name] begin[{] method[addTableField, return_type[void], modifier[public], parameter[fieldLabel, field, buttons]] begin[{] call[.validateNotTabbed, parameter[]] local_variable[type[JScrollPane], scrollPane] call[scrollPane.setVerticalScrollBarPolicy, parameter[member[JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED]]] call[scrollPane.setViewportView, parameter[member[.field]]] call[field.setFillsViewportHeight, parameter[literal[true]]] if[THIS[member[None.fieldList]call[None.contains, parameter[member[.field]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Field already added: "), operandr=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[binary_operation[member[.buttons], ==, literal[null]], ||, binary_operation[call[buttons.size, parameter[]], ==, literal[0]]]] begin[{] if[binary_operation[member[.fieldLabel], ==, literal[null]]] begin[{] THIS[call[None.getMainPanel, parameter[]]call[None.add, parameter[member[.scrollPane], call[LayoutHelper.getGBC, parameter[literal[1], THIS[member[None.fieldList]call[None.size, parameter[]]], literal[1], member[.fieldWeight], literal[1.0D], member[GridBagConstraints.BOTH], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]]] else begin[{] THIS[call[None.addField, parameter[member[.fieldLabel], member[.field], member[.scrollPane], literal[1.0D]]]] end[}] else begin[{] local_variable[type[JPanel], tablePanel] call[tablePanel.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridBagLayout, sub_type=None))]] call[tablePanel.add, parameter[member[.scrollPane], call[LayoutHelper.getGBC, parameter[literal[0], literal[0], literal[1], literal[1.0D], literal[1.0D], member[GridBagConstraints.BOTH], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] local_variable[type[JPanel], buttonPanel] call[buttonPanel.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridBagLayout, sub_type=None))]] local_variable[type[int], buttonId] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=button, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=buttonId, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0D), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0D), MemberReference(member=BOTH, postfix_operators=[], prefix_operators=[], qualifier=GridBagConstraints, selectors=[]), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))], member=getGBC, postfix_operators=[], prefix_operators=[], qualifier=LayoutHelper, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=buttonPanel, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=buttons, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=button)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JButton, sub_type=None))), label=None) call[buttonPanel.add, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), call[LayoutHelper.getGBC, parameter[literal[0], member[.buttonId], literal[1], literal[0D], literal[1.0D], member[GridBagConstraints.BOTH], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] call[tablePanel.add, parameter[member[.buttonPanel], call[LayoutHelper.getGBC, parameter[literal[1], literal[0], literal[1], literal[0D], literal[0D], member[GridBagConstraints.BOTH], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]] if[binary_operation[member[.fieldLabel], ==, literal[null]]] begin[{] THIS[call[None.getMainPanel, parameter[]]call[None.add, parameter[member[.tablePanel], call[LayoutHelper.getGBC, parameter[literal[1], THIS[member[None.fieldList]call[None.size, parameter[]]], literal[1], member[.fieldWeight], literal[1.0D], member[GridBagConstraints.BOTH], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))]]]]] else begin[{] THIS[call[None.addField, parameter[member[.fieldLabel], member[.field], member[.tablePanel], literal[1.0D]]]] end[}] end[}] THIS[member[None.fieldList]call[None.add, parameter[member[.field]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addTableField] operator[SEP] identifier[String] identifier[fieldLabel] , identifier[JTable] identifier[field] , identifier[List] operator[<] identifier[JButton] operator[>] identifier[buttons] operator[SEP] { identifier[validateNotTabbed] operator[SEP] operator[SEP] operator[SEP] identifier[JScrollPane] identifier[scrollPane] operator[=] Keyword[new] identifier[JScrollPane] operator[SEP] operator[SEP] operator[SEP] identifier[scrollPane] operator[SEP] identifier[setVerticalScrollBarPolicy] operator[SEP] identifier[JScrollPane] operator[SEP] identifier[VERTICAL_SCROLLBAR_AS_NEEDED] operator[SEP] operator[SEP] identifier[scrollPane] operator[SEP] identifier[setViewportView] operator[SEP] identifier[field] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[setFillsViewportHeight] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[fieldList] operator[SEP] identifier[contains] operator[SEP] identifier[field] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[field] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[buttons] operator[==] Other[null] operator[||] identifier[buttons] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[fieldLabel] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[getMainPanel] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[scrollPane] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[1] , Keyword[this] operator[SEP] identifier[fieldList] operator[SEP] identifier[size] operator[SEP] operator[SEP] , Other[1] , identifier[fieldWeight] , literal[Float] , identifier[GridBagConstraints] operator[SEP] identifier[BOTH] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[addField] operator[SEP] identifier[fieldLabel] , identifier[field] , identifier[scrollPane] , literal[Float] operator[SEP] operator[SEP] } } Keyword[else] { identifier[JPanel] identifier[tablePanel] operator[=] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[tablePanel] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[GridBagLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tablePanel] operator[SEP] identifier[add] operator[SEP] identifier[scrollPane] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[0] , Other[1] , literal[Float] , literal[Float] , identifier[GridBagConstraints] operator[SEP] identifier[BOTH] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[JPanel] identifier[buttonPanel] operator[=] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[buttonPanel] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[GridBagLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[buttonId] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[JButton] identifier[button] operator[:] identifier[buttons] operator[SEP] { identifier[buttonPanel] operator[SEP] identifier[add] operator[SEP] identifier[button] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , identifier[buttonId] operator[++] , Other[1] , literal[Float] , literal[Float] , identifier[GridBagConstraints] operator[SEP] identifier[BOTH] , Keyword[new] identifier[Insets] operator[SEP] Other[2] , Other[2] , Other[2] , Other[2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[buttonPanel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , identifier[buttonId] operator[++] , Other[1] , literal[Float] , literal[Float] , identifier[GridBagConstraints] operator[SEP] identifier[BOTH] , Keyword[new] identifier[Insets] operator[SEP] Other[2] , Other[2] , Other[2] , Other[2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tablePanel] operator[SEP] identifier[add] operator[SEP] identifier[buttonPanel] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[1] , Other[0] , Other[1] , literal[Float] , literal[Float] , identifier[GridBagConstraints] operator[SEP] identifier[BOTH] , Keyword[new] identifier[Insets] operator[SEP] Other[2] , Other[2] , Other[2] , Other[2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fieldLabel] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[getMainPanel] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[tablePanel] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[1] , Keyword[this] operator[SEP] identifier[fieldList] operator[SEP] identifier[size] operator[SEP] operator[SEP] , Other[1] , identifier[fieldWeight] , literal[Float] , identifier[GridBagConstraints] operator[SEP] identifier[BOTH] , Keyword[new] identifier[Insets] operator[SEP] Other[4] , Other[4] , Other[4] , Other[4] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[addField] operator[SEP] identifier[fieldLabel] , identifier[field] , identifier[tablePanel] , literal[Float] operator[SEP] operator[SEP] } } Keyword[this] operator[SEP] identifier[fieldList] operator[SEP] identifier[add] operator[SEP] identifier[field] operator[SEP] operator[SEP] }
private void addSleeper(final long identifier, final ComplexCondition call) { if (sleeperMap.put(identifier, call) != null) { throw new RuntimeException(String.format("Duplicate identifier [%d] in sleeper map", identifier)); } }
class class_name[name] begin[{] method[addSleeper, return_type[void], modifier[private], parameter[identifier, call]] begin[{] if[binary_operation[call[sleeperMap.put, parameter[member[.identifier], member[.call]]], !=, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Duplicate identifier [%d] in sleeper map"), MemberReference(member=identifier, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addSleeper] operator[SEP] Keyword[final] Keyword[long] identifier[identifier] , Keyword[final] identifier[ComplexCondition] identifier[call] operator[SEP] { Keyword[if] operator[SEP] identifier[sleeperMap] operator[SEP] identifier[put] operator[SEP] identifier[identifier] , identifier[call] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[identifier] operator[SEP] operator[SEP] operator[SEP] } }
public UpdateCenterJob getJob(int id) { synchronized (jobs) { for (UpdateCenterJob job : jobs) { if (job.id==id) return job; } } return null; }
class class_name[name] begin[{] method[getJob, return_type[type[UpdateCenterJob]], modifier[public], parameter[id]] begin[{] SYNCHRONIZED[member[.jobs]] BEGIN[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[]), operandr=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=jobs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=job)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=UpdateCenterJob, sub_type=None))), label=None) END[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[UpdateCenterJob] identifier[getJob] operator[SEP] Keyword[int] identifier[id] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[jobs] operator[SEP] { Keyword[for] operator[SEP] identifier[UpdateCenterJob] identifier[job] operator[:] identifier[jobs] operator[SEP] { Keyword[if] operator[SEP] identifier[job] operator[SEP] identifier[id] operator[==] identifier[id] operator[SEP] Keyword[return] identifier[job] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public void addScaling(double scale) { // invalidate inverse inv = null; // Note: last ROW is not included. for(int i = 0; i < dim; i++) { for(int j = 0; j <= dim; j++) { trans[i][j] = trans[i][j] * scale; } } // As long as relative vectors aren't used, this would also work: // trans[dim][dim] = trans[dim][dim] / scale; }
class class_name[name] begin[{] method[addScaling, return_type[void], modifier[public], parameter[scale]] begin[{] assign[member[.inv], literal[null]] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trans, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=MemberReference(member=trans, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=scale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dim, 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=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, 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=dim, 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) end[}] END[}]
Keyword[public] Keyword[void] identifier[addScaling] operator[SEP] Keyword[double] identifier[scale] operator[SEP] { identifier[inv] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[dim] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<=] identifier[dim] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[trans] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[trans] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[*] identifier[scale] operator[SEP] } } }