code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
protected void initializePrinters() { int maxColumns = 0; printers.add(new SourceClausePrinter(interner, symbolTable, traverser, maxColumns++, printTable)); printers.add(new PositionPrinter(interner, symbolTable, traverser, maxColumns++, printTable)); printers.add(new UnoptimizedLabelPrinter(interner, symbolTable, traverser, maxColumns++, printTable)); printers.add(new UnoptimizedByteCodePrinter(interner, symbolTable, traverser, maxColumns++, printTable)); printers.add(new LabelPrinter(interner, symbolTable, traverser, maxColumns++, printTable)); printers.add(new ByteCodePrinter(interner, symbolTable, traverser, maxColumns++, printTable)); }
class class_name[name] begin[{] method[initializePrinters, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[int], maxColumns] call[printers.add, parameter[ClassCreator(arguments=[MemberReference(member=interner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=symbolTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=traverser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxColumns, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=printTable, 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=SourceClausePrinter, sub_type=None))]] call[printers.add, parameter[ClassCreator(arguments=[MemberReference(member=interner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=symbolTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=traverser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxColumns, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=printTable, 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=PositionPrinter, sub_type=None))]] call[printers.add, parameter[ClassCreator(arguments=[MemberReference(member=interner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=symbolTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=traverser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxColumns, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=printTable, 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=UnoptimizedLabelPrinter, sub_type=None))]] call[printers.add, parameter[ClassCreator(arguments=[MemberReference(member=interner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=symbolTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=traverser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxColumns, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=printTable, 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=UnoptimizedByteCodePrinter, sub_type=None))]] call[printers.add, parameter[ClassCreator(arguments=[MemberReference(member=interner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=symbolTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=traverser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxColumns, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=printTable, 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=LabelPrinter, sub_type=None))]] call[printers.add, parameter[ClassCreator(arguments=[MemberReference(member=interner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=symbolTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=traverser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxColumns, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=printTable, 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=ByteCodePrinter, sub_type=None))]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[initializePrinters] operator[SEP] operator[SEP] { Keyword[int] identifier[maxColumns] operator[=] Other[0] operator[SEP] identifier[printers] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[SourceClausePrinter] operator[SEP] identifier[interner] , identifier[symbolTable] , identifier[traverser] , identifier[maxColumns] operator[++] , identifier[printTable] operator[SEP] operator[SEP] operator[SEP] identifier[printers] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[PositionPrinter] operator[SEP] identifier[interner] , identifier[symbolTable] , identifier[traverser] , identifier[maxColumns] operator[++] , identifier[printTable] operator[SEP] operator[SEP] operator[SEP] identifier[printers] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[UnoptimizedLabelPrinter] operator[SEP] identifier[interner] , identifier[symbolTable] , identifier[traverser] , identifier[maxColumns] operator[++] , identifier[printTable] operator[SEP] operator[SEP] operator[SEP] identifier[printers] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[UnoptimizedByteCodePrinter] operator[SEP] identifier[interner] , identifier[symbolTable] , identifier[traverser] , identifier[maxColumns] operator[++] , identifier[printTable] operator[SEP] operator[SEP] operator[SEP] identifier[printers] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[LabelPrinter] operator[SEP] identifier[interner] , identifier[symbolTable] , identifier[traverser] , identifier[maxColumns] operator[++] , identifier[printTable] operator[SEP] operator[SEP] operator[SEP] identifier[printers] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[ByteCodePrinter] operator[SEP] identifier[interner] , identifier[symbolTable] , identifier[traverser] , identifier[maxColumns] operator[++] , identifier[printTable] operator[SEP] operator[SEP] operator[SEP] }
public static void closeQuietly(@WillClose @Nullable Closeable closeable) { try { close(closeable, true); } catch (IOException impossible) { impossible(impossible); } }
class class_name[name] begin[{] method[closeQuietly, return_type[void], modifier[public static], parameter[closeable]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=closeable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=close, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=impossible, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=impossible, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=impossible, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[closeQuietly] operator[SEP] annotation[@] identifier[WillClose] annotation[@] identifier[Nullable] identifier[Closeable] identifier[closeable] operator[SEP] { Keyword[try] { identifier[close] operator[SEP] identifier[closeable] , literal[boolean] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[impossible] operator[SEP] { identifier[impossible] operator[SEP] identifier[impossible] operator[SEP] operator[SEP] } }
private void applyOp(SchemaOperation op, ZooClassDef def) { ops.add(op); for (GenericObject o: cache.getAllGenericObjects()) { if (o.jdoZooGetClassDef() == def) { o.evolve(op); } } }
class class_name[name] begin[{] method[applyOp, return_type[void], modifier[private], parameter[op, def]] begin[{] call[ops.add, parameter[member[.op]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=jdoZooGetClassDef, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), operandr=MemberReference(member=def, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=evolve, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAllGenericObjects, postfix_operators=[], prefix_operators=[], qualifier=cache, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GenericObject, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[applyOp] operator[SEP] identifier[SchemaOperation] identifier[op] , identifier[ZooClassDef] identifier[def] operator[SEP] { identifier[ops] operator[SEP] identifier[add] operator[SEP] identifier[op] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[GenericObject] identifier[o] operator[:] identifier[cache] operator[SEP] identifier[getAllGenericObjects] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[o] operator[SEP] identifier[jdoZooGetClassDef] operator[SEP] operator[SEP] operator[==] identifier[def] operator[SEP] { identifier[o] operator[SEP] identifier[evolve] operator[SEP] identifier[op] operator[SEP] operator[SEP] } } }
private static boolean _isAlreadyCompressed (final String sFilename) { for (final String sExt : EXTENSIONS_CSS_COMPRESSED) if (sFilename.endsWith (sExt)) return true; return false; }
class class_name[name] begin[{] method[_isAlreadyCompressed, return_type[type[boolean]], modifier[private static], parameter[sFilename]] begin[{] ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=sExt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=endsWith, postfix_operators=[], prefix_operators=[], qualifier=sFilename, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)), control=EnhancedForControl(iterable=MemberReference(member=EXTENSIONS_CSS_COMPRESSED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sExt)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[literal[false]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[_isAlreadyCompressed] operator[SEP] Keyword[final] identifier[String] identifier[sFilename] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[sExt] operator[:] identifier[EXTENSIONS_CSS_COMPRESSED] operator[SEP] Keyword[if] operator[SEP] identifier[sFilename] operator[SEP] identifier[endsWith] operator[SEP] identifier[sExt] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public boolean searchWithTimeoutFor(Class<? extends TextView> viewClass, String regex, int expectedMinimumNumberOfMatches, boolean scroll, boolean onlyVisible) { final long endTime = SystemClock.uptimeMillis() + TIMEOUT; TextView foundAnyMatchingView = null; while (SystemClock.uptimeMillis() < endTime) { sleeper.sleep(); foundAnyMatchingView = searchFor(viewClass, regex, expectedMinimumNumberOfMatches, 0, scroll, onlyVisible); if (foundAnyMatchingView !=null){ return true; } } return false; }
class class_name[name] begin[{] method[searchWithTimeoutFor, return_type[type[boolean]], modifier[public], parameter[viewClass, regex, expectedMinimumNumberOfMatches, scroll, onlyVisible]] begin[{] local_variable[type[long], endTime] local_variable[type[TextView], foundAnyMatchingView] while[binary_operation[call[SystemClock.uptimeMillis, parameter[]], <, member[.endTime]]] begin[{] call[sleeper.sleep, parameter[]] assign[member[.foundAnyMatchingView], call[.searchFor, parameter[member[.viewClass], member[.regex], member[.expectedMinimumNumberOfMatches], literal[0], member[.scroll], member[.onlyVisible]]]] if[binary_operation[member[.foundAnyMatchingView], !=, literal[null]]] begin[{] return[literal[true]] else begin[{] None end[}] end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[searchWithTimeoutFor] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[TextView] operator[>] identifier[viewClass] , identifier[String] identifier[regex] , Keyword[int] identifier[expectedMinimumNumberOfMatches] , Keyword[boolean] identifier[scroll] , Keyword[boolean] identifier[onlyVisible] operator[SEP] { Keyword[final] Keyword[long] identifier[endTime] operator[=] identifier[SystemClock] operator[SEP] identifier[uptimeMillis] operator[SEP] operator[SEP] operator[+] identifier[TIMEOUT] operator[SEP] identifier[TextView] identifier[foundAnyMatchingView] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] identifier[SystemClock] operator[SEP] identifier[uptimeMillis] operator[SEP] operator[SEP] operator[<] identifier[endTime] operator[SEP] { identifier[sleeper] operator[SEP] identifier[sleep] operator[SEP] operator[SEP] operator[SEP] identifier[foundAnyMatchingView] operator[=] identifier[searchFor] operator[SEP] identifier[viewClass] , identifier[regex] , identifier[expectedMinimumNumberOfMatches] , Other[0] , identifier[scroll] , identifier[onlyVisible] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[foundAnyMatchingView] operator[!=] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
private synchronized PoolableConnection newConnection() { synchronized (xpool) { if (xpool.size() >= maxActive) { return null; } try { PoolableConnection conn = null; if (xpool.size() < minIdle) { conn = new PoolableConnection(this, ds.getConnection(), liveTime, Integer.MAX_VALUE, maxOpenPreparedStatementsPerConnection); } else if (xpool.size() < maxIdle) { conn = new PoolableConnection(this, ds.getConnection(), liveTime, maxIdleTime, maxOpenPreparedStatementsPerConnection); } else { conn = new PoolableConnection(this, ds.getConnection(), liveTime, 60 * 1000L, maxOpenPreparedStatementsPerConnection); } xpool.put(conn, conn); if (logger.isWarnEnabled()) { logger.warn("The " + xpool.size() + "th of " + maxActive + " connections is created for data source: " + url); } return conn; } catch (SQLException e) { String msg = "Faied to create new connection for data source '" + url + "'." + " [Active connection number]: " + (xpool.size() + 1) + ". " + AbacusException.getErrorMsg(e); logger.error(msg, e); throw new UncheckedSQLException(msg, e); } } }
class class_name[name] begin[{] method[newConnection, return_type[type[PoolableConnection]], modifier[synchronized private], parameter[]] begin[{] SYNCHRONIZED[member[.xpool]] BEGIN[{] if[binary_operation[call[xpool.size, parameter[]], >=, member[.maxActive]]] begin[{] return[literal[null]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=conn)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PoolableConnection, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=xpool, selectors=[], type_arguments=None), operandr=MemberReference(member=minIdle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=xpool, selectors=[], type_arguments=None), operandr=MemberReference(member=maxIdle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[], member=getConnection, postfix_operators=[], prefix_operators=[], qualifier=ds, selectors=[], type_arguments=None), MemberReference(member=liveTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=60), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000L), operator=*), MemberReference(member=maxOpenPreparedStatementsPerConnection, 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=PoolableConnection, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[], member=getConnection, postfix_operators=[], prefix_operators=[], qualifier=ds, selectors=[], type_arguments=None), MemberReference(member=liveTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxIdleTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxOpenPreparedStatementsPerConnection, 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=PoolableConnection, sub_type=None))), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[], member=getConnection, postfix_operators=[], prefix_operators=[], qualifier=ds, selectors=[], type_arguments=None), MemberReference(member=liveTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[]), MemberReference(member=maxOpenPreparedStatementsPerConnection, 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=PoolableConnection, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=xpool, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isWarnEnabled, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The "), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=xpool, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="th of "), operator=+), operandr=MemberReference(member=maxActive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" connections is created for data source: "), operator=+), operandr=MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Faied to create new connection for data source '"), operandr=MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'."), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" [Active connection number]: "), operator=+), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=xpool, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". "), operator=+), operandr=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getErrorMsg, postfix_operators=[], prefix_operators=[], qualifier=AbacusException, selectors=[], type_arguments=None), operator=+), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UncheckedSQLException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None) END[}] end[}] END[}]
Keyword[private] Keyword[synchronized] identifier[PoolableConnection] identifier[newConnection] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[xpool] operator[SEP] { Keyword[if] operator[SEP] identifier[xpool] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>=] identifier[maxActive] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[try] { identifier[PoolableConnection] identifier[conn] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[xpool] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] identifier[minIdle] operator[SEP] { identifier[conn] operator[=] Keyword[new] identifier[PoolableConnection] operator[SEP] Keyword[this] , identifier[ds] operator[SEP] identifier[getConnection] operator[SEP] operator[SEP] , identifier[liveTime] , identifier[Integer] operator[SEP] identifier[MAX_VALUE] , identifier[maxOpenPreparedStatementsPerConnection] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[xpool] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] identifier[maxIdle] operator[SEP] { identifier[conn] operator[=] Keyword[new] identifier[PoolableConnection] operator[SEP] Keyword[this] , identifier[ds] operator[SEP] identifier[getConnection] operator[SEP] operator[SEP] , identifier[liveTime] , identifier[maxIdleTime] , identifier[maxOpenPreparedStatementsPerConnection] operator[SEP] operator[SEP] } Keyword[else] { identifier[conn] operator[=] Keyword[new] identifier[PoolableConnection] operator[SEP] Keyword[this] , identifier[ds] operator[SEP] identifier[getConnection] operator[SEP] operator[SEP] , identifier[liveTime] , Other[60] operator[*] Other[1000L] , identifier[maxOpenPreparedStatementsPerConnection] operator[SEP] operator[SEP] } identifier[xpool] operator[SEP] identifier[put] operator[SEP] identifier[conn] , identifier[conn] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isWarnEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[xpool] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[maxActive] operator[+] literal[String] operator[+] identifier[url] operator[SEP] operator[SEP] } Keyword[return] identifier[conn] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { identifier[String] identifier[msg] operator[=] literal[String] operator[+] identifier[url] operator[+] literal[String] operator[+] literal[String] operator[+] operator[SEP] identifier[xpool] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] operator[+] literal[String] operator[+] identifier[AbacusException] operator[SEP] identifier[getErrorMsg] operator[SEP] identifier[e] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[msg] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[UncheckedSQLException] operator[SEP] identifier[msg] , identifier[e] operator[SEP] operator[SEP] } } }
private List<ClassReference> getClassReferences(String className) { List<ClassReference> ret = new ArrayList<ClassReference>(); ClassReference cr = m_classReferenceMap.get(className); ret.addAll(cr.getChildren()); return ret; }
class class_name[name] begin[{] method[getClassReferences, return_type[type[List]], modifier[private], parameter[className]] begin[{] local_variable[type[List], ret] local_variable[type[ClassReference], cr] call[ret.addAll, parameter[call[cr.getChildren, parameter[]]]] return[member[.ret]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[ClassReference] operator[>] identifier[getClassReferences] operator[SEP] identifier[String] identifier[className] operator[SEP] { identifier[List] operator[<] identifier[ClassReference] operator[>] identifier[ret] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[ClassReference] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ClassReference] identifier[cr] operator[=] identifier[m_classReferenceMap] operator[SEP] identifier[get] operator[SEP] identifier[className] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[addAll] operator[SEP] identifier[cr] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
@POST @Produces(value = "text/plain") public String addNewID(String str) { Subject user = SecurityUtils.getSubject(); String remoteIP = request.getRemoteAddr().replaceAll("[.:]", "_"); user.checkPermission("shortener:create:" + remoteIP); return shortenerDao.shorten(str, "" + user.getPrincipal()).toString(); }
class class_name[name] begin[{] method[addNewID, return_type[type[String]], modifier[public], parameter[str]] begin[{] local_variable[type[Subject], user] local_variable[type[String], remoteIP] call[user.checkPermission, parameter[binary_operation[literal["shortener:create:"], +, member[.remoteIP]]]] return[call[shortenerDao.shorten, parameter[member[.str], binary_operation[literal[""], +, call[user.getPrincipal, parameter[]]]]]] end[}] END[}]
annotation[@] identifier[POST] annotation[@] identifier[Produces] operator[SEP] identifier[value] operator[=] literal[String] operator[SEP] Keyword[public] identifier[String] identifier[addNewID] operator[SEP] identifier[String] identifier[str] operator[SEP] { identifier[Subject] identifier[user] operator[=] identifier[SecurityUtils] operator[SEP] identifier[getSubject] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[remoteIP] operator[=] identifier[request] operator[SEP] identifier[getRemoteAddr] operator[SEP] operator[SEP] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[user] operator[SEP] identifier[checkPermission] operator[SEP] literal[String] operator[+] identifier[remoteIP] operator[SEP] operator[SEP] Keyword[return] identifier[shortenerDao] operator[SEP] identifier[shorten] operator[SEP] identifier[str] , literal[String] operator[+] identifier[user] operator[SEP] identifier[getPrincipal] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static DoubleMatrix floatToDouble(FloatMatrix fm) { DoubleMatrix dm = new DoubleMatrix(fm.rows, fm.columns); for (int i = 0; i < fm.length; i++) dm.put(i, (double) fm.get(i)); return dm; }
class class_name[name] begin[{] method[floatToDouble, return_type[type[DoubleMatrix]], modifier[public static], parameter[fm]] begin[{] local_variable[type[DoubleMatrix], dm] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=fm, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=double))], member=put, postfix_operators=[], prefix_operators=[], qualifier=dm, 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=fm, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.dm]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DoubleMatrix] identifier[floatToDouble] operator[SEP] identifier[FloatMatrix] identifier[fm] operator[SEP] { identifier[DoubleMatrix] identifier[dm] operator[=] Keyword[new] identifier[DoubleMatrix] operator[SEP] identifier[fm] operator[SEP] identifier[rows] , identifier[fm] operator[SEP] identifier[columns] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[fm] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[dm] operator[SEP] identifier[put] operator[SEP] identifier[i] , operator[SEP] Keyword[double] operator[SEP] identifier[fm] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[dm] operator[SEP] }
private void rewriteProperty(JSONObject node, String key, JSONArray rewriteProperty) throws JSONException { if (node.get(cleanup(key)) instanceof String) { if (rewriteProperty.length() == 2) { if (rewriteProperty.get(0) instanceof String && rewriteProperty.get(1) instanceof String) { String pattern = rewriteProperty.getString(0); String replacement = rewriteProperty.getString(1); Pattern compiledPattern = Pattern.compile(pattern); Matcher matcher = compiledPattern.matcher(node.getString(cleanup(key))); node.put(cleanup(key), matcher.replaceAll(replacement)); } } } }
class class_name[name] begin[{] method[rewriteProperty, return_type[void], modifier[private], parameter[node, key, rewriteProperty]] begin[{] if[binary_operation[call[node.get, parameter[call[.cleanup, parameter[member[.key]]]]], instanceof, type[String]]] begin[{] if[binary_operation[call[rewriteProperty.length, parameter[]], ==, literal[2]]] begin[{] if[binary_operation[binary_operation[call[rewriteProperty.get, parameter[literal[0]]], instanceof, type[String]], &&, binary_operation[call[rewriteProperty.get, parameter[literal[1]]], instanceof, type[String]]]] begin[{] local_variable[type[String], pattern] local_variable[type[String], replacement] local_variable[type[Pattern], compiledPattern] local_variable[type[Matcher], matcher] call[node.put, parameter[call[.cleanup, parameter[member[.key]]], call[matcher.replaceAll, parameter[member[.replacement]]]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[rewriteProperty] operator[SEP] identifier[JSONObject] identifier[node] , identifier[String] identifier[key] , identifier[JSONArray] identifier[rewriteProperty] operator[SEP] Keyword[throws] identifier[JSONException] { Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[get] operator[SEP] identifier[cleanup] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[instanceof] identifier[String] operator[SEP] { Keyword[if] operator[SEP] identifier[rewriteProperty] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[2] operator[SEP] { Keyword[if] operator[SEP] identifier[rewriteProperty] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] Keyword[instanceof] identifier[String] operator[&&] identifier[rewriteProperty] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] Keyword[instanceof] identifier[String] operator[SEP] { identifier[String] identifier[pattern] operator[=] identifier[rewriteProperty] operator[SEP] identifier[getString] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[String] identifier[replacement] operator[=] identifier[rewriteProperty] operator[SEP] identifier[getString] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[Pattern] identifier[compiledPattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[pattern] operator[SEP] operator[SEP] identifier[Matcher] identifier[matcher] operator[=] identifier[compiledPattern] operator[SEP] identifier[matcher] operator[SEP] identifier[node] operator[SEP] identifier[getString] operator[SEP] identifier[cleanup] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[SEP] identifier[put] operator[SEP] identifier[cleanup] operator[SEP] identifier[key] operator[SEP] , identifier[matcher] operator[SEP] identifier[replaceAll] operator[SEP] identifier[replacement] operator[SEP] operator[SEP] operator[SEP] } } } }
@Override public GeoShapeCondition build() { try { return new GeoShapeCondition(boost, field, shape, operation); } catch (NoClassDefFoundError e) { throw new JTSNotFoundException(); } }
class class_name[name] begin[{] method[build, return_type[type[GeoShapeCondition]], modifier[public], parameter[]] begin[{] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=boost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=shape, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=operation, 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=GeoShapeCondition, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JTSNotFoundException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoClassDefFoundError']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GeoShapeCondition] identifier[build] operator[SEP] operator[SEP] { Keyword[try] { Keyword[return] Keyword[new] identifier[GeoShapeCondition] operator[SEP] identifier[boost] , identifier[field] , identifier[shape] , identifier[operation] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoClassDefFoundError] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[JTSNotFoundException] operator[SEP] operator[SEP] operator[SEP] } }
@Override public R visitHidden(HiddenTree node, P p) { return defaultAction(node, p); }
class class_name[name] begin[{] method[visitHidden, return_type[type[R]], modifier[public], parameter[node, p]] begin[{] return[call[.defaultAction, parameter[member[.node], member[.p]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[R] identifier[visitHidden] operator[SEP] identifier[HiddenTree] identifier[node] , identifier[P] identifier[p] operator[SEP] { Keyword[return] identifier[defaultAction] operator[SEP] identifier[node] , identifier[p] operator[SEP] operator[SEP] }
public void cancelOrder(KiteConnect kiteConnect) throws KiteException, IOException { // Order modify request will return order model which will contain only order_id. // Cancel order will return order model which will only have orderId. Order order2 = kiteConnect.cancelOrder("180116000727266", Constants.VARIETY_REGULAR); System.out.println(order2.orderId); }
class class_name[name] begin[{] method[cancelOrder, return_type[void], modifier[public], parameter[kiteConnect]] begin[{] local_variable[type[Order], order2] call[System.out.println, parameter[member[order2.orderId]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[cancelOrder] operator[SEP] identifier[KiteConnect] identifier[kiteConnect] operator[SEP] Keyword[throws] identifier[KiteException] , identifier[IOException] { identifier[Order] identifier[order2] operator[=] identifier[kiteConnect] operator[SEP] identifier[cancelOrder] operator[SEP] literal[String] , identifier[Constants] operator[SEP] identifier[VARIETY_REGULAR] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[order2] operator[SEP] identifier[orderId] operator[SEP] operator[SEP] }
public static File getFileFromDirectoryInClassPath(String fileName, String classPath) { Collection<String> paths = StringSupport.split(classPath, ";:", false); for(String singlePath : paths) { File dir = new File(singlePath); if (dir.isDirectory()) { File file = new File(singlePath + '/' + fileName); if (file.exists()) { return file; } } } return null; }
class class_name[name] begin[{] method[getFileFromDirectoryInClassPath, return_type[type[File]], modifier[public static], parameter[fileName, classPath]] begin[{] local_variable[type[Collection], paths] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=singlePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), name=dir)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=dir, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=singlePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/'), operator=+), operandr=MemberReference(member=fileName, 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=File, sub_type=None)), name=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=paths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=singlePath)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[File] identifier[getFileFromDirectoryInClassPath] operator[SEP] identifier[String] identifier[fileName] , identifier[String] identifier[classPath] operator[SEP] { identifier[Collection] operator[<] identifier[String] operator[>] identifier[paths] operator[=] identifier[StringSupport] operator[SEP] identifier[split] operator[SEP] identifier[classPath] , literal[String] , literal[boolean] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[singlePath] operator[:] identifier[paths] operator[SEP] { identifier[File] identifier[dir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[singlePath] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dir] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[File] identifier[file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[singlePath] operator[+] literal[String] operator[+] identifier[fileName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[file] operator[SEP] } } } Keyword[return] Other[null] operator[SEP] }
public void setStrokeExternalGraphicStrokePath( String externalGraphicPath ) throws MalformedURLException { if (strokeExternalGraphicStroke == null) { Graphic graphic = null; LineSymbolizerWrapper lineSymbolizerWrapper = adapt(LineSymbolizerWrapper.class); PolygonSymbolizerWrapper polygonSymbolizerWrapper = adapt(PolygonSymbolizerWrapper.class); if (lineSymbolizerWrapper != null) { graphic = lineSymbolizerWrapper.getStrokeGraphicStroke(); if (graphic == null) { graphic = sb.createGraphic(); lineSymbolizerWrapper.setStrokeGraphicStroke(graphic); } } else if (polygonSymbolizerWrapper != null) { graphic = polygonSymbolizerWrapper.getStrokeGraphicStroke(); if (graphic == null) { graphic = sb.createGraphic(); polygonSymbolizerWrapper.setStrokeGraphicStroke(graphic); } } else { return; } graphic.graphicalSymbols().clear(); String urlStr = externalGraphicPath; if (!externalGraphicPath.startsWith("http:") && !externalGraphicPath.startsWith("file:")) { //$NON-NLS-1$ //$NON-NLS-2$ urlStr = "file:" + externalGraphicPath; //$NON-NLS-1$ } strokeExternalGraphicStroke = sb.createExternalGraphic(new URL(urlStr), getFormat(externalGraphicPath)); graphic.graphicalSymbols().add(strokeExternalGraphicStroke); } else { setExternalGraphicPath(externalGraphicPath, strokeExternalGraphicStroke); } }
class class_name[name] begin[{] method[setStrokeExternalGraphicStrokePath, return_type[void], modifier[public], parameter[externalGraphicPath]] begin[{] if[binary_operation[member[.strokeExternalGraphicStroke], ==, literal[null]]] begin[{] local_variable[type[Graphic], graphic] local_variable[type[LineSymbolizerWrapper], lineSymbolizerWrapper] local_variable[type[PolygonSymbolizerWrapper], polygonSymbolizerWrapper] if[binary_operation[member[.lineSymbolizerWrapper], !=, literal[null]]] begin[{] assign[member[.graphic], call[lineSymbolizerWrapper.getStrokeGraphicStroke, parameter[]]] if[binary_operation[member[.graphic], ==, literal[null]]] begin[{] assign[member[.graphic], call[sb.createGraphic, parameter[]]] call[lineSymbolizerWrapper.setStrokeGraphicStroke, parameter[member[.graphic]]] else begin[{] None end[}] else begin[{] if[binary_operation[member[.polygonSymbolizerWrapper], !=, literal[null]]] begin[{] assign[member[.graphic], call[polygonSymbolizerWrapper.getStrokeGraphicStroke, parameter[]]] if[binary_operation[member[.graphic], ==, literal[null]]] begin[{] assign[member[.graphic], call[sb.createGraphic, parameter[]]] call[polygonSymbolizerWrapper.setStrokeGraphicStroke, parameter[member[.graphic]]] else begin[{] None end[}] else begin[{] return[None] end[}] end[}] call[graphic.graphicalSymbols, parameter[]] local_variable[type[String], urlStr] if[binary_operation[call[externalGraphicPath.startsWith, parameter[literal["http:"]]], &&, call[externalGraphicPath.startsWith, parameter[literal["file:"]]]]] begin[{] assign[member[.urlStr], binary_operation[literal["file:"], +, member[.externalGraphicPath]]] else begin[{] None end[}] assign[member[.strokeExternalGraphicStroke], call[sb.createExternalGraphic, parameter[ClassCreator(arguments=[MemberReference(member=urlStr, 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=URL, sub_type=None)), call[.getFormat, parameter[member[.externalGraphicPath]]]]]] call[graphic.graphicalSymbols, parameter[]] else begin[{] call[.setExternalGraphicPath, parameter[member[.externalGraphicPath], member[.strokeExternalGraphicStroke]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setStrokeExternalGraphicStrokePath] operator[SEP] identifier[String] identifier[externalGraphicPath] operator[SEP] Keyword[throws] identifier[MalformedURLException] { Keyword[if] operator[SEP] identifier[strokeExternalGraphicStroke] operator[==] Other[null] operator[SEP] { identifier[Graphic] identifier[graphic] operator[=] Other[null] operator[SEP] identifier[LineSymbolizerWrapper] identifier[lineSymbolizerWrapper] operator[=] identifier[adapt] operator[SEP] identifier[LineSymbolizerWrapper] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[PolygonSymbolizerWrapper] identifier[polygonSymbolizerWrapper] operator[=] identifier[adapt] operator[SEP] identifier[PolygonSymbolizerWrapper] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lineSymbolizerWrapper] operator[!=] Other[null] operator[SEP] { identifier[graphic] operator[=] identifier[lineSymbolizerWrapper] operator[SEP] identifier[getStrokeGraphicStroke] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[graphic] operator[==] Other[null] operator[SEP] { identifier[graphic] operator[=] identifier[sb] operator[SEP] identifier[createGraphic] operator[SEP] operator[SEP] operator[SEP] identifier[lineSymbolizerWrapper] operator[SEP] identifier[setStrokeGraphicStroke] operator[SEP] identifier[graphic] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[polygonSymbolizerWrapper] operator[!=] Other[null] operator[SEP] { identifier[graphic] operator[=] identifier[polygonSymbolizerWrapper] operator[SEP] identifier[getStrokeGraphicStroke] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[graphic] operator[==] Other[null] operator[SEP] { identifier[graphic] operator[=] identifier[sb] operator[SEP] identifier[createGraphic] operator[SEP] operator[SEP] operator[SEP] identifier[polygonSymbolizerWrapper] operator[SEP] identifier[setStrokeGraphicStroke] operator[SEP] identifier[graphic] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] operator[SEP] } identifier[graphic] operator[SEP] identifier[graphicalSymbols] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[urlStr] operator[=] identifier[externalGraphicPath] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[externalGraphicPath] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[&&] operator[!] identifier[externalGraphicPath] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[urlStr] operator[=] literal[String] operator[+] identifier[externalGraphicPath] operator[SEP] } identifier[strokeExternalGraphicStroke] operator[=] identifier[sb] operator[SEP] identifier[createExternalGraphic] operator[SEP] Keyword[new] identifier[URL] operator[SEP] identifier[urlStr] operator[SEP] , identifier[getFormat] operator[SEP] identifier[externalGraphicPath] operator[SEP] operator[SEP] operator[SEP] identifier[graphic] operator[SEP] identifier[graphicalSymbols] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[strokeExternalGraphicStroke] operator[SEP] operator[SEP] } Keyword[else] { identifier[setExternalGraphicPath] operator[SEP] identifier[externalGraphicPath] , identifier[strokeExternalGraphicStroke] operator[SEP] operator[SEP] } }
public ICriterion<ReferenceClientParam> hasChainedProperty(String theResourceType, ICriterion<?> theCriterion) { return new ReferenceChainCriterion(getParamName(), theResourceType, theCriterion); }
class class_name[name] begin[{] method[hasChainedProperty, return_type[type[ICriterion]], modifier[public], parameter[theResourceType, theCriterion]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getParamName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=theResourceType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=theCriterion, 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=ReferenceChainCriterion, sub_type=None))] end[}] END[}]
Keyword[public] identifier[ICriterion] operator[<] identifier[ReferenceClientParam] operator[>] identifier[hasChainedProperty] operator[SEP] identifier[String] identifier[theResourceType] , identifier[ICriterion] operator[<] operator[?] operator[>] identifier[theCriterion] operator[SEP] { Keyword[return] Keyword[new] identifier[ReferenceChainCriterion] operator[SEP] identifier[getParamName] operator[SEP] operator[SEP] , identifier[theResourceType] , identifier[theCriterion] operator[SEP] operator[SEP] }
public static void copyProperties(final Object source, final Object target) { ExceptionUtils.iae.throwIfNull(source, SOURCE_IS_NULL_MESSAGE); ExceptionUtils.iae.throwIfNull(target, TARGETIS_NULL_MESSAGE); Class<Object> sourceClass = ClassUtils.getClass(source); Class<Object> targetClass = ClassUtils.getClass(target); Field[] sourceFields = sourceClass.getDeclaredFields(); Field[] targetFields = targetClass.getDeclaredFields(); try { for (Field sourceField : sourceFields) { Field targetField = getFieldByField(targetFields, sourceField); if (targetField != null) { getAndSetValue(source, sourceField, target, targetField); } } } catch (Exception e) { throw new FatalBeanException(CAN_NOT_COPY_PROPERTIES, e); } }
class class_name[name] begin[{] method[copyProperties, return_type[void], modifier[public static], parameter[source, target]] begin[{] call[ExceptionUtils.iae.throwIfNull, parameter[member[.source], member[.SOURCE_IS_NULL_MESSAGE]]] call[ExceptionUtils.iae.throwIfNull, parameter[member[.target], member[.TARGETIS_NULL_MESSAGE]]] local_variable[type[Class], sourceClass] local_variable[type[Class], targetClass] local_variable[type[Field], sourceFields] local_variable[type[Field], targetFields] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=targetFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sourceField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFieldByField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=targetField)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=targetField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=source, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sourceField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAndSetValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sourceFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sourceField)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=CAN_NOT_COPY_PROPERTIES, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FatalBeanException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[copyProperties] operator[SEP] Keyword[final] identifier[Object] identifier[source] , Keyword[final] identifier[Object] identifier[target] operator[SEP] { identifier[ExceptionUtils] operator[SEP] identifier[iae] operator[SEP] identifier[throwIfNull] operator[SEP] identifier[source] , identifier[SOURCE_IS_NULL_MESSAGE] operator[SEP] operator[SEP] identifier[ExceptionUtils] operator[SEP] identifier[iae] operator[SEP] identifier[throwIfNull] operator[SEP] identifier[target] , identifier[TARGETIS_NULL_MESSAGE] operator[SEP] operator[SEP] identifier[Class] operator[<] identifier[Object] operator[>] identifier[sourceClass] operator[=] identifier[ClassUtils] operator[SEP] identifier[getClass] operator[SEP] identifier[source] operator[SEP] operator[SEP] identifier[Class] operator[<] identifier[Object] operator[>] identifier[targetClass] operator[=] identifier[ClassUtils] operator[SEP] identifier[getClass] operator[SEP] identifier[target] operator[SEP] operator[SEP] identifier[Field] operator[SEP] operator[SEP] identifier[sourceFields] operator[=] identifier[sourceClass] operator[SEP] identifier[getDeclaredFields] operator[SEP] operator[SEP] operator[SEP] identifier[Field] operator[SEP] operator[SEP] identifier[targetFields] operator[=] identifier[targetClass] operator[SEP] identifier[getDeclaredFields] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[for] operator[SEP] identifier[Field] identifier[sourceField] operator[:] identifier[sourceFields] operator[SEP] { identifier[Field] identifier[targetField] operator[=] identifier[getFieldByField] operator[SEP] identifier[targetFields] , identifier[sourceField] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[targetField] operator[!=] Other[null] operator[SEP] { identifier[getAndSetValue] operator[SEP] identifier[source] , identifier[sourceField] , identifier[target] , identifier[targetField] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[FatalBeanException] operator[SEP] identifier[CAN_NOT_COPY_PROPERTIES] , identifier[e] operator[SEP] operator[SEP] } }
protected static Boolean parseOptionalBooleanValue(JSONObject json, String key) { try { return Boolean.valueOf(json.getBoolean(key)); } catch (JSONException e) { LOG.info(Messages.get().getBundle().key(Messages.LOG_OPTIONAL_BOOLEAN_MISSING_1, key), e); return null; } }
class class_name[name] begin[{] method[parseOptionalBooleanValue, return_type[type[Boolean]], modifier[static protected], parameter[json, key]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBoolean, postfix_operators=[], prefix_operators=[], qualifier=json, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[], member=getBundle, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=LOG_OPTIONAL_BOOLEAN_MISSING_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), 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=['JSONException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[static] identifier[Boolean] identifier[parseOptionalBooleanValue] operator[SEP] identifier[JSONObject] identifier[json] , identifier[String] identifier[key] operator[SEP] { Keyword[try] { Keyword[return] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[json] operator[SEP] identifier[getBoolean] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JSONException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[LOG_OPTIONAL_BOOLEAN_MISSING_1] , identifier[key] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
public void updateWeightAndPrune(float[] dataRow, int modelIndex, int ng, int bestIndex, float bestWeight) { int index = modelIndex; float weightTotal = 0; for (int i = 0; i < ng; ) { float weight = dataRow[index]; // if( ng > 1 ) // System.out.println("["+i+"] = "+ng+" weight "+weight); weight = weight - learningRate*(weight + decay); // <-- original equation // weight = weight - learningRate*decay; if( weight <= 0 ) { // copy the last Gaussian into this location int indexLast = modelIndex + (ng-1)*gaussianStride; for (int j = 0; j < gaussianStride; j++) { dataRow[index+j] = dataRow[indexLast+j]; } // see if the best Gaussian just got moved to here if( indexLast == bestIndex ) bestIndex = index; // mark it as unused by setting variance to zero dataRow[indexLast+1] = 0; // decrease the number of gaussians ng -= 1; } else { dataRow[index] = weight; weightTotal += weight; index += gaussianStride; i++; } } // undo the change to the best model. It was done in the for loop to avoid an if statement which would // have slowed it down if( bestIndex != -1 ) { weightTotal -= dataRow[bestIndex]; weightTotal += bestWeight; dataRow[bestIndex] = bestWeight; } // Normalize the weight so that it sums up to one index = modelIndex; for (int i = 0; i < ng; i++, index += gaussianStride) { dataRow[index] /= weightTotal; } }
class class_name[name] begin[{] method[updateWeightAndPrune, return_type[void], modifier[public], parameter[dataRow, modelIndex, ng, bestIndex, bestWeight]] begin[{] local_variable[type[int], index] local_variable[type[float], weightTotal] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=dataRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=weight)], modifiers=set(), type=BasicType(dimensions=[], name=float)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=learningRate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=decay, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator=*), operator=-)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=weightTotal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=gaussianStride, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=modelIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ng, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operandr=MemberReference(member=gaussianStride, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+), name=indexLast)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), type==, value=MemberReference(member=dataRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=indexLast, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=gaussianStride, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=indexLast, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bestIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=bestIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=indexLast, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ng, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ng, 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=None), label=None) if[binary_operation[member[.bestIndex], !=, literal[1]]] begin[{] assign[member[.weightTotal], member[.dataRow]] assign[member[.weightTotal], member[.bestWeight]] assign[member[.dataRow], member[.bestWeight]] else begin[{] None end[}] assign[member[.index], member[.modelIndex]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=/=, value=MemberReference(member=weightTotal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ng, 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=[]), Assignment(expressionl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=gaussianStride, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[updateWeightAndPrune] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[dataRow] , Keyword[int] identifier[modelIndex] , Keyword[int] identifier[ng] , Keyword[int] identifier[bestIndex] , Keyword[float] identifier[bestWeight] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[modelIndex] operator[SEP] Keyword[float] identifier[weightTotal] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[ng] operator[SEP] operator[SEP] { Keyword[float] identifier[weight] operator[=] identifier[dataRow] operator[SEP] identifier[index] operator[SEP] operator[SEP] identifier[weight] operator[=] identifier[weight] operator[-] identifier[learningRate] operator[*] operator[SEP] identifier[weight] operator[+] identifier[decay] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[weight] operator[<=] Other[0] operator[SEP] { Keyword[int] identifier[indexLast] operator[=] identifier[modelIndex] operator[+] operator[SEP] identifier[ng] operator[-] Other[1] operator[SEP] operator[*] identifier[gaussianStride] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[gaussianStride] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[dataRow] operator[SEP] identifier[index] operator[+] identifier[j] operator[SEP] operator[=] identifier[dataRow] operator[SEP] identifier[indexLast] operator[+] identifier[j] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[indexLast] operator[==] identifier[bestIndex] operator[SEP] identifier[bestIndex] operator[=] identifier[index] operator[SEP] identifier[dataRow] operator[SEP] identifier[indexLast] operator[+] Other[1] operator[SEP] operator[=] Other[0] operator[SEP] identifier[ng] operator[-=] Other[1] operator[SEP] } Keyword[else] { identifier[dataRow] operator[SEP] identifier[index] operator[SEP] operator[=] identifier[weight] operator[SEP] identifier[weightTotal] operator[+=] identifier[weight] operator[SEP] identifier[index] operator[+=] identifier[gaussianStride] operator[SEP] identifier[i] operator[++] operator[SEP] } } Keyword[if] operator[SEP] identifier[bestIndex] operator[!=] operator[-] Other[1] operator[SEP] { identifier[weightTotal] operator[-=] identifier[dataRow] operator[SEP] identifier[bestIndex] operator[SEP] operator[SEP] identifier[weightTotal] operator[+=] identifier[bestWeight] operator[SEP] identifier[dataRow] operator[SEP] identifier[bestIndex] operator[SEP] operator[=] identifier[bestWeight] operator[SEP] } identifier[index] operator[=] identifier[modelIndex] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[ng] operator[SEP] identifier[i] operator[++] , identifier[index] operator[+=] identifier[gaussianStride] operator[SEP] { identifier[dataRow] operator[SEP] identifier[index] operator[SEP] operator[/=] identifier[weightTotal] operator[SEP] } }
public synchronized FileEntry put( DirectoryEntry parent, String name, InputStream content ) throws IOException { parent.getClass(); parent = getNormalizedParent( parent ); List<Entry> entries = getEntriesList( parent ); for ( Iterator<Entry> i = entries.iterator(); i.hasNext(); ) { Entry entry = (Entry) i.next(); if ( name.equals( entry.getName() ) ) { if ( entry instanceof FileEntry ) { i.remove(); } else { return null; } } } FileEntry entry = new MemoryFileEntry( this, parent, name, IOUtils.toByteArray( content ) ); entries.add( entry ); return entry; }
class class_name[name] begin[{] method[put, return_type[type[FileEntry]], modifier[synchronized public], parameter[parent, name, content]] begin[{] call[parent.getClass, parameter[]] assign[member[.parent], call[.getNormalizedParent, parameter[member[.parent]]]] local_variable[type[List], entries] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Entry, sub_type=None)), name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Entry, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=FileEntry, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), label=None)]))]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=entries, selectors=[], type_arguments=None), name=i)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Entry, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) local_variable[type[FileEntry], entry] call[entries.add, parameter[member[.entry]]] return[member[.entry]] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[FileEntry] identifier[put] operator[SEP] identifier[DirectoryEntry] identifier[parent] , identifier[String] identifier[name] , identifier[InputStream] identifier[content] operator[SEP] Keyword[throws] identifier[IOException] { identifier[parent] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[parent] operator[=] identifier[getNormalizedParent] operator[SEP] identifier[parent] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Entry] operator[>] identifier[entries] operator[=] identifier[getEntriesList] operator[SEP] identifier[parent] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[Entry] operator[>] identifier[i] operator[=] identifier[entries] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[Entry] identifier[entry] operator[=] operator[SEP] identifier[Entry] operator[SEP] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[entry] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[entry] Keyword[instanceof] identifier[FileEntry] operator[SEP] { identifier[i] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } } } identifier[FileEntry] identifier[entry] operator[=] Keyword[new] identifier[MemoryFileEntry] operator[SEP] Keyword[this] , identifier[parent] , identifier[name] , identifier[IOUtils] operator[SEP] identifier[toByteArray] operator[SEP] identifier[content] operator[SEP] operator[SEP] operator[SEP] identifier[entries] operator[SEP] identifier[add] operator[SEP] identifier[entry] operator[SEP] operator[SEP] Keyword[return] identifier[entry] operator[SEP] }
public static boolean compareDeclarations(final Method first, final Method second) { if (first.getReturnType() != second.getReturnType()) { return false; } return compareSignatures(first, second); }
class class_name[name] begin[{] method[compareDeclarations, return_type[type[boolean]], modifier[public static], parameter[first, second]] begin[{] if[binary_operation[call[first.getReturnType, parameter[]], !=, call[second.getReturnType, parameter[]]]] begin[{] return[literal[false]] else begin[{] None end[}] return[call[.compareSignatures, parameter[member[.first], member[.second]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[compareDeclarations] operator[SEP] Keyword[final] identifier[Method] identifier[first] , Keyword[final] identifier[Method] identifier[second] operator[SEP] { Keyword[if] operator[SEP] identifier[first] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[!=] identifier[second] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] identifier[compareSignatures] operator[SEP] identifier[first] , identifier[second] operator[SEP] operator[SEP] }
public static String subjectToString(final Subject subject) { final String result; if (subject == null) { result = "null"; } else { StringBuffer buffer = new StringBuffer("["); buffer.append(subject.getClass().getName()); buffer.append("@"); buffer .append(Integer.toHexString(System .identityHashCode(subject))); buffer.append(" <principals="); buffer.append(subject.getPrincipals()); buffer.append(">]"); result = buffer.toString(); } return result; }
class class_name[name] begin[{] method[subjectToString, return_type[type[String]], modifier[public static], parameter[subject]] begin[{] local_variable[type[String], result] if[binary_operation[member[.subject], ==, literal[null]]] begin[{] assign[member[.result], literal["null"]] else begin[{] local_variable[type[StringBuffer], buffer] call[buffer.append, parameter[call[subject.getClass, parameter[]]]] call[buffer.append, parameter[literal["@"]]] call[buffer.append, parameter[call[Integer.toHexString, parameter[call[System.identityHashCode, parameter[member[.subject]]]]]]] call[buffer.append, parameter[literal[" <principals="]]] call[buffer.append, parameter[call[subject.getPrincipals, parameter[]]]] call[buffer.append, parameter[literal[">]"]]] assign[member[.result], call[buffer.toString, parameter[]]] end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[subjectToString] operator[SEP] Keyword[final] identifier[Subject] identifier[subject] operator[SEP] { Keyword[final] identifier[String] identifier[result] operator[SEP] Keyword[if] operator[SEP] identifier[subject] operator[==] Other[null] operator[SEP] { identifier[result] operator[=] literal[String] operator[SEP] } Keyword[else] { identifier[StringBuffer] identifier[buffer] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[append] operator[SEP] identifier[subject] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[append] operator[SEP] identifier[Integer] operator[SEP] identifier[toHexString] operator[SEP] identifier[System] operator[SEP] identifier[identityHashCode] operator[SEP] identifier[subject] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[append] operator[SEP] identifier[subject] operator[SEP] identifier[getPrincipals] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[buffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
@Override public void resetLearningImpl() { this.windowSize = this.windowSizeOption.getValue(); this.numTrees = this.numTreesOption.getValue(); this.maxDepth = this.maxDepthOption.getValue(); this.sizeLimit = this.sizeLimitOption.getValue(); this.numInstances = 0; this.forest = new HSTreeNode[numTrees]; this.referenceWindow = true; this.anomalyThreshold = this.anomalyThresholdOption.getValue(); }
class class_name[name] begin[{] method[resetLearningImpl, return_type[void], modifier[public], parameter[]] begin[{] assign[THIS[member[None.windowSize]], THIS[member[None.windowSizeOption]call[None.getValue, parameter[]]]] assign[THIS[member[None.numTrees]], THIS[member[None.numTreesOption]call[None.getValue, parameter[]]]] assign[THIS[member[None.maxDepth]], THIS[member[None.maxDepthOption]call[None.getValue, parameter[]]]] assign[THIS[member[None.sizeLimit]], THIS[member[None.sizeLimitOption]call[None.getValue, parameter[]]]] assign[THIS[member[None.numInstances]], literal[0]] assign[THIS[member[None.forest]], ArrayCreator(dimensions=[MemberReference(member=numTrees, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HSTreeNode, sub_type=None))] assign[THIS[member[None.referenceWindow]], literal[true]] assign[THIS[member[None.anomalyThreshold]], THIS[member[None.anomalyThresholdOption]call[None.getValue, parameter[]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[resetLearningImpl] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[windowSize] operator[=] Keyword[this] operator[SEP] identifier[windowSizeOption] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[numTrees] operator[=] Keyword[this] operator[SEP] identifier[numTreesOption] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[maxDepth] operator[=] Keyword[this] operator[SEP] identifier[maxDepthOption] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[sizeLimit] operator[=] Keyword[this] operator[SEP] identifier[sizeLimitOption] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[numInstances] operator[=] Other[0] operator[SEP] Keyword[this] operator[SEP] identifier[forest] operator[=] Keyword[new] identifier[HSTreeNode] operator[SEP] identifier[numTrees] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[referenceWindow] operator[=] literal[boolean] operator[SEP] Keyword[this] operator[SEP] identifier[anomalyThreshold] operator[=] Keyword[this] operator[SEP] identifier[anomalyThresholdOption] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] }
public static String cleanString(String pStr) { if (pStr == null || pStr.equals("")) { return pStr; } StringBuffer buff = new StringBuffer(); for (int i = 0; i < pStr.length(); i++) { char aChar = pStr.charAt(i); if (Character.isLetterOrDigit(aChar)) { buff.append(aChar); } } return buff.toString(); }
class class_name[name] begin[{] method[cleanString, return_type[type[String]], modifier[public static], parameter[pStr]] begin[{] if[binary_operation[binary_operation[member[.pStr], ==, literal[null]], ||, call[pStr.equals, parameter[literal[""]]]]] begin[{] return[member[.pStr]] else begin[{] None end[}] local_variable[type[StringBuffer], buff] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pStr, selectors=[], type_arguments=None), name=aChar)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=aChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isLetterOrDigit, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=aChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=buff, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=pStr, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[buff.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[cleanString] operator[SEP] identifier[String] identifier[pStr] operator[SEP] { Keyword[if] operator[SEP] identifier[pStr] operator[==] Other[null] operator[||] identifier[pStr] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[pStr] operator[SEP] } identifier[StringBuffer] identifier[buff] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[pStr] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[aChar] operator[=] identifier[pStr] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Character] operator[SEP] identifier[isLetterOrDigit] operator[SEP] identifier[aChar] operator[SEP] operator[SEP] { identifier[buff] operator[SEP] identifier[append] operator[SEP] identifier[aChar] operator[SEP] operator[SEP] } } Keyword[return] identifier[buff] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static PBES2Parameters getInstance(Object obj) { if (obj instanceof PBES2Parameters) { return (PBES2Parameters) obj; } if (obj instanceof org.bouncycastle.asn1.pkcs.PBES2Parameters) { return new PBES2Parameters(((org.bouncycastle.asn1.pkcs.PBES2Parameters) obj).getKeyDerivationFunc(), ((org.bouncycastle.asn1.pkcs.PBES2Parameters) obj).getEncryptionScheme()); } if (obj != null) { return new PBES2Parameters(ASN1Sequence.getInstance(obj)); } return null; }
class class_name[name] begin[{] method[getInstance, return_type[type[PBES2Parameters]], modifier[public static], parameter[obj]] begin[{] if[binary_operation[member[.obj], instanceof, type[PBES2Parameters]]] begin[{] return[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=PBES2Parameters, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.obj], instanceof, type[org]]] begin[{] return[ClassCreator(arguments=[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=bouncycastle, sub_type=ReferenceType(arguments=None, dimensions=None, name=asn1, sub_type=ReferenceType(arguments=None, dimensions=None, name=pkcs, sub_type=ReferenceType(arguments=None, dimensions=None, name=PBES2Parameters, sub_type=None)))))), Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=bouncycastle, sub_type=ReferenceType(arguments=None, dimensions=None, name=asn1, sub_type=ReferenceType(arguments=None, dimensions=None, name=pkcs, sub_type=ReferenceType(arguments=None, dimensions=None, name=PBES2Parameters, sub_type=None))))))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PBES2Parameters, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.obj], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=ASN1Sequence, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PBES2Parameters, sub_type=None))] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PBES2Parameters] identifier[getInstance] operator[SEP] identifier[Object] identifier[obj] operator[SEP] { Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[PBES2Parameters] operator[SEP] { Keyword[return] operator[SEP] identifier[PBES2Parameters] operator[SEP] identifier[obj] operator[SEP] } Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[org] operator[SEP] identifier[bouncycastle] operator[SEP] identifier[asn1] operator[SEP] identifier[pkcs] operator[SEP] identifier[PBES2Parameters] operator[SEP] { Keyword[return] Keyword[new] identifier[PBES2Parameters] operator[SEP] operator[SEP] operator[SEP] identifier[org] operator[SEP] identifier[bouncycastle] operator[SEP] identifier[asn1] operator[SEP] identifier[pkcs] operator[SEP] identifier[PBES2Parameters] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[getKeyDerivationFunc] operator[SEP] operator[SEP] , operator[SEP] operator[SEP] identifier[org] operator[SEP] identifier[bouncycastle] operator[SEP] identifier[asn1] operator[SEP] identifier[pkcs] operator[SEP] identifier[PBES2Parameters] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[getEncryptionScheme] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[obj] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[PBES2Parameters] operator[SEP] identifier[ASN1Sequence] operator[SEP] identifier[getInstance] operator[SEP] identifier[obj] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public boolean containsLocalVariable(@Nullable final String name) { if (name == null) { return false; } final String normalized = assertNotNull(PreprocessorUtils.normalizeVariableName(name)); if (normalized.isEmpty()) { return false; } return localVarTable.containsKey(normalized); }
class class_name[name] begin[{] method[containsLocalVariable, return_type[type[boolean]], modifier[public], parameter[name]] begin[{] if[binary_operation[member[.name], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[String], normalized] if[call[normalized.isEmpty, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] return[call[localVarTable.containsKey, parameter[member[.normalized]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[containsLocalVariable] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[final] identifier[String] identifier[normalized] operator[=] identifier[assertNotNull] operator[SEP] identifier[PreprocessorUtils] operator[SEP] identifier[normalizeVariableName] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[normalized] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] identifier[localVarTable] operator[SEP] identifier[containsKey] operator[SEP] identifier[normalized] operator[SEP] operator[SEP] }
private ChangeEvent<BsonDocument> getSynthesizedRemoteChangeEventForDocument( final CoreRemoteMongoCollection<BsonDocument> remoteColl, final BsonValue documentId ) { return getSynthesizedRemoteChangeEventForDocument( remoteColl.getNamespace(), documentId, remoteColl.find(getDocumentIdFilter(documentId)).first()); }
class class_name[name] begin[{] method[getSynthesizedRemoteChangeEventForDocument, return_type[type[ChangeEvent]], modifier[private], parameter[remoteColl, documentId]] begin[{] return[call[.getSynthesizedRemoteChangeEventForDocument, parameter[call[remoteColl.getNamespace, parameter[]], member[.documentId], call[remoteColl.find, parameter[call[.getDocumentIdFilter, parameter[member[.documentId]]]]]]]] end[}] END[}]
Keyword[private] identifier[ChangeEvent] operator[<] identifier[BsonDocument] operator[>] identifier[getSynthesizedRemoteChangeEventForDocument] operator[SEP] Keyword[final] identifier[CoreRemoteMongoCollection] operator[<] identifier[BsonDocument] operator[>] identifier[remoteColl] , Keyword[final] identifier[BsonValue] identifier[documentId] operator[SEP] { Keyword[return] identifier[getSynthesizedRemoteChangeEventForDocument] operator[SEP] identifier[remoteColl] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] , identifier[documentId] , identifier[remoteColl] operator[SEP] identifier[find] operator[SEP] identifier[getDocumentIdFilter] operator[SEP] identifier[documentId] operator[SEP] operator[SEP] operator[SEP] identifier[first] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void clearReplicaSyncRequest(int partitionId, ServiceNamespace namespace, int replicaIndex) { ReplicaFragmentSyncInfo syncInfo = new ReplicaFragmentSyncInfo(partitionId, namespace, replicaIndex, null); if (!replicaSyncRequests.remove(syncInfo)) { return; } if (logger.isFinestEnabled()) { logger.finest("Clearing sync replica request for partitionId=" + partitionId + ", replicaIndex=" + replicaIndex + ", namespace=" + namespace); } releaseReplicaSyncPermits(1); replicaSyncTimeoutScheduler.cancelIfExists(syncInfo, null); }
class class_name[name] begin[{] method[clearReplicaSyncRequest, return_type[void], modifier[public], parameter[partitionId, namespace, replicaIndex]] begin[{] local_variable[type[ReplicaFragmentSyncInfo], syncInfo] if[call[replicaSyncRequests.remove, parameter[member[.syncInfo]]]] begin[{] return[None] else begin[{] None end[}] if[call[logger.isFinestEnabled, parameter[]]] begin[{] call[logger.finest, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["Clearing sync replica request for partitionId="], +, member[.partitionId]], +, literal[", replicaIndex="]], +, member[.replicaIndex]], +, literal[", namespace="]], +, member[.namespace]]]] else begin[{] None end[}] call[.releaseReplicaSyncPermits, parameter[literal[1]]] call[replicaSyncTimeoutScheduler.cancelIfExists, parameter[member[.syncInfo], literal[null]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[clearReplicaSyncRequest] operator[SEP] Keyword[int] identifier[partitionId] , identifier[ServiceNamespace] identifier[namespace] , Keyword[int] identifier[replicaIndex] operator[SEP] { identifier[ReplicaFragmentSyncInfo] identifier[syncInfo] operator[=] Keyword[new] identifier[ReplicaFragmentSyncInfo] operator[SEP] identifier[partitionId] , identifier[namespace] , identifier[replicaIndex] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[replicaSyncRequests] operator[SEP] identifier[remove] operator[SEP] identifier[syncInfo] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isFinestEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[partitionId] operator[+] literal[String] operator[+] identifier[replicaIndex] operator[+] literal[String] operator[+] identifier[namespace] operator[SEP] operator[SEP] } identifier[releaseReplicaSyncPermits] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[replicaSyncTimeoutScheduler] operator[SEP] identifier[cancelIfExists] operator[SEP] identifier[syncInfo] , Other[null] operator[SEP] operator[SEP] }
public DeviceData command_inout(TacoTangoDevice tacoDevice, String command, DeviceData argin) throws DevFailed { Except.throw_exception("Api_TacoFailed", "Taco protocol not supported", "TacoTangoDeviceDAODefaultImpl.command_inout()"); return null; }
class class_name[name] begin[{] method[command_inout, return_type[type[DeviceData]], modifier[public], parameter[tacoDevice, command, argin]] begin[{] call[Except.throw_exception, parameter[literal["Api_TacoFailed"], literal["Taco protocol not supported"], literal["TacoTangoDeviceDAODefaultImpl.command_inout()"]]] return[literal[null]] end[}] END[}]
Keyword[public] identifier[DeviceData] identifier[command_inout] operator[SEP] identifier[TacoTangoDevice] identifier[tacoDevice] , identifier[String] identifier[command] , identifier[DeviceData] identifier[argin] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
@Procedure(mode = Mode.WRITE) @Description("apoc.index.addNodeByName('name',node,['prop1',...]) add node to an index for the given name") public void addNodeByName(@Name("name") String name, @Name("node") Node node, @Name("properties") List<String> propKeys) { Index<Node> index = getNodeIndex(name, null); indexEntityProperties(node, propKeys, index); }
class class_name[name] begin[{] method[addNodeByName, return_type[void], modifier[public], parameter[name, node, propKeys]] begin[{] local_variable[type[Index], index] call[.indexEntityProperties, parameter[member[.node], member[.propKeys], member[.index]]] end[}] END[}]
annotation[@] identifier[Procedure] operator[SEP] identifier[mode] operator[=] identifier[Mode] operator[SEP] identifier[WRITE] operator[SEP] annotation[@] identifier[Description] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[addNodeByName] operator[SEP] annotation[@] identifier[Name] operator[SEP] literal[String] operator[SEP] identifier[String] identifier[name] , annotation[@] identifier[Name] operator[SEP] literal[String] operator[SEP] identifier[Node] identifier[node] , annotation[@] identifier[Name] operator[SEP] literal[String] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[propKeys] operator[SEP] { identifier[Index] operator[<] identifier[Node] operator[>] identifier[index] operator[=] identifier[getNodeIndex] operator[SEP] identifier[name] , Other[null] operator[SEP] operator[SEP] identifier[indexEntityProperties] operator[SEP] identifier[node] , identifier[propKeys] , identifier[index] operator[SEP] operator[SEP] }
protected Object getLdpComponent(final T config, final boolean initialize) { final TrellisHttpResource ldpResource = new TrellisHttpResource(getServiceBundler(), config.getBaseUrl()); if (initialize) { ldpResource.initialize(); } return ldpResource; }
class class_name[name] begin[{] method[getLdpComponent, return_type[type[Object]], modifier[protected], parameter[config, initialize]] begin[{] local_variable[type[TrellisHttpResource], ldpResource] if[member[.initialize]] begin[{] call[ldpResource.initialize, parameter[]] else begin[{] None end[}] return[member[.ldpResource]] end[}] END[}]
Keyword[protected] identifier[Object] identifier[getLdpComponent] operator[SEP] Keyword[final] identifier[T] identifier[config] , Keyword[final] Keyword[boolean] identifier[initialize] operator[SEP] { Keyword[final] identifier[TrellisHttpResource] identifier[ldpResource] operator[=] Keyword[new] identifier[TrellisHttpResource] operator[SEP] identifier[getServiceBundler] operator[SEP] operator[SEP] , identifier[config] operator[SEP] identifier[getBaseUrl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[initialize] operator[SEP] { identifier[ldpResource] operator[SEP] identifier[initialize] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[ldpResource] operator[SEP] }
protected int countAncestors(ElemTemplateElement elem) { int count = 0; while(null != elem) { count++; elem = elem.getParentElem(); } return count; }
class class_name[name] begin[{] method[countAncestors, return_type[type[int]], modifier[protected], parameter[elem]] begin[{] local_variable[type[int], count] while[binary_operation[literal[null], !=, member[.elem]]] begin[{] member[.count] assign[member[.elem], call[elem.getParentElem, parameter[]]] end[}] return[member[.count]] end[}] END[}]
Keyword[protected] Keyword[int] identifier[countAncestors] operator[SEP] identifier[ElemTemplateElement] identifier[elem] operator[SEP] { Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] Other[null] operator[!=] identifier[elem] operator[SEP] { identifier[count] operator[++] operator[SEP] identifier[elem] operator[=] identifier[elem] operator[SEP] identifier[getParentElem] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[count] operator[SEP] }
@Override public E apply(Iterator<E> consumable) { dbc.precondition(consumable != null, "consuming a null iterator"); dbc.precondition(consumable.hasNext(), "no element to consume"); E value = consumable.next(); while (consumable.hasNext()) { value = consumable.next(); } return value; }
class class_name[name] begin[{] method[apply, return_type[type[E]], modifier[public], parameter[consumable]] begin[{] call[dbc.precondition, parameter[binary_operation[member[.consumable], !=, literal[null]], literal["consuming a null iterator"]]] call[dbc.precondition, parameter[call[consumable.hasNext, parameter[]], literal["no element to consume"]]] local_variable[type[E], value] while[call[consumable.hasNext, parameter[]]] begin[{] assign[member[.value], call[consumable.next, parameter[]]] end[}] return[member[.value]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[E] identifier[apply] operator[SEP] identifier[Iterator] operator[<] identifier[E] operator[>] identifier[consumable] operator[SEP] { identifier[dbc] operator[SEP] identifier[precondition] operator[SEP] identifier[consumable] operator[!=] Other[null] , literal[String] operator[SEP] operator[SEP] identifier[dbc] operator[SEP] identifier[precondition] operator[SEP] identifier[consumable] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[E] identifier[value] operator[=] identifier[consumable] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[consumable] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[value] operator[=] identifier[consumable] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[value] operator[SEP] }
private String decodeStr(String str) { try { return MimeUtility.decodeText(str); } catch (UnsupportedEncodingException e) { return str; } }
class class_name[name] begin[{] method[decodeStr, return_type[type[String]], modifier[private], parameter[str]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decodeText, postfix_operators=[], prefix_operators=[], qualifier=MimeUtility, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnsupportedEncodingException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] identifier[String] identifier[decodeStr] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[try] { Keyword[return] identifier[MimeUtility] operator[SEP] identifier[decodeText] operator[SEP] identifier[str] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnsupportedEncodingException] identifier[e] operator[SEP] { Keyword[return] identifier[str] operator[SEP] } }
public boolean hasSolution(Pattern p, BioPAXElement ... ele) { Match m = new Match(p.size()); for (int i = 0; i < ele.length; i++) { m.set(ele[i], i); } return !search(m, p).isEmpty(); }
class class_name[name] begin[{] method[hasSolution, return_type[type[boolean]], modifier[public], parameter[p, ele]] begin[{] local_variable[type[Match], m] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=m, 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=ele, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[.search, parameter[member[.m], member[.p]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[hasSolution] operator[SEP] identifier[Pattern] identifier[p] , identifier[BioPAXElement] operator[...] identifier[ele] operator[SEP] { identifier[Match] identifier[m] operator[=] Keyword[new] identifier[Match] operator[SEP] identifier[p] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[ele] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[m] operator[SEP] identifier[set] operator[SEP] identifier[ele] operator[SEP] identifier[i] operator[SEP] , identifier[i] operator[SEP] operator[SEP] } Keyword[return] operator[!] identifier[search] operator[SEP] identifier[m] , identifier[p] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] }
public Optional<E> getNext() { return Optional.of(currentIndex).filter(getLess(linkedList.size() - 1)) .map(i -> linkedList.get(++currentIndex)); }
class class_name[name] begin[{] method[getNext, return_type[type[Optional]], modifier[public], parameter[]] begin[{] return[call[Optional.of, parameter[member[.currentIndex]]]] end[}] END[}]
Keyword[public] identifier[Optional] operator[<] identifier[E] operator[>] identifier[getNext] operator[SEP] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[currentIndex] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[getLess] operator[SEP] identifier[linkedList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[i] operator[->] identifier[linkedList] operator[SEP] identifier[get] operator[SEP] operator[++] identifier[currentIndex] operator[SEP] operator[SEP] operator[SEP] }
public void readDwgLineV15(int[] data, int offset) throws Exception { int bitPos = offset; bitPos = readObjectHeaderV15(data, bitPos); Vector v = DwgUtil.testBit(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); zflag = ((Boolean)v.get(1)).booleanValue(); v = DwgUtil.getRawDouble(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); double x1 = ((Double)v.get(1)).doubleValue(); v = DwgUtil.getDefaultDouble(data, bitPos, x1); bitPos = ((Integer)v.get(0)).intValue(); double x2 = ((Double)v.get(1)).doubleValue(); v = DwgUtil.getRawDouble(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); double y1 = ((Double)v.get(1)).doubleValue(); v = DwgUtil.getDefaultDouble(data, bitPos, y1); bitPos = ((Integer)v.get(0)).intValue(); double y2 = ((Double)v.get(1)).doubleValue(); double[] p1; double[] p2; if (!zflag) { v = DwgUtil.getRawDouble(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); double z1 = ((Double)v.get(1)).doubleValue(); v = DwgUtil.getDefaultDouble(data, bitPos, z1); bitPos = ((Integer)v.get(0)).intValue(); double z2 = ((Double)v.get(1)).doubleValue(); p1 = new double[]{x1, y1, z1}; p2 = new double[]{x2, y2, z2}; } else { p1 = new double[]{x1, y1}; p2 = new double[]{x2, y2}; } this.p1 = p1; this.p2 = p2; v = DwgUtil.testBit(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); boolean flag = ((Boolean)v.get(1)).booleanValue(); double val; if (flag) { val=0.0; } else { v = DwgUtil.getBitDouble(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); val = ((Double)v.get(1)).doubleValue(); } thickness = val; v = DwgUtil.testBit(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); flag = ((Boolean)v.get(1)).booleanValue(); double x, y, z; if (flag) { x = y = 0.0; z = 1.0; } else { v = DwgUtil.getBitDouble(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); x = ((Double)v.get(1)).doubleValue(); v = DwgUtil.getBitDouble(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); y = ((Double)v.get(1)).doubleValue(); v = DwgUtil.getBitDouble(data, bitPos); bitPos = ((Integer)v.get(0)).intValue(); z = ((Double)v.get(1)).doubleValue(); } double[] coord = new double[]{x, y, z}; extrusion = coord; bitPos = readObjectTailV15(data, bitPos); }
class class_name[name] begin[{] method[readDwgLineV15, return_type[void], modifier[public], parameter[data, offset]] begin[{] local_variable[type[int], bitPos] assign[member[.bitPos], call[.readObjectHeaderV15, parameter[member[.data], member[.bitPos]]]] local_variable[type[Vector], v] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] assign[member[.zflag], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))] assign[member[.v], call[DwgUtil.getRawDouble, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[double], x1] assign[member[.v], call[DwgUtil.getDefaultDouble, parameter[member[.data], member[.bitPos], member[.x1]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[double], x2] assign[member[.v], call[DwgUtil.getRawDouble, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[double], y1] assign[member[.v], call[DwgUtil.getDefaultDouble, parameter[member[.data], member[.bitPos], member[.y1]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[double], y2] local_variable[type[double], p1] local_variable[type[double], p2] if[member[.zflag]] begin[{] assign[member[.v], call[DwgUtil.getRawDouble, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[double], z1] assign[member[.v], call[DwgUtil.getDefaultDouble, parameter[member[.data], member[.bitPos], member[.z1]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[double], z2] assign[member[.p1], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=x1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=z1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double))] assign[member[.p2], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=x2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=z2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double))] else begin[{] assign[member[.p1], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=x1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double))] assign[member[.p2], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=x2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double))] end[}] assign[THIS[member[None.p1]], member[.p1]] assign[THIS[member[None.p2]], member[.p2]] assign[member[.v], call[DwgUtil.testBit, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] local_variable[type[boolean], flag] local_variable[type[double], val] if[member[.flag]] begin[{] assign[member[.val], literal[0.0]] else begin[{] assign[member[.v], call[DwgUtil.getBitDouble, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] assign[member[.val], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Double, sub_type=None))] end[}] assign[member[.thickness], member[.val]] assign[member[.v], call[DwgUtil.testBit, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] assign[member[.flag], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))] local_variable[type[double], x] if[member[.flag]] begin[{] assign[member[.x], assign[member[.y], literal[0.0]]] assign[member[.z], literal[1.0]] else begin[{] assign[member[.v], call[DwgUtil.getBitDouble, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] assign[member[.x], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Double, sub_type=None))] assign[member[.v], call[DwgUtil.getBitDouble, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] assign[member[.y], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Double, sub_type=None))] assign[member[.v], call[DwgUtil.getBitDouble, parameter[member[.data], member[.bitPos]]]] assign[member[.bitPos], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] assign[member[.z], Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=get, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Double, sub_type=None))] end[}] local_variable[type[double], coord] assign[member[.extrusion], member[.coord]] assign[member[.bitPos], call[.readObjectTailV15, parameter[member[.data], member[.bitPos]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[readDwgLineV15] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[offset] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[int] identifier[bitPos] operator[=] identifier[offset] operator[SEP] identifier[bitPos] operator[=] identifier[readObjectHeaderV15] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[Vector] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[testBit] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[zflag] operator[=] operator[SEP] operator[SEP] identifier[Boolean] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getRawDouble] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[x1] operator[=] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getDefaultDouble] operator[SEP] identifier[data] , identifier[bitPos] , identifier[x1] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[x2] operator[=] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getRawDouble] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[y1] operator[=] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getDefaultDouble] operator[SEP] identifier[data] , identifier[bitPos] , identifier[y1] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[y2] operator[=] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[p1] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[p2] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[zflag] operator[SEP] { identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getRawDouble] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[z1] operator[=] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getDefaultDouble] operator[SEP] identifier[data] , identifier[bitPos] , identifier[z1] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[z2] operator[=] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[p1] operator[=] Keyword[new] Keyword[double] operator[SEP] operator[SEP] { identifier[x1] , identifier[y1] , identifier[z1] } operator[SEP] identifier[p2] operator[=] Keyword[new] Keyword[double] operator[SEP] operator[SEP] { identifier[x2] , identifier[y2] , identifier[z2] } operator[SEP] } Keyword[else] { identifier[p1] operator[=] Keyword[new] Keyword[double] operator[SEP] operator[SEP] { identifier[x1] , identifier[y1] } operator[SEP] identifier[p2] operator[=] Keyword[new] Keyword[double] operator[SEP] operator[SEP] { identifier[x2] , identifier[y2] } operator[SEP] } Keyword[this] operator[SEP] identifier[p1] operator[=] identifier[p1] operator[SEP] Keyword[this] operator[SEP] identifier[p2] operator[=] identifier[p2] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[testBit] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[flag] operator[=] operator[SEP] operator[SEP] identifier[Boolean] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[val] operator[SEP] Keyword[if] operator[SEP] identifier[flag] operator[SEP] { identifier[val] operator[=] literal[Float] operator[SEP] } Keyword[else] { identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getBitDouble] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[val] operator[=] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] } identifier[thickness] operator[=] identifier[val] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[testBit] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[flag] operator[=] operator[SEP] operator[SEP] identifier[Boolean] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[x] , identifier[y] , identifier[z] operator[SEP] Keyword[if] operator[SEP] identifier[flag] operator[SEP] { identifier[x] operator[=] identifier[y] operator[=] literal[Float] operator[SEP] identifier[z] operator[=] literal[Float] operator[SEP] } Keyword[else] { identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getBitDouble] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[x] operator[=] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getBitDouble] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[y] operator[=] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[=] identifier[DwgUtil] operator[SEP] identifier[getBitDouble] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] identifier[bitPos] operator[=] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[z] operator[=] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[v] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[double] operator[SEP] operator[SEP] identifier[coord] operator[=] Keyword[new] Keyword[double] operator[SEP] operator[SEP] { identifier[x] , identifier[y] , identifier[z] } operator[SEP] identifier[extrusion] operator[=] identifier[coord] operator[SEP] identifier[bitPos] operator[=] identifier[readObjectTailV15] operator[SEP] identifier[data] , identifier[bitPos] operator[SEP] operator[SEP] }
private void setupTrigger() { String label = drpTriggerType.getSelected() + " Trigger"; WFieldLayout layout = new WFieldLayout(); layout.setLabelWidth(LABEL_WIDTH); buildControlPanel.add(layout); switch ((TriggerType) drpTriggerType.getSelected()) { case RadioButtonGroup: trigger = new RadioButtonGroup(); WFieldSet rbSet = new WFieldSet("Select an option"); RadioButtonGroup group = (RadioButtonGroup) trigger; WRadioButton rb1 = group.addRadioButton("A"); WRadioButton rb2 = group.addRadioButton("B"); WRadioButton rb3 = group.addRadioButton("C"); rbSet.add(group); rbSet.add(rb1); rbSet.add(new WLabel("A", rb1)); rbSet.add(new WText("\u00a0")); rbSet.add(rb2); rbSet.add(new WLabel("B", rb2)); rbSet.add(new WText("\u00a0")); rbSet.add(rb3); rbSet.add(new WLabel("C", rb3)); layout.addField(label, rbSet); return; case CheckBox: trigger = new WCheckBox(); break; case CheckBoxSelect: trigger = new WCheckBoxSelect(LOOKUP_TABLE_NAME); break; case DateField: trigger = new WDateField(); break; case Dropdown: trigger = new WDropdown(new TableWithNullOption(LOOKUP_TABLE_NAME)); break; case EmailField: trigger = new WEmailField(); break; case MultiSelect: trigger = new WMultiSelect(LOOKUP_TABLE_NAME); break; case MultiSelectPair: trigger = new WMultiSelectPair(LOOKUP_TABLE_NAME); break; case NumberField: trigger = new WNumberField(); break; case PartialDateField: trigger = new WPartialDateField(); break; case PasswordField: trigger = new WPasswordField(); break; case PhoneNumberField: trigger = new WPhoneNumberField(); break; case RadioButtonSelect: trigger = new WRadioButtonSelect(LOOKUP_TABLE_NAME); break; case SingleSelect: trigger = new WSingleSelect(LOOKUP_TABLE_NAME); break; case TextArea: trigger = new WTextArea(); ((WTextArea) trigger).setMaxLength(1000); break; case TextField: trigger = new WTextField(); break; default: throw new SystemException("Trigger type not valid"); } layout.addField(label, trigger); }
class class_name[name] begin[{] method[setupTrigger, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[String], label] local_variable[type[WFieldLayout], layout] call[layout.setLabelWidth, parameter[member[.LABEL_WIDTH]]] call[buildControlPanel.add, parameter[member[.layout]]] SwitchStatement(cases=[SwitchStatementCase(case=['RadioButtonGroup'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, 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=RadioButtonGroup, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Select an option")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WFieldSet, sub_type=None)), name=rbSet)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WFieldSet, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=trigger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RadioButtonGroup, sub_type=None)), name=group)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RadioButtonGroup, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="A")], member=addRadioButton, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[], type_arguments=None), name=rb1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WRadioButton, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="B")], member=addRadioButton, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[], type_arguments=None), name=rb2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WRadioButton, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="C")], member=addRadioButton, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[], type_arguments=None), name=rb3)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WRadioButton, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=rbSet, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rb1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=rbSet, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="A"), MemberReference(member=rb1, 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=WLabel, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rbSet, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WText, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rbSet, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rb2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=rbSet, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="B"), MemberReference(member=rb2, 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=WLabel, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rbSet, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WText, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rbSet, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rb3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=rbSet, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="C"), MemberReference(member=rb3, 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=WLabel, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rbSet, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=label, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rbSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addField, postfix_operators=[], prefix_operators=[], qualifier=layout, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=['CheckBox'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, 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=WCheckBox, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['CheckBoxSelect'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=LOOKUP_TABLE_NAME, 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=WCheckBoxSelect, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['DateField'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, 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=WDateField, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Dropdown'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=LOOKUP_TABLE_NAME, 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=TableWithNullOption, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WDropdown, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['EmailField'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, 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=WEmailField, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MultiSelect'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=LOOKUP_TABLE_NAME, 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=WMultiSelect, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MultiSelectPair'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=LOOKUP_TABLE_NAME, 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=WMultiSelectPair, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NumberField'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, 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=WNumberField, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['PartialDateField'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, 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=WPartialDateField, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['PasswordField'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, 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=WPasswordField, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['PhoneNumberField'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, 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=WPhoneNumberField, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['RadioButtonSelect'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=LOOKUP_TABLE_NAME, 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=WRadioButtonSelect, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SingleSelect'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=LOOKUP_TABLE_NAME, 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=WSingleSelect, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['TextArea'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, 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=WTextArea, sub_type=None))), label=None), StatementExpression(expression=Cast(expression=MemberReference(member=trigger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=WTextArea, sub_type=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['TextField'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trigger, 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=WTextField, sub_type=None))), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Trigger type not valid")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SystemException, sub_type=None)), label=None)])], expression=Cast(expression=MethodInvocation(arguments=[], member=getSelected, postfix_operators=[], prefix_operators=[], qualifier=drpTriggerType, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=TriggerType, sub_type=None)), label=None) call[layout.addField, parameter[member[.label], member[.trigger]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setupTrigger] operator[SEP] operator[SEP] { identifier[String] identifier[label] operator[=] identifier[drpTriggerType] operator[SEP] identifier[getSelected] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] identifier[WFieldLayout] identifier[layout] operator[=] Keyword[new] identifier[WFieldLayout] operator[SEP] operator[SEP] operator[SEP] identifier[layout] operator[SEP] identifier[setLabelWidth] operator[SEP] identifier[LABEL_WIDTH] operator[SEP] operator[SEP] identifier[buildControlPanel] operator[SEP] identifier[add] operator[SEP] identifier[layout] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] operator[SEP] identifier[TriggerType] operator[SEP] identifier[drpTriggerType] operator[SEP] identifier[getSelected] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[RadioButtonGroup] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[RadioButtonGroup] operator[SEP] operator[SEP] operator[SEP] identifier[WFieldSet] identifier[rbSet] operator[=] Keyword[new] identifier[WFieldSet] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[RadioButtonGroup] identifier[group] operator[=] operator[SEP] identifier[RadioButtonGroup] operator[SEP] identifier[trigger] operator[SEP] identifier[WRadioButton] identifier[rb1] operator[=] identifier[group] operator[SEP] identifier[addRadioButton] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[WRadioButton] identifier[rb2] operator[=] identifier[group] operator[SEP] identifier[addRadioButton] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[WRadioButton] identifier[rb3] operator[=] identifier[group] operator[SEP] identifier[addRadioButton] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[rbSet] operator[SEP] identifier[add] operator[SEP] identifier[group] operator[SEP] operator[SEP] identifier[rbSet] operator[SEP] identifier[add] operator[SEP] identifier[rb1] operator[SEP] operator[SEP] identifier[rbSet] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[WLabel] operator[SEP] literal[String] , identifier[rb1] operator[SEP] operator[SEP] operator[SEP] identifier[rbSet] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[WText] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[rbSet] operator[SEP] identifier[add] operator[SEP] identifier[rb2] operator[SEP] operator[SEP] identifier[rbSet] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[WLabel] operator[SEP] literal[String] , identifier[rb2] operator[SEP] operator[SEP] operator[SEP] identifier[rbSet] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[WText] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[rbSet] operator[SEP] identifier[add] operator[SEP] identifier[rb3] operator[SEP] operator[SEP] identifier[rbSet] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[WLabel] operator[SEP] literal[String] , identifier[rb3] operator[SEP] operator[SEP] operator[SEP] identifier[layout] operator[SEP] identifier[addField] operator[SEP] identifier[label] , identifier[rbSet] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[CheckBox] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WCheckBox] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[CheckBoxSelect] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WCheckBoxSelect] operator[SEP] identifier[LOOKUP_TABLE_NAME] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[DateField] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WDateField] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Dropdown] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WDropdown] operator[SEP] Keyword[new] identifier[TableWithNullOption] operator[SEP] identifier[LOOKUP_TABLE_NAME] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[EmailField] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WEmailField] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MultiSelect] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WMultiSelect] operator[SEP] identifier[LOOKUP_TABLE_NAME] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MultiSelectPair] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WMultiSelectPair] operator[SEP] identifier[LOOKUP_TABLE_NAME] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NumberField] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WNumberField] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[PartialDateField] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WPartialDateField] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[PasswordField] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WPasswordField] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[PhoneNumberField] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WPhoneNumberField] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[RadioButtonSelect] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WRadioButtonSelect] operator[SEP] identifier[LOOKUP_TABLE_NAME] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[SingleSelect] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WSingleSelect] operator[SEP] identifier[LOOKUP_TABLE_NAME] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[TextArea] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WTextArea] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[WTextArea] operator[SEP] identifier[trigger] operator[SEP] operator[SEP] identifier[setMaxLength] operator[SEP] Other[1000] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[TextField] operator[:] identifier[trigger] operator[=] Keyword[new] identifier[WTextField] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[SystemException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[layout] operator[SEP] identifier[addField] operator[SEP] identifier[label] , identifier[trigger] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") @Override public final <T> T get(final IKey<T> key) { T value = (T) config.get(key.key()); return value != null ? value : key.getDefaultValue(); }
class class_name[name] begin[{] method[get, return_type[type[T]], modifier[final public], parameter[key]] begin[{] local_variable[type[T], value] return[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=MethodInvocation(arguments=[], member=getDefaultValue, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), if_true=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[final] operator[<] identifier[T] operator[>] identifier[T] identifier[get] operator[SEP] Keyword[final] identifier[IKey] operator[<] identifier[T] operator[>] identifier[key] operator[SEP] { identifier[T] identifier[value] operator[=] operator[SEP] identifier[T] operator[SEP] identifier[config] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[!=] Other[null] operator[?] identifier[value] operator[:] identifier[key] operator[SEP] identifier[getDefaultValue] operator[SEP] operator[SEP] operator[SEP] }
@Override public void setDBRefs(List<DBRef> dbrefs) { if ( dbrefs == null) throw new IllegalArgumentException("trying to set dbrefs to null!"); for( DBRef ref : dbrefs){ ref.setParent(this); } this.dbrefs = dbrefs; }
class class_name[name] begin[{] method[setDBRefs, return_type[void], modifier[public], parameter[dbrefs]] begin[{] if[binary_operation[member[.dbrefs], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="trying to set dbrefs to null!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=setParent, postfix_operators=[], prefix_operators=[], qualifier=ref, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=dbrefs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ref)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DBRef, sub_type=None))), label=None) assign[THIS[member[None.dbrefs]], member[.dbrefs]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setDBRefs] operator[SEP] identifier[List] operator[<] identifier[DBRef] operator[>] identifier[dbrefs] operator[SEP] { Keyword[if] operator[SEP] identifier[dbrefs] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[DBRef] identifier[ref] operator[:] identifier[dbrefs] operator[SEP] { identifier[ref] operator[SEP] identifier[setParent] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[dbrefs] operator[=] identifier[dbrefs] operator[SEP] }
public void marshall(DescribeRestoreJobRequest describeRestoreJobRequest, ProtocolMarshaller protocolMarshaller) { if (describeRestoreJobRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeRestoreJobRequest.getRestoreJobId(), RESTOREJOBID_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[describeRestoreJobRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.describeRestoreJobRequest], ==, 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=getRestoreJobId, postfix_operators=[], prefix_operators=[], qualifier=describeRestoreJobRequest, selectors=[], type_arguments=None), MemberReference(member=RESTOREJOBID_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[DescribeRestoreJobRequest] identifier[describeRestoreJobRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describeRestoreJobRequest] 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[describeRestoreJobRequest] operator[SEP] identifier[getRestoreJobId] operator[SEP] operator[SEP] , identifier[RESTOREJOBID_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static IFunctionType getRepresentativeFunctionType( IType interfaceType ) { IMethodInfo javaMethodInfo = getSingleMethod( interfaceType ); if( javaMethodInfo != null ) { return GosuShop.createFunctionType( javaMethodInfo ); } else { return null; } }
class class_name[name] begin[{] method[getRepresentativeFunctionType, return_type[type[IFunctionType]], modifier[public static], parameter[interfaceType]] begin[{] local_variable[type[IMethodInfo], javaMethodInfo] if[binary_operation[member[.javaMethodInfo], !=, literal[null]]] begin[{] return[call[GosuShop.createFunctionType, parameter[member[.javaMethodInfo]]]] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[IFunctionType] identifier[getRepresentativeFunctionType] operator[SEP] identifier[IType] identifier[interfaceType] operator[SEP] { identifier[IMethodInfo] identifier[javaMethodInfo] operator[=] identifier[getSingleMethod] operator[SEP] identifier[interfaceType] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[javaMethodInfo] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[GosuShop] operator[SEP] identifier[createFunctionType] operator[SEP] identifier[javaMethodInfo] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
public static String padding(int width) { if (width < 0) throw new IllegalArgumentException("width must be > 0"); if (width < padding.length) return padding[width]; char[] out = new char[width]; for (int i = 0; i < width; i++) out[i] = ' '; return String.valueOf(out); }
class class_name[name] begin[{] method[padding, return_type[type[String]], modifier[public static], parameter[width]] begin[{] if[binary_operation[member[.width], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="width must be > 0")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.width], <, member[padding.length]]] begin[{] return[member[.padding]] else begin[{] None end[}] local_variable[type[char], out] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' ')), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[String.valueOf, parameter[member[.out]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[padding] operator[SEP] Keyword[int] identifier[width] operator[SEP] { Keyword[if] operator[SEP] identifier[width] operator[<] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[width] operator[<] identifier[padding] operator[SEP] identifier[length] operator[SEP] Keyword[return] identifier[padding] operator[SEP] identifier[width] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[out] operator[=] Keyword[new] Keyword[char] operator[SEP] identifier[width] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[width] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[out] operator[SEP] identifier[i] operator[SEP] operator[=] literal[String] operator[SEP] Keyword[return] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[out] operator[SEP] operator[SEP] }
static Map<String, List<Token>> compile(Map<String, String> attributes, EvaluatorCompiler compiler) throws ExpressionCompileException { Map<String, List<Token>> map = new LinkedHashMap<String, List<Token>>(); for (Map.Entry<String, String> attribute : attributes.entrySet()) { map.put(attribute.getKey(), compiler.tokenizeAndCompile(attribute.getValue())); } return map; }
class class_name[name] begin[{] method[compile, return_type[type[Map]], modifier[static], parameter[attributes, compiler]] begin[{] local_variable[type[Map], map] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None)], member=tokenizeAndCompile, postfix_operators=[], prefix_operators=[], qualifier=compiler, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=attributes, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=attribute)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) return[member[.map]] end[}] END[}]
Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[Token] operator[>] operator[>] identifier[compile] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[attributes] , identifier[EvaluatorCompiler] identifier[compiler] operator[SEP] Keyword[throws] identifier[ExpressionCompileException] { identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[Token] operator[>] operator[>] identifier[map] operator[=] Keyword[new] identifier[LinkedHashMap] operator[<] identifier[String] , identifier[List] operator[<] identifier[Token] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] identifier[attribute] operator[:] identifier[attributes] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[attribute] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[compiler] operator[SEP] identifier[tokenizeAndCompile] operator[SEP] identifier[attribute] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[map] operator[SEP] }
public Map<String, Object> getThreadCpuUsages(CpuUsageComparator cmp) { final CpuUsage overall = getOverallCpuUsage(); final List<CpuUsage> usages = getThreadCpuUsages(); final Map<String, Object> result = new HashMap<>(); Collections.sort(usages, cmp); final Date now = new Date(); result.put(CURRENT_TIME, now.getTime()); final long uptimeMillis = ManagementFactory.getRuntimeMXBean().getUptime(); final long uptimeNanos = TimeUnit.NANOSECONDS.convert(uptimeMillis, TimeUnit.MILLISECONDS); result.put(UPTIME_MS, uptimeMillis); final Map<String, Long> jvmUsageTime = new HashMap<>(); jvmUsageTime.put(ONE_MIN, overall.getOneMinute()); jvmUsageTime.put(FIVE_MIN, overall.getFiveMinute()); jvmUsageTime.put(FIFTEEN_MIN, overall.getFifteenMinute()); jvmUsageTime.put(OVERALL, overall.getOverall()); result.put(JVM_USAGE_TIME, jvmUsageTime); final Map<String, Double> jvmUsagePercent = new HashMap<>(); final int numProcs = Runtime.getRuntime().availableProcessors(); jvmUsagePercent.put(ONE_MIN, toPercent(overall.getOneMinute(), ONE_MINUTE_NANOS * numProcs)); jvmUsagePercent.put(FIVE_MIN, toPercent(overall.getFiveMinute(), FIVE_MINUTE_NANOS * numProcs)); jvmUsagePercent.put(FIFTEEN_MIN, toPercent(overall.getFifteenMinute(), FIFTEEN_MINUTE_NANOS * numProcs)); jvmUsagePercent.put(OVERALL, toPercent(overall.getOverall(), uptimeNanos * numProcs)); result.put(JVM_USAGE_PERCENT, jvmUsagePercent); List<Map<String, Object>> threads = new ArrayList<>(); for (CpuUsage usage : usages) { Map<String, Object> threadInfo = new HashMap<>(); threadInfo.put(ONE_MIN, toPercent(usage.getOneMinute(), overall.getOneMinute())); threadInfo.put(FIVE_MIN, toPercent(usage.getFiveMinute(), overall.getFiveMinute())); threadInfo.put(FIFTEEN_MIN, toPercent(usage.getFifteenMinute(), overall.getFifteenMinute())); threadInfo.put(OVERALL, toPercent(usage.getOverall(), overall.getOverall())); threadInfo.put(ID, usage.getThreadId()); threadInfo.put(NAME, usage.getName()); threads.add(threadInfo); } result.put(THREADS, threads); return result; }
class class_name[name] begin[{] method[getThreadCpuUsages, return_type[type[Map]], modifier[public], parameter[cmp]] begin[{] local_variable[type[CpuUsage], overall] local_variable[type[List], usages] local_variable[type[Map], result] call[Collections.sort, parameter[member[.usages], member[.cmp]]] local_variable[type[Date], now] call[result.put, parameter[member[.CURRENT_TIME], call[now.getTime, parameter[]]]] local_variable[type[long], uptimeMillis] local_variable[type[long], uptimeNanos] call[result.put, parameter[member[.UPTIME_MS], member[.uptimeMillis]]] local_variable[type[Map], jvmUsageTime] call[jvmUsageTime.put, parameter[member[.ONE_MIN], call[overall.getOneMinute, parameter[]]]] call[jvmUsageTime.put, parameter[member[.FIVE_MIN], call[overall.getFiveMinute, parameter[]]]] call[jvmUsageTime.put, parameter[member[.FIFTEEN_MIN], call[overall.getFifteenMinute, parameter[]]]] call[jvmUsageTime.put, parameter[member[.OVERALL], call[overall.getOverall, parameter[]]]] call[result.put, parameter[member[.JVM_USAGE_TIME], member[.jvmUsageTime]]] local_variable[type[Map], jvmUsagePercent] local_variable[type[int], numProcs] call[jvmUsagePercent.put, parameter[member[.ONE_MIN], call[.toPercent, parameter[call[overall.getOneMinute, parameter[]], binary_operation[member[.ONE_MINUTE_NANOS], *, member[.numProcs]]]]]] call[jvmUsagePercent.put, parameter[member[.FIVE_MIN], call[.toPercent, parameter[call[overall.getFiveMinute, parameter[]], binary_operation[member[.FIVE_MINUTE_NANOS], *, member[.numProcs]]]]]] call[jvmUsagePercent.put, parameter[member[.FIFTEEN_MIN], call[.toPercent, parameter[call[overall.getFifteenMinute, parameter[]], binary_operation[member[.FIFTEEN_MINUTE_NANOS], *, member[.numProcs]]]]]] call[jvmUsagePercent.put, parameter[member[.OVERALL], call[.toPercent, parameter[call[overall.getOverall, parameter[]], binary_operation[member[.uptimeNanos], *, member[.numProcs]]]]]] call[result.put, parameter[member[.JVM_USAGE_PERCENT], member[.jvmUsagePercent]]] local_variable[type[List], threads] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashMap, sub_type=None)), name=threadInfo)], modifiers=set(), 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=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ONE_MIN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOneMinute, postfix_operators=[], prefix_operators=[], qualifier=usage, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getOneMinute, postfix_operators=[], prefix_operators=[], qualifier=overall, selectors=[], type_arguments=None)], member=toPercent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=threadInfo, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FIVE_MIN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFiveMinute, postfix_operators=[], prefix_operators=[], qualifier=usage, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFiveMinute, postfix_operators=[], prefix_operators=[], qualifier=overall, selectors=[], type_arguments=None)], member=toPercent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=threadInfo, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FIFTEEN_MIN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFifteenMinute, postfix_operators=[], prefix_operators=[], qualifier=usage, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFifteenMinute, postfix_operators=[], prefix_operators=[], qualifier=overall, selectors=[], type_arguments=None)], member=toPercent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=threadInfo, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=OVERALL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOverall, postfix_operators=[], prefix_operators=[], qualifier=usage, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getOverall, postfix_operators=[], prefix_operators=[], qualifier=overall, selectors=[], type_arguments=None)], member=toPercent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=threadInfo, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getThreadId, postfix_operators=[], prefix_operators=[], qualifier=usage, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=threadInfo, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=usage, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=threadInfo, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=threadInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=threads, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=usages, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=usage)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CpuUsage, sub_type=None))), label=None) call[result.put, parameter[member[.THREADS], member[.threads]]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getThreadCpuUsages] operator[SEP] identifier[CpuUsageComparator] identifier[cmp] operator[SEP] { Keyword[final] identifier[CpuUsage] identifier[overall] operator[=] identifier[getOverallCpuUsage] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[CpuUsage] operator[>] identifier[usages] operator[=] identifier[getThreadCpuUsages] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[result] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[usages] , identifier[cmp] operator[SEP] operator[SEP] Keyword[final] identifier[Date] identifier[now] operator[=] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[put] operator[SEP] identifier[CURRENT_TIME] , identifier[now] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[uptimeMillis] operator[=] identifier[ManagementFactory] operator[SEP] identifier[getRuntimeMXBean] operator[SEP] operator[SEP] operator[SEP] identifier[getUptime] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[uptimeNanos] operator[=] identifier[TimeUnit] operator[SEP] identifier[NANOSECONDS] operator[SEP] identifier[convert] operator[SEP] identifier[uptimeMillis] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[put] operator[SEP] identifier[UPTIME_MS] , identifier[uptimeMillis] operator[SEP] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Long] operator[>] identifier[jvmUsageTime] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[jvmUsageTime] operator[SEP] identifier[put] operator[SEP] identifier[ONE_MIN] , identifier[overall] operator[SEP] identifier[getOneMinute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jvmUsageTime] operator[SEP] identifier[put] operator[SEP] identifier[FIVE_MIN] , identifier[overall] operator[SEP] identifier[getFiveMinute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jvmUsageTime] operator[SEP] identifier[put] operator[SEP] identifier[FIFTEEN_MIN] , identifier[overall] operator[SEP] identifier[getFifteenMinute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jvmUsageTime] operator[SEP] identifier[put] operator[SEP] identifier[OVERALL] , identifier[overall] operator[SEP] identifier[getOverall] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[put] operator[SEP] identifier[JVM_USAGE_TIME] , identifier[jvmUsageTime] operator[SEP] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Double] operator[>] identifier[jvmUsagePercent] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[numProcs] operator[=] identifier[Runtime] operator[SEP] identifier[getRuntime] operator[SEP] operator[SEP] operator[SEP] identifier[availableProcessors] operator[SEP] operator[SEP] operator[SEP] identifier[jvmUsagePercent] operator[SEP] identifier[put] operator[SEP] identifier[ONE_MIN] , identifier[toPercent] operator[SEP] identifier[overall] operator[SEP] identifier[getOneMinute] operator[SEP] operator[SEP] , identifier[ONE_MINUTE_NANOS] operator[*] identifier[numProcs] operator[SEP] operator[SEP] operator[SEP] identifier[jvmUsagePercent] operator[SEP] identifier[put] operator[SEP] identifier[FIVE_MIN] , identifier[toPercent] operator[SEP] identifier[overall] operator[SEP] identifier[getFiveMinute] operator[SEP] operator[SEP] , identifier[FIVE_MINUTE_NANOS] operator[*] identifier[numProcs] operator[SEP] operator[SEP] operator[SEP] identifier[jvmUsagePercent] operator[SEP] identifier[put] operator[SEP] identifier[FIFTEEN_MIN] , identifier[toPercent] operator[SEP] identifier[overall] operator[SEP] identifier[getFifteenMinute] operator[SEP] operator[SEP] , identifier[FIFTEEN_MINUTE_NANOS] operator[*] identifier[numProcs] operator[SEP] operator[SEP] operator[SEP] identifier[jvmUsagePercent] operator[SEP] identifier[put] operator[SEP] identifier[OVERALL] , identifier[toPercent] operator[SEP] identifier[overall] operator[SEP] identifier[getOverall] operator[SEP] operator[SEP] , identifier[uptimeNanos] operator[*] identifier[numProcs] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[put] operator[SEP] identifier[JVM_USAGE_PERCENT] , identifier[jvmUsagePercent] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] identifier[threads] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CpuUsage] identifier[usage] operator[:] identifier[usages] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[threadInfo] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[threadInfo] operator[SEP] identifier[put] operator[SEP] identifier[ONE_MIN] , identifier[toPercent] operator[SEP] identifier[usage] operator[SEP] identifier[getOneMinute] operator[SEP] operator[SEP] , identifier[overall] operator[SEP] identifier[getOneMinute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[threadInfo] operator[SEP] identifier[put] operator[SEP] identifier[FIVE_MIN] , identifier[toPercent] operator[SEP] identifier[usage] operator[SEP] identifier[getFiveMinute] operator[SEP] operator[SEP] , identifier[overall] operator[SEP] identifier[getFiveMinute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[threadInfo] operator[SEP] identifier[put] operator[SEP] identifier[FIFTEEN_MIN] , identifier[toPercent] operator[SEP] identifier[usage] operator[SEP] identifier[getFifteenMinute] operator[SEP] operator[SEP] , identifier[overall] operator[SEP] identifier[getFifteenMinute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[threadInfo] operator[SEP] identifier[put] operator[SEP] identifier[OVERALL] , identifier[toPercent] operator[SEP] identifier[usage] operator[SEP] identifier[getOverall] operator[SEP] operator[SEP] , identifier[overall] operator[SEP] identifier[getOverall] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[threadInfo] operator[SEP] identifier[put] operator[SEP] identifier[ID] , identifier[usage] operator[SEP] identifier[getThreadId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[threadInfo] operator[SEP] identifier[put] operator[SEP] identifier[NAME] , identifier[usage] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[threads] operator[SEP] identifier[add] operator[SEP] identifier[threadInfo] operator[SEP] operator[SEP] } identifier[result] operator[SEP] identifier[put] operator[SEP] identifier[THREADS] , identifier[threads] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public Map<String, Object> getViewMap(boolean create) { Map<String, Object> viewMap = (Map<String, Object>) getTransientStateHelper().getTransient("com.sun.faces.application.view.viewMap"); if (create && viewMap == null) { viewMap = new ViewMap(getFacesContext().getApplication().getProjectStage()); getTransientStateHelper().putTransient("com.sun.faces.application.view.viewMap", viewMap); getFacesContext().getApplication().publishEvent(getFacesContext(), PostConstructViewMapEvent.class, UIViewRoot.class, this); } return viewMap; }
class class_name[name] begin[{] method[getViewMap, return_type[type[Map]], modifier[public], parameter[create]] begin[{] local_variable[type[Map], viewMap] if[binary_operation[member[.create], &&, binary_operation[member[.viewMap], ==, literal[null]]]] begin[{] assign[member[.viewMap], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getFacesContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getApplication, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getProjectStage, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ViewMap, sub_type=None))] call[.getTransientStateHelper, parameter[]] call[.getFacesContext, parameter[]] else begin[{] None end[}] return[member[.viewMap]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getViewMap] operator[SEP] Keyword[boolean] identifier[create] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[viewMap] operator[=] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] identifier[getTransientStateHelper] operator[SEP] operator[SEP] operator[SEP] identifier[getTransient] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[create] operator[&&] identifier[viewMap] operator[==] Other[null] operator[SEP] { identifier[viewMap] operator[=] Keyword[new] identifier[ViewMap] operator[SEP] identifier[getFacesContext] operator[SEP] operator[SEP] operator[SEP] identifier[getApplication] operator[SEP] operator[SEP] operator[SEP] identifier[getProjectStage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getTransientStateHelper] operator[SEP] operator[SEP] operator[SEP] identifier[putTransient] operator[SEP] literal[String] , identifier[viewMap] operator[SEP] operator[SEP] identifier[getFacesContext] operator[SEP] operator[SEP] operator[SEP] identifier[getApplication] operator[SEP] operator[SEP] operator[SEP] identifier[publishEvent] operator[SEP] identifier[getFacesContext] operator[SEP] operator[SEP] , identifier[PostConstructViewMapEvent] operator[SEP] Keyword[class] , identifier[UIViewRoot] operator[SEP] Keyword[class] , Keyword[this] operator[SEP] operator[SEP] } Keyword[return] identifier[viewMap] operator[SEP] }
public ListHsmsResult withHsmList(String... hsmList) { if (this.hsmList == null) { setHsmList(new com.amazonaws.internal.SdkInternalList<String>(hsmList.length)); } for (String ele : hsmList) { this.hsmList.add(ele); } return this; }
class class_name[name] begin[{] method[withHsmList, return_type[type[ListHsmsResult]], modifier[public], parameter[hsmList]] begin[{] if[binary_operation[THIS[member[None.hsmList]], ==, literal[null]]] begin[{] call[.setHsmList, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=hsmList, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=hsmList, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=hsmList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[ListHsmsResult] identifier[withHsmList] operator[SEP] identifier[String] operator[...] identifier[hsmList] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[hsmList] operator[==] Other[null] operator[SEP] { identifier[setHsmList] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] identifier[hsmList] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[hsmList] operator[SEP] { Keyword[this] operator[SEP] identifier[hsmList] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
private boolean isRelated(final INode source, final INode target, final char relation) { return relation == defautlMappings.getRelation(source, target); }
class class_name[name] begin[{] method[isRelated, return_type[type[boolean]], modifier[private], parameter[source, target, relation]] begin[{] return[binary_operation[member[.relation], ==, call[defautlMappings.getRelation, parameter[member[.source], member[.target]]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isRelated] operator[SEP] Keyword[final] identifier[INode] identifier[source] , Keyword[final] identifier[INode] identifier[target] , Keyword[final] Keyword[char] identifier[relation] operator[SEP] { Keyword[return] identifier[relation] operator[==] identifier[defautlMappings] operator[SEP] identifier[getRelation] operator[SEP] identifier[source] , identifier[target] operator[SEP] operator[SEP] }
private void handleShowButtonBarIntent(@NonNull final Bundle extras) { if (extras.containsKey(EXTRA_SHOW_BUTTON_BAR)) { showButtonBar(extras.getBoolean(EXTRA_SHOW_BUTTON_BAR)); } }
class class_name[name] begin[{] method[handleShowButtonBarIntent, return_type[void], modifier[private], parameter[extras]] begin[{] if[call[extras.containsKey, parameter[member[.EXTRA_SHOW_BUTTON_BAR]]]] begin[{] call[.showButtonBar, parameter[call[extras.getBoolean, parameter[member[.EXTRA_SHOW_BUTTON_BAR]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[handleShowButtonBarIntent] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Bundle] identifier[extras] operator[SEP] { Keyword[if] operator[SEP] identifier[extras] operator[SEP] identifier[containsKey] operator[SEP] identifier[EXTRA_SHOW_BUTTON_BAR] operator[SEP] operator[SEP] { identifier[showButtonBar] operator[SEP] identifier[extras] operator[SEP] identifier[getBoolean] operator[SEP] identifier[EXTRA_SHOW_BUTTON_BAR] operator[SEP] operator[SEP] operator[SEP] } }
public final void entryRuleOpEquality() throws RecognitionException { try { // InternalXbase.g:284:1: ( ruleOpEquality EOF ) // InternalXbase.g:285:1: ruleOpEquality EOF { if ( state.backtracking==0 ) { before(grammarAccess.getOpEqualityRule()); } pushFollow(FOLLOW_1); ruleOpEquality(); state._fsp--; if (state.failed) return ; if ( state.backtracking==0 ) { after(grammarAccess.getOpEqualityRule()); } match(input,EOF,FOLLOW_2); if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
class class_name[name] begin[{] method[entryRuleOpEquality, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[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=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getOpEqualityRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=before, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=ruleOpEquality, 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=None, 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=[MethodInvocation(arguments=[], member=getOpEqualityRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=after, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, 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=None, label=None))])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[None] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[entryRuleOpEquality] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getOpEqualityRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_1] operator[SEP] operator[SEP] identifier[ruleOpEquality] 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] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[after] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getOpEqualityRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[match] operator[SEP] identifier[input] , identifier[EOF] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] operator[SEP] }
public static String getSourcePathForClass(Class clazz, String defaultValue) { try { String result = clazz.getProtectionDomain().getCodeSource().getLocation().getPath(); result = URLDecoder.decode(result, CharsetUtil.UTF8.name()); result = SystemUtil.fixWindowsPath(result); return result; } catch (Throwable t) { ExceptionUtil.rethrowIfNecessary(t); } return defaultValue; }
class class_name[name] begin[{] method[getSourcePathForClass, return_type[type[String]], modifier[public static], parameter[clazz, defaultValue]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getProtectionDomain, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[MethodInvocation(arguments=[], member=getCodeSource, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getLocation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=CharsetUtil.UTF8, selectors=[], type_arguments=None)], member=decode, postfix_operators=[], prefix_operators=[], qualifier=URLDecoder, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fixWindowsPath, postfix_operators=[], prefix_operators=[], qualifier=SystemUtil, 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=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rethrowIfNecessary, postfix_operators=[], prefix_operators=[], qualifier=ExceptionUtil, 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) return[member[.defaultValue]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getSourcePathForClass] operator[SEP] identifier[Class] identifier[clazz] , identifier[String] identifier[defaultValue] operator[SEP] { Keyword[try] { identifier[String] identifier[result] operator[=] identifier[clazz] operator[SEP] identifier[getProtectionDomain] operator[SEP] operator[SEP] operator[SEP] identifier[getCodeSource] operator[SEP] operator[SEP] operator[SEP] identifier[getLocation] operator[SEP] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[URLDecoder] operator[SEP] identifier[decode] operator[SEP] identifier[result] , identifier[CharsetUtil] operator[SEP] identifier[UTF8] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[SystemUtil] operator[SEP] identifier[fixWindowsPath] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[ExceptionUtil] operator[SEP] identifier[rethrowIfNecessary] operator[SEP] identifier[t] operator[SEP] operator[SEP] } Keyword[return] identifier[defaultValue] operator[SEP] }
public int getLogicalIndex(int visualIndex) { verifyValidParaOrLine(); verifyRange(visualIndex, 0, resultLength); /* we can do the trivial cases without the runs array */ if (insertPoints.size == 0 && controlCount == 0) { if (direction == LTR) { return visualIndex; } else if (direction == RTL) { return length - visualIndex - 1; } } BidiLine.getRuns(this); return BidiLine.getLogicalIndex(this, visualIndex); }
class class_name[name] begin[{] method[getLogicalIndex, return_type[type[int]], modifier[public], parameter[visualIndex]] begin[{] call[.verifyValidParaOrLine, parameter[]] call[.verifyRange, parameter[member[.visualIndex], literal[0], member[.resultLength]]] if[binary_operation[binary_operation[member[insertPoints.size], ==, literal[0]], &&, binary_operation[member[.controlCount], ==, literal[0]]]] begin[{] if[binary_operation[member[.direction], ==, member[.LTR]]] begin[{] return[member[.visualIndex]] else begin[{] if[binary_operation[member[.direction], ==, member[.RTL]]] begin[{] return[binary_operation[binary_operation[member[.length], -, member[.visualIndex]], -, literal[1]]] else begin[{] None end[}] end[}] else begin[{] None end[}] call[BidiLine.getRuns, parameter[THIS[]]] return[call[BidiLine.getLogicalIndex, parameter[THIS[], member[.visualIndex]]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getLogicalIndex] operator[SEP] Keyword[int] identifier[visualIndex] operator[SEP] { identifier[verifyValidParaOrLine] operator[SEP] operator[SEP] operator[SEP] identifier[verifyRange] operator[SEP] identifier[visualIndex] , Other[0] , identifier[resultLength] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[insertPoints] operator[SEP] identifier[size] operator[==] Other[0] operator[&&] identifier[controlCount] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[direction] operator[==] identifier[LTR] operator[SEP] { Keyword[return] identifier[visualIndex] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[direction] operator[==] identifier[RTL] operator[SEP] { Keyword[return] identifier[length] operator[-] identifier[visualIndex] operator[-] Other[1] operator[SEP] } } identifier[BidiLine] operator[SEP] identifier[getRuns] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[return] identifier[BidiLine] operator[SEP] identifier[getLogicalIndex] operator[SEP] Keyword[this] , identifier[visualIndex] operator[SEP] operator[SEP] }
private static void parseStyle(SvgElementBase obj, String style) { TextScanner scan = new TextScanner(style.replaceAll("/\\*.*?\\*/", "")); // regex strips block comments while (true) { String propertyName = scan.nextToken(':'); scan.skipWhitespace(); if (!scan.consume(':')) break; // Syntax error. Stop processing CSS rules. scan.skipWhitespace(); String propertyValue = scan.nextTokenWithWhitespace(';'); if (propertyValue == null) break; // Syntax error scan.skipWhitespace(); if (scan.empty() || scan.consume(';')) { if (obj.style == null) obj.style = new Style(); processStyleProperty(obj.style, propertyName, propertyValue); scan.skipWhitespace(); } } }
class class_name[name] begin[{] method[parseStyle, return_type[void], modifier[private static], parameter[obj, style]] begin[{] local_variable[type[TextScanner], scan] while[literal[true]] begin[{] local_variable[type[String], propertyName] call[scan.skipWhitespace, parameter[]] if[call[scan.consume, parameter[literal[':']]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] call[scan.skipWhitespace, parameter[]] local_variable[type[String], propertyValue] if[binary_operation[member[.propertyValue], ==, literal[null]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] call[scan.skipWhitespace, parameter[]] if[binary_operation[call[scan.empty, parameter[]], ||, call[scan.consume, parameter[literal[';']]]]] begin[{] if[binary_operation[member[obj.style], ==, literal[null]]] begin[{] assign[member[obj.style], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Style, sub_type=None))] else begin[{] None end[}] call[.processStyleProperty, parameter[member[obj.style], member[.propertyName], member[.propertyValue]]] call[scan.skipWhitespace, parameter[]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[parseStyle] operator[SEP] identifier[SvgElementBase] identifier[obj] , identifier[String] identifier[style] operator[SEP] { identifier[TextScanner] identifier[scan] operator[=] Keyword[new] identifier[TextScanner] operator[SEP] identifier[style] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { identifier[String] identifier[propertyName] operator[=] identifier[scan] operator[SEP] identifier[nextToken] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[scan] operator[SEP] identifier[skipWhitespace] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[scan] operator[SEP] identifier[consume] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] identifier[scan] operator[SEP] identifier[skipWhitespace] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[propertyValue] operator[=] identifier[scan] operator[SEP] identifier[nextTokenWithWhitespace] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[propertyValue] operator[==] Other[null] operator[SEP] Keyword[break] operator[SEP] identifier[scan] operator[SEP] identifier[skipWhitespace] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[scan] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[||] identifier[scan] operator[SEP] identifier[consume] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[obj] operator[SEP] identifier[style] operator[==] Other[null] operator[SEP] identifier[obj] operator[SEP] identifier[style] operator[=] Keyword[new] identifier[Style] operator[SEP] operator[SEP] operator[SEP] identifier[processStyleProperty] operator[SEP] identifier[obj] operator[SEP] identifier[style] , identifier[propertyName] , identifier[propertyValue] operator[SEP] operator[SEP] identifier[scan] operator[SEP] identifier[skipWhitespace] operator[SEP] operator[SEP] operator[SEP] } } }
@Override public void removeByUuid(String uuid) { for (CPDefinitionOptionRel cpDefinitionOptionRel : findByUuid(uuid, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpDefinitionOptionRel); } }
class class_name[name] begin[{] method[removeByUuid, return_type[void], modifier[public], parameter[uuid]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cpDefinitionOptionRel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=uuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), MemberReference(member=ALL_POS, postfix_operators=[], prefix_operators=[], qualifier=QueryUtil, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=findByUuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cpDefinitionOptionRel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CPDefinitionOptionRel, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[removeByUuid] operator[SEP] identifier[String] identifier[uuid] operator[SEP] { Keyword[for] operator[SEP] identifier[CPDefinitionOptionRel] identifier[cpDefinitionOptionRel] operator[:] identifier[findByUuid] operator[SEP] identifier[uuid] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , Other[null] operator[SEP] operator[SEP] { identifier[remove] operator[SEP] identifier[cpDefinitionOptionRel] operator[SEP] operator[SEP] } }
public static List<OutlierResult> getOutlierResults(Result r) { if(r instanceof OutlierResult) { List<OutlierResult> ors = new ArrayList<>(1); ors.add((OutlierResult) r); return ors; } if(r instanceof HierarchicalResult) { return ResultUtil.filterResults(((HierarchicalResult) r).getHierarchy(), r, OutlierResult.class); } return Collections.emptyList(); }
class class_name[name] begin[{] method[getOutlierResults, return_type[type[List]], modifier[public static], parameter[r]] begin[{] if[binary_operation[member[.r], instanceof, type[OutlierResult]]] begin[{] local_variable[type[List], ors] call[ors.add, parameter[Cast(expression=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=OutlierResult, sub_type=None))]] return[member[.ors]] else begin[{] None end[}] if[binary_operation[member[.r], instanceof, type[HierarchicalResult]]] begin[{] return[call[ResultUtil.filterResults, parameter[Cast(expression=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=HierarchicalResult, sub_type=None)), member[.r], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OutlierResult, sub_type=None))]]] else begin[{] None end[}] return[call[Collections.emptyList, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[OutlierResult] operator[>] identifier[getOutlierResults] operator[SEP] identifier[Result] identifier[r] operator[SEP] { Keyword[if] operator[SEP] identifier[r] Keyword[instanceof] identifier[OutlierResult] operator[SEP] { identifier[List] operator[<] identifier[OutlierResult] operator[>] identifier[ors] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[ors] operator[SEP] identifier[add] operator[SEP] operator[SEP] identifier[OutlierResult] operator[SEP] identifier[r] operator[SEP] operator[SEP] Keyword[return] identifier[ors] operator[SEP] } Keyword[if] operator[SEP] identifier[r] Keyword[instanceof] identifier[HierarchicalResult] operator[SEP] { Keyword[return] identifier[ResultUtil] operator[SEP] identifier[filterResults] operator[SEP] operator[SEP] operator[SEP] identifier[HierarchicalResult] operator[SEP] identifier[r] operator[SEP] operator[SEP] identifier[getHierarchy] operator[SEP] operator[SEP] , identifier[r] , identifier[OutlierResult] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] }
private static void addCommonTieMethods(ClassWriter cw, String tieClassName, String servantClassName, String servantDescriptor, boolean portableServer) { MethodVisitor mv; Label if_notnull_else, if_notnull_end; final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); // d576626 // ----------------------------------------------------------------------- // #if portableServer // public String[] _all_interfaces(POA poa, byte[] objectId) { // #else // public String[] _ids() // #endif // { // return (String)[]) _type_ids.clone(); // } // ----------------------------------------------------------------------- if (portableServer) { if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, INDENT + "adding method : _all_interfaces(Lorg/omg/PortableServer/POA;[B)[Ljava/lang/String;"); mv = cw.visitMethod(ACC_PUBLIC, "_all_interfaces", "(Lorg/omg/PortableServer/POA;[B)[Ljava/lang/String;", null, null); } else { if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, INDENT + "adding method : _ids ()[Ljava/lang/String;"); mv = cw.visitMethod(ACC_PUBLIC, "_ids", "()[Ljava/lang/String;", null, null); } mv.visitCode(); mv.visitFieldInsn(GETSTATIC, tieClassName, "_type_ids", "[Ljava/lang/String;"); mv.visitMethodInsn(INVOKEVIRTUAL, "java/lang/Object", "clone", "()Ljava/lang/Object;"); // RTC67550 mv.visitTypeInsn(CHECKCAST, "[Ljava/lang/String;"); // RTC67550 mv.visitInsn(ARETURN); mv.visitMaxs(1, 1); mv.visitEnd(); if (!portableServer) { // ----------------------------------------------------------------------- // public void _set_delegate(Delegate delegate) // { // super._set_delegate(delegate); // if(delegate != null) // orb = _orb(); // else // orb = null; // } // ----------------------------------------------------------------------- if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, INDENT + "adding method : _set_delegate (Lorg/omg/CORBA/portable/Delegate;)V"); mv = cw.visitMethod(ACC_PUBLIC, "_set_delegate", "(Lorg/omg/CORBA/portable/Delegate;)V", null, null); mv.visitCode(); mv.visitVarInsn(ALOAD, 0); mv.visitVarInsn(ALOAD, 1); mv.visitMethodInsn(INVOKESPECIAL, "org/omg/CORBA/portable/ObjectImpl", "_set_delegate", "(Lorg/omg/CORBA/portable/Delegate;)V"); mv.visitVarInsn(ALOAD, 1); if_notnull_else = new Label(); mv.visitJumpInsn(IFNULL, if_notnull_else); mv.visitVarInsn(ALOAD, 0); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKEVIRTUAL, "org/omg/CORBA/portable/ObjectImpl", "_orb", "()Lorg/omg/CORBA/ORB;"); mv.visitFieldInsn(PUTFIELD, tieClassName, "orb", "Lorg/omg/CORBA/ORB;"); if_notnull_end = new Label(); mv.visitJumpInsn(GOTO, if_notnull_end); mv.visitLabel(if_notnull_else); mv.visitVarInsn(ALOAD, 0); mv.visitInsn(ACONST_NULL); mv.visitFieldInsn(PUTFIELD, tieClassName, "orb", "Lorg/omg/CORBA/ORB;"); mv.visitLabel(if_notnull_end); mv.visitInsn(RETURN); mv.visitMaxs(2, 2); mv.visitEnd(); } // ----------------------------------------------------------------------- // public void deactivate() // { // #if portableServer // try { // _poa().deactivate_object(_poa().servant_to_id(this)); // } catch (WrongPolicy e) { // } catch (ObjectNotActive e) { // } catch (ServantNotActive e) { // } // #else // if(orb != null) // { // orb.disconnect(this); // _set_delegate(null); // } // #endif // } // ----------------------------------------------------------------------- if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, INDENT + "adding method : deactivate ()V"); mv = cw.visitMethod(ACC_PUBLIC, "deactivate", "()V", null, null); mv.visitCode(); if (portableServer) { Label try_begin = new Label(); mv.visitLabel(try_begin); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKEVIRTUAL, tieClassName, "_poa", "()Lorg/omg/PortableServer/POA;"); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKEVIRTUAL, tieClassName, "_poa", "()Lorg/omg/PortableServer/POA;"); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKEVIRTUAL, "org/omg/PortableServer/POA", "servant_to_id", "(Lorg/omg/PortableServer/Servant;)[B"); mv.visitMethodInsn(INVOKEVIRTUAL, "org/omg/PortableServer/POA", "deactivate_object", "([B)V"); mv.visitInsn(RETURN); Label try_end = new Label(); mv.visitLabel(try_end); Label catch_WrongPolicy_label = try_end; mv.visitInsn(POP); mv.visitInsn(RETURN); Label catch_ObjectNotActive_label = new Label(); mv.visitLabel(catch_ObjectNotActive_label); mv.visitInsn(POP); mv.visitInsn(RETURN); Label catch_ServantNotActive_label = new Label(); mv.visitLabel(catch_ServantNotActive_label); mv.visitInsn(POP); mv.visitInsn(RETURN); mv.visitTryCatchBlock(try_begin, try_end, catch_WrongPolicy_label, "org/omg/PortableServer/POAPackage/WrongPolicy"); mv.visitTryCatchBlock(try_begin, try_end, catch_ObjectNotActive_label, "org/omg/PortableServer/POAPackage/ObjectNotActive"); mv.visitTryCatchBlock(try_begin, try_end, catch_ServantNotActive_label, "org/omg/PortableServer/POAPackage/ServantNotActive"); } else { mv.visitVarInsn(ALOAD, 0); mv.visitFieldInsn(GETFIELD, tieClassName, "orb", "Lorg/omg/CORBA/ORB;"); if_notnull_end = new Label(); mv.visitJumpInsn(IFNULL, if_notnull_end); mv.visitVarInsn(ALOAD, 0); mv.visitFieldInsn(GETFIELD, tieClassName, "orb", "Lorg/omg/CORBA/ORB;"); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKEVIRTUAL, "org/omg/CORBA/ORB", "disconnect", "(Lorg/omg/CORBA/Object;)V"); mv.visitVarInsn(ALOAD, 0); mv.visitInsn(ACONST_NULL); mv.visitMethodInsn(INVOKEVIRTUAL, tieClassName, "_set_delegate", "(Lorg/omg/CORBA/portable/Delegate;)V"); mv.visitLabel(if_notnull_end); mv.visitInsn(RETURN); } mv.visitMaxs(2, 1); mv.visitEnd(); // ----------------------------------------------------------------------- // public Remote getTarget() // { // return target; // } // ----------------------------------------------------------------------- if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, INDENT + "adding method : getTarget ()Ljava/rmi/Remote;"); mv = cw.visitMethod(ACC_PUBLIC, "getTarget", "()Ljava/rmi/Remote;", null, null); mv.visitCode(); mv.visitVarInsn(ALOAD, 0); mv.visitFieldInsn(GETFIELD, tieClassName, "target", servantDescriptor); mv.visitInsn(ARETURN); mv.visitMaxs(1, 1); mv.visitEnd(); // ----------------------------------------------------------------------- // public ORB orb() // { // return _orb(); // } // ----------------------------------------------------------------------- if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, INDENT + "adding method : orb ()Lorg/omg/CORBA/ORB;"); mv = cw.visitMethod(ACC_PUBLIC, "orb", "()Lorg/omg/CORBA/ORB;", null, null); mv.visitCode(); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKEVIRTUAL, tieClassName, "_orb", "()Lorg/omg/CORBA/ORB;"); mv.visitInsn(ARETURN); mv.visitMaxs(1, 1); mv.visitEnd(); // ----------------------------------------------------------------------- // public void orb(ORB orb) // { // #if portableServer // try { // ((org.omg.CORBA_2_3.ORB)orb).set_delegate(this); // } catch (ClassCastException e) { // throw new BAD_PARAM("POA Servant needs an org.omg.CORBA_2_3.ORB"); // } // #else // orb.connect(this); // #endif // } // ----------------------------------------------------------------------- if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, INDENT + "adding method : orb (Lorg/omg/CORBA/ORB;)V"); mv = cw.visitMethod(ACC_PUBLIC, "orb", "(Lorg/omg/CORBA/ORB;)V", null, null); mv.visitCode(); if (portableServer) { Label try_begin = new Label(); mv.visitLabel(try_begin); mv.visitVarInsn(ALOAD, 1); mv.visitTypeInsn(CHECKCAST, "org/omg/CORBA_2_3/ORB"); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKEVIRTUAL, "org/omg/CORBA_2_3/ORB", "set_delegate", "(Ljava/lang/Object;)V"); mv.visitInsn(RETURN); Label try_end = new Label(); mv.visitLabel(try_end); Label catch_ClassCastException_label = try_end; mv.visitInsn(POP); mv.visitTypeInsn(NEW, "org/omg/CORBA/BAD_PARAM"); mv.visitInsn(DUP); mv.visitLdcInsn("POA Servant needs an org.omg.CORBA_2_3.ORB"); mv.visitMethodInsn(INVOKESPECIAL, "org/omg/CORBA/BAD_PARAM", "<init>", "(Ljava/lang/String;)V"); mv.visitInsn(ATHROW); mv.visitTryCatchBlock(try_begin, try_end, catch_ClassCastException_label, "java/lang/ClassCastException"); } else { mv.visitVarInsn(ALOAD, 1); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKEVIRTUAL, "org/omg/CORBA/ORB", "connect", "(Lorg/omg/CORBA/Object;)V"); mv.visitInsn(RETURN); } mv.visitMaxs(2, 2); mv.visitEnd(); // ----------------------------------------------------------------------- // public void setTarget(Remote remote) // { // target = (EJSRemoteBMPBMPRaHome_a30a6d0b)remote; // } // ----------------------------------------------------------------------- if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, INDENT + "adding method : setTarget (Ljava/rmi/Remote;)V"); mv = cw.visitMethod(ACC_PUBLIC, "setTarget", "(Ljava/rmi/Remote;)V", null, null); mv.visitCode(); mv.visitVarInsn(ALOAD, 0); mv.visitVarInsn(ALOAD, 1); mv.visitTypeInsn(CHECKCAST, servantClassName); mv.visitFieldInsn(PUTFIELD, tieClassName, "target", servantDescriptor); mv.visitInsn(RETURN); mv.visitMaxs(2, 2); mv.visitEnd(); // ----------------------------------------------------------------------- // public org.omg.CORBA.Object thisObject() // { // #if portableServer // return _this_object(); // #else // return this; // #endif // } // ----------------------------------------------------------------------- if (isTraceOn && tc.isDebugEnabled()) Tr.debug(tc, INDENT + "adding method : orb (Lorg/omg/CORBA/ORB;)V"); mv = cw.visitMethod(ACC_PUBLIC, "thisObject", "()Lorg/omg/CORBA/Object;", null, null); mv.visitCode(); mv.visitVarInsn(ALOAD, 0); if (portableServer) { mv.visitMethodInsn(INVOKEVIRTUAL, tieClassName, "_this_object", "()Lorg/omg/CORBA/Object;"); } mv.visitInsn(ARETURN); mv.visitMaxs(1, 1); mv.visitEnd(); }
class class_name[name] begin[{] method[addCommonTieMethods, return_type[void], modifier[private static], parameter[cw, tieClassName, servantClassName, servantDescriptor, portableServer]] begin[{] local_variable[type[MethodVisitor], mv] local_variable[type[Label], if_notnull_else] local_variable[type[boolean], isTraceOn] if[member[.portableServer]] begin[{] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[member[.INDENT], +, literal["adding method : _all_interfaces(Lorg/omg/PortableServer/POA;[B)[Ljava/lang/String;"]]]] else begin[{] None end[}] assign[member[.mv], call[cw.visitMethod, parameter[member[.ACC_PUBLIC], literal["_all_interfaces"], literal["(Lorg/omg/PortableServer/POA;[B)[Ljava/lang/String;"], literal[null], literal[null]]]] else begin[{] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[member[.INDENT], +, literal["adding method : _ids ()[Ljava/lang/String;"]]]] else begin[{] None end[}] assign[member[.mv], call[cw.visitMethod, parameter[member[.ACC_PUBLIC], literal["_ids"], literal["()[Ljava/lang/String;"], literal[null], literal[null]]]] end[}] call[mv.visitCode, parameter[]] call[mv.visitFieldInsn, parameter[member[.GETSTATIC], member[.tieClassName], literal["_type_ids"], literal["[Ljava/lang/String;"]]] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], literal["java/lang/Object"], literal["clone"], literal["()Ljava/lang/Object;"]]] call[mv.visitTypeInsn, parameter[member[.CHECKCAST], literal["[Ljava/lang/String;"]]] call[mv.visitInsn, parameter[member[.ARETURN]]] call[mv.visitMaxs, parameter[literal[1], literal[1]]] call[mv.visitEnd, parameter[]] if[member[.portableServer]] begin[{] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[member[.INDENT], +, literal["adding method : _set_delegate (Lorg/omg/CORBA/portable/Delegate;)V"]]]] else begin[{] None end[}] assign[member[.mv], call[cw.visitMethod, parameter[member[.ACC_PUBLIC], literal["_set_delegate"], literal["(Lorg/omg/CORBA/portable/Delegate;)V"], literal[null], literal[null]]]] call[mv.visitCode, parameter[]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[1]]] call[mv.visitMethodInsn, parameter[member[.INVOKESPECIAL], literal["org/omg/CORBA/portable/ObjectImpl"], literal["_set_delegate"], literal["(Lorg/omg/CORBA/portable/Delegate;)V"]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[1]]] assign[member[.if_notnull_else], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Label, sub_type=None))] call[mv.visitJumpInsn, parameter[member[.IFNULL], member[.if_notnull_else]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], literal["org/omg/CORBA/portable/ObjectImpl"], literal["_orb"], literal["()Lorg/omg/CORBA/ORB;"]]] call[mv.visitFieldInsn, parameter[member[.PUTFIELD], member[.tieClassName], literal["orb"], literal["Lorg/omg/CORBA/ORB;"]]] assign[member[.if_notnull_end], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Label, sub_type=None))] call[mv.visitJumpInsn, parameter[member[.GOTO], member[.if_notnull_end]]] call[mv.visitLabel, parameter[member[.if_notnull_else]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitInsn, parameter[member[.ACONST_NULL]]] call[mv.visitFieldInsn, parameter[member[.PUTFIELD], member[.tieClassName], literal["orb"], literal["Lorg/omg/CORBA/ORB;"]]] call[mv.visitLabel, parameter[member[.if_notnull_end]]] call[mv.visitInsn, parameter[member[.RETURN]]] call[mv.visitMaxs, parameter[literal[2], literal[2]]] call[mv.visitEnd, parameter[]] else begin[{] None end[}] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[member[.INDENT], +, literal["adding method : deactivate ()V"]]]] else begin[{] None end[}] assign[member[.mv], call[cw.visitMethod, parameter[member[.ACC_PUBLIC], literal["deactivate"], literal["()V"], literal[null], literal[null]]]] call[mv.visitCode, parameter[]] if[member[.portableServer]] begin[{] local_variable[type[Label], try_begin] call[mv.visitLabel, parameter[member[.try_begin]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], member[.tieClassName], literal["_poa"], literal["()Lorg/omg/PortableServer/POA;"]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], member[.tieClassName], literal["_poa"], literal["()Lorg/omg/PortableServer/POA;"]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], literal["org/omg/PortableServer/POA"], literal["servant_to_id"], literal["(Lorg/omg/PortableServer/Servant;)[B"]]] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], literal["org/omg/PortableServer/POA"], literal["deactivate_object"], literal["([B)V"]]] call[mv.visitInsn, parameter[member[.RETURN]]] local_variable[type[Label], try_end] call[mv.visitLabel, parameter[member[.try_end]]] local_variable[type[Label], catch_WrongPolicy_label] call[mv.visitInsn, parameter[member[.POP]]] call[mv.visitInsn, parameter[member[.RETURN]]] local_variable[type[Label], catch_ObjectNotActive_label] call[mv.visitLabel, parameter[member[.catch_ObjectNotActive_label]]] call[mv.visitInsn, parameter[member[.POP]]] call[mv.visitInsn, parameter[member[.RETURN]]] local_variable[type[Label], catch_ServantNotActive_label] call[mv.visitLabel, parameter[member[.catch_ServantNotActive_label]]] call[mv.visitInsn, parameter[member[.POP]]] call[mv.visitInsn, parameter[member[.RETURN]]] call[mv.visitTryCatchBlock, parameter[member[.try_begin], member[.try_end], member[.catch_WrongPolicy_label], literal["org/omg/PortableServer/POAPackage/WrongPolicy"]]] call[mv.visitTryCatchBlock, parameter[member[.try_begin], member[.try_end], member[.catch_ObjectNotActive_label], literal["org/omg/PortableServer/POAPackage/ObjectNotActive"]]] call[mv.visitTryCatchBlock, parameter[member[.try_begin], member[.try_end], member[.catch_ServantNotActive_label], literal["org/omg/PortableServer/POAPackage/ServantNotActive"]]] else begin[{] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitFieldInsn, parameter[member[.GETFIELD], member[.tieClassName], literal["orb"], literal["Lorg/omg/CORBA/ORB;"]]] assign[member[.if_notnull_end], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Label, sub_type=None))] call[mv.visitJumpInsn, parameter[member[.IFNULL], member[.if_notnull_end]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitFieldInsn, parameter[member[.GETFIELD], member[.tieClassName], literal["orb"], literal["Lorg/omg/CORBA/ORB;"]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], literal["org/omg/CORBA/ORB"], literal["disconnect"], literal["(Lorg/omg/CORBA/Object;)V"]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitInsn, parameter[member[.ACONST_NULL]]] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], member[.tieClassName], literal["_set_delegate"], literal["(Lorg/omg/CORBA/portable/Delegate;)V"]]] call[mv.visitLabel, parameter[member[.if_notnull_end]]] call[mv.visitInsn, parameter[member[.RETURN]]] end[}] call[mv.visitMaxs, parameter[literal[2], literal[1]]] call[mv.visitEnd, parameter[]] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[member[.INDENT], +, literal["adding method : getTarget ()Ljava/rmi/Remote;"]]]] else begin[{] None end[}] assign[member[.mv], call[cw.visitMethod, parameter[member[.ACC_PUBLIC], literal["getTarget"], literal["()Ljava/rmi/Remote;"], literal[null], literal[null]]]] call[mv.visitCode, parameter[]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitFieldInsn, parameter[member[.GETFIELD], member[.tieClassName], literal["target"], member[.servantDescriptor]]] call[mv.visitInsn, parameter[member[.ARETURN]]] call[mv.visitMaxs, parameter[literal[1], literal[1]]] call[mv.visitEnd, parameter[]] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[member[.INDENT], +, literal["adding method : orb ()Lorg/omg/CORBA/ORB;"]]]] else begin[{] None end[}] assign[member[.mv], call[cw.visitMethod, parameter[member[.ACC_PUBLIC], literal["orb"], literal["()Lorg/omg/CORBA/ORB;"], literal[null], literal[null]]]] call[mv.visitCode, parameter[]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], member[.tieClassName], literal["_orb"], literal["()Lorg/omg/CORBA/ORB;"]]] call[mv.visitInsn, parameter[member[.ARETURN]]] call[mv.visitMaxs, parameter[literal[1], literal[1]]] call[mv.visitEnd, parameter[]] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[member[.INDENT], +, literal["adding method : orb (Lorg/omg/CORBA/ORB;)V"]]]] else begin[{] None end[}] assign[member[.mv], call[cw.visitMethod, parameter[member[.ACC_PUBLIC], literal["orb"], literal["(Lorg/omg/CORBA/ORB;)V"], literal[null], literal[null]]]] call[mv.visitCode, parameter[]] if[member[.portableServer]] begin[{] local_variable[type[Label], try_begin] call[mv.visitLabel, parameter[member[.try_begin]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[1]]] call[mv.visitTypeInsn, parameter[member[.CHECKCAST], literal["org/omg/CORBA_2_3/ORB"]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], literal["org/omg/CORBA_2_3/ORB"], literal["set_delegate"], literal["(Ljava/lang/Object;)V"]]] call[mv.visitInsn, parameter[member[.RETURN]]] local_variable[type[Label], try_end] call[mv.visitLabel, parameter[member[.try_end]]] local_variable[type[Label], catch_ClassCastException_label] call[mv.visitInsn, parameter[member[.POP]]] call[mv.visitTypeInsn, parameter[member[.NEW], literal["org/omg/CORBA/BAD_PARAM"]]] call[mv.visitInsn, parameter[member[.DUP]]] call[mv.visitLdcInsn, parameter[literal["POA Servant needs an org.omg.CORBA_2_3.ORB"]]] call[mv.visitMethodInsn, parameter[member[.INVOKESPECIAL], literal["org/omg/CORBA/BAD_PARAM"], literal["<init>"], literal["(Ljava/lang/String;)V"]]] call[mv.visitInsn, parameter[member[.ATHROW]]] call[mv.visitTryCatchBlock, parameter[member[.try_begin], member[.try_end], member[.catch_ClassCastException_label], literal["java/lang/ClassCastException"]]] else begin[{] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[1]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], literal["org/omg/CORBA/ORB"], literal["connect"], literal["(Lorg/omg/CORBA/Object;)V"]]] call[mv.visitInsn, parameter[member[.RETURN]]] end[}] call[mv.visitMaxs, parameter[literal[2], literal[2]]] call[mv.visitEnd, parameter[]] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[member[.INDENT], +, literal["adding method : setTarget (Ljava/rmi/Remote;)V"]]]] else begin[{] None end[}] assign[member[.mv], call[cw.visitMethod, parameter[member[.ACC_PUBLIC], literal["setTarget"], literal["(Ljava/rmi/Remote;)V"], literal[null], literal[null]]]] call[mv.visitCode, parameter[]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[1]]] call[mv.visitTypeInsn, parameter[member[.CHECKCAST], member[.servantClassName]]] call[mv.visitFieldInsn, parameter[member[.PUTFIELD], member[.tieClassName], literal["target"], member[.servantDescriptor]]] call[mv.visitInsn, parameter[member[.RETURN]]] call[mv.visitMaxs, parameter[literal[2], literal[2]]] call[mv.visitEnd, parameter[]] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[member[.INDENT], +, literal["adding method : orb (Lorg/omg/CORBA/ORB;)V"]]]] else begin[{] None end[}] assign[member[.mv], call[cw.visitMethod, parameter[member[.ACC_PUBLIC], literal["thisObject"], literal["()Lorg/omg/CORBA/Object;"], literal[null], literal[null]]]] call[mv.visitCode, parameter[]] call[mv.visitVarInsn, parameter[member[.ALOAD], literal[0]]] if[member[.portableServer]] begin[{] call[mv.visitMethodInsn, parameter[member[.INVOKEVIRTUAL], member[.tieClassName], literal["_this_object"], literal["()Lorg/omg/CORBA/Object;"]]] else begin[{] None end[}] call[mv.visitInsn, parameter[member[.ARETURN]]] call[mv.visitMaxs, parameter[literal[1], literal[1]]] call[mv.visitEnd, parameter[]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[addCommonTieMethods] operator[SEP] identifier[ClassWriter] identifier[cw] , identifier[String] identifier[tieClassName] , identifier[String] identifier[servantClassName] , identifier[String] identifier[servantDescriptor] , Keyword[boolean] identifier[portableServer] operator[SEP] { identifier[MethodVisitor] identifier[mv] operator[SEP] identifier[Label] identifier[if_notnull_else] , identifier[if_notnull_end] operator[SEP] Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[portableServer] operator[SEP] { Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[INDENT] operator[+] literal[String] operator[SEP] operator[SEP] identifier[mv] operator[=] identifier[cw] operator[SEP] identifier[visitMethod] operator[SEP] identifier[ACC_PUBLIC] , literal[String] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[INDENT] operator[+] literal[String] operator[SEP] operator[SEP] identifier[mv] operator[=] identifier[cw] operator[SEP] identifier[visitMethod] operator[SEP] identifier[ACC_PUBLIC] , literal[String] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] } identifier[mv] operator[SEP] identifier[visitCode] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitFieldInsn] operator[SEP] identifier[GETSTATIC] , identifier[tieClassName] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitTypeInsn] operator[SEP] identifier[CHECKCAST] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[ARETURN] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMaxs] operator[SEP] Other[1] , Other[1] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitEnd] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[portableServer] operator[SEP] { Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[INDENT] operator[+] literal[String] operator[SEP] operator[SEP] identifier[mv] operator[=] identifier[cw] operator[SEP] identifier[visitMethod] operator[SEP] identifier[ACC_PUBLIC] , literal[String] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitCode] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[1] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKESPECIAL] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[1] operator[SEP] operator[SEP] identifier[if_notnull_else] operator[=] Keyword[new] identifier[Label] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitJumpInsn] operator[SEP] identifier[IFNULL] , identifier[if_notnull_else] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitFieldInsn] operator[SEP] identifier[PUTFIELD] , identifier[tieClassName] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[if_notnull_end] operator[=] Keyword[new] identifier[Label] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitJumpInsn] operator[SEP] identifier[GOTO] , identifier[if_notnull_end] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitLabel] operator[SEP] identifier[if_notnull_else] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[ACONST_NULL] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitFieldInsn] operator[SEP] identifier[PUTFIELD] , identifier[tieClassName] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitLabel] operator[SEP] identifier[if_notnull_end] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[RETURN] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMaxs] operator[SEP] Other[2] , Other[2] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitEnd] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[INDENT] operator[+] literal[String] operator[SEP] operator[SEP] identifier[mv] operator[=] identifier[cw] operator[SEP] identifier[visitMethod] operator[SEP] identifier[ACC_PUBLIC] , literal[String] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitCode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[portableServer] operator[SEP] { identifier[Label] identifier[try_begin] operator[=] Keyword[new] identifier[Label] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitLabel] operator[SEP] identifier[try_begin] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , identifier[tieClassName] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , identifier[tieClassName] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[RETURN] operator[SEP] operator[SEP] identifier[Label] identifier[try_end] operator[=] Keyword[new] identifier[Label] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitLabel] operator[SEP] identifier[try_end] operator[SEP] operator[SEP] identifier[Label] identifier[catch_WrongPolicy_label] operator[=] identifier[try_end] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[POP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[RETURN] operator[SEP] operator[SEP] identifier[Label] identifier[catch_ObjectNotActive_label] operator[=] Keyword[new] identifier[Label] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitLabel] operator[SEP] identifier[catch_ObjectNotActive_label] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[POP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[RETURN] operator[SEP] operator[SEP] identifier[Label] identifier[catch_ServantNotActive_label] operator[=] Keyword[new] identifier[Label] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitLabel] operator[SEP] identifier[catch_ServantNotActive_label] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[POP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[RETURN] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitTryCatchBlock] operator[SEP] identifier[try_begin] , identifier[try_end] , identifier[catch_WrongPolicy_label] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitTryCatchBlock] operator[SEP] identifier[try_begin] , identifier[try_end] , identifier[catch_ObjectNotActive_label] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitTryCatchBlock] operator[SEP] identifier[try_begin] , identifier[try_end] , identifier[catch_ServantNotActive_label] , literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitFieldInsn] operator[SEP] identifier[GETFIELD] , identifier[tieClassName] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[if_notnull_end] operator[=] Keyword[new] identifier[Label] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitJumpInsn] operator[SEP] identifier[IFNULL] , identifier[if_notnull_end] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitFieldInsn] operator[SEP] identifier[GETFIELD] , identifier[tieClassName] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[ACONST_NULL] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , identifier[tieClassName] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitLabel] operator[SEP] identifier[if_notnull_end] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[RETURN] operator[SEP] operator[SEP] } identifier[mv] operator[SEP] identifier[visitMaxs] operator[SEP] Other[2] , Other[1] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitEnd] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[INDENT] operator[+] literal[String] operator[SEP] operator[SEP] identifier[mv] operator[=] identifier[cw] operator[SEP] identifier[visitMethod] operator[SEP] identifier[ACC_PUBLIC] , literal[String] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitCode] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitFieldInsn] operator[SEP] identifier[GETFIELD] , identifier[tieClassName] , literal[String] , identifier[servantDescriptor] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[ARETURN] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMaxs] operator[SEP] Other[1] , Other[1] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitEnd] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[INDENT] operator[+] literal[String] operator[SEP] operator[SEP] identifier[mv] operator[=] identifier[cw] operator[SEP] identifier[visitMethod] operator[SEP] identifier[ACC_PUBLIC] , literal[String] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitCode] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , identifier[tieClassName] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[ARETURN] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMaxs] operator[SEP] Other[1] , Other[1] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitEnd] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[INDENT] operator[+] literal[String] operator[SEP] operator[SEP] identifier[mv] operator[=] identifier[cw] operator[SEP] identifier[visitMethod] operator[SEP] identifier[ACC_PUBLIC] , literal[String] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitCode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[portableServer] operator[SEP] { identifier[Label] identifier[try_begin] operator[=] Keyword[new] identifier[Label] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitLabel] operator[SEP] identifier[try_begin] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[1] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitTypeInsn] operator[SEP] identifier[CHECKCAST] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[RETURN] operator[SEP] operator[SEP] identifier[Label] identifier[try_end] operator[=] Keyword[new] identifier[Label] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitLabel] operator[SEP] identifier[try_end] operator[SEP] operator[SEP] identifier[Label] identifier[catch_ClassCastException_label] operator[=] identifier[try_end] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[POP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitTypeInsn] operator[SEP] identifier[NEW] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[DUP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitLdcInsn] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKESPECIAL] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[ATHROW] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitTryCatchBlock] operator[SEP] identifier[try_begin] , identifier[try_end] , identifier[catch_ClassCastException_label] , literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[1] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[RETURN] operator[SEP] operator[SEP] } identifier[mv] operator[SEP] identifier[visitMaxs] operator[SEP] Other[2] , Other[2] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitEnd] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[INDENT] operator[+] literal[String] operator[SEP] operator[SEP] identifier[mv] operator[=] identifier[cw] operator[SEP] identifier[visitMethod] operator[SEP] identifier[ACC_PUBLIC] , literal[String] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitCode] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[1] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitTypeInsn] operator[SEP] identifier[CHECKCAST] , identifier[servantClassName] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitFieldInsn] operator[SEP] identifier[PUTFIELD] , identifier[tieClassName] , literal[String] , identifier[servantDescriptor] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[RETURN] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMaxs] operator[SEP] Other[2] , Other[2] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitEnd] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[INDENT] operator[+] literal[String] operator[SEP] operator[SEP] identifier[mv] operator[=] identifier[cw] operator[SEP] identifier[visitMethod] operator[SEP] identifier[ACC_PUBLIC] , literal[String] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitCode] operator[SEP] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitVarInsn] operator[SEP] identifier[ALOAD] , Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[portableServer] operator[SEP] { identifier[mv] operator[SEP] identifier[visitMethodInsn] operator[SEP] identifier[INVOKEVIRTUAL] , identifier[tieClassName] , literal[String] , literal[String] operator[SEP] operator[SEP] } identifier[mv] operator[SEP] identifier[visitInsn] operator[SEP] identifier[ARETURN] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitMaxs] operator[SEP] Other[1] , Other[1] operator[SEP] operator[SEP] identifier[mv] operator[SEP] identifier[visitEnd] operator[SEP] operator[SEP] operator[SEP] }
void writeSnapshotData(DataOutputView out) throws IOException { writeTypeClass(out); writeKryoRegistrations(out, kryoRegistrations); writeDefaultKryoSerializers(out, defaultKryoSerializers); writeDefaultKryoSerializerClasses(out, defaultKryoSerializerClasses); }
class class_name[name] begin[{] method[writeSnapshotData, return_type[void], modifier[default], parameter[out]] begin[{] call[.writeTypeClass, parameter[member[.out]]] call[.writeKryoRegistrations, parameter[member[.out], member[.kryoRegistrations]]] call[.writeDefaultKryoSerializers, parameter[member[.out], member[.defaultKryoSerializers]]] call[.writeDefaultKryoSerializerClasses, parameter[member[.out], member[.defaultKryoSerializerClasses]]] end[}] END[}]
Keyword[void] identifier[writeSnapshotData] operator[SEP] identifier[DataOutputView] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[writeTypeClass] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[writeKryoRegistrations] operator[SEP] identifier[out] , identifier[kryoRegistrations] operator[SEP] operator[SEP] identifier[writeDefaultKryoSerializers] operator[SEP] identifier[out] , identifier[defaultKryoSerializers] operator[SEP] operator[SEP] identifier[writeDefaultKryoSerializerClasses] operator[SEP] identifier[out] , identifier[defaultKryoSerializerClasses] operator[SEP] operator[SEP] }
void set_write_value(Any any) throws DevFailed { switch (data_type) { case Tango_DEV_STATE : // Check data type inside the any DevState[] st = null; try { st = DevVarStateArrayHelper.extract(any); } catch (BAD_OPERATION ex) { Except.throw_exception("API_IncompatibleAttrDataType", "Incompatible attribute type, expected type is : Tango_DevBoolean", "WAttribute.set_write_value()"); } // No min max value check for boolean ! state_val = st[0]; break; case Tango_DEV_BOOLEAN : // Check data type inside the any boolean[] bl_ptr = null; try { bl_ptr = DevVarBooleanArrayHelper.extract(any); } catch (BAD_OPERATION ex) { Except.throw_exception("API_IncompatibleAttrDataType", "Incompatible attribute type, expected type is : Tango_DevBoolean", "WAttribute.set_write_value()"); } // No min max value check for boolean ! old_bool_val = bool_val; bool_val = bl_ptr[0]; break; case Tango_DEV_SHORT : // Check data type inside the any short[] sh_ptr = null; try { sh_ptr = DevVarShortArrayHelper.extract(any); } catch (BAD_OPERATION ex) { Except.throw_exception("API_IncompatibleAttrDataType", "Incompatible attribute type, expected type is : Tango_DevShort", "WAttribute.set_write_value()"); } // Check the incoming value if (check_min_value == true) { if (sh_ptr[0] <= min_value.sh) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is below the minimum authorized"); Except.throw_exception("API_WAttrOutsideLimit", o.toString(), "WAttribute.set_write_value()"); } } if (check_max_value == true) { if (sh_ptr[0] >= max_value.sh) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is above the maximum authorized"); Except.throw_exception("API_WAttrOutsideLimit", o.toString(), "WAttribute.set_write_value()"); } } old_short_val = short_val; short_val = sh_ptr[0]; break; case Tango_DEV_USHORT : // Check data type inside the any short[] ush_ptr = null; try { ush_ptr = DevVarUShortArrayHelper.extract(any); } catch (BAD_OPERATION ex) { Except.throw_exception("API_IncompatibleAttrDataType", "Incompatible attribute type, expected type is : Tango_DevUShort", "WAttribute.set_write_value()"); } // Check the incoming value int ush_val = (0xFFFF & ush_ptr[0]); if (check_min_value == true) { if (ush_val <= min_value.sh) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is below the minimum authorized"); Except.throw_exception("API_WAttrOutsideLimit", o.toString(), "WAttribute.set_write_value()"); } } if (check_max_value == true) { if (ush_val >= max_value.sh) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is above the maximum authorized"); Except.throw_exception("API_WAttrOutsideLimit", o.toString(), "WAttribute.set_write_value()"); } } old_long_val = long_val; long_val = ush_val; break; case Tango_DEV_LONG : // Check data type inside the any int[] lg_ptr = null; try { lg_ptr = DevVarLongArrayHelper.extract(any); } catch(BAD_OPERATION ex) { Except.throw_exception("API_IncompatibleAttrDataType", "Incompatible attribute type, expected type is : Tango_DevLong", "WAttribute.set_write_value()"); } // Check the incoming value if (check_min_value == true) { if (lg_ptr[0] <= min_value.lg) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is below the minimum authorized"); Except.throw_exception("API_WAttrOutsideLimit",o.toString(), "WAttribute.set_write_value()"); } } if (check_max_value == true) { if (lg_ptr[0] >= max_value.lg) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is above the maximum authorized"); Except.throw_exception("API_WAttrOutsideLimit",o.toString(), "WAttribute.set_write_value()"); } } old_long_val = long_val; long_val = lg_ptr[0]; break; case Tango_DEV_ULONG : // Check data type inside the any int[] ulg_ptr = null; try { ulg_ptr = DevVarULongArrayHelper.extract(any); } catch(BAD_OPERATION ex) { Except.throw_exception("API_IncompatibleAttrDataType", "Incompatible attribute type, expected type is : Tango_DevULong", "WAttribute.set_write_value()"); } // Check the incoming value long mask = (long) 0x7fffffff; mask += ((long)1 << 31); long ulg_val = (mask & (long)ulg_ptr[0]); if (check_min_value == true) { if (ulg_val <= min_value.lg) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is below the minimum authorized"); Except.throw_exception("API_WAttrOutsideLimit",o.toString(), "WAttribute.set_write_value()"); } } if (check_max_value == true) { if (ulg_val >= max_value.lg) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is above the maximum authorized"); Except.throw_exception("API_WAttrOutsideLimit",o.toString(), "WAttribute.set_write_value()"); } } old_long64_val = long64_val; long64_val = ulg_val; break; case Tango_DEV_LONG64 : // Check data type inside the any long[] lg64_ptr = null; try { lg64_ptr = DevVarLong64ArrayHelper.extract(any); } catch(BAD_OPERATION ex) { Except.throw_exception("API_IncompatibleAttrDataType", "Incompatible attribute type, expected type is : Tango_DevLong", "WAttribute.set_write_value()"); } // Check the incoming value if (check_min_value == true) { if (lg64_ptr[0] <= min_value.lg) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is below the minimum authorized"); Except.throw_exception("API_WAttrOutsideLimit",o.toString(), "WAttribute.set_write_value()"); } } if (check_max_value == true) { if (lg64_ptr[0] >= max_value.lg) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is above the maximum authorized"); Except.throw_exception("API_WAttrOutsideLimit",o.toString(), "WAttribute.set_write_value()"); } } old_long64_val = long64_val; long64_val = lg64_ptr[0]; break; case Tango_DEV_ULONG64 : // Check data type inside the any long[] ulg64_ptr = null; try { ulg64_ptr = DevVarLong64ArrayHelper.extract(any); } catch(BAD_OPERATION ex) { Except.throw_exception("API_IncompatibleAttrDataType", "Incompatible attribute type, expected type is : Tango_DevLong", "WAttribute.set_write_value()"); } // Check the incoming value if (check_min_value == true) { if (ulg64_ptr[0] <= min_value.lg) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is below the minimum authorized"); Except.throw_exception("API_WAttrOutsideLimit",o.toString(), "WAttribute.set_write_value()"); } } if (check_max_value == true) { if (ulg64_ptr[0] >= max_value.lg) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is above the maximum authorized"); Except.throw_exception("API_WAttrOutsideLimit",o.toString(), "WAttribute.set_write_value()"); } } old_long64_val = long64_val; long64_val = ulg64_ptr[0]; break; case Tango_DEV_DOUBLE : // Check data type inside the any double[] db_ptr = null; try { db_ptr = DevVarDoubleArrayHelper.extract(any); } catch(BAD_OPERATION ex) { Except.throw_exception("API_IncompatibleAttrDataType", "Incompatible attribute type, expected type is : Tango_DevDouble", "WAttribute.set_write_value()"); } // Check the incoming value if (check_min_value == true) { if (db_ptr[0] <= min_value.db) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is below the minimum authorized"); Except.throw_exception("API_WAttrOutsideLimit",o.toString(), "WAttribute.set_write_value()"); } } if (check_max_value == true) { if (db_ptr[0] >= max_value.db) { StringBuffer o = new StringBuffer("Set value for attribute "); o.append(name); o.append(" is above the maximum authorized"); Except.throw_exception("API_WAttrOutsideLimit",o.toString(), "WAttribute.set_write_value()"); } } old_double_val = double_val; double_val = db_ptr[0]; break; case Tango_DEV_STRING : String[] str_ptr = null; try { str_ptr = DevVarStringArrayHelper.extract(any); } catch(BAD_OPERATION ex) { Except.throw_exception("API_IncompatibleAttrDataType", "Incompatible attribute type, expected type is : Tango_DevString", "WAttribute.set_write_value()"); } old_str_val = str_val; str_val = str_ptr[0]; break; } }
class class_name[name] begin[{] method[set_write_value, return_type[void], modifier[default], parameter[any]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['Tango_DEV_STATE'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=st)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=DevState, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=any, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=[], prefix_operators=[], qualifier=DevVarStateArrayHelper, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_IncompatibleAttrDataType"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Incompatible attribute type, expected type is : Tango_DevBoolean"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=state_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_BOOLEAN'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=bl_ptr)], modifiers=set(), type=BasicType(dimensions=[None], name=boolean)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bl_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=any, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=[], prefix_operators=[], qualifier=DevVarBooleanArrayHelper, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_IncompatibleAttrDataType"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Incompatible attribute type, expected type is : Tango_DevBoolean"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=old_bool_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=bool_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bool_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=bl_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_SHORT'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=sh_ptr)], modifiers=set(), type=BasicType(dimensions=[None], name=short)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sh_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=any, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=[], prefix_operators=[], qualifier=DevVarShortArrayHelper, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_IncompatibleAttrDataType"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Incompatible attribute type, expected type is : Tango_DevShort"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_min_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sh_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=sh, postfix_operators=[], prefix_operators=[], qualifier=min_value, selectors=[]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is below the minimum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_max_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sh_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=sh, postfix_operators=[], prefix_operators=[], qualifier=max_value, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is above the maximum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=old_short_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=short_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=short_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=sh_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_USHORT'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=ush_ptr)], modifiers=set(), type=BasicType(dimensions=[None], name=short)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ush_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=any, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=[], prefix_operators=[], qualifier=DevVarUShortArrayHelper, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_IncompatibleAttrDataType"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Incompatible attribute type, expected type is : Tango_DevUShort"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFFFF), operandr=MemberReference(member=ush_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=&), name=ush_val)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_min_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ush_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=sh, postfix_operators=[], prefix_operators=[], qualifier=min_value, selectors=[]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is below the minimum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_max_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ush_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=sh, postfix_operators=[], prefix_operators=[], qualifier=max_value, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is above the maximum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=old_long_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=long_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=long_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ush_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_LONG'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=lg_ptr)], modifiers=set(), type=BasicType(dimensions=[None], name=int)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lg_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=any, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=[], prefix_operators=[], qualifier=DevVarLongArrayHelper, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_IncompatibleAttrDataType"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Incompatible attribute type, expected type is : Tango_DevLong"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_min_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lg_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=lg, postfix_operators=[], prefix_operators=[], qualifier=min_value, selectors=[]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is below the minimum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_max_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lg_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=lg, postfix_operators=[], prefix_operators=[], qualifier=max_value, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is above the maximum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=old_long_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=long_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=long_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=lg_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_ULONG'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=ulg_ptr)], modifiers=set(), type=BasicType(dimensions=[None], name=int)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ulg_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=any, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=[], prefix_operators=[], qualifier=DevVarULongArrayHelper, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_IncompatibleAttrDataType"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Incompatible attribute type, expected type is : Tango_DevULong"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x7fffffff), type=BasicType(dimensions=[], name=long)), name=mask)], modifiers=set(), type=BasicType(dimensions=[], name=long)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), type=BasicType(dimensions=[], name=long)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=31), operator=<<)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=mask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Cast(expression=MemberReference(member=ulg_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type=BasicType(dimensions=[], name=long)), operator=&), name=ulg_val)], modifiers=set(), type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_min_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ulg_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lg, postfix_operators=[], prefix_operators=[], qualifier=min_value, selectors=[]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is below the minimum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_max_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ulg_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lg, postfix_operators=[], prefix_operators=[], qualifier=max_value, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is above the maximum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=old_long64_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=long64_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=long64_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ulg_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_LONG64'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=lg64_ptr)], modifiers=set(), type=BasicType(dimensions=[None], name=long)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lg64_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=any, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=[], prefix_operators=[], qualifier=DevVarLong64ArrayHelper, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_IncompatibleAttrDataType"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Incompatible attribute type, expected type is : Tango_DevLong"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_min_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lg64_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=lg, postfix_operators=[], prefix_operators=[], qualifier=min_value, selectors=[]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is below the minimum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_max_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lg64_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=lg, postfix_operators=[], prefix_operators=[], qualifier=max_value, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is above the maximum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=old_long64_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=long64_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=long64_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=lg64_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_ULONG64'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=ulg64_ptr)], modifiers=set(), type=BasicType(dimensions=[None], name=long)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ulg64_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=any, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=[], prefix_operators=[], qualifier=DevVarLong64ArrayHelper, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_IncompatibleAttrDataType"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Incompatible attribute type, expected type is : Tango_DevLong"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_min_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ulg64_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=lg, postfix_operators=[], prefix_operators=[], qualifier=min_value, selectors=[]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is below the minimum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_max_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ulg64_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=lg, postfix_operators=[], prefix_operators=[], qualifier=max_value, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is above the maximum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=old_long64_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=long64_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=long64_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ulg64_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_DOUBLE'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=db_ptr)], modifiers=set(), type=BasicType(dimensions=[None], name=double)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=db_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=any, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=[], prefix_operators=[], qualifier=DevVarDoubleArrayHelper, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_IncompatibleAttrDataType"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Incompatible attribute type, expected type is : Tango_DevDouble"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_min_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=db_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=db, postfix_operators=[], prefix_operators=[], qualifier=min_value, selectors=[]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is below the minimum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=check_max_value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=db_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=db, postfix_operators=[], prefix_operators=[], qualifier=max_value, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Set value for attribute ")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is above the maximum authorized")], member=append, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_WAttrOutsideLimit"), MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=old_double_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=double_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=double_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=db_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['Tango_DEV_STRING'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=str_ptr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=str_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=any, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=[], prefix_operators=[], qualifier=DevVarStringArrayHelper, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="API_IncompatibleAttrDataType"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Incompatible attribute type, expected type is : Tango_DevString"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WAttribute.set_write_value()")], member=throw_exception, postfix_operators=[], prefix_operators=[], qualifier=Except, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=old_str_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=str_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=str_val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=str_ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=data_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[void] identifier[set_write_value] operator[SEP] identifier[Any] identifier[any] operator[SEP] Keyword[throws] identifier[DevFailed] { Keyword[switch] operator[SEP] identifier[data_type] operator[SEP] { Keyword[case] identifier[Tango_DEV_STATE] operator[:] identifier[DevState] operator[SEP] operator[SEP] identifier[st] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[st] operator[=] identifier[DevVarStateArrayHelper] operator[SEP] identifier[extract] operator[SEP] identifier[any] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] } identifier[state_val] operator[=] identifier[st] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_BOOLEAN] operator[:] Keyword[boolean] operator[SEP] operator[SEP] identifier[bl_ptr] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[bl_ptr] operator[=] identifier[DevVarBooleanArrayHelper] operator[SEP] identifier[extract] operator[SEP] identifier[any] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] } identifier[old_bool_val] operator[=] identifier[bool_val] operator[SEP] identifier[bool_val] operator[=] identifier[bl_ptr] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_SHORT] operator[:] Keyword[short] operator[SEP] operator[SEP] identifier[sh_ptr] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[sh_ptr] operator[=] identifier[DevVarShortArrayHelper] operator[SEP] identifier[extract] operator[SEP] identifier[any] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[check_min_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[sh_ptr] operator[SEP] Other[0] operator[SEP] operator[<=] identifier[min_value] operator[SEP] identifier[sh] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[check_max_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[sh_ptr] operator[SEP] Other[0] operator[SEP] operator[>=] identifier[max_value] operator[SEP] identifier[sh] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } identifier[old_short_val] operator[=] identifier[short_val] operator[SEP] identifier[short_val] operator[=] identifier[sh_ptr] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_USHORT] operator[:] Keyword[short] operator[SEP] operator[SEP] identifier[ush_ptr] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[ush_ptr] operator[=] identifier[DevVarUShortArrayHelper] operator[SEP] identifier[extract] operator[SEP] identifier[any] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[ush_val] operator[=] operator[SEP] literal[Integer] operator[&] identifier[ush_ptr] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[check_min_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[ush_val] operator[<=] identifier[min_value] operator[SEP] identifier[sh] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[check_max_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[ush_val] operator[>=] identifier[max_value] operator[SEP] identifier[sh] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } identifier[old_long_val] operator[=] identifier[long_val] operator[SEP] identifier[long_val] operator[=] identifier[ush_val] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_LONG] operator[:] Keyword[int] operator[SEP] operator[SEP] identifier[lg_ptr] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[lg_ptr] operator[=] identifier[DevVarLongArrayHelper] operator[SEP] identifier[extract] operator[SEP] identifier[any] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[check_min_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[lg_ptr] operator[SEP] Other[0] operator[SEP] operator[<=] identifier[min_value] operator[SEP] identifier[lg] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[check_max_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[lg_ptr] operator[SEP] Other[0] operator[SEP] operator[>=] identifier[max_value] operator[SEP] identifier[lg] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } identifier[old_long_val] operator[=] identifier[long_val] operator[SEP] identifier[long_val] operator[=] identifier[lg_ptr] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_ULONG] operator[:] Keyword[int] operator[SEP] operator[SEP] identifier[ulg_ptr] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[ulg_ptr] operator[=] identifier[DevVarULongArrayHelper] operator[SEP] identifier[extract] operator[SEP] identifier[any] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[long] identifier[mask] operator[=] operator[SEP] Keyword[long] operator[SEP] literal[Integer] operator[SEP] identifier[mask] operator[+=] operator[SEP] operator[SEP] Keyword[long] operator[SEP] Other[1] operator[<<] Other[31] operator[SEP] operator[SEP] Keyword[long] identifier[ulg_val] operator[=] operator[SEP] identifier[mask] operator[&] operator[SEP] Keyword[long] operator[SEP] identifier[ulg_ptr] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[check_min_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[ulg_val] operator[<=] identifier[min_value] operator[SEP] identifier[lg] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[check_max_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[ulg_val] operator[>=] identifier[max_value] operator[SEP] identifier[lg] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } identifier[old_long64_val] operator[=] identifier[long64_val] operator[SEP] identifier[long64_val] operator[=] identifier[ulg_val] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_LONG64] operator[:] Keyword[long] operator[SEP] operator[SEP] identifier[lg64_ptr] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[lg64_ptr] operator[=] identifier[DevVarLong64ArrayHelper] operator[SEP] identifier[extract] operator[SEP] identifier[any] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[check_min_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[lg64_ptr] operator[SEP] Other[0] operator[SEP] operator[<=] identifier[min_value] operator[SEP] identifier[lg] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[check_max_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[lg64_ptr] operator[SEP] Other[0] operator[SEP] operator[>=] identifier[max_value] operator[SEP] identifier[lg] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } identifier[old_long64_val] operator[=] identifier[long64_val] operator[SEP] identifier[long64_val] operator[=] identifier[lg64_ptr] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_ULONG64] operator[:] Keyword[long] operator[SEP] operator[SEP] identifier[ulg64_ptr] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[ulg64_ptr] operator[=] identifier[DevVarLong64ArrayHelper] operator[SEP] identifier[extract] operator[SEP] identifier[any] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[check_min_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[ulg64_ptr] operator[SEP] Other[0] operator[SEP] operator[<=] identifier[min_value] operator[SEP] identifier[lg] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[check_max_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[ulg64_ptr] operator[SEP] Other[0] operator[SEP] operator[>=] identifier[max_value] operator[SEP] identifier[lg] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } identifier[old_long64_val] operator[=] identifier[long64_val] operator[SEP] identifier[long64_val] operator[=] identifier[ulg64_ptr] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_DOUBLE] operator[:] Keyword[double] operator[SEP] operator[SEP] identifier[db_ptr] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[db_ptr] operator[=] identifier[DevVarDoubleArrayHelper] operator[SEP] identifier[extract] operator[SEP] identifier[any] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[check_min_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[db_ptr] operator[SEP] Other[0] operator[SEP] operator[<=] identifier[min_value] operator[SEP] identifier[db] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[check_max_value] operator[==] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[db_ptr] operator[SEP] Other[0] operator[SEP] operator[>=] identifier[max_value] operator[SEP] identifier[db] operator[SEP] { identifier[StringBuffer] identifier[o] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } identifier[old_double_val] operator[=] identifier[double_val] operator[SEP] identifier[double_val] operator[=] identifier[db_ptr] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Tango_DEV_STRING] operator[:] identifier[String] operator[SEP] operator[SEP] identifier[str_ptr] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[str_ptr] operator[=] identifier[DevVarStringArrayHelper] operator[SEP] identifier[extract] operator[SEP] identifier[any] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[Except] operator[SEP] identifier[throw_exception] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] } identifier[old_str_val] operator[=] identifier[str_val] operator[SEP] identifier[str_val] operator[=] identifier[str_ptr] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } }
private void visit_OP_SYMLINK() throws IOException { visitTxId(); if (!LayoutVersion.supports(Feature.EDITLOG_OP_OPTIMIZATION, editsVersion)) { v.visitInt(EditsElement.LENGTH); } v.visitStringUTF8( EditsElement.SOURCE); v.visitStringUTF8( EditsElement.DESTINATION); if (LayoutVersion.supports(Feature.EDITLOG_OP_OPTIMIZATION, editsVersion)) { v.visitLong(EditsElement.MTIME); v.visitLong(EditsElement.ATIME); } else { v.visitStringUTF8(EditsElement.MTIME); v.visitStringUTF8(EditsElement.ATIME); } // PERMISSION_STATUS v.visitEnclosingElement(EditsElement.PERMISSION_STATUS); v.visitStringText( EditsElement.USERNAME); v.visitStringText( EditsElement.GROUPNAME); v.visitShort( EditsElement.FS_PERMISSIONS); v.leaveEnclosingElement(); }
class class_name[name] begin[{] method[visit_OP_SYMLINK, return_type[void], modifier[private], parameter[]] begin[{] call[.visitTxId, parameter[]] if[call[LayoutVersion.supports, parameter[member[Feature.EDITLOG_OP_OPTIMIZATION], member[.editsVersion]]]] begin[{] call[v.visitInt, parameter[member[EditsElement.LENGTH]]] else begin[{] None end[}] call[v.visitStringUTF8, parameter[member[EditsElement.SOURCE]]] call[v.visitStringUTF8, parameter[member[EditsElement.DESTINATION]]] if[call[LayoutVersion.supports, parameter[member[Feature.EDITLOG_OP_OPTIMIZATION], member[.editsVersion]]]] begin[{] call[v.visitLong, parameter[member[EditsElement.MTIME]]] call[v.visitLong, parameter[member[EditsElement.ATIME]]] else begin[{] call[v.visitStringUTF8, parameter[member[EditsElement.MTIME]]] call[v.visitStringUTF8, parameter[member[EditsElement.ATIME]]] end[}] call[v.visitEnclosingElement, parameter[member[EditsElement.PERMISSION_STATUS]]] call[v.visitStringText, parameter[member[EditsElement.USERNAME]]] call[v.visitStringText, parameter[member[EditsElement.GROUPNAME]]] call[v.visitShort, parameter[member[EditsElement.FS_PERMISSIONS]]] call[v.leaveEnclosingElement, parameter[]] end[}] END[}]
Keyword[private] Keyword[void] identifier[visit_OP_SYMLINK] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[visitTxId] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[LayoutVersion] operator[SEP] identifier[supports] operator[SEP] identifier[Feature] operator[SEP] identifier[EDITLOG_OP_OPTIMIZATION] , identifier[editsVersion] operator[SEP] operator[SEP] { identifier[v] operator[SEP] identifier[visitInt] operator[SEP] identifier[EditsElement] operator[SEP] identifier[LENGTH] operator[SEP] operator[SEP] } identifier[v] operator[SEP] identifier[visitStringUTF8] operator[SEP] identifier[EditsElement] operator[SEP] identifier[SOURCE] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[visitStringUTF8] operator[SEP] identifier[EditsElement] operator[SEP] identifier[DESTINATION] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[LayoutVersion] operator[SEP] identifier[supports] operator[SEP] identifier[Feature] operator[SEP] identifier[EDITLOG_OP_OPTIMIZATION] , identifier[editsVersion] operator[SEP] operator[SEP] { identifier[v] operator[SEP] identifier[visitLong] operator[SEP] identifier[EditsElement] operator[SEP] identifier[MTIME] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[visitLong] operator[SEP] identifier[EditsElement] operator[SEP] identifier[ATIME] operator[SEP] operator[SEP] } Keyword[else] { identifier[v] operator[SEP] identifier[visitStringUTF8] operator[SEP] identifier[EditsElement] operator[SEP] identifier[MTIME] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[visitStringUTF8] operator[SEP] identifier[EditsElement] operator[SEP] identifier[ATIME] operator[SEP] operator[SEP] } identifier[v] operator[SEP] identifier[visitEnclosingElement] operator[SEP] identifier[EditsElement] operator[SEP] identifier[PERMISSION_STATUS] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[visitStringText] operator[SEP] identifier[EditsElement] operator[SEP] identifier[USERNAME] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[visitStringText] operator[SEP] identifier[EditsElement] operator[SEP] identifier[GROUPNAME] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[visitShort] operator[SEP] identifier[EditsElement] operator[SEP] identifier[FS_PERMISSIONS] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[leaveEnclosingElement] operator[SEP] operator[SEP] operator[SEP] }
public java.util.List<IamInstanceProfileAssociation> getIamInstanceProfileAssociations() { if (iamInstanceProfileAssociations == null) { iamInstanceProfileAssociations = new com.amazonaws.internal.SdkInternalList<IamInstanceProfileAssociation>(); } return iamInstanceProfileAssociations; }
class class_name[name] begin[{] method[getIamInstanceProfileAssociations, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.iamInstanceProfileAssociations], ==, literal[null]]] begin[{] assign[member[.iamInstanceProfileAssociations], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IamInstanceProfileAssociation, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.iamInstanceProfileAssociations]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[IamInstanceProfileAssociation] operator[>] identifier[getIamInstanceProfileAssociations] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[iamInstanceProfileAssociations] operator[==] Other[null] operator[SEP] { identifier[iamInstanceProfileAssociations] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[IamInstanceProfileAssociation] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[iamInstanceProfileAssociations] operator[SEP] }
public boolean isAllocated(int index, JobID jobId, AllocationID allocationId) { TaskSlot taskSlot = taskSlots.get(index); return taskSlot.isAllocated(jobId, allocationId); }
class class_name[name] begin[{] method[isAllocated, return_type[type[boolean]], modifier[public], parameter[index, jobId, allocationId]] begin[{] local_variable[type[TaskSlot], taskSlot] return[call[taskSlot.isAllocated, parameter[member[.jobId], member[.allocationId]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isAllocated] operator[SEP] Keyword[int] identifier[index] , identifier[JobID] identifier[jobId] , identifier[AllocationID] identifier[allocationId] operator[SEP] { identifier[TaskSlot] identifier[taskSlot] operator[=] identifier[taskSlots] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[return] identifier[taskSlot] operator[SEP] identifier[isAllocated] operator[SEP] identifier[jobId] , identifier[allocationId] operator[SEP] operator[SEP] }
@Override protected Scalar transform(ActivityContext context, Scalar scalar) throws ActivityException { if(!(scalar.get() instanceof LdapQuery)) { throw new ActivityException("Input to LdapAdapter must be an LDAP query"); } LdapQuery query = (LdapQuery)scalar.get(); logger.trace("running LDAP query: '{}'", query.toString()); return null; }
class class_name[name] begin[{] method[transform, return_type[type[Scalar]], modifier[protected], parameter[context, scalar]] begin[{] if[binary_operation[call[scalar.get, parameter[]], instanceof, type[LdapQuery]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Input to LdapAdapter must be an LDAP query")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ActivityException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[LdapQuery], query] call[logger.trace, parameter[literal["running LDAP query: '{}'"], call[query.toString, parameter[]]]] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[Scalar] identifier[transform] operator[SEP] identifier[ActivityContext] identifier[context] , identifier[Scalar] identifier[scalar] operator[SEP] Keyword[throws] identifier[ActivityException] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[scalar] operator[SEP] identifier[get] operator[SEP] operator[SEP] Keyword[instanceof] identifier[LdapQuery] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ActivityException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[LdapQuery] identifier[query] operator[=] operator[SEP] identifier[LdapQuery] operator[SEP] identifier[scalar] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[query] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
@SuppressWarnings("unchecked") public CassandraJavaPairRDD<K, V> where(String cqlWhereClause, Object... args) { CassandraRDD<Tuple2<K, V>> newRDD = rdd().where(cqlWhereClause, toScalaSeq(args)); return wrap(newRDD); }
class class_name[name] begin[{] method[where, return_type[type[CassandraJavaPairRDD]], modifier[public], parameter[cqlWhereClause, args]] begin[{] local_variable[type[CassandraRDD], newRDD] return[call[.wrap, parameter[member[.newRDD]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[CassandraJavaPairRDD] operator[<] identifier[K] , identifier[V] operator[>] identifier[where] operator[SEP] identifier[String] identifier[cqlWhereClause] , identifier[Object] operator[...] identifier[args] operator[SEP] { identifier[CassandraRDD] operator[<] identifier[Tuple2] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[newRDD] operator[=] identifier[rdd] operator[SEP] operator[SEP] operator[SEP] identifier[where] operator[SEP] identifier[cqlWhereClause] , identifier[toScalaSeq] operator[SEP] identifier[args] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[wrap] operator[SEP] identifier[newRDD] operator[SEP] operator[SEP] }
private void setClusterSize(String clusterName, int newSize) throws InterruptedException { Preconditions.checkArgument(newSize > 0, "Cluster size must be > 0"); logger.info("Updating cluster %s to size %d", clusterName, newSize); Operation operation = client.updateCluster(Cluster.newBuilder() .setName(clusterName) .setServeNodes(newSize) .build()); waitForOperation(operation.getName(), 60); logger.info("Done updating cluster %s.", clusterName); }
class class_name[name] begin[{] method[setClusterSize, return_type[void], modifier[private], parameter[clusterName, newSize]] begin[{] call[Preconditions.checkArgument, parameter[binary_operation[member[.newSize], >, literal[0]], literal["Cluster size must be > 0"]]] call[logger.info, parameter[literal["Updating cluster %s to size %d"], member[.clusterName], member[.newSize]]] local_variable[type[Operation], operation] call[.waitForOperation, parameter[call[operation.getName, parameter[]], literal[60]]] call[logger.info, parameter[literal["Done updating cluster %s."], member[.clusterName]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setClusterSize] operator[SEP] identifier[String] identifier[clusterName] , Keyword[int] identifier[newSize] operator[SEP] Keyword[throws] identifier[InterruptedException] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[newSize] operator[>] Other[0] , literal[String] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[clusterName] , identifier[newSize] operator[SEP] operator[SEP] identifier[Operation] identifier[operation] operator[=] identifier[client] operator[SEP] identifier[updateCluster] operator[SEP] identifier[Cluster] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setName] operator[SEP] identifier[clusterName] operator[SEP] operator[SEP] identifier[setServeNodes] operator[SEP] identifier[newSize] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[waitForOperation] operator[SEP] identifier[operation] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , Other[60] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[clusterName] operator[SEP] operator[SEP] }
public void onFeatureSelected(FeatureSelectedEvent event) { Feature feature = event.getFeature(); // Only select if it is actually deselected: boolean selected = false; ListGridRecord[] selections = getSelection(); for (ListGridRecord selection : selections) { if (selection.getAttribute(FIELD_NAME_FEATURE_ID).equals(feature.getId())) { selected = true; break; } } // If deselected, find the correct row and select: if (!selected) { ListGridRecord[] records = this.getRecords(); for (int i = 0; i < records.length; i++) { if (records[i].getAttribute(FIELD_NAME_FEATURE_ID).equals(feature.getId())) { selectRecord(i); break; } } } }
class class_name[name] begin[{] method[onFeatureSelected, return_type[void], modifier[public], parameter[event]] begin[{] local_variable[type[Feature], feature] local_variable[type[boolean], selected] local_variable[type[ListGridRecord], selections] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=FIELD_NAME_FEATURE_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=selection, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=feature, 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=Assignment(expressionl=MemberReference(member=selected, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=selections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=selection)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ListGridRecord, sub_type=None))), label=None) if[member[.selected]] begin[{] local_variable[type[ListGridRecord], records] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=records, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=FIELD_NAME_FEATURE_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=feature, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=selectRecord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=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=records, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[onFeatureSelected] operator[SEP] identifier[FeatureSelectedEvent] identifier[event] operator[SEP] { identifier[Feature] identifier[feature] operator[=] identifier[event] operator[SEP] identifier[getFeature] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[selected] operator[=] literal[boolean] operator[SEP] identifier[ListGridRecord] operator[SEP] operator[SEP] identifier[selections] operator[=] identifier[getSelection] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ListGridRecord] identifier[selection] operator[:] identifier[selections] operator[SEP] { Keyword[if] operator[SEP] identifier[selection] operator[SEP] identifier[getAttribute] operator[SEP] identifier[FIELD_NAME_FEATURE_ID] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[feature] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[selected] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[selected] operator[SEP] { identifier[ListGridRecord] operator[SEP] operator[SEP] identifier[records] operator[=] Keyword[this] operator[SEP] identifier[getRecords] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[records] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[records] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getAttribute] operator[SEP] identifier[FIELD_NAME_FEATURE_ID] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[feature] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[selectRecord] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } }
@Override public final MoveItems process( final Map<String, Object> pAddParam, final MoveItems pEntity, final IRequestData pRequestData) throws Exception { MoveItems entity = this.prcAccEntityRetrieve .process(pAddParam, pEntity, pRequestData); String actionAdd = pRequestData.getParameter("actionAdd"); if ("full".equals(actionAdd)) { pRequestData.setAttribute("warehouseEntries", srvWarehouseEntry .retrieveEntriesForOwner(pAddParam, entity.constTypeCode(), entity.getItsId())); pRequestData .setAttribute("classWarehouseEntry", WarehouseEntry.class); } return entity; }
class class_name[name] begin[{] method[process, return_type[type[MoveItems]], modifier[final public], parameter[pAddParam, pEntity, pRequestData]] begin[{] local_variable[type[MoveItems], entity] local_variable[type[String], actionAdd] if[literal["full"]] begin[{] call[pRequestData.setAttribute, parameter[literal["warehouseEntries"], call[srvWarehouseEntry.retrieveEntriesForOwner, parameter[member[.pAddParam], call[entity.constTypeCode, parameter[]], call[entity.getItsId, parameter[]]]]]] call[pRequestData.setAttribute, parameter[literal["classWarehouseEntry"], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WarehouseEntry, sub_type=None))]] else begin[{] None end[}] return[member[.entity]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[MoveItems] identifier[process] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[MoveItems] identifier[pEntity] , Keyword[final] identifier[IRequestData] identifier[pRequestData] operator[SEP] Keyword[throws] identifier[Exception] { identifier[MoveItems] identifier[entity] operator[=] Keyword[this] operator[SEP] identifier[prcAccEntityRetrieve] operator[SEP] identifier[process] operator[SEP] identifier[pAddParam] , identifier[pEntity] , identifier[pRequestData] operator[SEP] operator[SEP] identifier[String] identifier[actionAdd] operator[=] identifier[pRequestData] operator[SEP] identifier[getParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[actionAdd] operator[SEP] operator[SEP] { identifier[pRequestData] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[srvWarehouseEntry] operator[SEP] identifier[retrieveEntriesForOwner] operator[SEP] identifier[pAddParam] , identifier[entity] operator[SEP] identifier[constTypeCode] operator[SEP] operator[SEP] , identifier[entity] operator[SEP] identifier[getItsId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pRequestData] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[WarehouseEntry] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[return] identifier[entity] operator[SEP] }
public <C extends Comparable<? super C>> int[] sort( final Seq<? extends C> array, final int[] indexes ) { return sort(array, indexes, Comparator.naturalOrder()); }
class class_name[name] begin[{] method[sort, return_type[type[int]], modifier[public], parameter[array, indexes]] begin[{] return[call[.sort, parameter[member[.array], member[.indexes], call[Comparator.naturalOrder, parameter[]]]]] end[}] END[}]
Keyword[public] operator[<] identifier[C] Keyword[extends] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[C] operator[>] operator[>] Keyword[int] operator[SEP] operator[SEP] identifier[sort] operator[SEP] Keyword[final] identifier[Seq] operator[<] operator[?] Keyword[extends] identifier[C] operator[>] identifier[array] , Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[indexes] operator[SEP] { Keyword[return] identifier[sort] operator[SEP] identifier[array] , identifier[indexes] , identifier[Comparator] operator[SEP] identifier[naturalOrder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static boolean isJSSpace(int c) { if (c <= 127) { return c == 0x20 || c == 0x9 || c == 0xC || c == 0xB; } else { return c == 0xA0 || Character.getType((char) c) == Character.SPACE_SEPARATOR; } }
class class_name[name] begin[{] method[isJSSpace, return_type[type[boolean]], modifier[public static], parameter[c]] begin[{] if[binary_operation[member[.c], <=, literal[127]]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[member[.c], ==, literal[0x20]], ||, binary_operation[member[.c], ==, literal[0x9]]], ||, binary_operation[member[.c], ==, literal[0xC]]], ||, binary_operation[member[.c], ==, literal[0xB]]]] else begin[{] return[binary_operation[binary_operation[member[.c], ==, literal[0xA0]], ||, binary_operation[call[Character.getType, parameter[Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))]], ==, member[Character.SPACE_SEPARATOR]]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isJSSpace] operator[SEP] Keyword[int] identifier[c] operator[SEP] { Keyword[if] operator[SEP] identifier[c] operator[<=] Other[127] operator[SEP] { Keyword[return] identifier[c] operator[==] literal[Integer] operator[||] identifier[c] operator[==] literal[Integer] operator[||] identifier[c] operator[==] literal[Integer] operator[||] identifier[c] operator[==] literal[Integer] operator[SEP] } Keyword[else] { Keyword[return] identifier[c] operator[==] literal[Integer] operator[||] identifier[Character] operator[SEP] identifier[getType] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c] operator[SEP] operator[==] identifier[Character] operator[SEP] identifier[SPACE_SEPARATOR] operator[SEP] } }
public void onActivityResult( int requestCode, int resultCode, @Nullable Intent data) { if (requestCode == this.requestCode) { getOrCreateLoginManager().onActivityResult(getActivity(), requestCode, resultCode, data); } }
class class_name[name] begin[{] method[onActivityResult, return_type[void], modifier[public], parameter[requestCode, resultCode, data]] begin[{] if[binary_operation[member[.requestCode], ==, THIS[member[None.requestCode]]]] begin[{] call[.getOrCreateLoginManager, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[onActivityResult] operator[SEP] Keyword[int] identifier[requestCode] , Keyword[int] identifier[resultCode] , annotation[@] identifier[Nullable] identifier[Intent] identifier[data] operator[SEP] { Keyword[if] operator[SEP] identifier[requestCode] operator[==] Keyword[this] operator[SEP] identifier[requestCode] operator[SEP] { identifier[getOrCreateLoginManager] operator[SEP] operator[SEP] operator[SEP] identifier[onActivityResult] operator[SEP] identifier[getActivity] operator[SEP] operator[SEP] , identifier[requestCode] , identifier[resultCode] , identifier[data] operator[SEP] operator[SEP] } }
public static Object attribute(final HttpServletRequest request, final String name) { Object value = request.getAttribute(name); if (value != null) { return value; } value = request.getSession().getAttribute(name); if (value != null) { return value; } return request.getServletContext().getAttribute(name); }
class class_name[name] begin[{] method[attribute, return_type[type[Object]], modifier[public static], parameter[request, name]] begin[{] local_variable[type[Object], value] if[binary_operation[member[.value], !=, literal[null]]] begin[{] return[member[.value]] else begin[{] None end[}] assign[member[.value], call[request.getSession, parameter[]]] if[binary_operation[member[.value], !=, literal[null]]] begin[{] return[member[.value]] else begin[{] None end[}] return[call[request.getServletContext, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[attribute] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[request] , Keyword[final] identifier[String] identifier[name] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[request] operator[SEP] identifier[getAttribute] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[value] operator[SEP] } identifier[value] operator[=] identifier[request] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] identifier[getAttribute] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[value] operator[SEP] } Keyword[return] identifier[request] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] identifier[getAttribute] operator[SEP] identifier[name] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://www.w3.org/1998/Math/MathML", name = "merror") public JAXBElement<MerrorType> createMerror(MerrorType value) { return new JAXBElement<MerrorType>(_Merror_QNAME, MerrorType.class, null, value); }
class class_name[name] begin[{] method[createMerror, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_Merror_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MerrorType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MerrorType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[MerrorType] operator[>] identifier[createMerror] operator[SEP] identifier[MerrorType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[MerrorType] operator[>] operator[SEP] identifier[_Merror_QNAME] , identifier[MerrorType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
@Override public void send(Message message) throws MessagingException { LOG.info("Sending message..."); LOG.debug("{}", message); LOG.debug("Find senders that is able to send the message {}", message); boolean sent = false; for (ConditionalSender sender : senders) { if (sender.supports(message)) { LOG.debug("Sending message {} using sender {}...", message, sender); sender.send(message); LOG.debug("Message {} sent using sender {}", message, sender); sent = true; } else { LOG.debug("Sender {} can't handle the message {}", sender, message); } } if(sent) { LOG.info("Message sent"); LOG.debug("{}", message); } else { throw new MessageNotSentException("No sender available to send the message", message); } }
class class_name[name] begin[{] method[send, return_type[void], modifier[public], parameter[message]] begin[{] call[LOG.info, parameter[literal["Sending message..."]]] call[LOG.debug, parameter[literal["{}"], member[.message]]] call[LOG.debug, parameter[literal["Find senders that is able to send the message {}"], member[.message]]] local_variable[type[boolean], sent] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=supports, postfix_operators=[], prefix_operators=[], qualifier=sender, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Sender {} can't handle the message {}"), MemberReference(member=sender, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Sending message {} using sender {}..."), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sender, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=send, postfix_operators=[], prefix_operators=[], qualifier=sender, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Message {} sent using sender {}"), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sender, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=sent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=senders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sender)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConditionalSender, sub_type=None))), label=None) if[member[.sent]] begin[{] call[LOG.info, parameter[literal["Message sent"]]] call[LOG.debug, parameter[literal["{}"], member[.message]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No sender available to send the message"), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MessageNotSentException, sub_type=None)), label=None) end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[send] operator[SEP] identifier[Message] identifier[message] operator[SEP] Keyword[throws] identifier[MessagingException] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[message] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[message] operator[SEP] operator[SEP] Keyword[boolean] identifier[sent] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[ConditionalSender] identifier[sender] operator[:] identifier[senders] operator[SEP] { Keyword[if] operator[SEP] identifier[sender] operator[SEP] identifier[supports] operator[SEP] identifier[message] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[message] , identifier[sender] operator[SEP] operator[SEP] identifier[sender] operator[SEP] identifier[send] operator[SEP] identifier[message] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[message] , identifier[sender] operator[SEP] operator[SEP] identifier[sent] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[sender] , identifier[message] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[sent] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[message] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[MessageNotSentException] operator[SEP] literal[String] , identifier[message] operator[SEP] operator[SEP] } }
public OutputStream getOutput(String pathname, boolean append, int chunkSize) throws IOException { GridFile file = (GridFile) getFile(pathname, chunkSize); checkIsNotDirectory(file); createIfNeeded(file); return new GridOutputStream(file, append, data); }
class class_name[name] begin[{] method[getOutput, return_type[type[OutputStream]], modifier[public], parameter[pathname, append, chunkSize]] begin[{] local_variable[type[GridFile], file] call[.checkIsNotDirectory, parameter[member[.file]]] call[.createIfNeeded, parameter[member[.file]]] return[ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=append, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=data, 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=GridOutputStream, sub_type=None))] end[}] END[}]
Keyword[public] identifier[OutputStream] identifier[getOutput] operator[SEP] identifier[String] identifier[pathname] , Keyword[boolean] identifier[append] , Keyword[int] identifier[chunkSize] operator[SEP] Keyword[throws] identifier[IOException] { identifier[GridFile] identifier[file] operator[=] operator[SEP] identifier[GridFile] operator[SEP] identifier[getFile] operator[SEP] identifier[pathname] , identifier[chunkSize] operator[SEP] operator[SEP] identifier[checkIsNotDirectory] operator[SEP] identifier[file] operator[SEP] operator[SEP] identifier[createIfNeeded] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[GridOutputStream] operator[SEP] identifier[file] , identifier[append] , identifier[data] operator[SEP] operator[SEP] }
public void initialize() throws IOException { // Create a pipe such that its one end is connected to the input stream used by // the uploader and the other end is the write channel used by the caller. PipedInputStream pipeSource = new PipedInputStream(pipeBufferSize); OutputStream pipeSink = new PipedOutputStream(pipeSource); pipeSinkChannel = Channels.newChannel(pipeSink); // Connect pipe-source to the stream used by uploader. InputStreamContent objectContentStream = new InputStreamContent(contentType, pipeSource); // Indicate that we do not know length of file in advance. objectContentStream.setLength(-1); objectContentStream.setCloseInputStream(false); T request = createRequest(objectContentStream); request.setDisableGZipContent(true); // Change chunk size from default value (10MB) to one that yields higher performance. clientRequestHelper.setChunkSize(request, uploadChunkSize); // Given that the two ends of the pipe must operate asynchronous relative // to each other, we need to start the upload operation on a separate thread. uploadOperation = threadPool.submit(new UploadOperation(request, pipeSource)); isInitialized = true; }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[PipedInputStream], pipeSource] local_variable[type[OutputStream], pipeSink] assign[member[.pipeSinkChannel], call[Channels.newChannel, parameter[member[.pipeSink]]]] local_variable[type[InputStreamContent], objectContentStream] call[objectContentStream.setLength, parameter[literal[1]]] call[objectContentStream.setCloseInputStream, parameter[literal[false]]] local_variable[type[T], request] call[request.setDisableGZipContent, parameter[literal[true]]] call[clientRequestHelper.setChunkSize, parameter[member[.request], member[.uploadChunkSize]]] assign[member[.uploadOperation], call[threadPool.submit, parameter[ClassCreator(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pipeSource, 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=UploadOperation, sub_type=None))]]] assign[member[.isInitialized], literal[true]] end[}] END[}]
Keyword[public] Keyword[void] identifier[initialize] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[PipedInputStream] identifier[pipeSource] operator[=] Keyword[new] identifier[PipedInputStream] operator[SEP] identifier[pipeBufferSize] operator[SEP] operator[SEP] identifier[OutputStream] identifier[pipeSink] operator[=] Keyword[new] identifier[PipedOutputStream] operator[SEP] identifier[pipeSource] operator[SEP] operator[SEP] identifier[pipeSinkChannel] operator[=] identifier[Channels] operator[SEP] identifier[newChannel] operator[SEP] identifier[pipeSink] operator[SEP] operator[SEP] identifier[InputStreamContent] identifier[objectContentStream] operator[=] Keyword[new] identifier[InputStreamContent] operator[SEP] identifier[contentType] , identifier[pipeSource] operator[SEP] operator[SEP] identifier[objectContentStream] operator[SEP] identifier[setLength] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[objectContentStream] operator[SEP] identifier[setCloseInputStream] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[T] identifier[request] operator[=] identifier[createRequest] operator[SEP] identifier[objectContentStream] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setDisableGZipContent] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[clientRequestHelper] operator[SEP] identifier[setChunkSize] operator[SEP] identifier[request] , identifier[uploadChunkSize] operator[SEP] operator[SEP] identifier[uploadOperation] operator[=] identifier[threadPool] operator[SEP] identifier[submit] operator[SEP] Keyword[new] identifier[UploadOperation] operator[SEP] identifier[request] , identifier[pipeSource] operator[SEP] operator[SEP] operator[SEP] identifier[isInitialized] operator[=] literal[boolean] operator[SEP] }
public void forceDeleteModule(String moduleName) throws Exception { OpenCms.getModuleManager().deleteModule( m_cms, moduleName, true, new CmsShellReport(m_cms.getRequestContext().getLocale())); }
class class_name[name] begin[{] method[forceDeleteModule, return_type[void], modifier[public], parameter[moduleName]] begin[{] call[OpenCms.getModuleManager, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[forceDeleteModule] operator[SEP] identifier[String] identifier[moduleName] operator[SEP] Keyword[throws] identifier[Exception] { identifier[OpenCms] operator[SEP] identifier[getModuleManager] operator[SEP] operator[SEP] operator[SEP] identifier[deleteModule] operator[SEP] identifier[m_cms] , identifier[moduleName] , literal[boolean] , Keyword[new] identifier[CmsShellReport] operator[SEP] identifier[m_cms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getLocale] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void addPath(T value, byte[]... parts) { int depth = 0; ByteTrieNode<T> node = _root; for (byte[] part : parts) { for (byte b : part) { ByteTrieNode<T> child = node._children.get(b); if (child == null) { child = new ByteTrieNode<T>(); node._children.put(b, child); } node = child; depth++; } } if (depth == 0) throw new IllegalArgumentException("Parts must contain at least one byte."); node.setValue(value); _maxDepth = Math.max(_maxDepth, depth); }
class class_name[name] begin[{] method[addPath, return_type[void], modifier[public], parameter[value, parts]] begin[{] local_variable[type[int], depth] local_variable[type[ByteTrieNode], node] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=node._children, selectors=[], type_arguments=None), name=child)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=ByteTrieNode, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=child, 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=child, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=ByteTrieNode, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=node._children, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=depth, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=part, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=b)], modifiers=set(), type=BasicType(dimensions=[], name=byte))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=part)], modifiers=set(), type=BasicType(dimensions=[None], name=byte))), label=None) if[binary_operation[member[.depth], ==, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parts must contain at least one byte.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[node.setValue, parameter[member[.value]]] assign[member[._maxDepth], call[Math.max, parameter[member[._maxDepth], member[.depth]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addPath] operator[SEP] identifier[T] identifier[value] , Keyword[byte] operator[SEP] operator[SEP] operator[...] identifier[parts] operator[SEP] { Keyword[int] identifier[depth] operator[=] Other[0] operator[SEP] identifier[ByteTrieNode] operator[<] identifier[T] operator[>] identifier[node] operator[=] identifier[_root] operator[SEP] Keyword[for] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[part] operator[:] identifier[parts] operator[SEP] { Keyword[for] operator[SEP] Keyword[byte] identifier[b] operator[:] identifier[part] operator[SEP] { identifier[ByteTrieNode] operator[<] identifier[T] operator[>] identifier[child] operator[=] identifier[node] operator[SEP] identifier[_children] operator[SEP] identifier[get] operator[SEP] identifier[b] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[child] operator[==] Other[null] operator[SEP] { identifier[child] operator[=] Keyword[new] identifier[ByteTrieNode] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[SEP] identifier[_children] operator[SEP] identifier[put] operator[SEP] identifier[b] , identifier[child] operator[SEP] operator[SEP] } identifier[node] operator[=] identifier[child] operator[SEP] identifier[depth] operator[++] operator[SEP] } } Keyword[if] operator[SEP] identifier[depth] operator[==] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[node] operator[SEP] identifier[setValue] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[_maxDepth] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[_maxDepth] , identifier[depth] operator[SEP] operator[SEP] }
public boolean containsStringConstant(String value) { int index = findUtf8(value); if (index == NOT_FOUND) return false; for (int i = 1; i < maxPoolSize; i++) { if (types[i] == STRING && readValue(offsets[i]) == index) return true; } return false; }
class class_name[name] begin[{] method[containsStringConstant, return_type[type[boolean]], modifier[public], parameter[value]] begin[{] local_variable[type[int], index] if[binary_operation[member[.index], ==, member[.NOT_FOUND]]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=STRING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=offsets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=readValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=maxPoolSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[containsStringConstant] operator[SEP] identifier[String] identifier[value] operator[SEP] { Keyword[int] identifier[index] operator[=] identifier[findUtf8] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[==] identifier[NOT_FOUND] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[maxPoolSize] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[types] operator[SEP] identifier[i] operator[SEP] operator[==] identifier[STRING] operator[&&] identifier[readValue] operator[SEP] identifier[offsets] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[==] identifier[index] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
@Override public ProductParsedResult parse(Result result) { BarcodeFormat format = result.getBarcodeFormat(); if (!(format == BarcodeFormat.UPC_A || format == BarcodeFormat.UPC_E || format == BarcodeFormat.EAN_8 || format == BarcodeFormat.EAN_13)) { return null; } String rawText = getMassagedText(result); if (!isStringOfDigits(rawText, rawText.length())) { return null; } // Not actually checking the checksum again here String normalizedProductID; // Expand UPC-E for purposes of searching if (format == BarcodeFormat.UPC_E && rawText.length() == 8) { normalizedProductID = UPCEReader.convertUPCEtoUPCA(rawText); } else { normalizedProductID = rawText; } return new ProductParsedResult(rawText, normalizedProductID); }
class class_name[name] begin[{] method[parse, return_type[type[ProductParsedResult]], modifier[public], parameter[result]] begin[{] local_variable[type[BarcodeFormat], format] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.format], ==, member[BarcodeFormat.UPC_A]], ||, binary_operation[member[.format], ==, member[BarcodeFormat.UPC_E]]], ||, binary_operation[member[.format], ==, member[BarcodeFormat.EAN_8]]], ||, binary_operation[member[.format], ==, member[BarcodeFormat.EAN_13]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], rawText] if[call[.isStringOfDigits, parameter[member[.rawText], call[rawText.length, parameter[]]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], normalizedProductID] if[binary_operation[binary_operation[member[.format], ==, member[BarcodeFormat.UPC_E]], &&, binary_operation[call[rawText.length, parameter[]], ==, literal[8]]]] begin[{] assign[member[.normalizedProductID], call[UPCEReader.convertUPCEtoUPCA, parameter[member[.rawText]]]] else begin[{] assign[member[.normalizedProductID], member[.rawText]] end[}] return[ClassCreator(arguments=[MemberReference(member=rawText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=normalizedProductID, 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=ProductParsedResult, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ProductParsedResult] identifier[parse] operator[SEP] identifier[Result] identifier[result] operator[SEP] { identifier[BarcodeFormat] identifier[format] operator[=] identifier[result] operator[SEP] identifier[getBarcodeFormat] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[format] operator[==] identifier[BarcodeFormat] operator[SEP] identifier[UPC_A] operator[||] identifier[format] operator[==] identifier[BarcodeFormat] operator[SEP] identifier[UPC_E] operator[||] identifier[format] operator[==] identifier[BarcodeFormat] operator[SEP] identifier[EAN_8] operator[||] identifier[format] operator[==] identifier[BarcodeFormat] operator[SEP] identifier[EAN_13] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[String] identifier[rawText] operator[=] identifier[getMassagedText] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isStringOfDigits] operator[SEP] identifier[rawText] , identifier[rawText] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[String] identifier[normalizedProductID] operator[SEP] Keyword[if] operator[SEP] identifier[format] operator[==] identifier[BarcodeFormat] operator[SEP] identifier[UPC_E] operator[&&] identifier[rawText] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[8] operator[SEP] { identifier[normalizedProductID] operator[=] identifier[UPCEReader] operator[SEP] identifier[convertUPCEtoUPCA] operator[SEP] identifier[rawText] operator[SEP] operator[SEP] } Keyword[else] { identifier[normalizedProductID] operator[=] identifier[rawText] operator[SEP] } Keyword[return] Keyword[new] identifier[ProductParsedResult] operator[SEP] identifier[rawText] , identifier[normalizedProductID] operator[SEP] operator[SEP] }
public char getChar(String path) { Object object = get(path); return convertObjectTo(object, Character.class); }
class class_name[name] begin[{] method[getChar, return_type[type[char]], modifier[public], parameter[path]] begin[{] local_variable[type[Object], object] return[call[.convertObjectTo, parameter[member[.object], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Character, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[char] identifier[getChar] operator[SEP] identifier[String] identifier[path] operator[SEP] { identifier[Object] identifier[object] operator[=] identifier[get] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[return] identifier[convertObjectTo] operator[SEP] identifier[object] , identifier[Character] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
void sortByTveIndex(int fromIndex, int toIndex) { Collections.sort(m_columns.subList(fromIndex, toIndex), TVE_IDX_COMPARE); }
class class_name[name] begin[{] method[sortByTveIndex, return_type[void], modifier[default], parameter[fromIndex, toIndex]] begin[{] call[Collections.sort, parameter[call[m_columns.subList, parameter[member[.fromIndex], member[.toIndex]]], member[.TVE_IDX_COMPARE]]] end[}] END[}]
Keyword[void] identifier[sortByTveIndex] operator[SEP] Keyword[int] identifier[fromIndex] , Keyword[int] identifier[toIndex] operator[SEP] { identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[m_columns] operator[SEP] identifier[subList] operator[SEP] identifier[fromIndex] , identifier[toIndex] operator[SEP] , identifier[TVE_IDX_COMPARE] operator[SEP] operator[SEP] }
public CmsUrlNameMappingFilter filterNamePattern(String namePattern) { if (namePattern == null) { throw new IllegalArgumentException(); } CmsUrlNameMappingFilter result = new CmsUrlNameMappingFilter(this); result.m_namePattern = namePattern; return result; }
class class_name[name] begin[{] method[filterNamePattern, return_type[type[CmsUrlNameMappingFilter]], modifier[public], parameter[namePattern]] begin[{] if[binary_operation[member[.namePattern], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[CmsUrlNameMappingFilter], result] assign[member[result.m_namePattern], member[.namePattern]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[CmsUrlNameMappingFilter] identifier[filterNamePattern] operator[SEP] identifier[String] identifier[namePattern] operator[SEP] { Keyword[if] operator[SEP] identifier[namePattern] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } identifier[CmsUrlNameMappingFilter] identifier[result] operator[=] Keyword[new] identifier[CmsUrlNameMappingFilter] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[m_namePattern] operator[=] identifier[namePattern] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@WithBridgeMethods(value = SQLUpdateClause.class, castRequired = true) public C addBatch() { batches.add(new SQLUpdateBatch(metadata, updates)); updates = Maps.newLinkedHashMap(); metadata = new DefaultQueryMetadata(); metadata.addJoin(JoinType.DEFAULT, entity); return (C) this; }
class class_name[name] begin[{] method[addBatch, return_type[type[C]], modifier[public], parameter[]] begin[{] call[batches.add, parameter[ClassCreator(arguments=[MemberReference(member=metadata, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=updates, 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=SQLUpdateBatch, sub_type=None))]] assign[member[.updates], call[Maps.newLinkedHashMap, parameter[]]] assign[member[.metadata], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultQueryMetadata, sub_type=None))] call[metadata.addJoin, parameter[member[JoinType.DEFAULT], member[.entity]]] return[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=C, sub_type=None))] end[}] END[}]
annotation[@] identifier[WithBridgeMethods] operator[SEP] identifier[value] operator[=] identifier[SQLUpdateClause] operator[SEP] Keyword[class] , identifier[castRequired] operator[=] literal[boolean] operator[SEP] Keyword[public] identifier[C] identifier[addBatch] operator[SEP] operator[SEP] { identifier[batches] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[SQLUpdateBatch] operator[SEP] identifier[metadata] , identifier[updates] operator[SEP] operator[SEP] operator[SEP] identifier[updates] operator[=] identifier[Maps] operator[SEP] identifier[newLinkedHashMap] operator[SEP] operator[SEP] operator[SEP] identifier[metadata] operator[=] Keyword[new] identifier[DefaultQueryMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[metadata] operator[SEP] identifier[addJoin] operator[SEP] identifier[JoinType] operator[SEP] identifier[DEFAULT] , identifier[entity] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[C] operator[SEP] Keyword[this] operator[SEP] }
private static void addEntry(final ArrayList<String> aStringArray) { try { final MagicMimeEntry magicEntry = new MagicMimeEntry(aStringArray); mMagicMimeEntries.add(magicEntry); } catch (final InvalidMagicMimeEntryException e) { } }
class class_name[name] begin[{] method[addEntry, return_type[void], modifier[private static], parameter[aStringArray]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=aStringArray, 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=MagicMimeEntry, sub_type=None)), name=magicEntry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=MagicMimeEntry, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=magicEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=mMagicMimeEntries, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InvalidMagicMimeEntryException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[addEntry] operator[SEP] Keyword[final] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[aStringArray] operator[SEP] { Keyword[try] { Keyword[final] identifier[MagicMimeEntry] identifier[magicEntry] operator[=] Keyword[new] identifier[MagicMimeEntry] operator[SEP] identifier[aStringArray] operator[SEP] operator[SEP] identifier[mMagicMimeEntries] operator[SEP] identifier[add] operator[SEP] identifier[magicEntry] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[InvalidMagicMimeEntryException] identifier[e] operator[SEP] { } }
public static <T> T returnValueOrDefaultIfNull(T value, Supplier<T> supplier) { return Optional.ofNullable(value).orElseGet(supplier); }
class class_name[name] begin[{] method[returnValueOrDefaultIfNull, return_type[type[T]], modifier[public static], parameter[value, supplier]] begin[{] return[call[Optional.ofNullable, parameter[member[.value]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[returnValueOrDefaultIfNull] operator[SEP] identifier[T] identifier[value] , identifier[Supplier] operator[<] identifier[T] operator[>] identifier[supplier] operator[SEP] { Keyword[return] identifier[Optional] operator[SEP] identifier[ofNullable] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[orElseGet] operator[SEP] identifier[supplier] operator[SEP] operator[SEP] }
public Properties getProperties(Option option) { Properties props = new Properties(); for (Option processedOption : options) { if (processedOption.equals(option)) { List<String> values = processedOption.getValuesList(); if (values.size() >= 2) { // use the first 2 arguments as the key/value pair props.put(values.get(0), values.get(1)); } else if (values.size() == 1) { // no explicit value, handle it as a boolean props.put(values.get(0), "true"); } } } return props; }
class class_name[name] begin[{] method[getProperties, return_type[type[Properties]], modifier[public], parameter[option]] begin[{] local_variable[type[Properties], props] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=option, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=processedOption, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValuesList, postfix_operators=[], prefix_operators=[], qualifier=processedOption, selectors=[], type_arguments=None), name=values)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>=), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="true")], member=put, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=get, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=options, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=processedOption)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Option, sub_type=None))), label=None) return[member[.props]] end[}] END[}]
Keyword[public] identifier[Properties] identifier[getProperties] operator[SEP] identifier[Option] identifier[option] operator[SEP] { identifier[Properties] identifier[props] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Option] identifier[processedOption] operator[:] identifier[options] operator[SEP] { Keyword[if] operator[SEP] identifier[processedOption] operator[SEP] identifier[equals] operator[SEP] identifier[option] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[values] operator[=] identifier[processedOption] operator[SEP] identifier[getValuesList] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>=] Other[2] operator[SEP] { identifier[props] operator[SEP] identifier[put] operator[SEP] identifier[values] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] , identifier[values] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[props] operator[SEP] identifier[put] operator[SEP] identifier[values] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } } Keyword[return] identifier[props] operator[SEP] }
public static boolean canBePreempted(ResourceType type) { // Preemption is not allowed for JOBTRACKER grants. switch (type) { case MAP: return true; case REDUCE: return true; case JOBTRACKER: return false; default: throw new RuntimeException("Undefined Preemption behavior for " + type); } }
class class_name[name] begin[{] method[canBePreempted, return_type[type[boolean]], modifier[public static], parameter[type]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['MAP'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]), SwitchStatementCase(case=['REDUCE'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]), SwitchStatementCase(case=['JOBTRACKER'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Undefined Preemption behavior for "), operandr=MemberReference(member=type, 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=RuntimeException, sub_type=None)), label=None)])], expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[canBePreempted] operator[SEP] identifier[ResourceType] identifier[type] operator[SEP] { Keyword[switch] operator[SEP] identifier[type] operator[SEP] { Keyword[case] identifier[MAP] operator[:] Keyword[return] literal[boolean] operator[SEP] Keyword[case] identifier[REDUCE] operator[:] Keyword[return] literal[boolean] operator[SEP] Keyword[case] identifier[JOBTRACKER] operator[:] Keyword[return] literal[boolean] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[type] operator[SEP] operator[SEP] } }
public final void parseCLI(final String[] args) throws IOException, JDOMException { try { parsedArguments = argParser.parseArgs(args); System.err.println("CLI options: " + parsedArguments); switch (args[0]) { case ANNOTATE_PARSER_NAME: annotate(System.in, System.out); break; case SERVER_PARSER_NAME: server(); break; case CLIENT_PARSER_NAME: client(System.in, System.out); break; } } catch (ArgumentParserException e) { argParser.handleError(e); System.out.println("Run java -jar target/ixa-pipe-nerc-" + version + "-exec.jar (tag|server|client) -help for details"); System.exit(1); } }
class class_name[name] begin[{] method[parseCLI, return_type[void], modifier[final public], parameter[args]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parsedArguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseArgs, postfix_operators=[], prefix_operators=[], qualifier=argParser, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CLI options: "), operandr=MemberReference(member=parsedArguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), SwitchStatement(cases=[SwitchStatementCase(case=['ANNOTATE_PARSER_NAME'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[])], member=annotate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SERVER_PARSER_NAME'], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=server, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['CLIENT_PARSER_NAME'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[])], member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleError, postfix_operators=[], prefix_operators=[], qualifier=argParser, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Run java -jar target/ixa-pipe-nerc-"), operandr=MemberReference(member=version, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-exec.jar (tag|server|client) -help for details"), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=exit, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ArgumentParserException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[parseCLI] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JDOMException] { Keyword[try] { identifier[parsedArguments] operator[=] identifier[argParser] operator[SEP] identifier[parseArgs] operator[SEP] identifier[args] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[parsedArguments] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[args] operator[SEP] Other[0] operator[SEP] operator[SEP] { Keyword[case] identifier[ANNOTATE_PARSER_NAME] operator[:] identifier[annotate] operator[SEP] identifier[System] operator[SEP] identifier[in] , identifier[System] operator[SEP] identifier[out] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[SERVER_PARSER_NAME] operator[:] identifier[server] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[CLIENT_PARSER_NAME] operator[:] identifier[client] operator[SEP] identifier[System] operator[SEP] identifier[in] , identifier[System] operator[SEP] identifier[out] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } Keyword[catch] operator[SEP] identifier[ArgumentParserException] identifier[e] operator[SEP] { identifier[argParser] operator[SEP] identifier[handleError] operator[SEP] identifier[e] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[version] operator[+] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[1] operator[SEP] operator[SEP] } }
public void setWikipedia(String wikipedia) { if(wikipedia != null) { wikipedia = wikipedia.trim(); } this.wikipedia = wikipedia; }
class class_name[name] begin[{] method[setWikipedia, return_type[void], modifier[public], parameter[wikipedia]] begin[{] if[binary_operation[member[.wikipedia], !=, literal[null]]] begin[{] assign[member[.wikipedia], call[wikipedia.trim, parameter[]]] else begin[{] None end[}] assign[THIS[member[None.wikipedia]], member[.wikipedia]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setWikipedia] operator[SEP] identifier[String] identifier[wikipedia] operator[SEP] { Keyword[if] operator[SEP] identifier[wikipedia] operator[!=] Other[null] operator[SEP] { identifier[wikipedia] operator[=] identifier[wikipedia] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[wikipedia] operator[=] identifier[wikipedia] operator[SEP] }
@Override public boolean connect(HostPort hostPort, IAgentCommand[] startupCommandAry ) throws ConnectionTimeout, ConnectionException { boolean ynRC = false; setHostPort( hostPort ); List<String> errors = getHostPort().validate(); if (errors.size()>0) { ConnectionException e = new ConnectionException(getHostPort(), errors.toString() ); throw e; } else { HumanReadableMessages msgs = DefaultFactory.getFactory().getMessages(); long lngTimeoutMs = DefaultFactory.getFactory().getConfig().getConnectWaitMs(); setCommandArray(startupCommandAry); ExecutorService executor = Executors.newSingleThreadExecutor(); Future<Boolean> future = executor.submit(new Task()); try { getMasterCallback().setConnectionStatusMsg(msgs.getAttemptingToConnect( getHostPort()) ); getMasterCallback().setConnectState(ConnectState.CONNECTING); Boolean ynTaskRC = future.get(lngTimeoutMs, TimeUnit.MILLISECONDS); if (ynTaskRC.equals(Boolean.TRUE)) { NetworkDataReceiverThread2 ntt2 = getConnectionDetail().getNetworkTraceThread2(); ntt2.addTraceWriter(m_traceWriter); ynRC = true; } } catch (TimeoutException e) { getMasterCallback().setConnectionStatusMsg( e.toString() ); getMasterCallback().setConnectState(ConnectState.DISCONNECTED_ERR); } catch (InterruptedException e) { getMasterCallback().setConnectionStatusMsg( e.toString() ); getMasterCallback().setConnectState(ConnectState.DISCONNECTED_ERR); } catch (ExecutionException e) { getMasterCallback().setConnectionStatusMsg( e.toString() ); getMasterCallback().setConnectState(ConnectState.DISCONNECTED_ERR); } finally { executor.shutdownNow(); } } return ynRC; }
class class_name[name] begin[{] method[connect, return_type[type[boolean]], modifier[public], parameter[hostPort, startupCommandAry]] begin[{] local_variable[type[boolean], ynRC] call[.setHostPort, parameter[member[.hostPort]]] local_variable[type[List], errors] if[binary_operation[call[errors.size, parameter[]], >, literal[0]]] begin[{] local_variable[type[ConnectionException], e] ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] local_variable[type[HumanReadableMessages], msgs] local_variable[type[long], lngTimeoutMs] call[.setCommandArray, parameter[member[.startupCommandAry]]] local_variable[type[ExecutorService], executor] local_variable[type[Future], future] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getMasterCallback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHostPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=getAttemptingToConnect, postfix_operators=[], prefix_operators=[], qualifier=msgs, selectors=[], type_arguments=None)], member=setConnectionStatusMsg, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getMasterCallback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=CONNECTING, postfix_operators=[], prefix_operators=[], qualifier=ConnectState, selectors=[])], member=setConnectState, 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=lngTimeoutMs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MILLISECONDS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=future, selectors=[], type_arguments=None), name=ynTaskRC)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=TRUE, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=ynTaskRC, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getConnectionDetail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getNetworkTraceThread2, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=ntt2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NetworkDataReceiverThread2, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=m_traceWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addTraceWriter, postfix_operators=[], prefix_operators=[], qualifier=ntt2, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ynRC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getMasterCallback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=setConnectionStatusMsg, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getMasterCallback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=DISCONNECTED_ERR, postfix_operators=[], prefix_operators=[], qualifier=ConnectState, selectors=[])], member=setConnectState, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['TimeoutException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getMasterCallback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=setConnectionStatusMsg, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getMasterCallback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=DISCONNECTED_ERR, postfix_operators=[], prefix_operators=[], qualifier=ConnectState, selectors=[])], member=setConnectState, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getMasterCallback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=setConnectionStatusMsg, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getMasterCallback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=DISCONNECTED_ERR, postfix_operators=[], prefix_operators=[], qualifier=ConnectState, selectors=[])], member=setConnectState, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ExecutionException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=shutdownNow, postfix_operators=[], prefix_operators=[], qualifier=executor, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] return[member[.ynRC]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[connect] operator[SEP] identifier[HostPort] identifier[hostPort] , identifier[IAgentCommand] operator[SEP] operator[SEP] identifier[startupCommandAry] operator[SEP] Keyword[throws] identifier[ConnectionTimeout] , identifier[ConnectionException] { Keyword[boolean] identifier[ynRC] operator[=] literal[boolean] operator[SEP] identifier[setHostPort] operator[SEP] identifier[hostPort] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[errors] operator[=] identifier[getHostPort] operator[SEP] operator[SEP] operator[SEP] identifier[validate] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[errors] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[ConnectionException] identifier[e] operator[=] Keyword[new] identifier[ConnectionException] operator[SEP] identifier[getHostPort] operator[SEP] operator[SEP] , identifier[errors] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[else] { identifier[HumanReadableMessages] identifier[msgs] operator[=] identifier[DefaultFactory] operator[SEP] identifier[getFactory] operator[SEP] operator[SEP] operator[SEP] identifier[getMessages] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[lngTimeoutMs] operator[=] identifier[DefaultFactory] operator[SEP] identifier[getFactory] operator[SEP] operator[SEP] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getConnectWaitMs] operator[SEP] operator[SEP] operator[SEP] identifier[setCommandArray] operator[SEP] identifier[startupCommandAry] operator[SEP] operator[SEP] identifier[ExecutorService] identifier[executor] operator[=] identifier[Executors] operator[SEP] identifier[newSingleThreadExecutor] operator[SEP] operator[SEP] operator[SEP] identifier[Future] operator[<] identifier[Boolean] operator[>] identifier[future] operator[=] identifier[executor] operator[SEP] identifier[submit] operator[SEP] Keyword[new] identifier[Task] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[getMasterCallback] operator[SEP] operator[SEP] operator[SEP] identifier[setConnectionStatusMsg] operator[SEP] identifier[msgs] operator[SEP] identifier[getAttemptingToConnect] operator[SEP] identifier[getHostPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getMasterCallback] operator[SEP] operator[SEP] operator[SEP] identifier[setConnectState] operator[SEP] identifier[ConnectState] operator[SEP] identifier[CONNECTING] operator[SEP] operator[SEP] identifier[Boolean] identifier[ynTaskRC] operator[=] identifier[future] operator[SEP] identifier[get] operator[SEP] identifier[lngTimeoutMs] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ynTaskRC] operator[SEP] identifier[equals] operator[SEP] identifier[Boolean] operator[SEP] identifier[TRUE] operator[SEP] operator[SEP] { identifier[NetworkDataReceiverThread2] identifier[ntt2] operator[=] identifier[getConnectionDetail] operator[SEP] operator[SEP] operator[SEP] identifier[getNetworkTraceThread2] operator[SEP] operator[SEP] operator[SEP] identifier[ntt2] operator[SEP] identifier[addTraceWriter] operator[SEP] identifier[m_traceWriter] operator[SEP] operator[SEP] identifier[ynRC] operator[=] literal[boolean] operator[SEP] } } Keyword[catch] operator[SEP] identifier[TimeoutException] identifier[e] operator[SEP] { identifier[getMasterCallback] operator[SEP] operator[SEP] operator[SEP] identifier[setConnectionStatusMsg] operator[SEP] identifier[e] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getMasterCallback] operator[SEP] operator[SEP] operator[SEP] identifier[setConnectState] operator[SEP] identifier[ConnectState] operator[SEP] identifier[DISCONNECTED_ERR] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[getMasterCallback] operator[SEP] operator[SEP] operator[SEP] identifier[setConnectionStatusMsg] operator[SEP] identifier[e] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getMasterCallback] operator[SEP] operator[SEP] operator[SEP] identifier[setConnectState] operator[SEP] identifier[ConnectState] operator[SEP] identifier[DISCONNECTED_ERR] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ExecutionException] identifier[e] operator[SEP] { identifier[getMasterCallback] operator[SEP] operator[SEP] operator[SEP] identifier[setConnectionStatusMsg] operator[SEP] identifier[e] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getMasterCallback] operator[SEP] operator[SEP] operator[SEP] identifier[setConnectState] operator[SEP] identifier[ConnectState] operator[SEP] identifier[DISCONNECTED_ERR] operator[SEP] operator[SEP] } Keyword[finally] { identifier[executor] operator[SEP] identifier[shutdownNow] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[ynRC] operator[SEP] }
public void setSectionsAlwaysVisible(final boolean VISIBLE) { if (null == sectionsAlwaysVisible) { _sectionsAlwaysVisible = VISIBLE; fireTileEvent(REDRAW_EVENT); } else { sectionsAlwaysVisible.set(VISIBLE); } }
class class_name[name] begin[{] method[setSectionsAlwaysVisible, return_type[void], modifier[public], parameter[VISIBLE]] begin[{] if[binary_operation[literal[null], ==, member[.sectionsAlwaysVisible]]] begin[{] assign[member[._sectionsAlwaysVisible], member[.VISIBLE]] call[.fireTileEvent, parameter[member[.REDRAW_EVENT]]] else begin[{] call[sectionsAlwaysVisible.set, parameter[member[.VISIBLE]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSectionsAlwaysVisible] operator[SEP] Keyword[final] Keyword[boolean] identifier[VISIBLE] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[sectionsAlwaysVisible] operator[SEP] { identifier[_sectionsAlwaysVisible] operator[=] identifier[VISIBLE] operator[SEP] identifier[fireTileEvent] operator[SEP] identifier[REDRAW_EVENT] operator[SEP] operator[SEP] } Keyword[else] { identifier[sectionsAlwaysVisible] operator[SEP] identifier[set] operator[SEP] identifier[VISIBLE] operator[SEP] operator[SEP] } }
public void writeLong(long pLong) throws IOException { out.write((int) pLong & 0xFF); out.write((int) (pLong >>> 8) & 0xFF); out.write((int) (pLong >>> 16) & 0xFF); out.write((int) (pLong >>> 24) & 0xFF); out.write((int) (pLong >>> 32) & 0xFF); out.write((int) (pLong >>> 40) & 0xFF); out.write((int) (pLong >>> 48) & 0xFF); out.write((int) (pLong >>> 56) & 0xFF); bytesWritten += 8; }
class class_name[name] begin[{] method[writeLong, return_type[void], modifier[public], parameter[pLong]] begin[{] call[out.write, parameter[binary_operation[Cast(expression=MemberReference(member=pLong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), &, literal[0xFF]]]] call[out.write, parameter[binary_operation[Cast(expression=BinaryOperation(operandl=MemberReference(member=pLong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>>), type=BasicType(dimensions=[], name=int)), &, literal[0xFF]]]] call[out.write, parameter[binary_operation[Cast(expression=BinaryOperation(operandl=MemberReference(member=pLong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=>>>), type=BasicType(dimensions=[], name=int)), &, literal[0xFF]]]] call[out.write, parameter[binary_operation[Cast(expression=BinaryOperation(operandl=MemberReference(member=pLong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=>>>), type=BasicType(dimensions=[], name=int)), &, literal[0xFF]]]] call[out.write, parameter[binary_operation[Cast(expression=BinaryOperation(operandl=MemberReference(member=pLong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator=>>>), type=BasicType(dimensions=[], name=int)), &, literal[0xFF]]]] call[out.write, parameter[binary_operation[Cast(expression=BinaryOperation(operandl=MemberReference(member=pLong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=40), operator=>>>), type=BasicType(dimensions=[], name=int)), &, literal[0xFF]]]] call[out.write, parameter[binary_operation[Cast(expression=BinaryOperation(operandl=MemberReference(member=pLong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=48), operator=>>>), type=BasicType(dimensions=[], name=int)), &, literal[0xFF]]]] call[out.write, parameter[binary_operation[Cast(expression=BinaryOperation(operandl=MemberReference(member=pLong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=56), operator=>>>), type=BasicType(dimensions=[], name=int)), &, literal[0xFF]]]] assign[member[.bytesWritten], literal[8]] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeLong] operator[SEP] Keyword[long] identifier[pLong] operator[SEP] Keyword[throws] identifier[IOException] { identifier[out] operator[SEP] identifier[write] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[pLong] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[pLong] operator[>] operator[>] operator[>] Other[8] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[pLong] operator[>] operator[>] operator[>] Other[16] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[pLong] operator[>] operator[>] operator[>] Other[24] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[pLong] operator[>] operator[>] operator[>] Other[32] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[pLong] operator[>] operator[>] operator[>] Other[40] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[pLong] operator[>] operator[>] operator[>] Other[48] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[pLong] operator[>] operator[>] operator[>] Other[56] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[bytesWritten] operator[+=] Other[8] operator[SEP] }
void close(boolean alreadyClosed) { final String methodName = "close"; if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.entry(this, TRACE, methodName, alreadyClosed); } _closed = true; /* * 238811: * Stop all of the listeners - do not close them as the dispatchers * might still be using them. Close them after the dispatchers have * stopped. */ /* * We close dispatchers as soon as they are finished with so no longer have to * close them here. */ if (!alreadyClosed) { for (final Iterator iterator = _listeners.values().iterator(); iterator .hasNext();) { final SibRaListener listener = (SibRaListener) iterator.next(); listener.stop(); } } // The connection is closing so throw away the connection name SibRaDispatcher.resetMEName(); // We want this thread to wait until all the dispatchers have finished their work // (which will happen when the dispatcherCount hits 0. We put the thread into a // wait state if there are any dispatchers still going, the thread will be notified // each time a dispatcher closes (when it has finished its work). synchronized (_dispatcherCount) { if (TraceComponent.isAnyTracingEnabled() && TRACE.isDebugEnabled()) { SibTr.debug(this, TRACE, "There are still " + _dispatcherCount.get() + " open dispatchers"); } if (_dispatcherCount.get() > 0) { Long mdbQuiescingTimeout = getMDBQuiescingTimeoutProperty(); waitForDispatchersToFinish(mdbQuiescingTimeout); } } /* * Close all of the listeners */ if (!alreadyClosed) { for (final Iterator iterator = _listeners.values().iterator(); iterator .hasNext();) { final SibRaListener listener = (SibRaListener) iterator.next(); listener.close(); } } _listeners.clear(); /* * Close the connection */ try { _connection.removeConnectionListener(_connectionListener); // It should be ok to call close on an already closed connection but comms // FFDCs thjis (processor seems ok with it though). No need to close the connection // again anyway so we'll check and if we are being called as part of MeTerminated or // connectionError then the connection will have been closed so dont close again. if (!alreadyClosed) { _connection.close(); } } catch (final SIException exception) { FFDCFilter.processException(exception, CLASS_NAME + "." + methodName, "1:1023:1.59", this); if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) { SibTr.exception(this, TRACE, exception); } } catch (final SIErrorException exception) { FFDCFilter.processException(exception, CLASS_NAME + "." + methodName, "1:1031:1.59", this); if (TraceComponent.isAnyTracingEnabled() && TRACE.isEventEnabled()) { SibTr.exception(this, TRACE, exception); } } if (TraceComponent.isAnyTracingEnabled() && TRACE.isEntryEnabled()) { SibTr.exit(this, TRACE, methodName); } }
class class_name[name] begin[{] method[close, return_type[void], modifier[default], parameter[alreadyClosed]] begin[{] local_variable[type[String], methodName] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.TRACE], member[.methodName], member[.alreadyClosed]]] else begin[{] None end[}] assign[member[._closed], literal[true]] if[member[.alreadyClosed]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=SibRaListener, sub_type=None)), name=listener)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=SibRaListener, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=stop, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=_listeners, selectors=[MethodInvocation(arguments=[], member=iterator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=iterator)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) else begin[{] None end[}] call[SibRaDispatcher.resetMEName, parameter[]] SYNCHRONIZED[member[._dispatcherCount]] BEGIN[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.TRACE], binary_operation[binary_operation[literal["There are still "], +, call[_dispatcherCount.get, parameter[]]], +, literal[" open dispatchers"]]]] else begin[{] None end[}] if[binary_operation[call[_dispatcherCount.get, parameter[]], >, literal[0]]] begin[{] local_variable[type[Long], mdbQuiescingTimeout] call[.waitForDispatchersToFinish, parameter[member[.mdbQuiescingTimeout]]] else begin[{] None end[}] END[}] if[member[.alreadyClosed]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=SibRaListener, sub_type=None)), name=listener)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=SibRaListener, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=_listeners, selectors=[MethodInvocation(arguments=[], member=iterator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=iterator)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) else begin[{] None end[}] call[_listeners.clear, parameter[]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=_connectionListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeConnectionListener, postfix_operators=[], prefix_operators=[], qualifier=_connection, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=alreadyClosed, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), 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=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:1023:1.59"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=TRACE, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=TRACE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['SIException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+), operandr=MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:1031:1.59"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=TRACE, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=TRACE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['SIErrorException']))], finally_block=None, label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[TRACE.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.TRACE], member[.methodName]]] else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[close] operator[SEP] Keyword[boolean] identifier[alreadyClosed] operator[SEP] { Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[TRACE] , identifier[methodName] , identifier[alreadyClosed] operator[SEP] operator[SEP] } identifier[_closed] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[alreadyClosed] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Iterator] identifier[iterator] operator[=] identifier[_listeners] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[SibRaListener] identifier[listener] operator[=] operator[SEP] identifier[SibRaListener] operator[SEP] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[listener] operator[SEP] identifier[stop] operator[SEP] operator[SEP] operator[SEP] } } identifier[SibRaDispatcher] operator[SEP] identifier[resetMEName] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[_dispatcherCount] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[TRACE] , literal[String] operator[+] identifier[_dispatcherCount] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[_dispatcherCount] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[Long] identifier[mdbQuiescingTimeout] operator[=] identifier[getMDBQuiescingTimeoutProperty] operator[SEP] operator[SEP] operator[SEP] identifier[waitForDispatchersToFinish] operator[SEP] identifier[mdbQuiescingTimeout] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[alreadyClosed] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Iterator] identifier[iterator] operator[=] identifier[_listeners] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[SibRaListener] identifier[listener] operator[=] operator[SEP] identifier[SibRaListener] operator[SEP] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[listener] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } identifier[_listeners] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[_connection] operator[SEP] identifier[removeConnectionListener] operator[SEP] identifier[_connectionListener] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[alreadyClosed] operator[SEP] { identifier[_connection] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[SIException] identifier[exception] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[exception] , identifier[CLASS_NAME] operator[+] literal[String] operator[+] identifier[methodName] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] Keyword[this] , identifier[TRACE] , identifier[exception] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[SIErrorException] identifier[exception] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[exception] , identifier[CLASS_NAME] operator[+] literal[String] operator[+] identifier[methodName] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] Keyword[this] , identifier[TRACE] , identifier[exception] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[TRACE] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[TRACE] , identifier[methodName] operator[SEP] operator[SEP] } }
public VarSetBuilder has( String name, Object value) { varSet_.setAnnotation( name, Objects.toString( value, null)); return this; }
class class_name[name] begin[{] method[has, return_type[type[VarSetBuilder]], modifier[public], parameter[name, value]] begin[{] call[varSet_.setAnnotation, parameter[member[.name], call[Objects.toString, parameter[member[.value], literal[null]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[VarSetBuilder] identifier[has] operator[SEP] identifier[String] identifier[name] , identifier[Object] identifier[value] operator[SEP] { identifier[varSet_] operator[SEP] identifier[setAnnotation] operator[SEP] identifier[name] , identifier[Objects] operator[SEP] identifier[toString] operator[SEP] identifier[value] , Other[null] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public String getParameter(final String name) { List<String> values = parameters.get(name); if (values == null) { return null; } if (values.size() == 0) { return ""; } return values.get(0); }
class class_name[name] begin[{] method[getParameter, return_type[type[String]], modifier[public], parameter[name]] begin[{] local_variable[type[List], values] if[binary_operation[member[.values], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[call[values.size, parameter[]], ==, literal[0]]] begin[{] return[literal[""]] else begin[{] None end[}] return[call[values.get, parameter[literal[0]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getParameter] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[values] operator[=] identifier[parameters] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[values] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] literal[String] operator[SEP] } Keyword[return] identifier[values] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] }
private static ShrinkWrapPath relativizeCommonRoot(final ShrinkWrapPath thisOriginal, final Path thisCurrent, final Path otherOriginal, Path otherCurrent, final int backupCount) { // Preconditions assert thisOriginal != null; assert thisCurrent != null; assert otherOriginal != null; assert otherCurrent != null; assert backupCount >= 0; // Do we yet have a common root? if (!otherCurrent.startsWith(thisCurrent)) { // Back up until we do final Path otherParent = otherCurrent.getParent(); final ShrinkWrapPath thisParent = (ShrinkWrapPath) thisCurrent.getParent(); if (otherParent != null && thisParent != null) { return relativizeCommonRoot(thisOriginal, thisParent, otherOriginal, otherParent, backupCount + 1); } else { throw new IllegalArgumentException("No common components"); } } // Common root. Now relativize that. final List<String> thisTokens = tokenize(thisOriginal); final List<String> otherTokens = tokenize((ShrinkWrapPath) otherOriginal); final int numOtherTokens = otherTokens.size(); final int numToTake = otherTokens.size() - thisTokens.size(); final StringBuilder sb = new StringBuilder(); for (int i = 0; i < backupCount; i++) { sb.append(DIR_BACK); sb.append(ArchivePath.SEPARATOR); } final int startCounter = numOtherTokens - numToTake - backupCount; final int stopCounter = numOtherTokens - 1; if (log.isLoggable(Level.FINEST)) { log.finest("Backup: " + backupCount); log.finest("This tokens: " + thisTokens); log.finest("Other tokens: " + otherTokens); log.finest("Differential: " + numToTake); log.finest("Start: " + startCounter); log.finest("Stop: " + stopCounter); } for (int i = startCounter; i <= stopCounter; i++) { if (i > startCounter) { sb.append(ArchivePath.SEPARATOR); } sb.append(otherTokens.get(i)); } return new ShrinkWrapPath(sb.toString(), thisOriginal.fileSystem); }
class class_name[name] begin[{] method[relativizeCommonRoot, return_type[type[ShrinkWrapPath]], modifier[private static], parameter[thisOriginal, thisCurrent, otherOriginal, otherCurrent, backupCount]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=thisOriginal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=thisCurrent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=otherOriginal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=otherCurrent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=backupCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), label=None, value=None) if[call[otherCurrent.startsWith, parameter[member[.thisCurrent]]]] begin[{] local_variable[type[Path], otherParent] local_variable[type[ShrinkWrapPath], thisParent] if[binary_operation[binary_operation[member[.otherParent], !=, literal[null]], &&, binary_operation[member[.thisParent], !=, literal[null]]]] begin[{] return[call[.relativizeCommonRoot, parameter[member[.thisOriginal], member[.thisParent], member[.otherOriginal], member[.otherParent], binary_operation[member[.backupCount], +, literal[1]]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No common components")], 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[}] else begin[{] None end[}] local_variable[type[List], thisTokens] local_variable[type[List], otherTokens] local_variable[type[int], numOtherTokens] local_variable[type[int], numToTake] local_variable[type[StringBuilder], sb] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=DIR_BACK, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=ArchivePath, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=backupCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[int], startCounter] local_variable[type[int], stopCounter] if[call[log.isLoggable, parameter[member[Level.FINEST]]]] begin[{] call[log.finest, parameter[binary_operation[literal["Backup: "], +, member[.backupCount]]]] call[log.finest, parameter[binary_operation[literal["This tokens: "], +, member[.thisTokens]]]] call[log.finest, parameter[binary_operation[literal["Other tokens: "], +, member[.otherTokens]]]] call[log.finest, parameter[binary_operation[literal["Differential: "], +, member[.numToTake]]]] call[log.finest, parameter[binary_operation[literal["Start: "], +, member[.startCounter]]]] call[log.finest, parameter[binary_operation[literal["Stop: "], +, member[.stopCounter]]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=startCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=ArchivePath, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=otherTokens, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=stopCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=startCounter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), MemberReference(member=fileSystem, postfix_operators=[], prefix_operators=[], qualifier=thisOriginal, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ShrinkWrapPath, sub_type=None))] end[}] END[}]
Keyword[private] Keyword[static] identifier[ShrinkWrapPath] identifier[relativizeCommonRoot] operator[SEP] Keyword[final] identifier[ShrinkWrapPath] identifier[thisOriginal] , Keyword[final] identifier[Path] identifier[thisCurrent] , Keyword[final] identifier[Path] identifier[otherOriginal] , identifier[Path] identifier[otherCurrent] , Keyword[final] Keyword[int] identifier[backupCount] operator[SEP] { Keyword[assert] identifier[thisOriginal] operator[!=] Other[null] operator[SEP] Keyword[assert] identifier[thisCurrent] operator[!=] Other[null] operator[SEP] Keyword[assert] identifier[otherOriginal] operator[!=] Other[null] operator[SEP] Keyword[assert] identifier[otherCurrent] operator[!=] Other[null] operator[SEP] Keyword[assert] identifier[backupCount] operator[>=] Other[0] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[otherCurrent] operator[SEP] identifier[startsWith] operator[SEP] identifier[thisCurrent] operator[SEP] operator[SEP] { Keyword[final] identifier[Path] identifier[otherParent] operator[=] identifier[otherCurrent] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ShrinkWrapPath] identifier[thisParent] operator[=] operator[SEP] identifier[ShrinkWrapPath] operator[SEP] identifier[thisCurrent] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[otherParent] operator[!=] Other[null] operator[&&] identifier[thisParent] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[relativizeCommonRoot] operator[SEP] identifier[thisOriginal] , identifier[thisParent] , identifier[otherOriginal] , identifier[otherParent] , identifier[backupCount] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[thisTokens] operator[=] identifier[tokenize] operator[SEP] identifier[thisOriginal] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[otherTokens] operator[=] identifier[tokenize] operator[SEP] operator[SEP] identifier[ShrinkWrapPath] operator[SEP] identifier[otherOriginal] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[numOtherTokens] operator[=] identifier[otherTokens] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[numToTake] operator[=] identifier[otherTokens] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] identifier[thisTokens] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[backupCount] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[DIR_BACK] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[ArchivePath] operator[SEP] identifier[SEPARATOR] operator[SEP] operator[SEP] } Keyword[final] Keyword[int] identifier[startCounter] operator[=] identifier[numOtherTokens] operator[-] identifier[numToTake] operator[-] identifier[backupCount] operator[SEP] Keyword[final] Keyword[int] identifier[stopCounter] operator[=] identifier[numOtherTokens] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINEST] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[backupCount] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[thisTokens] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[otherTokens] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[numToTake] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[startCounter] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[finest] operator[SEP] literal[String] operator[+] identifier[stopCounter] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[startCounter] operator[SEP] identifier[i] operator[<=] identifier[stopCounter] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[>] identifier[startCounter] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[ArchivePath] operator[SEP] identifier[SEPARATOR] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[otherTokens] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[ShrinkWrapPath] operator[SEP] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[thisOriginal] operator[SEP] identifier[fileSystem] operator[SEP] operator[SEP] }
@Override public DnsClient get() { if (debug) logger.debug("DnsSingleClientSupplier.get()::host = {}, port = {}", host, port); return vertx.createDnsClient(port, host); }
class class_name[name] begin[{] method[get, return_type[type[DnsClient]], modifier[public], parameter[]] begin[{] if[member[.debug]] begin[{] call[logger.debug, parameter[literal["DnsSingleClientSupplier.get()::host = {}, port = {}"], member[.host], member[.port]]] else begin[{] None end[}] return[call[vertx.createDnsClient, parameter[member[.port], member[.host]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DnsClient] identifier[get] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[debug] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[host] , identifier[port] operator[SEP] operator[SEP] Keyword[return] identifier[vertx] operator[SEP] identifier[createDnsClient] operator[SEP] identifier[port] , identifier[host] operator[SEP] operator[SEP] }
public ObjectBank<List<IN>> makeObjectBankFromString(String string, DocumentReaderAndWriter<IN> readerAndWriter) { if (flags.announceObjectBankEntries) { System.err.print("Reading data using " + readerAndWriter.getClass()); if (flags.inputEncoding == null) { System.err.println("Getting data from " + string + " (default encoding)"); } else { System.err.println("Getting data from " + string + " (" + flags.inputEncoding + " encoding)"); } } // return new ObjectBank<List<IN>>(new // ResettableReaderIteratorFactory(string), readerAndWriter); // TODO return new ObjectBankWrapper<IN>(flags, new ObjectBank<List<IN>>(new ResettableReaderIteratorFactory(string), readerAndWriter), knownLCWords); }
class class_name[name] begin[{] method[makeObjectBankFromString, return_type[type[ObjectBank]], modifier[public], parameter[string, readerAndWriter]] begin[{] if[member[flags.announceObjectBankEntries]] begin[{] call[System.err.print, parameter[binary_operation[literal["Reading data using "], +, call[readerAndWriter.getClass, parameter[]]]]] if[binary_operation[member[flags.inputEncoding], ==, literal[null]]] begin[{] call[System.err.println, parameter[binary_operation[binary_operation[literal["Getting data from "], +, member[.string]], +, literal[" (default encoding)"]]]] else begin[{] call[System.err.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Getting data from "], +, member[.string]], +, literal[" ("]], +, member[flags.inputEncoding]], +, literal[" encoding)"]]]] end[}] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=flags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=string, 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=ResettableReaderIteratorFactory, sub_type=None)), MemberReference(member=readerAndWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IN, sub_type=None))], dimensions=[], name=List, sub_type=None))], dimensions=None, name=ObjectBank, sub_type=None)), MemberReference(member=knownLCWords, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IN, sub_type=None))], dimensions=None, name=ObjectBankWrapper, sub_type=None))] end[}] END[}]
Keyword[public] identifier[ObjectBank] operator[<] identifier[List] operator[<] identifier[IN] operator[>] operator[>] identifier[makeObjectBankFromString] operator[SEP] identifier[String] identifier[string] , identifier[DocumentReaderAndWriter] operator[<] identifier[IN] operator[>] identifier[readerAndWriter] operator[SEP] { Keyword[if] operator[SEP] identifier[flags] operator[SEP] identifier[announceObjectBankEntries] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[readerAndWriter] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[flags] operator[SEP] identifier[inputEncoding] operator[==] Other[null] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[string] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[string] operator[+] literal[String] operator[+] identifier[flags] operator[SEP] identifier[inputEncoding] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[ObjectBankWrapper] operator[<] identifier[IN] operator[>] operator[SEP] identifier[flags] , Keyword[new] identifier[ObjectBank] operator[<] identifier[List] operator[<] identifier[IN] operator[>] operator[>] operator[SEP] Keyword[new] identifier[ResettableReaderIteratorFactory] operator[SEP] identifier[string] operator[SEP] , identifier[readerAndWriter] operator[SEP] , identifier[knownLCWords] operator[SEP] operator[SEP] }
public void addFilterRange(final UITableHeader _uitableHeader, final String _from, final String _to) throws EFapsException { final TableFilter filter = new TableFilter(_uitableHeader, _from, _to); this.filters.put(_uitableHeader.getFieldName(), filter); final UITableHeader orig = getHeader4Id(_uitableHeader.getFieldId()); if (orig != null) { orig.setFilterApplied(true); } storeFilters(); }
class class_name[name] begin[{] method[addFilterRange, return_type[void], modifier[public], parameter[_uitableHeader, _from, _to]] begin[{] local_variable[type[TableFilter], filter] THIS[member[None.filters]call[None.put, parameter[call[_uitableHeader.getFieldName, parameter[]], member[.filter]]]] local_variable[type[UITableHeader], orig] if[binary_operation[member[.orig], !=, literal[null]]] begin[{] call[orig.setFilterApplied, parameter[literal[true]]] else begin[{] None end[}] call[.storeFilters, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addFilterRange] operator[SEP] Keyword[final] identifier[UITableHeader] identifier[_uitableHeader] , Keyword[final] identifier[String] identifier[_from] , Keyword[final] identifier[String] identifier[_to] operator[SEP] Keyword[throws] identifier[EFapsException] { Keyword[final] identifier[TableFilter] identifier[filter] operator[=] Keyword[new] identifier[TableFilter] operator[SEP] identifier[_uitableHeader] , identifier[_from] , identifier[_to] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[filters] operator[SEP] identifier[put] operator[SEP] identifier[_uitableHeader] operator[SEP] identifier[getFieldName] operator[SEP] operator[SEP] , identifier[filter] operator[SEP] operator[SEP] Keyword[final] identifier[UITableHeader] identifier[orig] operator[=] identifier[getHeader4Id] operator[SEP] identifier[_uitableHeader] operator[SEP] identifier[getFieldId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[orig] operator[!=] Other[null] operator[SEP] { identifier[orig] operator[SEP] identifier[setFilterApplied] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } identifier[storeFilters] operator[SEP] operator[SEP] operator[SEP] }
public void removeOutputExtension(OutputExtensionModel<?, ?> outputExtension) { IdentifiableSet<OutputExtensionModel<?, ?>> outputExtensions = this.outputExtensions.get(outputExtension.getPluginId()); if (outputExtensions != null) outputExtensions.remove(outputExtension); IdentificationManager.getInstance().getIdentification(outputExtension) .ifPresent(id -> outputPlugins.stream() .filter(outputPlugin -> outputPlugin.getID().equals(outputExtension.getPluginId())) .forEach(outputPlugin -> outputPlugin.outputExtensionRemoved(id))); }
class class_name[name] begin[{] method[removeOutputExtension, return_type[void], modifier[public], parameter[outputExtension]] begin[{] local_variable[type[IdentifiableSet], outputExtensions] if[binary_operation[member[.outputExtensions], !=, literal[null]]] begin[{] call[outputExtensions.remove, parameter[member[.outputExtension]]] else begin[{] None end[}] call[IdentificationManager.getInstance, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[removeOutputExtension] operator[SEP] identifier[OutputExtensionModel] operator[<] operator[?] , operator[?] operator[>] identifier[outputExtension] operator[SEP] { identifier[IdentifiableSet] operator[<] identifier[OutputExtensionModel] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[outputExtensions] operator[=] Keyword[this] operator[SEP] identifier[outputExtensions] operator[SEP] identifier[get] operator[SEP] identifier[outputExtension] operator[SEP] identifier[getPluginId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[outputExtensions] operator[!=] Other[null] operator[SEP] identifier[outputExtensions] operator[SEP] identifier[remove] operator[SEP] identifier[outputExtension] operator[SEP] operator[SEP] identifier[IdentificationManager] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getIdentification] operator[SEP] identifier[outputExtension] operator[SEP] operator[SEP] identifier[ifPresent] operator[SEP] identifier[id] operator[->] identifier[outputPlugins] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[outputPlugin] operator[->] identifier[outputPlugin] operator[SEP] identifier[getID] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[outputExtension] operator[SEP] identifier[getPluginId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[outputPlugin] operator[->] identifier[outputPlugin] operator[SEP] identifier[outputExtensionRemoved] operator[SEP] identifier[id] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void prepareForEnumeration() { if (isPreparer()) { for (NodeT node : nodeTable.values()) { // Prepare each node for traversal node.initialize(); if (!this.isRootNode(node)) { // Mark other sub-DAGs as non-preparer node.setPreparer(false); } } initializeDependentKeys(); initializeQueue(); } }
class class_name[name] begin[{] method[prepareForEnumeration, return_type[void], modifier[public], parameter[]] begin[{] if[call[.isPreparer, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), label=None), IfStatement(condition=This(postfix_operators=[], prefix_operators=['!'], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isRootNode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setPreparer, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=nodeTable, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NodeT, sub_type=None))), label=None) call[.initializeDependentKeys, parameter[]] call[.initializeQueue, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[prepareForEnumeration] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isPreparer] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[NodeT] identifier[node] operator[:] identifier[nodeTable] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[node] operator[SEP] identifier[initialize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[isRootNode] operator[SEP] identifier[node] operator[SEP] operator[SEP] { identifier[node] operator[SEP] identifier[setPreparer] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } } identifier[initializeDependentKeys] operator[SEP] operator[SEP] operator[SEP] identifier[initializeQueue] operator[SEP] operator[SEP] operator[SEP] } }