code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static void write2File(final String inputFile, final String outputFile) throws FileNotFoundException, IOException { try (FileInputStream fis = new FileInputStream(inputFile); FileOutputStream fos = new FileOutputStream(outputFile); BufferedInputStream bis = new BufferedInputStream(fis); BufferedOutputStream bos = new BufferedOutputStream(fos);) { StreamExtensions.writeInputStreamToOutputStream(bis, bos); } }
class class_name[name] begin[{] method[write2File, return_type[void], modifier[public static], parameter[inputFile, outputFile]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeInputStreamToOutputStream, postfix_operators=[], prefix_operators=[], qualifier=StreamExtensions, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=fis, type=ReferenceType(arguments=None, dimensions=[], name=FileInputStream, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=inputFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileInputStream, sub_type=None))), TryResource(annotations=[], modifiers=set(), name=fos, type=ReferenceType(arguments=None, dimensions=[], name=FileOutputStream, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=outputFile, 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=FileOutputStream, sub_type=None))), TryResource(annotations=[], modifiers=set(), name=bis, type=ReferenceType(arguments=None, dimensions=[], name=BufferedInputStream, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=fis, 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=BufferedInputStream, sub_type=None))), TryResource(annotations=[], modifiers=set(), name=bos, type=ReferenceType(arguments=None, dimensions=[], name=BufferedOutputStream, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=fos, 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=BufferedOutputStream, sub_type=None)))]) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[write2File] operator[SEP] Keyword[final] identifier[String] identifier[inputFile] , Keyword[final] identifier[String] identifier[outputFile] operator[SEP] Keyword[throws] identifier[FileNotFoundException] , identifier[IOException] { Keyword[try] operator[SEP] identifier[FileInputStream] identifier[fis] operator[=] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[inputFile] operator[SEP] operator[SEP] identifier[FileOutputStream] identifier[fos] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[outputFile] operator[SEP] operator[SEP] identifier[BufferedInputStream] identifier[bis] operator[=] Keyword[new] identifier[BufferedInputStream] operator[SEP] identifier[fis] operator[SEP] operator[SEP] identifier[BufferedOutputStream] identifier[bos] operator[=] Keyword[new] identifier[BufferedOutputStream] operator[SEP] identifier[fos] operator[SEP] operator[SEP] operator[SEP] { identifier[StreamExtensions] operator[SEP] identifier[writeInputStreamToOutputStream] operator[SEP] identifier[bis] , identifier[bos] operator[SEP] operator[SEP] } }
public static void numberToBytes(int number, byte[] buffer, int start, int length) { for (int index = start + length - 1; index >= start; index--) { buffer[index] = (byte)(number & 0xff); number = number >> 8; } }
class class_name[name] begin[{] method[numberToBytes, return_type[void], modifier[public static], parameter[number, buffer, start, length]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=BinaryOperation(operandl=MemberReference(member=number, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=byte))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=number, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=number, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=index, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[numberToBytes] operator[SEP] Keyword[int] identifier[number] , Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] , Keyword[int] identifier[start] , Keyword[int] identifier[length] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[index] operator[=] identifier[start] operator[+] identifier[length] operator[-] Other[1] operator[SEP] identifier[index] operator[>=] identifier[start] operator[SEP] identifier[index] operator[--] operator[SEP] { identifier[buffer] operator[SEP] identifier[index] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[number] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[number] operator[=] identifier[number] operator[>] operator[>] Other[8] operator[SEP] } }
public void service( final WebdavRequest req, final WebdavResponse resp ) throws WebdavException, IOException { final String methodName = req.getMethod(); ITransaction transaction = null; boolean needRollback = false; if ( LOG.isTraceEnabled() ) { debugRequest( methodName, req ); } try { final Principal userPrincipal = req.getUserPrincipal(); transaction = store.begin( userPrincipal ); needRollback = true; store.checkAuthentication( transaction ); resp.setStatus( WebdavStatus.SC_OK ); WebdavMethod methodExecutor = null; try { methodExecutor = _methodMap.get( methodName ); if ( methodExecutor == null ) { methodExecutor = _methodMap.get( "*NO*IMPL*" ); } LOG.info( "Executing: " + methodExecutor.getClass() .getSimpleName() ); methodExecutor.execute( transaction, req, resp ); store.commit( transaction ); needRollback = false; } catch ( final IOException e ) { final java.io.StringWriter sw = new java.io.StringWriter(); final java.io.PrintWriter pw = new java.io.PrintWriter( sw ); e.printStackTrace( pw ); LOG.error( "IOException: " + sw.toString() ); resp.sendError( WebdavStatus.SC_INTERNAL_SERVER_ERROR ); store.rollback( transaction ); throw new WebdavException( "I/O error executing %s: %s", e, methodExecutor.getClass() .getSimpleName(), e.getMessage() ); } } catch ( final UnauthenticatedException e ) { resp.sendError( WebdavStatus.SC_FORBIDDEN ); } catch ( final WebdavException e ) { final java.io.StringWriter sw = new java.io.StringWriter(); final java.io.PrintWriter pw = new java.io.PrintWriter( sw ); e.printStackTrace( pw ); LOG.error( "WebdavException: " + sw.toString() ); throw e; } catch ( final Exception e ) { final java.io.StringWriter sw = new java.io.StringWriter(); final java.io.PrintWriter pw = new java.io.PrintWriter( sw ); e.printStackTrace( pw ); LOG.error( "Exception: " + sw.toString() ); } finally { if ( needRollback ) { store.rollback( transaction ); } } }
class class_name[name] begin[{] method[service, return_type[void], modifier[public], parameter[req, resp]] begin[{] local_variable[type[String], methodName] local_variable[type[ITransaction], transaction] local_variable[type[boolean], needRollback] if[call[LOG.isTraceEnabled, parameter[]]] begin[{] call[.debugRequest, parameter[member[.methodName], member[.req]]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getUserPrincipal, postfix_operators=[], prefix_operators=[], qualifier=req, selectors=[], type_arguments=None), name=userPrincipal)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Principal, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=userPrincipal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=begin, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=needRollback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkAuthentication, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_OK, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=setStatus, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=methodExecutor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WebdavMethod, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=methodExecutor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=_methodMap, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=methodExecutor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=methodExecutor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="*NO*IMPL*")], member=get, postfix_operators=[], prefix_operators=[], qualifier=_methodMap, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Executing: "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=methodExecutor, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execute, postfix_operators=[], prefix_operators=[], qualifier=methodExecutor, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=commit, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=needRollback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=StringWriter, sub_type=None)))), name=sw)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=StringWriter, sub_type=None)))), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=sw, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=PrintWriter, sub_type=None)))), name=pw)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=PrintWriter, sub_type=None)))), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="IOException: "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sw, selectors=[], type_arguments=None), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_INTERNAL_SERVER_ERROR, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rollback, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="I/O error executing %s: %s"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=methodExecutor, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WebdavException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SC_FORBIDDEN, postfix_operators=[], prefix_operators=[], qualifier=WebdavStatus, selectors=[])], member=sendError, postfix_operators=[], prefix_operators=[], qualifier=resp, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnauthenticatedException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=StringWriter, sub_type=None)))), name=sw)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=StringWriter, sub_type=None)))), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=sw, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=PrintWriter, sub_type=None)))), name=pw)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=PrintWriter, sub_type=None)))), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WebdavException: "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sw, selectors=[], type_arguments=None), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], 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=['WebdavException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=StringWriter, sub_type=None)))), name=sw)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=StringWriter, sub_type=None)))), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=sw, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=PrintWriter, sub_type=None)))), name=pw)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=PrintWriter, sub_type=None)))), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception: "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sw, selectors=[], type_arguments=None), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[IfStatement(condition=MemberReference(member=needRollback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rollback, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[service] operator[SEP] Keyword[final] identifier[WebdavRequest] identifier[req] , Keyword[final] identifier[WebdavResponse] identifier[resp] operator[SEP] Keyword[throws] identifier[WebdavException] , identifier[IOException] { Keyword[final] identifier[String] identifier[methodName] operator[=] identifier[req] operator[SEP] identifier[getMethod] operator[SEP] operator[SEP] operator[SEP] identifier[ITransaction] identifier[transaction] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[needRollback] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isTraceEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[debugRequest] operator[SEP] identifier[methodName] , identifier[req] operator[SEP] operator[SEP] } Keyword[try] { Keyword[final] identifier[Principal] identifier[userPrincipal] operator[=] identifier[req] operator[SEP] identifier[getUserPrincipal] operator[SEP] operator[SEP] operator[SEP] identifier[transaction] operator[=] identifier[store] operator[SEP] identifier[begin] operator[SEP] identifier[userPrincipal] operator[SEP] operator[SEP] identifier[needRollback] operator[=] literal[boolean] operator[SEP] identifier[store] operator[SEP] identifier[checkAuthentication] operator[SEP] identifier[transaction] operator[SEP] operator[SEP] identifier[resp] operator[SEP] identifier[setStatus] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_OK] operator[SEP] operator[SEP] identifier[WebdavMethod] identifier[methodExecutor] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[methodExecutor] operator[=] identifier[_methodMap] operator[SEP] identifier[get] operator[SEP] identifier[methodName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[methodExecutor] operator[==] Other[null] operator[SEP] { identifier[methodExecutor] operator[=] identifier[_methodMap] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[methodExecutor] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[methodExecutor] operator[SEP] identifier[execute] operator[SEP] identifier[transaction] , identifier[req] , identifier[resp] operator[SEP] operator[SEP] identifier[store] operator[SEP] identifier[commit] operator[SEP] identifier[transaction] operator[SEP] operator[SEP] identifier[needRollback] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[e] operator[SEP] { Keyword[final] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[StringWriter] identifier[sw] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[StringWriter] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[PrintWriter] identifier[pw] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[PrintWriter] operator[SEP] identifier[sw] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] identifier[pw] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[sw] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_INTERNAL_SERVER_ERROR] operator[SEP] operator[SEP] identifier[store] operator[SEP] identifier[rollback] operator[SEP] identifier[transaction] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[WebdavException] operator[SEP] literal[String] , identifier[e] , identifier[methodExecutor] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[UnauthenticatedException] identifier[e] operator[SEP] { identifier[resp] operator[SEP] identifier[sendError] operator[SEP] identifier[WebdavStatus] operator[SEP] identifier[SC_FORBIDDEN] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[WebdavException] identifier[e] operator[SEP] { Keyword[final] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[StringWriter] identifier[sw] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[StringWriter] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[PrintWriter] identifier[pw] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[PrintWriter] operator[SEP] identifier[sw] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] identifier[pw] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[sw] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] { Keyword[final] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[StringWriter] identifier[sw] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[StringWriter] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[PrintWriter] identifier[pw] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[PrintWriter] operator[SEP] identifier[sw] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] identifier[pw] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[sw] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[needRollback] operator[SEP] { identifier[store] operator[SEP] identifier[rollback] operator[SEP] identifier[transaction] operator[SEP] operator[SEP] } } }
@Override public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) { return cpTaxCategoryPersistence.findWithDynamicQuery(dynamicQuery); }
class class_name[name] begin[{] method[dynamicQuery, return_type[type[List]], modifier[public], parameter[dynamicQuery]] begin[{] return[call[cpTaxCategoryPersistence.findWithDynamicQuery, parameter[member[.dynamicQuery]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[dynamicQuery] operator[SEP] identifier[DynamicQuery] identifier[dynamicQuery] operator[SEP] { Keyword[return] identifier[cpTaxCategoryPersistence] operator[SEP] identifier[findWithDynamicQuery] operator[SEP] identifier[dynamicQuery] operator[SEP] operator[SEP] }
private void cleanConnectionClose(Connection connection, Statement stmt) { try { // clean close if (connection != null) { connection.rollback(); } if (stmt != null) { stmt.close(); } if (connection != null) { connection.close(); } } catch (SQLException e1) { e1.printStackTrace(); } }
class class_name[name] begin[{] method[cleanConnectionClose, return_type[void], modifier[private], parameter[connection, stmt]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=rollback, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=stmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=stmt, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e1, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e1, types=['SQLException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[cleanConnectionClose] operator[SEP] identifier[Connection] identifier[connection] , identifier[Statement] identifier[stmt] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[connection] operator[!=] Other[null] operator[SEP] { identifier[connection] operator[SEP] identifier[rollback] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[stmt] operator[!=] Other[null] operator[SEP] { identifier[stmt] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[connection] operator[!=] Other[null] operator[SEP] { identifier[connection] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e1] operator[SEP] { identifier[e1] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } }
public <V> String get(String url, Map<String, V> params) throws AuthenticationException, ApiException { return performRequest(url, "GET", params, null, null); }
class class_name[name] begin[{] method[get, return_type[type[String]], modifier[public], parameter[url, params]] begin[{] return[call[.performRequest, parameter[member[.url], literal["GET"], member[.params], literal[null], literal[null]]]] end[}] END[}]
Keyword[public] operator[<] identifier[V] operator[>] identifier[String] identifier[get] operator[SEP] identifier[String] identifier[url] , identifier[Map] operator[<] identifier[String] , identifier[V] operator[>] identifier[params] operator[SEP] Keyword[throws] identifier[AuthenticationException] , identifier[ApiException] { Keyword[return] identifier[performRequest] operator[SEP] identifier[url] , literal[String] , identifier[params] , Other[null] , Other[null] operator[SEP] operator[SEP] }
public static base_response delete(nitro_service client, String ipv6prefix) throws Exception { onlinkipv6prefix deleteresource = new onlinkipv6prefix(); deleteresource.ipv6prefix = ipv6prefix; return deleteresource.delete_resource(client); }
class class_name[name] begin[{] method[delete, return_type[type[base_response]], modifier[public static], parameter[client, ipv6prefix]] begin[{] local_variable[type[onlinkipv6prefix], deleteresource] assign[member[deleteresource.ipv6prefix], member[.ipv6prefix]] return[call[deleteresource.delete_resource, parameter[member[.client]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[delete] operator[SEP] identifier[nitro_service] identifier[client] , identifier[String] identifier[ipv6prefix] operator[SEP] Keyword[throws] identifier[Exception] { identifier[onlinkipv6prefix] identifier[deleteresource] operator[=] Keyword[new] identifier[onlinkipv6prefix] operator[SEP] operator[SEP] operator[SEP] identifier[deleteresource] operator[SEP] identifier[ipv6prefix] operator[=] identifier[ipv6prefix] operator[SEP] Keyword[return] identifier[deleteresource] operator[SEP] identifier[delete_resource] operator[SEP] identifier[client] operator[SEP] operator[SEP] }
protected synchronized void invoke() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "invoke"); try { // Pass details to implementor's conversation receive listener. if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) JFapUtils.debugTraceWsByteBuffer(this, tc, data, 16, "data passed to dataReceived method"); listener.dataReceived(data, segmentType, requestNumber, priority, allocatedFromPool, partOfExchange, conversation); } catch(Throwable t) { FFDCFilter.processException (t, "com.ibm.ws.sib.jfapchannel.impl.rldispatcher.ReceiveListenerDataReceivedInvocation", JFapChannelConstants.RLDATARECEIVEDINVOKE_INVOKE_01); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "exception thrown by dataReceived"); if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.exception(this, tc, t); // User has thrown an exception from data received method. Probably // the best way to deal with this is to invalidate their connection. // That'll learn 'em. connection.invalidate(true, t, "exception thrown by dataReceived - "+t.getLocalizedMessage()); // D224570 } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "invoke"); }
class class_name[name] begin[{] method[invoke, return_type[void], modifier[synchronized protected], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["invoke"]]] else begin[{] None end[}] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="data passed to dataReceived method")], member=debugTraceWsByteBuffer, postfix_operators=[], prefix_operators=[], qualifier=JFapUtils, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=segmentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=priority, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=allocatedFromPool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=partOfExchange, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conversation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=dataReceived, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.jfapchannel.impl.rldispatcher.ReceiveListenerDataReceivedInvocation"), MemberReference(member=RLDATARECEIVEDINVOKE_INVOKE_01, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="exception thrown by dataReceived")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="exception thrown by dataReceived - "), operandr=MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), operator=+)], member=invalidate, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["invoke"]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[synchronized] Keyword[void] identifier[invoke] 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[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[try] { 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[JFapUtils] operator[SEP] identifier[debugTraceWsByteBuffer] operator[SEP] Keyword[this] , identifier[tc] , identifier[data] , Other[16] , literal[String] operator[SEP] operator[SEP] identifier[listener] operator[SEP] identifier[dataReceived] operator[SEP] identifier[data] , identifier[segmentType] , identifier[requestNumber] , identifier[priority] , identifier[allocatedFromPool] , identifier[partOfExchange] , identifier[conversation] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[t] , literal[String] , identifier[JFapChannelConstants] operator[SEP] identifier[RLDATARECEIVEDINVOKE_INVOKE_01] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] Keyword[this] , identifier[tc] , identifier[t] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[invalidate] operator[SEP] literal[boolean] , identifier[t] , literal[String] operator[+] identifier[t] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public static String permissionTargetIdForPortletDefinition( final IPortletDefinition portletDefinition) { Validate.notNull( portletDefinition, "Cannot compute permission target ID for a null portlet definition."); final String portletPublicationId = portletDefinition.getPortletDefinitionId().getStringId(); return IPermission.PORTLET_PREFIX.concat(portletPublicationId); }
class class_name[name] begin[{] method[permissionTargetIdForPortletDefinition, return_type[type[String]], modifier[public static], parameter[portletDefinition]] begin[{] call[Validate.notNull, parameter[member[.portletDefinition], literal["Cannot compute permission target ID for a null portlet definition."]]] local_variable[type[String], portletPublicationId] return[call[IPermission.PORTLET_PREFIX.concat, parameter[member[.portletPublicationId]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[permissionTargetIdForPortletDefinition] operator[SEP] Keyword[final] identifier[IPortletDefinition] identifier[portletDefinition] operator[SEP] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[portletDefinition] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[portletPublicationId] operator[=] identifier[portletDefinition] operator[SEP] identifier[getPortletDefinitionId] operator[SEP] operator[SEP] operator[SEP] identifier[getStringId] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[IPermission] operator[SEP] identifier[PORTLET_PREFIX] operator[SEP] identifier[concat] operator[SEP] identifier[portletPublicationId] operator[SEP] operator[SEP] }
public static Object getUIOfType(ComponentUI ui, Class klass) { if (klass.isInstance(ui)) { return ui; } return null; }
class class_name[name] begin[{] method[getUIOfType, return_type[type[Object]], modifier[public static], parameter[ui, klass]] begin[{] if[call[klass.isInstance, parameter[member[.ui]]]] begin[{] return[member[.ui]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[getUIOfType] operator[SEP] identifier[ComponentUI] identifier[ui] , identifier[Class] identifier[klass] operator[SEP] { Keyword[if] operator[SEP] identifier[klass] operator[SEP] identifier[isInstance] operator[SEP] identifier[ui] operator[SEP] operator[SEP] { Keyword[return] identifier[ui] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static base_response update(nitro_service client, nsspparams resource) throws Exception { nsspparams updateresource = new nsspparams(); updateresource.basethreshold = resource.basethreshold; updateresource.throttle = resource.throttle; return updateresource.update_resource(client); }
class class_name[name] begin[{] method[update, return_type[type[base_response]], modifier[public static], parameter[client, resource]] begin[{] local_variable[type[nsspparams], updateresource] assign[member[updateresource.basethreshold], member[resource.basethreshold]] assign[member[updateresource.throttle], member[resource.throttle]] return[call[updateresource.update_resource, parameter[member[.client]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[update] operator[SEP] identifier[nitro_service] identifier[client] , identifier[nsspparams] identifier[resource] operator[SEP] Keyword[throws] identifier[Exception] { identifier[nsspparams] identifier[updateresource] operator[=] Keyword[new] identifier[nsspparams] operator[SEP] operator[SEP] operator[SEP] identifier[updateresource] operator[SEP] identifier[basethreshold] operator[=] identifier[resource] operator[SEP] identifier[basethreshold] operator[SEP] identifier[updateresource] operator[SEP] identifier[throttle] operator[=] identifier[resource] operator[SEP] identifier[throttle] operator[SEP] Keyword[return] identifier[updateresource] operator[SEP] identifier[update_resource] operator[SEP] identifier[client] operator[SEP] operator[SEP] }
public void setXYZ(Point3D pt) { _touch(); boolean bHasZ = hasAttribute(Semantics.Z); if (!bHasZ && !VertexDescription.isDefaultValue(Semantics.Z, pt.z)) {// add // Z // only // if // pt.z // is // not // a // default // value. addAttribute(Semantics.Z); bHasZ = true; } if (m_attributes == null) _setToDefault(); m_attributes[0] = pt.x; m_attributes[1] = pt.y; if (bHasZ) m_attributes[2] = pt.z; }
class class_name[name] begin[{] method[setXYZ, return_type[void], modifier[public], parameter[pt]] begin[{] call[._touch, parameter[]] local_variable[type[boolean], bHasZ] if[binary_operation[member[.bHasZ], &&, call[VertexDescription.isDefaultValue, parameter[member[Semantics.Z], member[pt.z]]]]] begin[{] call[.addAttribute, parameter[member[Semantics.Z]]] assign[member[.bHasZ], literal[true]] else begin[{] None end[}] if[binary_operation[member[.m_attributes], ==, literal[null]]] begin[{] call[._setToDefault, parameter[]] else begin[{] None end[}] assign[member[.m_attributes], member[pt.x]] assign[member[.m_attributes], member[pt.y]] if[member[.bHasZ]] begin[{] assign[member[.m_attributes], member[pt.z]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setXYZ] operator[SEP] identifier[Point3D] identifier[pt] operator[SEP] { identifier[_touch] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[bHasZ] operator[=] identifier[hasAttribute] operator[SEP] identifier[Semantics] operator[SEP] identifier[Z] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[bHasZ] operator[&&] operator[!] identifier[VertexDescription] operator[SEP] identifier[isDefaultValue] operator[SEP] identifier[Semantics] operator[SEP] identifier[Z] , identifier[pt] operator[SEP] identifier[z] operator[SEP] operator[SEP] { identifier[addAttribute] operator[SEP] identifier[Semantics] operator[SEP] identifier[Z] operator[SEP] operator[SEP] identifier[bHasZ] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[m_attributes] operator[==] Other[null] operator[SEP] identifier[_setToDefault] operator[SEP] operator[SEP] operator[SEP] identifier[m_attributes] operator[SEP] Other[0] operator[SEP] operator[=] identifier[pt] operator[SEP] identifier[x] operator[SEP] identifier[m_attributes] operator[SEP] Other[1] operator[SEP] operator[=] identifier[pt] operator[SEP] identifier[y] operator[SEP] Keyword[if] operator[SEP] identifier[bHasZ] operator[SEP] identifier[m_attributes] operator[SEP] Other[2] operator[SEP] operator[=] identifier[pt] operator[SEP] identifier[z] operator[SEP] }
private void cleanUp(File f) { if (f != null && f.getParentFile() != null) { if (m_absoluteTempPath.equalsIgnoreCase(f .getParentFile().getAbsolutePath())) { f.delete(); } } }
class class_name[name] begin[{] method[cleanUp, return_type[void], modifier[private], parameter[f]] begin[{] if[binary_operation[binary_operation[member[.f], !=, literal[null]], &&, binary_operation[call[f.getParentFile, parameter[]], !=, literal[null]]]] begin[{] if[call[m_absoluteTempPath.equalsIgnoreCase, parameter[call[f.getParentFile, parameter[]]]]] begin[{] call[f.delete, parameter[]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[cleanUp] operator[SEP] identifier[File] identifier[f] operator[SEP] { Keyword[if] operator[SEP] identifier[f] operator[!=] Other[null] operator[&&] identifier[f] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[m_absoluteTempPath] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[f] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[f] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] } } }
public void setNameConverter(NameConverter nameConverter) { this.nameConverter = nameConverter; this.sqlExecutor.setNameConverter(nameConverter); this.callExecutor.setNameConverter(nameConverter); }
class class_name[name] begin[{] method[setNameConverter, return_type[void], modifier[public], parameter[nameConverter]] begin[{] assign[THIS[member[None.nameConverter]], member[.nameConverter]] THIS[member[None.sqlExecutor]call[None.setNameConverter, parameter[member[.nameConverter]]]] THIS[member[None.callExecutor]call[None.setNameConverter, parameter[member[.nameConverter]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setNameConverter] operator[SEP] identifier[NameConverter] identifier[nameConverter] operator[SEP] { Keyword[this] operator[SEP] identifier[nameConverter] operator[=] identifier[nameConverter] operator[SEP] Keyword[this] operator[SEP] identifier[sqlExecutor] operator[SEP] identifier[setNameConverter] operator[SEP] identifier[nameConverter] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[callExecutor] operator[SEP] identifier[setNameConverter] operator[SEP] identifier[nameConverter] operator[SEP] operator[SEP] }
public void setVastRedirectType(com.google.api.ads.admanager.axis.v201811.VastRedirectType vastRedirectType) { this.vastRedirectType = vastRedirectType; }
class class_name[name] begin[{] method[setVastRedirectType, return_type[void], modifier[public], parameter[vastRedirectType]] begin[{] assign[THIS[member[None.vastRedirectType]], member[.vastRedirectType]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setVastRedirectType] operator[SEP] 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[v201811] operator[SEP] identifier[VastRedirectType] identifier[vastRedirectType] operator[SEP] { Keyword[this] operator[SEP] identifier[vastRedirectType] operator[=] identifier[vastRedirectType] operator[SEP] }
public Map<String,List<String>> getRequestProperties() { if (connected) throw new IllegalStateException("Already connected"); if (requests == null) return Collections.EMPTY_MAP; return requests.getHeaders(null); }
class class_name[name] begin[{] method[getRequestProperties, return_type[type[Map]], modifier[public], parameter[]] begin[{] if[member[.connected]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Already connected")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.requests], ==, literal[null]]] begin[{] return[member[Collections.EMPTY_MAP]] else begin[{] None end[}] return[call[requests.getHeaders, parameter[literal[null]]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[String] operator[>] operator[>] identifier[getRequestProperties] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[connected] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[requests] operator[==] Other[null] operator[SEP] Keyword[return] identifier[Collections] operator[SEP] identifier[EMPTY_MAP] operator[SEP] Keyword[return] identifier[requests] operator[SEP] identifier[getHeaders] operator[SEP] Other[null] operator[SEP] operator[SEP] }
@Pure public static double toESRI(double value) { return (Double.isInfinite(value) || Double.isNaN(value)) ? ESRI_NAN : value; }
class class_name[name] begin[{] method[toESRI, return_type[type[double]], modifier[public static], parameter[value]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInfinite, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNaN, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), operator=||), if_false=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=ESRI_NAN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
annotation[@] identifier[Pure] Keyword[public] Keyword[static] Keyword[double] identifier[toESRI] operator[SEP] Keyword[double] identifier[value] operator[SEP] { Keyword[return] operator[SEP] identifier[Double] operator[SEP] identifier[isInfinite] operator[SEP] identifier[value] operator[SEP] operator[||] identifier[Double] operator[SEP] identifier[isNaN] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[?] identifier[ESRI_NAN] operator[:] identifier[value] operator[SEP] }
protected static <T> Filter<T> compose(Filter<T> filterOne, LogicalOperator op, Filter<T> filterTwo) { return filterOne == null ? filterTwo : (filterTwo == null ? filterOne : new ComposableFilter<>(filterOne, op, filterTwo)); }
class class_name[name] begin[{] method[compose, return_type[type[Filter]], modifier[static protected], parameter[filterOne, op, filterTwo]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=filterOne, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=filterTwo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=ClassCreator(arguments=[MemberReference(member=filterOne, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filterTwo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ComposableFilter, sub_type=None)), if_true=MemberReference(member=filterOne, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), if_true=MemberReference(member=filterTwo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[protected] Keyword[static] operator[<] identifier[T] operator[>] identifier[Filter] operator[<] identifier[T] operator[>] identifier[compose] operator[SEP] identifier[Filter] operator[<] identifier[T] operator[>] identifier[filterOne] , identifier[LogicalOperator] identifier[op] , identifier[Filter] operator[<] identifier[T] operator[>] identifier[filterTwo] operator[SEP] { Keyword[return] identifier[filterOne] operator[==] Other[null] operator[?] identifier[filterTwo] operator[:] operator[SEP] identifier[filterTwo] operator[==] Other[null] operator[?] identifier[filterOne] operator[:] Keyword[new] identifier[ComposableFilter] operator[<] operator[>] operator[SEP] identifier[filterOne] , identifier[op] , identifier[filterTwo] operator[SEP] operator[SEP] operator[SEP] }
private static void resolveDependencies(Collection<ArtifactSpec> collection, ShrinkwrapArtifactResolvingHelper helper) { // Identify the artifact specs that need resolution. // Ideally, there should be none at this point. collection.forEach(spec -> { if (spec.file == null) { // Resolve it. ArtifactSpec resolved = helper.resolve(spec); if (resolved != null) { spec.file = resolved.file; } else { throw new IllegalStateException("Unable to resolve artifact: " + spec.toString()); } } }); }
class class_name[name] begin[{] method[resolveDependencies, return_type[void], modifier[private static], parameter[collection, helper]] begin[{] call[collection.forEach, parameter[LambdaExpression(body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=spec, 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=[MemberReference(member=spec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolve, postfix_operators=[], prefix_operators=[], qualifier=helper, selectors=[], type_arguments=None), name=resolved)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ArtifactSpec, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=resolved, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to resolve artifact: "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=spec, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=spec, selectors=[]), type==, value=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=resolved, selectors=[])), label=None)]))]))], parameters=[MemberReference(member=spec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[resolveDependencies] operator[SEP] identifier[Collection] operator[<] identifier[ArtifactSpec] operator[>] identifier[collection] , identifier[ShrinkwrapArtifactResolvingHelper] identifier[helper] operator[SEP] { identifier[collection] operator[SEP] identifier[forEach] operator[SEP] identifier[spec] operator[->] { Keyword[if] operator[SEP] identifier[spec] operator[SEP] identifier[file] operator[==] Other[null] operator[SEP] { identifier[ArtifactSpec] identifier[resolved] operator[=] identifier[helper] operator[SEP] identifier[resolve] operator[SEP] identifier[spec] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resolved] operator[!=] Other[null] operator[SEP] { identifier[spec] operator[SEP] identifier[file] operator[=] identifier[resolved] operator[SEP] identifier[file] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[spec] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public final void mT__82() throws RecognitionException { try { int _type = T__82; int _channel = DEFAULT_TOKEN_CHANNEL; // InternalSARL.g:68:7: ( '<>' ) // InternalSARL.g:68:9: '<>' { match("<>"); } state.type = _type; state.channel = _channel; } finally { } }
class class_name[name] begin[{] method[mT__82, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=T__82, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_type)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=DEFAULT_TOKEN_CHANNEL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_channel)], modifiers=set(), type=BasicType(dimensions=[], name=int)), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<>")], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=None, finally_block=[], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[mT__82] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { Keyword[int] identifier[_type] operator[=] identifier[T__82] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKEN_CHANNEL] operator[SEP] { identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[state] operator[SEP] identifier[type] operator[=] identifier[_type] operator[SEP] identifier[state] operator[SEP] identifier[channel] operator[=] identifier[_channel] operator[SEP] } Keyword[finally] { } }
public static void addCells(StringBuilder builder, String... cells) { if(builder == null || cells == null || cells.length == 0) return; for (String cell : cells) { addCell(builder,cell); } }
class class_name[name] begin[{] method[addCells, return_type[void], modifier[public static], parameter[builder, cells]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.builder], ==, literal[null]], ||, binary_operation[member[.cells], ==, literal[null]]], ||, binary_operation[member[cells.length], ==, literal[0]]]] begin[{] return[None] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cell, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addCell, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=cells, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cell)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[addCells] operator[SEP] identifier[StringBuilder] identifier[builder] , identifier[String] operator[...] identifier[cells] operator[SEP] { Keyword[if] operator[SEP] identifier[builder] operator[==] Other[null] operator[||] identifier[cells] operator[==] Other[null] operator[||] identifier[cells] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] Keyword[return] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[cell] operator[:] identifier[cells] operator[SEP] { identifier[addCell] operator[SEP] identifier[builder] , identifier[cell] operator[SEP] operator[SEP] } }
protected boolean _requeueWithRetries(Connection conn, IQueueMessage<ID, DATA> msg, int numRetries, int maxRetries) { try { jdbcHelper.startTransaction(conn); conn.setTransactionIsolation(transactionIsolationLevel); if (!isEphemeralDisabled()) { removeFromEphemeralStorage(conn, msg); } Date now = new Date(); msg.incNumRequeues().setQueueTimestamp(now); boolean result = putToQueueStorage(conn, msg); jdbcHelper.commitTransaction(conn); return result; } catch (DuplicatedValueException dve) { jdbcHelper.rollbackTransaction(conn); LOGGER.warn(dve.getMessage(), dve); return true; } catch (DaoException de) { if (de.getCause() instanceof DuplicateKeyException) { jdbcHelper.rollbackTransaction(conn); LOGGER.warn(de.getMessage(), de); return true; } if (de.getCause() instanceof ConcurrencyFailureException) { jdbcHelper.rollbackTransaction(conn); if (numRetries > maxRetries) { throw new QueueException(de); } else { /* * call _requeueSilentWithRetries(...) here is correct * because we do not want message's num-requeues is * increased with every retry */ incRetryCounter("_requeueWithRetries"); return _requeueSilentWithRetries(conn, msg, numRetries + 1, maxRetries); } } throw de; } catch (Exception e) { jdbcHelper.rollbackTransaction(conn); throw e instanceof QueueException ? (QueueException) e : new QueueException(e); } }
class class_name[name] begin[{] method[_requeueWithRetries, return_type[type[boolean]], modifier[protected], parameter[conn, msg, numRetries, maxRetries]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startTransaction, postfix_operators=[], prefix_operators=[], qualifier=jdbcHelper, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transactionIsolationLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setTransactionIsolation, postfix_operators=[], prefix_operators=[], qualifier=conn, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isEphemeralDisabled, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeFromEphemeralStorage, postfix_operators=[], prefix_operators=[], qualifier=, 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=Date, sub_type=None)), name=now)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=incNumRequeues, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[MethodInvocation(arguments=[MemberReference(member=now, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setQueueTimestamp, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=putToQueueStorage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=commitTransaction, postfix_operators=[], prefix_operators=[], qualifier=jdbcHelper, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rollbackTransaction, postfix_operators=[], prefix_operators=[], qualifier=jdbcHelper, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=dve, selectors=[], type_arguments=None), MemberReference(member=dve, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=dve, types=['DuplicatedValueException'])), CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=de, selectors=[], type_arguments=None), operandr=ReferenceType(arguments=None, dimensions=[], name=DuplicateKeyException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rollbackTransaction, postfix_operators=[], prefix_operators=[], qualifier=jdbcHelper, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=de, selectors=[], type_arguments=None), MemberReference(member=de, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=de, selectors=[], type_arguments=None), operandr=ReferenceType(arguments=None, dimensions=[], name=ConcurrencyFailureException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rollbackTransaction, postfix_operators=[], prefix_operators=[], qualifier=jdbcHelper, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=numRetries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=maxRetries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="_requeueWithRetries")], member=incRetryCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=numRetries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=maxRetries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=_requeueSilentWithRetries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=de, 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=QueueException, sub_type=None)), label=None)]))])), ThrowStatement(expression=MemberReference(member=de, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=de, types=['DaoException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rollbackTransaction, postfix_operators=[], prefix_operators=[], qualifier=jdbcHelper, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=QueueException, sub_type=None), operator=instanceof), if_false=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=QueueException, sub_type=None)), if_true=Cast(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=QueueException, 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[protected] Keyword[boolean] identifier[_requeueWithRetries] operator[SEP] identifier[Connection] identifier[conn] , identifier[IQueueMessage] operator[<] identifier[ID] , identifier[DATA] operator[>] identifier[msg] , Keyword[int] identifier[numRetries] , Keyword[int] identifier[maxRetries] operator[SEP] { Keyword[try] { identifier[jdbcHelper] operator[SEP] identifier[startTransaction] operator[SEP] identifier[conn] operator[SEP] operator[SEP] identifier[conn] operator[SEP] identifier[setTransactionIsolation] operator[SEP] identifier[transactionIsolationLevel] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isEphemeralDisabled] operator[SEP] operator[SEP] operator[SEP] { identifier[removeFromEphemeralStorage] operator[SEP] identifier[conn] , identifier[msg] operator[SEP] operator[SEP] } identifier[Date] identifier[now] operator[=] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[incNumRequeues] operator[SEP] operator[SEP] operator[SEP] identifier[setQueueTimestamp] operator[SEP] identifier[now] operator[SEP] operator[SEP] Keyword[boolean] identifier[result] operator[=] identifier[putToQueueStorage] operator[SEP] identifier[conn] , identifier[msg] operator[SEP] operator[SEP] identifier[jdbcHelper] operator[SEP] identifier[commitTransaction] operator[SEP] identifier[conn] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] } Keyword[catch] operator[SEP] identifier[DuplicatedValueException] identifier[dve] operator[SEP] { identifier[jdbcHelper] operator[SEP] identifier[rollbackTransaction] operator[SEP] identifier[conn] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] identifier[dve] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[dve] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[DaoException] identifier[de] operator[SEP] { Keyword[if] operator[SEP] identifier[de] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] Keyword[instanceof] identifier[DuplicateKeyException] operator[SEP] { identifier[jdbcHelper] operator[SEP] identifier[rollbackTransaction] operator[SEP] identifier[conn] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] identifier[de] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[de] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[de] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] Keyword[instanceof] identifier[ConcurrencyFailureException] operator[SEP] { identifier[jdbcHelper] operator[SEP] identifier[rollbackTransaction] operator[SEP] identifier[conn] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numRetries] operator[>] identifier[maxRetries] operator[SEP] { Keyword[throw] Keyword[new] identifier[QueueException] operator[SEP] identifier[de] operator[SEP] operator[SEP] } Keyword[else] { identifier[incRetryCounter] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[_requeueSilentWithRetries] operator[SEP] identifier[conn] , identifier[msg] , identifier[numRetries] operator[+] Other[1] , identifier[maxRetries] operator[SEP] operator[SEP] } } Keyword[throw] identifier[de] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[jdbcHelper] operator[SEP] identifier[rollbackTransaction] operator[SEP] identifier[conn] operator[SEP] operator[SEP] Keyword[throw] identifier[e] Keyword[instanceof] identifier[QueueException] operator[?] operator[SEP] identifier[QueueException] operator[SEP] identifier[e] operator[:] Keyword[new] identifier[QueueException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public List<CharacterPlanetsResponse> getCharactersCharacterIdPlanets(Integer characterId, String datasource, String ifNoneMatch, String token) throws ApiException { ApiResponse<List<CharacterPlanetsResponse>> resp = getCharactersCharacterIdPlanetsWithHttpInfo(characterId, datasource, ifNoneMatch, token); return resp.getData(); }
class class_name[name] begin[{] method[getCharactersCharacterIdPlanets, return_type[type[List]], modifier[public], parameter[characterId, datasource, ifNoneMatch, token]] begin[{] local_variable[type[ApiResponse], resp] return[call[resp.getData, parameter[]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[CharacterPlanetsResponse] operator[>] identifier[getCharactersCharacterIdPlanets] operator[SEP] identifier[Integer] identifier[characterId] , identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] , identifier[String] identifier[token] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ApiResponse] operator[<] identifier[List] operator[<] identifier[CharacterPlanetsResponse] operator[>] operator[>] identifier[resp] operator[=] identifier[getCharactersCharacterIdPlanetsWithHttpInfo] operator[SEP] identifier[characterId] , identifier[datasource] , identifier[ifNoneMatch] , identifier[token] operator[SEP] operator[SEP] Keyword[return] identifier[resp] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(DeregisterVolumeRequest deregisterVolumeRequest, ProtocolMarshaller protocolMarshaller) { if (deregisterVolumeRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deregisterVolumeRequest.getVolumeId(), VOLUMEID_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[deregisterVolumeRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.deregisterVolumeRequest], ==, 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=getVolumeId, postfix_operators=[], prefix_operators=[], qualifier=deregisterVolumeRequest, selectors=[], type_arguments=None), MemberReference(member=VOLUMEID_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[DeregisterVolumeRequest] identifier[deregisterVolumeRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[deregisterVolumeRequest] 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[deregisterVolumeRequest] operator[SEP] identifier[getVolumeId] operator[SEP] operator[SEP] , identifier[VOLUMEID_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] } }
@BetaApi( "The surface for long-running operations is not stable yet and may change in the future.") public final OperationFuture<LongRunningRecognizeResponse, LongRunningRecognizeMetadata> longRunningRecognizeAsync(RecognitionConfig config, RecognitionAudio audio) { LongRunningRecognizeRequest request = LongRunningRecognizeRequest.newBuilder().setConfig(config).setAudio(audio).build(); return longRunningRecognizeAsync(request); }
class class_name[name] begin[{] method[longRunningRecognizeAsync, return_type[type[OperationFuture]], modifier[final public], parameter[config, audio]] begin[{] local_variable[type[LongRunningRecognizeRequest], request] return[call[.longRunningRecognizeAsync, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[OperationFuture] operator[<] identifier[LongRunningRecognizeResponse] , identifier[LongRunningRecognizeMetadata] operator[>] identifier[longRunningRecognizeAsync] operator[SEP] identifier[RecognitionConfig] identifier[config] , identifier[RecognitionAudio] identifier[audio] operator[SEP] { identifier[LongRunningRecognizeRequest] identifier[request] operator[=] identifier[LongRunningRecognizeRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setConfig] operator[SEP] identifier[config] operator[SEP] operator[SEP] identifier[setAudio] operator[SEP] identifier[audio] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[longRunningRecognizeAsync] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public CMAWebhookHealth health(CMAWebhook webhook) { final String spaceId = getSpaceIdOrThrow(webhook, "webhook"); final String webhookId = getResourceIdOrThrow(webhook, "webhook"); return service.health(spaceId, webhookId).blockingFirst(); }
class class_name[name] begin[{] method[health, return_type[type[CMAWebhookHealth]], modifier[public], parameter[webhook]] begin[{] local_variable[type[String], spaceId] local_variable[type[String], webhookId] return[call[service.health, parameter[member[.spaceId], member[.webhookId]]]] end[}] END[}]
Keyword[public] identifier[CMAWebhookHealth] identifier[health] operator[SEP] identifier[CMAWebhook] identifier[webhook] operator[SEP] { Keyword[final] identifier[String] identifier[spaceId] operator[=] identifier[getSpaceIdOrThrow] operator[SEP] identifier[webhook] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[webhookId] operator[=] identifier[getResourceIdOrThrow] operator[SEP] identifier[webhook] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[service] operator[SEP] identifier[health] operator[SEP] identifier[spaceId] , identifier[webhookId] operator[SEP] operator[SEP] identifier[blockingFirst] operator[SEP] operator[SEP] operator[SEP] }
private IIsotope getIsotope(IIsotope isotope) { for (IIsotope thisIsotope : isotopes()) { if (isTheSame(isotope, thisIsotope)) return thisIsotope; } return null; }
class class_name[name] begin[{] method[getIsotope, return_type[type[IIsotope]], modifier[private], parameter[isotope]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=isotope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=thisIsotope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isTheSame, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=thisIsotope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=isotopes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=thisIsotope)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IIsotope, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[private] identifier[IIsotope] identifier[getIsotope] operator[SEP] identifier[IIsotope] identifier[isotope] operator[SEP] { Keyword[for] operator[SEP] identifier[IIsotope] identifier[thisIsotope] operator[:] identifier[isotopes] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isTheSame] operator[SEP] identifier[isotope] , identifier[thisIsotope] operator[SEP] operator[SEP] Keyword[return] identifier[thisIsotope] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public synchronized void start() throws ManagedProcessException { logger.info("Starting up the database..."); boolean ready = false; try { mysqldProcess = startPreparation(); ready = mysqldProcess.startAndWaitForConsoleMessageMaxMs(getReadyForConnectionsTag(), dbStartMaxWaitInMS); } catch (Exception e) { logger.error("failed to start mysqld", e); throw new ManagedProcessException("An error occurred while starting the database", e); } if (!ready) { if (mysqldProcess.isAlive()) mysqldProcess.destroy(); throw new ManagedProcessException("Database does not seem to have started up correctly? Magic string not seen in " + dbStartMaxWaitInMS + "ms: " + getReadyForConnectionsTag() + mysqldProcess.getLastConsoleLines()); } logger.info("Database startup complete."); }
class class_name[name] begin[{] method[start, return_type[void], modifier[synchronized public], parameter[]] begin[{] call[logger.info, parameter[literal["Starting up the database..."]]] local_variable[type[boolean], ready] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mysqldProcess, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=startPreparation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ready, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getReadyForConnectionsTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=dbStartMaxWaitInMS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startAndWaitForConsoleMessageMaxMs, postfix_operators=[], prefix_operators=[], qualifier=mysqldProcess, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="failed to start mysqld"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An error occurred while starting the database"), 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=ManagedProcessException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[member[.ready]] begin[{] if[call[mysqldProcess.isAlive, parameter[]]] begin[{] call[mysqldProcess.destroy, parameter[]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Database does not seem to have started up correctly? Magic string not seen in "), operandr=MemberReference(member=dbStartMaxWaitInMS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ms: "), operator=+), operandr=MethodInvocation(arguments=[], member=getReadyForConnectionsTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=MethodInvocation(arguments=[], member=getLastConsoleLines, postfix_operators=[], prefix_operators=[], qualifier=mysqldProcess, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ManagedProcessException, sub_type=None)), label=None) else begin[{] None end[}] call[logger.info, parameter[literal["Database startup complete."]]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[start] operator[SEP] operator[SEP] Keyword[throws] identifier[ManagedProcessException] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[boolean] identifier[ready] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[mysqldProcess] operator[=] identifier[startPreparation] operator[SEP] operator[SEP] operator[SEP] identifier[ready] operator[=] identifier[mysqldProcess] operator[SEP] identifier[startAndWaitForConsoleMessageMaxMs] operator[SEP] identifier[getReadyForConnectionsTag] operator[SEP] operator[SEP] , identifier[dbStartMaxWaitInMS] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ManagedProcessException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[ready] operator[SEP] { Keyword[if] operator[SEP] identifier[mysqldProcess] operator[SEP] identifier[isAlive] operator[SEP] operator[SEP] operator[SEP] identifier[mysqldProcess] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ManagedProcessException] operator[SEP] literal[String] operator[+] identifier[dbStartMaxWaitInMS] operator[+] literal[String] operator[+] identifier[getReadyForConnectionsTag] operator[SEP] operator[SEP] operator[+] identifier[mysqldProcess] operator[SEP] identifier[getLastConsoleLines] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public void set( ZMatrixD1 b ) { if( numRows != b.numRows || numCols != b.numCols ) { throw new MatrixDimensionException("The two matrices do not have compatible shapes."); } int dataLength = b.getDataLength(); System.arraycopy(b.data, 0, this.data, 0, dataLength); }
class class_name[name] begin[{] method[set, return_type[void], modifier[public], parameter[b]] begin[{] if[binary_operation[binary_operation[member[.numRows], !=, member[b.numRows]], ||, binary_operation[member[.numCols], !=, member[b.numCols]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The two matrices do not have compatible shapes.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MatrixDimensionException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], dataLength] call[System.arraycopy, parameter[member[b.data], literal[0], THIS[member[None.data]], literal[0], member[.dataLength]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[ZMatrixD1] identifier[b] operator[SEP] { Keyword[if] operator[SEP] identifier[numRows] operator[!=] identifier[b] operator[SEP] identifier[numRows] operator[||] identifier[numCols] operator[!=] identifier[b] operator[SEP] identifier[numCols] operator[SEP] { Keyword[throw] Keyword[new] identifier[MatrixDimensionException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[dataLength] operator[=] identifier[b] operator[SEP] identifier[getDataLength] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[b] operator[SEP] identifier[data] , Other[0] , Keyword[this] operator[SEP] identifier[data] , Other[0] , identifier[dataLength] operator[SEP] operator[SEP] }
public void config(String message, Throwable t) throws NullPointerException, FacilityException { sendNotification(TraceLevel.CONFIG, message, t); logger.info(message,t); }
class class_name[name] begin[{] method[config, return_type[void], modifier[public], parameter[message, t]] begin[{] call[.sendNotification, parameter[member[TraceLevel.CONFIG], member[.message], member[.t]]] call[logger.info, parameter[member[.message], member[.t]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[config] operator[SEP] identifier[String] identifier[message] , identifier[Throwable] identifier[t] operator[SEP] Keyword[throws] identifier[NullPointerException] , identifier[FacilityException] { identifier[sendNotification] operator[SEP] identifier[TraceLevel] operator[SEP] identifier[CONFIG] , identifier[message] , identifier[t] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] identifier[message] , identifier[t] operator[SEP] operator[SEP] }
@BetaApi public final TargetHttpsProxy getTargetHttpsProxy( ProjectGlobalTargetHttpsProxyName targetHttpsProxy) { GetTargetHttpsProxyHttpRequest request = GetTargetHttpsProxyHttpRequest.newBuilder() .setTargetHttpsProxy(targetHttpsProxy == null ? null : targetHttpsProxy.toString()) .build(); return getTargetHttpsProxy(request); }
class class_name[name] begin[{] method[getTargetHttpsProxy, return_type[type[TargetHttpsProxy]], modifier[final public], parameter[targetHttpsProxy]] begin[{] local_variable[type[GetTargetHttpsProxyHttpRequest], request] return[call[.getTargetHttpsProxy, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[TargetHttpsProxy] identifier[getTargetHttpsProxy] operator[SEP] identifier[ProjectGlobalTargetHttpsProxyName] identifier[targetHttpsProxy] operator[SEP] { identifier[GetTargetHttpsProxyHttpRequest] identifier[request] operator[=] identifier[GetTargetHttpsProxyHttpRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setTargetHttpsProxy] operator[SEP] identifier[targetHttpsProxy] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[targetHttpsProxy] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[getTargetHttpsProxy] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static Header exists(final String name) { return new Header(name, "{" + Header.class.getName() + "_value}") { @Override public String toString() { return "Header.exists(\"" + name + "\")"; } }; }
class class_name[name] begin[{] method[exists, return_type[type[Header]], modifier[public static], parameter[name]] begin[{] return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="{"), 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=Header, sub_type=None)), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="_value}"), operator=+)], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Header.exists(\""), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\")"), operator=+), label=None)], documentation=None, modifiers={'public'}, name=toString, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_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=Header, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Header] identifier[exists] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] { Keyword[return] Keyword[new] identifier[Header] operator[SEP] identifier[name] , literal[String] operator[+] identifier[Header] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[toString] operator[SEP] operator[SEP] { Keyword[return] literal[String] operator[+] identifier[name] operator[+] literal[String] operator[SEP] } } operator[SEP] }
public int size() { int ret = anyMethodRouter.size(); for (MethodlessRouter<T> router : routers.values()) { ret += router.size(); } return ret; }
class class_name[name] begin[{] method[size, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[int], ret] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ret, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=router, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=routers, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=router)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=MethodlessRouter, sub_type=None))), label=None) return[member[.ret]] end[}] END[}]
Keyword[public] Keyword[int] identifier[size] operator[SEP] operator[SEP] { Keyword[int] identifier[ret] operator[=] identifier[anyMethodRouter] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[MethodlessRouter] operator[<] identifier[T] operator[>] identifier[router] operator[:] identifier[routers] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[ret] operator[+=] identifier[router] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[ret] operator[SEP] }
public void marshall(UpdateDatastoreRequest updateDatastoreRequest, ProtocolMarshaller protocolMarshaller) { if (updateDatastoreRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateDatastoreRequest.getDatastoreName(), DATASTORENAME_BINDING); protocolMarshaller.marshall(updateDatastoreRequest.getRetentionPeriod(), RETENTIONPERIOD_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[updateDatastoreRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.updateDatastoreRequest], ==, 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=getDatastoreName, postfix_operators=[], prefix_operators=[], qualifier=updateDatastoreRequest, selectors=[], type_arguments=None), MemberReference(member=DATASTORENAME_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=getRetentionPeriod, postfix_operators=[], prefix_operators=[], qualifier=updateDatastoreRequest, selectors=[], type_arguments=None), MemberReference(member=RETENTIONPERIOD_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[UpdateDatastoreRequest] identifier[updateDatastoreRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[updateDatastoreRequest] 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[updateDatastoreRequest] operator[SEP] identifier[getDatastoreName] operator[SEP] operator[SEP] , identifier[DATASTORENAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[updateDatastoreRequest] operator[SEP] identifier[getRetentionPeriod] operator[SEP] operator[SEP] , identifier[RETENTIONPERIOD_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
private synchronized Swift getSwiftClient() throws CStorageException { if ( swiftClient != null ) { return swiftClient; } // Only a single thread should create this client String url = ENDPOINT + "/account/credentials"; RequestInvoker<CResponse> ri = getApiRequestInvoker( new HttpGet( url ) ); JSONObject info = retryStrategy.invokeRetry( ri ).asJSONObject(); swiftClient = new Swift( info.getString( "endpoint" ), info.getString( "token" ), new NoRetryStrategy(), true, // useDirectoryMarkers httpExecutor ); swiftClient.useFirstContainer(); return swiftClient; }
class class_name[name] begin[{] method[getSwiftClient, return_type[type[Swift]], modifier[synchronized private], parameter[]] begin[{] if[binary_operation[member[.swiftClient], !=, literal[null]]] begin[{] return[member[.swiftClient]] else begin[{] None end[}] local_variable[type[String], url] local_variable[type[RequestInvoker], ri] local_variable[type[JSONObject], info] assign[member[.swiftClient], ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="endpoint")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=info, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="token")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=info, selectors=[], type_arguments=None), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoRetryStrategy, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=httpExecutor, 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=Swift, sub_type=None))] call[swiftClient.useFirstContainer, parameter[]] return[member[.swiftClient]] end[}] END[}]
Keyword[private] Keyword[synchronized] identifier[Swift] identifier[getSwiftClient] operator[SEP] operator[SEP] Keyword[throws] identifier[CStorageException] { Keyword[if] operator[SEP] identifier[swiftClient] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[swiftClient] operator[SEP] } identifier[String] identifier[url] operator[=] identifier[ENDPOINT] operator[+] literal[String] operator[SEP] identifier[RequestInvoker] operator[<] identifier[CResponse] operator[>] identifier[ri] operator[=] identifier[getApiRequestInvoker] operator[SEP] Keyword[new] identifier[HttpGet] operator[SEP] identifier[url] operator[SEP] operator[SEP] operator[SEP] identifier[JSONObject] identifier[info] operator[=] identifier[retryStrategy] operator[SEP] identifier[invokeRetry] operator[SEP] identifier[ri] operator[SEP] operator[SEP] identifier[asJSONObject] operator[SEP] operator[SEP] operator[SEP] identifier[swiftClient] operator[=] Keyword[new] identifier[Swift] operator[SEP] identifier[info] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] , identifier[info] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] , Keyword[new] identifier[NoRetryStrategy] operator[SEP] operator[SEP] , literal[boolean] , identifier[httpExecutor] operator[SEP] operator[SEP] identifier[swiftClient] operator[SEP] identifier[useFirstContainer] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[swiftClient] operator[SEP] }
public static Component scan(Component root, ScannerMatcher matcher) { if (matcher.matches(root)) return root; if (!(root instanceof Container)) return null; Container container = (Container) root; for (Component component : container.getComponents()) { Component found = scan(component, matcher); if (found != null) return found; } return null; }
class class_name[name] begin[{] method[scan, return_type[type[Component]], modifier[public static], parameter[root, matcher]] begin[{] if[call[matcher.matches, parameter[member[.root]]]] begin[{] return[member[.root]] else begin[{] None end[}] if[binary_operation[member[.root], instanceof, type[Container]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Container], container] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=matcher, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=scan, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=found)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Component, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getComponents, postfix_operators=[], prefix_operators=[], qualifier=container, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=component)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Component, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Component] identifier[scan] operator[SEP] identifier[Component] identifier[root] , identifier[ScannerMatcher] identifier[matcher] operator[SEP] { Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] identifier[root] operator[SEP] operator[SEP] Keyword[return] identifier[root] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[root] Keyword[instanceof] identifier[Container] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[Container] identifier[container] operator[=] operator[SEP] identifier[Container] operator[SEP] identifier[root] operator[SEP] Keyword[for] operator[SEP] identifier[Component] identifier[component] operator[:] identifier[container] operator[SEP] identifier[getComponents] operator[SEP] operator[SEP] operator[SEP] { identifier[Component] identifier[found] operator[=] identifier[scan] operator[SEP] identifier[component] , identifier[matcher] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[found] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[found] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public CmsSitemapTreeNodeData getData(CmsResource resource) { try { CmsVfsSitemapService svc = new CmsVfsSitemapService(); CmsObject cms = OpenCms.initCmsObject(A_CmsUI.getCmsObject()); cms.getRequestContext().setSiteRoot(""); svc.setCms(cms); CmsClientSitemapEntry ent = svc.getChildren(resource.getRootPath(), resource.getStructureId(), 0); CmsSitemapTreeNodeData data = new CmsSitemapTreeNodeData( m_localeContext.getRootLocale(), m_localeContext.getComparisonLocale()); data.setClientEntry(ent); data.initialize(cms); return data; } catch (Exception e) { LOG.error(e.getLocalizedMessage(), e); return null; } }
class class_name[name] begin[{] method[getData, return_type[type[CmsSitemapTreeNodeData]], modifier[public], parameter[resource]] 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=None, dimensions=None, name=CmsVfsSitemapService, sub_type=None)), name=svc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsVfsSitemapService, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCmsObject, postfix_operators=[], prefix_operators=[], qualifier=A_CmsUI, selectors=[], type_arguments=None)], member=initCmsObject, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[], type_arguments=None), name=cms)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsObject, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getRequestContext, postfix_operators=[], prefix_operators=[], qualifier=cms, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=setSiteRoot, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCms, postfix_operators=[], prefix_operators=[], qualifier=svc, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRootPath, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getStructureId, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=svc, selectors=[], type_arguments=None), name=ent)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsClientSitemapEntry, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getRootLocale, postfix_operators=[], prefix_operators=[], qualifier=m_localeContext, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getComparisonLocale, postfix_operators=[], prefix_operators=[], qualifier=m_localeContext, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmsSitemapTreeNodeData, sub_type=None)), name=data)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsSitemapTreeNodeData, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setClientEntry, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[CmsSitemapTreeNodeData] identifier[getData] operator[SEP] identifier[CmsResource] identifier[resource] operator[SEP] { Keyword[try] { identifier[CmsVfsSitemapService] identifier[svc] operator[=] Keyword[new] identifier[CmsVfsSitemapService] operator[SEP] operator[SEP] operator[SEP] identifier[CmsObject] identifier[cms] operator[=] identifier[OpenCms] operator[SEP] identifier[initCmsObject] operator[SEP] identifier[A_CmsUI] operator[SEP] identifier[getCmsObject] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[cms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[setSiteRoot] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[svc] operator[SEP] identifier[setCms] operator[SEP] identifier[cms] operator[SEP] operator[SEP] identifier[CmsClientSitemapEntry] identifier[ent] operator[=] identifier[svc] operator[SEP] identifier[getChildren] operator[SEP] identifier[resource] operator[SEP] identifier[getRootPath] operator[SEP] operator[SEP] , identifier[resource] operator[SEP] identifier[getStructureId] operator[SEP] operator[SEP] , Other[0] operator[SEP] operator[SEP] identifier[CmsSitemapTreeNodeData] identifier[data] operator[=] Keyword[new] identifier[CmsSitemapTreeNodeData] operator[SEP] identifier[m_localeContext] operator[SEP] identifier[getRootLocale] operator[SEP] operator[SEP] , identifier[m_localeContext] operator[SEP] identifier[getComparisonLocale] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[setClientEntry] operator[SEP] identifier[ent] operator[SEP] operator[SEP] identifier[data] operator[SEP] identifier[initialize] operator[SEP] identifier[cms] operator[SEP] operator[SEP] Keyword[return] identifier[data] 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[getLocalizedMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
public static CacheEventListenerConfigurationBuilder newEventListenerConfiguration( CacheEventListener<?, ?> listener, EventType eventType, EventType... eventTypes){ return new CacheEventListenerConfigurationBuilder(EnumSet.of(eventType, eventTypes), listener); }
class class_name[name] begin[{] method[newEventListenerConfiguration, return_type[type[CacheEventListenerConfigurationBuilder]], modifier[public static], parameter[listener, eventType, eventTypes]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=eventType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=eventTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=EnumSet, selectors=[], type_arguments=None), MemberReference(member=listener, 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=CacheEventListenerConfigurationBuilder, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[CacheEventListenerConfigurationBuilder] identifier[newEventListenerConfiguration] operator[SEP] identifier[CacheEventListener] operator[<] operator[?] , operator[?] operator[>] identifier[listener] , identifier[EventType] identifier[eventType] , identifier[EventType] operator[...] identifier[eventTypes] operator[SEP] { Keyword[return] Keyword[new] identifier[CacheEventListenerConfigurationBuilder] operator[SEP] identifier[EnumSet] operator[SEP] identifier[of] operator[SEP] identifier[eventType] , identifier[eventTypes] operator[SEP] , identifier[listener] operator[SEP] operator[SEP] }
private AtomHandler createAtomRequestHandler(final HttpServletRequest request, final HttpServletResponse response) throws ServletException { final AtomHandlerFactory ahf = AtomHandlerFactory.newInstance(); return ahf.newAtomHandler(request, response); }
class class_name[name] begin[{] method[createAtomRequestHandler, return_type[type[AtomHandler]], modifier[private], parameter[request, response]] begin[{] local_variable[type[AtomHandlerFactory], ahf] return[call[ahf.newAtomHandler, parameter[member[.request], member[.response]]]] end[}] END[}]
Keyword[private] identifier[AtomHandler] identifier[createAtomRequestHandler] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[request] , Keyword[final] identifier[HttpServletResponse] identifier[response] operator[SEP] Keyword[throws] identifier[ServletException] { Keyword[final] identifier[AtomHandlerFactory] identifier[ahf] operator[=] identifier[AtomHandlerFactory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[ahf] operator[SEP] identifier[newAtomHandler] operator[SEP] identifier[request] , identifier[response] operator[SEP] operator[SEP] }
public JobScheduleTerminateOptions withIfUnmodifiedSince(DateTime ifUnmodifiedSince) { if (ifUnmodifiedSince == null) { this.ifUnmodifiedSince = null; } else { this.ifUnmodifiedSince = new DateTimeRfc1123(ifUnmodifiedSince); } return this; }
class class_name[name] begin[{] method[withIfUnmodifiedSince, return_type[type[JobScheduleTerminateOptions]], modifier[public], parameter[ifUnmodifiedSince]] begin[{] if[binary_operation[member[.ifUnmodifiedSince], ==, literal[null]]] begin[{] assign[THIS[member[None.ifUnmodifiedSince]], literal[null]] else begin[{] assign[THIS[member[None.ifUnmodifiedSince]], ClassCreator(arguments=[MemberReference(member=ifUnmodifiedSince, 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=DateTimeRfc1123, sub_type=None))] end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[JobScheduleTerminateOptions] identifier[withIfUnmodifiedSince] operator[SEP] identifier[DateTime] identifier[ifUnmodifiedSince] operator[SEP] { Keyword[if] operator[SEP] identifier[ifUnmodifiedSince] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[ifUnmodifiedSince] operator[=] Other[null] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[ifUnmodifiedSince] operator[=] Keyword[new] identifier[DateTimeRfc1123] operator[SEP] identifier[ifUnmodifiedSince] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public ServiceFuture<VpnProfileResponseInner> beginGenerateVpnProfileAsync(String resourceGroupName, String gatewayName, AuthenticationMethod authenticationMethod, final ServiceCallback<VpnProfileResponseInner> serviceCallback) { return ServiceFuture.fromResponse(beginGenerateVpnProfileWithServiceResponseAsync(resourceGroupName, gatewayName, authenticationMethod), serviceCallback); }
class class_name[name] begin[{] method[beginGenerateVpnProfileAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, gatewayName, authenticationMethod, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.beginGenerateVpnProfileWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.gatewayName], member[.authenticationMethod]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[VpnProfileResponseInner] operator[>] identifier[beginGenerateVpnProfileAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[gatewayName] , identifier[AuthenticationMethod] identifier[authenticationMethod] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[VpnProfileResponseInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[beginGenerateVpnProfileWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[gatewayName] , identifier[authenticationMethod] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public static long getIndexMap(final File in, final Map<String, Long> map) throws IOException { long id = 0; if (in.exists()) { BufferedReader br = SimpleParser.getBufferedReader(in); String line; while ((line = br.readLine()) != null) { String[] toks = line.split("\t"); long i = Long.parseLong(toks[1]); map.put(toks[0], i); id = Math.max(i, id); } br.close(); } return id + 1; }
class class_name[name] begin[{] method[getIndexMap, return_type[type[long]], modifier[public static], parameter[in, map]] begin[{] local_variable[type[long], id] if[call[in.exists, parameter[]]] begin[{] local_variable[type[BufferedReader], br] local_variable[type[String], line] while[binary_operation[assign[member[.line], call[br.readLine, parameter[]]], !=, literal[null]]] begin[{] local_variable[type[String], toks] local_variable[type[long], i] call[map.put, parameter[member[.toks], member[.i]]] assign[member[.id], call[Math.max, parameter[member[.i], member[.id]]]] end[}] call[br.close, parameter[]] else begin[{] None end[}] return[binary_operation[member[.id], +, literal[1]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[getIndexMap] operator[SEP] Keyword[final] identifier[File] identifier[in] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Long] operator[>] identifier[map] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[long] identifier[id] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[in] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[BufferedReader] identifier[br] operator[=] identifier[SimpleParser] operator[SEP] identifier[getBufferedReader] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[String] identifier[line] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[line] operator[=] identifier[br] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[toks] operator[=] identifier[line] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[long] identifier[i] operator[=] identifier[Long] operator[SEP] identifier[parseLong] operator[SEP] identifier[toks] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[toks] operator[SEP] Other[0] operator[SEP] , identifier[i] operator[SEP] operator[SEP] identifier[id] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[i] , identifier[id] operator[SEP] operator[SEP] } identifier[br] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[id] operator[+] Other[1] operator[SEP] }
@Override public IEntityGroup find(String key) throws GroupsException { if (log.isDebugEnabled()) { log.debug(DEBUG_CLASS_NAME + ".find(): group key: " + key); } String path = getFilePathFromKey(key); File f = new File(path); GroupHolder groupHolder = cacheGet(key); if (groupHolder == null || (groupHolder.getLastModified() != f.lastModified())) { if (log.isDebugEnabled()) { log.debug( DEBUG_CLASS_NAME + ".find(): retrieving group from file system for " + path); } if (!f.exists()) { if (log.isDebugEnabled()) { log.debug(DEBUG_CLASS_NAME + ".find(): file does not exist: " + path); } return null; } IEntityGroup group = newInstance(f); groupHolder = new GroupHolder(group, f.lastModified()); cachePut(key, groupHolder); } return groupHolder.getGroup(); }
class class_name[name] begin[{] method[find, return_type[type[IEntityGroup]], modifier[public], parameter[key]] begin[{] if[call[log.isDebugEnabled, parameter[]]] begin[{] call[log.debug, parameter[binary_operation[binary_operation[member[.DEBUG_CLASS_NAME], +, literal[".find(): group key: "]], +, member[.key]]]] else begin[{] None end[}] local_variable[type[String], path] local_variable[type[File], f] local_variable[type[GroupHolder], groupHolder] if[binary_operation[binary_operation[member[.groupHolder], ==, literal[null]], ||, binary_operation[call[groupHolder.getLastModified, parameter[]], !=, call[f.lastModified, parameter[]]]]] begin[{] if[call[log.isDebugEnabled, parameter[]]] begin[{] call[log.debug, parameter[binary_operation[binary_operation[member[.DEBUG_CLASS_NAME], +, literal[".find(): retrieving group from file system for "]], +, member[.path]]]] else begin[{] None end[}] if[call[f.exists, parameter[]]] begin[{] if[call[log.isDebugEnabled, parameter[]]] begin[{] call[log.debug, parameter[binary_operation[binary_operation[member[.DEBUG_CLASS_NAME], +, literal[".find(): file does not exist: "]], +, member[.path]]]] else begin[{] None end[}] return[literal[null]] else begin[{] None end[}] local_variable[type[IEntityGroup], group] assign[member[.groupHolder], ClassCreator(arguments=[MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=lastModified, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GroupHolder, sub_type=None))] call[.cachePut, parameter[member[.key], member[.groupHolder]]] else begin[{] None end[}] return[call[groupHolder.getGroup, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[IEntityGroup] identifier[find] operator[SEP] identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[GroupsException] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[DEBUG_CLASS_NAME] operator[+] literal[String] operator[+] identifier[key] operator[SEP] operator[SEP] } identifier[String] identifier[path] operator[=] identifier[getFilePathFromKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[File] identifier[f] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[GroupHolder] identifier[groupHolder] operator[=] identifier[cacheGet] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[groupHolder] operator[==] Other[null] operator[||] operator[SEP] identifier[groupHolder] operator[SEP] identifier[getLastModified] operator[SEP] operator[SEP] operator[!=] identifier[f] operator[SEP] identifier[lastModified] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[DEBUG_CLASS_NAME] operator[+] literal[String] operator[+] identifier[path] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[f] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] identifier[DEBUG_CLASS_NAME] operator[+] literal[String] operator[+] identifier[path] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] } identifier[IEntityGroup] identifier[group] operator[=] identifier[newInstance] operator[SEP] identifier[f] operator[SEP] operator[SEP] identifier[groupHolder] operator[=] Keyword[new] identifier[GroupHolder] operator[SEP] identifier[group] , identifier[f] operator[SEP] identifier[lastModified] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[cachePut] operator[SEP] identifier[key] , identifier[groupHolder] operator[SEP] operator[SEP] } Keyword[return] identifier[groupHolder] operator[SEP] identifier[getGroup] operator[SEP] operator[SEP] operator[SEP] }
private static Token createDateToken(final String configuration) { if (configuration == null) { return new DateToken(); } else { try { return new DateToken(configuration); } catch (IllegalArgumentException ex) { InternalLogger.log(Level.ERROR, "'" + configuration + "' is an invalid date format pattern"); return new DateToken(); } } }
class class_name[name] begin[{] method[createDateToken, return_type[type[Token]], modifier[private static], parameter[configuration]] begin[{] if[binary_operation[member[.configuration], ==, literal[null]]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DateToken, sub_type=None))] else begin[{] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=configuration, 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=DateToken, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operandr=MemberReference(member=configuration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is an invalid date format pattern"), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=InternalLogger, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DateToken, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
Keyword[private] Keyword[static] identifier[Token] identifier[createDateToken] operator[SEP] Keyword[final] identifier[String] identifier[configuration] operator[SEP] { Keyword[if] operator[SEP] identifier[configuration] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[DateToken] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[try] { Keyword[return] Keyword[new] identifier[DateToken] operator[SEP] identifier[configuration] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[ex] operator[SEP] { identifier[InternalLogger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[ERROR] , literal[String] operator[+] identifier[configuration] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[DateToken] operator[SEP] operator[SEP] operator[SEP] } } }
public ArrayOfDoublesCompactSketch getResult(final WritableMemory dstMem) { if (sketch_.getRetainedEntries() > sketch_.getNominalEntries()) { theta_ = Math.min(theta_, sketch_.getNewTheta()); } if (dstMem == null) { return new HeapArrayOfDoublesCompactSketch(sketch_, theta_); } return new DirectArrayOfDoublesCompactSketch(sketch_, theta_, dstMem); }
class class_name[name] begin[{] method[getResult, return_type[type[ArrayOfDoublesCompactSketch]], modifier[public], parameter[dstMem]] begin[{] if[binary_operation[call[sketch_.getRetainedEntries, parameter[]], >, call[sketch_.getNominalEntries, parameter[]]]] begin[{] assign[member[.theta_], call[Math.min, parameter[member[.theta_], call[sketch_.getNewTheta, parameter[]]]]] else begin[{] None end[}] if[binary_operation[member[.dstMem], ==, literal[null]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=sketch_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=theta_, 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=HeapArrayOfDoublesCompactSketch, sub_type=None))] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=sketch_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=theta_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dstMem, 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=DirectArrayOfDoublesCompactSketch, sub_type=None))] end[}] END[}]
Keyword[public] identifier[ArrayOfDoublesCompactSketch] identifier[getResult] operator[SEP] Keyword[final] identifier[WritableMemory] identifier[dstMem] operator[SEP] { Keyword[if] operator[SEP] identifier[sketch_] operator[SEP] identifier[getRetainedEntries] operator[SEP] operator[SEP] operator[>] identifier[sketch_] operator[SEP] identifier[getNominalEntries] operator[SEP] operator[SEP] operator[SEP] { identifier[theta_] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[theta_] , identifier[sketch_] operator[SEP] identifier[getNewTheta] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[dstMem] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[HeapArrayOfDoublesCompactSketch] operator[SEP] identifier[sketch_] , identifier[theta_] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[DirectArrayOfDoublesCompactSketch] operator[SEP] identifier[sketch_] , identifier[theta_] , identifier[dstMem] operator[SEP] operator[SEP] }
public Number verifyNumber(Number number) { if ((number instanceof Double) || (number instanceof Float)) { double dValue = number.doubleValue(); if (Double.isNaN(dValue) || Double.isInfinite(dValue)) { throw new LocalizedArithmeticException(dValue, NUMBER); } } return number; }
class class_name[name] begin[{] method[verifyNumber, return_type[type[Number]], modifier[public], parameter[number]] begin[{] if[binary_operation[binary_operation[member[.number], instanceof, type[Double]], ||, binary_operation[member[.number], instanceof, type[Float]]]] begin[{] local_variable[type[double], dValue] if[binary_operation[call[Double.isNaN, parameter[member[.dValue]]], ||, call[Double.isInfinite, parameter[member[.dValue]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=dValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=NUMBER, 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=LocalizedArithmeticException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] return[member[.number]] end[}] END[}]
Keyword[public] identifier[Number] identifier[verifyNumber] operator[SEP] identifier[Number] identifier[number] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[number] Keyword[instanceof] identifier[Double] operator[SEP] operator[||] operator[SEP] identifier[number] Keyword[instanceof] identifier[Float] operator[SEP] operator[SEP] { Keyword[double] identifier[dValue] operator[=] identifier[number] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[isNaN] operator[SEP] identifier[dValue] operator[SEP] operator[||] identifier[Double] operator[SEP] identifier[isInfinite] operator[SEP] identifier[dValue] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[LocalizedArithmeticException] operator[SEP] identifier[dValue] , identifier[NUMBER] operator[SEP] operator[SEP] } } Keyword[return] identifier[number] operator[SEP] }
public void readData(DataInput din) throws IOException { int byteCount = din.readUnsignedByte(); int recordCount = byteCount / 7; records = new RecordRequest[recordCount]; for (int i = 0; i < recordCount; i++) { if (din.readByte() != 6) { throw new IOException(); } int file = din.readUnsignedShort(); int record = din.readUnsignedShort(); if (record < 0 || record >= 10000) { throw new IOException(); } int count = din.readUnsignedShort(); records[i] = new RecordRequest(file, record, count); } }
class class_name[name] begin[{] method[readData, return_type[void], modifier[public], parameter[din]] begin[{] local_variable[type[int], byteCount] local_variable[type[int], recordCount] assign[member[.records], ArrayCreator(dimensions=[MemberReference(member=recordCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RecordRequest, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=readByte, postfix_operators=[], prefix_operators=[], qualifier=din, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[], 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)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=din, selectors=[], type_arguments=None), name=file)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=din, selectors=[], type_arguments=None), name=record)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=record, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=record, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10000), operator=>=), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[], 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)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=din, selectors=[], type_arguments=None), name=count)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=records, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=record, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=count, 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=RecordRequest, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=recordCount, 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[readData] operator[SEP] identifier[DataInput] identifier[din] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[byteCount] operator[=] identifier[din] operator[SEP] identifier[readUnsignedByte] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[recordCount] operator[=] identifier[byteCount] operator[/] Other[7] operator[SEP] identifier[records] operator[=] Keyword[new] identifier[RecordRequest] operator[SEP] identifier[recordCount] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[recordCount] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[din] operator[SEP] identifier[readByte] operator[SEP] operator[SEP] operator[!=] Other[6] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[file] operator[=] identifier[din] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[record] operator[=] identifier[din] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[record] operator[<] Other[0] operator[||] identifier[record] operator[>=] Other[10000] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[count] operator[=] identifier[din] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] identifier[records] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[RecordRequest] operator[SEP] identifier[file] , identifier[record] , identifier[count] operator[SEP] operator[SEP] } }
public static int encode(BigInteger value, byte[] dst, int dstOffset) { /* Encoding of first byte: 0x00: null low (unused) 0x01: negative signum; four bytes follow for value length 0x02..0x7f: negative signum; value length 7e range, 1..126 0x80..0xfd: positive signum; value length 7e range, 1..126 0xfe: positive signum; four bytes follow for value length 0xff: null high */ if (value == null) { dst[dstOffset] = NULL_BYTE_HIGH; return 1; } byte[] bytes = value.toByteArray(); // Always at least one. int bytesLength = bytes.length; int headerSize; if (bytesLength < 0x7f) { if (value.signum() < 0) { dst[dstOffset] = (byte) (0x80 - bytesLength); } else { dst[dstOffset] = (byte) (bytesLength + 0x7f); } headerSize = 1; } else { dst[dstOffset] = (byte) (value.signum() < 0 ? 1 : 0xfe); int encodedLen = value.signum() < 0 ? -bytesLength : bytesLength; DataEncoder.encode(encodedLen, dst, dstOffset + 1); headerSize = 5; } System.arraycopy(bytes, 0, dst, headerSize + dstOffset, bytesLength); return headerSize + bytesLength; }
class class_name[name] begin[{] method[encode, return_type[type[int]], modifier[public static], parameter[value, dst, dstOffset]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] assign[member[.dst], member[.NULL_BYTE_HIGH]] return[literal[1]] else begin[{] None end[}] local_variable[type[byte], bytes] local_variable[type[int], bytesLength] local_variable[type[int], headerSize] if[binary_operation[member[.bytesLength], <, literal[0x7f]]] begin[{] if[binary_operation[call[value.signum, parameter[]], <, literal[0]]] begin[{] assign[member[.dst], Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operandr=MemberReference(member=bytesLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), type=BasicType(dimensions=[], name=byte))] else begin[{] assign[member[.dst], Cast(expression=BinaryOperation(operandl=MemberReference(member=bytesLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x7f), operator=+), type=BasicType(dimensions=[], name=byte))] end[}] assign[member[.headerSize], literal[1]] else begin[{] assign[member[.dst], Cast(expression=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=signum, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xfe), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), type=BasicType(dimensions=[], name=byte))] local_variable[type[int], encodedLen] call[DataEncoder.encode, parameter[member[.encodedLen], member[.dst], binary_operation[member[.dstOffset], +, literal[1]]]] assign[member[.headerSize], literal[5]] end[}] call[System.arraycopy, parameter[member[.bytes], literal[0], member[.dst], binary_operation[member[.headerSize], +, member[.dstOffset]], member[.bytesLength]]] return[binary_operation[member[.headerSize], +, member[.bytesLength]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[encode] operator[SEP] identifier[BigInteger] identifier[value] , Keyword[byte] operator[SEP] operator[SEP] identifier[dst] , Keyword[int] identifier[dstOffset] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { identifier[dst] operator[SEP] identifier[dstOffset] operator[SEP] operator[=] identifier[NULL_BYTE_HIGH] operator[SEP] Keyword[return] Other[1] operator[SEP] } Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[value] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[bytesLength] operator[=] identifier[bytes] operator[SEP] identifier[length] operator[SEP] Keyword[int] identifier[headerSize] operator[SEP] Keyword[if] operator[SEP] identifier[bytesLength] operator[<] literal[Integer] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[SEP] identifier[signum] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { identifier[dst] operator[SEP] identifier[dstOffset] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] literal[Integer] operator[-] identifier[bytesLength] operator[SEP] operator[SEP] } Keyword[else] { identifier[dst] operator[SEP] identifier[dstOffset] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytesLength] operator[+] literal[Integer] operator[SEP] operator[SEP] } identifier[headerSize] operator[=] Other[1] operator[SEP] } Keyword[else] { identifier[dst] operator[SEP] identifier[dstOffset] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[signum] operator[SEP] operator[SEP] operator[<] Other[0] operator[?] Other[1] operator[:] literal[Integer] operator[SEP] operator[SEP] Keyword[int] identifier[encodedLen] operator[=] identifier[value] operator[SEP] identifier[signum] operator[SEP] operator[SEP] operator[<] Other[0] operator[?] operator[-] identifier[bytesLength] operator[:] identifier[bytesLength] operator[SEP] identifier[DataEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[encodedLen] , identifier[dst] , identifier[dstOffset] operator[+] Other[1] operator[SEP] operator[SEP] identifier[headerSize] operator[=] Other[5] operator[SEP] } identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[bytes] , Other[0] , identifier[dst] , identifier[headerSize] operator[+] identifier[dstOffset] , identifier[bytesLength] operator[SEP] operator[SEP] Keyword[return] identifier[headerSize] operator[+] identifier[bytesLength] operator[SEP] }
protected int getPriority(Taint taint) { if (taint.isTainted()) { return Priorities.HIGH_PRIORITY; } else if (!taint.isSafe()) { return Priorities.NORMAL_PRIORITY; } else { return Priorities.IGNORE_PRIORITY; } }
class class_name[name] begin[{] method[getPriority, return_type[type[int]], modifier[protected], parameter[taint]] begin[{] if[call[taint.isTainted, parameter[]]] begin[{] return[member[Priorities.HIGH_PRIORITY]] else begin[{] if[call[taint.isSafe, parameter[]]] begin[{] return[member[Priorities.NORMAL_PRIORITY]] else begin[{] return[member[Priorities.IGNORE_PRIORITY]] end[}] end[}] end[}] END[}]
Keyword[protected] Keyword[int] identifier[getPriority] operator[SEP] identifier[Taint] identifier[taint] operator[SEP] { Keyword[if] operator[SEP] identifier[taint] operator[SEP] identifier[isTainted] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Priorities] operator[SEP] identifier[HIGH_PRIORITY] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[taint] operator[SEP] identifier[isSafe] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Priorities] operator[SEP] identifier[NORMAL_PRIORITY] operator[SEP] } Keyword[else] { Keyword[return] identifier[Priorities] operator[SEP] identifier[IGNORE_PRIORITY] operator[SEP] } }
public String[] getValues() { return value == null || value.isEmpty() ? new String[0] : len == 1 ? new String[] { value } : value.split("\\s+"); }
class class_name[name] begin[{] method[getValues, return_type[type[String]], modifier[public], parameter[]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), operator=||), if_false=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\s+")], member=split, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None), if_true=ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))), if_true=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=String, sub_type=None)))] end[}] END[}]
Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] { Keyword[return] identifier[value] operator[==] Other[null] operator[||] identifier[value] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Keyword[new] identifier[String] operator[SEP] Other[0] operator[SEP] operator[:] identifier[len] operator[==] Other[1] operator[?] Keyword[new] identifier[String] operator[SEP] operator[SEP] { identifier[value] } operator[:] identifier[value] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public Key retrievePublicSignerKey() throws Exception { PublicKey publicKey = null; try { X509Certificate cert = retrieveSignerCertificate(); publicKey = cert.getPublicKey(); return publicKey; } catch (java.net.MalformedURLException me) { if (tc.isDebugEnabled()) Tr.debug(tc, "Exception opening keystore.", me.getMessage()); throw new Exception(me.getMessage()); } catch (java.io.IOException ioe) { if (tc.isDebugEnabled()) Tr.debug(tc, "Exception opening keystore.", ioe.getMessage()); throw new Exception(ioe.getMessage()); } catch (java.lang.Exception e) { if (tc.isDebugEnabled()) Tr.debug(tc, "Exception opening keystore.", e.getMessage()); throw new Exception(e.getMessage()); } }
class class_name[name] begin[{] method[retrievePublicSignerKey, return_type[type[Key]], modifier[public], parameter[]] begin[{] local_variable[type[PublicKey], publicKey] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=retrieveSignerCertificate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=cert)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=X509Certificate, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=publicKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getPublicKey, postfix_operators=[], prefix_operators=[], qualifier=cert, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=MemberReference(member=publicKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception opening keystore."), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=me, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=me, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=me, types=['java.net.MalformedURLException'])), CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception opening keystore."), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ioe, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ioe, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['java.io.IOException'])), CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception opening keystore."), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['java.lang.Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[Key] identifier[retrievePublicSignerKey] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[PublicKey] identifier[publicKey] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[X509Certificate] identifier[cert] operator[=] identifier[retrieveSignerCertificate] operator[SEP] operator[SEP] operator[SEP] identifier[publicKey] operator[=] identifier[cert] operator[SEP] identifier[getPublicKey] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[publicKey] operator[SEP] } Keyword[catch] operator[SEP] identifier[java] operator[SEP] identifier[net] operator[SEP] identifier[MalformedURLException] identifier[me] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[me] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] identifier[me] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[ioe] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] identifier[ioe] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private boolean addExtractorOrDynamicValue(List<Object> list, Object extractor, String header, boolean commaMightBeNeeded) { if (extractor != null) { if (commaMightBeNeeded) { list.add(","); } list.add(header); list.add(extractor); return true; } return commaMightBeNeeded; }
class class_name[name] begin[{] method[addExtractorOrDynamicValue, return_type[type[boolean]], modifier[private], parameter[list, extractor, header, commaMightBeNeeded]] begin[{] if[binary_operation[member[.extractor], !=, literal[null]]] begin[{] if[member[.commaMightBeNeeded]] begin[{] call[list.add, parameter[literal[","]]] else begin[{] None end[}] call[list.add, parameter[member[.header]]] call[list.add, parameter[member[.extractor]]] return[literal[true]] else begin[{] None end[}] return[member[.commaMightBeNeeded]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[addExtractorOrDynamicValue] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] identifier[list] , identifier[Object] identifier[extractor] , identifier[String] identifier[header] , Keyword[boolean] identifier[commaMightBeNeeded] operator[SEP] { Keyword[if] operator[SEP] identifier[extractor] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[commaMightBeNeeded] operator[SEP] { identifier[list] operator[SEP] identifier[add] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[header] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[extractor] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] identifier[commaMightBeNeeded] operator[SEP] }
@RequestMapping(value = "/profiles", method = RequestMethod.GET) public String list(Model model) { Profile profiles = new Profile(); model.addAttribute("addNewProfile", profiles); model.addAttribute("version", Constants.VERSION); logger.info("Loading initial page"); return "profiles"; }
class class_name[name] begin[{] method[list, return_type[type[String]], modifier[public], parameter[model]] begin[{] local_variable[type[Profile], profiles] call[model.addAttribute, parameter[literal["addNewProfile"], member[.profiles]]] call[model.addAttribute, parameter[literal["version"], member[Constants.VERSION]]] call[logger.info, parameter[literal["Loading initial page"]]] return[literal["profiles"]] end[}] END[}]
annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[GET] operator[SEP] Keyword[public] identifier[String] identifier[list] operator[SEP] identifier[Model] identifier[model] operator[SEP] { identifier[Profile] identifier[profiles] operator[=] Keyword[new] identifier[Profile] operator[SEP] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[addAttribute] operator[SEP] literal[String] , identifier[profiles] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[addAttribute] operator[SEP] literal[String] , identifier[Constants] operator[SEP] identifier[VERSION] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] literal[String] operator[SEP] }
public com.google.api.ads.adwords.axis.v201809.cm.Bid getFirstPositionCpc() { return firstPositionCpc; }
class class_name[name] begin[{] method[getFirstPositionCpc, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.firstPositionCpc]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[Bid] identifier[getFirstPositionCpc] operator[SEP] operator[SEP] { Keyword[return] identifier[firstPositionCpc] operator[SEP] }
public static <T, R1, R> Optional<R> forEach2(Optional<? extends T> value1, Function<? super T, Optional<R1>> value2, BiFunction<? super T, ? super R1, ? extends R> yieldingFunction) { return value1.flatMap(in -> { Optional<R1> a = value2.apply(in); return a.map(in2 -> yieldingFunction.apply(in, in2)); }); }
class class_name[name] begin[{] method[forEach2, return_type[type[Optional]], modifier[public static], parameter[value1, value2, yieldingFunction]] begin[{] return[call[value1.flatMap, parameter[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=value2, selectors=[], type_arguments=None), name=a)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=R1, sub_type=None))], dimensions=[], name=Optional, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=in2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=yieldingFunction, selectors=[], type_arguments=None), parameters=[MemberReference(member=in2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=map, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None), label=None)], parameters=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[R1] , identifier[R] operator[>] identifier[Optional] operator[<] identifier[R] operator[>] identifier[forEach2] operator[SEP] identifier[Optional] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[value1] , identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , identifier[Optional] operator[<] identifier[R1] operator[>] operator[>] identifier[value2] , identifier[BiFunction] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[super] identifier[R1] , operator[?] Keyword[extends] identifier[R] operator[>] identifier[yieldingFunction] operator[SEP] { Keyword[return] identifier[value1] operator[SEP] identifier[flatMap] operator[SEP] identifier[in] operator[->] { identifier[Optional] operator[<] identifier[R1] operator[>] identifier[a] operator[=] identifier[value2] operator[SEP] identifier[apply] operator[SEP] identifier[in] operator[SEP] operator[SEP] Keyword[return] identifier[a] operator[SEP] identifier[map] operator[SEP] identifier[in2] operator[->] identifier[yieldingFunction] operator[SEP] identifier[apply] operator[SEP] identifier[in] , identifier[in2] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] }
private Object onEnum(Attribute attribute, Object fieldValue) { if (((Field) attribute.getJavaMember()).getType().isEnum()) { EnumAccessor accessor = new EnumAccessor(); fieldValue = accessor.fromString(((AbstractAttribute) attribute).getBindableJavaType(), fieldValue.toString()); } return fieldValue; }
class class_name[name] begin[{] method[onEnum, return_type[type[Object]], modifier[private], parameter[attribute, fieldValue]] begin[{] if[Cast(expression=MethodInvocation(arguments=[], member=getJavaMember, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))] begin[{] local_variable[type[EnumAccessor], accessor] assign[member[.fieldValue], call[accessor.fromString, parameter[Cast(expression=MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AbstractAttribute, sub_type=None)), call[fieldValue.toString, parameter[]]]]] else begin[{] None end[}] return[member[.fieldValue]] end[}] END[}]
Keyword[private] identifier[Object] identifier[onEnum] operator[SEP] identifier[Attribute] identifier[attribute] , identifier[Object] identifier[fieldValue] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[Field] operator[SEP] identifier[attribute] operator[SEP] identifier[getJavaMember] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[isEnum] operator[SEP] operator[SEP] operator[SEP] { identifier[EnumAccessor] identifier[accessor] operator[=] Keyword[new] identifier[EnumAccessor] operator[SEP] operator[SEP] operator[SEP] identifier[fieldValue] operator[=] identifier[accessor] operator[SEP] identifier[fromString] operator[SEP] operator[SEP] operator[SEP] identifier[AbstractAttribute] operator[SEP] identifier[attribute] operator[SEP] operator[SEP] identifier[getBindableJavaType] operator[SEP] operator[SEP] , identifier[fieldValue] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[fieldValue] operator[SEP] }
private List<String[]> readSection(BufferedReader bufferedReader) { List<String[]> section = new ArrayList<String[]>(); String line = ""; String currKey = null; StringBuffer currVal = new StringBuffer(); boolean done = false; int linecount = 0; try { while (!done) { bufferedReader.mark(320); line = bufferedReader.readLine(); String firstSecKey = section.isEmpty() ? "" : section.get(0)[0]; if (line != null && line.matches("\\p{Space}*")) { // regular expression \p{Space}* will match line // having only white space characters continue; } if (line == null || (!line.startsWith(" ") && linecount++ > 0 && (!firstSecKey .equals(START_SEQUENCE_TAG) || line .startsWith(END_SEQUENCE_TAG)))) { // dump out last part of section section.add(new String[]{currKey, currVal.toString()}); bufferedReader.reset(); done = true; } else { Matcher m = sectp.matcher(line); if (m.matches()) { // new key if (currKey != null) { section.add(new String[]{currKey, currVal.toString()}); } // key = group(2) or group(4) or group(6) - whichever is // not null currKey = m.group(2) == null ? (m.group(4) == null ? m .group(6) : m.group(4)) : m.group(2); currVal = new StringBuffer(); // val = group(3) if group(2) not null, group(5) if // group(4) not null, "" otherwise, trimmed currVal.append((m.group(2) == null ? (m.group(4) == null ? "" : m.group(5)) : m.group(3)).trim()); } else { // concatted line or SEQ START/END line? if (line.startsWith(START_SEQUENCE_TAG) || line.startsWith(END_SEQUENCE_TAG)) { currKey = line; } else { currVal.append("\n"); // newline in between lines - // can be removed later currVal.append(currKey.charAt(0) == '/' ? line .substring(21) : line.substring(12)); } } } } } catch (IOException e) { throw new ParserException(e.getMessage()); } catch (RuntimeException e) { throw new ParserException(e.getMessage()); } return section; }
class class_name[name] begin[{] method[readSection, return_type[type[List]], modifier[private], parameter[bufferedReader]] begin[{] local_variable[type[List], section] local_variable[type[String], line] local_variable[type[String], currKey] local_variable[type[StringBuffer], currVal] local_variable[type[boolean], done] local_variable[type[int], linecount] TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=320)], member=mark, postfix_operators=[], prefix_operators=[], qualifier=bufferedReader, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=bufferedReader, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), name=firstSecKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\p{Space}*")], member=matches, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=startsWith, postfix_operators=[], prefix_operators=['!'], qualifier=line, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=linecount, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=START_SEQUENCE_TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=firstSecKey, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=END_SEQUENCE_TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operator=||), operator=&&), operator=||), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=sectp, selectors=[], type_arguments=None), name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Matcher, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=matches, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=START_SEQUENCE_TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=END_SEQUENCE_TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operator=||), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=append, postfix_operators=[], prefix_operators=[], qualifier=currVal, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=currKey, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/'), operator===), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=21)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None))], member=append, postfix_operators=[], prefix_operators=[], qualifier=currVal, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=currKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=currKey, 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=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=currKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=currVal, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=group, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=group, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), if_true=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], member=group, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], member=group, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)], member=group, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None)))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=group, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=group, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), if_true=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], member=group, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], member=group, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")))], member=append, postfix_operators=[], prefix_operators=[], qualifier=currVal, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=currKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=currVal, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=section, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=reset, postfix_operators=[], prefix_operators=[], qualifier=bufferedReader, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=done, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), condition=MemberReference(member=done, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParserException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParserException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RuntimeException']))], finally_block=None, label=None, resources=None) return[member[.section]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[String] operator[SEP] operator[SEP] operator[>] identifier[readSection] operator[SEP] identifier[BufferedReader] identifier[bufferedReader] operator[SEP] { identifier[List] operator[<] identifier[String] operator[SEP] operator[SEP] operator[>] identifier[section] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[SEP] operator[SEP] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[line] operator[=] literal[String] operator[SEP] identifier[String] identifier[currKey] operator[=] Other[null] operator[SEP] identifier[StringBuffer] identifier[currVal] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[done] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[linecount] operator[=] Other[0] operator[SEP] Keyword[try] { Keyword[while] operator[SEP] operator[!] identifier[done] operator[SEP] { identifier[bufferedReader] operator[SEP] identifier[mark] operator[SEP] Other[320] operator[SEP] operator[SEP] identifier[line] operator[=] identifier[bufferedReader] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[firstSecKey] operator[=] identifier[section] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] identifier[section] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[line] operator[!=] Other[null] operator[&&] identifier[line] operator[SEP] identifier[matches] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[line] operator[==] Other[null] operator[||] operator[SEP] operator[!] identifier[line] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[linecount] operator[++] operator[>] Other[0] operator[&&] operator[SEP] operator[!] identifier[firstSecKey] operator[SEP] identifier[equals] operator[SEP] identifier[START_SEQUENCE_TAG] operator[SEP] operator[||] identifier[line] operator[SEP] identifier[startsWith] operator[SEP] identifier[END_SEQUENCE_TAG] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[section] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { identifier[currKey] , identifier[currVal] operator[SEP] identifier[toString] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[bufferedReader] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[done] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[Matcher] identifier[m] operator[=] identifier[sectp] operator[SEP] identifier[matcher] operator[SEP] identifier[line] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[currKey] operator[!=] Other[null] operator[SEP] { identifier[section] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { identifier[currKey] , identifier[currVal] operator[SEP] identifier[toString] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] } identifier[currKey] operator[=] identifier[m] operator[SEP] identifier[group] operator[SEP] Other[2] operator[SEP] operator[==] Other[null] operator[?] operator[SEP] identifier[m] operator[SEP] identifier[group] operator[SEP] Other[4] operator[SEP] operator[==] Other[null] operator[?] identifier[m] operator[SEP] identifier[group] operator[SEP] Other[6] operator[SEP] operator[:] identifier[m] operator[SEP] identifier[group] operator[SEP] Other[4] operator[SEP] operator[SEP] operator[:] identifier[m] operator[SEP] identifier[group] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[currVal] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[currVal] operator[SEP] identifier[append] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[group] operator[SEP] Other[2] operator[SEP] operator[==] Other[null] operator[?] operator[SEP] identifier[m] operator[SEP] identifier[group] operator[SEP] Other[4] operator[SEP] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[m] operator[SEP] identifier[group] operator[SEP] Other[5] operator[SEP] operator[SEP] operator[:] identifier[m] operator[SEP] identifier[group] operator[SEP] Other[3] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[startsWith] operator[SEP] identifier[START_SEQUENCE_TAG] operator[SEP] operator[||] identifier[line] operator[SEP] identifier[startsWith] operator[SEP] identifier[END_SEQUENCE_TAG] operator[SEP] operator[SEP] { identifier[currKey] operator[=] identifier[line] operator[SEP] } Keyword[else] { identifier[currVal] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[currVal] operator[SEP] identifier[append] operator[SEP] identifier[currKey] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[?] identifier[line] operator[SEP] identifier[substring] operator[SEP] Other[21] operator[SEP] operator[:] identifier[line] operator[SEP] identifier[substring] operator[SEP] Other[12] operator[SEP] operator[SEP] operator[SEP] } } } } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ParserException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ParserException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[section] operator[SEP] }
private void compress() { if (sample.size() < 2) { return; } ListIterator<Item> it = sample.listIterator(); int removed = 0; Item prev = null; Item next = it.next(); while (it.hasNext()) { prev = next; next = it.next(); if (prev.g + next.g + next.delta <= allowableError(it.previousIndex())) { next.g += prev.g; // Remove prev. it.remove() kills the last thing returned. it.previous(); it.previous(); it.remove(); // it.next() is now equal to next, skip it back forward again it.next(); removed++; } } }
class class_name[name] begin[{] method[compress, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[call[sample.size, parameter[]], <, literal[2]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[ListIterator], it] local_variable[type[int], removed] local_variable[type[Item], prev] local_variable[type[Item], next] while[call[it.hasNext, parameter[]]] begin[{] assign[member[.prev], member[.next]] assign[member[.next], call[it.next, parameter[]]] if[binary_operation[binary_operation[binary_operation[member[prev.g], +, member[next.g]], +, member[next.delta]], <=, call[.allowableError, parameter[call[it.previousIndex, parameter[]]]]]] begin[{] assign[member[next.g], member[prev.g]] call[it.previous, parameter[]] call[it.previous, parameter[]] call[it.remove, parameter[]] call[it.next, parameter[]] member[.removed] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[compress] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[sample] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] Other[2] operator[SEP] { Keyword[return] operator[SEP] } identifier[ListIterator] operator[<] identifier[Item] operator[>] identifier[it] operator[=] identifier[sample] operator[SEP] identifier[listIterator] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[removed] operator[=] Other[0] operator[SEP] identifier[Item] identifier[prev] operator[=] Other[null] operator[SEP] identifier[Item] identifier[next] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[prev] operator[=] identifier[next] operator[SEP] identifier[next] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[prev] operator[SEP] identifier[g] operator[+] identifier[next] operator[SEP] identifier[g] operator[+] identifier[next] operator[SEP] identifier[delta] operator[<=] identifier[allowableError] operator[SEP] identifier[it] operator[SEP] identifier[previousIndex] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[next] operator[SEP] identifier[g] operator[+=] identifier[prev] operator[SEP] identifier[g] operator[SEP] identifier[it] operator[SEP] identifier[previous] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[previous] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[removed] operator[++] operator[SEP] } } }
public static DoubleHistogram decodeFromCompressedByteBuffer( final ByteBuffer buffer, Class<? extends AbstractHistogram> internalCountsHistogramClass, long minBarForHighestToLowestValueRatio) throws DataFormatException { int cookie = buffer.getInt(); if (!isCompressedDoubleHistogramCookie(cookie)) { throw new IllegalArgumentException("The buffer does not contain a compressed DoubleHistogram"); } DoubleHistogram histogram = constructHistogramFromBuffer(cookie, buffer, internalCountsHistogramClass, minBarForHighestToLowestValueRatio); return histogram; }
class class_name[name] begin[{] method[decodeFromCompressedByteBuffer, return_type[type[DoubleHistogram]], modifier[public static], parameter[buffer, internalCountsHistogramClass, minBarForHighestToLowestValueRatio]] begin[{] local_variable[type[int], cookie] if[call[.isCompressedDoubleHistogramCookie, parameter[member[.cookie]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The buffer does not contain a compressed DoubleHistogram")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[DoubleHistogram], histogram] return[member[.histogram]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DoubleHistogram] identifier[decodeFromCompressedByteBuffer] operator[SEP] Keyword[final] identifier[ByteBuffer] identifier[buffer] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[AbstractHistogram] operator[>] identifier[internalCountsHistogramClass] , Keyword[long] identifier[minBarForHighestToLowestValueRatio] operator[SEP] Keyword[throws] identifier[DataFormatException] { Keyword[int] identifier[cookie] operator[=] identifier[buffer] operator[SEP] identifier[getInt] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isCompressedDoubleHistogramCookie] operator[SEP] identifier[cookie] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[DoubleHistogram] identifier[histogram] operator[=] identifier[constructHistogramFromBuffer] operator[SEP] identifier[cookie] , identifier[buffer] , identifier[internalCountsHistogramClass] , identifier[minBarForHighestToLowestValueRatio] operator[SEP] operator[SEP] Keyword[return] identifier[histogram] operator[SEP] }
@Override public ObservableList<Item> getPropertySheetItems() { ObservableList<Item> items = super.getPropertySheetItems(); items.add(new Item() { @Override public Optional<ObservableValue<?>> getObservableValue() { return Optional.of(numberOfDaysProperty()); } @Override public void setValue(Object value) { setNumberOfDays((Integer) value); } @Override public Object getValue() { return getNumberOfDays(); } @Override public Class<?> getType() { return Integer.class; } @Override public String getName() { return "Number of Days"; //$NON-NLS-1$ } @Override public String getDescription() { return "Number of Days"; //$NON-NLS-1$ } @Override public String getCategory() { return WEEK_DAY_HEADER_VIEW_CATEGORY; } }); return items; }
class class_name[name] begin[{] method[getPropertySheetItems, return_type[type[ObservableList]], modifier[public], parameter[]] begin[{] local_variable[type[ObservableList], items] call[items.add, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=numberOfDaysProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=getObservableValue, parameters=[], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=ObservableValue, sub_type=None))], dimensions=[], name=Optional, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], member=setNumberOfDays, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=setValue, parameters=[FormalParameter(annotations=[], modifiers=set(), name=value, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getNumberOfDays, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=getValue, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None)), label=None)], documentation=None, modifiers={'public'}, name=getType, parameters=[], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Number of Days"), label=None)], documentation=None, modifiers={'public'}, name=getName, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Number of Days"), label=None)], documentation=None, modifiers={'public'}, name=getDescription, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MemberReference(member=WEEK_DAY_HEADER_VIEW_CATEGORY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=getCategory, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_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=Item, sub_type=None))]] return[member[.items]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ObservableList] operator[<] identifier[Item] operator[>] identifier[getPropertySheetItems] operator[SEP] operator[SEP] { identifier[ObservableList] operator[<] identifier[Item] operator[>] identifier[items] operator[=] Keyword[super] operator[SEP] identifier[getPropertySheetItems] operator[SEP] operator[SEP] operator[SEP] identifier[items] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Item] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Optional] operator[<] identifier[ObservableValue] operator[<] operator[?] operator[>] operator[>] identifier[getObservableValue] operator[SEP] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[numberOfDaysProperty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setValue] operator[SEP] identifier[Object] identifier[value] operator[SEP] { identifier[setNumberOfDays] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[value] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[getValue] operator[SEP] operator[SEP] { Keyword[return] identifier[getNumberOfDays] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[Class] operator[<] operator[?] operator[>] identifier[getType] operator[SEP] operator[SEP] { Keyword[return] identifier[Integer] operator[SEP] Keyword[class] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getName] operator[SEP] operator[SEP] { Keyword[return] literal[String] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getDescription] operator[SEP] operator[SEP] { Keyword[return] literal[String] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getCategory] operator[SEP] operator[SEP] { Keyword[return] identifier[WEEK_DAY_HEADER_VIEW_CATEGORY] operator[SEP] } } operator[SEP] operator[SEP] Keyword[return] identifier[items] operator[SEP] }
private void setHeaderHeight(int height) { if (mAccountHeaderContainer != null) { ViewGroup.LayoutParams params = mAccountHeaderContainer.getLayoutParams(); if (params != null) { params.height = height; mAccountHeaderContainer.setLayoutParams(params); } View accountHeader = mAccountHeaderContainer.findViewById(R.id.material_drawer_account_header); if (accountHeader != null) { // TODO why is this null? params = accountHeader.getLayoutParams(); if(params != null) { params.height = height; accountHeader.setLayoutParams(params); } } View accountHeaderBackground = mAccountHeaderContainer.findViewById(R.id.material_drawer_account_header_background); if (accountHeaderBackground != null) { params = accountHeaderBackground.getLayoutParams(); params.height = height; accountHeaderBackground.setLayoutParams(params); } } }
class class_name[name] begin[{] method[setHeaderHeight, return_type[void], modifier[private], parameter[height]] begin[{] if[binary_operation[member[.mAccountHeaderContainer], !=, literal[null]]] begin[{] local_variable[type[ViewGroup], params] if[binary_operation[member[.params], !=, literal[null]]] begin[{] assign[member[params.height], member[.height]] call[mAccountHeaderContainer.setLayoutParams, parameter[member[.params]]] else begin[{] None end[}] local_variable[type[View], accountHeader] if[binary_operation[member[.accountHeader], !=, literal[null]]] begin[{] assign[member[.params], call[accountHeader.getLayoutParams, parameter[]]] if[binary_operation[member[.params], !=, literal[null]]] begin[{] assign[member[params.height], member[.height]] call[accountHeader.setLayoutParams, parameter[member[.params]]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[View], accountHeaderBackground] if[binary_operation[member[.accountHeaderBackground], !=, literal[null]]] begin[{] assign[member[.params], call[accountHeaderBackground.getLayoutParams, parameter[]]] assign[member[params.height], member[.height]] call[accountHeaderBackground.setLayoutParams, parameter[member[.params]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[setHeaderHeight] operator[SEP] Keyword[int] identifier[height] operator[SEP] { Keyword[if] operator[SEP] identifier[mAccountHeaderContainer] operator[!=] Other[null] operator[SEP] { identifier[ViewGroup] operator[SEP] identifier[LayoutParams] identifier[params] operator[=] identifier[mAccountHeaderContainer] operator[SEP] identifier[getLayoutParams] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[params] operator[!=] Other[null] operator[SEP] { identifier[params] operator[SEP] identifier[height] operator[=] identifier[height] operator[SEP] identifier[mAccountHeaderContainer] operator[SEP] identifier[setLayoutParams] operator[SEP] identifier[params] operator[SEP] operator[SEP] } identifier[View] identifier[accountHeader] operator[=] identifier[mAccountHeaderContainer] operator[SEP] identifier[findViewById] operator[SEP] identifier[R] operator[SEP] identifier[id] operator[SEP] identifier[material_drawer_account_header] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[accountHeader] operator[!=] Other[null] operator[SEP] { identifier[params] operator[=] identifier[accountHeader] operator[SEP] identifier[getLayoutParams] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[params] operator[!=] Other[null] operator[SEP] { identifier[params] operator[SEP] identifier[height] operator[=] identifier[height] operator[SEP] identifier[accountHeader] operator[SEP] identifier[setLayoutParams] operator[SEP] identifier[params] operator[SEP] operator[SEP] } } identifier[View] identifier[accountHeaderBackground] operator[=] identifier[mAccountHeaderContainer] operator[SEP] identifier[findViewById] operator[SEP] identifier[R] operator[SEP] identifier[id] operator[SEP] identifier[material_drawer_account_header_background] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[accountHeaderBackground] operator[!=] Other[null] operator[SEP] { identifier[params] operator[=] identifier[accountHeaderBackground] operator[SEP] identifier[getLayoutParams] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[height] operator[=] identifier[height] operator[SEP] identifier[accountHeaderBackground] operator[SEP] identifier[setLayoutParams] operator[SEP] identifier[params] operator[SEP] operator[SEP] } } }
public void registerTimerService(String id, TimerService timerService) { if (timerService instanceof GlobalTimerService) { ((GlobalTimerService) timerService).setTimerServiceId(id); } this.registeredServices.put(id, timerService); }
class class_name[name] begin[{] method[registerTimerService, return_type[void], modifier[public], parameter[id, timerService]] begin[{] if[binary_operation[member[.timerService], instanceof, type[GlobalTimerService]]] begin[{] Cast(expression=MemberReference(member=timerService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GlobalTimerService, sub_type=None)) else begin[{] None end[}] THIS[member[None.registeredServices]call[None.put, parameter[member[.id], member[.timerService]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[registerTimerService] operator[SEP] identifier[String] identifier[id] , identifier[TimerService] identifier[timerService] operator[SEP] { Keyword[if] operator[SEP] identifier[timerService] Keyword[instanceof] identifier[GlobalTimerService] operator[SEP] { operator[SEP] operator[SEP] identifier[GlobalTimerService] operator[SEP] identifier[timerService] operator[SEP] operator[SEP] identifier[setTimerServiceId] operator[SEP] identifier[id] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[registeredServices] operator[SEP] identifier[put] operator[SEP] identifier[id] , identifier[timerService] operator[SEP] operator[SEP] }
private GitLabApiForm createGitLabApiForm() { GitLabApiForm formData = new GitLabApiForm(); return (customAttributesEnabled ? formData.withParam("with_custom_attributes", true) : formData); }
class class_name[name] begin[{] method[createGitLabApiForm, return_type[type[GitLabApiForm]], modifier[private], parameter[]] begin[{] local_variable[type[GitLabApiForm], formData] return[TernaryExpression(condition=MemberReference(member=customAttributesEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=formData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="with_custom_attributes"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=withParam, postfix_operators=[], prefix_operators=[], qualifier=formData, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[private] identifier[GitLabApiForm] identifier[createGitLabApiForm] operator[SEP] operator[SEP] { identifier[GitLabApiForm] identifier[formData] operator[=] Keyword[new] identifier[GitLabApiForm] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[customAttributesEnabled] operator[?] identifier[formData] operator[SEP] identifier[withParam] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[:] identifier[formData] operator[SEP] operator[SEP] }
public void sort( double[] values, double[] valuesToFollow ) { this.valuesToSortDouble = values; this.valuesToFollowDouble = valuesToFollow; number = values.length; monitor.beginTask("Sorting...", -1); monitor.worked(1); quicksort(0, number - 1); monitor.done(); }
class class_name[name] begin[{] method[sort, return_type[void], modifier[public], parameter[values, valuesToFollow]] begin[{] assign[THIS[member[None.valuesToSortDouble]], member[.values]] assign[THIS[member[None.valuesToFollowDouble]], member[.valuesToFollow]] assign[member[.number], member[values.length]] call[monitor.beginTask, parameter[literal["Sorting..."], literal[1]]] call[monitor.worked, parameter[literal[1]]] call[.quicksort, parameter[literal[0], binary_operation[member[.number], -, literal[1]]]] call[monitor.done, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[sort] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[values] , Keyword[double] operator[SEP] operator[SEP] identifier[valuesToFollow] operator[SEP] { Keyword[this] operator[SEP] identifier[valuesToSortDouble] operator[=] identifier[values] operator[SEP] Keyword[this] operator[SEP] identifier[valuesToFollowDouble] operator[=] identifier[valuesToFollow] operator[SEP] identifier[number] operator[=] identifier[values] operator[SEP] identifier[length] operator[SEP] identifier[monitor] operator[SEP] identifier[beginTask] operator[SEP] literal[String] , operator[-] Other[1] operator[SEP] operator[SEP] identifier[monitor] operator[SEP] identifier[worked] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[quicksort] operator[SEP] Other[0] , identifier[number] operator[-] Other[1] operator[SEP] operator[SEP] identifier[monitor] operator[SEP] identifier[done] operator[SEP] operator[SEP] operator[SEP] }
private String generateModelId() { String mt = this.modelType.toString(); StringBuilder mid = new StringBuilder(mt); Integer lastId = null; if (generatedModelIds.containsKey(mt)) { lastId = generatedModelIds.get(mt); } else { lastId = new Integer(-1); } lastId++; mid.append(lastId); generatedModelIds.put(mt, lastId); return mid.toString(); }
class class_name[name] begin[{] method[generateModelId, return_type[type[String]], modifier[private], parameter[]] begin[{] local_variable[type[String], mt] local_variable[type[StringBuilder], mid] local_variable[type[Integer], lastId] if[call[generatedModelIds.containsKey, parameter[member[.mt]]]] begin[{] assign[member[.lastId], call[generatedModelIds.get, parameter[member[.mt]]]] else begin[{] assign[member[.lastId], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))] end[}] member[.lastId] call[mid.append, parameter[member[.lastId]]] call[generatedModelIds.put, parameter[member[.mt], member[.lastId]]] return[call[mid.toString, parameter[]]] end[}] END[}]
Keyword[private] identifier[String] identifier[generateModelId] operator[SEP] operator[SEP] { identifier[String] identifier[mt] operator[=] Keyword[this] operator[SEP] identifier[modelType] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[mid] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[mt] operator[SEP] operator[SEP] identifier[Integer] identifier[lastId] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[generatedModelIds] operator[SEP] identifier[containsKey] operator[SEP] identifier[mt] operator[SEP] operator[SEP] { identifier[lastId] operator[=] identifier[generatedModelIds] operator[SEP] identifier[get] operator[SEP] identifier[mt] operator[SEP] operator[SEP] } Keyword[else] { identifier[lastId] operator[=] Keyword[new] identifier[Integer] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } identifier[lastId] operator[++] operator[SEP] identifier[mid] operator[SEP] identifier[append] operator[SEP] identifier[lastId] operator[SEP] operator[SEP] identifier[generatedModelIds] operator[SEP] identifier[put] operator[SEP] identifier[mt] , identifier[lastId] operator[SEP] operator[SEP] Keyword[return] identifier[mid] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static Collection<WorkUnitState> mergeAllSplitWorkUnits(FileSystem fs, Collection<WorkUnitState> workUnits) throws IOException { ListMultimap<CopyableFile, WorkUnitState> splitWorkUnitsMap = ArrayListMultimap.create(); for (WorkUnitState workUnit : workUnits) { if (isSplitWorkUnit(workUnit)) { CopyableFile copyableFile = (CopyableFile) CopySource.deserializeCopyEntity(workUnit); splitWorkUnitsMap.put(copyableFile, workUnit); } } for (CopyableFile file : splitWorkUnitsMap.keySet()) { log.info(String.format("Merging split file %s.", file.getDestination())); WorkUnitState oldWorkUnit = splitWorkUnitsMap.get(file).get(0); Path outputDir = FileAwareInputStreamDataWriter.getOutputDir(oldWorkUnit); CopyEntity.DatasetAndPartition datasetAndPartition = file.getDatasetAndPartition(CopySource.deserializeCopyableDataset(oldWorkUnit)); Path parentPath = FileAwareInputStreamDataWriter.getOutputFilePath(file, outputDir, datasetAndPartition) .getParent(); WorkUnitState newWorkUnit = mergeSplits(fs, file, splitWorkUnitsMap.get(file), parentPath); for (WorkUnitState wu : splitWorkUnitsMap.get(file)) { // Set to committed so that task states will not fail wu.setWorkingState(WorkUnitState.WorkingState.COMMITTED); workUnits.remove(wu); } workUnits.add(newWorkUnit); } return workUnits; }
class class_name[name] begin[{] method[mergeAllSplitWorkUnits, return_type[type[Collection]], modifier[public static], parameter[fs, workUnits]] begin[{] local_variable[type[ListMultimap], splitWorkUnitsMap] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=workUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSplitWorkUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=workUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deserializeCopyEntity, postfix_operators=[], prefix_operators=[], qualifier=CopySource, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CopyableFile, sub_type=None)), name=copyableFile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CopyableFile, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=copyableFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=workUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=splitWorkUnitsMap, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=workUnits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=workUnit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WorkUnitState, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Merging split file %s."), MethodInvocation(arguments=[], member=getDestination, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=info, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=splitWorkUnitsMap, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=oldWorkUnit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WorkUnitState, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=oldWorkUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOutputDir, postfix_operators=[], prefix_operators=[], qualifier=FileAwareInputStreamDataWriter, selectors=[], type_arguments=None), name=outputDir)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=oldWorkUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deserializeCopyableDataset, postfix_operators=[], prefix_operators=[], qualifier=CopySource, selectors=[], type_arguments=None)], member=getDatasetAndPartition, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), name=datasetAndPartition)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CopyEntity, sub_type=ReferenceType(arguments=None, dimensions=None, name=DatasetAndPartition, sub_type=None))), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outputDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=datasetAndPartition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOutputFilePath, postfix_operators=[], prefix_operators=[], qualifier=FileAwareInputStreamDataWriter, selectors=[MethodInvocation(arguments=[], member=getParent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=parentPath)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=splitWorkUnitsMap, selectors=[], type_arguments=None), MemberReference(member=parentPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mergeSplits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=newWorkUnit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WorkUnitState, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=COMMITTED, postfix_operators=[], prefix_operators=[], qualifier=WorkUnitState.WorkingState, selectors=[])], member=setWorkingState, postfix_operators=[], prefix_operators=[], qualifier=wu, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=wu, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=workUnits, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=splitWorkUnitsMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=wu)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WorkUnitState, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newWorkUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=workUnits, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=splitWorkUnitsMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CopyableFile, sub_type=None))), label=None) return[member[.workUnits]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Collection] operator[<] identifier[WorkUnitState] operator[>] identifier[mergeAllSplitWorkUnits] operator[SEP] identifier[FileSystem] identifier[fs] , identifier[Collection] operator[<] identifier[WorkUnitState] operator[>] identifier[workUnits] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ListMultimap] operator[<] identifier[CopyableFile] , identifier[WorkUnitState] operator[>] identifier[splitWorkUnitsMap] operator[=] identifier[ArrayListMultimap] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[WorkUnitState] identifier[workUnit] operator[:] identifier[workUnits] operator[SEP] { Keyword[if] operator[SEP] identifier[isSplitWorkUnit] operator[SEP] identifier[workUnit] operator[SEP] operator[SEP] { identifier[CopyableFile] identifier[copyableFile] operator[=] operator[SEP] identifier[CopyableFile] operator[SEP] identifier[CopySource] operator[SEP] identifier[deserializeCopyEntity] operator[SEP] identifier[workUnit] operator[SEP] operator[SEP] identifier[splitWorkUnitsMap] operator[SEP] identifier[put] operator[SEP] identifier[copyableFile] , identifier[workUnit] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[CopyableFile] identifier[file] operator[:] identifier[splitWorkUnitsMap] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[file] operator[SEP] identifier[getDestination] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[WorkUnitState] identifier[oldWorkUnit] operator[=] identifier[splitWorkUnitsMap] operator[SEP] identifier[get] operator[SEP] identifier[file] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[Path] identifier[outputDir] operator[=] identifier[FileAwareInputStreamDataWriter] operator[SEP] identifier[getOutputDir] operator[SEP] identifier[oldWorkUnit] operator[SEP] operator[SEP] identifier[CopyEntity] operator[SEP] identifier[DatasetAndPartition] identifier[datasetAndPartition] operator[=] identifier[file] operator[SEP] identifier[getDatasetAndPartition] operator[SEP] identifier[CopySource] operator[SEP] identifier[deserializeCopyableDataset] operator[SEP] identifier[oldWorkUnit] operator[SEP] operator[SEP] operator[SEP] identifier[Path] identifier[parentPath] operator[=] identifier[FileAwareInputStreamDataWriter] operator[SEP] identifier[getOutputFilePath] operator[SEP] identifier[file] , identifier[outputDir] , identifier[datasetAndPartition] operator[SEP] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] identifier[WorkUnitState] identifier[newWorkUnit] operator[=] identifier[mergeSplits] operator[SEP] identifier[fs] , identifier[file] , identifier[splitWorkUnitsMap] operator[SEP] identifier[get] operator[SEP] identifier[file] operator[SEP] , identifier[parentPath] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[WorkUnitState] identifier[wu] operator[:] identifier[splitWorkUnitsMap] operator[SEP] identifier[get] operator[SEP] identifier[file] operator[SEP] operator[SEP] { identifier[wu] operator[SEP] identifier[setWorkingState] operator[SEP] identifier[WorkUnitState] operator[SEP] identifier[WorkingState] operator[SEP] identifier[COMMITTED] operator[SEP] operator[SEP] identifier[workUnits] operator[SEP] identifier[remove] operator[SEP] identifier[wu] operator[SEP] operator[SEP] } identifier[workUnits] operator[SEP] identifier[add] operator[SEP] identifier[newWorkUnit] operator[SEP] operator[SEP] } Keyword[return] identifier[workUnits] operator[SEP] }
public boolean _attributeStreamIsAllocated(int semantics) { throwIfEmpty(); int attributeIndex = m_description.getAttributeIndex(semantics); if (attributeIndex >= 0 && m_vertexAttributes[attributeIndex] != null) return true; return false; }
class class_name[name] begin[{] method[_attributeStreamIsAllocated, return_type[type[boolean]], modifier[public], parameter[semantics]] begin[{] call[.throwIfEmpty, parameter[]] local_variable[type[int], attributeIndex] if[binary_operation[binary_operation[member[.attributeIndex], >=, literal[0]], &&, binary_operation[member[.m_vertexAttributes], !=, literal[null]]]] begin[{] return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[_attributeStreamIsAllocated] operator[SEP] Keyword[int] identifier[semantics] operator[SEP] { identifier[throwIfEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[attributeIndex] operator[=] identifier[m_description] operator[SEP] identifier[getAttributeIndex] operator[SEP] identifier[semantics] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attributeIndex] operator[>=] Other[0] operator[&&] identifier[m_vertexAttributes] operator[SEP] identifier[attributeIndex] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
@Override public CommerceWishList findByUuid_Last(String uuid, OrderByComparator<CommerceWishList> orderByComparator) throws NoSuchWishListException { CommerceWishList commerceWishList = fetchByUuid_Last(uuid, orderByComparator); if (commerceWishList != null) { return commerceWishList; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("uuid="); msg.append(uuid); msg.append("}"); throw new NoSuchWishListException(msg.toString()); }
class class_name[name] begin[{] method[findByUuid_Last, return_type[type[CommerceWishList]], modifier[public], parameter[uuid, orderByComparator]] begin[{] local_variable[type[CommerceWishList], commerceWishList] if[binary_operation[member[.commerceWishList], !=, literal[null]]] begin[{] return[member[.commerceWishList]] 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=NoSuchWishListException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceWishList] identifier[findByUuid_Last] operator[SEP] identifier[String] identifier[uuid] , identifier[OrderByComparator] operator[<] identifier[CommerceWishList] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchWishListException] { identifier[CommerceWishList] identifier[commerceWishList] operator[=] identifier[fetchByUuid_Last] operator[SEP] identifier[uuid] , identifier[orderByComparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commerceWishList] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[commerceWishList] 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[NoSuchWishListException] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public PropertiesWriter append( final String comment ) { String commentToAdd = "#" + comment; if( comment == null ) { commentToAdd = "#"; } m_content.add( commentToAdd ); return this; }
class class_name[name] begin[{] method[append, return_type[type[PropertiesWriter]], modifier[public], parameter[comment]] begin[{] local_variable[type[String], commentToAdd] if[binary_operation[member[.comment], ==, literal[null]]] begin[{] assign[member[.commentToAdd], literal["#"]] else begin[{] None end[}] call[m_content.add, parameter[member[.commentToAdd]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[PropertiesWriter] identifier[append] operator[SEP] Keyword[final] identifier[String] identifier[comment] operator[SEP] { identifier[String] identifier[commentToAdd] operator[=] literal[String] operator[+] identifier[comment] operator[SEP] Keyword[if] operator[SEP] identifier[comment] operator[==] Other[null] operator[SEP] { identifier[commentToAdd] operator[=] literal[String] operator[SEP] } identifier[m_content] operator[SEP] identifier[add] operator[SEP] identifier[commentToAdd] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void resetSections() { sections.clear(); init(getInnerBounds().width, getInnerBounds().height); repaint(getInnerBounds()); }
class class_name[name] begin[{] method[resetSections, return_type[void], modifier[public], parameter[]] begin[{] call[sections.clear, parameter[]] call[.init, parameter[call[.getInnerBounds, parameter[]], call[.getInnerBounds, parameter[]]]] call[.repaint, parameter[call[.getInnerBounds, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[resetSections] operator[SEP] operator[SEP] { identifier[sections] operator[SEP] identifier[clear] operator[SEP] 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] }
private Predicate toOrcPredicate(Expression pred) { if (pred instanceof Or) { Predicate c1 = toOrcPredicate(((Or) pred).left()); Predicate c2 = toOrcPredicate(((Or) pred).right()); if (c1 == null || c2 == null) { return null; } else { return new OrcRowInputFormat.Or(c1, c2); } } else if (pred instanceof Not) { Predicate c = toOrcPredicate(((Not) pred).child()); if (c == null) { return null; } else { return new OrcRowInputFormat.Not(c); } } else if (pred instanceof BinaryComparison) { BinaryComparison binComp = (BinaryComparison) pred; if (!isValid(binComp)) { // not a valid predicate LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred); return null; } PredicateLeaf.Type litType = getLiteralType(binComp); if (litType == null) { // unsupported literal type LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred); return null; } boolean literalOnRight = literalOnRight(binComp); String colName = getColumnName(binComp); // fetch literal and ensure it is serializable Object literalObj = getLiteral(binComp); Serializable literal; // validate that literal is serializable if (literalObj instanceof Serializable) { literal = (Serializable) literalObj; } else { LOG.warn("Encountered a non-serializable literal of type {}. " + "Cannot push predicate [{}] into OrcTableSource. " + "This is a bug and should be reported.", literalObj.getClass().getCanonicalName(), pred); return null; } if (pred instanceof EqualTo) { return new OrcRowInputFormat.Equals(colName, litType, literal); } else if (pred instanceof NotEqualTo) { return new OrcRowInputFormat.Not( new OrcRowInputFormat.Equals(colName, litType, literal)); } else if (pred instanceof GreaterThan) { if (literalOnRight) { return new OrcRowInputFormat.Not( new OrcRowInputFormat.LessThanEquals(colName, litType, literal)); } else { return new OrcRowInputFormat.LessThan(colName, litType, literal); } } else if (pred instanceof GreaterThanOrEqual) { if (literalOnRight) { return new OrcRowInputFormat.Not( new OrcRowInputFormat.LessThan(colName, litType, literal)); } else { return new OrcRowInputFormat.LessThanEquals(colName, litType, literal); } } else if (pred instanceof LessThan) { if (literalOnRight) { return new OrcRowInputFormat.LessThan(colName, litType, literal); } else { return new OrcRowInputFormat.Not( new OrcRowInputFormat.LessThanEquals(colName, litType, literal)); } } else if (pred instanceof LessThanOrEqual) { if (literalOnRight) { return new OrcRowInputFormat.LessThanEquals(colName, litType, literal); } else { return new OrcRowInputFormat.Not( new OrcRowInputFormat.LessThan(colName, litType, literal)); } } else { // unsupported predicate LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred); return null; } } else if (pred instanceof UnaryExpression) { UnaryExpression unary = (UnaryExpression) pred; if (!isValid(unary)) { // not a valid predicate LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred); return null; } PredicateLeaf.Type colType = toOrcType(((UnaryExpression) pred).child().resultType()); if (colType == null) { // unsupported type LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred); return null; } String colName = getColumnName(unary); if (pred instanceof IsNull) { return new OrcRowInputFormat.IsNull(colName, colType); } else if (pred instanceof IsNotNull) { return new OrcRowInputFormat.Not( new OrcRowInputFormat.IsNull(colName, colType)); } else { // unsupported predicate LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred); return null; } } else { // unsupported predicate LOG.debug("Unsupported predicate [{}] cannot be pushed into OrcTableSource.", pred); return null; } }
class class_name[name] begin[{] method[toOrcPredicate, return_type[type[Predicate]], modifier[private], parameter[pred]] begin[{] if[binary_operation[member[.pred], instanceof, type[Or]]] begin[{] local_variable[type[Predicate], c1] local_variable[type[Predicate], c2] if[binary_operation[binary_operation[member[.c1], ==, literal[null]], ||, binary_operation[member[.c2], ==, literal[null]]]] begin[{] return[literal[null]] else begin[{] return[ClassCreator(arguments=[MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c2, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=Or, sub_type=None)))] end[}] else begin[{] if[binary_operation[member[.pred], instanceof, type[Not]]] begin[{] local_variable[type[Predicate], c] if[binary_operation[member[.c], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] return[ClassCreator(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=Not, sub_type=None)))] end[}] else begin[{] if[binary_operation[member[.pred], instanceof, type[BinaryComparison]]] begin[{] local_variable[type[BinaryComparison], binComp] if[call[.isValid, parameter[member[.binComp]]]] begin[{] call[LOG.debug, parameter[literal["Unsupported predicate [{}] cannot be pushed into OrcTableSource."], member[.pred]]] return[literal[null]] else begin[{] None end[}] local_variable[type[PredicateLeaf], litType] if[binary_operation[member[.litType], ==, literal[null]]] begin[{] call[LOG.debug, parameter[literal["Unsupported predicate [{}] cannot be pushed into OrcTableSource."], member[.pred]]] return[literal[null]] else begin[{] None end[}] local_variable[type[boolean], literalOnRight] local_variable[type[String], colName] local_variable[type[Object], literalObj] local_variable[type[Serializable], literal] if[binary_operation[member[.literalObj], instanceof, type[Serializable]]] begin[{] assign[member[.literal], Cast(expression=MemberReference(member=literalObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Serializable, sub_type=None))] else begin[{] call[LOG.warn, parameter[binary_operation[binary_operation[literal["Encountered a non-serializable literal of type {}. "], +, literal["Cannot push predicate [{}] into OrcTableSource. "]], +, literal["This is a bug and should be reported."]], call[literalObj.getClass, parameter[]], member[.pred]]] return[literal[null]] end[}] if[binary_operation[member[.pred], instanceof, type[EqualTo]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=litType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=literal, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=Equals, sub_type=None)))] else begin[{] if[binary_operation[member[.pred], instanceof, type[NotEqualTo]]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=litType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=literal, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=Equals, sub_type=None)))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=Not, sub_type=None)))] else begin[{] if[binary_operation[member[.pred], instanceof, type[GreaterThan]]] begin[{] if[member[.literalOnRight]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=litType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=literal, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=LessThanEquals, sub_type=None)))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=Not, sub_type=None)))] else begin[{] return[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=litType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=literal, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=LessThan, sub_type=None)))] end[}] else begin[{] if[binary_operation[member[.pred], instanceof, type[GreaterThanOrEqual]]] begin[{] if[member[.literalOnRight]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=litType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=literal, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=LessThan, sub_type=None)))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=Not, sub_type=None)))] else begin[{] return[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=litType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=literal, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=LessThanEquals, sub_type=None)))] end[}] else begin[{] if[binary_operation[member[.pred], instanceof, type[LessThan]]] begin[{] if[member[.literalOnRight]] begin[{] return[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=litType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=literal, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=LessThan, sub_type=None)))] else begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=litType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=literal, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=LessThanEquals, sub_type=None)))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=Not, sub_type=None)))] end[}] else begin[{] if[binary_operation[member[.pred], instanceof, type[LessThanOrEqual]]] begin[{] if[member[.literalOnRight]] begin[{] return[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=litType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=literal, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=LessThanEquals, sub_type=None)))] else begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=litType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=literal, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=LessThan, sub_type=None)))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=Not, sub_type=None)))] end[}] else begin[{] call[LOG.debug, parameter[literal["Unsupported predicate [{}] cannot be pushed into OrcTableSource."], member[.pred]]] return[literal[null]] end[}] end[}] end[}] end[}] end[}] end[}] else begin[{] if[binary_operation[member[.pred], instanceof, type[UnaryExpression]]] begin[{] local_variable[type[UnaryExpression], unary] if[call[.isValid, parameter[member[.unary]]]] begin[{] call[LOG.debug, parameter[literal["Unsupported predicate [{}] cannot be pushed into OrcTableSource."], member[.pred]]] return[literal[null]] else begin[{] None end[}] local_variable[type[PredicateLeaf], colType] if[binary_operation[member[.colType], ==, literal[null]]] begin[{] call[LOG.debug, parameter[literal["Unsupported predicate [{}] cannot be pushed into OrcTableSource."], member[.pred]]] return[literal[null]] else begin[{] None end[}] local_variable[type[String], colName] if[binary_operation[member[.pred], instanceof, type[IsNull]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=colType, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=IsNull, sub_type=None)))] else begin[{] if[binary_operation[member[.pred], instanceof, type[IsNotNull]]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=colName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=colType, 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=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=IsNull, sub_type=None)))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OrcRowInputFormat, sub_type=ReferenceType(arguments=None, dimensions=None, name=Not, sub_type=None)))] else begin[{] call[LOG.debug, parameter[literal["Unsupported predicate [{}] cannot be pushed into OrcTableSource."], member[.pred]]] return[literal[null]] end[}] end[}] else begin[{] call[LOG.debug, parameter[literal["Unsupported predicate [{}] cannot be pushed into OrcTableSource."], member[.pred]]] return[literal[null]] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[private] identifier[Predicate] identifier[toOrcPredicate] operator[SEP] identifier[Expression] identifier[pred] operator[SEP] { Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[Or] operator[SEP] { identifier[Predicate] identifier[c1] operator[=] identifier[toOrcPredicate] operator[SEP] operator[SEP] operator[SEP] identifier[Or] operator[SEP] identifier[pred] operator[SEP] operator[SEP] identifier[left] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Predicate] identifier[c2] operator[=] identifier[toOrcPredicate] operator[SEP] operator[SEP] operator[SEP] identifier[Or] operator[SEP] identifier[pred] operator[SEP] operator[SEP] identifier[right] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c1] operator[==] Other[null] operator[||] identifier[c2] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[Or] operator[SEP] identifier[c1] , identifier[c2] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[Not] operator[SEP] { identifier[Predicate] identifier[c] operator[=] identifier[toOrcPredicate] operator[SEP] operator[SEP] operator[SEP] identifier[Not] operator[SEP] identifier[pred] operator[SEP] operator[SEP] identifier[child] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[Not] operator[SEP] identifier[c] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[BinaryComparison] operator[SEP] { identifier[BinaryComparison] identifier[binComp] operator[=] operator[SEP] identifier[BinaryComparison] operator[SEP] identifier[pred] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isValid] operator[SEP] identifier[binComp] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[pred] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } identifier[PredicateLeaf] operator[SEP] identifier[Type] identifier[litType] operator[=] identifier[getLiteralType] operator[SEP] identifier[binComp] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[litType] operator[==] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[pred] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[boolean] identifier[literalOnRight] operator[=] identifier[literalOnRight] operator[SEP] identifier[binComp] operator[SEP] operator[SEP] identifier[String] identifier[colName] operator[=] identifier[getColumnName] operator[SEP] identifier[binComp] operator[SEP] operator[SEP] identifier[Object] identifier[literalObj] operator[=] identifier[getLiteral] operator[SEP] identifier[binComp] operator[SEP] operator[SEP] identifier[Serializable] identifier[literal] operator[SEP] Keyword[if] operator[SEP] identifier[literalObj] Keyword[instanceof] identifier[Serializable] operator[SEP] { identifier[literal] operator[=] operator[SEP] identifier[Serializable] operator[SEP] identifier[literalObj] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] literal[String] operator[+] literal[String] , identifier[literalObj] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] , identifier[pred] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[EqualTo] operator[SEP] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[Equals] operator[SEP] identifier[colName] , identifier[litType] , identifier[literal] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[NotEqualTo] operator[SEP] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[Not] operator[SEP] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[Equals] operator[SEP] identifier[colName] , identifier[litType] , identifier[literal] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[GreaterThan] operator[SEP] { Keyword[if] operator[SEP] identifier[literalOnRight] operator[SEP] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[Not] operator[SEP] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[LessThanEquals] operator[SEP] identifier[colName] , identifier[litType] , identifier[literal] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[LessThan] operator[SEP] identifier[colName] , identifier[litType] , identifier[literal] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[GreaterThanOrEqual] operator[SEP] { Keyword[if] operator[SEP] identifier[literalOnRight] operator[SEP] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[Not] operator[SEP] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[LessThan] operator[SEP] identifier[colName] , identifier[litType] , identifier[literal] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[LessThanEquals] operator[SEP] identifier[colName] , identifier[litType] , identifier[literal] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[LessThan] operator[SEP] { Keyword[if] operator[SEP] identifier[literalOnRight] operator[SEP] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[LessThan] operator[SEP] identifier[colName] , identifier[litType] , identifier[literal] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[Not] operator[SEP] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[LessThanEquals] operator[SEP] identifier[colName] , identifier[litType] , identifier[literal] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[LessThanOrEqual] operator[SEP] { Keyword[if] operator[SEP] identifier[literalOnRight] operator[SEP] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[LessThanEquals] operator[SEP] identifier[colName] , identifier[litType] , identifier[literal] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[Not] operator[SEP] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[LessThan] operator[SEP] identifier[colName] , identifier[litType] , identifier[literal] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[pred] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[UnaryExpression] operator[SEP] { identifier[UnaryExpression] identifier[unary] operator[=] operator[SEP] identifier[UnaryExpression] operator[SEP] identifier[pred] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isValid] operator[SEP] identifier[unary] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[pred] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } identifier[PredicateLeaf] operator[SEP] identifier[Type] identifier[colType] operator[=] identifier[toOrcType] operator[SEP] operator[SEP] operator[SEP] identifier[UnaryExpression] operator[SEP] identifier[pred] operator[SEP] operator[SEP] identifier[child] operator[SEP] operator[SEP] operator[SEP] identifier[resultType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[colType] operator[==] Other[null] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[pred] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } identifier[String] identifier[colName] operator[=] identifier[getColumnName] operator[SEP] identifier[unary] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[IsNull] operator[SEP] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[IsNull] operator[SEP] identifier[colName] , identifier[colType] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[pred] Keyword[instanceof] identifier[IsNotNull] operator[SEP] { Keyword[return] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[Not] operator[SEP] Keyword[new] identifier[OrcRowInputFormat] operator[SEP] identifier[IsNull] operator[SEP] identifier[colName] , identifier[colType] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[pred] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } } Keyword[else] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[pred] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
private QNode getValidatedTail() { for (;;) { QNode h = this.head.get(); QNode first = h.next; if (first != null && first.next == first) { // help advance advanceHead(h, first); continue; } QNode t = this.tail.get(); QNode last = t.next; if (t == this.tail.get()) { if (last != null) { this.tail.compareAndSet(t, last); // help advance } else { return t; } } } }
class class_name[name] begin[{] method[getValidatedTail, return_type[type[QNode]], modifier[private], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=head, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=h)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=QNode, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=h, selectors=[]), name=first)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=QNode, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=first, selectors=[]), operandr=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=advanceHead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=tail, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=t)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=QNode, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[]), name=last)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=QNode, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=tail, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=tail, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compareAndSet, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]))]))]), control=ForControl(condition=None, init=None, update=None), label=None) end[}] END[}]
Keyword[private] identifier[QNode] identifier[getValidatedTail] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[QNode] identifier[h] operator[=] Keyword[this] operator[SEP] identifier[head] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[QNode] identifier[first] operator[=] identifier[h] operator[SEP] identifier[next] operator[SEP] Keyword[if] operator[SEP] identifier[first] operator[!=] Other[null] operator[&&] identifier[first] operator[SEP] identifier[next] operator[==] identifier[first] operator[SEP] { identifier[advanceHead] operator[SEP] identifier[h] , identifier[first] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[QNode] identifier[t] operator[=] Keyword[this] operator[SEP] identifier[tail] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[QNode] identifier[last] operator[=] identifier[t] operator[SEP] identifier[next] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[==] Keyword[this] operator[SEP] identifier[tail] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[last] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[tail] operator[SEP] identifier[compareAndSet] operator[SEP] identifier[t] , identifier[last] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[t] operator[SEP] } } } }
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { // Get the PlacementService. PlacementServiceInterface placementService = adManagerServices.get(session, PlacementServiceInterface.class); // Get all ad units. List<AdUnit> adUnits = getAllAdUnits(adManagerServices, session); // Partition ad units by their size. Set<String> mediumSquareAdUnitIds = Sets.newHashSet(); Set<String> skyscraperAdUnitIds = Sets.newHashSet(); Set<String> bannerAdUnitIds = Sets.newHashSet(); for (AdUnit adUnit : adUnits) { if (adUnit.getParentId() != null && adUnit.getAdUnitSizes() != null) { for (AdUnitSize adUnitSize : adUnit.getAdUnitSizes()) { Size size = adUnitSize.getSize(); if (size.getWidth() == 300 && size.getHeight() == 250) { mediumSquareAdUnitIds.add(adUnit.getId()); } else if (size.getWidth() == 120 && size.getHeight() == 600) { skyscraperAdUnitIds.add(adUnit.getId()); } else if (size.getWidth() == 468 && size.getHeight() == 60) { bannerAdUnitIds.add(adUnit.getId()); } } } } List<Placement> placementsToCreate = new ArrayList<>(); // Only create placements with one or more ad unit. if (!mediumSquareAdUnitIds.isEmpty()) { // Create medium square placement. Placement mediumSquareAdUnitPlacement = new Placement(); mediumSquareAdUnitPlacement.setName( "Medium Square AdUnit Placement #" + new Random().nextInt(Integer.MAX_VALUE)); mediumSquareAdUnitPlacement.setDescription( "Contains ad units that can hold creatives of size 300x250"); mediumSquareAdUnitPlacement.setTargetedAdUnitIds( mediumSquareAdUnitIds.toArray(new String[] {})); placementsToCreate.add(mediumSquareAdUnitPlacement); } if (!skyscraperAdUnitIds.isEmpty()) { // Create skyscraper placement. Placement skyscraperAdUnitPlacement = new Placement(); skyscraperAdUnitPlacement.setName( "Skyscraper AdUnit Placement #" + new Random().nextInt(Integer.MAX_VALUE)); skyscraperAdUnitPlacement.setDescription( "Contains ad units that can hold creatives of size 120x600"); skyscraperAdUnitPlacement.setTargetedAdUnitIds(skyscraperAdUnitIds.toArray(new String[] {})); placementsToCreate.add(skyscraperAdUnitPlacement); } if (!bannerAdUnitIds.isEmpty()) { // Create banner placement. Placement bannerAdUnitPlacement = new Placement(); bannerAdUnitPlacement.setName( "Banner AdUnit Placement #" + new Random().nextInt(Integer.MAX_VALUE)); bannerAdUnitPlacement.setDescription( "Contains ad units that can hold creatives of size 468x60"); bannerAdUnitPlacement.setTargetedAdUnitIds(bannerAdUnitIds.toArray(new String[] {})); placementsToCreate.add(bannerAdUnitPlacement); } if (!placementsToCreate.isEmpty()) { // Create the placements on the server. Placement[] placements = placementService.createPlacements(placementsToCreate.toArray(new Placement[] {})); for (Placement createdPlacement : placements) { System.out.printf( "A placement with ID %d, name '%s', and containing ad units [%s] was created.%n", createdPlacement.getId(), createdPlacement.getName(), Joiner.on(", ").join(createdPlacement.getTargetedAdUnitIds())); } } else { System.out.println("No placements were created."); } }
class class_name[name] begin[{] method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session]] begin[{] local_variable[type[PlacementServiceInterface], placementService] local_variable[type[List], adUnits] local_variable[type[Set], mediumSquareAdUnitIds] local_variable[type[Set], skyscraperAdUnitIds] local_variable[type[Set], bannerAdUnitIds] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getParentId, postfix_operators=[], prefix_operators=[], qualifier=adUnit, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAdUnitSizes, postfix_operators=[], prefix_operators=[], qualifier=adUnit, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSize, postfix_operators=[], prefix_operators=[], qualifier=adUnitSize, selectors=[], type_arguments=None), name=size)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Size, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=size, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=300), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=size, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=250), operator===), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=size, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=120), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=size, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=600), operator===), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=size, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=468), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=size, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=adUnit, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=bannerAdUnitIds, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=adUnit, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=skyscraperAdUnitIds, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=adUnit, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=mediumSquareAdUnitIds, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAdUnitSizes, postfix_operators=[], prefix_operators=[], qualifier=adUnit, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=adUnitSize)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AdUnitSize, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=adUnits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=adUnit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AdUnit, sub_type=None))), label=None) local_variable[type[List], placementsToCreate] if[call[mediumSquareAdUnitIds.isEmpty, parameter[]]] begin[{] local_variable[type[Placement], mediumSquareAdUnitPlacement] call[mediumSquareAdUnitPlacement.setName, parameter[binary_operation[literal["Medium Square AdUnit Placement #"], +, ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[])], member=nextInt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Random, sub_type=None))]]] call[mediumSquareAdUnitPlacement.setDescription, parameter[literal["Contains ad units that can hold creatives of size 300x250"]]] call[mediumSquareAdUnitPlacement.setTargetedAdUnitIds, parameter[call[mediumSquareAdUnitIds.toArray, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]]] call[placementsToCreate.add, parameter[member[.mediumSquareAdUnitPlacement]]] else begin[{] None end[}] if[call[skyscraperAdUnitIds.isEmpty, parameter[]]] begin[{] local_variable[type[Placement], skyscraperAdUnitPlacement] call[skyscraperAdUnitPlacement.setName, parameter[binary_operation[literal["Skyscraper AdUnit Placement #"], +, ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[])], member=nextInt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Random, sub_type=None))]]] call[skyscraperAdUnitPlacement.setDescription, parameter[literal["Contains ad units that can hold creatives of size 120x600"]]] call[skyscraperAdUnitPlacement.setTargetedAdUnitIds, parameter[call[skyscraperAdUnitIds.toArray, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]]] call[placementsToCreate.add, parameter[member[.skyscraperAdUnitPlacement]]] else begin[{] None end[}] if[call[bannerAdUnitIds.isEmpty, parameter[]]] begin[{] local_variable[type[Placement], bannerAdUnitPlacement] call[bannerAdUnitPlacement.setName, parameter[binary_operation[literal["Banner AdUnit Placement #"], +, ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[])], member=nextInt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Random, sub_type=None))]]] call[bannerAdUnitPlacement.setDescription, parameter[literal["Contains ad units that can hold creatives of size 468x60"]]] call[bannerAdUnitPlacement.setTargetedAdUnitIds, parameter[call[bannerAdUnitIds.toArray, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]]] call[placementsToCreate.add, parameter[member[.bannerAdUnitPlacement]]] else begin[{] None end[}] if[call[placementsToCreate.isEmpty, parameter[]]] begin[{] local_variable[type[Placement], placements] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="A placement with ID %d, name '%s', and containing ad units [%s] was created.%n"), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=createdPlacement, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=createdPlacement, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", ")], member=on, postfix_operators=[], prefix_operators=[], qualifier=Joiner, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTargetedAdUnitIds, postfix_operators=[], prefix_operators=[], qualifier=createdPlacement, selectors=[], type_arguments=None)], member=join, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=printf, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=placements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=createdPlacement)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Placement, sub_type=None))), label=None) else begin[{] call[System.out.println, parameter[literal["No placements were created."]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] operator[SEP] Keyword[throws] identifier[RemoteException] { identifier[PlacementServiceInterface] identifier[placementService] operator[=] identifier[adManagerServices] operator[SEP] identifier[get] operator[SEP] identifier[session] , identifier[PlacementServiceInterface] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[AdUnit] operator[>] identifier[adUnits] operator[=] identifier[getAllAdUnits] operator[SEP] identifier[adManagerServices] , identifier[session] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[mediumSquareAdUnitIds] operator[=] identifier[Sets] operator[SEP] identifier[newHashSet] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[skyscraperAdUnitIds] operator[=] identifier[Sets] operator[SEP] identifier[newHashSet] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[bannerAdUnitIds] operator[=] identifier[Sets] operator[SEP] identifier[newHashSet] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[AdUnit] identifier[adUnit] operator[:] identifier[adUnits] operator[SEP] { Keyword[if] operator[SEP] identifier[adUnit] operator[SEP] identifier[getParentId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[adUnit] operator[SEP] identifier[getAdUnitSizes] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[AdUnitSize] identifier[adUnitSize] operator[:] identifier[adUnit] operator[SEP] identifier[getAdUnitSizes] operator[SEP] operator[SEP] operator[SEP] { identifier[Size] identifier[size] operator[=] identifier[adUnitSize] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[==] Other[300] operator[&&] identifier[size] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[==] Other[250] operator[SEP] { identifier[mediumSquareAdUnitIds] operator[SEP] identifier[add] operator[SEP] identifier[adUnit] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[size] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[==] Other[120] operator[&&] identifier[size] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[==] Other[600] operator[SEP] { identifier[skyscraperAdUnitIds] operator[SEP] identifier[add] operator[SEP] identifier[adUnit] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[size] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[==] Other[468] operator[&&] identifier[size] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[==] Other[60] operator[SEP] { identifier[bannerAdUnitIds] operator[SEP] identifier[add] operator[SEP] identifier[adUnit] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } identifier[List] operator[<] identifier[Placement] operator[>] identifier[placementsToCreate] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[mediumSquareAdUnitIds] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Placement] identifier[mediumSquareAdUnitPlacement] operator[=] Keyword[new] identifier[Placement] operator[SEP] operator[SEP] operator[SEP] identifier[mediumSquareAdUnitPlacement] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[+] Keyword[new] identifier[Random] operator[SEP] operator[SEP] operator[SEP] identifier[nextInt] operator[SEP] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] operator[SEP] identifier[mediumSquareAdUnitPlacement] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mediumSquareAdUnitPlacement] operator[SEP] identifier[setTargetedAdUnitIds] operator[SEP] identifier[mediumSquareAdUnitIds] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] operator[SEP] identifier[placementsToCreate] operator[SEP] identifier[add] operator[SEP] identifier[mediumSquareAdUnitPlacement] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[skyscraperAdUnitIds] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Placement] identifier[skyscraperAdUnitPlacement] operator[=] Keyword[new] identifier[Placement] operator[SEP] operator[SEP] operator[SEP] identifier[skyscraperAdUnitPlacement] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[+] Keyword[new] identifier[Random] operator[SEP] operator[SEP] operator[SEP] identifier[nextInt] operator[SEP] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] operator[SEP] identifier[skyscraperAdUnitPlacement] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[skyscraperAdUnitPlacement] operator[SEP] identifier[setTargetedAdUnitIds] operator[SEP] identifier[skyscraperAdUnitIds] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] operator[SEP] identifier[placementsToCreate] operator[SEP] identifier[add] operator[SEP] identifier[skyscraperAdUnitPlacement] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[bannerAdUnitIds] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Placement] identifier[bannerAdUnitPlacement] operator[=] Keyword[new] identifier[Placement] operator[SEP] operator[SEP] operator[SEP] identifier[bannerAdUnitPlacement] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[+] Keyword[new] identifier[Random] operator[SEP] operator[SEP] operator[SEP] identifier[nextInt] operator[SEP] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] operator[SEP] identifier[bannerAdUnitPlacement] operator[SEP] identifier[setDescription] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[bannerAdUnitPlacement] operator[SEP] identifier[setTargetedAdUnitIds] operator[SEP] identifier[bannerAdUnitIds] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] operator[SEP] identifier[placementsToCreate] operator[SEP] identifier[add] operator[SEP] identifier[bannerAdUnitPlacement] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[placementsToCreate] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Placement] operator[SEP] operator[SEP] identifier[placements] operator[=] identifier[placementService] operator[SEP] identifier[createPlacements] operator[SEP] identifier[placementsToCreate] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[Placement] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Placement] identifier[createdPlacement] operator[:] identifier[placements] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[printf] operator[SEP] literal[String] , identifier[createdPlacement] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[createdPlacement] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[Joiner] operator[SEP] identifier[on] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[join] operator[SEP] identifier[createdPlacement] operator[SEP] identifier[getTargetedAdUnitIds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
private static void reflectionAppend( final Object lhs, final Object rhs, final Class<?> clazz, final EqualsBuilder builder, final boolean useTransients, final String[] excludeFields) { if (isRegistered(lhs, rhs)) { return; } try { register(lhs, rhs); final Field[] fields = clazz.getDeclaredFields(); AccessibleObject.setAccessible(fields, true); for (int i = 0; i < fields.length && builder.isEquals; i++) { final Field f = fields[i]; if (false == ArrayUtil.contains(excludeFields, f.getName()) && (f.getName().indexOf('$') == -1) && (useTransients || !Modifier.isTransient(f.getModifiers())) && (!Modifier.isStatic(f.getModifiers()))) { try { builder.append(f.get(lhs), f.get(rhs)); } catch (final IllegalAccessException e) { //this can't happen. Would get a Security exception instead //throw a runtime exception in case the impossible happens. throw new InternalError("Unexpected IllegalAccessException"); } } } } finally { unregister(lhs, rhs); } }
class class_name[name] begin[{] method[reflectionAppend, return_type[void], modifier[private static], parameter[lhs, rhs, clazz, builder, useTransients, excludeFields]] begin[{] if[call[.isRegistered, parameter[member[.lhs], member[.rhs]]]] begin[{] return[None] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=register, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDeclaredFields, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), name=fields)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[None], name=Field, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAccessible, postfix_operators=[], prefix_operators=[], qualifier=AccessibleObject, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=f)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), operandr=MethodInvocation(arguments=[MemberReference(member=excludeFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None)], member=contains, postfix_operators=[], prefix_operators=[], qualifier=ArrayUtil, selectors=[], type_arguments=None), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='$')], member=indexOf, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=useTransients, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getModifiers, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None)], member=isTransient, postfix_operators=[], prefix_operators=['!'], qualifier=Modifier, selectors=[], type_arguments=None), operator=||), operator=&&), operandr=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), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=lhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=rhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected IllegalAccessException")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InternalError, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException']))], finally_block=None, label=None, resources=None)]))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=fields, selectors=[]), operator=<), operandr=MemberReference(member=isEquals, postfix_operators=[], prefix_operators=[], qualifier=builder, 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)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rhs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unregister, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[reflectionAppend] operator[SEP] Keyword[final] identifier[Object] identifier[lhs] , Keyword[final] identifier[Object] identifier[rhs] , Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , Keyword[final] identifier[EqualsBuilder] identifier[builder] , Keyword[final] Keyword[boolean] identifier[useTransients] , Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[excludeFields] operator[SEP] { Keyword[if] operator[SEP] identifier[isRegistered] operator[SEP] identifier[lhs] , identifier[rhs] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[try] { identifier[register] operator[SEP] identifier[lhs] , identifier[rhs] operator[SEP] operator[SEP] Keyword[final] identifier[Field] operator[SEP] operator[SEP] identifier[fields] operator[=] identifier[clazz] operator[SEP] identifier[getDeclaredFields] operator[SEP] operator[SEP] operator[SEP] identifier[AccessibleObject] operator[SEP] identifier[setAccessible] operator[SEP] identifier[fields] , literal[boolean] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[fields] operator[SEP] identifier[length] operator[&&] identifier[builder] operator[SEP] identifier[isEquals] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[Field] identifier[f] operator[=] identifier[fields] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[boolean] operator[==] identifier[ArrayUtil] operator[SEP] identifier[contains] operator[SEP] identifier[excludeFields] , identifier[f] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[f] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] operator[&&] operator[SEP] identifier[useTransients] operator[||] operator[!] identifier[Modifier] operator[SEP] identifier[isTransient] operator[SEP] identifier[f] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[&&] 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] operator[SEP] { Keyword[try] { identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[f] operator[SEP] identifier[get] operator[SEP] identifier[lhs] operator[SEP] , identifier[f] operator[SEP] identifier[get] operator[SEP] identifier[rhs] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[InternalError] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } } Keyword[finally] { identifier[unregister] operator[SEP] identifier[lhs] , identifier[rhs] operator[SEP] operator[SEP] } }
public static HashCode sign(MetricValue value) { Hasher h = Hashing.md5().newHasher(); return putMetricValue(h, value).hash(); }
class class_name[name] begin[{] method[sign, return_type[type[HashCode]], modifier[public static], parameter[value]] begin[{] local_variable[type[Hasher], h] return[call[.putMetricValue, parameter[member[.h], member[.value]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HashCode] identifier[sign] operator[SEP] identifier[MetricValue] identifier[value] operator[SEP] { identifier[Hasher] identifier[h] operator[=] identifier[Hashing] operator[SEP] identifier[md5] operator[SEP] operator[SEP] operator[SEP] identifier[newHasher] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[putMetricValue] operator[SEP] identifier[h] , identifier[value] operator[SEP] operator[SEP] identifier[hash] operator[SEP] operator[SEP] operator[SEP] }
public Observable<List<HostingEnvironmentDiagnosticsInner>> listDiagnosticsAsync(String resourceGroupName, String name) { return listDiagnosticsWithServiceResponseAsync(resourceGroupName, name).map(new Func1<ServiceResponse<List<HostingEnvironmentDiagnosticsInner>>, List<HostingEnvironmentDiagnosticsInner>>() { @Override public List<HostingEnvironmentDiagnosticsInner> call(ServiceResponse<List<HostingEnvironmentDiagnosticsInner>> response) { return response.body(); } }); }
class class_name[name] begin[{] method[listDiagnosticsAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, name]] begin[{] return[call[.listDiagnosticsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.name]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[List] operator[<] identifier[HostingEnvironmentDiagnosticsInner] operator[>] operator[>] identifier[listDiagnosticsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[listDiagnosticsWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[name] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[HostingEnvironmentDiagnosticsInner] operator[>] operator[>] , identifier[List] operator[<] identifier[HostingEnvironmentDiagnosticsInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[HostingEnvironmentDiagnosticsInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[HostingEnvironmentDiagnosticsInner] operator[>] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void setTraceSegmentDocuments(java.util.Collection<String> traceSegmentDocuments) { if (traceSegmentDocuments == null) { this.traceSegmentDocuments = null; return; } this.traceSegmentDocuments = new java.util.ArrayList<String>(traceSegmentDocuments); }
class class_name[name] begin[{] method[setTraceSegmentDocuments, return_type[void], modifier[public], parameter[traceSegmentDocuments]] begin[{] if[binary_operation[member[.traceSegmentDocuments], ==, literal[null]]] begin[{] assign[THIS[member[None.traceSegmentDocuments]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.traceSegmentDocuments]], ClassCreator(arguments=[MemberReference(member=traceSegmentDocuments, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setTraceSegmentDocuments] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[traceSegmentDocuments] operator[SEP] { Keyword[if] operator[SEP] identifier[traceSegmentDocuments] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[traceSegmentDocuments] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[traceSegmentDocuments] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[traceSegmentDocuments] operator[SEP] operator[SEP] }
public static Pane loadFxmlPane(final String fxmlFileUri, final Class clazz) throws CouldNotPerformException { return loadFxmlPaneAndControllerPair(fxmlFileUri, clazz, DEFAULT_CONTROLLER_FACTORY).getKey(); }
class class_name[name] begin[{] method[loadFxmlPane, return_type[type[Pane]], modifier[public static], parameter[fxmlFileUri, clazz]] begin[{] return[call[.loadFxmlPaneAndControllerPair, parameter[member[.fxmlFileUri], member[.clazz], member[.DEFAULT_CONTROLLER_FACTORY]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Pane] identifier[loadFxmlPane] operator[SEP] Keyword[final] identifier[String] identifier[fxmlFileUri] , Keyword[final] identifier[Class] identifier[clazz] operator[SEP] Keyword[throws] identifier[CouldNotPerformException] { Keyword[return] identifier[loadFxmlPaneAndControllerPair] operator[SEP] identifier[fxmlFileUri] , identifier[clazz] , identifier[DEFAULT_CONTROLLER_FACTORY] operator[SEP] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] }
private void processProjectProperties(APIBusinessObjects apibo, ProjectType project) { ProjectProperties properties = m_projectFile.getProjectProperties(); properties.setCreationDate(project.getCreateDate()); properties.setFinishDate(project.getFinishDate()); properties.setName(project.getName()); properties.setStartDate(project.getPlannedStartDate()); properties.setStatusDate(project.getDataDate()); properties.setProjectTitle(project.getId()); properties.setUniqueID(project.getObjectId() == null ? null : project.getObjectId().toString()); List<GlobalPreferencesType> list = apibo.getGlobalPreferences(); if (!list.isEmpty()) { GlobalPreferencesType prefs = list.get(0); properties.setCreationDate(prefs.getCreateDate()); properties.setLastSaved(prefs.getLastUpdateDate()); properties.setMinutesPerDay(Integer.valueOf((int) (NumberHelper.getDouble(prefs.getHoursPerDay()) * 60))); properties.setMinutesPerWeek(Integer.valueOf((int) (NumberHelper.getDouble(prefs.getHoursPerWeek()) * 60))); properties.setWeekStartDay(Day.getInstance(NumberHelper.getInt(prefs.getStartDayOfWeek()))); List<CurrencyType> currencyList = apibo.getCurrency(); for (CurrencyType currency : currencyList) { if (currency.getObjectId().equals(prefs.getBaseCurrencyObjectId())) { properties.setCurrencySymbol(currency.getSymbol()); break; } } } }
class class_name[name] begin[{] method[processProjectProperties, return_type[void], modifier[private], parameter[apibo, project]] begin[{] local_variable[type[ProjectProperties], properties] call[properties.setCreationDate, parameter[call[project.getCreateDate, parameter[]]]] call[properties.setFinishDate, parameter[call[project.getFinishDate, parameter[]]]] call[properties.setName, parameter[call[project.getName, parameter[]]]] call[properties.setStartDate, parameter[call[project.getPlannedStartDate, parameter[]]]] call[properties.setStatusDate, parameter[call[project.getDataDate, parameter[]]]] call[properties.setProjectTitle, parameter[call[project.getId, parameter[]]]] call[properties.setUniqueID, parameter[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getObjectId, postfix_operators=[], prefix_operators=[], qualifier=project, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=getObjectId, postfix_operators=[], prefix_operators=[], qualifier=project, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))]] local_variable[type[List], list] if[call[list.isEmpty, parameter[]]] begin[{] local_variable[type[GlobalPreferencesType], prefs] call[properties.setCreationDate, parameter[call[prefs.getCreateDate, parameter[]]]] call[properties.setLastSaved, parameter[call[prefs.getLastUpdateDate, parameter[]]]] call[properties.setMinutesPerDay, parameter[call[Integer.valueOf, parameter[Cast(expression=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHoursPerDay, postfix_operators=[], prefix_operators=[], qualifier=prefs, selectors=[], type_arguments=None)], member=getDouble, postfix_operators=[], prefix_operators=[], qualifier=NumberHelper, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), operator=*), type=BasicType(dimensions=[], name=int))]]]] call[properties.setMinutesPerWeek, parameter[call[Integer.valueOf, parameter[Cast(expression=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHoursPerWeek, postfix_operators=[], prefix_operators=[], qualifier=prefs, selectors=[], type_arguments=None)], member=getDouble, postfix_operators=[], prefix_operators=[], qualifier=NumberHelper, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), operator=*), type=BasicType(dimensions=[], name=int))]]]] call[properties.setWeekStartDay, parameter[call[Day.getInstance, parameter[call[NumberHelper.getInt, parameter[call[prefs.getStartDayOfWeek, parameter[]]]]]]]] local_variable[type[List], currencyList] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getObjectId, postfix_operators=[], prefix_operators=[], qualifier=currency, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBaseCurrencyObjectId, postfix_operators=[], prefix_operators=[], qualifier=prefs, selectors=[], type_arguments=None)], member=equals, 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=[MethodInvocation(arguments=[], member=getSymbol, postfix_operators=[], prefix_operators=[], qualifier=currency, selectors=[], type_arguments=None)], member=setCurrencySymbol, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=currencyList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=currency)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CurrencyType, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[processProjectProperties] operator[SEP] identifier[APIBusinessObjects] identifier[apibo] , identifier[ProjectType] identifier[project] operator[SEP] { identifier[ProjectProperties] identifier[properties] operator[=] identifier[m_projectFile] operator[SEP] identifier[getProjectProperties] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setCreationDate] operator[SEP] identifier[project] operator[SEP] identifier[getCreateDate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setFinishDate] operator[SEP] identifier[project] operator[SEP] identifier[getFinishDate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setName] operator[SEP] identifier[project] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setStartDate] operator[SEP] identifier[project] operator[SEP] identifier[getPlannedStartDate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setStatusDate] operator[SEP] identifier[project] operator[SEP] identifier[getDataDate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setProjectTitle] operator[SEP] identifier[project] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setUniqueID] operator[SEP] identifier[project] operator[SEP] identifier[getObjectId] operator[SEP] operator[SEP] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[project] operator[SEP] identifier[getObjectId] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[GlobalPreferencesType] operator[>] identifier[list] operator[=] identifier[apibo] operator[SEP] identifier[getGlobalPreferences] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[list] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[GlobalPreferencesType] identifier[prefs] operator[=] identifier[list] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setCreationDate] operator[SEP] identifier[prefs] operator[SEP] identifier[getCreateDate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setLastSaved] operator[SEP] identifier[prefs] operator[SEP] identifier[getLastUpdateDate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setMinutesPerDay] operator[SEP] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[NumberHelper] operator[SEP] identifier[getDouble] operator[SEP] identifier[prefs] operator[SEP] identifier[getHoursPerDay] operator[SEP] operator[SEP] operator[SEP] operator[*] Other[60] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setMinutesPerWeek] operator[SEP] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[NumberHelper] operator[SEP] identifier[getDouble] operator[SEP] identifier[prefs] operator[SEP] identifier[getHoursPerWeek] operator[SEP] operator[SEP] operator[SEP] operator[*] Other[60] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[setWeekStartDay] operator[SEP] identifier[Day] operator[SEP] identifier[getInstance] operator[SEP] identifier[NumberHelper] operator[SEP] identifier[getInt] operator[SEP] identifier[prefs] operator[SEP] identifier[getStartDayOfWeek] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[CurrencyType] operator[>] identifier[currencyList] operator[=] identifier[apibo] operator[SEP] identifier[getCurrency] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CurrencyType] identifier[currency] operator[:] identifier[currencyList] operator[SEP] { Keyword[if] operator[SEP] identifier[currency] operator[SEP] identifier[getObjectId] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[prefs] operator[SEP] identifier[getBaseCurrencyObjectId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[properties] operator[SEP] identifier[setCurrencySymbol] operator[SEP] identifier[currency] operator[SEP] identifier[getSymbol] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } }
public void callAttach(Context context) { ReflectionHelpers.callInstanceMethod(Application.class, realApplication, "attach", ReflectionHelpers.ClassParameter.from(Context.class, context)); }
class class_name[name] begin[{] method[callAttach, return_type[void], modifier[public], parameter[context]] begin[{] call[ReflectionHelpers.callInstanceMethod, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Application, sub_type=None)), member[.realApplication], literal["attach"], call[ReflectionHelpers.ClassParameter.from, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Context, sub_type=None)), member[.context]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[callAttach] operator[SEP] identifier[Context] identifier[context] operator[SEP] { identifier[ReflectionHelpers] operator[SEP] identifier[callInstanceMethod] operator[SEP] identifier[Application] operator[SEP] Keyword[class] , identifier[realApplication] , literal[String] , identifier[ReflectionHelpers] operator[SEP] identifier[ClassParameter] operator[SEP] identifier[from] operator[SEP] identifier[Context] operator[SEP] Keyword[class] , identifier[context] operator[SEP] operator[SEP] operator[SEP] }
public static void registerConverters(Set<?> converters, ConverterRegistry registry) { if (converters != null) { for (Object converter : converters) { if (converter instanceof GenericConverter) { registry.addConverter((GenericConverter) converter); } else if (converter instanceof Converter<?, ?>) { registry.addConverter((Converter<?, ?>) converter); } else if (converter instanceof ConverterFactory<?, ?>) { registry.addConverterFactory((ConverterFactory<?, ?>) converter); } else { throw new IllegalArgumentException("Each converter object must implement one of the " + "Converter, ConverterFactory, or GenericConverter interfaces"); } } } }
class class_name[name] begin[{] method[registerConverters, return_type[void], modifier[public static], parameter[converters, registry]] begin[{] if[binary_operation[member[.converters], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=GenericConverter, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Converter, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=ConverterFactory, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Each converter object must implement one of the "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Converter, ConverterFactory, or GenericConverter interfaces"), 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)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=ConverterFactory, sub_type=None))], member=addConverterFactory, postfix_operators=[], prefix_operators=[], qualifier=registry, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Converter, sub_type=None))], member=addConverter, postfix_operators=[], prefix_operators=[], qualifier=registry, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GenericConverter, sub_type=None))], member=addConverter, postfix_operators=[], prefix_operators=[], qualifier=registry, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=converters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=converter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[registerConverters] operator[SEP] identifier[Set] operator[<] operator[?] operator[>] identifier[converters] , identifier[ConverterRegistry] identifier[registry] operator[SEP] { Keyword[if] operator[SEP] identifier[converters] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[Object] identifier[converter] operator[:] identifier[converters] operator[SEP] { Keyword[if] operator[SEP] identifier[converter] Keyword[instanceof] identifier[GenericConverter] operator[SEP] { identifier[registry] operator[SEP] identifier[addConverter] operator[SEP] operator[SEP] identifier[GenericConverter] operator[SEP] identifier[converter] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[converter] Keyword[instanceof] identifier[Converter] operator[<] operator[?] , operator[?] operator[>] operator[SEP] { identifier[registry] operator[SEP] identifier[addConverter] operator[SEP] operator[SEP] identifier[Converter] operator[<] operator[?] , operator[?] operator[>] operator[SEP] identifier[converter] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[converter] Keyword[instanceof] identifier[ConverterFactory] operator[<] operator[?] , operator[?] operator[>] operator[SEP] { identifier[registry] operator[SEP] identifier[addConverterFactory] operator[SEP] operator[SEP] identifier[ConverterFactory] operator[<] operator[?] , operator[?] operator[>] operator[SEP] identifier[converter] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } } } }
public static void addPermission(Permission perm, ClassLoader loader) { for (; loader != null; loader = loader.getParent()) { if (loader instanceof EnvironmentClassLoader) { EnvironmentClassLoader envLoader = (EnvironmentClassLoader) loader; envLoader.addPermission(perm); } } }
class class_name[name] begin[{] method[addPermission, return_type[void], modifier[public static], parameter[perm, loader]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=loader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=EnvironmentClassLoader, 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=loader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=EnvironmentClassLoader, sub_type=None)), name=envLoader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EnvironmentClassLoader, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=perm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addPermission, postfix_operators=[], prefix_operators=[], qualifier=envLoader, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=loader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=None, update=[Assignment(expressionl=MemberReference(member=loader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getParent, postfix_operators=[], prefix_operators=[], qualifier=loader, selectors=[], type_arguments=None))]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[addPermission] operator[SEP] identifier[Permission] identifier[perm] , identifier[ClassLoader] identifier[loader] operator[SEP] { Keyword[for] operator[SEP] operator[SEP] identifier[loader] operator[!=] Other[null] operator[SEP] identifier[loader] operator[=] identifier[loader] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[loader] Keyword[instanceof] identifier[EnvironmentClassLoader] operator[SEP] { identifier[EnvironmentClassLoader] identifier[envLoader] operator[=] operator[SEP] identifier[EnvironmentClassLoader] operator[SEP] identifier[loader] operator[SEP] identifier[envLoader] operator[SEP] identifier[addPermission] operator[SEP] identifier[perm] operator[SEP] operator[SEP] } } }
public static Timecode valueOf(String timecode) throws IllegalArgumentException { Timecode tc = new Timecode(); return (Timecode) tc.parse(timecode); }
class class_name[name] begin[{] method[valueOf, return_type[type[Timecode]], modifier[public static], parameter[timecode]] begin[{] local_variable[type[Timecode], tc] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=timecode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Timecode, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Timecode] identifier[valueOf] operator[SEP] identifier[String] identifier[timecode] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] { identifier[Timecode] identifier[tc] operator[=] Keyword[new] identifier[Timecode] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[Timecode] operator[SEP] identifier[tc] operator[SEP] identifier[parse] operator[SEP] identifier[timecode] operator[SEP] operator[SEP] }
public static ParameterTool fromArgs(String[] args) { final Map<String, String> map = new HashMap<>(args.length / 2); int i = 0; while (i < args.length) { final String key; if (args[i].startsWith("--")) { key = args[i].substring(2); } else if (args[i].startsWith("-")) { key = args[i].substring(1); } else { throw new IllegalArgumentException( String.format("Error parsing arguments '%s' on '%s'. Please prefix keys with -- or -.", Arrays.toString(args), args[i])); } if (key.isEmpty()) { throw new IllegalArgumentException( "The input " + Arrays.toString(args) + " contains an empty argument"); } i += 1; // try to find the value if (i >= args.length) { map.put(key, NO_VALUE_KEY); } else if (NumberUtils.isNumber(args[i])) { map.put(key, args[i]); i += 1; } else if (args[i].startsWith("--") || args[i].startsWith("-")) { // the argument cannot be a negative number because we checked earlier // -> the next argument is a parameter name map.put(key, NO_VALUE_KEY); } else { map.put(key, args[i]); i += 1; } } return fromMap(map); }
class class_name[name] begin[{] method[fromArgs, return_type[type[ParameterTool]], modifier[public static], parameter[args]] begin[{] local_variable[type[Map], map] local_variable[type[int], i] while[binary_operation[member[.i], <, member[args.length]]] begin[{] local_variable[type[String], key] if[member[.args]] begin[{] assign[member[.key], member[.args]] else begin[{] if[member[.args]] begin[{] assign[member[.key], member[.args]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error parsing arguments '%s' on '%s'. Please prefix keys with -- or -."), MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None), MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=IllegalArgumentException, sub_type=None)), label=None) end[}] end[}] if[call[key.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The input "), operandr=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" contains an empty argument"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.i], literal[1]] if[binary_operation[member[.i], >=, member[args.length]]] begin[{] call[map.put, parameter[member[.key], member[.NO_VALUE_KEY]]] else begin[{] if[call[NumberUtils.isNumber, parameter[member[.args]]]] begin[{] call[map.put, parameter[member[.key], member[.args]]] assign[member[.i], literal[1]] else begin[{] if[binary_operation[member[.args], ||, member[.args]]] begin[{] call[map.put, parameter[member[.key], member[.NO_VALUE_KEY]]] else begin[{] call[map.put, parameter[member[.key], member[.args]]] assign[member[.i], literal[1]] end[}] end[}] end[}] end[}] return[call[.fromMap, parameter[member[.map]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ParameterTool] identifier[fromArgs] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[map] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[/] Other[2] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[<] identifier[args] operator[SEP] identifier[length] operator[SEP] { Keyword[final] identifier[String] identifier[key] operator[SEP] Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[key] operator[=] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[2] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[key] operator[=] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[Arrays] operator[SEP] identifier[toString] operator[SEP] identifier[args] operator[SEP] , identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[key] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[Arrays] operator[SEP] identifier[toString] operator[SEP] identifier[args] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[i] operator[+=] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[>=] identifier[args] operator[SEP] identifier[length] operator[SEP] { identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[NO_VALUE_KEY] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[NumberUtils] operator[SEP] identifier[isNumber] operator[SEP] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] { identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[+=] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[NO_VALUE_KEY] operator[SEP] operator[SEP] } Keyword[else] { identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[+=] Other[1] operator[SEP] } } Keyword[return] identifier[fromMap] operator[SEP] identifier[map] operator[SEP] operator[SEP] }
protected void ensureDeviceCacheHolder(Integer deviceId, AllocationShape shape) { if (!deviceCache.containsKey(deviceId)) { try { synchronized (this) { if (!deviceCache.containsKey(deviceId)) { deviceCache.put(deviceId, new ConcurrentHashMap<AllocationShape, CacheHolder>()); } } } catch (Exception e) { throw new RuntimeException(e); } } if (!deviceCache.get(deviceId).containsKey(shape)) { try { singleLock.acquire(); if (!deviceCache.get(deviceId).containsKey(shape)) { deviceCache.get(deviceId).put(shape, new CacheHolder(shape, deviceCachedAmount.get(deviceId))); } } catch (Exception e) { } finally { singleLock.release(); } } }
class class_name[name] begin[{] method[ensureDeviceCacheHolder, return_type[void], modifier[protected], parameter[deviceId, shape]] begin[{] if[call[deviceCache.containsKey, parameter[member[.deviceId]]]] begin[{] TryStatement(block=[SynchronizedStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=deviceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=['!'], qualifier=deviceCache, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=deviceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AllocationShape, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CacheHolder, sub_type=None))], dimensions=None, name=ConcurrentHashMap, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=deviceCache, selectors=[], type_arguments=None), label=None)]))], label=None, lock=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[call[deviceCache.get, parameter[member[.deviceId]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=acquire, postfix_operators=[], prefix_operators=[], qualifier=singleLock, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=deviceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=['!'], qualifier=deviceCache, selectors=[MethodInvocation(arguments=[MemberReference(member=shape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=deviceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=deviceCache, selectors=[MethodInvocation(arguments=[MemberReference(member=shape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=shape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=deviceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=deviceCachedAmount, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CacheHolder, sub_type=None))], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=release, postfix_operators=[], prefix_operators=[], qualifier=singleLock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[ensureDeviceCacheHolder] operator[SEP] identifier[Integer] identifier[deviceId] , identifier[AllocationShape] identifier[shape] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[deviceCache] operator[SEP] identifier[containsKey] operator[SEP] identifier[deviceId] operator[SEP] operator[SEP] { Keyword[try] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[deviceCache] operator[SEP] identifier[containsKey] operator[SEP] identifier[deviceId] operator[SEP] operator[SEP] { identifier[deviceCache] operator[SEP] identifier[put] operator[SEP] identifier[deviceId] , Keyword[new] identifier[ConcurrentHashMap] operator[<] identifier[AllocationShape] , identifier[CacheHolder] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[deviceCache] operator[SEP] identifier[get] operator[SEP] identifier[deviceId] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[shape] operator[SEP] operator[SEP] { Keyword[try] { identifier[singleLock] operator[SEP] identifier[acquire] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[deviceCache] operator[SEP] identifier[get] operator[SEP] identifier[deviceId] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[shape] operator[SEP] operator[SEP] { identifier[deviceCache] operator[SEP] identifier[get] operator[SEP] identifier[deviceId] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[shape] , Keyword[new] identifier[CacheHolder] operator[SEP] identifier[shape] , identifier[deviceCachedAmount] operator[SEP] identifier[get] operator[SEP] identifier[deviceId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } Keyword[finally] { identifier[singleLock] operator[SEP] identifier[release] operator[SEP] operator[SEP] operator[SEP] } } }
private void buttonChooseFileActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonChooseFileActionPerformed final File theFile = new File(this.textFieldFilePath.getText().trim()); final File parent = theFile.getParentFile(); final JFileChooser chooser = new JFileChooser(parent == null ? this.projectFolder : parent); if (theFile.isFile()) { chooser.setSelectedFile(theFile); } chooser.setApproveButtonText("Select"); chooser.setDialogTitle("Select file"); chooser.setMultiSelectionEnabled(false); chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); if (chooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { final File selected = chooser.getSelectedFile(); this.textFieldFilePath.setText(selected.getAbsolutePath()); } }
class class_name[name] begin[{] method[buttonChooseFileActionPerformed, return_type[void], modifier[private], parameter[evt]] begin[{] local_variable[type[File], theFile] local_variable[type[File], parent] local_variable[type[JFileChooser], chooser] if[call[theFile.isFile, parameter[]]] begin[{] call[chooser.setSelectedFile, parameter[member[.theFile]]] else begin[{] None end[}] call[chooser.setApproveButtonText, parameter[literal["Select"]]] call[chooser.setDialogTitle, parameter[literal["Select file"]]] call[chooser.setMultiSelectionEnabled, parameter[literal[false]]] call[chooser.setFileSelectionMode, parameter[member[JFileChooser.FILES_AND_DIRECTORIES]]] if[binary_operation[call[chooser.showOpenDialog, parameter[THIS[]]], ==, member[JFileChooser.APPROVE_OPTION]]] begin[{] local_variable[type[File], selected] THIS[member[None.textFieldFilePath]call[None.setText, parameter[call[selected.getAbsolutePath, parameter[]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[buttonChooseFileActionPerformed] operator[SEP] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[event] operator[SEP] identifier[ActionEvent] identifier[evt] operator[SEP] { Keyword[final] identifier[File] identifier[theFile] operator[=] Keyword[new] identifier[File] operator[SEP] Keyword[this] operator[SEP] identifier[textFieldFilePath] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[File] identifier[parent] operator[=] identifier[theFile] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[JFileChooser] identifier[chooser] operator[=] Keyword[new] identifier[JFileChooser] operator[SEP] identifier[parent] operator[==] Other[null] operator[?] Keyword[this] operator[SEP] identifier[projectFolder] operator[:] identifier[parent] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[theFile] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[SEP] { identifier[chooser] operator[SEP] identifier[setSelectedFile] operator[SEP] identifier[theFile] operator[SEP] operator[SEP] } identifier[chooser] operator[SEP] identifier[setApproveButtonText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[chooser] operator[SEP] identifier[setDialogTitle] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[chooser] operator[SEP] identifier[setMultiSelectionEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[chooser] operator[SEP] identifier[setFileSelectionMode] operator[SEP] identifier[JFileChooser] operator[SEP] identifier[FILES_AND_DIRECTORIES] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[chooser] operator[SEP] identifier[showOpenDialog] operator[SEP] Keyword[this] operator[SEP] operator[==] identifier[JFileChooser] operator[SEP] identifier[APPROVE_OPTION] operator[SEP] { Keyword[final] identifier[File] identifier[selected] operator[=] identifier[chooser] operator[SEP] identifier[getSelectedFile] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[textFieldFilePath] operator[SEP] identifier[setText] operator[SEP] identifier[selected] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static int getProcessId() { RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean(); String runtimeMxBeanName = runtimeMxBean.getName(); Throwable cause = null; if (hasText(runtimeMxBeanName)) { int atSignIndex = runtimeMxBeanName.indexOf('@'); if (atSignIndex > 0) { try { return Integer.parseInt(runtimeMxBeanName.substring(0, atSignIndex)); } catch (NumberFormatException e) { cause = e; } } } throw new PidUnknownException(String.format("Process ID (PID) unknown [%s]", runtimeMxBeanName), cause); }
class class_name[name] begin[{] method[getProcessId, return_type[type[int]], modifier[public static], parameter[]] begin[{] local_variable[type[RuntimeMXBean], runtimeMxBean] local_variable[type[String], runtimeMxBeanName] local_variable[type[Throwable], cause] if[call[.hasText, parameter[member[.runtimeMxBeanName]]]] begin[{] local_variable[type[int], atSignIndex] if[binary_operation[member[.atSignIndex], >, literal[0]]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=atSignIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=runtimeMxBeanName, selectors=[], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Process ID (PID) unknown [%s]"), MemberReference(member=runtimeMxBeanName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), MemberReference(member=cause, 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=PidUnknownException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[getProcessId] operator[SEP] operator[SEP] { identifier[RuntimeMXBean] identifier[runtimeMxBean] operator[=] identifier[ManagementFactory] operator[SEP] identifier[getRuntimeMXBean] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[runtimeMxBeanName] operator[=] identifier[runtimeMxBean] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[Throwable] identifier[cause] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[hasText] operator[SEP] identifier[runtimeMxBeanName] operator[SEP] operator[SEP] { Keyword[int] identifier[atSignIndex] operator[=] identifier[runtimeMxBeanName] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[atSignIndex] operator[>] Other[0] operator[SEP] { Keyword[try] { Keyword[return] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[runtimeMxBeanName] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[atSignIndex] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[e] operator[SEP] { identifier[cause] operator[=] identifier[e] operator[SEP] } } } Keyword[throw] Keyword[new] identifier[PidUnknownException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[runtimeMxBeanName] operator[SEP] , identifier[cause] operator[SEP] operator[SEP] }
@Override public GlobalSignOutResult globalSignOut(GlobalSignOutRequest request) { request = beforeClientExecution(request); return executeGlobalSignOut(request); }
class class_name[name] begin[{] method[globalSignOut, return_type[type[GlobalSignOutResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGlobalSignOut, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GlobalSignOutResult] identifier[globalSignOut] operator[SEP] identifier[GlobalSignOutRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeGlobalSignOut] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static MediaType binary( MediaType.Type type, String subType ) { return new MediaType( type, subType, true ); }
class class_name[name] begin[{] method[binary, return_type[type[MediaType]], modifier[public static], parameter[type, subType]] begin[{] return[ClassCreator(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=subType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MediaType, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[MediaType] identifier[binary] operator[SEP] identifier[MediaType] operator[SEP] identifier[Type] identifier[type] , identifier[String] identifier[subType] operator[SEP] { Keyword[return] Keyword[new] identifier[MediaType] operator[SEP] identifier[type] , identifier[subType] , literal[boolean] operator[SEP] operator[SEP] }
private Object getValue(Object object, String propertyPath) throws TemplateException { if(this.model == null) { return null; } // anonymous property path has only a dot if(propertyPath.equals(".")) { return object; } Object o = object; if(propertyPath.charAt(0) == '.') { o = this.model; propertyPath = propertyPath.substring(1); } for(String property : propertyPath.split("\\.")) { o = getObjectProperty(o, property); if(o == null) { return null; } } return o; }
class class_name[name] begin[{] method[getValue, return_type[type[Object]], modifier[private], parameter[object, propertyPath]] begin[{] if[binary_operation[THIS[member[None.model]], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[call[propertyPath.equals, parameter[literal["."]]]] begin[{] return[member[.object]] else begin[{] None end[}] local_variable[type[Object], o] if[binary_operation[call[propertyPath.charAt, parameter[literal[0]]], ==, literal['.']]] begin[{] assign[member[.o], THIS[member[None.model]]] assign[member[.propertyPath], call[propertyPath.substring, parameter[literal[1]]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getObjectProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\.")], member=split, postfix_operators=[], prefix_operators=[], qualifier=propertyPath, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=property)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.o]] end[}] END[}]
Keyword[private] identifier[Object] identifier[getValue] operator[SEP] identifier[Object] identifier[object] , identifier[String] identifier[propertyPath] operator[SEP] Keyword[throws] identifier[TemplateException] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[model] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[propertyPath] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[object] operator[SEP] } identifier[Object] identifier[o] operator[=] identifier[object] operator[SEP] Keyword[if] operator[SEP] identifier[propertyPath] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[o] operator[=] Keyword[this] operator[SEP] identifier[model] operator[SEP] identifier[propertyPath] operator[=] identifier[propertyPath] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[property] operator[:] identifier[propertyPath] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[o] operator[=] identifier[getObjectProperty] operator[SEP] identifier[o] , identifier[property] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[o] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } } Keyword[return] identifier[o] operator[SEP] }
private boolean isLong(final String str) { try { Long.valueOf(str); return true; } catch (NumberFormatException e) { return false; } }
class class_name[name] begin[{] method[isLong, return_type[type[boolean]], modifier[private], parameter[str]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], catches=[CatchClause(block=[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=['NumberFormatException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isLong] operator[SEP] Keyword[final] identifier[String] identifier[str] operator[SEP] { Keyword[try] { identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] identifier[str] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } }
public static String trClassHtmlContent(String clazz, String... content) { return tagClassHtmlContent(Html.Tag.TR, clazz, content); }
class class_name[name] begin[{] method[trClassHtmlContent, return_type[type[String]], modifier[public static], parameter[clazz, content]] begin[{] return[call[.tagClassHtmlContent, parameter[member[Html.Tag.TR], member[.clazz], member[.content]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[trClassHtmlContent] operator[SEP] identifier[String] identifier[clazz] , identifier[String] operator[...] identifier[content] operator[SEP] { Keyword[return] identifier[tagClassHtmlContent] operator[SEP] identifier[Html] operator[SEP] identifier[Tag] operator[SEP] identifier[TR] , identifier[clazz] , identifier[content] operator[SEP] operator[SEP] }
public void select(String[] optionLocators) { for (int i = 0; i < optionLocators.length; i++) { select(optionLocators[i]); } }
class class_name[name] begin[{] method[select, return_type[void], modifier[public], parameter[optionLocators]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=optionLocators, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=select, 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=optionLocators, 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[select] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[optionLocators] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[optionLocators] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[select] operator[SEP] identifier[optionLocators] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } }
@Override public boolean idExists(String id) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) { LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[ID_EXISTS], id); } Object sessInUse; boolean found = false; SessionManagerRegistry _sessionManagerRegistry = SessionManagerRegistry.getSessionManagerRegistry(); // Since the session manager can be configured per application, we need to // look at // each entry individually since some of the contexts can have database/mtm // persistence // enabled while others are using memory // Look in memory first for improved performance Enumeration vEnum = _sessionManagerRegistry.getSessionManagers(); IStore tempStore; while (vEnum.hasMoreElements() && !found) { IGenericSessionManager sm = (IGenericSessionManager) vEnum.nextElement(); if (sm == null) // || sm == this) continue; tempStore = sm.getIStore(); if (tempStore == this) continue; // don't bother checking our own store sessInUse = tempStore.getFromMemory(id); if (sessInUse != null) found = true; } if (found) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINER)) { String s = "Found in Cache/Mem"; LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[ID_EXISTS], s); } return found; } // Check our current external store first. // This is probably the most likely // Also, if the sessionId has been recently invalidated and // checkRecentlyInvalidList is true, we should return true without checking // other backends. found = this.isPresentInExternalStore(id); if (found) { if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE)) { LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[ID_EXISTS], Boolean.valueOf(found)); } return found; } // Search the persistent stores for the sessionid Enumeration enum3 = _sessionManagerRegistry.getSessionManagers(); while (enum3.hasMoreElements()) { IGenericSessionManager sm = (IGenericSessionManager) enum3.nextElement(); if (sm == null) // || sm == this) continue; else { tempStore = sm.getIStore(); if (tempStore == this) continue; // don't bother checking our own store as we already checked // it above found = tempStore.isPresentInExternalStore(id); if (found) { break; } } } if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINER)) { String s = "After persistent store scan returning: " + found; LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[ID_EXISTS], s); } return found; }
class class_name[name] begin[{] method[idExists, return_type[type[boolean]], modifier[public], parameter[id]] begin[{] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[LoggingUtil.SESSION_LOGGER_CORE.isLoggable, parameter[member[Level.FINE]]]]] begin[{] call[LoggingUtil.SESSION_LOGGER_CORE.entering, parameter[member[.methodClassName], member[.methodNames], member[.id]]] else begin[{] None end[}] local_variable[type[Object], sessInUse] local_variable[type[boolean], found] local_variable[type[SessionManagerRegistry], _sessionManagerRegistry] local_variable[type[Enumeration], vEnum] local_variable[type[IStore], tempStore] while[binary_operation[call[vEnum.hasMoreElements, parameter[]], &&, member[.found]]] begin[{] local_variable[type[IGenericSessionManager], sm] if[binary_operation[member[.sm], ==, literal[null]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] assign[member[.tempStore], call[sm.getIStore, parameter[]]] if[binary_operation[member[.tempStore], ==, THIS[]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] assign[member[.sessInUse], call[tempStore.getFromMemory, parameter[member[.id]]]] if[binary_operation[member[.sessInUse], !=, literal[null]]] begin[{] assign[member[.found], literal[true]] else begin[{] None end[}] end[}] if[member[.found]] begin[{] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[LoggingUtil.SESSION_LOGGER_CORE.isLoggable, parameter[member[Level.FINER]]]]] begin[{] local_variable[type[String], s] call[LoggingUtil.SESSION_LOGGER_CORE.exiting, parameter[member[.methodClassName], member[.methodNames], member[.s]]] else begin[{] None end[}] return[member[.found]] else begin[{] None end[}] assign[member[.found], THIS[call[None.isPresentInExternalStore, parameter[member[.id]]]]] if[member[.found]] begin[{] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[LoggingUtil.SESSION_LOGGER_CORE.isLoggable, parameter[member[Level.FINE]]]]] begin[{] call[LoggingUtil.SESSION_LOGGER_CORE.exiting, parameter[member[.methodClassName], member[.methodNames], call[Boolean.valueOf, parameter[member[.found]]]]] else begin[{] None end[}] return[member[.found]] else begin[{] None end[}] local_variable[type[Enumeration], enum3] while[call[enum3.hasMoreElements, parameter[]]] begin[{] local_variable[type[IGenericSessionManager], sm] if[binary_operation[member[.sm], ==, literal[null]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] assign[member[.tempStore], call[sm.getIStore, parameter[]]] if[binary_operation[member[.tempStore], ==, THIS[]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] assign[member[.found], call[tempStore.isPresentInExternalStore, parameter[member[.id]]]] if[member[.found]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] end[}] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[LoggingUtil.SESSION_LOGGER_CORE.isLoggable, parameter[member[Level.FINER]]]]] begin[{] local_variable[type[String], s] call[LoggingUtil.SESSION_LOGGER_CORE.exiting, parameter[member[.methodClassName], member[.methodNames], member[.s]]] else begin[{] None end[}] return[member[.found]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[idExists] operator[SEP] identifier[String] identifier[id] operator[SEP] { Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_CORE] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] { identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_CORE] operator[SEP] identifier[entering] operator[SEP] identifier[methodClassName] , identifier[methodNames] operator[SEP] identifier[ID_EXISTS] operator[SEP] , identifier[id] operator[SEP] operator[SEP] } identifier[Object] identifier[sessInUse] operator[SEP] Keyword[boolean] identifier[found] operator[=] literal[boolean] operator[SEP] identifier[SessionManagerRegistry] identifier[_sessionManagerRegistry] operator[=] identifier[SessionManagerRegistry] operator[SEP] identifier[getSessionManagerRegistry] operator[SEP] operator[SEP] operator[SEP] identifier[Enumeration] identifier[vEnum] operator[=] identifier[_sessionManagerRegistry] operator[SEP] identifier[getSessionManagers] operator[SEP] operator[SEP] operator[SEP] identifier[IStore] identifier[tempStore] operator[SEP] Keyword[while] operator[SEP] identifier[vEnum] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[found] operator[SEP] { identifier[IGenericSessionManager] identifier[sm] operator[=] operator[SEP] identifier[IGenericSessionManager] operator[SEP] identifier[vEnum] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sm] operator[==] Other[null] operator[SEP] Keyword[continue] operator[SEP] identifier[tempStore] operator[=] identifier[sm] operator[SEP] identifier[getIStore] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tempStore] operator[==] Keyword[this] operator[SEP] Keyword[continue] operator[SEP] identifier[sessInUse] operator[=] identifier[tempStore] operator[SEP] identifier[getFromMemory] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sessInUse] operator[!=] Other[null] operator[SEP] identifier[found] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[found] operator[SEP] { Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_CORE] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINER] operator[SEP] operator[SEP] { identifier[String] identifier[s] operator[=] literal[String] operator[SEP] identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_CORE] operator[SEP] identifier[exiting] operator[SEP] identifier[methodClassName] , identifier[methodNames] operator[SEP] identifier[ID_EXISTS] operator[SEP] , identifier[s] operator[SEP] operator[SEP] } Keyword[return] identifier[found] operator[SEP] } identifier[found] operator[=] Keyword[this] operator[SEP] identifier[isPresentInExternalStore] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[found] operator[SEP] { Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_CORE] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] { identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_CORE] operator[SEP] identifier[exiting] operator[SEP] identifier[methodClassName] , identifier[methodNames] operator[SEP] identifier[ID_EXISTS] operator[SEP] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[found] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[found] operator[SEP] } identifier[Enumeration] identifier[enum3] operator[=] identifier[_sessionManagerRegistry] operator[SEP] identifier[getSessionManagers] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[enum3] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[IGenericSessionManager] identifier[sm] operator[=] operator[SEP] identifier[IGenericSessionManager] operator[SEP] identifier[enum3] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sm] operator[==] Other[null] operator[SEP] Keyword[continue] operator[SEP] Keyword[else] { identifier[tempStore] operator[=] identifier[sm] operator[SEP] identifier[getIStore] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tempStore] operator[==] Keyword[this] operator[SEP] Keyword[continue] operator[SEP] identifier[found] operator[=] identifier[tempStore] operator[SEP] identifier[isPresentInExternalStore] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[found] operator[SEP] { Keyword[break] operator[SEP] } } } Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_CORE] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINER] operator[SEP] operator[SEP] { identifier[String] identifier[s] operator[=] literal[String] operator[+] identifier[found] operator[SEP] identifier[LoggingUtil] operator[SEP] identifier[SESSION_LOGGER_CORE] operator[SEP] identifier[exiting] operator[SEP] identifier[methodClassName] , identifier[methodNames] operator[SEP] identifier[ID_EXISTS] operator[SEP] , identifier[s] operator[SEP] operator[SEP] } Keyword[return] identifier[found] operator[SEP] }
@Override public URL getResource( String path ) { URL url = null; if ( baseLoader != null ) // classloader wants no leading slash url = baseLoader.getResource( path.substring(1) ); if ( url == null ) url = super.getResource( path ); return url; }
class class_name[name] begin[{] method[getResource, return_type[type[URL]], modifier[public], parameter[path]] begin[{] local_variable[type[URL], url] if[binary_operation[member[.baseLoader], !=, literal[null]]] begin[{] assign[member[.url], call[baseLoader.getResource, parameter[call[path.substring, parameter[literal[1]]]]]] else begin[{] None end[}] if[binary_operation[member[.url], ==, literal[null]]] begin[{] assign[member[.url], SuperMethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResource, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] else begin[{] None end[}] return[member[.url]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[URL] identifier[getResource] operator[SEP] identifier[String] identifier[path] operator[SEP] { identifier[URL] identifier[url] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[baseLoader] operator[!=] Other[null] operator[SEP] identifier[url] operator[=] identifier[baseLoader] operator[SEP] identifier[getResource] operator[SEP] identifier[path] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[url] operator[==] Other[null] operator[SEP] identifier[url] operator[=] Keyword[super] operator[SEP] identifier[getResource] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[return] identifier[url] operator[SEP] }
public final void addComponent(String namespace, String name, String componentType, String rendererType, Class<? extends TagHandler> handlerType) { Map<String, TagHandlerFactory> map = _factories.get(namespace); if (map == null) { map = new HashMap<String, TagHandlerFactory>(); _factories.put(namespace, map); } map.put(name, new UserComponentHandlerFactory(componentType, rendererType, handlerType)); }
class class_name[name] begin[{] method[addComponent, return_type[void], modifier[final public], parameter[namespace, name, componentType, rendererType, handlerType]] begin[{] local_variable[type[Map], map] if[binary_operation[member[.map], ==, literal[null]]] begin[{] assign[member[.map], 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)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TagHandlerFactory, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] call[_factories.put, parameter[member[.namespace], member[.map]]] else begin[{] None end[}] call[map.put, parameter[member[.name], ClassCreator(arguments=[MemberReference(member=componentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rendererType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=handlerType, 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=UserComponentHandlerFactory, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[addComponent] operator[SEP] identifier[String] identifier[namespace] , identifier[String] identifier[name] , identifier[String] identifier[componentType] , identifier[String] identifier[rendererType] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[TagHandler] operator[>] identifier[handlerType] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[TagHandlerFactory] operator[>] identifier[map] operator[=] identifier[_factories] operator[SEP] identifier[get] operator[SEP] identifier[namespace] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[map] operator[==] Other[null] operator[SEP] { identifier[map] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[TagHandlerFactory] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[_factories] operator[SEP] identifier[put] operator[SEP] identifier[namespace] , identifier[map] operator[SEP] operator[SEP] } identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[name] , Keyword[new] identifier[UserComponentHandlerFactory] operator[SEP] identifier[componentType] , identifier[rendererType] , identifier[handlerType] operator[SEP] operator[SEP] operator[SEP] }
public void set(String name, Object obj) throws CertificateException, IOException { // check if immutable if (readOnly) throw new CertificateException("cannot over-write existing" + " certificate"); X509AttributeName attr = new X509AttributeName(name); String id = attr.getPrefix(); if (!(id.equalsIgnoreCase(NAME))) { throw new CertificateException("Invalid root of attribute name," + " expected [" + NAME + "], received " + id); } attr = new X509AttributeName(attr.getSuffix()); id = attr.getPrefix(); if (id.equalsIgnoreCase(INFO)) { if (attr.getSuffix() == null) { if (!(obj instanceof X509CertInfo)) { throw new CertificateException("Attribute value should" + " be of type X509CertInfo."); } info = (X509CertInfo)obj; signedCert = null; //reset this as certificate data has changed } else { info.set(attr.getSuffix(), obj); signedCert = null; //reset this as certificate data has changed } } else { throw new CertificateException("Attribute name not recognized or " + "set() not allowed for the same: " + id); } }
class class_name[name] begin[{] method[set, return_type[void], modifier[public], parameter[name, obj]] begin[{] if[member[.readOnly]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="cannot over-write existing"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" certificate"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CertificateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[X509AttributeName], attr] local_variable[type[String], id] if[call[id.equalsIgnoreCase, parameter[member[.NAME]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid root of attribute name,"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" expected ["), operator=+), operandr=MemberReference(member=NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="], received "), operator=+), operandr=MemberReference(member=id, 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=CertificateException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.attr], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getSuffix, postfix_operators=[], prefix_operators=[], qualifier=attr, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=X509AttributeName, sub_type=None))] assign[member[.id], call[attr.getPrefix, parameter[]]] if[call[id.equalsIgnoreCase, parameter[member[.INFO]]]] begin[{] if[binary_operation[call[attr.getSuffix, parameter[]], ==, literal[null]]] begin[{] if[binary_operation[member[.obj], instanceof, type[X509CertInfo]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Attribute value should"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" be of type X509CertInfo."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CertificateException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.info], Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=X509CertInfo, sub_type=None))] assign[member[.signedCert], literal[null]] else begin[{] call[info.set, parameter[call[attr.getSuffix, parameter[]], member[.obj]]] assign[member[.signedCert], literal[null]] end[}] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Attribute name not recognized or "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="set() not allowed for the same: "), operator=+), operandr=MemberReference(member=id, 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=CertificateException, sub_type=None)), label=None) end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[set] operator[SEP] identifier[String] identifier[name] , identifier[Object] identifier[obj] operator[SEP] Keyword[throws] identifier[CertificateException] , identifier[IOException] { Keyword[if] operator[SEP] identifier[readOnly] operator[SEP] Keyword[throw] Keyword[new] identifier[CertificateException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] identifier[X509AttributeName] identifier[attr] operator[=] Keyword[new] identifier[X509AttributeName] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[String] identifier[id] operator[=] identifier[attr] operator[SEP] identifier[getPrefix] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[id] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[NAME] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[CertificateException] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[NAME] operator[+] literal[String] operator[+] identifier[id] operator[SEP] operator[SEP] } identifier[attr] operator[=] Keyword[new] identifier[X509AttributeName] operator[SEP] identifier[attr] operator[SEP] identifier[getSuffix] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[id] operator[=] identifier[attr] operator[SEP] identifier[getPrefix] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[INFO] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[attr] operator[SEP] identifier[getSuffix] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[obj] Keyword[instanceof] identifier[X509CertInfo] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[CertificateException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[info] operator[=] operator[SEP] identifier[X509CertInfo] operator[SEP] identifier[obj] operator[SEP] identifier[signedCert] operator[=] Other[null] operator[SEP] } Keyword[else] { identifier[info] operator[SEP] identifier[set] operator[SEP] identifier[attr] operator[SEP] identifier[getSuffix] operator[SEP] operator[SEP] , identifier[obj] operator[SEP] operator[SEP] identifier[signedCert] operator[=] Other[null] operator[SEP] } } Keyword[else] { Keyword[throw] Keyword[new] identifier[CertificateException] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[id] operator[SEP] operator[SEP] } }
public RESTAssignedPropertyTagCollectionV1 getRESTPropertyTagInTopicRevisions(int id, final Integer revision, final RESTBaseTopicV1<?, ?, ?> topic) { final RESTAssignedPropertyTagCollectionV1 propertyTagRevisions; if (topic instanceof RESTTranslatedTopicV1) { propertyTagRevisions = getRESTTranslatedTopicPropertyRevisions(id, revision, topic); } else { propertyTagRevisions = getRESTTopicPropertyRevisions(id, revision, topic); } return propertyTagRevisions; }
class class_name[name] begin[{] method[getRESTPropertyTagInTopicRevisions, return_type[type[RESTAssignedPropertyTagCollectionV1]], modifier[public], parameter[id, revision, topic]] begin[{] local_variable[type[RESTAssignedPropertyTagCollectionV1], propertyTagRevisions] if[binary_operation[member[.topic], instanceof, type[RESTTranslatedTopicV1]]] begin[{] assign[member[.propertyTagRevisions], call[.getRESTTranslatedTopicPropertyRevisions, parameter[member[.id], member[.revision], member[.topic]]]] else begin[{] assign[member[.propertyTagRevisions], call[.getRESTTopicPropertyRevisions, parameter[member[.id], member[.revision], member[.topic]]]] end[}] return[member[.propertyTagRevisions]] end[}] END[}]
Keyword[public] identifier[RESTAssignedPropertyTagCollectionV1] identifier[getRESTPropertyTagInTopicRevisions] operator[SEP] Keyword[int] identifier[id] , Keyword[final] identifier[Integer] identifier[revision] , Keyword[final] identifier[RESTBaseTopicV1] operator[<] operator[?] , operator[?] , operator[?] operator[>] identifier[topic] operator[SEP] { Keyword[final] identifier[RESTAssignedPropertyTagCollectionV1] identifier[propertyTagRevisions] operator[SEP] Keyword[if] operator[SEP] identifier[topic] Keyword[instanceof] identifier[RESTTranslatedTopicV1] operator[SEP] { identifier[propertyTagRevisions] operator[=] identifier[getRESTTranslatedTopicPropertyRevisions] operator[SEP] identifier[id] , identifier[revision] , identifier[topic] operator[SEP] operator[SEP] } Keyword[else] { identifier[propertyTagRevisions] operator[=] identifier[getRESTTopicPropertyRevisions] operator[SEP] identifier[id] , identifier[revision] , identifier[topic] operator[SEP] operator[SEP] } Keyword[return] identifier[propertyTagRevisions] operator[SEP] }
public void addSourceFolder(File folder) { Assert.notNull(folder, "Folder must not be null"); Assert.isTrue(!folder.isFile(), "Folder '" + folder + "' must not be a file"); synchronized (this.monitor) { checkNotStarted(); this.folders.put(folder, null); } }
class class_name[name] begin[{] method[addSourceFolder, return_type[void], modifier[public], parameter[folder]] begin[{] call[Assert.notNull, parameter[member[.folder], literal["Folder must not be null"]]] call[Assert.isTrue, parameter[call[folder.isFile, parameter[]], binary_operation[binary_operation[literal["Folder '"], +, member[.folder]], +, literal["' must not be a file"]]]] SYNCHRONIZED[THIS[member[None.monitor]]] BEGIN[{] call[.checkNotStarted, parameter[]] THIS[member[None.folders]call[None.put, parameter[member[.folder], literal[null]]]] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addSourceFolder] operator[SEP] identifier[File] identifier[folder] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[folder] , literal[String] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[isTrue] operator[SEP] operator[!] identifier[folder] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] , literal[String] operator[+] identifier[folder] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] identifier[monitor] operator[SEP] { identifier[checkNotStarted] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[folders] operator[SEP] identifier[put] operator[SEP] identifier[folder] , Other[null] operator[SEP] operator[SEP] } }
public final BaseDescr singleRestriction() throws RecognitionException { BaseDescr result = null; ParserRuleReturnScope op =null; java.util.List<String> sa =null; ParserRuleReturnScope value =null; BaseDescr or =null; try { // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:422:3: (op= operator ( ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression |value= shiftExpression ) | LEFT_PAREN or= orRestriction RIGHT_PAREN ) int alt44=2; int LA44_0 = input.LA(1); if ( (LA44_0==EQUALS||(LA44_0 >= GREATER && LA44_0 <= GREATER_EQUALS)||(LA44_0 >= LESS && LA44_0 <= LESS_EQUALS)||LA44_0==NOT_EQUALS||LA44_0==TILDE) ) { alt44=1; } else if ( (LA44_0==ID) && ((((helper.validateIdentifierKey(DroolsSoftKeywords.NOT)))||((helper.isPluggableEvaluator(false)))))) { alt44=1; } else if ( (LA44_0==LEFT_PAREN) ) { alt44=2; } else { if (state.backtracking>0) {state.failed=true; return result;} NoViableAltException nvae = new NoViableAltException("", 44, 0, input); throw nvae; } switch (alt44) { case 1 : // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:422:6: op= operator ( ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression |value= shiftExpression ) { pushFollow(FOLLOW_operator_in_singleRestriction1963); op=operator(); state._fsp--; if (state.failed) return result; if ( state.backtracking==0 ) { helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_ARGUMENT ); } // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:424:6: ( ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression |value= shiftExpression ) int alt43=2; int LA43_0 = input.LA(1); if ( (LA43_0==LEFT_SQUARE) ) { int LA43_1 = input.LA(2); if ( (synpred11_DRL5Expressions()) ) { alt43=1; } else if ( (true) ) { alt43=2; } } else if ( (LA43_0==BOOL||(LA43_0 >= DECIMAL && LA43_0 <= DECR)||LA43_0==FLOAT||LA43_0==HEX||(LA43_0 >= ID && LA43_0 <= INCR)||LA43_0==LEFT_PAREN||LA43_0==LESS||LA43_0==MINUS||LA43_0==NEGATION||LA43_0==NULL||LA43_0==PLUS||(LA43_0 >= STAR && LA43_0 <= TIME_INTERVAL)) ) { alt43=2; } else { if (state.backtracking>0) {state.failed=true; return result;} NoViableAltException nvae = new NoViableAltException("", 43, 0, input); throw nvae; } switch (alt43) { case 1 : // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:424:8: ( squareArguments shiftExpression )=>sa= squareArguments value= shiftExpression { pushFollow(FOLLOW_squareArguments_in_singleRestriction1992); sa=squareArguments(); state._fsp--; if (state.failed) return result; pushFollow(FOLLOW_shiftExpression_in_singleRestriction1996); value=shiftExpression(); state._fsp--; if (state.failed) return result; } break; case 2 : // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:425:10: value= shiftExpression { pushFollow(FOLLOW_shiftExpression_in_singleRestriction2009); value=shiftExpression(); state._fsp--; if (state.failed) return result; } break; } if ( state.backtracking==0 ) { if( buildDescr ) { BaseDescr descr = ( (value!=null?((DRL5Expressions.shiftExpression_return)value).result:null) != null && ( (!((value!=null?((DRL5Expressions.shiftExpression_return)value).result:null) instanceof AtomicExprDescr)) || ((value!=null?input.toString(value.start,value.stop):null).equals(((AtomicExprDescr)(value!=null?((DRL5Expressions.shiftExpression_return)value).result:null)).getExpression())) )) ? (value!=null?((DRL5Expressions.shiftExpression_return)value).result:null) : new AtomicExprDescr( (value!=null?input.toString(value.start,value.stop):null) ) ; result = new RelationalExprDescr( (op!=null?((DRL5Expressions.operator_return)op).opr:null), (op!=null?((DRL5Expressions.operator_return)op).negated:false), sa, relationalExpression_stack.peek().lsd, descr ); if( relationalExpression_stack.peek().lsd instanceof BindingDescr ) { relationalExpression_stack.peek().lsd = new AtomicExprDescr( ((BindingDescr)relationalExpression_stack.peek().lsd).getExpression() ); } } helper.emit( Location.LOCATION_LHS_INSIDE_CONDITION_END ); } } break; case 2 : // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:440:6: LEFT_PAREN or= orRestriction RIGHT_PAREN { match(input,LEFT_PAREN,FOLLOW_LEFT_PAREN_in_singleRestriction2034); if (state.failed) return result; pushFollow(FOLLOW_orRestriction_in_singleRestriction2038); or=orRestriction(); state._fsp--; if (state.failed) return result; match(input,RIGHT_PAREN,FOLLOW_RIGHT_PAREN_in_singleRestriction2040); if (state.failed) return result; if ( state.backtracking==0 ) { result = or; } } break; } } catch (RecognitionException re) { throw re; } finally { // do for sure before leaving } return result; }
class class_name[name] begin[{] method[singleRestriction, return_type[type[BaseDescr]], modifier[final public], parameter[]] begin[{] local_variable[type[BaseDescr], result] local_variable[type[ParserRuleReturnScope], op] local_variable[type[java], sa] local_variable[type[ParserRuleReturnScope], value] local_variable[type[BaseDescr], or] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt44)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA44_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA44_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=EQUALS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA44_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=GREATER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA44_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=GREATER_EQUALS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA44_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LESS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA44_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LESS_EQUALS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA44_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NOT_EQUALS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA44_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=TILDE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA44_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=NOT, postfix_operators=[], prefix_operators=[], qualifier=DroolsSoftKeywords, selectors=[])], member=validateIdentifierKey, postfix_operators=[], prefix_operators=[], qualifier=helper, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=isPluggableEvaluator, postfix_operators=[], prefix_operators=[], qualifier=helper, selectors=[], type_arguments=None), operator=||), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA44_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LEFT_PAREN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=44), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoViableAltException, sub_type=None)), name=nvae)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NoViableAltException, sub_type=None)), ThrowStatement(expression=MemberReference(member=nvae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt44, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt44, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt44, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_operator_in_singleRestriction1963, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=operator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LOCATION_LHS_INSIDE_CONDITION_ARGUMENT, postfix_operators=[], prefix_operators=[], qualifier=Location, selectors=[])], member=emit, postfix_operators=[], prefix_operators=[], qualifier=helper, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt43)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA43_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LEFT_SQUARE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BOOL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DECIMAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=DECR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=FLOAT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=HEX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=INCR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LEFT_PAREN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=LESS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MINUS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NEGATION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=NULL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PLUS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=STAR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA43_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=TIME_INTERVAL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), operator=&&), operator=||), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=43), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoViableAltException, sub_type=None)), name=nvae)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NoViableAltException, sub_type=None)), ThrowStatement(expression=MemberReference(member=nvae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt43, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), 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=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA43_1)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred11_DRL5Expressions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt43, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt43, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_squareArguments_in_singleRestriction1992, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sa, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=squareArguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_shiftExpression_in_singleRestriction1996, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=shiftExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_shiftExpression_in_singleRestriction2009, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=shiftExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt43, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=buildDescr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DRL5Expressions, sub_type=ReferenceType(arguments=None, dimensions=None, name=shiftExpression_return, sub_type=None)))), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=BinaryOperation(operandl=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DRL5Expressions, sub_type=ReferenceType(arguments=None, dimensions=None, name=shiftExpression_return, sub_type=None)))), operandr=ReferenceType(arguments=None, dimensions=[], name=AtomicExprDescr, sub_type=None), operator=instanceof), operandr=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[]), MemberReference(member=stop, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), operator=||), operator=&&), if_false=ClassCreator(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=MethodInvocation(arguments=[MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[]), MemberReference(member=stop, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AtomicExprDescr, sub_type=None)), if_true=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DRL5Expressions, sub_type=ReferenceType(arguments=None, dimensions=None, name=shiftExpression_return, sub_type=None))))), name=descr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BaseDescr, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=Cast(expression=MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DRL5Expressions, sub_type=ReferenceType(arguments=None, dimensions=None, name=operator_return, sub_type=None)))), TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), if_true=Cast(expression=MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DRL5Expressions, sub_type=ReferenceType(arguments=None, dimensions=None, name=operator_return, sub_type=None)))), MemberReference(member=sa, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=peek, postfix_operators=[], prefix_operators=[], qualifier=relationalExpression_stack, selectors=[MemberReference(member=lsd, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), MemberReference(member=descr, 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=RelationalExprDescr, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=peek, postfix_operators=[], prefix_operators=[], qualifier=relationalExpression_stack, selectors=[MemberReference(member=lsd, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=ReferenceType(arguments=None, dimensions=[], name=BindingDescr, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[], member=peek, postfix_operators=[], prefix_operators=[], qualifier=relationalExpression_stack, selectors=[MemberReference(member=lsd, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=ClassCreator(arguments=[Cast(expression=MethodInvocation(arguments=[], member=peek, postfix_operators=[], prefix_operators=[], qualifier=relationalExpression_stack, selectors=[MemberReference(member=lsd, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=BindingDescr, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AtomicExprDescr, sub_type=None))), label=None)]))])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LOCATION_LHS_INSIDE_CONDITION_END, postfix_operators=[], prefix_operators=[], qualifier=Location, selectors=[])], member=emit, postfix_operators=[], prefix_operators=[], qualifier=helper, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=LEFT_PAREN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_LEFT_PAREN_in_singleRestriction2034, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_orRestriction_in_singleRestriction2038, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=or, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=orRestriction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=RIGHT_PAREN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_RIGHT_PAREN_in_singleRestriction2040, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=or, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt44, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[final] identifier[BaseDescr] identifier[singleRestriction] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[BaseDescr] identifier[result] operator[=] Other[null] operator[SEP] identifier[ParserRuleReturnScope] identifier[op] operator[=] Other[null] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[sa] operator[=] Other[null] operator[SEP] identifier[ParserRuleReturnScope] identifier[value] operator[=] Other[null] operator[SEP] identifier[BaseDescr] identifier[or] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[int] identifier[alt44] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA44_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA44_0] operator[==] identifier[EQUALS] operator[||] operator[SEP] identifier[LA44_0] operator[>=] identifier[GREATER] operator[&&] identifier[LA44_0] operator[<=] identifier[GREATER_EQUALS] operator[SEP] operator[||] operator[SEP] identifier[LA44_0] operator[>=] identifier[LESS] operator[&&] identifier[LA44_0] operator[<=] identifier[LESS_EQUALS] operator[SEP] operator[||] identifier[LA44_0] operator[==] identifier[NOT_EQUALS] operator[||] identifier[LA44_0] operator[==] identifier[TILDE] operator[SEP] operator[SEP] { identifier[alt44] operator[=] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[LA44_0] operator[==] identifier[ID] operator[SEP] operator[&&] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[helper] operator[SEP] identifier[validateIdentifierKey] operator[SEP] identifier[DroolsSoftKeywords] operator[SEP] identifier[NOT] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[SEP] operator[SEP] identifier[helper] operator[SEP] identifier[isPluggableEvaluator] operator[SEP] literal[boolean] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt44] operator[=] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[LA44_0] operator[==] identifier[LEFT_PAREN] operator[SEP] operator[SEP] { identifier[alt44] operator[=] Other[2] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[result] operator[SEP] } identifier[NoViableAltException] identifier[nvae] operator[=] Keyword[new] identifier[NoViableAltException] operator[SEP] literal[String] , Other[44] , Other[0] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[nvae] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt44] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[pushFollow] operator[SEP] identifier[FOLLOW_operator_in_singleRestriction1963] operator[SEP] operator[SEP] identifier[op] operator[=] identifier[operator] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[result] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[helper] operator[SEP] identifier[emit] operator[SEP] identifier[Location] operator[SEP] identifier[LOCATION_LHS_INSIDE_CONDITION_ARGUMENT] operator[SEP] operator[SEP] } Keyword[int] identifier[alt43] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA43_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA43_0] operator[==] identifier[LEFT_SQUARE] operator[SEP] operator[SEP] { Keyword[int] identifier[LA43_1] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred11_DRL5Expressions] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt43] operator[=] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] literal[boolean] operator[SEP] operator[SEP] { identifier[alt43] operator[=] Other[2] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[LA43_0] operator[==] identifier[BOOL] operator[||] operator[SEP] identifier[LA43_0] operator[>=] identifier[DECIMAL] operator[&&] identifier[LA43_0] operator[<=] identifier[DECR] operator[SEP] operator[||] identifier[LA43_0] operator[==] identifier[FLOAT] operator[||] identifier[LA43_0] operator[==] identifier[HEX] operator[||] operator[SEP] identifier[LA43_0] operator[>=] identifier[ID] operator[&&] identifier[LA43_0] operator[<=] identifier[INCR] operator[SEP] operator[||] identifier[LA43_0] operator[==] identifier[LEFT_PAREN] operator[||] identifier[LA43_0] operator[==] identifier[LESS] operator[||] identifier[LA43_0] operator[==] identifier[MINUS] operator[||] identifier[LA43_0] operator[==] identifier[NEGATION] operator[||] identifier[LA43_0] operator[==] identifier[NULL] operator[||] identifier[LA43_0] operator[==] identifier[PLUS] operator[||] operator[SEP] identifier[LA43_0] operator[>=] identifier[STAR] operator[&&] identifier[LA43_0] operator[<=] identifier[TIME_INTERVAL] operator[SEP] operator[SEP] operator[SEP] { identifier[alt43] operator[=] Other[2] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[result] operator[SEP] } identifier[NoViableAltException] identifier[nvae] operator[=] Keyword[new] identifier[NoViableAltException] operator[SEP] literal[String] , Other[43] , Other[0] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[nvae] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt43] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[pushFollow] operator[SEP] identifier[FOLLOW_squareArguments_in_singleRestriction1992] operator[SEP] operator[SEP] identifier[sa] operator[=] identifier[squareArguments] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[result] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FOLLOW_shiftExpression_in_singleRestriction1996] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[shiftExpression] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[result] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] { identifier[pushFollow] operator[SEP] identifier[FOLLOW_shiftExpression_in_singleRestriction2009] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[shiftExpression] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[result] operator[SEP] } Keyword[break] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[buildDescr] operator[SEP] { identifier[BaseDescr] identifier[descr] operator[=] operator[SEP] operator[SEP] identifier[value] operator[!=] Other[null] operator[?] operator[SEP] operator[SEP] identifier[DRL5Expressions] operator[SEP] identifier[shiftExpression_return] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[result] operator[:] Other[null] operator[SEP] operator[!=] Other[null] operator[&&] operator[SEP] operator[SEP] operator[!] operator[SEP] operator[SEP] identifier[value] operator[!=] Other[null] operator[?] operator[SEP] operator[SEP] identifier[DRL5Expressions] operator[SEP] identifier[shiftExpression_return] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[result] operator[:] Other[null] operator[SEP] Keyword[instanceof] identifier[AtomicExprDescr] operator[SEP] operator[SEP] operator[||] operator[SEP] operator[SEP] identifier[value] operator[!=] Other[null] operator[?] identifier[input] operator[SEP] identifier[toString] operator[SEP] identifier[value] operator[SEP] identifier[start] , identifier[value] operator[SEP] identifier[stop] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] identifier[equals] operator[SEP] operator[SEP] operator[SEP] identifier[AtomicExprDescr] operator[SEP] operator[SEP] identifier[value] operator[!=] Other[null] operator[?] operator[SEP] operator[SEP] identifier[DRL5Expressions] operator[SEP] identifier[shiftExpression_return] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[result] operator[:] Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[?] operator[SEP] identifier[value] operator[!=] Other[null] operator[?] operator[SEP] operator[SEP] identifier[DRL5Expressions] operator[SEP] identifier[shiftExpression_return] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[result] operator[:] Other[null] operator[SEP] operator[:] Keyword[new] identifier[AtomicExprDescr] operator[SEP] operator[SEP] identifier[value] operator[!=] Other[null] operator[?] identifier[input] operator[SEP] identifier[toString] operator[SEP] identifier[value] operator[SEP] identifier[start] , identifier[value] operator[SEP] identifier[stop] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[=] Keyword[new] identifier[RelationalExprDescr] operator[SEP] operator[SEP] identifier[op] operator[!=] Other[null] operator[?] operator[SEP] operator[SEP] identifier[DRL5Expressions] operator[SEP] identifier[operator_return] operator[SEP] identifier[op] operator[SEP] operator[SEP] identifier[opr] operator[:] Other[null] operator[SEP] , operator[SEP] identifier[op] operator[!=] Other[null] operator[?] operator[SEP] operator[SEP] identifier[DRL5Expressions] operator[SEP] identifier[operator_return] operator[SEP] identifier[op] operator[SEP] operator[SEP] identifier[negated] operator[:] literal[boolean] operator[SEP] , identifier[sa] , identifier[relationalExpression_stack] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[SEP] identifier[lsd] , identifier[descr] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[relationalExpression_stack] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[SEP] identifier[lsd] Keyword[instanceof] identifier[BindingDescr] operator[SEP] { identifier[relationalExpression_stack] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[SEP] identifier[lsd] operator[=] Keyword[new] identifier[AtomicExprDescr] operator[SEP] operator[SEP] operator[SEP] identifier[BindingDescr] operator[SEP] identifier[relationalExpression_stack] operator[SEP] identifier[peek] operator[SEP] operator[SEP] operator[SEP] identifier[lsd] operator[SEP] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[helper] operator[SEP] identifier[emit] operator[SEP] identifier[Location] operator[SEP] identifier[LOCATION_LHS_INSIDE_CONDITION_END] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] { identifier[match] operator[SEP] identifier[input] , identifier[LEFT_PAREN] , identifier[FOLLOW_LEFT_PAREN_in_singleRestriction2034] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[result] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FOLLOW_orRestriction_in_singleRestriction2038] operator[SEP] operator[SEP] identifier[or] operator[=] identifier[orRestriction] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[result] operator[SEP] identifier[match] operator[SEP] identifier[input] , identifier[RIGHT_PAREN] , identifier[FOLLOW_RIGHT_PAREN_in_singleRestriction2040] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[result] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[result] operator[=] identifier[or] operator[SEP] } } Keyword[break] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { Keyword[throw] identifier[re] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[result] operator[SEP] }