code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static BigDecimal acos(BigDecimal x, MathContext mathContext) { checkMathContext(mathContext); if (x.compareTo(ONE) > 0) { throw new ArithmeticException("Illegal acos(x) for x > 1: x = " + x); } if (x.compareTo(MINUS_ONE) < 0) { throw new ArithmeticException("Illegal acos(x) for x < -1: x = " + x); } MathContext mc = new MathContext(mathContext.getPrecision() + 6, mathContext.getRoundingMode()); BigDecimal result = pi(mc).divide(TWO, mc).subtract(asin(x, mc), mc); return round(result, mathContext); }
class class_name[name] begin[{] method[acos, return_type[type[BigDecimal]], modifier[public static], parameter[x, mathContext]] begin[{] call[.checkMathContext, parameter[member[.mathContext]]] if[binary_operation[call[x.compareTo, parameter[member[.ONE]]], >, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal acos(x) for x > 1: x = "), operandr=MemberReference(member=x, 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=ArithmeticException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[call[x.compareTo, parameter[member[.MINUS_ONE]]], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal acos(x) for x < -1: x = "), operandr=MemberReference(member=x, 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=ArithmeticException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[MathContext], mc] local_variable[type[BigDecimal], result] return[call[.round, parameter[member[.result], member[.mathContext]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[BigDecimal] identifier[acos] operator[SEP] identifier[BigDecimal] identifier[x] , identifier[MathContext] identifier[mathContext] operator[SEP] { identifier[checkMathContext] operator[SEP] identifier[mathContext] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[x] operator[SEP] identifier[compareTo] operator[SEP] identifier[ONE] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArithmeticException] operator[SEP] literal[String] operator[+] identifier[x] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[x] operator[SEP] identifier[compareTo] operator[SEP] identifier[MINUS_ONE] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArithmeticException] operator[SEP] literal[String] operator[+] identifier[x] operator[SEP] operator[SEP] } identifier[MathContext] identifier[mc] operator[=] Keyword[new] identifier[MathContext] operator[SEP] identifier[mathContext] operator[SEP] identifier[getPrecision] operator[SEP] operator[SEP] operator[+] Other[6] , identifier[mathContext] operator[SEP] identifier[getRoundingMode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[BigDecimal] identifier[result] operator[=] identifier[pi] operator[SEP] identifier[mc] operator[SEP] operator[SEP] identifier[divide] operator[SEP] identifier[TWO] , identifier[mc] operator[SEP] operator[SEP] identifier[subtract] operator[SEP] identifier[asin] operator[SEP] identifier[x] , identifier[mc] operator[SEP] , identifier[mc] operator[SEP] operator[SEP] Keyword[return] identifier[round] operator[SEP] identifier[result] , identifier[mathContext] operator[SEP] operator[SEP] }
@Override public T update(T entity) { EntityManager entityManager = getEntityManager(); T result = entityManager.merge(entity); return result; }
class class_name[name] begin[{] method[update, return_type[type[T]], modifier[public], parameter[entity]] begin[{] local_variable[type[EntityManager], entityManager] local_variable[type[T], result] return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[update] operator[SEP] identifier[T] identifier[entity] operator[SEP] { identifier[EntityManager] identifier[entityManager] operator[=] identifier[getEntityManager] operator[SEP] operator[SEP] operator[SEP] identifier[T] identifier[result] operator[=] identifier[entityManager] operator[SEP] identifier[merge] operator[SEP] identifier[entity] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
private double probabilityFunction(double AS, int m, int maxIter) { double prob = (C + AS) / (C * Math.sqrt(m)); double norm = (1 - (m * 1.0) / maxIter); // Normalization factor return Math.min(Math.max(prob * norm, 0.0), 1.0); }
class class_name[name] begin[{] method[probabilityFunction, return_type[type[double]], modifier[private], parameter[AS, m, maxIter]] begin[{] local_variable[type[double], prob] local_variable[type[double], norm] return[call[Math.min, parameter[call[Math.max, parameter[binary_operation[member[.prob], *, member[.norm]], literal[0.0]]], literal[1.0]]]] end[}] END[}]
Keyword[private] Keyword[double] identifier[probabilityFunction] operator[SEP] Keyword[double] identifier[AS] , Keyword[int] identifier[m] , Keyword[int] identifier[maxIter] operator[SEP] { Keyword[double] identifier[prob] operator[=] operator[SEP] identifier[C] operator[+] identifier[AS] operator[SEP] operator[/] operator[SEP] identifier[C] operator[*] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[m] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[norm] operator[=] operator[SEP] Other[1] operator[-] operator[SEP] identifier[m] operator[*] literal[Float] operator[SEP] operator[/] identifier[maxIter] operator[SEP] operator[SEP] Keyword[return] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[prob] operator[*] identifier[norm] , literal[Float] operator[SEP] , literal[Float] operator[SEP] operator[SEP] }
public void removeValue(T value, boolean reload) { int idx = getIndex(value); if (idx >= 0) { removeItemInternal(idx, reload); } }
class class_name[name] begin[{] method[removeValue, return_type[void], modifier[public], parameter[value, reload]] begin[{] local_variable[type[int], idx] if[binary_operation[member[.idx], >=, literal[0]]] begin[{] call[.removeItemInternal, parameter[member[.idx], member[.reload]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[removeValue] operator[SEP] identifier[T] identifier[value] , Keyword[boolean] identifier[reload] operator[SEP] { Keyword[int] identifier[idx] operator[=] identifier[getIndex] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[>=] Other[0] operator[SEP] { identifier[removeItemInternal] operator[SEP] identifier[idx] , identifier[reload] operator[SEP] operator[SEP] } }
private void setPath(String p_path) throws MalformedURIException { if (p_path == null) { m_path = null; m_queryString = null; m_fragment = null; } else { initializePath(p_path); } }
class class_name[name] begin[{] method[setPath, return_type[void], modifier[private], parameter[p_path]] begin[{] if[binary_operation[member[.p_path], ==, literal[null]]] begin[{] assign[member[.m_path], literal[null]] assign[member[.m_queryString], literal[null]] assign[member[.m_fragment], literal[null]] else begin[{] call[.initializePath, parameter[member[.p_path]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[setPath] operator[SEP] identifier[String] identifier[p_path] operator[SEP] Keyword[throws] identifier[MalformedURIException] { Keyword[if] operator[SEP] identifier[p_path] operator[==] Other[null] operator[SEP] { identifier[m_path] operator[=] Other[null] operator[SEP] identifier[m_queryString] operator[=] Other[null] operator[SEP] identifier[m_fragment] operator[=] Other[null] operator[SEP] } Keyword[else] { identifier[initializePath] operator[SEP] identifier[p_path] operator[SEP] operator[SEP] } }
public static Properties getFileAsProperties(String path) { File file = new File(nullToEmpty(path)); return getFileAsProperties(file); }
class class_name[name] begin[{] method[getFileAsProperties, return_type[type[Properties]], modifier[public static], parameter[path]] begin[{] local_variable[type[File], file] return[call[.getFileAsProperties, parameter[member[.file]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Properties] identifier[getFileAsProperties] operator[SEP] identifier[String] identifier[path] operator[SEP] { identifier[File] identifier[file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[nullToEmpty] operator[SEP] identifier[path] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[getFileAsProperties] operator[SEP] identifier[file] operator[SEP] operator[SEP] }
StatementDMQL compileInsertStatement(RangeVariable[] outerRanges) { read(); readThis(Tokens.INTO); boolean[] columnCheckList; int[] columnMap; int colCount; Table table = readTableName(); boolean overridingUser = false; boolean overridingSystem = false; int enforcedDefaultIndex = table.getIdentityColumnIndex(); boolean assignsToIdentity = false; columnCheckList = null; columnMap = table.getColumnMap(); colCount = table.getColumnCount(); int position = getPosition(); if (!table.isInsertable()) { throw Error.error(ErrorCode.X_42545); } Table baseTable = table.getBaseTable(); switch (token.tokenType) { case Tokens.DEFAULT : { read(); readThis(Tokens.VALUES); Expression insertExpression = new Expression(OpTypes.ROW, new Expression[]{}); insertExpression = new Expression(OpTypes.TABLE, new Expression[]{ insertExpression }); columnCheckList = table.getNewColumnCheckList(); for (int i = 0; i < table.colDefaults.length; i++) { if (table.colDefaults[i] == null && table.identityColumn != i) { throw Error.error(ErrorCode.X_42544); } } StatementDMQL cs = new StatementInsert(session, table, columnMap, insertExpression, columnCheckList, compileContext); return cs; } case Tokens.OPENBRACKET : { int brackets = readOpenBrackets(); if (brackets == 1) { boolean isQuery = false; switch (token.tokenType) { case Tokens.WITH : case Tokens.SELECT : case Tokens.TABLE : { rewind(position); isQuery = true; break; } default : } if (isQuery) { break; } OrderedHashSet columnNames = new OrderedHashSet(); readSimpleColumnNames(columnNames, table); readThis(Tokens.CLOSEBRACKET); colCount = columnNames.size(); columnMap = table.getColumnIndexes(columnNames); if (token.tokenType != Tokens.VALUES && token.tokenType != Tokens.OVERRIDING) { break; } // $FALL-THROUGH$ } else { rewind(position); break; } } // $FALL-THROUGH$ case Tokens.OVERRIDING : { if (token.tokenType == Tokens.OVERRIDING) { read(); if (token.tokenType == Tokens.USER) { read(); overridingUser = true; } else if (token.tokenType == Tokens.SYSTEM) { read(); overridingSystem = true; } else { unexpectedToken(); } } if (token.tokenType != Tokens.VALUES) { break; } } // $FALL-THROUGH$ case Tokens.VALUES : { read(); columnCheckList = table.getColumnCheckList(columnMap); Expression insertExpressions = XreadContextuallyTypedTable(colCount); HsqlList unresolved = insertExpressions.resolveColumnReferences(outerRanges, null); ExpressionColumn.checkColumnsResolved(unresolved); insertExpressions.resolveTypes(session, null); setParameterTypes(insertExpressions, table, columnMap); if (table != baseTable) { int[] baseColumnMap = table.getBaseTableColumnMap(); int[] newColumnMap = new int[columnMap.length]; ArrayUtil.projectRow(baseColumnMap, columnMap, newColumnMap); columnMap = newColumnMap; } Expression[] rowList = insertExpressions.nodes; for (int j = 0; j < rowList.length; j++) { Expression[] rowArgs = rowList[j].nodes; for (int i = 0; i < rowArgs.length; i++) { Expression e = rowArgs[i]; if (enforcedDefaultIndex == columnMap[i]) { assignsToIdentity = true; if (e.getType() != OpTypes.DEFAULT) { if (table.identitySequence.isAlways()) { if (!overridingUser && !overridingSystem) { throw Error.error(ErrorCode.X_42543); } } else { /* if (overridingUser) { throw Trace.error( Trace.SQL_DEFAULT_CLAUSE_REQUITED); } */ } } } if (e.isParam()) { e.setAttributesAsColumn( table.getColumn(columnMap[i]), true); } else if (e.getType() == OpTypes.DEFAULT) { if (table.colDefaults[i] == null && table.identityColumn != columnMap[i]) { throw Error.error(ErrorCode.X_42544); } } } } if (!assignsToIdentity && (overridingUser || overridingSystem)) { unexpectedTokenRequire(Tokens.T_OVERRIDING); } StatementDMQL cs = new StatementInsert(session, table, columnMap, insertExpressions, columnCheckList, compileContext); return cs; } case Tokens.WITH : case Tokens.SELECT : case Tokens.TABLE : { break; } default : { throw unexpectedToken(); } } columnCheckList = table.getColumnCheckList(columnMap); QueryExpression queryExpression = XreadQueryExpression(); queryExpression.setAsTopLevel(); queryExpression.resolve(session, outerRanges); if (colCount != queryExpression.getColumnCount()) { throw Error.error(ErrorCode.X_42546); } if (table != baseTable) { int[] baseColumnMap = table.getBaseTableColumnMap(); int[] newColumnMap = new int[columnMap.length]; ArrayUtil.projectRow(baseColumnMap, columnMap, newColumnMap); columnMap = newColumnMap; } if (enforcedDefaultIndex != -1 && ArrayUtil.find(columnMap, enforcedDefaultIndex) > -1) { if (table.identitySequence.isAlways()) { if (!overridingUser && !overridingSystem) { throw Error.error(ErrorCode.X_42543); } } else { /* if (overridingUser) { throw Trace.error( Trace.SQL_DEFAULT_CLAUSE_REQUITED); } */ } } else if (overridingUser || overridingSystem) { unexpectedTokenRequire(Tokens.T_OVERRIDING); } StatementDMQL cs = new StatementInsert(session, table, columnMap, columnCheckList, queryExpression, compileContext); return cs; }
class class_name[name] begin[{] method[compileInsertStatement, return_type[type[StatementDMQL]], modifier[default], parameter[outerRanges]] begin[{] call[.read, parameter[]] call[.readThis, parameter[member[Tokens.INTO]]] local_variable[type[boolean], columnCheckList] local_variable[type[int], columnMap] local_variable[type[int], colCount] local_variable[type[Table], table] local_variable[type[boolean], overridingUser] local_variable[type[boolean], overridingSystem] local_variable[type[int], enforcedDefaultIndex] local_variable[type[boolean], assignsToIdentity] assign[member[.columnCheckList], literal[null]] assign[member[.columnMap], call[table.getColumnMap, parameter[]]] assign[member[.colCount], call[table.getColumnCount, parameter[]]] local_variable[type[int], position] if[call[table.isInsertable, parameter[]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=X_42545, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Error, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] local_variable[type[Table], baseTable] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=DEFAULT, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[])], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=VALUES, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[])], member=readThis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=ROW, postfix_operators=[], prefix_operators=[], qualifier=OpTypes, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Expression, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Expression, sub_type=None)), name=insertExpression)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=insertExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=TABLE, postfix_operators=[], prefix_operators=[], qualifier=OpTypes, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=insertExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Expression, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Expression, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=columnCheckList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getNewColumnCheckList, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None)), label=None), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=colDefaults, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MemberReference(member=identityColumn, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=X_42544, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Error, 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=table.colDefaults, 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), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=insertExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnCheckList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=compileContext, 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=StatementInsert, sub_type=None)), name=cs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StatementDMQL, sub_type=None)), ReturnStatement(expression=MemberReference(member=cs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])]), SwitchStatementCase(case=[MemberReference(member=OPENBRACKET, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[])], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readOpenBrackets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=brackets)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=brackets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rewind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=isQuery)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=WITH, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[]), MemberReference(member=SELECT, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[]), MemberReference(member=TABLE, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[])], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rewind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isQuery, 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)])]), SwitchStatementCase(case=[], statements=[])], expression=MemberReference(member=tokenType, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[]), label=None), IfStatement(condition=MemberReference(member=isQuery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OrderedHashSet, sub_type=None)), name=columnNames)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OrderedHashSet, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=columnNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readSimpleColumnNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CLOSEBRACKET, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[])], member=readThis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=colCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=columnNames, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=columnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=columnNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getColumnIndexes, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=tokenType, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[]), operandr=MemberReference(member=VALUES, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[]), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=tokenType, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[]), operandr=MemberReference(member=OVERRIDING, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[]), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]))])]), SwitchStatementCase(case=[MemberReference(member=OVERRIDING, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[])], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tokenType, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[]), operandr=MemberReference(member=OVERRIDING, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tokenType, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[]), operandr=MemberReference(member=USER, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tokenType, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[]), operandr=MemberReference(member=SYSTEM, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=unexpectedToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=overridingSystem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=overridingUser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tokenType, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[]), operandr=MemberReference(member=VALUES, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))])]), SwitchStatementCase(case=[MemberReference(member=VALUES, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[])], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=columnCheckList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=columnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getColumnCheckList, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=colCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=XreadContextuallyTypedTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=insertExpressions)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=outerRanges, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=resolveColumnReferences, postfix_operators=[], prefix_operators=[], qualifier=insertExpressions, selectors=[], type_arguments=None), name=unresolved)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HsqlList, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=unresolved, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkColumnsResolved, postfix_operators=[], prefix_operators=[], qualifier=ExpressionColumn, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=resolveTypes, postfix_operators=[], prefix_operators=[], qualifier=insertExpressions, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=insertExpressions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=baseTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getBaseTableColumnMap, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None), name=baseColumnMap)], modifiers=set(), type=BasicType(dimensions=[None], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=columnMap, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int)), name=newColumnMap)], modifiers=set(), type=BasicType(dimensions=[None], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=baseColumnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newColumnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=projectRow, postfix_operators=[], prefix_operators=[], qualifier=ArrayUtil, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=columnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=newColumnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=nodes, postfix_operators=[], prefix_operators=[], qualifier=insertExpressions, selectors=[]), name=rowList)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Expression, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=rowList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=nodes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), name=rowArgs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Expression, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=rowArgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=enforcedDefaultIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=columnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=assignsToIdentity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operandr=MemberReference(member=DEFAULT, postfix_operators=[], prefix_operators=[], qualifier=OpTypes, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isAlways, postfix_operators=[], prefix_operators=[], qualifier=table.identitySequence, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=overridingUser, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=MemberReference(member=overridingSystem, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=X_42543, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Error, selectors=[], type_arguments=None), label=None)]))]))]))])), IfStatement(condition=MethodInvocation(arguments=[], member=isParam, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operandr=MemberReference(member=DEFAULT, postfix_operators=[], prefix_operators=[], qualifier=OpTypes, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=colDefaults, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MemberReference(member=identityColumn, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[]), operandr=MemberReference(member=columnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=X_42544, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Error, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=columnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=getColumn, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAttributesAsColumn, postfix_operators=[], prefix_operators=[], qualifier=e, 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=rowArgs, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=rowList, 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=assignsToIdentity, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=overridingUser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=overridingSystem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=T_OVERRIDING, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[])], member=unexpectedTokenRequire, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=insertExpressions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=columnCheckList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=compileContext, 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=StatementInsert, sub_type=None)), name=cs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StatementDMQL, sub_type=None)), ReturnStatement(expression=MemberReference(member=cs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])]), SwitchStatementCase(case=[MemberReference(member=WITH, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[]), MemberReference(member=SELECT, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[]), MemberReference(member=TABLE, postfix_operators=[], prefix_operators=[], qualifier=Tokens, selectors=[])], statements=[BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[], statements=[BlockStatement(label=None, statements=[ThrowStatement(expression=MethodInvocation(arguments=[], member=unexpectedToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])])], expression=MemberReference(member=tokenType, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[]), label=None) assign[member[.columnCheckList], call[table.getColumnCheckList, parameter[member[.columnMap]]]] local_variable[type[QueryExpression], queryExpression] call[queryExpression.setAsTopLevel, parameter[]] call[queryExpression.resolve, parameter[member[.session], member[.outerRanges]]] if[binary_operation[member[.colCount], !=, call[queryExpression.getColumnCount, parameter[]]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=X_42546, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Error, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] if[binary_operation[member[.table], !=, member[.baseTable]]] begin[{] local_variable[type[int], baseColumnMap] local_variable[type[int], newColumnMap] call[ArrayUtil.projectRow, parameter[member[.baseColumnMap], member[.columnMap], member[.newColumnMap]]] assign[member[.columnMap], member[.newColumnMap]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.enforcedDefaultIndex], !=, literal[1]], &&, binary_operation[call[ArrayUtil.find, parameter[member[.columnMap], member[.enforcedDefaultIndex]]], >, literal[1]]]] begin[{] if[call[table.identitySequence.isAlways, parameter[]]] begin[{] if[binary_operation[member[.overridingUser], &&, member[.overridingSystem]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=X_42543, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Error, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] else begin[{] end[}] else begin[{] if[binary_operation[member[.overridingUser], ||, member[.overridingSystem]]] begin[{] call[.unexpectedTokenRequire, parameter[member[Tokens.T_OVERRIDING]]] else begin[{] None end[}] end[}] local_variable[type[StatementDMQL], cs] return[member[.cs]] end[}] END[}]
identifier[StatementDMQL] identifier[compileInsertStatement] operator[SEP] identifier[RangeVariable] operator[SEP] operator[SEP] identifier[outerRanges] operator[SEP] { identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[readThis] operator[SEP] identifier[Tokens] operator[SEP] identifier[INTO] operator[SEP] operator[SEP] Keyword[boolean] operator[SEP] operator[SEP] identifier[columnCheckList] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[columnMap] operator[SEP] Keyword[int] identifier[colCount] operator[SEP] identifier[Table] identifier[table] operator[=] identifier[readTableName] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[overridingUser] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[overridingSystem] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[enforcedDefaultIndex] operator[=] identifier[table] operator[SEP] identifier[getIdentityColumnIndex] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[assignsToIdentity] operator[=] literal[boolean] operator[SEP] identifier[columnCheckList] operator[=] Other[null] operator[SEP] identifier[columnMap] operator[=] identifier[table] operator[SEP] identifier[getColumnMap] operator[SEP] operator[SEP] operator[SEP] identifier[colCount] operator[=] identifier[table] operator[SEP] identifier[getColumnCount] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[position] operator[=] identifier[getPosition] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[table] operator[SEP] identifier[isInsertable] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] identifier[Error] operator[SEP] identifier[error] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[X_42545] operator[SEP] operator[SEP] } identifier[Table] identifier[baseTable] operator[=] identifier[table] operator[SEP] identifier[getBaseTable] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[token] operator[SEP] identifier[tokenType] operator[SEP] { Keyword[case] identifier[Tokens] operator[SEP] identifier[DEFAULT] operator[:] { identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[readThis] operator[SEP] identifier[Tokens] operator[SEP] identifier[VALUES] operator[SEP] operator[SEP] identifier[Expression] identifier[insertExpression] operator[=] Keyword[new] identifier[Expression] operator[SEP] identifier[OpTypes] operator[SEP] identifier[ROW] , Keyword[new] identifier[Expression] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] identifier[insertExpression] operator[=] Keyword[new] identifier[Expression] operator[SEP] identifier[OpTypes] operator[SEP] identifier[TABLE] , Keyword[new] identifier[Expression] operator[SEP] operator[SEP] { identifier[insertExpression] } operator[SEP] operator[SEP] identifier[columnCheckList] operator[=] identifier[table] operator[SEP] identifier[getNewColumnCheckList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[table] operator[SEP] identifier[colDefaults] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[table] operator[SEP] identifier[colDefaults] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[&&] identifier[table] operator[SEP] identifier[identityColumn] operator[!=] identifier[i] operator[SEP] { Keyword[throw] identifier[Error] operator[SEP] identifier[error] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[X_42544] operator[SEP] operator[SEP] } } identifier[StatementDMQL] identifier[cs] operator[=] Keyword[new] identifier[StatementInsert] operator[SEP] identifier[session] , identifier[table] , identifier[columnMap] , identifier[insertExpression] , identifier[columnCheckList] , identifier[compileContext] operator[SEP] operator[SEP] Keyword[return] identifier[cs] operator[SEP] } Keyword[case] identifier[Tokens] operator[SEP] identifier[OPENBRACKET] operator[:] { Keyword[int] identifier[brackets] operator[=] identifier[readOpenBrackets] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[brackets] operator[==] Other[1] operator[SEP] { Keyword[boolean] identifier[isQuery] operator[=] literal[boolean] operator[SEP] Keyword[switch] operator[SEP] identifier[token] operator[SEP] identifier[tokenType] operator[SEP] { Keyword[case] identifier[Tokens] operator[SEP] identifier[WITH] operator[:] Keyword[case] identifier[Tokens] operator[SEP] identifier[SELECT] operator[:] Keyword[case] identifier[Tokens] operator[SEP] identifier[TABLE] operator[:] { identifier[rewind] operator[SEP] identifier[position] operator[SEP] operator[SEP] identifier[isQuery] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } Keyword[default] operator[:] } Keyword[if] operator[SEP] identifier[isQuery] operator[SEP] { Keyword[break] operator[SEP] } identifier[OrderedHashSet] identifier[columnNames] operator[=] Keyword[new] identifier[OrderedHashSet] operator[SEP] operator[SEP] operator[SEP] identifier[readSimpleColumnNames] operator[SEP] identifier[columnNames] , identifier[table] operator[SEP] operator[SEP] identifier[readThis] operator[SEP] identifier[Tokens] operator[SEP] identifier[CLOSEBRACKET] operator[SEP] operator[SEP] identifier[colCount] operator[=] identifier[columnNames] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[columnMap] operator[=] identifier[table] operator[SEP] identifier[getColumnIndexes] operator[SEP] identifier[columnNames] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[tokenType] operator[!=] identifier[Tokens] operator[SEP] identifier[VALUES] operator[&&] identifier[token] operator[SEP] identifier[tokenType] operator[!=] identifier[Tokens] operator[SEP] identifier[OVERRIDING] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[else] { identifier[rewind] operator[SEP] identifier[position] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } Keyword[case] identifier[Tokens] operator[SEP] identifier[OVERRIDING] operator[:] { Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[tokenType] operator[==] identifier[Tokens] operator[SEP] identifier[OVERRIDING] operator[SEP] { identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[tokenType] operator[==] identifier[Tokens] operator[SEP] identifier[USER] operator[SEP] { identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[overridingUser] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[tokenType] operator[==] identifier[Tokens] operator[SEP] identifier[SYSTEM] operator[SEP] { identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[overridingSystem] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[unexpectedToken] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[token] operator[SEP] identifier[tokenType] operator[!=] identifier[Tokens] operator[SEP] identifier[VALUES] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[case] identifier[Tokens] operator[SEP] identifier[VALUES] operator[:] { identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[columnCheckList] operator[=] identifier[table] operator[SEP] identifier[getColumnCheckList] operator[SEP] identifier[columnMap] operator[SEP] operator[SEP] identifier[Expression] identifier[insertExpressions] operator[=] identifier[XreadContextuallyTypedTable] operator[SEP] identifier[colCount] operator[SEP] operator[SEP] identifier[HsqlList] identifier[unresolved] operator[=] identifier[insertExpressions] operator[SEP] identifier[resolveColumnReferences] operator[SEP] identifier[outerRanges] , Other[null] operator[SEP] operator[SEP] identifier[ExpressionColumn] operator[SEP] identifier[checkColumnsResolved] operator[SEP] identifier[unresolved] operator[SEP] operator[SEP] identifier[insertExpressions] operator[SEP] identifier[resolveTypes] operator[SEP] identifier[session] , Other[null] operator[SEP] operator[SEP] identifier[setParameterTypes] operator[SEP] identifier[insertExpressions] , identifier[table] , identifier[columnMap] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[table] operator[!=] identifier[baseTable] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[baseColumnMap] operator[=] identifier[table] operator[SEP] identifier[getBaseTableColumnMap] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[newColumnMap] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[columnMap] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[ArrayUtil] operator[SEP] identifier[projectRow] operator[SEP] identifier[baseColumnMap] , identifier[columnMap] , identifier[newColumnMap] operator[SEP] operator[SEP] identifier[columnMap] operator[=] identifier[newColumnMap] operator[SEP] } identifier[Expression] operator[SEP] operator[SEP] identifier[rowList] operator[=] identifier[insertExpressions] operator[SEP] identifier[nodes] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[rowList] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[Expression] operator[SEP] operator[SEP] identifier[rowArgs] operator[=] identifier[rowList] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[nodes] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[rowArgs] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Expression] identifier[e] operator[=] identifier[rowArgs] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[enforcedDefaultIndex] operator[==] identifier[columnMap] operator[SEP] identifier[i] operator[SEP] operator[SEP] { identifier[assignsToIdentity] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[!=] identifier[OpTypes] operator[SEP] identifier[DEFAULT] operator[SEP] { Keyword[if] operator[SEP] identifier[table] operator[SEP] identifier[identitySequence] operator[SEP] identifier[isAlways] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[overridingUser] operator[&&] operator[!] identifier[overridingSystem] operator[SEP] { Keyword[throw] identifier[Error] operator[SEP] identifier[error] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[X_42543] operator[SEP] operator[SEP] } } Keyword[else] { } } } Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[isParam] operator[SEP] operator[SEP] operator[SEP] { identifier[e] operator[SEP] identifier[setAttributesAsColumn] operator[SEP] identifier[table] operator[SEP] identifier[getColumn] operator[SEP] identifier[columnMap] operator[SEP] identifier[i] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[OpTypes] operator[SEP] identifier[DEFAULT] operator[SEP] { Keyword[if] operator[SEP] identifier[table] operator[SEP] identifier[colDefaults] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[&&] identifier[table] operator[SEP] identifier[identityColumn] operator[!=] identifier[columnMap] operator[SEP] identifier[i] operator[SEP] operator[SEP] { Keyword[throw] identifier[Error] operator[SEP] identifier[error] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[X_42544] operator[SEP] operator[SEP] } } } } Keyword[if] operator[SEP] operator[!] identifier[assignsToIdentity] operator[&&] operator[SEP] identifier[overridingUser] operator[||] identifier[overridingSystem] operator[SEP] operator[SEP] { identifier[unexpectedTokenRequire] operator[SEP] identifier[Tokens] operator[SEP] identifier[T_OVERRIDING] operator[SEP] operator[SEP] } identifier[StatementDMQL] identifier[cs] operator[=] Keyword[new] identifier[StatementInsert] operator[SEP] identifier[session] , identifier[table] , identifier[columnMap] , identifier[insertExpressions] , identifier[columnCheckList] , identifier[compileContext] operator[SEP] operator[SEP] Keyword[return] identifier[cs] operator[SEP] } Keyword[case] identifier[Tokens] operator[SEP] identifier[WITH] operator[:] Keyword[case] identifier[Tokens] operator[SEP] identifier[SELECT] operator[:] Keyword[case] identifier[Tokens] operator[SEP] identifier[TABLE] operator[:] { Keyword[break] operator[SEP] } Keyword[default] operator[:] { Keyword[throw] identifier[unexpectedToken] operator[SEP] operator[SEP] operator[SEP] } } identifier[columnCheckList] operator[=] identifier[table] operator[SEP] identifier[getColumnCheckList] operator[SEP] identifier[columnMap] operator[SEP] operator[SEP] identifier[QueryExpression] identifier[queryExpression] operator[=] identifier[XreadQueryExpression] operator[SEP] operator[SEP] operator[SEP] identifier[queryExpression] operator[SEP] identifier[setAsTopLevel] operator[SEP] operator[SEP] operator[SEP] identifier[queryExpression] operator[SEP] identifier[resolve] operator[SEP] identifier[session] , identifier[outerRanges] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[colCount] operator[!=] identifier[queryExpression] operator[SEP] identifier[getColumnCount] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] identifier[Error] operator[SEP] identifier[error] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[X_42546] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[table] operator[!=] identifier[baseTable] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[baseColumnMap] operator[=] identifier[table] operator[SEP] identifier[getBaseTableColumnMap] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[newColumnMap] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[columnMap] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[ArrayUtil] operator[SEP] identifier[projectRow] operator[SEP] identifier[baseColumnMap] , identifier[columnMap] , identifier[newColumnMap] operator[SEP] operator[SEP] identifier[columnMap] operator[=] identifier[newColumnMap] operator[SEP] } Keyword[if] operator[SEP] identifier[enforcedDefaultIndex] operator[!=] operator[-] Other[1] operator[&&] identifier[ArrayUtil] operator[SEP] identifier[find] operator[SEP] identifier[columnMap] , identifier[enforcedDefaultIndex] operator[SEP] operator[>] operator[-] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[table] operator[SEP] identifier[identitySequence] operator[SEP] identifier[isAlways] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[overridingUser] operator[&&] operator[!] identifier[overridingSystem] operator[SEP] { Keyword[throw] identifier[Error] operator[SEP] identifier[error] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[X_42543] operator[SEP] operator[SEP] } } Keyword[else] { } } Keyword[else] Keyword[if] operator[SEP] identifier[overridingUser] operator[||] identifier[overridingSystem] operator[SEP] { identifier[unexpectedTokenRequire] operator[SEP] identifier[Tokens] operator[SEP] identifier[T_OVERRIDING] operator[SEP] operator[SEP] } identifier[StatementDMQL] identifier[cs] operator[=] Keyword[new] identifier[StatementInsert] operator[SEP] identifier[session] , identifier[table] , identifier[columnMap] , identifier[columnCheckList] , identifier[queryExpression] , identifier[compileContext] operator[SEP] operator[SEP] Keyword[return] identifier[cs] operator[SEP] }
public static Dater of(Date date, String pattern) { return of(date).with(pattern); }
class class_name[name] begin[{] method[of, return_type[type[Dater]], modifier[public static], parameter[date, pattern]] begin[{] return[call[.of, parameter[member[.date]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Dater] identifier[of] operator[SEP] identifier[Date] identifier[date] , identifier[String] identifier[pattern] operator[SEP] { Keyword[return] identifier[of] operator[SEP] identifier[date] operator[SEP] operator[SEP] identifier[with] operator[SEP] identifier[pattern] operator[SEP] operator[SEP] }
private StringBuffer loadScriptTemplate() { try (InputStream is = ClassLoaderResourceUtils.getResourceAsStream(SCRIPT_TEMPLATE, this); StringWriter sw = new StringWriter()) { IOUtils.copy(is, sw); return sw.getBuffer(); } catch (IOException e) { Marker fatal = MarkerFactory.getMarker("FATAL"); LOGGER.error(fatal, "a serious error occurred when initializing MessageBundleScriptCreator"); throw new BundlingProcessException( "Classloading issues prevent loading the message template to be loaded. ", e); } }
class class_name[name] begin[{] method[loadScriptTemplate, return_type[type[StringBuffer]], modifier[private], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copy, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=getBuffer, postfix_operators=[], prefix_operators=[], qualifier=sw, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="FATAL")], member=getMarker, postfix_operators=[], prefix_operators=[], qualifier=MarkerFactory, selectors=[], type_arguments=None), name=fatal)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Marker, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fatal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="a serious error occurred when initializing MessageBundleScriptCreator")], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Classloading issues prevent loading the message template to be loaded. "), 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=BundlingProcessException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=is, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[MemberReference(member=SCRIPT_TEMPLATE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=getResourceAsStream, postfix_operators=[], prefix_operators=[], qualifier=ClassLoaderResourceUtils, selectors=[], type_arguments=None)), TryResource(annotations=[], modifiers=set(), name=sw, type=ReferenceType(arguments=None, dimensions=[], name=StringWriter, sub_type=None), value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringWriter, sub_type=None)))]) end[}] END[}]
Keyword[private] identifier[StringBuffer] identifier[loadScriptTemplate] operator[SEP] operator[SEP] { Keyword[try] operator[SEP] identifier[InputStream] identifier[is] operator[=] identifier[ClassLoaderResourceUtils] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[SCRIPT_TEMPLATE] , Keyword[this] operator[SEP] operator[SEP] identifier[StringWriter] identifier[sw] operator[=] Keyword[new] identifier[StringWriter] operator[SEP] operator[SEP] operator[SEP] { identifier[IOUtils] operator[SEP] identifier[copy] operator[SEP] identifier[is] , identifier[sw] operator[SEP] operator[SEP] Keyword[return] identifier[sw] operator[SEP] identifier[getBuffer] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[Marker] identifier[fatal] operator[=] identifier[MarkerFactory] operator[SEP] identifier[getMarker] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] identifier[fatal] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[BundlingProcessException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
@Reference( name = "carbon.metrics.management.service", service = MetricManagementService.class, cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC, unbind = "unsetMetricManagementService" ) protected void setMetricManagementService(MetricManagementService metricManagementService) { DataHolder.getInstance().setMetricManagementService(metricManagementService); }
class class_name[name] begin[{] method[setMetricManagementService, return_type[void], modifier[protected], parameter[metricManagementService]] begin[{] call[DataHolder.getInstance, parameter[]] end[}] END[}]
annotation[@] identifier[Reference] operator[SEP] identifier[name] operator[=] literal[String] , identifier[service] operator[=] identifier[MetricManagementService] operator[SEP] Keyword[class] , identifier[cardinality] operator[=] identifier[ReferenceCardinality] operator[SEP] identifier[MANDATORY] , identifier[policy] operator[=] identifier[ReferencePolicy] operator[SEP] identifier[DYNAMIC] , identifier[unbind] operator[=] literal[String] operator[SEP] Keyword[protected] Keyword[void] identifier[setMetricManagementService] operator[SEP] identifier[MetricManagementService] identifier[metricManagementService] operator[SEP] { identifier[DataHolder] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[setMetricManagementService] operator[SEP] identifier[metricManagementService] operator[SEP] operator[SEP] }
public EClass getIfcFlowFittingType() { if (ifcFlowFittingTypeEClass == null) { ifcFlowFittingTypeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(243); } return ifcFlowFittingTypeEClass; }
class class_name[name] begin[{] method[getIfcFlowFittingType, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcFlowFittingTypeEClass], ==, literal[null]]] begin[{] assign[member[.ifcFlowFittingTypeEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=243)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcFlowFittingTypeEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getIfcFlowFittingType] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcFlowFittingTypeEClass] operator[==] Other[null] operator[SEP] { identifier[ifcFlowFittingTypeEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[243] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcFlowFittingTypeEClass] operator[SEP] }
public static boolean isSubclass(Class a, Class b) { if (a == b) return false; if (!(b.isAssignableFrom(a))) return false; return true; }
class class_name[name] begin[{] method[isSubclass, return_type[type[boolean]], modifier[public static], parameter[a, b]] begin[{] if[binary_operation[member[.a], ==, member[.b]]] begin[{] return[literal[false]] else begin[{] None end[}] if[call[b.isAssignableFrom, parameter[member[.a]]]] begin[{] return[literal[false]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isSubclass] operator[SEP] identifier[Class] identifier[a] , identifier[Class] identifier[b] operator[SEP] { Keyword[if] operator[SEP] identifier[a] operator[==] identifier[b] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[b] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[a] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
private String getWelcomeFile(String pathInContext) throws MalformedURLException, IOException { if (welcomes == null) { return null; } for (int i = 0; i < welcomes.length; i++) { String welcomeInContext = URIUtil.addPaths(pathInContext, welcomes[i]); final URL url = httpContext.getResource(welcomeInContext); final Resource welcome = ResourceEx.newResource(url, true); if (welcome != null && welcome.exists()) { return welcomes[i]; } } return null; }
class class_name[name] begin[{] method[getWelcomeFile, return_type[type[String]], modifier[private], parameter[pathInContext]] begin[{] if[binary_operation[member[.welcomes], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=pathInContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=welcomes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=addPaths, postfix_operators=[], prefix_operators=[], qualifier=URIUtil, selectors=[], type_arguments=None), name=welcomeInContext)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=welcomeInContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResource, postfix_operators=[], prefix_operators=[], qualifier=httpContext, selectors=[], type_arguments=None), name=url)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=URL, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=newResource, postfix_operators=[], prefix_operators=[], qualifier=ResourceEx, selectors=[], type_arguments=None), name=welcome)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Resource, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=welcome, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=[], qualifier=welcome, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=welcomes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=welcomes, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[null]] end[}] END[}]
Keyword[private] identifier[String] identifier[getWelcomeFile] operator[SEP] identifier[String] identifier[pathInContext] operator[SEP] Keyword[throws] identifier[MalformedURLException] , identifier[IOException] { Keyword[if] operator[SEP] identifier[welcomes] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[welcomes] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[String] identifier[welcomeInContext] operator[=] identifier[URIUtil] operator[SEP] identifier[addPaths] operator[SEP] identifier[pathInContext] , identifier[welcomes] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[URL] identifier[url] operator[=] identifier[httpContext] operator[SEP] identifier[getResource] operator[SEP] identifier[welcomeInContext] operator[SEP] operator[SEP] Keyword[final] identifier[Resource] identifier[welcome] operator[=] identifier[ResourceEx] operator[SEP] identifier[newResource] operator[SEP] identifier[url] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[welcome] operator[!=] Other[null] operator[&&] identifier[welcome] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[welcomes] operator[SEP] identifier[i] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
@Override public BatchDetectSyntaxResult batchDetectSyntax(BatchDetectSyntaxRequest request) { request = beforeClientExecution(request); return executeBatchDetectSyntax(request); }
class class_name[name] begin[{] method[batchDetectSyntax, return_type[type[BatchDetectSyntaxResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeBatchDetectSyntax, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[BatchDetectSyntaxResult] identifier[batchDetectSyntax] operator[SEP] identifier[BatchDetectSyntaxRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeBatchDetectSyntax] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static base_response unset(nitro_service client, dnssoarec resource, String[] args) throws Exception{ dnssoarec unsetresource = new dnssoarec(); unsetresource.domain = resource.domain; return unsetresource.unset_resource(client,args); }
class class_name[name] begin[{] method[unset, return_type[type[base_response]], modifier[public static], parameter[client, resource, args]] begin[{] local_variable[type[dnssoarec], unsetresource] assign[member[unsetresource.domain], member[resource.domain]] return[call[unsetresource.unset_resource, parameter[member[.client], member[.args]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[unset] operator[SEP] identifier[nitro_service] identifier[client] , identifier[dnssoarec] identifier[resource] , identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] { identifier[dnssoarec] identifier[unsetresource] operator[=] Keyword[new] identifier[dnssoarec] operator[SEP] operator[SEP] operator[SEP] identifier[unsetresource] operator[SEP] identifier[domain] operator[=] identifier[resource] operator[SEP] identifier[domain] operator[SEP] Keyword[return] identifier[unsetresource] operator[SEP] identifier[unset_resource] operator[SEP] identifier[client] , identifier[args] operator[SEP] operator[SEP] }
public void onAuthentication(Authentication authentication, HttpServletRequest request, HttpServletResponse response) { boolean hadSessionAlready = request.getSession(false) != null; if (!hadSessionAlready && !alwaysCreateSession) { // Session fixation isn't a problem if there's no session return; } // Create new session if necessary HttpSession session = request.getSession(); if (hadSessionAlready && request.isRequestedSessionIdValid()) { String originalSessionId; String newSessionId; Object mutex = WebUtils.getSessionMutex(session); synchronized (mutex) { // We need to migrate to a new session originalSessionId = session.getId(); session = applySessionFixation(request); newSessionId = session.getId(); } if (originalSessionId.equals(newSessionId)) { logger.warn("Your servlet container did not change the session ID when a new session was created. You will" + " not be adequately protected against session-fixation attacks"); } onSessionChange(originalSessionId, session, authentication); } }
class class_name[name] begin[{] method[onAuthentication, return_type[void], modifier[public], parameter[authentication, request, response]] begin[{] local_variable[type[boolean], hadSessionAlready] if[binary_operation[member[.hadSessionAlready], &&, member[.alwaysCreateSession]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[HttpSession], session] if[binary_operation[member[.hadSessionAlready], &&, call[request.isRequestedSessionIdValid, parameter[]]]] begin[{] local_variable[type[String], originalSessionId] local_variable[type[String], newSessionId] local_variable[type[Object], mutex] SYNCHRONIZED[member[.mutex]] BEGIN[{] assign[member[.originalSessionId], call[session.getId, parameter[]]] assign[member[.session], call[.applySessionFixation, parameter[member[.request]]]] assign[member[.newSessionId], call[session.getId, parameter[]]] END[}] if[call[originalSessionId.equals, parameter[member[.newSessionId]]]] begin[{] call[logger.warn, parameter[binary_operation[literal["Your servlet container did not change the session ID when a new session was created. You will"], +, literal[" not be adequately protected against session-fixation attacks"]]]] else begin[{] None end[}] call[.onSessionChange, parameter[member[.originalSessionId], member[.session], member[.authentication]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[onAuthentication] operator[SEP] identifier[Authentication] identifier[authentication] , identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator[SEP] { Keyword[boolean] identifier[hadSessionAlready] operator[=] identifier[request] operator[SEP] identifier[getSession] operator[SEP] literal[boolean] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[hadSessionAlready] operator[&&] operator[!] identifier[alwaysCreateSession] operator[SEP] { Keyword[return] operator[SEP] } identifier[HttpSession] identifier[session] operator[=] identifier[request] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hadSessionAlready] operator[&&] identifier[request] operator[SEP] identifier[isRequestedSessionIdValid] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[originalSessionId] operator[SEP] identifier[String] identifier[newSessionId] operator[SEP] identifier[Object] identifier[mutex] operator[=] identifier[WebUtils] operator[SEP] identifier[getSessionMutex] operator[SEP] identifier[session] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[mutex] operator[SEP] { identifier[originalSessionId] operator[=] identifier[session] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[session] operator[=] identifier[applySessionFixation] operator[SEP] identifier[request] operator[SEP] operator[SEP] identifier[newSessionId] operator[=] identifier[session] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[originalSessionId] operator[SEP] identifier[equals] operator[SEP] identifier[newSessionId] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[onSessionChange] operator[SEP] identifier[originalSessionId] , identifier[session] , identifier[authentication] operator[SEP] operator[SEP] } }
private ValidationReport validateBondOrderSum(IAtom atom, IAtomContainer molecule) { ValidationReport report = new ValidationReport(); ValidationTest checkBondSum = new ValidationTest(atom, "The atom's total bond order is too high."); try { AtomTypeFactory structgenATF = AtomTypeFactory.getInstance( "org/openscience/cdk/dict/data/cdk-atom-types.owl", atom.getBuilder()); int bos = (int) molecule.getBondOrderSum(atom); IAtomType[] atomTypes = structgenATF.getAtomTypes(atom.getSymbol()); if (atomTypes.length == 0) { checkBondSum.setDetails("Cannot validate bond order sum for atom not in valency atom type list: " + atom.getSymbol()); report.addWarning(checkBondSum); } else { IAtomType failedOn = null; boolean foundMatchingAtomType = false; for (int j = 0; j < atomTypes.length; j++) { IAtomType type = atomTypes[j]; if (Objects.equals(atom.getFormalCharge(), type.getFormalCharge())) { foundMatchingAtomType = true; if (bos == type.getBondOrderSum()) { // skip this atom type } else { failedOn = atomTypes[j]; } } } if (foundMatchingAtomType) { report.addOK(checkBondSum); } else { if (failedOn != null) { checkBondSum.setDetails("Bond order exceeds the one allowed for atom " + atom.getSymbol() + " for which the total bond order is " + failedOn.getBondOrderSum()); } report.addError(checkBondSum); } } } catch (Exception exception) { logger.error("Error while performing atom bos validation: ", exception.getMessage()); logger.debug(exception); } return report; }
class class_name[name] begin[{] method[validateBondOrderSum, return_type[type[ValidationReport]], modifier[private], parameter[atom, molecule]] begin[{] local_variable[type[ValidationReport], report] local_variable[type[ValidationTest], checkBondSum] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org/openscience/cdk/dict/data/cdk-atom-types.owl"), MethodInvocation(arguments=[], member=getBuilder, postfix_operators=[], prefix_operators=[], qualifier=atom, selectors=[], type_arguments=None)], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=AtomTypeFactory, selectors=[], type_arguments=None), name=structgenATF)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AtomTypeFactory, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=atom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBondOrderSum, postfix_operators=[], prefix_operators=[], qualifier=molecule, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int)), name=bos)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSymbol, postfix_operators=[], prefix_operators=[], qualifier=atom, selectors=[], type_arguments=None)], member=getAtomTypes, postfix_operators=[], prefix_operators=[], qualifier=structgenATF, selectors=[], type_arguments=None), name=atomTypes)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=IAtomType, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=atomTypes, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=failedOn)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IAtomType, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=foundMatchingAtomType)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=atomTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=type)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IAtomType, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFormalCharge, postfix_operators=[], prefix_operators=[], qualifier=atom, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFormalCharge, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=Objects, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=foundMatchingAtomType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=bos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getBondOrderSum, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=failedOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=atomTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=atomTypes, 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=MemberReference(member=foundMatchingAtomType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=failedOn, 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=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Bond order exceeds the one allowed for atom "), operandr=MethodInvocation(arguments=[], member=getSymbol, postfix_operators=[], prefix_operators=[], qualifier=atom, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" for which the total bond order is "), operator=+), operandr=MethodInvocation(arguments=[], member=getBondOrderSum, postfix_operators=[], prefix_operators=[], qualifier=failedOn, selectors=[], type_arguments=None), operator=+)], member=setDetails, postfix_operators=[], prefix_operators=[], qualifier=checkBondSum, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=checkBondSum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addError, postfix_operators=[], prefix_operators=[], qualifier=report, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=checkBondSum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addOK, postfix_operators=[], prefix_operators=[], qualifier=report, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot validate bond order sum for atom not in valency atom type list: "), operandr=MethodInvocation(arguments=[], member=getSymbol, postfix_operators=[], prefix_operators=[], qualifier=atom, selectors=[], type_arguments=None), operator=+)], member=setDetails, postfix_operators=[], prefix_operators=[], qualifier=checkBondSum, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=checkBondSum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addWarning, postfix_operators=[], prefix_operators=[], qualifier=report, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while performing atom bos validation: "), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=exception, selectors=[], type_arguments=None)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.report]] end[}] END[}]
Keyword[private] identifier[ValidationReport] identifier[validateBondOrderSum] operator[SEP] identifier[IAtom] identifier[atom] , identifier[IAtomContainer] identifier[molecule] operator[SEP] { identifier[ValidationReport] identifier[report] operator[=] Keyword[new] identifier[ValidationReport] operator[SEP] operator[SEP] operator[SEP] identifier[ValidationTest] identifier[checkBondSum] operator[=] Keyword[new] identifier[ValidationTest] operator[SEP] identifier[atom] , literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[AtomTypeFactory] identifier[structgenATF] operator[=] identifier[AtomTypeFactory] operator[SEP] identifier[getInstance] operator[SEP] literal[String] , identifier[atom] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[bos] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[molecule] operator[SEP] identifier[getBondOrderSum] operator[SEP] identifier[atom] operator[SEP] operator[SEP] identifier[IAtomType] operator[SEP] operator[SEP] identifier[atomTypes] operator[=] identifier[structgenATF] operator[SEP] identifier[getAtomTypes] operator[SEP] identifier[atom] operator[SEP] identifier[getSymbol] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[atomTypes] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { identifier[checkBondSum] operator[SEP] identifier[setDetails] operator[SEP] literal[String] operator[+] identifier[atom] operator[SEP] identifier[getSymbol] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[report] operator[SEP] identifier[addWarning] operator[SEP] identifier[checkBondSum] operator[SEP] operator[SEP] } Keyword[else] { identifier[IAtomType] identifier[failedOn] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[foundMatchingAtomType] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[atomTypes] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[IAtomType] identifier[type] operator[=] identifier[atomTypes] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[atom] operator[SEP] identifier[getFormalCharge] operator[SEP] operator[SEP] , identifier[type] operator[SEP] identifier[getFormalCharge] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[foundMatchingAtomType] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[bos] operator[==] identifier[type] operator[SEP] identifier[getBondOrderSum] operator[SEP] operator[SEP] operator[SEP] { } Keyword[else] { identifier[failedOn] operator[=] identifier[atomTypes] operator[SEP] identifier[j] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[foundMatchingAtomType] operator[SEP] { identifier[report] operator[SEP] identifier[addOK] operator[SEP] identifier[checkBondSum] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[failedOn] operator[!=] Other[null] operator[SEP] { identifier[checkBondSum] operator[SEP] identifier[setDetails] operator[SEP] literal[String] operator[+] identifier[atom] operator[SEP] identifier[getSymbol] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[failedOn] operator[SEP] identifier[getBondOrderSum] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[report] operator[SEP] identifier[addError] operator[SEP] identifier[checkBondSum] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[Exception] identifier[exception] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[exception] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[exception] operator[SEP] operator[SEP] } Keyword[return] identifier[report] operator[SEP] }
public void setMemoryHandler(@NonNull MemoryHandler memoryHandler) { globalLock.writeLock().lock(); this.memoryHandler = memoryHandler; this.memoryHandler.init(configuration, this); globalLock.writeLock().unlock(); }
class class_name[name] begin[{] method[setMemoryHandler, return_type[void], modifier[public], parameter[memoryHandler]] begin[{] call[globalLock.writeLock, parameter[]] assign[THIS[member[None.memoryHandler]], member[.memoryHandler]] THIS[member[None.memoryHandler]call[None.init, parameter[member[.configuration], THIS[]]]] call[globalLock.writeLock, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setMemoryHandler] operator[SEP] annotation[@] identifier[NonNull] identifier[MemoryHandler] identifier[memoryHandler] operator[SEP] { identifier[globalLock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[memoryHandler] operator[=] identifier[memoryHandler] operator[SEP] Keyword[this] operator[SEP] identifier[memoryHandler] operator[SEP] identifier[init] operator[SEP] identifier[configuration] , Keyword[this] operator[SEP] operator[SEP] identifier[globalLock] operator[SEP] identifier[writeLock] operator[SEP] operator[SEP] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] }
public void free() { if (m_recordOwnerCollection != null) m_recordOwnerCollection.free(); m_recordOwnerCollection = null; if (m_application != null) m_application.removeTask(this); // Remove this session from the list }
class class_name[name] begin[{] method[free, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.m_recordOwnerCollection], !=, literal[null]]] begin[{] call[m_recordOwnerCollection.free, parameter[]] else begin[{] None end[}] assign[member[.m_recordOwnerCollection], literal[null]] if[binary_operation[member[.m_application], !=, literal[null]]] begin[{] call[m_application.removeTask, parameter[THIS[]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[free] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m_recordOwnerCollection] operator[!=] Other[null] operator[SEP] identifier[m_recordOwnerCollection] operator[SEP] identifier[free] operator[SEP] operator[SEP] operator[SEP] identifier[m_recordOwnerCollection] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[m_application] operator[!=] Other[null] operator[SEP] identifier[m_application] operator[SEP] identifier[removeTask] operator[SEP] Keyword[this] operator[SEP] operator[SEP] }
@CheckReturnValue @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> repeat() { return repeat(Long.MAX_VALUE); }
class class_name[name] begin[{] method[repeat, return_type[type[Flowable]], modifier[final public], parameter[]] begin[{] return[call[.repeat, parameter[member[Long.MAX_VALUE]]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[FULL] operator[SEP] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] identifier[Flowable] operator[<] identifier[T] operator[>] identifier[repeat] operator[SEP] operator[SEP] { Keyword[return] identifier[repeat] operator[SEP] identifier[Long] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] }
public static <T extends PopupPanel> T centerOn (T popup, int ypos) { boolean wasHidden = !popup.isShowing(); boolean wasVisible = popup.isVisible(); if (wasVisible) { popup.setVisible(false); } if (wasHidden) { popup.show(); } int left = (Window.getClientWidth() - popup.getOffsetWidth()) >> 1; int top = ypos - popup.getOffsetHeight()/2; // bound the popup into the visible browser area if possible if (popup.getOffsetHeight() < Window.getClientHeight()) { top = Math.min(Math.max(0, top), Window.getClientHeight() - popup.getOffsetHeight()); } popup.setPopupPosition(left, top); if (wasHidden) { popup.hide(); } if (wasVisible) { popup.setVisible(true); } return popup; }
class class_name[name] begin[{] method[centerOn, return_type[type[T]], modifier[public static], parameter[popup, ypos]] begin[{] local_variable[type[boolean], wasHidden] local_variable[type[boolean], wasVisible] if[member[.wasVisible]] begin[{] call[popup.setVisible, parameter[literal[false]]] else begin[{] None end[}] if[member[.wasHidden]] begin[{] call[popup.show, parameter[]] else begin[{] None end[}] local_variable[type[int], left] local_variable[type[int], top] if[binary_operation[call[popup.getOffsetHeight, parameter[]], <, call[Window.getClientHeight, parameter[]]]] begin[{] assign[member[.top], call[Math.min, parameter[call[Math.max, parameter[literal[0], member[.top]]], binary_operation[call[Window.getClientHeight, parameter[]], -, call[popup.getOffsetHeight, parameter[]]]]]] else begin[{] None end[}] call[popup.setPopupPosition, parameter[member[.left], member[.top]]] if[member[.wasHidden]] begin[{] call[popup.hide, parameter[]] else begin[{] None end[}] if[member[.wasVisible]] begin[{] call[popup.setVisible, parameter[literal[true]]] else begin[{] None end[}] return[member[.popup]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[PopupPanel] operator[>] identifier[T] identifier[centerOn] operator[SEP] identifier[T] identifier[popup] , Keyword[int] identifier[ypos] operator[SEP] { Keyword[boolean] identifier[wasHidden] operator[=] operator[!] identifier[popup] operator[SEP] identifier[isShowing] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[wasVisible] operator[=] identifier[popup] operator[SEP] identifier[isVisible] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[wasVisible] operator[SEP] { identifier[popup] operator[SEP] identifier[setVisible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[wasHidden] operator[SEP] { identifier[popup] operator[SEP] identifier[show] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[left] operator[=] operator[SEP] identifier[Window] operator[SEP] identifier[getClientWidth] operator[SEP] operator[SEP] operator[-] identifier[popup] operator[SEP] identifier[getOffsetWidth] operator[SEP] operator[SEP] operator[SEP] operator[>] operator[>] Other[1] operator[SEP] Keyword[int] identifier[top] operator[=] identifier[ypos] operator[-] identifier[popup] operator[SEP] identifier[getOffsetHeight] operator[SEP] operator[SEP] operator[/] Other[2] operator[SEP] Keyword[if] operator[SEP] identifier[popup] operator[SEP] identifier[getOffsetHeight] operator[SEP] operator[SEP] operator[<] identifier[Window] operator[SEP] identifier[getClientHeight] operator[SEP] operator[SEP] operator[SEP] { identifier[top] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[Math] operator[SEP] identifier[max] operator[SEP] Other[0] , identifier[top] operator[SEP] , identifier[Window] operator[SEP] identifier[getClientHeight] operator[SEP] operator[SEP] operator[-] identifier[popup] operator[SEP] identifier[getOffsetHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[popup] operator[SEP] identifier[setPopupPosition] operator[SEP] identifier[left] , identifier[top] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[wasHidden] operator[SEP] { identifier[popup] operator[SEP] identifier[hide] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[wasVisible] operator[SEP] { identifier[popup] operator[SEP] identifier[setVisible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[return] identifier[popup] operator[SEP] }
@Override public int doStartTag() throws JspException { ServletRequest req = pageContext.getRequest(); // This will always be true if the page is called through OpenCms if (!CmsFlexController.isCmsRequest(req)) { return SKIP_BODY; } if (getJs() == null) { if (isDynamic()) { // in case we want to include the needed js functions try { pageContext.getOut().print("<script type='text/javascript' src='" + CmsWorkplace.getSkinUri() + VFS_PATH_LOAD_JS + "' ></script>"); } catch (Exception ex) { if (LOG.isErrorEnabled()) { LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, "jquery"), ex); } throw new JspException(ex); } } return SKIP_BODY; } // get the server prefix CmsObject cms = CmsFlexController.getCmsObject(req); // first handle js file String path = VFS_PATH_JQUERY; if (cms.getRequestContext().getCurrentProject().isOnlineProject()) { // online path += VFS_PATH_PACKED; } else { // offline path += VFS_PATH_UNPACKED; } String file = path + getJs() + EXTENSION_JS; try { cms.readResource(CmsWorkplace.VFS_PATH_RESOURCES + file); if (isDynamic()) { pageContext.getOut().print("<script type='text/javascript'>load_script('" + CmsWorkplace.getSkinUri() + file + "', 'js');</script>"); } else { pageContext.getOut().print( "<script type='text/javascript' src='" + CmsWorkplace.getSkinUri() + file + "' ></script>"); } } catch (Exception ex) { if (LOG.isErrorEnabled()) { LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, "jquery"), ex); } throw new JspException(ex); } if (getCss() == null) { return SKIP_BODY; } // now handle css file path = VFS_PATH_CSS; file = path + getCss() + EXTENSION_CSS; try { cms.readResource(CmsWorkplace.VFS_PATH_RESOURCES + file); pageContext.getOut().println(); if (isDynamic()) { pageContext.getOut().print("<script type='text/javascript'>load_script('" + CmsWorkplace.getSkinUri() + file + "', 'css');</script>"); } else { pageContext.getOut().print( "<link href='" + CmsWorkplace.getSkinUri() + file + "' rel='stylesheet' type='text/css' >"); } } catch (Exception ex) { if (LOG.isErrorEnabled()) { LOG.error(Messages.get().getBundle().key(Messages.ERR_PROCESS_TAG_1, "jquery"), ex); } throw new JspException(ex); } return SKIP_BODY; }
class class_name[name] begin[{] method[doStartTag, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[ServletRequest], req] if[call[CmsFlexController.isCmsRequest, parameter[member[.req]]]] begin[{] return[member[.SKIP_BODY]] else begin[{] None end[}] if[binary_operation[call[.getJs, parameter[]], ==, literal[null]]] begin[{] if[call[.isDynamic, parameter[]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getOut, postfix_operators=[], prefix_operators=[], qualifier=pageContext, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<script type='text/javascript' src='"), operandr=MethodInvocation(arguments=[], member=getSkinUri, postfix_operators=[], prefix_operators=[], qualifier=CmsWorkplace, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=VFS_PATH_LOAD_JS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' ></script>"), operator=+)], member=print, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isErrorEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[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=ERR_PROCESS_TAG_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="jquery")], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JspException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[member[.SKIP_BODY]] else begin[{] None end[}] local_variable[type[CmsObject], cms] local_variable[type[String], path] if[call[cms.getRequestContext, parameter[]]] begin[{] assign[member[.path], member[.VFS_PATH_PACKED]] else begin[{] assign[member[.path], member[.VFS_PATH_UNPACKED]] end[}] local_variable[type[String], file] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=VFS_PATH_RESOURCES, postfix_operators=[], prefix_operators=[], qualifier=CmsWorkplace, selectors=[]), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=readResource, postfix_operators=[], prefix_operators=[], qualifier=cms, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDynamic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getOut, postfix_operators=[], prefix_operators=[], qualifier=pageContext, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<script type='text/javascript' src='"), operandr=MethodInvocation(arguments=[], member=getSkinUri, postfix_operators=[], prefix_operators=[], qualifier=CmsWorkplace, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' ></script>"), operator=+)], member=print, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getOut, postfix_operators=[], prefix_operators=[], qualifier=pageContext, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<script type='text/javascript'>load_script('"), operandr=MethodInvocation(arguments=[], member=getSkinUri, postfix_operators=[], prefix_operators=[], qualifier=CmsWorkplace, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="', 'js');</script>"), operator=+)], member=print, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isErrorEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[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=ERR_PROCESS_TAG_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="jquery")], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JspException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) if[binary_operation[call[.getCss, parameter[]], ==, literal[null]]] begin[{] return[member[.SKIP_BODY]] else begin[{] None end[}] assign[member[.path], member[.VFS_PATH_CSS]] assign[member[.file], binary_operation[binary_operation[member[.path], +, call[.getCss, parameter[]]], +, member[.EXTENSION_CSS]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=VFS_PATH_RESOURCES, postfix_operators=[], prefix_operators=[], qualifier=CmsWorkplace, selectors=[]), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=readResource, postfix_operators=[], prefix_operators=[], qualifier=cms, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getOut, postfix_operators=[], prefix_operators=[], qualifier=pageContext, selectors=[MethodInvocation(arguments=[], member=println, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDynamic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getOut, postfix_operators=[], prefix_operators=[], qualifier=pageContext, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<link href='"), operandr=MethodInvocation(arguments=[], member=getSkinUri, postfix_operators=[], prefix_operators=[], qualifier=CmsWorkplace, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' rel='stylesheet' type='text/css' >"), operator=+)], member=print, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getOut, postfix_operators=[], prefix_operators=[], qualifier=pageContext, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<script type='text/javascript'>load_script('"), operandr=MethodInvocation(arguments=[], member=getSkinUri, postfix_operators=[], prefix_operators=[], qualifier=CmsWorkplace, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="', 'css');</script>"), operator=+)], member=print, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isErrorEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[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=ERR_PROCESS_TAG_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="jquery")], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JspException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.SKIP_BODY]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[doStartTag] operator[SEP] operator[SEP] Keyword[throws] identifier[JspException] { identifier[ServletRequest] identifier[req] operator[=] identifier[pageContext] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[CmsFlexController] operator[SEP] identifier[isCmsRequest] operator[SEP] identifier[req] operator[SEP] operator[SEP] { Keyword[return] identifier[SKIP_BODY] operator[SEP] } Keyword[if] operator[SEP] identifier[getJs] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[isDynamic] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[pageContext] operator[SEP] identifier[getOut] operator[SEP] operator[SEP] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[CmsWorkplace] operator[SEP] identifier[getSkinUri] operator[SEP] operator[SEP] operator[+] identifier[VFS_PATH_LOAD_JS] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isErrorEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] 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[ERR_PROCESS_TAG_1] , literal[String] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[JspException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } } Keyword[return] identifier[SKIP_BODY] operator[SEP] } identifier[CmsObject] identifier[cms] operator[=] identifier[CmsFlexController] operator[SEP] identifier[getCmsObject] operator[SEP] identifier[req] operator[SEP] operator[SEP] identifier[String] identifier[path] operator[=] identifier[VFS_PATH_JQUERY] operator[SEP] Keyword[if] operator[SEP] identifier[cms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getCurrentProject] operator[SEP] operator[SEP] operator[SEP] identifier[isOnlineProject] operator[SEP] operator[SEP] operator[SEP] { identifier[path] operator[+=] identifier[VFS_PATH_PACKED] operator[SEP] } Keyword[else] { identifier[path] operator[+=] identifier[VFS_PATH_UNPACKED] operator[SEP] } identifier[String] identifier[file] operator[=] identifier[path] operator[+] identifier[getJs] operator[SEP] operator[SEP] operator[+] identifier[EXTENSION_JS] operator[SEP] Keyword[try] { identifier[cms] operator[SEP] identifier[readResource] operator[SEP] identifier[CmsWorkplace] operator[SEP] identifier[VFS_PATH_RESOURCES] operator[+] identifier[file] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isDynamic] operator[SEP] operator[SEP] operator[SEP] { identifier[pageContext] operator[SEP] identifier[getOut] operator[SEP] operator[SEP] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[CmsWorkplace] operator[SEP] identifier[getSkinUri] operator[SEP] operator[SEP] operator[+] identifier[file] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[pageContext] operator[SEP] identifier[getOut] operator[SEP] operator[SEP] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[CmsWorkplace] operator[SEP] identifier[getSkinUri] operator[SEP] operator[SEP] operator[+] identifier[file] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isErrorEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] 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[ERR_PROCESS_TAG_1] , literal[String] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[JspException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getCss] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[SKIP_BODY] operator[SEP] } identifier[path] operator[=] identifier[VFS_PATH_CSS] operator[SEP] identifier[file] operator[=] identifier[path] operator[+] identifier[getCss] operator[SEP] operator[SEP] operator[+] identifier[EXTENSION_CSS] operator[SEP] Keyword[try] { identifier[cms] operator[SEP] identifier[readResource] operator[SEP] identifier[CmsWorkplace] operator[SEP] identifier[VFS_PATH_RESOURCES] operator[+] identifier[file] operator[SEP] operator[SEP] identifier[pageContext] operator[SEP] identifier[getOut] operator[SEP] operator[SEP] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isDynamic] operator[SEP] operator[SEP] operator[SEP] { identifier[pageContext] operator[SEP] identifier[getOut] operator[SEP] operator[SEP] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[CmsWorkplace] operator[SEP] identifier[getSkinUri] operator[SEP] operator[SEP] operator[+] identifier[file] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[pageContext] operator[SEP] identifier[getOut] operator[SEP] operator[SEP] operator[SEP] identifier[print] operator[SEP] literal[String] operator[+] identifier[CmsWorkplace] operator[SEP] identifier[getSkinUri] operator[SEP] operator[SEP] operator[+] identifier[file] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isErrorEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] 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[ERR_PROCESS_TAG_1] , literal[String] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[JspException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } Keyword[return] identifier[SKIP_BODY] operator[SEP] }
public boolean checkRootingDevice() { boolean isRootingFlag = false; BufferedReader reader = null; try { Process process = Runtime.getRuntime().exec("find / -name su"); reader = new BufferedReader(new InputStreamReader( process.getInputStream())); String result = reader.readLine(); if (result == null) { Log.d(TAG, "Failed to execute find command to check if a file which is evidence of root exists"); throw new RuntimeException("Unable to check if device is rooted"); } if (result.contains("/su") == true) { isRootingFlag = true; } } catch (Exception e) { isRootingFlag = false; } finally { if (reader != null) { try { reader.close(); } catch (IOException e) { Log.d(TAG, "Error occured while closing input stream"); } } } if (!isRootingFlag) { isRootingFlag = checkRootingFiles(PLACES); } return isRootingFlag; }
class class_name[name] begin[{] method[checkRootingDevice, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[boolean], isRootingFlag] local_variable[type[BufferedReader], reader] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRuntime, postfix_operators=[], prefix_operators=[], qualifier=Runtime, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="find / -name su")], member=exec, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=process)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Process, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=process, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamReader, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedReader, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=result, 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=TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to execute find command to check if a file which is evidence of root exists")], member=d, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to check if device is rooted")], 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)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/su")], member=contains, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isRootingFlag, 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=Assignment(expressionl=MemberReference(member=isRootingFlag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error occured while closing input stream")], member=d, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)]))], label=None, resources=None) if[member[.isRootingFlag]] begin[{] assign[member[.isRootingFlag], call[.checkRootingFiles, parameter[member[.PLACES]]]] else begin[{] None end[}] return[member[.isRootingFlag]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[checkRootingDevice] operator[SEP] operator[SEP] { Keyword[boolean] identifier[isRootingFlag] operator[=] literal[boolean] operator[SEP] identifier[BufferedReader] identifier[reader] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[Process] identifier[process] operator[=] identifier[Runtime] operator[SEP] identifier[getRuntime] operator[SEP] operator[SEP] operator[SEP] identifier[exec] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[reader] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[process] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[result] operator[=] identifier[reader] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { identifier[Log] operator[SEP] identifier[d] operator[SEP] identifier[TAG] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[==] literal[boolean] operator[SEP] { identifier[isRootingFlag] operator[=] literal[boolean] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[isRootingFlag] operator[=] literal[boolean] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[reader] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[Log] operator[SEP] identifier[d] operator[SEP] identifier[TAG] , literal[String] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] operator[!] identifier[isRootingFlag] operator[SEP] { identifier[isRootingFlag] operator[=] identifier[checkRootingFiles] operator[SEP] identifier[PLACES] operator[SEP] operator[SEP] } Keyword[return] identifier[isRootingFlag] operator[SEP] }
public void starting() throws Exception { this.logger.fine( "iPojo registers REST and icons servlets related to Roboconf's DM." ); // Register the servlet Dictionary<String,String> initParams = new Hashtable<> (); initParams.put( "servlet-name", "Roboconf Web Extension (Kibana)" ); this.servlet = new KibanaExtensionServlet( this.manager ); this.servlet.setAgentDashBoardUrl( this.agentDashBoardUrl ); this.servlet.setAppDashBoardUrl( this.appDashBoardUrl ); this.httpService.registerServlet( CONTEXT, this.servlet, initParams, null ); // Register a new preference this.manager.preferencesMngr().addToList( IPreferencesMngr.WEB_EXTENSIONS, CONTEXT ); }
class class_name[name] begin[{] method[starting, return_type[void], modifier[public], parameter[]] begin[{] THIS[member[None.logger]call[None.fine, parameter[literal["iPojo registers REST and icons servlets related to Roboconf's DM."]]]] local_variable[type[Dictionary], initParams] call[initParams.put, parameter[literal["servlet-name"], literal["Roboconf Web Extension (Kibana)"]]] assign[THIS[member[None.servlet]], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=manager, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=KibanaExtensionServlet, sub_type=None))] THIS[member[None.servlet]call[None.setAgentDashBoardUrl, parameter[THIS[member[None.agentDashBoardUrl]]]]] THIS[member[None.servlet]call[None.setAppDashBoardUrl, parameter[THIS[member[None.appDashBoardUrl]]]]] THIS[member[None.httpService]call[None.registerServlet, parameter[member[.CONTEXT], THIS[member[None.servlet]], member[.initParams], literal[null]]]] THIS[member[None.manager]call[None.preferencesMngr, parameter[]]call[None.addToList, parameter[member[IPreferencesMngr.WEB_EXTENSIONS], member[.CONTEXT]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[starting] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[fine] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Dictionary] operator[<] identifier[String] , identifier[String] operator[>] identifier[initParams] operator[=] Keyword[new] identifier[Hashtable] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[initParams] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[servlet] operator[=] Keyword[new] identifier[KibanaExtensionServlet] operator[SEP] Keyword[this] operator[SEP] identifier[manager] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[servlet] operator[SEP] identifier[setAgentDashBoardUrl] operator[SEP] Keyword[this] operator[SEP] identifier[agentDashBoardUrl] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[servlet] operator[SEP] identifier[setAppDashBoardUrl] operator[SEP] Keyword[this] operator[SEP] identifier[appDashBoardUrl] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[httpService] operator[SEP] identifier[registerServlet] operator[SEP] identifier[CONTEXT] , Keyword[this] operator[SEP] identifier[servlet] , identifier[initParams] , Other[null] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[manager] operator[SEP] identifier[preferencesMngr] operator[SEP] operator[SEP] operator[SEP] identifier[addToList] operator[SEP] identifier[IPreferencesMngr] operator[SEP] identifier[WEB_EXTENSIONS] , identifier[CONTEXT] operator[SEP] operator[SEP] }
@Override public int deleteIds(Collection<FeatureTileLinkKey> idCollection) throws SQLException { int count = 0; if (idCollection != null) { for (FeatureTileLinkKey id : idCollection) { count += deleteById(id); } } return count; }
class class_name[name] begin[{] method[deleteIds, return_type[type[int]], modifier[public], parameter[idCollection]] begin[{] local_variable[type[int], count] if[binary_operation[member[.idCollection], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deleteById, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=idCollection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=id)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FeatureTileLinkKey, sub_type=None))), label=None) else begin[{] None end[}] return[member[.count]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[deleteIds] operator[SEP] identifier[Collection] operator[<] identifier[FeatureTileLinkKey] operator[>] identifier[idCollection] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[idCollection] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[FeatureTileLinkKey] identifier[id] operator[:] identifier[idCollection] operator[SEP] { identifier[count] operator[+=] identifier[deleteById] operator[SEP] identifier[id] operator[SEP] operator[SEP] } } Keyword[return] identifier[count] operator[SEP] }
public void resize (float width, float height) { if (canvas != null) canvas.close(); canvas = gfx.createCanvas(width, height); }
class class_name[name] begin[{] method[resize, return_type[void], modifier[public], parameter[width, height]] begin[{] if[binary_operation[member[.canvas], !=, literal[null]]] begin[{] call[canvas.close, parameter[]] else begin[{] None end[}] assign[member[.canvas], call[gfx.createCanvas, parameter[member[.width], member[.height]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[resize] operator[SEP] Keyword[float] identifier[width] , Keyword[float] identifier[height] operator[SEP] { Keyword[if] operator[SEP] identifier[canvas] operator[!=] Other[null] operator[SEP] identifier[canvas] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[canvas] operator[=] identifier[gfx] operator[SEP] identifier[createCanvas] operator[SEP] identifier[width] , identifier[height] operator[SEP] operator[SEP] }
public void pullImageWithPolicy(String image, ImagePullManager pullManager, RegistryConfig registryConfig, boolean hasImage) throws DockerAccessException, MojoExecutionException { // Already pulled, so we don't need to take care if (pullManager.hasAlreadyPulled(image)) { return; } // Check if a pull is required if (!imageRequiresPull(hasImage, pullManager.getImagePullPolicy(), image)) { return; } ImageName imageName = new ImageName(image); long time = System.currentTimeMillis(); String actualRegistry = EnvUtil.firstRegistryOf( imageName.getRegistry(), registryConfig.getRegistry()); docker.pullImage(imageName.getFullName(), createAuthConfig(false, null, actualRegistry, registryConfig), actualRegistry); log.info("Pulled %s in %s", imageName.getFullName(), EnvUtil.formatDurationTill(time)); pullManager.pulled(image); if (actualRegistry != null && !imageName.hasRegistry()) { // If coming from a registry which was not contained in the original name, add a tag from the // full name with the registry to the short name with no-registry. docker.tag(imageName.getFullName(actualRegistry), image, false); } }
class class_name[name] begin[{] method[pullImageWithPolicy, return_type[void], modifier[public], parameter[image, pullManager, registryConfig, hasImage]] begin[{] if[call[pullManager.hasAlreadyPulled, parameter[member[.image]]]] begin[{] return[None] else begin[{] None end[}] if[call[.imageRequiresPull, parameter[member[.hasImage], call[pullManager.getImagePullPolicy, parameter[]], member[.image]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[ImageName], imageName] local_variable[type[long], time] local_variable[type[String], actualRegistry] call[docker.pullImage, parameter[call[imageName.getFullName, parameter[]], call[.createAuthConfig, parameter[literal[false], literal[null], member[.actualRegistry], member[.registryConfig]]], member[.actualRegistry]]] call[log.info, parameter[literal["Pulled %s in %s"], call[imageName.getFullName, parameter[]], call[EnvUtil.formatDurationTill, parameter[member[.time]]]]] call[pullManager.pulled, parameter[member[.image]]] if[binary_operation[binary_operation[member[.actualRegistry], !=, literal[null]], &&, call[imageName.hasRegistry, parameter[]]]] begin[{] call[docker.tag, parameter[call[imageName.getFullName, parameter[member[.actualRegistry]]], member[.image], literal[false]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[pullImageWithPolicy] operator[SEP] identifier[String] identifier[image] , identifier[ImagePullManager] identifier[pullManager] , identifier[RegistryConfig] identifier[registryConfig] , Keyword[boolean] identifier[hasImage] operator[SEP] Keyword[throws] identifier[DockerAccessException] , identifier[MojoExecutionException] { Keyword[if] operator[SEP] identifier[pullManager] operator[SEP] identifier[hasAlreadyPulled] operator[SEP] identifier[image] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[imageRequiresPull] operator[SEP] identifier[hasImage] , identifier[pullManager] operator[SEP] identifier[getImagePullPolicy] operator[SEP] operator[SEP] , identifier[image] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[ImageName] identifier[imageName] operator[=] Keyword[new] identifier[ImageName] operator[SEP] identifier[image] operator[SEP] operator[SEP] Keyword[long] identifier[time] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[actualRegistry] operator[=] identifier[EnvUtil] operator[SEP] identifier[firstRegistryOf] operator[SEP] identifier[imageName] operator[SEP] identifier[getRegistry] operator[SEP] operator[SEP] , identifier[registryConfig] operator[SEP] identifier[getRegistry] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[docker] operator[SEP] identifier[pullImage] operator[SEP] identifier[imageName] operator[SEP] identifier[getFullName] operator[SEP] operator[SEP] , identifier[createAuthConfig] operator[SEP] literal[boolean] , Other[null] , identifier[actualRegistry] , identifier[registryConfig] operator[SEP] , identifier[actualRegistry] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[imageName] operator[SEP] identifier[getFullName] operator[SEP] operator[SEP] , identifier[EnvUtil] operator[SEP] identifier[formatDurationTill] operator[SEP] identifier[time] operator[SEP] operator[SEP] operator[SEP] identifier[pullManager] operator[SEP] identifier[pulled] operator[SEP] identifier[image] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[actualRegistry] operator[!=] Other[null] operator[&&] operator[!] identifier[imageName] operator[SEP] identifier[hasRegistry] operator[SEP] operator[SEP] operator[SEP] { identifier[docker] operator[SEP] identifier[tag] operator[SEP] identifier[imageName] operator[SEP] identifier[getFullName] operator[SEP] identifier[actualRegistry] operator[SEP] , identifier[image] , literal[boolean] operator[SEP] operator[SEP] } }
@GET @Path("search") @Consumes(Servlets.JSON_MEDIA_TYPE) @Produces(Servlets.JSON_MEDIA_TYPE) public Response search(@QueryParam("query") String query, @DefaultValue(LIMIT_OFFSET_DEFAULT) @QueryParam("limit") int limit, @DefaultValue(LIMIT_OFFSET_DEFAULT) @QueryParam("offset") int offset) { boolean dslQueryFailed = false; Response response = null; try { response = searchUsingQueryDSL(query, limit, offset); if (response.getStatus() != Response.Status.OK.getStatusCode()) { dslQueryFailed = true; } } catch (Exception e) { if (LOG.isDebugEnabled()) { LOG.debug("Error while running DSL. Switching to fulltext for query {}", query, e); } dslQueryFailed = true; } if ( dslQueryFailed ) { response = searchUsingFullText(query, limit, offset); } return response; }
class class_name[name] begin[{] method[search, return_type[type[Response]], modifier[public], parameter[query, limit, offset]] begin[{] local_variable[type[boolean], dslQueryFailed] local_variable[type[Response], response] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=limit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=searchUsingQueryDSL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getStatusCode, postfix_operators=[], prefix_operators=[], qualifier=Response.Status.OK, selectors=[], type_arguments=None), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dslQueryFailed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while running DSL. Switching to fulltext for query {}"), MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dslQueryFailed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[member[.dslQueryFailed]] begin[{] assign[member[.response], call[.searchUsingFullText, parameter[member[.query], member[.limit], member[.offset]]]] else begin[{] None end[}] return[member[.response]] end[}] END[}]
annotation[@] identifier[GET] annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Consumes] operator[SEP] identifier[Servlets] operator[SEP] identifier[JSON_MEDIA_TYPE] operator[SEP] annotation[@] identifier[Produces] operator[SEP] identifier[Servlets] operator[SEP] identifier[JSON_MEDIA_TYPE] operator[SEP] Keyword[public] identifier[Response] identifier[search] operator[SEP] annotation[@] identifier[QueryParam] operator[SEP] literal[String] operator[SEP] identifier[String] identifier[query] , annotation[@] identifier[DefaultValue] operator[SEP] identifier[LIMIT_OFFSET_DEFAULT] operator[SEP] annotation[@] identifier[QueryParam] operator[SEP] literal[String] operator[SEP] Keyword[int] identifier[limit] , annotation[@] identifier[DefaultValue] operator[SEP] identifier[LIMIT_OFFSET_DEFAULT] operator[SEP] annotation[@] identifier[QueryParam] operator[SEP] literal[String] operator[SEP] Keyword[int] identifier[offset] operator[SEP] { Keyword[boolean] identifier[dslQueryFailed] operator[=] literal[boolean] operator[SEP] identifier[Response] identifier[response] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[response] operator[=] identifier[searchUsingQueryDSL] operator[SEP] identifier[query] , identifier[limit] , identifier[offset] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[response] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[!=] identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[OK] operator[SEP] identifier[getStatusCode] operator[SEP] operator[SEP] operator[SEP] { identifier[dslQueryFailed] operator[=] literal[boolean] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[query] , identifier[e] operator[SEP] operator[SEP] } identifier[dslQueryFailed] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[dslQueryFailed] operator[SEP] { identifier[response] operator[=] identifier[searchUsingFullText] operator[SEP] identifier[query] , identifier[limit] , identifier[offset] operator[SEP] operator[SEP] } Keyword[return] identifier[response] operator[SEP] }
@Mode(TestMode.EXPERIMENTAL) @Test @AllowedFFDC // The tested exceptions cause FFDC so we have to allow for this. public void runFreshMasterBranchTck() throws Exception { File repoParent = new File(GIT_REPO_PARENT_DIR); File repo = new File(repoParent, GIT_REPO_NAME); MvnUtils.mvnCleanInstall(repo); HashMap<String, String> addedProps = new HashMap<String, String>(); String apiVersion = MvnUtils.getApiSpecVersionAfterClone(repo); System.out.println("Queried api.version is : " + apiVersion); addedProps.put(MvnUtils.API_VERSION, apiVersion); String tckVersion = MvnUtils.getTckVersionAfterClone(repo); System.out.println("Queried tck.version is : " + tckVersion); addedProps.put(MvnUtils.TCK_VERSION, tckVersion); // A command line -Dprop=value actually gets to here as a environment variable... String implVersion = System.getenv("impl.version"); System.out.println("Passed in impl.version is : " + implVersion); addedProps.put(MvnUtils.IMPL_VERSION, implVersion); // We store a set of keys that we want the system to add "1.1" or "1.2" etc to // depending on the pom.xml contents. HashSet<String> versionedLibraries = new HashSet<>(Arrays.asList("com.ibm.websphere.org.eclipse.microprofile.config")); String backStopImpl = "1.4"; // Used if there is no impl matching the spec/pom.xml <version> AND impl.version is not set addedProps.put(MvnUtils.BACKSTOP_VERSION, backStopImpl); MvnUtils.runTCKMvnCmd(server, "com.ibm.ws.microprofile.config_fat_tck", this .getClass() + ":launchConfigTCK", MvnUtils.DEFAULT_SUITE_FILENAME, addedProps, versionedLibraries); }
class class_name[name] begin[{] method[runFreshMasterBranchTck, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[File], repoParent] local_variable[type[File], repo] call[MvnUtils.mvnCleanInstall, parameter[member[.repo]]] local_variable[type[HashMap], addedProps] local_variable[type[String], apiVersion] call[System.out.println, parameter[binary_operation[literal["Queried api.version is : "], +, member[.apiVersion]]]] call[addedProps.put, parameter[member[MvnUtils.API_VERSION], member[.apiVersion]]] local_variable[type[String], tckVersion] call[System.out.println, parameter[binary_operation[literal["Queried tck.version is : "], +, member[.tckVersion]]]] call[addedProps.put, parameter[member[MvnUtils.TCK_VERSION], member[.tckVersion]]] local_variable[type[String], implVersion] call[System.out.println, parameter[binary_operation[literal["Passed in impl.version is : "], +, member[.implVersion]]]] call[addedProps.put, parameter[member[MvnUtils.IMPL_VERSION], member[.implVersion]]] local_variable[type[HashSet], versionedLibraries] local_variable[type[String], backStopImpl] call[addedProps.put, parameter[member[MvnUtils.BACKSTOP_VERSION], member[.backStopImpl]]] call[MvnUtils.runTCKMvnCmd, parameter[member[.server], literal["com.ibm.ws.microprofile.config_fat_tck"], binary_operation[THIS[call[None.getClass, parameter[]]], +, literal[":launchConfigTCK"]], member[MvnUtils.DEFAULT_SUITE_FILENAME], member[.addedProps], member[.versionedLibraries]]] end[}] END[}]
annotation[@] identifier[Mode] operator[SEP] identifier[TestMode] operator[SEP] identifier[EXPERIMENTAL] operator[SEP] annotation[@] identifier[Test] annotation[@] identifier[AllowedFFDC] Keyword[public] Keyword[void] identifier[runFreshMasterBranchTck] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[File] identifier[repoParent] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[GIT_REPO_PARENT_DIR] operator[SEP] operator[SEP] identifier[File] identifier[repo] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[repoParent] , identifier[GIT_REPO_NAME] operator[SEP] operator[SEP] identifier[MvnUtils] operator[SEP] identifier[mvnCleanInstall] operator[SEP] identifier[repo] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[addedProps] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[apiVersion] operator[=] identifier[MvnUtils] operator[SEP] identifier[getApiSpecVersionAfterClone] operator[SEP] identifier[repo] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[apiVersion] operator[SEP] operator[SEP] identifier[addedProps] operator[SEP] identifier[put] operator[SEP] identifier[MvnUtils] operator[SEP] identifier[API_VERSION] , identifier[apiVersion] operator[SEP] operator[SEP] identifier[String] identifier[tckVersion] operator[=] identifier[MvnUtils] operator[SEP] identifier[getTckVersionAfterClone] operator[SEP] identifier[repo] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[tckVersion] operator[SEP] operator[SEP] identifier[addedProps] operator[SEP] identifier[put] operator[SEP] identifier[MvnUtils] operator[SEP] identifier[TCK_VERSION] , identifier[tckVersion] operator[SEP] operator[SEP] identifier[String] identifier[implVersion] operator[=] identifier[System] operator[SEP] identifier[getenv] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[implVersion] operator[SEP] operator[SEP] identifier[addedProps] operator[SEP] identifier[put] operator[SEP] identifier[MvnUtils] operator[SEP] identifier[IMPL_VERSION] , identifier[implVersion] operator[SEP] operator[SEP] identifier[HashSet] operator[<] identifier[String] operator[>] identifier[versionedLibraries] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[backStopImpl] operator[=] literal[String] operator[SEP] identifier[addedProps] operator[SEP] identifier[put] operator[SEP] identifier[MvnUtils] operator[SEP] identifier[BACKSTOP_VERSION] , identifier[backStopImpl] operator[SEP] operator[SEP] identifier[MvnUtils] operator[SEP] identifier[runTCKMvnCmd] operator[SEP] identifier[server] , literal[String] , Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[MvnUtils] operator[SEP] identifier[DEFAULT_SUITE_FILENAME] , identifier[addedProps] , identifier[versionedLibraries] operator[SEP] operator[SEP] }
public String getJavaCreateString() { StringBuilder sb = new StringBuilder(); sb.append("new com.caucho.v5.make.DependencyList()"); for (int i = 0; i < _dependencyList.size(); i++) { sb.append(".add("); sb.append(_dependencyList.get(i).getJavaCreateString()); sb.append(")"); } return sb.toString(); }
class class_name[name] begin[{] method[getJavaCreateString, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], sb] call[sb.append, parameter[literal["new com.caucho.v5.make.DependencyList()"]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".add(")], 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=_dependencyList, selectors=[MethodInvocation(arguments=[], member=getJavaCreateString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=_dependencyList, 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[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getJavaCreateString] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[_dependencyList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[_dependencyList] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getJavaCreateString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static SoapAttachment parseAttachment(Element attachmentElement) { SoapAttachment soapAttachment = new SoapAttachment(); if (attachmentElement.hasAttribute("content-id")) { soapAttachment.setContentId(attachmentElement.getAttribute("content-id")); } if (attachmentElement.hasAttribute("content-type")) { soapAttachment.setContentType(attachmentElement.getAttribute("content-type")); } if (attachmentElement.hasAttribute("charset-name")) { soapAttachment.setCharsetName(attachmentElement.getAttribute("charset-name")); } if (attachmentElement.hasAttribute("mtom-inline")) { soapAttachment.setMtomInline(Boolean.parseBoolean(attachmentElement.getAttribute("mtom-inline"))); } if (attachmentElement.hasAttribute("encoding-type")) { soapAttachment.setEncodingType(attachmentElement.getAttribute("encoding-type")); } Element attachmentDataElement = DomUtils.getChildElementByTagName(attachmentElement, "data"); if (attachmentDataElement != null) { soapAttachment.setContent(DomUtils.getTextValue(attachmentDataElement)); } Element attachmentResourceElement = DomUtils.getChildElementByTagName(attachmentElement, "resource"); if (attachmentResourceElement != null) { soapAttachment.setContentResourcePath(attachmentResourceElement.getAttribute("file")); } return soapAttachment; }
class class_name[name] begin[{] method[parseAttachment, return_type[type[SoapAttachment]], modifier[public static], parameter[attachmentElement]] begin[{] local_variable[type[SoapAttachment], soapAttachment] if[call[attachmentElement.hasAttribute, parameter[literal["content-id"]]]] begin[{] call[soapAttachment.setContentId, parameter[call[attachmentElement.getAttribute, parameter[literal["content-id"]]]]] else begin[{] None end[}] if[call[attachmentElement.hasAttribute, parameter[literal["content-type"]]]] begin[{] call[soapAttachment.setContentType, parameter[call[attachmentElement.getAttribute, parameter[literal["content-type"]]]]] else begin[{] None end[}] if[call[attachmentElement.hasAttribute, parameter[literal["charset-name"]]]] begin[{] call[soapAttachment.setCharsetName, parameter[call[attachmentElement.getAttribute, parameter[literal["charset-name"]]]]] else begin[{] None end[}] if[call[attachmentElement.hasAttribute, parameter[literal["mtom-inline"]]]] begin[{] call[soapAttachment.setMtomInline, parameter[call[Boolean.parseBoolean, parameter[call[attachmentElement.getAttribute, parameter[literal["mtom-inline"]]]]]]] else begin[{] None end[}] if[call[attachmentElement.hasAttribute, parameter[literal["encoding-type"]]]] begin[{] call[soapAttachment.setEncodingType, parameter[call[attachmentElement.getAttribute, parameter[literal["encoding-type"]]]]] else begin[{] None end[}] local_variable[type[Element], attachmentDataElement] if[binary_operation[member[.attachmentDataElement], !=, literal[null]]] begin[{] call[soapAttachment.setContent, parameter[call[DomUtils.getTextValue, parameter[member[.attachmentDataElement]]]]] else begin[{] None end[}] local_variable[type[Element], attachmentResourceElement] if[binary_operation[member[.attachmentResourceElement], !=, literal[null]]] begin[{] call[soapAttachment.setContentResourcePath, parameter[call[attachmentResourceElement.getAttribute, parameter[literal["file"]]]]] else begin[{] None end[}] return[member[.soapAttachment]] end[}] END[}]
Keyword[public] Keyword[static] identifier[SoapAttachment] identifier[parseAttachment] operator[SEP] identifier[Element] identifier[attachmentElement] operator[SEP] { identifier[SoapAttachment] identifier[soapAttachment] operator[=] Keyword[new] identifier[SoapAttachment] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attachmentElement] operator[SEP] identifier[hasAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[soapAttachment] operator[SEP] identifier[setContentId] operator[SEP] identifier[attachmentElement] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[attachmentElement] operator[SEP] identifier[hasAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[soapAttachment] operator[SEP] identifier[setContentType] operator[SEP] identifier[attachmentElement] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[attachmentElement] operator[SEP] identifier[hasAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[soapAttachment] operator[SEP] identifier[setCharsetName] operator[SEP] identifier[attachmentElement] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[attachmentElement] operator[SEP] identifier[hasAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[soapAttachment] operator[SEP] identifier[setMtomInline] operator[SEP] identifier[Boolean] operator[SEP] identifier[parseBoolean] operator[SEP] identifier[attachmentElement] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[attachmentElement] operator[SEP] identifier[hasAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[soapAttachment] operator[SEP] identifier[setEncodingType] operator[SEP] identifier[attachmentElement] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } identifier[Element] identifier[attachmentDataElement] operator[=] identifier[DomUtils] operator[SEP] identifier[getChildElementByTagName] operator[SEP] identifier[attachmentElement] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attachmentDataElement] operator[!=] Other[null] operator[SEP] { identifier[soapAttachment] operator[SEP] identifier[setContent] operator[SEP] identifier[DomUtils] operator[SEP] identifier[getTextValue] operator[SEP] identifier[attachmentDataElement] operator[SEP] operator[SEP] operator[SEP] } identifier[Element] identifier[attachmentResourceElement] operator[=] identifier[DomUtils] operator[SEP] identifier[getChildElementByTagName] operator[SEP] identifier[attachmentElement] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attachmentResourceElement] operator[!=] Other[null] operator[SEP] { identifier[soapAttachment] operator[SEP] identifier[setContentResourcePath] operator[SEP] identifier[attachmentResourceElement] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[soapAttachment] operator[SEP] }
public Polygon createPolygon(Bbox bbox) { Coordinate tl = new Coordinate(bbox.getX(), bbox.getY()); Coordinate tr = new Coordinate(bbox.getX() + bbox.getWidth(), bbox.getY()); Coordinate br = new Coordinate(bbox.getX() + bbox.getWidth(), bbox.getY() + bbox.getHeight()); Coordinate bl = new Coordinate(bbox.getX(), bbox.getY() + bbox.getHeight()); return new Polygon(srid, precision, new LinearRing(srid, precision, new Coordinate[] { tl, tr, br, bl, tl }), null); }
class class_name[name] begin[{] method[createPolygon, return_type[type[Polygon]], modifier[public], parameter[bbox]] begin[{] local_variable[type[Coordinate], tl] local_variable[type[Coordinate], tr] local_variable[type[Coordinate], br] local_variable[type[Coordinate], bl] return[ClassCreator(arguments=[MemberReference(member=srid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=precision, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=srid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=precision, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=tl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=br, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Coordinate, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LinearRing, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Polygon, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Polygon] identifier[createPolygon] operator[SEP] identifier[Bbox] identifier[bbox] operator[SEP] { identifier[Coordinate] identifier[tl] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] identifier[bbox] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[bbox] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Coordinate] identifier[tr] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] identifier[bbox] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[+] identifier[bbox] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[bbox] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Coordinate] identifier[br] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] identifier[bbox] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[+] identifier[bbox] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[bbox] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[+] identifier[bbox] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Coordinate] identifier[bl] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] identifier[bbox] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[bbox] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[+] identifier[bbox] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Polygon] operator[SEP] identifier[srid] , identifier[precision] , Keyword[new] identifier[LinearRing] operator[SEP] identifier[srid] , identifier[precision] , Keyword[new] identifier[Coordinate] operator[SEP] operator[SEP] { identifier[tl] , identifier[tr] , identifier[br] , identifier[bl] , identifier[tl] } operator[SEP] , Other[null] operator[SEP] operator[SEP] }
public static String[] splitc(final String src, final String d) { if ((d.length() == 0) || (src.length() == 0)) { return new String[] {src}; } return splitc(src, d.toCharArray()); }
class class_name[name] begin[{] method[splitc, return_type[type[String]], modifier[public static], parameter[src, d]] begin[{] if[binary_operation[binary_operation[call[d.length, parameter[]], ==, literal[0]], ||, binary_operation[call[src.length, parameter[]], ==, literal[0]]]] begin[{] return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] else begin[{] None end[}] return[call[.splitc, parameter[member[.src], call[d.toCharArray, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[splitc] operator[SEP] Keyword[final] identifier[String] identifier[src] , Keyword[final] identifier[String] identifier[d] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[d] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[||] operator[SEP] identifier[src] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[String] operator[SEP] operator[SEP] { identifier[src] } operator[SEP] } Keyword[return] identifier[splitc] operator[SEP] identifier[src] , identifier[d] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public void info( F0<String> msg ) { if ( compilerLogger.isInfoEnabled() ) { compilerLogger.info( msg.apply() ); } }
class class_name[name] begin[{] method[info, return_type[void], modifier[public], parameter[msg]] begin[{] if[call[compilerLogger.isInfoEnabled, parameter[]]] begin[{] call[compilerLogger.info, parameter[call[msg.apply, parameter[]]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[info] operator[SEP] identifier[F0] operator[<] identifier[String] operator[>] identifier[msg] operator[SEP] { Keyword[if] operator[SEP] identifier[compilerLogger] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[compilerLogger] operator[SEP] identifier[info] operator[SEP] identifier[msg] operator[SEP] identifier[apply] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private ThymeleafTemplater getOrCreateTemplater() { ThymeleafTemplater templater = this.templater.get(); // Lazy-create a ThymeleafTemplater if (templater == null) { final TemplateEngine engine = getOrCreateEngine(); templater = new ThymeleafTemplater(engine, configuration, metrics, userProvider); templater.set("coreRestPrefix", coreRestPrefix); templater.set("coreRestEndpoint", coreRestEndpoint.toString()); templater.set("coreServices", services); templater.set("currentUser", new ThymeleafCurrentUserUtils(userProvider)); this.templater = new WeakReference<>(templater); } return templater; }
class class_name[name] begin[{] method[getOrCreateTemplater, return_type[type[ThymeleafTemplater]], modifier[private], parameter[]] begin[{] local_variable[type[ThymeleafTemplater], templater] if[binary_operation[member[.templater], ==, literal[null]]] begin[{] local_variable[type[TemplateEngine], engine] assign[member[.templater], ClassCreator(arguments=[MemberReference(member=engine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configuration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=metrics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=userProvider, 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=ThymeleafTemplater, sub_type=None))] call[templater.set, parameter[literal["coreRestPrefix"], member[.coreRestPrefix]]] call[templater.set, parameter[literal["coreRestEndpoint"], call[coreRestEndpoint.toString, parameter[]]]] call[templater.set, parameter[literal["coreServices"], member[.services]]] call[templater.set, parameter[literal["currentUser"], ClassCreator(arguments=[MemberReference(member=userProvider, 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=ThymeleafCurrentUserUtils, sub_type=None))]] assign[THIS[member[None.templater]], ClassCreator(arguments=[MemberReference(member=templater, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=WeakReference, sub_type=None))] else begin[{] None end[}] return[member[.templater]] end[}] END[}]
Keyword[private] identifier[ThymeleafTemplater] identifier[getOrCreateTemplater] operator[SEP] operator[SEP] { identifier[ThymeleafTemplater] identifier[templater] operator[=] Keyword[this] operator[SEP] identifier[templater] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[templater] operator[==] Other[null] operator[SEP] { Keyword[final] identifier[TemplateEngine] identifier[engine] operator[=] identifier[getOrCreateEngine] operator[SEP] operator[SEP] operator[SEP] identifier[templater] operator[=] Keyword[new] identifier[ThymeleafTemplater] operator[SEP] identifier[engine] , identifier[configuration] , identifier[metrics] , identifier[userProvider] operator[SEP] operator[SEP] identifier[templater] operator[SEP] identifier[set] operator[SEP] literal[String] , identifier[coreRestPrefix] operator[SEP] operator[SEP] identifier[templater] operator[SEP] identifier[set] operator[SEP] literal[String] , identifier[coreRestEndpoint] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[templater] operator[SEP] identifier[set] operator[SEP] literal[String] , identifier[services] operator[SEP] operator[SEP] identifier[templater] operator[SEP] identifier[set] operator[SEP] literal[String] , Keyword[new] identifier[ThymeleafCurrentUserUtils] operator[SEP] identifier[userProvider] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[templater] operator[=] Keyword[new] identifier[WeakReference] operator[<] operator[>] operator[SEP] identifier[templater] operator[SEP] operator[SEP] } Keyword[return] identifier[templater] operator[SEP] }
public static boolean checkIsValidH2WriteHeader(String headerName) { if (!headerName.startsWith(":")) { if ("Connection".equalsIgnoreCase(headerName)) { return false; } if ("TE".equalsIgnoreCase(headerName)) { return false; } } return true; }
class class_name[name] begin[{] method[checkIsValidH2WriteHeader, return_type[type[boolean]], modifier[public static], parameter[headerName]] begin[{] if[call[headerName.startsWith, parameter[literal[":"]]]] begin[{] if[literal["Connection"]] begin[{] return[literal[false]] else begin[{] None end[}] if[literal["TE"]] begin[{] return[literal[false]] else begin[{] None end[}] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[checkIsValidH2WriteHeader] operator[SEP] identifier[String] identifier[headerName] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[headerName] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[headerName] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[headerName] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
static <E> E from(Class<E> serviceInterface, ClassLoader classLoader, Target target) { Utils.notNull(target, "target must not be null"); Utils.notNull(serviceInterface, "descriptor must not be null"); if (classLoader == null) { classLoader = Thread.currentThread().getContextClassLoader(); } // Validate service ServiceValidator.validateInterface(serviceInterface, ServiceValidator.TYPE_REMOTE); ServiceInterface service = serviceInterface.getAnnotation(ServiceInterface.class); SPFServiceDescriptor desc = ServiceInterface.Convert.toServiceDescriptor(service); InvocationStub stub = InvocationStub.from(desc, target); InvocationHandler h = new InvocationHandlerAdapter(stub); Object proxy = Proxy.newProxyInstance(classLoader, new Class[] { serviceInterface }, h); return serviceInterface.cast(proxy); }
class class_name[name] begin[{] method[from, return_type[type[E]], modifier[static], parameter[serviceInterface, classLoader, target]] begin[{] call[Utils.notNull, parameter[member[.target], literal["target must not be null"]]] call[Utils.notNull, parameter[member[.serviceInterface], literal["descriptor must not be null"]]] if[binary_operation[member[.classLoader], ==, literal[null]]] begin[{] assign[member[.classLoader], call[Thread.currentThread, parameter[]]] else begin[{] None end[}] call[ServiceValidator.validateInterface, parameter[member[.serviceInterface], member[ServiceValidator.TYPE_REMOTE]]] local_variable[type[ServiceInterface], service] local_variable[type[SPFServiceDescriptor], desc] local_variable[type[InvocationStub], stub] local_variable[type[InvocationHandler], h] local_variable[type[Object], proxy] return[call[serviceInterface.cast, parameter[member[.proxy]]]] end[}] END[}]
Keyword[static] operator[<] identifier[E] operator[>] identifier[E] identifier[from] operator[SEP] identifier[Class] operator[<] identifier[E] operator[>] identifier[serviceInterface] , identifier[ClassLoader] identifier[classLoader] , identifier[Target] identifier[target] operator[SEP] { identifier[Utils] operator[SEP] identifier[notNull] operator[SEP] identifier[target] , literal[String] operator[SEP] operator[SEP] identifier[Utils] operator[SEP] identifier[notNull] operator[SEP] identifier[serviceInterface] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[classLoader] operator[==] Other[null] operator[SEP] { identifier[classLoader] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] } identifier[ServiceValidator] operator[SEP] identifier[validateInterface] operator[SEP] identifier[serviceInterface] , identifier[ServiceValidator] operator[SEP] identifier[TYPE_REMOTE] operator[SEP] operator[SEP] identifier[ServiceInterface] identifier[service] operator[=] identifier[serviceInterface] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[ServiceInterface] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[SPFServiceDescriptor] identifier[desc] operator[=] identifier[ServiceInterface] operator[SEP] identifier[Convert] operator[SEP] identifier[toServiceDescriptor] operator[SEP] identifier[service] operator[SEP] operator[SEP] identifier[InvocationStub] identifier[stub] operator[=] identifier[InvocationStub] operator[SEP] identifier[from] operator[SEP] identifier[desc] , identifier[target] operator[SEP] operator[SEP] identifier[InvocationHandler] identifier[h] operator[=] Keyword[new] identifier[InvocationHandlerAdapter] operator[SEP] identifier[stub] operator[SEP] operator[SEP] identifier[Object] identifier[proxy] operator[=] identifier[Proxy] operator[SEP] identifier[newProxyInstance] operator[SEP] identifier[classLoader] , Keyword[new] identifier[Class] operator[SEP] operator[SEP] { identifier[serviceInterface] } , identifier[h] operator[SEP] operator[SEP] Keyword[return] identifier[serviceInterface] operator[SEP] identifier[cast] operator[SEP] identifier[proxy] operator[SEP] operator[SEP] }
public static TypeDescription resolve(TypeDescription typeDescription, TypeDescription targetType) { int arity = 0; TypeDescription componentType = typeDescription; while (componentType.isArray()) { componentType = componentType.getComponentType(); arity++; } return componentType.represents(TargetType.class) ? TypeDescription.ArrayProjection.of(targetType, arity) : typeDescription; }
class class_name[name] begin[{] method[resolve, return_type[type[TypeDescription]], modifier[public static], parameter[typeDescription, targetType]] begin[{] local_variable[type[int], arity] local_variable[type[TypeDescription], componentType] while[call[componentType.isArray, parameter[]]] begin[{] assign[member[.componentType], call[componentType.getComponentType, parameter[]]] member[.arity] end[}] return[TernaryExpression(condition=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TargetType, sub_type=None))], member=represents, postfix_operators=[], prefix_operators=[], qualifier=componentType, selectors=[], type_arguments=None), if_false=MemberReference(member=typeDescription, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[MemberReference(member=targetType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=arity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=TypeDescription.ArrayProjection, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[TypeDescription] identifier[resolve] operator[SEP] identifier[TypeDescription] identifier[typeDescription] , identifier[TypeDescription] identifier[targetType] operator[SEP] { Keyword[int] identifier[arity] operator[=] Other[0] operator[SEP] identifier[TypeDescription] identifier[componentType] operator[=] identifier[typeDescription] operator[SEP] Keyword[while] operator[SEP] identifier[componentType] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[SEP] { identifier[componentType] operator[=] identifier[componentType] operator[SEP] identifier[getComponentType] operator[SEP] operator[SEP] operator[SEP] identifier[arity] operator[++] operator[SEP] } Keyword[return] identifier[componentType] operator[SEP] identifier[represents] operator[SEP] identifier[TargetType] operator[SEP] Keyword[class] operator[SEP] operator[?] identifier[TypeDescription] operator[SEP] identifier[ArrayProjection] operator[SEP] identifier[of] operator[SEP] identifier[targetType] , identifier[arity] operator[SEP] operator[:] identifier[typeDescription] operator[SEP] }
public static <C extends Collection<E>, E> Iterator<C> unchain(int channelSize, Iterator<E> iterator, Supplier<C> channelProvider) { return new UnchainIterator<C, E>(channelSize, iterator, channelProvider); }
class class_name[name] begin[{] method[unchain, return_type[type[Iterator]], modifier[public static], parameter[channelSize, iterator, channelProvider]] begin[{] return[ClassCreator(arguments=[MemberReference(member=channelSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=channelProvider, 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=C, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=None, name=UnchainIterator, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[C] Keyword[extends] identifier[Collection] operator[<] identifier[E] operator[>] , identifier[E] operator[>] identifier[Iterator] operator[<] identifier[C] operator[>] identifier[unchain] operator[SEP] Keyword[int] identifier[channelSize] , identifier[Iterator] operator[<] identifier[E] operator[>] identifier[iterator] , identifier[Supplier] operator[<] identifier[C] operator[>] identifier[channelProvider] operator[SEP] { Keyword[return] Keyword[new] identifier[UnchainIterator] operator[<] identifier[C] , identifier[E] operator[>] operator[SEP] identifier[channelSize] , identifier[iterator] , identifier[channelProvider] operator[SEP] operator[SEP] }
static String getDefaultClientName(WarningReporter reporter) { try { return UUID.randomUUID().toString(); } catch (Exception e) { reporter.warn("No client name was set on appender!", e); return null; } }
class class_name[name] begin[{] method[getDefaultClientName, return_type[type[String]], modifier[static], parameter[reporter]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=randomUUID, postfix_operators=[], prefix_operators=[], qualifier=UUID, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No client name was set on appender!"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=reporter, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[static] identifier[String] identifier[getDefaultClientName] operator[SEP] identifier[WarningReporter] identifier[reporter] operator[SEP] { Keyword[try] { Keyword[return] identifier[UUID] operator[SEP] identifier[randomUUID] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[reporter] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } }
public static Instrumentation getInstrumentation() { SecurityManager securityManager = System.getSecurityManager(); if (securityManager != null) { securityManager.checkPermission(new RuntimePermission("getInstrumentation")); } Instrumentation instrumentation = Installer.instrumentation; if (instrumentation == null) { throw new IllegalStateException("The Byte Buddy agent is not loaded or this method is not called via the system class loader"); } return instrumentation; }
class class_name[name] begin[{] method[getInstrumentation, return_type[type[Instrumentation]], modifier[public static], parameter[]] begin[{] local_variable[type[SecurityManager], securityManager] if[binary_operation[member[.securityManager], !=, literal[null]]] begin[{] call[securityManager.checkPermission, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getInstrumentation")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimePermission, sub_type=None))]] else begin[{] None end[}] local_variable[type[Instrumentation], instrumentation] if[binary_operation[member[.instrumentation], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The Byte Buddy agent is not loaded or this method is not called via the system class loader")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.instrumentation]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Instrumentation] identifier[getInstrumentation] operator[SEP] operator[SEP] { identifier[SecurityManager] identifier[securityManager] operator[=] identifier[System] operator[SEP] identifier[getSecurityManager] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[securityManager] operator[!=] Other[null] operator[SEP] { identifier[securityManager] operator[SEP] identifier[checkPermission] operator[SEP] Keyword[new] identifier[RuntimePermission] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } identifier[Instrumentation] identifier[instrumentation] operator[=] identifier[Installer] operator[SEP] identifier[instrumentation] operator[SEP] Keyword[if] operator[SEP] identifier[instrumentation] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[instrumentation] operator[SEP] }
public static RedisConnectionException create(Throwable cause) { if (cause instanceof RedisConnectionException) { return new RedisConnectionException(cause.getMessage(), cause.getCause()); } return new RedisConnectionException("Unable to connect", cause); }
class class_name[name] begin[{] method[create, return_type[type[RedisConnectionException]], modifier[public static], parameter[cause]] begin[{] if[binary_operation[member[.cause], instanceof, type[RedisConnectionException]]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=cause, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=cause, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RedisConnectionException, sub_type=None))] else begin[{] None end[}] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to connect"), MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RedisConnectionException, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[RedisConnectionException] identifier[create] operator[SEP] identifier[Throwable] identifier[cause] operator[SEP] { Keyword[if] operator[SEP] identifier[cause] Keyword[instanceof] identifier[RedisConnectionException] operator[SEP] { Keyword[return] Keyword[new] identifier[RedisConnectionException] operator[SEP] identifier[cause] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[cause] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[RedisConnectionException] operator[SEP] literal[String] , identifier[cause] operator[SEP] operator[SEP] }
public final void mTIME_STRING_FUN_NAME() throws RecognitionException { try { int _type = TIME_STRING_FUN_NAME; int _channel = DEFAULT_TOKEN_CHANNEL; // EventFilter.g:50:22: ( 'time-string' ) // EventFilter.g:50:24: 'time-string' { match("time-string"); } state.type = _type; state.channel = _channel; } finally { // do for sure before leaving } }
class class_name[name] begin[{] method[mTIME_STRING_FUN_NAME, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=TIME_STRING_FUN_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_type)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=DEFAULT_TOKEN_CHANNEL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=_channel)], modifiers=set(), type=BasicType(dimensions=[], name=int)), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="time-string")], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=MemberReference(member=_channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=None, finally_block=[], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[mTIME_STRING_FUN_NAME] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { Keyword[int] identifier[_type] operator[=] identifier[TIME_STRING_FUN_NAME] operator[SEP] Keyword[int] identifier[_channel] operator[=] identifier[DEFAULT_TOKEN_CHANNEL] operator[SEP] { identifier[match] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[state] operator[SEP] identifier[type] operator[=] identifier[_type] operator[SEP] identifier[state] operator[SEP] identifier[channel] operator[=] identifier[_channel] operator[SEP] } Keyword[finally] { } }
public Observable<Void> resendRequestEmailsAsync(String resourceGroupName, String certificateOrderName, String name) { return resendRequestEmailsWithServiceResponseAsync(resourceGroupName, certificateOrderName, name).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
class class_name[name] begin[{] method[resendRequestEmailsAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, certificateOrderName, name]] begin[{] return[call[.resendRequestEmailsWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.certificateOrderName], member[.name]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Void] operator[>] identifier[resendRequestEmailsAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[certificateOrderName] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[resendRequestEmailsWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[certificateOrderName] , identifier[name] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] , identifier[Void] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Void] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
private static String parseZoneID(String text, ParsePosition pos) { String resolvedID = null; if (ZONE_ID_TRIE == null) { synchronized (TimeZoneFormat.class) { if (ZONE_ID_TRIE == null) { // Build zone ID trie TextTrieMap<String> trie = new TextTrieMap<String>(true); String[] ids = TimeZone.getAvailableIDs(); for (String id : ids) { trie.put(id, id); } ZONE_ID_TRIE = trie; } } } int[] matchLen = new int[] {0}; Iterator<String> itr = ZONE_ID_TRIE.get(text, pos.getIndex(), matchLen); if (itr != null) { resolvedID = itr.next(); pos.setIndex(pos.getIndex() + matchLen[0]); } else { // TODO // We many need to handle rule based custom zone ID (See ZoneMeta.parseCustomID), // such as GM+05:00. However, the public parse method in this class also calls // parseOffsetLocalizedGMT and custom zone IDs are likely supported by the parser, // so we might not need to handle them here. pos.setErrorIndex(pos.getIndex()); } return resolvedID; }
class class_name[name] begin[{] method[parseZoneID, return_type[type[String]], modifier[private static], parameter[text, pos]] begin[{] local_variable[type[String], resolvedID] if[binary_operation[member[.ZONE_ID_TRIE], ==, literal[null]]] begin[{] SYNCHRONIZED[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TimeZoneFormat, sub_type=None))] BEGIN[{] if[binary_operation[member[.ZONE_ID_TRIE], ==, literal[null]]] begin[{] local_variable[type[TextTrieMap], trie] local_variable[type[String], ids] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=trie, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=ids, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=id)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) assign[member[.ZONE_ID_TRIE], member[.trie]] else begin[{] None end[}] END[}] else begin[{] None end[}] local_variable[type[int], matchLen] local_variable[type[Iterator], itr] if[binary_operation[member[.itr], !=, literal[null]]] begin[{] assign[member[.resolvedID], call[itr.next, parameter[]]] call[pos.setIndex, parameter[binary_operation[call[pos.getIndex, parameter[]], +, member[.matchLen]]]] else begin[{] call[pos.setErrorIndex, parameter[call[pos.getIndex, parameter[]]]] end[}] return[member[.resolvedID]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[parseZoneID] operator[SEP] identifier[String] identifier[text] , identifier[ParsePosition] identifier[pos] operator[SEP] { identifier[String] identifier[resolvedID] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[ZONE_ID_TRIE] operator[==] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[TimeZoneFormat] operator[SEP] Keyword[class] operator[SEP] { Keyword[if] operator[SEP] identifier[ZONE_ID_TRIE] operator[==] Other[null] operator[SEP] { identifier[TextTrieMap] operator[<] identifier[String] operator[>] identifier[trie] operator[=] Keyword[new] identifier[TextTrieMap] operator[<] identifier[String] operator[>] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[ids] operator[=] identifier[TimeZone] operator[SEP] identifier[getAvailableIDs] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[id] operator[:] identifier[ids] operator[SEP] { identifier[trie] operator[SEP] identifier[put] operator[SEP] identifier[id] , identifier[id] operator[SEP] operator[SEP] } identifier[ZONE_ID_TRIE] operator[=] identifier[trie] operator[SEP] } } } Keyword[int] operator[SEP] operator[SEP] identifier[matchLen] operator[=] Keyword[new] Keyword[int] operator[SEP] operator[SEP] { Other[0] } operator[SEP] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[itr] operator[=] identifier[ZONE_ID_TRIE] operator[SEP] identifier[get] operator[SEP] identifier[text] , identifier[pos] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] , identifier[matchLen] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[itr] operator[!=] Other[null] operator[SEP] { identifier[resolvedID] operator[=] identifier[itr] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[pos] operator[SEP] identifier[setIndex] operator[SEP] identifier[pos] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] operator[+] identifier[matchLen] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[pos] operator[SEP] identifier[setErrorIndex] operator[SEP] identifier[pos] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[resolvedID] operator[SEP] }
public Scriptable wrapJavaClass(Context cx, Scriptable scope, Class<?> javaClass) { return new NativeJavaClass(scope, javaClass); }
class class_name[name] begin[{] method[wrapJavaClass, return_type[type[Scriptable]], modifier[public], parameter[cx, scope, javaClass]] begin[{] return[ClassCreator(arguments=[MemberReference(member=scope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=javaClass, 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=NativeJavaClass, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Scriptable] identifier[wrapJavaClass] operator[SEP] identifier[Context] identifier[cx] , identifier[Scriptable] identifier[scope] , identifier[Class] operator[<] operator[?] operator[>] identifier[javaClass] operator[SEP] { Keyword[return] Keyword[new] identifier[NativeJavaClass] operator[SEP] identifier[scope] , identifier[javaClass] operator[SEP] operator[SEP] }
public com.google.api.ads.admanager.axis.v201811.Money getGrossRate() { return grossRate; }
class class_name[name] begin[{] method[getGrossRate, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.grossRate]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201811] operator[SEP] identifier[Money] identifier[getGrossRate] operator[SEP] operator[SEP] { Keyword[return] identifier[grossRate] operator[SEP] }
public Integer getInt(String name, Integer def) { final String s = getProperty(name); try { return Integer.parseInt(s); } catch (Exception e) { return def; } }
class class_name[name] begin[{] method[getInt, return_type[type[Integer]], modifier[public], parameter[name, def]] begin[{] local_variable[type[String], s] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MemberReference(member=def, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[Integer] identifier[getInt] operator[SEP] identifier[String] identifier[name] , identifier[Integer] identifier[def] operator[SEP] { Keyword[final] identifier[String] identifier[s] operator[=] identifier[getProperty] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[s] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] identifier[def] operator[SEP] } }
public OvhFailoverIp project_serviceName_ip_failover_id_attach_POST(String serviceName, String id, String instanceId) throws IOException { String qPath = "/cloud/project/{serviceName}/ip/failover/{id}/attach"; StringBuilder sb = path(qPath, serviceName, id); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "instanceId", instanceId); String resp = exec(qPath, "POST", sb.toString(), o); return convertTo(resp, OvhFailoverIp.class); }
class class_name[name] begin[{] method[project_serviceName_ip_failover_id_attach_POST, return_type[type[OvhFailoverIp]], modifier[public], parameter[serviceName, id, instanceId]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[HashMap], o] call[.addBody, parameter[member[.o], literal["instanceId"], member[.instanceId]]] local_variable[type[String], resp] return[call[.convertTo, parameter[member[.resp], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OvhFailoverIp, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhFailoverIp] identifier[project_serviceName_ip_failover_id_attach_POST] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[id] , identifier[String] identifier[instanceId] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[serviceName] , identifier[id] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[o] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[instanceId] operator[SEP] operator[SEP] identifier[String] identifier[resp] operator[=] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[o] operator[SEP] operator[SEP] Keyword[return] identifier[convertTo] operator[SEP] identifier[resp] , identifier[OvhFailoverIp] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public long findFirstSet(long start, byte[] temp) throws IOException { long pos = start >> 3; try { lock().acquireReadLock(); while (true) { int amt = mFile.read(pos, temp, 0, temp.length); if (amt <= 0) { return -1; } for (int i=0; i<amt; i++, pos++) { byte val; if ((val = temp[i]) != 0) { long index = pos << 3; if (index < start) { // Clear the upper bits to skip check. val &= (0x000000ff >>> (start - index)); if (val == 0) { // False alarm. continue; } } return index + findSubIndex(val); } } } } catch (InterruptedException e) { throw new InterruptedIOException(); } finally { lock().releaseLock(); } }
class class_name[name] begin[{] method[findFirstSet, return_type[type[long]], modifier[public], parameter[start, temp]] begin[{] local_variable[type[long], pos] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=acquireReadLock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=temp, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=mFile, selectors=[], type_arguments=None), name=amt)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=amt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), label=None)])), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=val)], modifiers=set(), type=BasicType(dimensions=[], name=byte)), IfStatement(condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=<<), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=&=, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x000000ff), operandr=BinaryOperation(operandl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=>>>)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)]))])), ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findSubIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=amt, 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=[]), MemberReference(member=pos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), 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=InterruptedIOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=releaseLock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[long] identifier[findFirstSet] operator[SEP] Keyword[long] identifier[start] , Keyword[byte] operator[SEP] operator[SEP] identifier[temp] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[long] identifier[pos] operator[=] identifier[start] operator[>] operator[>] Other[3] operator[SEP] Keyword[try] { identifier[lock] operator[SEP] operator[SEP] operator[SEP] identifier[acquireReadLock] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[int] identifier[amt] operator[=] identifier[mFile] operator[SEP] identifier[read] operator[SEP] identifier[pos] , identifier[temp] , Other[0] , identifier[temp] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[amt] operator[<=] Other[0] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[amt] operator[SEP] identifier[i] operator[++] , identifier[pos] operator[++] operator[SEP] { Keyword[byte] identifier[val] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[val] operator[=] identifier[temp] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[long] identifier[index] operator[=] identifier[pos] operator[<<] Other[3] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[<] identifier[start] operator[SEP] { identifier[val] operator[&=] operator[SEP] literal[Integer] operator[>] operator[>] operator[>] operator[SEP] identifier[start] operator[-] identifier[index] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[val] operator[==] Other[0] operator[SEP] { Keyword[continue] operator[SEP] } } Keyword[return] identifier[index] operator[+] identifier[findSubIndex] operator[SEP] identifier[val] operator[SEP] operator[SEP] } } } } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[InterruptedIOException] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[lock] operator[SEP] operator[SEP] operator[SEP] identifier[releaseLock] operator[SEP] operator[SEP] operator[SEP] } }
public static IssuerFraudRecord retrieve(String issuerFraudRecord) throws StripeException { return retrieve(issuerFraudRecord, (Map<String, Object>) null, (RequestOptions) null); }
class class_name[name] begin[{] method[retrieve, return_type[type[IssuerFraudRecord]], modifier[public static], parameter[issuerFraudRecord]] begin[{] return[call[.retrieve, parameter[member[.issuerFraudRecord], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), 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)), Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=RequestOptions, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[IssuerFraudRecord] identifier[retrieve] operator[SEP] identifier[String] identifier[issuerFraudRecord] operator[SEP] Keyword[throws] identifier[StripeException] { Keyword[return] identifier[retrieve] operator[SEP] identifier[issuerFraudRecord] , operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] Other[null] , operator[SEP] identifier[RequestOptions] operator[SEP] Other[null] operator[SEP] operator[SEP] }
protected void addStringsForTopic(final POBuildData buildData, final SpecTopic specTopic, final Map<String, TranslationDetails> translations, final List<String> ignoredSourceStrings) throws BuildProcessingException { if (buildData.getTranslationMap().containsKey(specTopic.getDBId().toString())) { final Map<String, TranslationDetails> translatedTopicStrings = buildData.getTranslationMap().get(specTopic.getDBId().toString()); for (final Map.Entry<String, TranslationDetails> entry : translatedTopicStrings.entrySet()) { if (ignoredSourceStrings != null && ignoredSourceStrings.contains(entry.getKey())) { continue; } else { final String cleanedOriginalString = cleanForPublican(buildData, specTopic, entry.getKey()); if (entry.getValue() == null) { translations.put(cleanedOriginalString, null); } else { final String cleanedTranslationString = cleanForPublican(buildData, specTopic, entry.getValue().getTranslation()); translations.put(cleanedOriginalString, new TranslationDetails(cleanedTranslationString, entry.getValue().isFuzzy(), entry.getValue().getTagName())); } } } } // Add additional content if (DocBookXMLPreProcessor.shouldAddAdditionalInfo(buildData, specTopic)) { // Add the report a bug link if (buildData.getBuildOptions().getInsertBugLinks() && specTopic.getTopicType() == TopicType.NORMAL) { processPOTopicBugLink(buildData, specTopic, translations); } // Add editor links if (buildData.getBuildOptions().getInsertEditorLinks() && specTopic.getTopicType() != TopicType.AUTHOR_GROUP) { processPOTopicEditorLink(buildData, specTopic, translations); } } // Add any injection strings from the content spec processPOTopicInjections(buildData, specTopic, translations); // Add the keyword source strings (Note: These won't ever be translated) if (specTopic.getTopicType() != TopicType.INITIAL_CONTENT) { final CollectionWrapper<TagWrapper> tags = specTopic.getTopic().getTags(); final List<Integer> seoCategoryIds = buildData.getServerSettings().getSEOCategoryIds(); if (seoCategoryIds != null && !seoCategoryIds.isEmpty() && tags != null && tags.getItems() != null && tags.getItems().size() > 0) { final List<TagWrapper> tagItems = tags.getItems(); for (final TagWrapper tag : tagItems) { if (tag.getName() == null || tag.getName().isEmpty()) continue; if (tag.containedInCategories(seoCategoryIds)) { translations.put(tag.getName(), new TranslationDetails(null, false, "keyword")); } } } } }
class class_name[name] begin[{] method[addStringsForTopic, return_type[void], modifier[protected], parameter[buildData, specTopic, translations, ignoredSourceStrings]] begin[{] if[call[buildData.getTranslationMap, parameter[]]] begin[{] local_variable[type[Map], translatedTopicStrings] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ignoredSourceStrings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=contains, postfix_operators=[], prefix_operators=[], qualifier=ignoredSourceStrings, selectors=[], type_arguments=None), operator=&&), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=buildData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=specTopic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=cleanForPublican, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=cleanedOriginalString)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=buildData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=specTopic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTranslation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=cleanForPublican, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=cleanedTranslationString)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cleanedOriginalString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=cleanedTranslationString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=isFuzzy, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTagName, 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=TranslationDetails, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=translations, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cleanedOriginalString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=put, postfix_operators=[], prefix_operators=[], qualifier=translations, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=translatedTopicStrings, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers={'final'}, 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=TranslationDetails, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) else begin[{] None end[}] if[call[DocBookXMLPreProcessor.shouldAddAdditionalInfo, parameter[member[.buildData], member[.specTopic]]]] begin[{] if[binary_operation[call[buildData.getBuildOptions, parameter[]], &&, binary_operation[call[specTopic.getTopicType, parameter[]], ==, member[TopicType.NORMAL]]]] begin[{] call[.processPOTopicBugLink, parameter[member[.buildData], member[.specTopic], member[.translations]]] else begin[{] None end[}] if[binary_operation[call[buildData.getBuildOptions, parameter[]], &&, binary_operation[call[specTopic.getTopicType, parameter[]], !=, member[TopicType.AUTHOR_GROUP]]]] begin[{] call[.processPOTopicEditorLink, parameter[member[.buildData], member[.specTopic], member[.translations]]] else begin[{] None end[}] else begin[{] None end[}] call[.processPOTopicInjections, parameter[member[.buildData], member[.specTopic], member[.translations]]] if[binary_operation[call[specTopic.getTopicType, parameter[]], !=, member[TopicType.INITIAL_CONTENT]]] begin[{] local_variable[type[CollectionWrapper], tags] local_variable[type[List], seoCategoryIds] if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.seoCategoryIds], !=, literal[null]], &&, call[seoCategoryIds.isEmpty, parameter[]]], &&, binary_operation[member[.tags], !=, literal[null]]], &&, binary_operation[call[tags.getItems, parameter[]], !=, literal[null]]], &&, binary_operation[call[tags.getItems, parameter[]], >, literal[0]]]] begin[{] local_variable[type[List], tagItems] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=tag, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=tag, selectors=[MethodInvocation(arguments=[], member=isEmpty, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=seoCategoryIds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containedInCategories, postfix_operators=[], prefix_operators=[], qualifier=tag, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=tag, selectors=[], type_arguments=None), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="keyword")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TranslationDetails, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=translations, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=tagItems, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tag)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=TagWrapper, sub_type=None))), label=None) else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addStringsForTopic] operator[SEP] Keyword[final] identifier[POBuildData] identifier[buildData] , Keyword[final] identifier[SpecTopic] identifier[specTopic] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[TranslationDetails] operator[>] identifier[translations] , Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[ignoredSourceStrings] operator[SEP] Keyword[throws] identifier[BuildProcessingException] { Keyword[if] operator[SEP] identifier[buildData] operator[SEP] identifier[getTranslationMap] operator[SEP] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[specTopic] operator[SEP] identifier[getDBId] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[TranslationDetails] operator[>] identifier[translatedTopicStrings] operator[=] identifier[buildData] operator[SEP] identifier[getTranslationMap] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[specTopic] operator[SEP] identifier[getDBId] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[TranslationDetails] operator[>] identifier[entry] operator[:] identifier[translatedTopicStrings] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ignoredSourceStrings] operator[!=] Other[null] operator[&&] identifier[ignoredSourceStrings] operator[SEP] identifier[contains] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[else] { Keyword[final] identifier[String] identifier[cleanedOriginalString] operator[=] identifier[cleanForPublican] operator[SEP] identifier[buildData] , identifier[specTopic] , identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[translations] operator[SEP] identifier[put] operator[SEP] identifier[cleanedOriginalString] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { Keyword[final] identifier[String] identifier[cleanedTranslationString] operator[=] identifier[cleanForPublican] operator[SEP] identifier[buildData] , identifier[specTopic] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTranslation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[translations] operator[SEP] identifier[put] operator[SEP] identifier[cleanedOriginalString] , Keyword[new] identifier[TranslationDetails] operator[SEP] identifier[cleanedTranslationString] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[isFuzzy] operator[SEP] operator[SEP] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTagName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[if] operator[SEP] identifier[DocBookXMLPreProcessor] operator[SEP] identifier[shouldAddAdditionalInfo] operator[SEP] identifier[buildData] , identifier[specTopic] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[buildData] operator[SEP] identifier[getBuildOptions] operator[SEP] operator[SEP] operator[SEP] identifier[getInsertBugLinks] operator[SEP] operator[SEP] operator[&&] identifier[specTopic] operator[SEP] identifier[getTopicType] operator[SEP] operator[SEP] operator[==] identifier[TopicType] operator[SEP] identifier[NORMAL] operator[SEP] { identifier[processPOTopicBugLink] operator[SEP] identifier[buildData] , identifier[specTopic] , identifier[translations] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[buildData] operator[SEP] identifier[getBuildOptions] operator[SEP] operator[SEP] operator[SEP] identifier[getInsertEditorLinks] operator[SEP] operator[SEP] operator[&&] identifier[specTopic] operator[SEP] identifier[getTopicType] operator[SEP] operator[SEP] operator[!=] identifier[TopicType] operator[SEP] identifier[AUTHOR_GROUP] operator[SEP] { identifier[processPOTopicEditorLink] operator[SEP] identifier[buildData] , identifier[specTopic] , identifier[translations] operator[SEP] operator[SEP] } } identifier[processPOTopicInjections] operator[SEP] identifier[buildData] , identifier[specTopic] , identifier[translations] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[specTopic] operator[SEP] identifier[getTopicType] operator[SEP] operator[SEP] operator[!=] identifier[TopicType] operator[SEP] identifier[INITIAL_CONTENT] operator[SEP] { Keyword[final] identifier[CollectionWrapper] operator[<] identifier[TagWrapper] operator[>] identifier[tags] operator[=] identifier[specTopic] operator[SEP] identifier[getTopic] operator[SEP] operator[SEP] operator[SEP] identifier[getTags] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Integer] operator[>] identifier[seoCategoryIds] operator[=] identifier[buildData] operator[SEP] identifier[getServerSettings] operator[SEP] operator[SEP] operator[SEP] identifier[getSEOCategoryIds] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[seoCategoryIds] operator[!=] Other[null] operator[&&] operator[!] identifier[seoCategoryIds] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[tags] operator[!=] Other[null] operator[&&] identifier[tags] operator[SEP] identifier[getItems] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[tags] operator[SEP] identifier[getItems] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[TagWrapper] operator[>] identifier[tagItems] operator[=] identifier[tags] operator[SEP] identifier[getItems] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[TagWrapper] identifier[tag] operator[:] identifier[tagItems] operator[SEP] { Keyword[if] operator[SEP] identifier[tag] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[tag] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] Keyword[if] operator[SEP] identifier[tag] operator[SEP] identifier[containedInCategories] operator[SEP] identifier[seoCategoryIds] operator[SEP] operator[SEP] { identifier[translations] operator[SEP] identifier[put] operator[SEP] identifier[tag] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , Keyword[new] identifier[TranslationDetails] operator[SEP] Other[null] , literal[boolean] , literal[String] operator[SEP] operator[SEP] operator[SEP] } } } } }
HorizontalLayout addInfoLayout(String key, Object value, boolean editable) { HorizontalLayout res = new HorizontalLayout(); res.setWidth("100%"); res.setSpacing(true); TextField keyField = new TextField(); keyField.setValue(key); keyField.setEnabled(editable); keyField.setWidth("100%"); TextField valueField = new TextField(); valueField.setValue(value.toString()); valueField.setEnabled(editable); valueField.setWidth("100%"); res.addComponent(keyField); res.addComponent(valueField); res.setExpandRatio(keyField, 1); res.setExpandRatio(valueField, 1); return res; }
class class_name[name] begin[{] method[addInfoLayout, return_type[type[HorizontalLayout]], modifier[default], parameter[key, value, editable]] begin[{] local_variable[type[HorizontalLayout], res] call[res.setWidth, parameter[literal["100%"]]] call[res.setSpacing, parameter[literal[true]]] local_variable[type[TextField], keyField] call[keyField.setValue, parameter[member[.key]]] call[keyField.setEnabled, parameter[member[.editable]]] call[keyField.setWidth, parameter[literal["100%"]]] local_variable[type[TextField], valueField] call[valueField.setValue, parameter[call[value.toString, parameter[]]]] call[valueField.setEnabled, parameter[member[.editable]]] call[valueField.setWidth, parameter[literal["100%"]]] call[res.addComponent, parameter[member[.keyField]]] call[res.addComponent, parameter[member[.valueField]]] call[res.setExpandRatio, parameter[member[.keyField], literal[1]]] call[res.setExpandRatio, parameter[member[.valueField], literal[1]]] return[member[.res]] end[}] END[}]
identifier[HorizontalLayout] identifier[addInfoLayout] operator[SEP] identifier[String] identifier[key] , identifier[Object] identifier[value] , Keyword[boolean] identifier[editable] operator[SEP] { identifier[HorizontalLayout] identifier[res] operator[=] Keyword[new] identifier[HorizontalLayout] operator[SEP] operator[SEP] operator[SEP] identifier[res] operator[SEP] identifier[setWidth] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[res] operator[SEP] identifier[setSpacing] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[TextField] identifier[keyField] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[keyField] operator[SEP] identifier[setValue] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[keyField] operator[SEP] identifier[setEnabled] operator[SEP] identifier[editable] operator[SEP] operator[SEP] identifier[keyField] operator[SEP] identifier[setWidth] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[TextField] identifier[valueField] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[valueField] operator[SEP] identifier[setValue] operator[SEP] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[valueField] operator[SEP] identifier[setEnabled] operator[SEP] identifier[editable] operator[SEP] operator[SEP] identifier[valueField] operator[SEP] identifier[setWidth] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[res] operator[SEP] identifier[addComponent] operator[SEP] identifier[keyField] operator[SEP] operator[SEP] identifier[res] operator[SEP] identifier[addComponent] operator[SEP] identifier[valueField] operator[SEP] operator[SEP] identifier[res] operator[SEP] identifier[setExpandRatio] operator[SEP] identifier[keyField] , Other[1] operator[SEP] operator[SEP] identifier[res] operator[SEP] identifier[setExpandRatio] operator[SEP] identifier[valueField] , Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[res] operator[SEP] }
public static boolean newDirectories(Path dir, FileAttribute<?>... attrs) throws IOException { Path directory = Files.createDirectories(dir, attrs); return Files.exists(directory); }
class class_name[name] begin[{] method[newDirectories, return_type[type[boolean]], modifier[public static], parameter[dir, attrs]] begin[{] local_variable[type[Path], directory] return[call[Files.exists, parameter[member[.directory]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[newDirectories] operator[SEP] identifier[Path] identifier[dir] , identifier[FileAttribute] operator[<] operator[?] operator[>] operator[...] identifier[attrs] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Path] identifier[directory] operator[=] identifier[Files] operator[SEP] identifier[createDirectories] operator[SEP] identifier[dir] , identifier[attrs] operator[SEP] operator[SEP] Keyword[return] identifier[Files] operator[SEP] identifier[exists] operator[SEP] identifier[directory] operator[SEP] operator[SEP] }
public byte[] convertToXmlByteArray(BucketTaggingConfiguration config) throws SdkClientException { XmlWriter xml = new XmlWriter(); xml.start("Tagging"); for (TagSet tagset : config.getAllTagSets()) { writeRule(xml, tagset); } xml.end(); return xml.getBytes(); }
class class_name[name] begin[{] method[convertToXmlByteArray, return_type[type[byte]], modifier[public], parameter[config]] begin[{] local_variable[type[XmlWriter], xml] call[xml.start, parameter[literal["Tagging"]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=xml, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tagset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAllTagSets, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tagset)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TagSet, sub_type=None))), label=None) call[xml.end, parameter[]] return[call[xml.getBytes, parameter[]]] end[}] END[}]
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[convertToXmlByteArray] operator[SEP] identifier[BucketTaggingConfiguration] identifier[config] operator[SEP] Keyword[throws] identifier[SdkClientException] { identifier[XmlWriter] identifier[xml] operator[=] Keyword[new] identifier[XmlWriter] operator[SEP] operator[SEP] operator[SEP] identifier[xml] operator[SEP] identifier[start] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[TagSet] identifier[tagset] operator[:] identifier[config] operator[SEP] identifier[getAllTagSets] operator[SEP] operator[SEP] operator[SEP] { identifier[writeRule] operator[SEP] identifier[xml] , identifier[tagset] operator[SEP] operator[SEP] } identifier[xml] operator[SEP] identifier[end] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[xml] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] }
private String dealWithUnsatisfiedXMLTimers(Map<String, List<com.ibm.ws.javaee.dd.ejb.Timer>> xmlTimers, BeanMetaData bmd) throws EJBConfigurationException { String mostRecentMethodWithError = null; for (Map.Entry<String, List<com.ibm.ws.javaee.dd.ejb.Timer>> entry : xmlTimers.entrySet()) { for (com.ibm.ws.javaee.dd.ejb.Timer timer : entry.getValue()) { String methodName = timer.getTimeoutMethod().getMethodName(); Tr.error(tc, "AUTOMATIC_TIMER_METHOD_NOT_FOUND_CNTR0210E", new Object[] { bmd.j2eeName.getComponent(), bmd.j2eeName.getModule(), methodName }); mostRecentMethodWithError = methodName; } } return mostRecentMethodWithError; }
class class_name[name] begin[{] method[dealWithUnsatisfiedXMLTimers, return_type[type[String]], modifier[private], parameter[xmlTimers, bmd]] begin[{] local_variable[type[String], mostRecentMethodWithError] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getTimeoutMethod, postfix_operators=[], prefix_operators=[], qualifier=timer, selectors=[MethodInvocation(arguments=[], member=getMethodName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=methodName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="AUTOMATIC_TIMER_METHOD_NOT_FOUND_CNTR0210E"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getComponent, postfix_operators=[], prefix_operators=[], qualifier=bmd.j2eeName, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getModule, postfix_operators=[], prefix_operators=[], qualifier=bmd.j2eeName, selectors=[], type_arguments=None), MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mostRecentMethodWithError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=timer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=ibm, sub_type=ReferenceType(arguments=None, dimensions=None, name=ws, sub_type=ReferenceType(arguments=None, dimensions=None, name=javaee, sub_type=ReferenceType(arguments=None, dimensions=None, name=dd, sub_type=ReferenceType(arguments=None, dimensions=None, name=ejb, sub_type=ReferenceType(arguments=None, dimensions=None, name=Timer, sub_type=None))))))))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=xmlTimers, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=ibm, sub_type=ReferenceType(arguments=None, dimensions=None, name=ws, sub_type=ReferenceType(arguments=None, dimensions=None, name=javaee, sub_type=ReferenceType(arguments=None, dimensions=None, name=dd, sub_type=ReferenceType(arguments=None, dimensions=None, name=ejb, sub_type=ReferenceType(arguments=None, dimensions=None, name=Timer, sub_type=None))))))))], dimensions=[], name=List, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) return[member[.mostRecentMethodWithError]] end[}] END[}]
Keyword[private] identifier[String] identifier[dealWithUnsatisfiedXMLTimers] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[javaee] operator[SEP] identifier[dd] operator[SEP] identifier[ejb] operator[SEP] identifier[Timer] operator[>] operator[>] identifier[xmlTimers] , identifier[BeanMetaData] identifier[bmd] operator[SEP] Keyword[throws] identifier[EJBConfigurationException] { identifier[String] identifier[mostRecentMethodWithError] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[List] operator[<] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[javaee] operator[SEP] identifier[dd] operator[SEP] identifier[ejb] operator[SEP] identifier[Timer] operator[>] operator[>] identifier[entry] operator[:] identifier[xmlTimers] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[javaee] operator[SEP] identifier[dd] operator[SEP] identifier[ejb] operator[SEP] identifier[Timer] identifier[timer] operator[:] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[methodName] operator[=] identifier[timer] operator[SEP] identifier[getTimeoutMethod] operator[SEP] operator[SEP] operator[SEP] identifier[getMethodName] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[bmd] operator[SEP] identifier[j2eeName] operator[SEP] identifier[getComponent] operator[SEP] operator[SEP] , identifier[bmd] operator[SEP] identifier[j2eeName] operator[SEP] identifier[getModule] operator[SEP] operator[SEP] , identifier[methodName] } operator[SEP] operator[SEP] identifier[mostRecentMethodWithError] operator[=] identifier[methodName] operator[SEP] } } Keyword[return] identifier[mostRecentMethodWithError] operator[SEP] }
private String nonControl(String s,int start) { String ret=""; cPos=s.indexOf("%",start); if (cPos==-1) cPos=s.length(); return s.substring(start,cPos); }
class class_name[name] begin[{] method[nonControl, return_type[type[String]], modifier[private], parameter[s, start]] begin[{] local_variable[type[String], ret] assign[member[.cPos], call[s.indexOf, parameter[literal["%"], member[.start]]]] if[binary_operation[member[.cPos], ==, literal[1]]] begin[{] assign[member[.cPos], call[s.length, parameter[]]] else begin[{] None end[}] return[call[s.substring, parameter[member[.start], member[.cPos]]]] end[}] END[}]
Keyword[private] identifier[String] identifier[nonControl] operator[SEP] identifier[String] identifier[s] , Keyword[int] identifier[start] operator[SEP] { identifier[String] identifier[ret] operator[=] literal[String] operator[SEP] identifier[cPos] operator[=] identifier[s] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , identifier[start] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cPos] operator[==] operator[-] Other[1] operator[SEP] identifier[cPos] operator[=] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[s] operator[SEP] identifier[substring] operator[SEP] identifier[start] , identifier[cPos] operator[SEP] operator[SEP] }
public ListIterator<E> listIterator(int index) { if (index < 0 || index > size) throw new IndexOutOfBoundsException("Index: "+index); return new ListItr(index); }
class class_name[name] begin[{] method[listIterator, return_type[type[ListIterator]], modifier[public], parameter[index]] begin[{] if[binary_operation[binary_operation[member[.index], <, literal[0]], ||, binary_operation[member[.index], >, member[.size]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Index: "), operandr=MemberReference(member=index, 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=IndexOutOfBoundsException, sub_type=None)), label=None) else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=index, 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=ListItr, sub_type=None))] end[}] END[}]
Keyword[public] identifier[ListIterator] operator[<] identifier[E] operator[>] identifier[listIterator] operator[SEP] Keyword[int] identifier[index] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[<] Other[0] operator[||] identifier[index] operator[>] identifier[size] operator[SEP] Keyword[throw] Keyword[new] identifier[IndexOutOfBoundsException] operator[SEP] literal[String] operator[+] identifier[index] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ListItr] operator[SEP] identifier[index] operator[SEP] operator[SEP] }
public static void addPlural(String match, String rule, boolean insensitive){ plurals.add(0, new Replacer(match, rule, insensitive)); }
class class_name[name] begin[{] method[addPlural, return_type[void], modifier[public static], parameter[match, rule, insensitive]] begin[{] call[plurals.add, parameter[literal[0], ClassCreator(arguments=[MemberReference(member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=insensitive, 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=Replacer, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[addPlural] operator[SEP] identifier[String] identifier[match] , identifier[String] identifier[rule] , Keyword[boolean] identifier[insensitive] operator[SEP] { identifier[plurals] operator[SEP] identifier[add] operator[SEP] Other[0] , Keyword[new] identifier[Replacer] operator[SEP] identifier[match] , identifier[rule] , identifier[insensitive] operator[SEP] operator[SEP] operator[SEP] }
@Override public void reset() { if (!iter.resetSupported()) { throw new IllegalStateException( "Cannot reset MultipleEpochsIterator with base iter that does not support reset"); } epochs = 0; lastBatch = batch; batch = 0; iterationsCounter.set(0); iter.reset(); }
class class_name[name] begin[{] method[reset, return_type[void], modifier[public], parameter[]] begin[{] if[call[iter.resetSupported, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot reset MultipleEpochsIterator with base iter that does not support reset")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.epochs], literal[0]] assign[member[.lastBatch], member[.batch]] assign[member[.batch], literal[0]] call[iterationsCounter.set, parameter[literal[0]]] call[iter.reset, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[reset] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[iter] operator[SEP] identifier[resetSupported] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[epochs] operator[=] Other[0] operator[SEP] identifier[lastBatch] operator[=] identifier[batch] operator[SEP] identifier[batch] operator[=] Other[0] operator[SEP] identifier[iterationsCounter] operator[SEP] identifier[set] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[iter] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] }
private static OBinaryRequest<? extends OBinaryResponse> createRequest(int requestType) { switch (requestType) { case OChannelBinaryProtocol.REQUEST_DB_OPEN: return new OOpenRequest(); case OChannelBinaryProtocol.REQUEST_CONNECT: return new OConnectRequest(); case OChannelBinaryProtocol.REQUEST_DB_REOPEN: return new OReopenRequest(); case OChannelBinaryProtocol.REQUEST_SHUTDOWN: return new OShutdownRequest(); case OChannelBinaryProtocol.REQUEST_DB_LIST: return new OListDatabasesRequest(); case OChannelBinaryProtocol.REQUEST_SERVER_INFO: return new OServerInfoRequest(); case OChannelBinaryProtocol.REQUEST_DB_RELOAD: return new OReloadRequest(); case OChannelBinaryProtocol.REQUEST_DB_CREATE: return new OCreateDatabaseRequest(); case OChannelBinaryProtocol.REQUEST_DB_CLOSE: return new OCloseRequest(); case OChannelBinaryProtocol.REQUEST_DB_EXIST: return new OExistsDatabaseRequest(); case OChannelBinaryProtocol.REQUEST_DB_DROP: return new ODropDatabaseRequest(); case OChannelBinaryProtocol.REQUEST_DB_SIZE: return new OGetSizeRequest(); case OChannelBinaryProtocol.REQUEST_DB_COUNTRECORDS: return new OCountRecordsRequest(); case OChannelBinaryProtocol.REQUEST_CLUSTER: return new ODistributedStatusRequest(); case OChannelBinaryProtocol.REQUEST_CLUSTER_COUNT: return new OCountRequest(); case OChannelBinaryProtocol.REQUEST_CLUSTER_DATARANGE: return new OGetClusterDataRangeRequest(); case OChannelBinaryProtocol.REQUEST_CLUSTER_ADD: return new OAddClusterRequest(); case OChannelBinaryProtocol.REQUEST_CLUSTER_DROP: return new ODropClusterRequest(); case OChannelBinaryProtocol.REQUEST_RECORD_METADATA: return new OGetRecordMetadataRequest(); case OChannelBinaryProtocol.REQUEST_RECORD_LOAD: return new OReadRecordRequest(); case OChannelBinaryProtocol.REQUEST_RECORD_LOAD_IF_VERSION_NOT_LATEST: return new OReadRecordIfVersionIsNotLatestRequest(); case OChannelBinaryProtocol.REQUEST_RECORD_CREATE: return new OCreateRecordRequest(); case OChannelBinaryProtocol.REQUEST_RECORD_UPDATE: return new OUpdateRecordRequest(); case OChannelBinaryProtocol.REQUEST_RECORD_DELETE: return new ODeleteRecordRequest(); case OChannelBinaryProtocol.REQUEST_RECORD_HIDE: return new OHideRecordRequest(); case OChannelBinaryProtocol.REQUEST_POSITIONS_HIGHER: return new OHigherPhysicalPositionsRequest(); case OChannelBinaryProtocol.REQUEST_POSITIONS_CEILING: return new OCeilingPhysicalPositionsRequest(); case OChannelBinaryProtocol.REQUEST_POSITIONS_LOWER: return new OLowerPhysicalPositionsRequest(); case OChannelBinaryProtocol.REQUEST_POSITIONS_FLOOR: return new OFloorPhysicalPositionsRequest(); case OChannelBinaryProtocol.REQUEST_COMMAND: return new OCommandRequest(); case OChannelBinaryProtocol.REQUEST_QUERY: return new OQueryRequest(); case OChannelBinaryProtocol.REQUEST_CLOSE_QUERY: return new OCloseQueryRequest(); case OChannelBinaryProtocol.REQUEST_QUERY_NEXT_PAGE: return new OQueryNextPageRequest(); case OChannelBinaryProtocol.REQUEST_TX_COMMIT: return new OCommitRequest(); case OChannelBinaryProtocol.REQUEST_CONFIG_GET: return new OGetGlobalConfigurationRequest(); case OChannelBinaryProtocol.REQUEST_CONFIG_SET: return new OSetGlobalConfigurationRequest(); case OChannelBinaryProtocol.REQUEST_CONFIG_LIST: return new OListGlobalConfigurationsRequest(); case OChannelBinaryProtocol.REQUEST_DB_FREEZE: return new OFreezeDatabaseRequest(); case OChannelBinaryProtocol.REQUEST_DB_RELEASE: return new OReleaseDatabaseRequest(); case OChannelBinaryProtocol.REQUEST_RECORD_CLEAN_OUT: return new OCleanOutRecordRequest(); case OChannelBinaryProtocol.REQUEST_CREATE_SBTREE_BONSAI: return new OSBTCreateTreeRequest(); case OChannelBinaryProtocol.REQUEST_SBTREE_BONSAI_GET: return new OSBTGetRequest(); case OChannelBinaryProtocol.REQUEST_SBTREE_BONSAI_FIRST_KEY: return new OSBTFirstKeyRequest(); case OChannelBinaryProtocol.REQUEST_SBTREE_BONSAI_GET_ENTRIES_MAJOR: return new OSBTFetchEntriesMajorRequest<>(); case OChannelBinaryProtocol.REQUEST_RIDBAG_GET_SIZE: return new OSBTGetRealBagSizeRequest(); case OChannelBinaryProtocol.REQUEST_INCREMENTAL_BACKUP: return new OIncrementalBackupRequest(); case OChannelBinaryProtocol.REQUEST_DB_IMPORT: return new OImportRequest(); case OChannelBinaryProtocol.DISTRIBUTED_CONNECT: return new ODistributedConnectRequest(); default: throw new ODatabaseException("binary protocol command with code: " + requestType); } }
class class_name[name] begin[{] method[createRequest, return_type[type[OBinaryRequest]], modifier[private static], parameter[requestType]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_OPEN, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OOpenRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_CONNECT, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OConnectRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_REOPEN, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OReopenRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_SHUTDOWN, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OShutdownRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_LIST, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OListDatabasesRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_SERVER_INFO, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OServerInfoRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_RELOAD, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OReloadRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_CREATE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OCreateDatabaseRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_CLOSE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OCloseRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_EXIST, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OExistsDatabaseRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_DROP, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ODropDatabaseRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_SIZE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OGetSizeRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_COUNTRECORDS, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OCountRecordsRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_CLUSTER, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ODistributedStatusRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_CLUSTER_COUNT, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OCountRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_CLUSTER_DATARANGE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OGetClusterDataRangeRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_CLUSTER_ADD, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OAddClusterRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_CLUSTER_DROP, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ODropClusterRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_RECORD_METADATA, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OGetRecordMetadataRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_RECORD_LOAD, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OReadRecordRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_RECORD_LOAD_IF_VERSION_NOT_LATEST, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OReadRecordIfVersionIsNotLatestRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_RECORD_CREATE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OCreateRecordRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_RECORD_UPDATE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OUpdateRecordRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_RECORD_DELETE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ODeleteRecordRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_RECORD_HIDE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OHideRecordRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_POSITIONS_HIGHER, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OHigherPhysicalPositionsRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_POSITIONS_CEILING, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OCeilingPhysicalPositionsRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_POSITIONS_LOWER, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OLowerPhysicalPositionsRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_POSITIONS_FLOOR, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OFloorPhysicalPositionsRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_COMMAND, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OCommandRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_QUERY, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OQueryRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_CLOSE_QUERY, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OCloseQueryRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_QUERY_NEXT_PAGE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OQueryNextPageRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_TX_COMMIT, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OCommitRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_CONFIG_GET, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OGetGlobalConfigurationRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_CONFIG_SET, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OSetGlobalConfigurationRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_CONFIG_LIST, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OListGlobalConfigurationsRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_FREEZE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OFreezeDatabaseRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_RELEASE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OReleaseDatabaseRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_RECORD_CLEAN_OUT, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OCleanOutRecordRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_CREATE_SBTREE_BONSAI, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OSBTCreateTreeRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_SBTREE_BONSAI_GET, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OSBTGetRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_SBTREE_BONSAI_FIRST_KEY, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OSBTFirstKeyRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_SBTREE_BONSAI_GET_ENTRIES_MAJOR, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=OSBTFetchEntriesMajorRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_RIDBAG_GET_SIZE, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OSBTGetRealBagSizeRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_INCREMENTAL_BACKUP, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OIncrementalBackupRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=REQUEST_DB_IMPORT, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OImportRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[MemberReference(member=DISTRIBUTED_CONNECT, postfix_operators=[], prefix_operators=[], qualifier=OChannelBinaryProtocol, selectors=[])], statements=[ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ODistributedConnectRequest, sub_type=None)), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="binary protocol command with code: "), operandr=MemberReference(member=requestType, 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=ODatabaseException, sub_type=None)), label=None)])], expression=MemberReference(member=requestType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[private] Keyword[static] identifier[OBinaryRequest] operator[<] operator[?] Keyword[extends] identifier[OBinaryResponse] operator[>] identifier[createRequest] operator[SEP] Keyword[int] identifier[requestType] operator[SEP] { Keyword[switch] operator[SEP] identifier[requestType] operator[SEP] { Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_OPEN] operator[:] Keyword[return] Keyword[new] identifier[OOpenRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_CONNECT] operator[:] Keyword[return] Keyword[new] identifier[OConnectRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_REOPEN] operator[:] Keyword[return] Keyword[new] identifier[OReopenRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_SHUTDOWN] operator[:] Keyword[return] Keyword[new] identifier[OShutdownRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_LIST] operator[:] Keyword[return] Keyword[new] identifier[OListDatabasesRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_SERVER_INFO] operator[:] Keyword[return] Keyword[new] identifier[OServerInfoRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_RELOAD] operator[:] Keyword[return] Keyword[new] identifier[OReloadRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_CREATE] operator[:] Keyword[return] Keyword[new] identifier[OCreateDatabaseRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_CLOSE] operator[:] Keyword[return] Keyword[new] identifier[OCloseRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_EXIST] operator[:] Keyword[return] Keyword[new] identifier[OExistsDatabaseRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_DROP] operator[:] Keyword[return] Keyword[new] identifier[ODropDatabaseRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_SIZE] operator[:] Keyword[return] Keyword[new] identifier[OGetSizeRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_COUNTRECORDS] operator[:] Keyword[return] Keyword[new] identifier[OCountRecordsRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_CLUSTER] operator[:] Keyword[return] Keyword[new] identifier[ODistributedStatusRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_CLUSTER_COUNT] operator[:] Keyword[return] Keyword[new] identifier[OCountRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_CLUSTER_DATARANGE] operator[:] Keyword[return] Keyword[new] identifier[OGetClusterDataRangeRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_CLUSTER_ADD] operator[:] Keyword[return] Keyword[new] identifier[OAddClusterRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_CLUSTER_DROP] operator[:] Keyword[return] Keyword[new] identifier[ODropClusterRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_RECORD_METADATA] operator[:] Keyword[return] Keyword[new] identifier[OGetRecordMetadataRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_RECORD_LOAD] operator[:] Keyword[return] Keyword[new] identifier[OReadRecordRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_RECORD_LOAD_IF_VERSION_NOT_LATEST] operator[:] Keyword[return] Keyword[new] identifier[OReadRecordIfVersionIsNotLatestRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_RECORD_CREATE] operator[:] Keyword[return] Keyword[new] identifier[OCreateRecordRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_RECORD_UPDATE] operator[:] Keyword[return] Keyword[new] identifier[OUpdateRecordRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_RECORD_DELETE] operator[:] Keyword[return] Keyword[new] identifier[ODeleteRecordRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_RECORD_HIDE] operator[:] Keyword[return] Keyword[new] identifier[OHideRecordRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_POSITIONS_HIGHER] operator[:] Keyword[return] Keyword[new] identifier[OHigherPhysicalPositionsRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_POSITIONS_CEILING] operator[:] Keyword[return] Keyword[new] identifier[OCeilingPhysicalPositionsRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_POSITIONS_LOWER] operator[:] Keyword[return] Keyword[new] identifier[OLowerPhysicalPositionsRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_POSITIONS_FLOOR] operator[:] Keyword[return] Keyword[new] identifier[OFloorPhysicalPositionsRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_COMMAND] operator[:] Keyword[return] Keyword[new] identifier[OCommandRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_QUERY] operator[:] Keyword[return] Keyword[new] identifier[OQueryRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_CLOSE_QUERY] operator[:] Keyword[return] Keyword[new] identifier[OCloseQueryRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_QUERY_NEXT_PAGE] operator[:] Keyword[return] Keyword[new] identifier[OQueryNextPageRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_TX_COMMIT] operator[:] Keyword[return] Keyword[new] identifier[OCommitRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_CONFIG_GET] operator[:] Keyword[return] Keyword[new] identifier[OGetGlobalConfigurationRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_CONFIG_SET] operator[:] Keyword[return] Keyword[new] identifier[OSetGlobalConfigurationRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_CONFIG_LIST] operator[:] Keyword[return] Keyword[new] identifier[OListGlobalConfigurationsRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_FREEZE] operator[:] Keyword[return] Keyword[new] identifier[OFreezeDatabaseRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_RELEASE] operator[:] Keyword[return] Keyword[new] identifier[OReleaseDatabaseRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_RECORD_CLEAN_OUT] operator[:] Keyword[return] Keyword[new] identifier[OCleanOutRecordRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_CREATE_SBTREE_BONSAI] operator[:] Keyword[return] Keyword[new] identifier[OSBTCreateTreeRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_SBTREE_BONSAI_GET] operator[:] Keyword[return] Keyword[new] identifier[OSBTGetRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_SBTREE_BONSAI_FIRST_KEY] operator[:] Keyword[return] Keyword[new] identifier[OSBTFirstKeyRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_SBTREE_BONSAI_GET_ENTRIES_MAJOR] operator[:] Keyword[return] Keyword[new] identifier[OSBTFetchEntriesMajorRequest] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_RIDBAG_GET_SIZE] operator[:] Keyword[return] Keyword[new] identifier[OSBTGetRealBagSizeRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_INCREMENTAL_BACKUP] operator[:] Keyword[return] Keyword[new] identifier[OIncrementalBackupRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[REQUEST_DB_IMPORT] operator[:] Keyword[return] Keyword[new] identifier[OImportRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[OChannelBinaryProtocol] operator[SEP] identifier[DISTRIBUTED_CONNECT] operator[:] Keyword[return] Keyword[new] identifier[ODistributedConnectRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[ODatabaseException] operator[SEP] literal[String] operator[+] identifier[requestType] operator[SEP] operator[SEP] } }
private double[] replacementVector(double[][] distanceMatrix) { double[] replacementVector = new double[distanceMatrix.length - 1]; // Energy between archive member k and new solution double[] individualEnergy = new double[distanceMatrix.length - 1]; // Sum of all individual energies double totalEnergy = 0.0; for (int i = 0; i < replacementVector.length; i++) { individualEnergy[i] = scalarization.getAttribute(archive.get(i)) / distanceMatrix[i][maxSize]; totalEnergy += individualEnergy[i]; } for (int i = 0; i < individualEnergy.length; i++) { replacementVector[i] = totalEnergy - individualEnergy[i]; replacementVector[i] *= scalarization.getAttribute(archive.get(maxSize)); } return replacementVector; }
class class_name[name] begin[{] method[replacementVector, return_type[type[double]], modifier[private], parameter[distanceMatrix]] begin[{] local_variable[type[double], replacementVector] local_variable[type[double], individualEnergy] local_variable[type[double], totalEnergy] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=individualEnergy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=archive, selectors=[], type_arguments=None)], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=scalarization, selectors=[], type_arguments=None), operandr=MemberReference(member=distanceMatrix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=maxSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=/)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=totalEnergy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=individualEnergy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=replacementVector, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=replacementVector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=MemberReference(member=totalEnergy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=individualEnergy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=replacementVector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=*=, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=maxSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=archive, selectors=[], type_arguments=None)], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=scalarization, 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=individualEnergy, 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[.replacementVector]] end[}] END[}]
Keyword[private] Keyword[double] operator[SEP] operator[SEP] identifier[replacementVector] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[distanceMatrix] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] identifier[replacementVector] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[distanceMatrix] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[individualEnergy] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[distanceMatrix] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[double] identifier[totalEnergy] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[replacementVector] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[individualEnergy] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[scalarization] operator[SEP] identifier[getAttribute] operator[SEP] identifier[archive] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[/] identifier[distanceMatrix] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[maxSize] operator[SEP] operator[SEP] identifier[totalEnergy] operator[+=] identifier[individualEnergy] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[individualEnergy] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[replacementVector] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[totalEnergy] operator[-] identifier[individualEnergy] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[replacementVector] operator[SEP] identifier[i] operator[SEP] operator[*=] identifier[scalarization] operator[SEP] identifier[getAttribute] operator[SEP] identifier[archive] operator[SEP] identifier[get] operator[SEP] identifier[maxSize] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[replacementVector] operator[SEP] }
public static StatDescriptor[] listStatMembers(StatDescriptor sd, boolean recursive) { if (disabled) return null; ModuleItem module = null; if (sd == null) module = moduleRoot; // root else module = findModuleItem(sd.getPath()); if (module == null) return null; else { ArrayList list = module.listChildStatDescriptors(recursive); int n = list.size(); StatDescriptor[] ret = new StatDescriptor[n]; for (int k = 0; k < n; k++) ret[k] = (StatDescriptor) list.get(k); return ret; } }
class class_name[name] begin[{] method[listStatMembers, return_type[type[StatDescriptor]], modifier[public static], parameter[sd, recursive]] begin[{] if[member[.disabled]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[ModuleItem], module] if[binary_operation[member[.sd], ==, literal[null]]] begin[{] assign[member[.module], member[.moduleRoot]] else begin[{] assign[member[.module], call[.findModuleItem, parameter[call[sd.getPath, parameter[]]]]] end[}] if[binary_operation[member[.module], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] local_variable[type[ArrayList], list] local_variable[type[int], n] local_variable[type[StatDescriptor], ret] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=ret, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=StatDescriptor, sub_type=None))), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.ret]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[StatDescriptor] operator[SEP] operator[SEP] identifier[listStatMembers] operator[SEP] identifier[StatDescriptor] identifier[sd] , Keyword[boolean] identifier[recursive] operator[SEP] { Keyword[if] operator[SEP] identifier[disabled] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[ModuleItem] identifier[module] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[sd] operator[==] Other[null] operator[SEP] identifier[module] operator[=] identifier[moduleRoot] operator[SEP] Keyword[else] identifier[module] operator[=] identifier[findModuleItem] operator[SEP] identifier[sd] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[module] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[else] { identifier[ArrayList] identifier[list] operator[=] identifier[module] operator[SEP] identifier[listChildStatDescriptors] operator[SEP] identifier[recursive] operator[SEP] operator[SEP] Keyword[int] identifier[n] operator[=] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[StatDescriptor] operator[SEP] operator[SEP] identifier[ret] operator[=] Keyword[new] identifier[StatDescriptor] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[n] operator[SEP] identifier[k] operator[++] operator[SEP] identifier[ret] operator[SEP] identifier[k] operator[SEP] operator[=] operator[SEP] identifier[StatDescriptor] operator[SEP] identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[k] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] } }
public static List<ScanRange> intersection(ScanRange left, ScanRange right) { List<ScanRange> unwrappedLeft = left.unwrapped(); List<ScanRange> unwrappedRight = right.unwrapped(); boolean leftWrapped = unwrappedLeft.size() > 1; boolean rightWrapped = unwrappedRight.size() > 1; if (!leftWrapped && !rightWrapped) { // Neither side wrapped the token range, so a simple intersection is all that is required. // Save some cycles by comparing the ranges directly. ScanRange intersection = intersectionUnwrapped(left, right); if (intersection == null) { return ImmutableList.of(); } return ImmutableList.of(intersection); } List<ScanRange> intersections = Lists.newArrayListWithExpectedSize(2); for (ScanRange l : unwrappedLeft) { for (ScanRange r : unwrappedRight) { ScanRange intersection = intersectionUnwrapped(l, r); if (intersection != null) { intersections.add(intersection); } } } if (intersections.size() > 1) { // For consistency always return the intersections sorted from low- to high-range. Collections.sort(intersections); // If multiple ranges are contiguous then join them. This can happen if one of the ranges is "all". for (int i = intersections.size() - 1; i > 0; i--) { if (intersections.get(i-1)._to.equals(intersections.get(i)._from)) { intersections.set(i-1, ScanRange.create(intersections.get(i-1)._from, intersections.get(i)._to)); intersections.remove(i); } } // If the intersections represent a contiguous high- to low-end wrapped range then combine them. if (intersections.size() == 2 && intersections.get(0)._from.equals(MIN_VALUE) && intersections.get(1)._to.equals(MAX_VALUE)) { ScanRange combined = ScanRange.create(intersections.get(1)._from, intersections.get(0)._to); intersections.clear(); intersections.add(combined); } } return intersections; }
class class_name[name] begin[{] method[intersection, return_type[type[List]], modifier[public static], parameter[left, right]] begin[{] local_variable[type[List], unwrappedLeft] local_variable[type[List], unwrappedRight] local_variable[type[boolean], leftWrapped] local_variable[type[boolean], rightWrapped] if[binary_operation[member[.leftWrapped], &&, member[.rightWrapped]]] begin[{] local_variable[type[ScanRange], intersection] if[binary_operation[member[.intersection], ==, literal[null]]] begin[{] return[call[ImmutableList.of, parameter[]]] else begin[{] None end[}] return[call[ImmutableList.of, parameter[member[.intersection]]]] else begin[{] None end[}] local_variable[type[List], intersections] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=intersectionUnwrapped, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=intersection)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ScanRange, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=intersection, 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=intersection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=intersections, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=unwrappedRight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=r)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ScanRange, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=unwrappedLeft, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=l)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ScanRange, sub_type=None))), label=None) if[binary_operation[call[intersections.size, parameter[]], >, literal[1]]] begin[{] call[Collections.sort, parameter[member[.intersections]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=get, postfix_operators=[], prefix_operators=[], qualifier=intersections, selectors=[MemberReference(member=_to, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=intersections, selectors=[MemberReference(member=_from, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=get, postfix_operators=[], prefix_operators=[], qualifier=intersections, selectors=[MemberReference(member=_from, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=intersections, selectors=[MemberReference(member=_to, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)], member=create, postfix_operators=[], prefix_operators=[], qualifier=ScanRange, selectors=[], type_arguments=None)], member=set, postfix_operators=[], prefix_operators=[], qualifier=intersections, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=intersections, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=intersections, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[binary_operation[binary_operation[call[intersections.size, parameter[]], ==, literal[2]], &&, call[intersections.get, parameter[literal[0]]]], &&, call[intersections.get, parameter[literal[1]]]]] begin[{] local_variable[type[ScanRange], combined] call[intersections.clear, parameter[]] call[intersections.add, parameter[member[.combined]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.intersections]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[ScanRange] operator[>] identifier[intersection] operator[SEP] identifier[ScanRange] identifier[left] , identifier[ScanRange] identifier[right] operator[SEP] { identifier[List] operator[<] identifier[ScanRange] operator[>] identifier[unwrappedLeft] operator[=] identifier[left] operator[SEP] identifier[unwrapped] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ScanRange] operator[>] identifier[unwrappedRight] operator[=] identifier[right] operator[SEP] identifier[unwrapped] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[leftWrapped] operator[=] identifier[unwrappedLeft] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] Keyword[boolean] identifier[rightWrapped] operator[=] identifier[unwrappedRight] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[leftWrapped] operator[&&] operator[!] identifier[rightWrapped] operator[SEP] { identifier[ScanRange] identifier[intersection] operator[=] identifier[intersectionUnwrapped] operator[SEP] identifier[left] , identifier[right] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[intersection] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[ImmutableList] operator[SEP] identifier[of] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[ImmutableList] operator[SEP] identifier[of] operator[SEP] identifier[intersection] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[ScanRange] operator[>] identifier[intersections] operator[=] identifier[Lists] operator[SEP] identifier[newArrayListWithExpectedSize] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ScanRange] identifier[l] operator[:] identifier[unwrappedLeft] operator[SEP] { Keyword[for] operator[SEP] identifier[ScanRange] identifier[r] operator[:] identifier[unwrappedRight] operator[SEP] { identifier[ScanRange] identifier[intersection] operator[=] identifier[intersectionUnwrapped] operator[SEP] identifier[l] , identifier[r] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[intersection] operator[!=] Other[null] operator[SEP] { identifier[intersections] operator[SEP] identifier[add] operator[SEP] identifier[intersection] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[intersections] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[intersections] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[intersections] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[i] operator[>] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { Keyword[if] operator[SEP] identifier[intersections] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] identifier[_to] operator[SEP] identifier[equals] operator[SEP] identifier[intersections] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[_from] operator[SEP] operator[SEP] { identifier[intersections] operator[SEP] identifier[set] operator[SEP] identifier[i] operator[-] Other[1] , identifier[ScanRange] operator[SEP] identifier[create] operator[SEP] identifier[intersections] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] identifier[_from] , identifier[intersections] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[_to] operator[SEP] operator[SEP] operator[SEP] identifier[intersections] operator[SEP] identifier[remove] operator[SEP] identifier[i] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[intersections] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[2] operator[&&] identifier[intersections] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[_from] operator[SEP] identifier[equals] operator[SEP] identifier[MIN_VALUE] operator[SEP] operator[&&] identifier[intersections] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[_to] operator[SEP] identifier[equals] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] { identifier[ScanRange] identifier[combined] operator[=] identifier[ScanRange] operator[SEP] identifier[create] operator[SEP] identifier[intersections] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[_from] , identifier[intersections] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[_to] operator[SEP] operator[SEP] identifier[intersections] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[intersections] operator[SEP] identifier[add] operator[SEP] identifier[combined] operator[SEP] operator[SEP] } } Keyword[return] identifier[intersections] operator[SEP] }
public static ClientOptions of(ClientOptions baseOptions, ClientOptions options) { // TODO(trustin): Reduce the cost of creating a derived ClientOptions. requireNonNull(baseOptions, "baseOptions"); requireNonNull(options, "options"); return new ClientOptions(baseOptions, options); }
class class_name[name] begin[{] method[of, return_type[type[ClientOptions]], modifier[public static], parameter[baseOptions, options]] begin[{] call[.requireNonNull, parameter[member[.baseOptions], literal["baseOptions"]]] call[.requireNonNull, parameter[member[.options], literal["options"]]] return[ClassCreator(arguments=[MemberReference(member=baseOptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=options, 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=ClientOptions, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ClientOptions] identifier[of] operator[SEP] identifier[ClientOptions] identifier[baseOptions] , identifier[ClientOptions] identifier[options] operator[SEP] { identifier[requireNonNull] operator[SEP] identifier[baseOptions] , literal[String] operator[SEP] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[options] , literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ClientOptions] operator[SEP] identifier[baseOptions] , identifier[options] operator[SEP] operator[SEP] }
public void addTrainingInstance(String label, List<String> features) { maxent.addInstance(label,features); }
class class_name[name] begin[{] method[addTrainingInstance, return_type[void], modifier[public], parameter[label, features]] begin[{] call[maxent.addInstance, parameter[member[.label], member[.features]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addTrainingInstance] operator[SEP] identifier[String] identifier[label] , identifier[List] operator[<] identifier[String] operator[>] identifier[features] operator[SEP] { identifier[maxent] operator[SEP] identifier[addInstance] operator[SEP] identifier[label] , identifier[features] operator[SEP] operator[SEP] }
protected void enterTypevars(Type t) { if (t.getEnclosingType() != null && t.getEnclosingType().hasTag(CLASS)) enterTypevars(t.getEnclosingType()); for (List<Type> xs = t.getTypeArguments(); xs.nonEmpty(); xs = xs.tail) typevars.enter(xs.head.tsym); }
class class_name[name] begin[{] method[enterTypevars, return_type[void], modifier[protected], parameter[t]] begin[{] if[binary_operation[binary_operation[call[t.getEnclosingType, parameter[]], !=, literal[null]], &&, call[t.getEnclosingType, parameter[]]]] begin[{] call[.enterTypevars, parameter[call[t.getEnclosingType, parameter[]]]] else begin[{] None end[}] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tsym, postfix_operators=[], prefix_operators=[], qualifier=xs.head, selectors=[])], member=enter, postfix_operators=[], prefix_operators=[], qualifier=typevars, selectors=[], type_arguments=None), label=None), control=ForControl(condition=MethodInvocation(arguments=[], member=nonEmpty, postfix_operators=[], prefix_operators=[], qualifier=xs, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=getTypeArguments, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), name=xs)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None))], dimensions=[], name=List, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=xs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=tail, postfix_operators=[], prefix_operators=[], qualifier=xs, selectors=[]))]), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[enterTypevars] operator[SEP] identifier[Type] identifier[t] operator[SEP] { Keyword[if] operator[SEP] identifier[t] operator[SEP] identifier[getEnclosingType] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[t] operator[SEP] identifier[getEnclosingType] operator[SEP] operator[SEP] operator[SEP] identifier[hasTag] operator[SEP] identifier[CLASS] operator[SEP] operator[SEP] identifier[enterTypevars] operator[SEP] identifier[t] operator[SEP] identifier[getEnclosingType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[List] operator[<] identifier[Type] operator[>] identifier[xs] operator[=] identifier[t] operator[SEP] identifier[getTypeArguments] operator[SEP] operator[SEP] operator[SEP] identifier[xs] operator[SEP] identifier[nonEmpty] operator[SEP] operator[SEP] operator[SEP] identifier[xs] operator[=] identifier[xs] operator[SEP] identifier[tail] operator[SEP] identifier[typevars] operator[SEP] identifier[enter] operator[SEP] identifier[xs] operator[SEP] identifier[head] operator[SEP] identifier[tsym] operator[SEP] operator[SEP] }
public synchronized void throwQuorumException(String msg) throws QuorumException { Preconditions.checkState(!exceptions.isEmpty()); throw QuorumException.create(msg, successes, exceptions); }
class class_name[name] begin[{] method[throwQuorumException, return_type[void], modifier[synchronized public], parameter[msg]] begin[{] call[Preconditions.checkState, parameter[call[exceptions.isEmpty, parameter[]]]] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=successes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=exceptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=QuorumException, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[throwQuorumException] operator[SEP] identifier[String] identifier[msg] operator[SEP] Keyword[throws] identifier[QuorumException] { identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] operator[!] identifier[exceptions] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[QuorumException] operator[SEP] identifier[create] operator[SEP] identifier[msg] , identifier[successes] , identifier[exceptions] operator[SEP] operator[SEP] }
private double getHistoryErrorRate(List<Integer> predHistory){ double sumCorrect = 0; for (Integer e : predHistory) { sumCorrect += e; } return 1. - (sumCorrect / predHistory.size()); }
class class_name[name] begin[{] method[getHistoryErrorRate, return_type[type[double]], modifier[private], parameter[predHistory]] begin[{] local_variable[type[double], sumCorrect] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sumCorrect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=predHistory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None) return[binary_operation[literal[1.], -, binary_operation[member[.sumCorrect], /, call[predHistory.size, parameter[]]]]] end[}] END[}]
Keyword[private] Keyword[double] identifier[getHistoryErrorRate] operator[SEP] identifier[List] operator[<] identifier[Integer] operator[>] identifier[predHistory] operator[SEP] { Keyword[double] identifier[sumCorrect] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Integer] identifier[e] operator[:] identifier[predHistory] operator[SEP] { identifier[sumCorrect] operator[+=] identifier[e] operator[SEP] } Keyword[return] literal[Float] operator[-] operator[SEP] identifier[sumCorrect] operator[/] identifier[predHistory] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void destroyInternal() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, "destroyInternal; " + this); } // Stop and destroy the chain. Ignore exceptions try { this.cf.stopChainInternal(getChain(), 0); this.cf.destroyChainInternal(getChain()); } catch (ChannelException e) { // No FFDC required } catch (ChainException e) { // No FFCD required } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.exit(tc, "destroyInternal"); } }
class class_name[name] begin[{] method[destroyInternal, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], binary_operation[literal["destroyInternal; "], +, THIS[]]]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=cf, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getChain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=stopChainInternal, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=cf, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getChain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=destroyChainInternal, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ChannelException'])), CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ChainException']))], finally_block=None, label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["destroyInternal"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[destroyInternal] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[+] Keyword[this] operator[SEP] operator[SEP] } Keyword[try] { Keyword[this] operator[SEP] identifier[cf] operator[SEP] identifier[stopChainInternal] operator[SEP] identifier[getChain] operator[SEP] operator[SEP] , Other[0] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[cf] operator[SEP] identifier[destroyChainInternal] operator[SEP] identifier[getChain] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ChannelException] identifier[e] operator[SEP] { } Keyword[catch] operator[SEP] identifier[ChainException] identifier[e] operator[SEP] { } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } }
public static SingleColumnFilterFactory getOperator(String condition, boolean idPresent, boolean useFilter) { if (condition.equals("=")) { return SingleColumnFilterFactory.EQUAL; } else if (condition.equals(">")) { return SingleColumnFilterFactory.GREATER; } else if (condition.equals("<")) { return SingleColumnFilterFactory.LESS; } else if (condition.equals(">=")) { return SingleColumnFilterFactory.GREATER_OR_EQUAL; } else if (condition.equals("<=")) { return SingleColumnFilterFactory.LESS_OR_EQUAL; } else if (condition.equals("<>")) { return SingleColumnFilterFactory.NOT_EQUAL; } else if (condition.equals("LIKE")) { return SingleColumnFilterFactory.LIKE; } else if (condition.equals("REGEXP")) { return SingleColumnFilterFactory.REGEXP; } else if (useFilter) { if (!idPresent) { throw new UnsupportedOperationException(" Condition " + condition + " is not suported in hbase!"); } else { throw new UnsupportedOperationException(" Condition " + condition + " is not suported for query on row key!"); } } return null; }
class class_name[name] begin[{] method[getOperator, return_type[type[SingleColumnFilterFactory]], modifier[public static], parameter[condition, idPresent, useFilter]] begin[{] if[call[condition.equals, parameter[literal["="]]]] begin[{] return[member[SingleColumnFilterFactory.EQUAL]] else begin[{] if[call[condition.equals, parameter[literal[">"]]]] begin[{] return[member[SingleColumnFilterFactory.GREATER]] else begin[{] if[call[condition.equals, parameter[literal["<"]]]] begin[{] return[member[SingleColumnFilterFactory.LESS]] else begin[{] if[call[condition.equals, parameter[literal[">="]]]] begin[{] return[member[SingleColumnFilterFactory.GREATER_OR_EQUAL]] else begin[{] if[call[condition.equals, parameter[literal["<="]]]] begin[{] return[member[SingleColumnFilterFactory.LESS_OR_EQUAL]] else begin[{] if[call[condition.equals, parameter[literal["<>"]]]] begin[{] return[member[SingleColumnFilterFactory.NOT_EQUAL]] else begin[{] if[call[condition.equals, parameter[literal["LIKE"]]]] begin[{] return[member[SingleColumnFilterFactory.LIKE]] else begin[{] if[call[condition.equals, parameter[literal["REGEXP"]]]] begin[{] return[member[SingleColumnFilterFactory.REGEXP]] else begin[{] if[member[.useFilter]] begin[{] if[member[.idPresent]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" Condition "), operandr=MemberReference(member=condition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is not suported in hbase!"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None) else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" Condition "), operandr=MemberReference(member=condition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is not suported for query on row key!"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None) end[}] else begin[{] None end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[SingleColumnFilterFactory] identifier[getOperator] operator[SEP] identifier[String] identifier[condition] , Keyword[boolean] identifier[idPresent] , Keyword[boolean] identifier[useFilter] operator[SEP] { Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[SingleColumnFilterFactory] operator[SEP] identifier[EQUAL] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[SingleColumnFilterFactory] operator[SEP] identifier[GREATER] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[SingleColumnFilterFactory] operator[SEP] identifier[LESS] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[SingleColumnFilterFactory] operator[SEP] identifier[GREATER_OR_EQUAL] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[SingleColumnFilterFactory] operator[SEP] identifier[LESS_OR_EQUAL] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[SingleColumnFilterFactory] operator[SEP] identifier[NOT_EQUAL] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[SingleColumnFilterFactory] operator[SEP] identifier[LIKE] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[condition] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[SingleColumnFilterFactory] operator[SEP] identifier[REGEXP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[useFilter] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[idPresent] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[+] identifier[condition] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[+] identifier[condition] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public static Map<String, List<URL>> getStageLibrariesClasspaths(String stageLibrariesDir, String librariesExtraDir, final Set<String> stageLibs, String libsCommonLibDir) throws Exception { Map<String, List<URL>> map = new LinkedHashMap<String, List<URL>>(); File baseDir = new File(stageLibrariesDir).getAbsoluteFile(); if (baseDir.exists()) { File[] libDirs = baseDir.listFiles(createStageLibFilter(stageLibs)); StringBuilder commonLibJars = new StringBuilder(); if (libsCommonLibDir != null) { commonLibJars.append(new File(libsCommonLibDir).getAbsolutePath()).append(FILE_SEPARATOR).append(JARS_WILDCARD). append(CLASSPATH_SEPARATOR); } for (File libDir : libDirs) { File jarsDir = new File(libDir, STAGE_LIB_JARS_DIR); File etc = new File(libDir, STAGE_LIB_CONF_DIR); if (!jarsDir.exists()) { throw new IllegalArgumentException(String.format(MISSING_STAGE_LIB_JARS_DIR_MSG, libDir)); } StringBuilder sb = new StringBuilder(); if (etc.exists()) { sb.append(etc.getAbsolutePath()).append(FILE_SEPARATOR).append(CLASSPATH_SEPARATOR); } sb.append(commonLibJars); sb.append(jarsDir.getAbsolutePath()).append(FILE_SEPARATOR).append(JARS_WILDCARD); // add extralibs if avail if (librariesExtraDir != null) { File libExtraDir = new File(librariesExtraDir, libDir.getName()); if (libExtraDir.exists()) { File extraJarsDir = new File(libExtraDir, STAGE_LIB_JARS_DIR); if (extraJarsDir.exists()) { sb.append(CLASSPATH_SEPARATOR).append(extraJarsDir.getAbsolutePath()).append(FILE_SEPARATOR). append(JARS_WILDCARD); } File extraEtc = new File(libExtraDir, STAGE_LIB_CONF_DIR); if (extraEtc.exists()) { sb.append(CLASSPATH_SEPARATOR).append(extraEtc.getAbsolutePath()); } } } map.put(libDir.getParentFile().getName() + FILE_SEPARATOR + libDir.getName(), getClasspathUrls(sb.toString())); } } else { throw new IllegalArgumentException(String.format(MISSING_STAGE_LIBRARIES_DIR_MSG, baseDir)); } return map; }
class class_name[name] begin[{] method[getStageLibrariesClasspaths, return_type[type[Map]], modifier[public static], parameter[stageLibrariesDir, librariesExtraDir, stageLibs, libsCommonLibDir]] begin[{] local_variable[type[Map], map] local_variable[type[File], baseDir] if[call[baseDir.exists, parameter[]]] begin[{] local_variable[type[File], libDirs] local_variable[type[StringBuilder], commonLibJars] if[binary_operation[member[.libsCommonLibDir], !=, literal[null]]] begin[{] call[commonLibJars.append, parameter[ClassCreator(arguments=[MemberReference(member=libsCommonLibDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=libDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=STAGE_LIB_JARS_DIR, 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=jarsDir)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=libDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=STAGE_LIB_CONF_DIR, 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=etc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=['!'], qualifier=jarsDir, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=MISSING_STAGE_LIB_JARS_DIR_MSG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=libDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None)), name=sb)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=[], qualifier=etc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=etc, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=FILE_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=CLASSPATH_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=commonLibJars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=jarsDir, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=FILE_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=JARS_WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=librariesExtraDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=librariesExtraDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=libDir, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), name=libExtraDir)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=[], qualifier=libExtraDir, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=libExtraDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=STAGE_LIB_JARS_DIR, 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=extraJarsDir)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=[], qualifier=extraJarsDir, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CLASSPATH_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=extraJarsDir, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=FILE_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=JARS_WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=libExtraDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=STAGE_LIB_CONF_DIR, 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=extraEtc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=[], qualifier=extraEtc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CLASSPATH_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=extraEtc, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))]))])), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getParentFile, postfix_operators=[], prefix_operators=[], qualifier=libDir, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MemberReference(member=FILE_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=libDir, selectors=[], type_arguments=None), operator=+), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None)], member=getClasspathUrls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=libDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=libDir)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) else begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=MISSING_STAGE_LIBRARIES_DIR_MSG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=baseDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] return[member[.map]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[URL] operator[>] operator[>] identifier[getStageLibrariesClasspaths] operator[SEP] identifier[String] identifier[stageLibrariesDir] , identifier[String] identifier[librariesExtraDir] , Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[stageLibs] , identifier[String] identifier[libsCommonLibDir] operator[SEP] Keyword[throws] identifier[Exception] { identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[URL] operator[>] operator[>] identifier[map] operator[=] Keyword[new] identifier[LinkedHashMap] operator[<] identifier[String] , identifier[List] operator[<] identifier[URL] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[File] identifier[baseDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[stageLibrariesDir] operator[SEP] operator[SEP] identifier[getAbsoluteFile] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[baseDir] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[File] operator[SEP] operator[SEP] identifier[libDirs] operator[=] identifier[baseDir] operator[SEP] identifier[listFiles] operator[SEP] identifier[createStageLibFilter] operator[SEP] identifier[stageLibs] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[commonLibJars] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[libsCommonLibDir] operator[!=] Other[null] operator[SEP] { identifier[commonLibJars] operator[SEP] identifier[append] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[libsCommonLibDir] operator[SEP] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[FILE_SEPARATOR] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[JARS_WILDCARD] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[CLASSPATH_SEPARATOR] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[File] identifier[libDir] operator[:] identifier[libDirs] operator[SEP] { identifier[File] identifier[jarsDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[libDir] , identifier[STAGE_LIB_JARS_DIR] operator[SEP] operator[SEP] identifier[File] identifier[etc] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[libDir] , identifier[STAGE_LIB_CONF_DIR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[jarsDir] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[MISSING_STAGE_LIB_JARS_DIR_MSG] , identifier[libDir] operator[SEP] operator[SEP] operator[SEP] } identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[etc] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[etc] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[FILE_SEPARATOR] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[CLASSPATH_SEPARATOR] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[commonLibJars] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[jarsDir] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[FILE_SEPARATOR] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[JARS_WILDCARD] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[librariesExtraDir] operator[!=] Other[null] operator[SEP] { identifier[File] identifier[libExtraDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[librariesExtraDir] , identifier[libDir] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[libExtraDir] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[File] identifier[extraJarsDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[libExtraDir] , identifier[STAGE_LIB_JARS_DIR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[extraJarsDir] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[CLASSPATH_SEPARATOR] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[extraJarsDir] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[FILE_SEPARATOR] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[JARS_WILDCARD] operator[SEP] operator[SEP] } identifier[File] identifier[extraEtc] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[libExtraDir] , identifier[STAGE_LIB_CONF_DIR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[extraEtc] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[CLASSPATH_SEPARATOR] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[extraEtc] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[libDir] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] identifier[FILE_SEPARATOR] operator[+] identifier[libDir] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[getClasspathUrls] operator[SEP] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[MISSING_STAGE_LIBRARIES_DIR_MSG] , identifier[baseDir] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[map] operator[SEP] }
public EEnum getCPCVSFlags() { if (cpcvsFlagsEEnum == null) { cpcvsFlagsEEnum = (EEnum)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(14); } return cpcvsFlagsEEnum; }
class class_name[name] begin[{] method[getCPCVSFlags, return_type[type[EEnum]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.cpcvsFlagsEEnum], ==, literal[null]]] begin[{] assign[member[.cpcvsFlagsEEnum], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=14)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EEnum, sub_type=None))] else begin[{] None end[}] return[member[.cpcvsFlagsEEnum]] end[}] END[}]
Keyword[public] identifier[EEnum] identifier[getCPCVSFlags] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[cpcvsFlagsEEnum] operator[==] Other[null] operator[SEP] { identifier[cpcvsFlagsEEnum] operator[=] operator[SEP] identifier[EEnum] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[AfplibPackage] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[14] operator[SEP] operator[SEP] } Keyword[return] identifier[cpcvsFlagsEEnum] operator[SEP] }
public int startServer() throws IOException, InterruptedException { long serverStart = System.currentTimeMillis(); // The port file is locked and the server port and cookie is written into it. portFile = getPortFile(portfilename); synchronized (portFile) { portFile.lock(); portFile.getValues(); if (portFile.containsPortInfo()) { Log.debug("Javac server not started because portfile exists!"); portFile.unlock(); return Result.ERROR.exitCode; } // .-----------. .--------. .------. // socket -->| IdleReset |-->| Pooled |-->| Impl |--> javac // '-----------' '--------' '------' sjavac = new SjavacImpl(); sjavac = new PooledSjavac(sjavac, poolsize); sjavac = new IdleResetSjavac(sjavac, this, keepalive * 1000); serverSocket = new ServerSocket(); InetAddress localhost = InetAddress.getByName(null); serverSocket.bind(new InetSocketAddress(localhost, 0)); // At this point the server accepts connections, so it is now safe // to publish the port / cookie information portFile.setValues(getPort(), getCookie()); portFile.unlock(); } portFileMonitor = new PortFileMonitor(portFile, this); portFileMonitor.start(); Log.debug("Sjavac server started. Accepting connections..."); Log.debug(" port: " + getPort()); Log.debug(" time: " + new java.util.Date()); Log.debug(" poolsize: " + poolsize); keepAcceptingRequests.set(true); do { try { Socket socket = serverSocket.accept(); new RequestHandler(socket, sjavac).start(); } catch (SocketException se) { // Caused by serverSocket.close() and indicates shutdown } } while (keepAcceptingRequests.get()); Log.debug("Shutting down."); // No more connections accepted. If any client managed to connect after // the accept() was interrupted but before the server socket is closed // here, any attempt to read or write to the socket will result in an // IOException on the client side. long realTime = System.currentTimeMillis() - serverStart; Log.debug("Total wall clock time " + realTime + "ms build time " + totalBuildTime + "ms"); // Shut down sjavac.shutdown(); return Result.OK.exitCode; }
class class_name[name] begin[{] method[startServer, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[long], serverStart] assign[member[.portFile], call[.getPortFile, parameter[member[.portfilename]]]] SYNCHRONIZED[member[.portFile]] BEGIN[{] call[portFile.lock, parameter[]] call[portFile.getValues, parameter[]] if[call[portFile.containsPortInfo, parameter[]]] begin[{] call[Log.debug, parameter[literal["Javac server not started because portfile exists!"]]] call[portFile.unlock, parameter[]] return[member[Result.ERROR.exitCode]] else begin[{] None end[}] assign[member[.sjavac], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SjavacImpl, sub_type=None))] assign[member[.sjavac], ClassCreator(arguments=[MemberReference(member=sjavac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=poolsize, 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=PooledSjavac, sub_type=None))] assign[member[.sjavac], ClassCreator(arguments=[MemberReference(member=sjavac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), BinaryOperation(operandl=MemberReference(member=keepalive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000), operator=*)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IdleResetSjavac, sub_type=None))] assign[member[.serverSocket], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerSocket, sub_type=None))] local_variable[type[InetAddress], localhost] call[serverSocket.bind, parameter[ClassCreator(arguments=[MemberReference(member=localhost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InetSocketAddress, sub_type=None))]] call[portFile.setValues, parameter[call[.getPort, parameter[]], call[.getCookie, parameter[]]]] call[portFile.unlock, parameter[]] END[}] assign[member[.portFileMonitor], ClassCreator(arguments=[MemberReference(member=portFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PortFileMonitor, sub_type=None))] call[portFileMonitor.start, parameter[]] call[Log.debug, parameter[literal["Sjavac server started. Accepting connections..."]]] call[Log.debug, parameter[binary_operation[literal[" port: "], +, call[.getPort, parameter[]]]]] call[Log.debug, parameter[binary_operation[literal[" time: "], +, ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))))]]] call[Log.debug, parameter[binary_operation[literal[" poolsize: "], +, member[.poolsize]]]] call[keepAcceptingRequests.set, parameter[literal[true]]] do[call[keepAcceptingRequests.get, parameter[]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=accept, postfix_operators=[], prefix_operators=[], qualifier=serverSocket, selectors=[], type_arguments=None), name=socket)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Socket, sub_type=None)), StatementExpression(expression=ClassCreator(arguments=[MemberReference(member=socket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sjavac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=start, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=RequestHandler, sub_type=None)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=se, types=['SocketException']))], finally_block=None, label=None, resources=None) end[}] call[Log.debug, parameter[literal["Shutting down."]]] local_variable[type[long], realTime] call[Log.debug, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Total wall clock time "], +, member[.realTime]], +, literal["ms build time "]], +, member[.totalBuildTime]], +, literal["ms"]]]] call[sjavac.shutdown, parameter[]] return[member[Result.OK.exitCode]] end[}] END[}]
Keyword[public] Keyword[int] identifier[startServer] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] { Keyword[long] identifier[serverStart] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[portFile] operator[=] identifier[getPortFile] operator[SEP] identifier[portfilename] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[portFile] operator[SEP] { identifier[portFile] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] identifier[portFile] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[portFile] operator[SEP] identifier[containsPortInfo] operator[SEP] operator[SEP] operator[SEP] { identifier[Log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[portFile] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Result] operator[SEP] identifier[ERROR] operator[SEP] identifier[exitCode] operator[SEP] } identifier[sjavac] operator[=] Keyword[new] identifier[SjavacImpl] operator[SEP] operator[SEP] operator[SEP] identifier[sjavac] operator[=] Keyword[new] identifier[PooledSjavac] operator[SEP] identifier[sjavac] , identifier[poolsize] operator[SEP] operator[SEP] identifier[sjavac] operator[=] Keyword[new] identifier[IdleResetSjavac] operator[SEP] identifier[sjavac] , Keyword[this] , identifier[keepalive] operator[*] Other[1000] operator[SEP] operator[SEP] identifier[serverSocket] operator[=] Keyword[new] identifier[ServerSocket] operator[SEP] operator[SEP] operator[SEP] identifier[InetAddress] identifier[localhost] operator[=] identifier[InetAddress] operator[SEP] identifier[getByName] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[serverSocket] operator[SEP] identifier[bind] operator[SEP] Keyword[new] identifier[InetSocketAddress] operator[SEP] identifier[localhost] , Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[portFile] operator[SEP] identifier[setValues] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] , identifier[getCookie] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[portFile] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } identifier[portFileMonitor] operator[=] Keyword[new] identifier[PortFileMonitor] operator[SEP] identifier[portFile] , Keyword[this] operator[SEP] operator[SEP] identifier[portFileMonitor] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[poolsize] operator[SEP] operator[SEP] identifier[keepAcceptingRequests] operator[SEP] identifier[set] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[do] { Keyword[try] { identifier[Socket] identifier[socket] operator[=] identifier[serverSocket] operator[SEP] identifier[accept] operator[SEP] operator[SEP] operator[SEP] Keyword[new] identifier[RequestHandler] operator[SEP] identifier[socket] , identifier[sjavac] operator[SEP] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SocketException] identifier[se] operator[SEP] { } } Keyword[while] operator[SEP] identifier[keepAcceptingRequests] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[long] identifier[realTime] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[-] identifier[serverStart] operator[SEP] identifier[Log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[realTime] operator[+] literal[String] operator[+] identifier[totalBuildTime] operator[+] literal[String] operator[SEP] operator[SEP] identifier[sjavac] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Result] operator[SEP] identifier[OK] operator[SEP] identifier[exitCode] operator[SEP] }
public Pager<Commit> getCommits(Object projectIdOrPath, String ref, Date since, Date until, String path, int itemsPerPage) throws GitLabApiException { Form formData = new GitLabApiForm() .withParam("ref_name", ref) .withParam("since", ISO8601.toString(since, false)) .withParam("until", ISO8601.toString(until, false)) .withParam("path", (path == null ? null : urlEncode(path))); return (new Pager<Commit>(this, Commit.class, itemsPerPage, formData.asMap(), "projects", getProjectIdOrPath(projectIdOrPath), "repository", "commits")); }
class class_name[name] begin[{] method[getCommits, return_type[type[Pager]], modifier[public], parameter[projectIdOrPath, ref, since, until, path, itemsPerPage]] begin[{] local_variable[type[Form], formData] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Commit, sub_type=None)), MemberReference(member=itemsPerPage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=asMap, postfix_operators=[], prefix_operators=[], qualifier=formData, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="projects"), MethodInvocation(arguments=[MemberReference(member=projectIdOrPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProjectIdOrPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="repository"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="commits")], 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=Commit, sub_type=None))], dimensions=None, name=Pager, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Pager] operator[<] identifier[Commit] operator[>] identifier[getCommits] operator[SEP] identifier[Object] identifier[projectIdOrPath] , identifier[String] identifier[ref] , identifier[Date] identifier[since] , identifier[Date] identifier[until] , identifier[String] identifier[path] , Keyword[int] identifier[itemsPerPage] operator[SEP] Keyword[throws] identifier[GitLabApiException] { identifier[Form] identifier[formData] operator[=] Keyword[new] identifier[GitLabApiForm] operator[SEP] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[ref] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[ISO8601] operator[SEP] identifier[toString] operator[SEP] identifier[since] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , identifier[ISO8601] operator[SEP] identifier[toString] operator[SEP] identifier[until] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[withParam] operator[SEP] literal[String] , operator[SEP] identifier[path] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[urlEncode] operator[SEP] identifier[path] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[new] identifier[Pager] operator[<] identifier[Commit] operator[>] operator[SEP] Keyword[this] , identifier[Commit] operator[SEP] Keyword[class] , identifier[itemsPerPage] , identifier[formData] operator[SEP] identifier[asMap] operator[SEP] operator[SEP] , literal[String] , identifier[getProjectIdOrPath] operator[SEP] identifier[projectIdOrPath] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] }
public void put(String cfName, WriteOptions writeOptions, String key, byte[] value) throws RocksDbException { if (cfName == null) { cfName = DEFAULT_COLUMN_FAMILY; } try { put(columnFamilyHandles.get(cfName), writeOptions, key.getBytes(StandardCharsets.UTF_8), value); } catch (RocksDbException.ColumnFamilyNotExists e) { throw new RocksDbException.ColumnFamilyNotExists(cfName); } }
class class_name[name] begin[{] method[put, return_type[void], modifier[public], parameter[cfName, writeOptions, key, value]] begin[{] if[binary_operation[member[.cfName], ==, literal[null]]] begin[{] assign[member[.cfName], member[.DEFAULT_COLUMN_FAMILY]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=cfName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=columnFamilyHandles, selectors=[], type_arguments=None), MemberReference(member=writeOptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=StandardCharsets, selectors=[])], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=cfName, 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=RocksDbException, sub_type=ReferenceType(arguments=None, dimensions=None, name=ColumnFamilyNotExists, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RocksDbException.ColumnFamilyNotExists']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[String] identifier[cfName] , identifier[WriteOptions] identifier[writeOptions] , identifier[String] identifier[key] , Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[SEP] Keyword[throws] identifier[RocksDbException] { Keyword[if] operator[SEP] identifier[cfName] operator[==] Other[null] operator[SEP] { identifier[cfName] operator[=] identifier[DEFAULT_COLUMN_FAMILY] operator[SEP] } Keyword[try] { identifier[put] operator[SEP] identifier[columnFamilyHandles] operator[SEP] identifier[get] operator[SEP] identifier[cfName] operator[SEP] , identifier[writeOptions] , identifier[key] operator[SEP] identifier[getBytes] operator[SEP] identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] , identifier[value] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RocksDbException] operator[SEP] identifier[ColumnFamilyNotExists] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RocksDbException] operator[SEP] identifier[ColumnFamilyNotExists] operator[SEP] identifier[cfName] operator[SEP] operator[SEP] } }
private void init() { if (properties != null) { return; } LOGGER.info("Initializing Configuration"); properties = new Properties(); final String alpineAppProp = PathUtil.resolve(System.getProperty(ALPINE_APP_PROP)); if (StringUtils.isNotBlank(alpineAppProp)) { LOGGER.info("Loading application properties from " + alpineAppProp); try (InputStream fileInputStream = Files.newInputStream((new File(alpineAppProp)).toPath())) { properties.load(fileInputStream); } catch (FileNotFoundException e) { LOGGER.error("Could not find property file " + alpineAppProp); } catch (IOException e) { LOGGER.error("Unable to load " + alpineAppProp); } } else { LOGGER.info("System property " + ALPINE_APP_PROP + " not specified"); LOGGER.info("Loading " + PROP_FILE + " from classpath"); try (InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(PROP_FILE)) { properties.load(in); } catch (IOException e) { LOGGER.error("Unable to load " + PROP_FILE); } } if (properties.size() == 0) { LOGGER.error("A fatal error occurred loading application properties. Please correct the issue and restart the application."); } alpineVersionProperties = new Properties(); try (InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(ALPINE_VERSION_PROP_FILE)) { alpineVersionProperties.load(in); } catch (IOException e) { LOGGER.error("Unable to load " + ALPINE_VERSION_PROP_FILE); } if (alpineVersionProperties.size() == 0) { LOGGER.error("A fatal error occurred loading Alpine version information. Please correct the issue and restart the application."); } applicationVersionProperties = new Properties(); try (InputStream in = Thread.currentThread().getContextClassLoader().getResourceAsStream(APPLICATION_VERSION_PROP_FILE)) { applicationVersionProperties.load(in); } catch (IOException e) { LOGGER.error("Unable to load " + APPLICATION_VERSION_PROP_FILE); } if (applicationVersionProperties.size() == 0) { LOGGER.error("A fatal error occurred loading application version information. Please correct the issue and restart the application."); } }
class class_name[name] begin[{] method[init, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[member[.properties], !=, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[LOGGER.info, parameter[literal["Initializing Configuration"]]] assign[member[.properties], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Properties, sub_type=None))] local_variable[type[String], alpineAppProp] if[call[StringUtils.isNotBlank, parameter[member[.alpineAppProp]]]] begin[{] call[LOGGER.info, parameter[binary_operation[literal["Loading application properties from "], +, member[.alpineAppProp]]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fileInputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not find property file "), operandr=MemberReference(member=alpineAppProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['FileNotFoundException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to load "), operandr=MemberReference(member=alpineAppProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=fileInputStream, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=alpineAppProp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=toPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))], member=newInputStream, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None))]) else begin[{] call[LOGGER.info, parameter[binary_operation[binary_operation[literal["System property "], +, member[.ALPINE_APP_PROP]], +, literal[" not specified"]]]] call[LOGGER.info, parameter[binary_operation[binary_operation[literal["Loading "], +, member[.PROP_FILE]], +, literal[" from classpath"]]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to load "), operandr=MemberReference(member=PROP_FILE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=in, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=getContextClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=PROP_FILE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResourceAsStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None))]) end[}] if[binary_operation[call[properties.size, parameter[]], ==, literal[0]]] begin[{] call[LOGGER.error, parameter[literal["A fatal error occurred loading application properties. Please correct the issue and restart the application."]]] else begin[{] None end[}] assign[member[.alpineVersionProperties], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Properties, sub_type=None))] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=alpineVersionProperties, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to load "), operandr=MemberReference(member=ALPINE_VERSION_PROP_FILE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=in, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=getContextClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=ALPINE_VERSION_PROP_FILE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResourceAsStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None))]) if[binary_operation[call[alpineVersionProperties.size, parameter[]], ==, literal[0]]] begin[{] call[LOGGER.error, parameter[literal["A fatal error occurred loading Alpine version information. Please correct the issue and restart the application."]]] else begin[{] None end[}] assign[member[.applicationVersionProperties], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Properties, sub_type=None))] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=applicationVersionProperties, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to load "), operandr=MemberReference(member=APPLICATION_VERSION_PROP_FILE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=in, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=getContextClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=APPLICATION_VERSION_PROP_FILE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResourceAsStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None))]) if[binary_operation[call[applicationVersionProperties.size, parameter[]], ==, literal[0]]] begin[{] call[LOGGER.error, parameter[literal["A fatal error occurred loading application version information. Please correct the issue and restart the application."]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[init] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[properties] operator[!=] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[properties] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[alpineAppProp] operator[=] identifier[PathUtil] operator[SEP] identifier[resolve] operator[SEP] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[ALPINE_APP_PROP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[alpineAppProp] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[alpineAppProp] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[InputStream] identifier[fileInputStream] operator[=] identifier[Files] operator[SEP] identifier[newInputStream] operator[SEP] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[alpineAppProp] operator[SEP] operator[SEP] operator[SEP] identifier[toPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[properties] operator[SEP] identifier[load] operator[SEP] identifier[fileInputStream] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[FileNotFoundException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[alpineAppProp] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[alpineAppProp] operator[SEP] operator[SEP] } } Keyword[else] { identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[ALPINE_APP_PROP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[PROP_FILE] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[InputStream] identifier[in] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[PROP_FILE] operator[SEP] operator[SEP] { identifier[properties] operator[SEP] identifier[load] operator[SEP] identifier[in] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[PROP_FILE] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[properties] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[alpineVersionProperties] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[InputStream] identifier[in] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[ALPINE_VERSION_PROP_FILE] operator[SEP] operator[SEP] { identifier[alpineVersionProperties] operator[SEP] identifier[load] operator[SEP] identifier[in] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[ALPINE_VERSION_PROP_FILE] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[alpineVersionProperties] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[applicationVersionProperties] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[InputStream] identifier[in] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[APPLICATION_VERSION_PROP_FILE] operator[SEP] operator[SEP] { identifier[applicationVersionProperties] operator[SEP] identifier[load] operator[SEP] identifier[in] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[APPLICATION_VERSION_PROP_FILE] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[applicationVersionProperties] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
private static File _getClassSource (final Class <?> type) { if (type != null) { final String classResource = type.getName ().replace ('.', '/') + ".class"; return _getResourceSource (classResource, type.getClassLoader ()); } return null; }
class class_name[name] begin[{] method[_getClassSource, return_type[type[File]], modifier[private static], parameter[type]] begin[{] if[binary_operation[member[.type], !=, literal[null]]] begin[{] local_variable[type[String], classResource] return[call[._getResourceSource, parameter[member[.classResource], call[type.getClassLoader, parameter[]]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] identifier[File] identifier[_getClassSource] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[SEP] { Keyword[if] operator[SEP] identifier[type] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[String] identifier[classResource] operator[=] identifier[type] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[SEP] Keyword[return] identifier[_getResourceSource] operator[SEP] identifier[classResource] , identifier[type] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private InputStream getSourceAsInputStream() throws IOException { if (!mapping.hasArchive()) return IOUtil.toBufferedInputStream(getPhyscalFile().getInputStream()); else if (isLoad(LOAD_PHYSICAL)) return IOUtil.toBufferedInputStream(getPhyscalFile().getInputStream()); else if (isLoad(LOAD_ARCHIVE)) { StringBuffer name = new StringBuffer(_getPackageName().replace('.', '/')); if (name.length() > 0) name.append("/"); name.append(getFileName()); return mapping.getArchiveResourceAsStream(name.toString()); } else { return null; } }
class class_name[name] begin[{] method[getSourceAsInputStream, return_type[type[InputStream]], modifier[private], parameter[]] begin[{] if[call[mapping.hasArchive, parameter[]]] begin[{] return[call[IOUtil.toBufferedInputStream, parameter[call[.getPhyscalFile, parameter[]]]]] else begin[{] if[call[.isLoad, parameter[member[.LOAD_PHYSICAL]]]] begin[{] return[call[IOUtil.toBufferedInputStream, parameter[call[.getPhyscalFile, parameter[]]]]] else begin[{] if[call[.isLoad, parameter[member[.LOAD_ARCHIVE]]]] begin[{] local_variable[type[StringBuffer], name] if[binary_operation[call[name.length, parameter[]], >, literal[0]]] begin[{] call[name.append, parameter[literal["/"]]] else begin[{] None end[}] call[name.append, parameter[call[.getFileName, parameter[]]]] return[call[mapping.getArchiveResourceAsStream, parameter[call[name.toString, parameter[]]]]] else begin[{] return[literal[null]] end[}] end[}] end[}] end[}] END[}]
Keyword[private] identifier[InputStream] identifier[getSourceAsInputStream] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[mapping] operator[SEP] identifier[hasArchive] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[IOUtil] operator[SEP] identifier[toBufferedInputStream] operator[SEP] identifier[getPhyscalFile] operator[SEP] operator[SEP] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[isLoad] operator[SEP] identifier[LOAD_PHYSICAL] operator[SEP] operator[SEP] Keyword[return] identifier[IOUtil] operator[SEP] identifier[toBufferedInputStream] operator[SEP] identifier[getPhyscalFile] operator[SEP] operator[SEP] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[isLoad] operator[SEP] identifier[LOAD_ARCHIVE] operator[SEP] operator[SEP] { identifier[StringBuffer] identifier[name] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] identifier[_getPackageName] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] identifier[name] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[name] operator[SEP] identifier[append] operator[SEP] identifier[getFileName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[mapping] operator[SEP] identifier[getArchiveResourceAsStream] operator[SEP] identifier[name] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
public double calculateSigmaElectronegativity(IAtomContainer ac, IAtom atom) { return calculateSigmaElectronegativity(ac, atom, maxI, maxRS); }
class class_name[name] begin[{] method[calculateSigmaElectronegativity, return_type[type[double]], modifier[public], parameter[ac, atom]] begin[{] return[call[.calculateSigmaElectronegativity, parameter[member[.ac], member[.atom], member[.maxI], member[.maxRS]]]] end[}] END[}]
Keyword[public] Keyword[double] identifier[calculateSigmaElectronegativity] operator[SEP] identifier[IAtomContainer] identifier[ac] , identifier[IAtom] identifier[atom] operator[SEP] { Keyword[return] identifier[calculateSigmaElectronegativity] operator[SEP] identifier[ac] , identifier[atom] , identifier[maxI] , identifier[maxRS] operator[SEP] operator[SEP] }
public static LineMap makeLineMap(char[] src, int max, boolean expandTabs) { LineMapImpl lineMap = expandTabs ? new LineTabMapImpl(max) : new LineMapImpl(); lineMap.build(src, max); return lineMap; }
class class_name[name] begin[{] method[makeLineMap, return_type[type[LineMap]], modifier[public static], parameter[src, max, expandTabs]] begin[{] local_variable[type[LineMapImpl], lineMap] call[lineMap.build, parameter[member[.src], member[.max]]] return[member[.lineMap]] end[}] END[}]
Keyword[public] Keyword[static] identifier[LineMap] identifier[makeLineMap] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[src] , Keyword[int] identifier[max] , Keyword[boolean] identifier[expandTabs] operator[SEP] { identifier[LineMapImpl] identifier[lineMap] operator[=] identifier[expandTabs] operator[?] Keyword[new] identifier[LineTabMapImpl] operator[SEP] identifier[max] operator[SEP] operator[:] Keyword[new] identifier[LineMapImpl] operator[SEP] operator[SEP] operator[SEP] identifier[lineMap] operator[SEP] identifier[build] operator[SEP] identifier[src] , identifier[max] operator[SEP] operator[SEP] Keyword[return] identifier[lineMap] operator[SEP] }
public void moveSQLToField(ResultSet resultset, int iColumn) throws SQLException { int sResult = resultset.getInt(iColumn); if (resultset.wasNull()) this.setString(Constants.BLANK, false, DBConstants.READ_MOVE); // Null value else { if ((!this.isNullable()) && (sResult == NAN)) this.setString(Constants.BLANK, false, DBConstants.READ_MOVE); // Null value else this.setValue(sResult, false, DBConstants.READ_MOVE); } }
class class_name[name] begin[{] method[moveSQLToField, return_type[void], modifier[public], parameter[resultset, iColumn]] begin[{] local_variable[type[int], sResult] if[call[resultset.wasNull, parameter[]]] begin[{] THIS[call[None.setString, parameter[member[Constants.BLANK], literal[false], member[DBConstants.READ_MOVE]]]] else begin[{] if[binary_operation[THIS[], &&, binary_operation[member[.sResult], ==, member[.NAN]]]] begin[{] THIS[call[None.setString, parameter[member[Constants.BLANK], literal[false], member[DBConstants.READ_MOVE]]]] else begin[{] THIS[call[None.setValue, parameter[member[.sResult], literal[false], member[DBConstants.READ_MOVE]]]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[moveSQLToField] operator[SEP] identifier[ResultSet] identifier[resultset] , Keyword[int] identifier[iColumn] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[int] identifier[sResult] operator[=] identifier[resultset] operator[SEP] identifier[getInt] operator[SEP] identifier[iColumn] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resultset] operator[SEP] identifier[wasNull] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setString] operator[SEP] identifier[Constants] operator[SEP] identifier[BLANK] , literal[boolean] , identifier[DBConstants] operator[SEP] identifier[READ_MOVE] operator[SEP] operator[SEP] Keyword[else] { Keyword[if] operator[SEP] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[isNullable] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[sResult] operator[==] identifier[NAN] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[setString] operator[SEP] identifier[Constants] operator[SEP] identifier[BLANK] , literal[boolean] , identifier[DBConstants] operator[SEP] identifier[READ_MOVE] operator[SEP] operator[SEP] Keyword[else] Keyword[this] operator[SEP] identifier[setValue] operator[SEP] identifier[sResult] , literal[boolean] , identifier[DBConstants] operator[SEP] identifier[READ_MOVE] operator[SEP] operator[SEP] } }
private PropDesc createProp(Field field) { final String fieldName = field.getName(); final Class<?> fieldType = field.getType(); final boolean isBooeanField = BooleanUtil.isBoolean(fieldType); Method getter = null; Method setter = null; String methodName; Class<?>[] parameterTypes; for (Method method : ReflectUtil.getMethods(this.beanClass)) { parameterTypes = method.getParameterTypes(); if (parameterTypes.length > 1) { // 多于1个参数说明非Getter或Setter continue; } methodName = method.getName(); if (parameterTypes.length == 0) { // 无参数,可能为Getter方法 if (isMatchGetter(methodName, fieldName, isBooeanField)) { // 方法名与字段名匹配,则为Getter方法 getter = method; } } else if (isMatchSetter(methodName, fieldName, isBooeanField)) { // 只有一个参数的情况下方法名与字段名对应匹配,则为Setter方法 setter = method; } if (null != getter && null != setter) { // 如果Getter和Setter方法都找到了,不再继续寻找 break; } } return new PropDesc(field, getter, setter); }
class class_name[name] begin[{] method[createProp, return_type[type[PropDesc]], modifier[private], parameter[field]] begin[{] local_variable[type[String], fieldName] local_variable[type[Class], fieldType] local_variable[type[boolean], isBooeanField] local_variable[type[Method], getter] local_variable[type[Method], setter] local_variable[type[String], methodName] local_variable[type[Class], parameterTypes] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=parameterTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=parameterTypes, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=parameterTypes, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isBooeanField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isMatchSetter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=setter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isBooeanField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isMatchGetter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=getter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=getter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=setter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=beanClass, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=getMethods, postfix_operators=[], prefix_operators=[], qualifier=ReflectUtil, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None) return[ClassCreator(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=getter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=setter, 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=PropDesc, sub_type=None))] end[}] END[}]
Keyword[private] identifier[PropDesc] identifier[createProp] operator[SEP] identifier[Field] identifier[field] operator[SEP] { Keyword[final] identifier[String] identifier[fieldName] operator[=] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[fieldType] operator[=] identifier[field] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[isBooeanField] operator[=] identifier[BooleanUtil] operator[SEP] identifier[isBoolean] operator[SEP] identifier[fieldType] operator[SEP] operator[SEP] identifier[Method] identifier[getter] operator[=] Other[null] operator[SEP] identifier[Method] identifier[setter] operator[=] Other[null] operator[SEP] identifier[String] identifier[methodName] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[parameterTypes] operator[SEP] Keyword[for] operator[SEP] identifier[Method] identifier[method] operator[:] identifier[ReflectUtil] operator[SEP] identifier[getMethods] operator[SEP] Keyword[this] operator[SEP] identifier[beanClass] operator[SEP] operator[SEP] { identifier[parameterTypes] operator[=] identifier[method] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parameterTypes] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] { Keyword[continue] operator[SEP] } identifier[methodName] operator[=] identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parameterTypes] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[isMatchGetter] operator[SEP] identifier[methodName] , identifier[fieldName] , identifier[isBooeanField] operator[SEP] operator[SEP] { identifier[getter] operator[=] identifier[method] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[isMatchSetter] operator[SEP] identifier[methodName] , identifier[fieldName] , identifier[isBooeanField] operator[SEP] operator[SEP] { identifier[setter] operator[=] identifier[method] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[!=] identifier[getter] operator[&&] Other[null] operator[!=] identifier[setter] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[return] Keyword[new] identifier[PropDesc] operator[SEP] identifier[field] , identifier[getter] , identifier[setter] operator[SEP] operator[SEP] }
public synchronized ProgressBar setMin(int min) { if(min > max) { setMax(min); } if(min > value) { setValue(min); } if(this.min != min) { this.min = min; invalidate(); } return this; }
class class_name[name] begin[{] method[setMin, return_type[type[ProgressBar]], modifier[synchronized public], parameter[min]] begin[{] if[binary_operation[member[.min], >, member[.max]]] begin[{] call[.setMax, parameter[member[.min]]] else begin[{] None end[}] if[binary_operation[member[.min], >, member[.value]]] begin[{] call[.setValue, parameter[member[.min]]] else begin[{] None end[}] if[binary_operation[THIS[member[None.min]], !=, member[.min]]] begin[{] assign[THIS[member[None.min]], member[.min]] call[.invalidate, parameter[]] else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[ProgressBar] identifier[setMin] operator[SEP] Keyword[int] identifier[min] operator[SEP] { Keyword[if] operator[SEP] identifier[min] operator[>] identifier[max] operator[SEP] { identifier[setMax] operator[SEP] identifier[min] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[min] operator[>] identifier[value] operator[SEP] { identifier[setValue] operator[SEP] identifier[min] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[min] operator[!=] identifier[min] operator[SEP] { Keyword[this] operator[SEP] identifier[min] operator[=] identifier[min] operator[SEP] identifier[invalidate] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public void setRadius(com.google.api.ads.adwords.axis.v201809.cm.ConstantOperand radius) { this.radius = radius; }
class class_name[name] begin[{] method[setRadius, return_type[void], modifier[public], parameter[radius]] begin[{] assign[THIS[member[None.radius]], member[.radius]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setRadius] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[adwords] operator[SEP] identifier[axis] operator[SEP] identifier[v201809] operator[SEP] identifier[cm] operator[SEP] identifier[ConstantOperand] identifier[radius] operator[SEP] { Keyword[this] operator[SEP] identifier[radius] operator[=] identifier[radius] operator[SEP] }
public boolean endsWith(final BinaryString suffix) { ensureMaterialized(); suffix.ensureMaterialized(); return matchAt(suffix, sizeInBytes - suffix.sizeInBytes); }
class class_name[name] begin[{] method[endsWith, return_type[type[boolean]], modifier[public], parameter[suffix]] begin[{] call[.ensureMaterialized, parameter[]] call[suffix.ensureMaterialized, parameter[]] return[call[.matchAt, parameter[member[.suffix], binary_operation[member[.sizeInBytes], -, member[suffix.sizeInBytes]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[endsWith] operator[SEP] Keyword[final] identifier[BinaryString] identifier[suffix] operator[SEP] { identifier[ensureMaterialized] operator[SEP] operator[SEP] operator[SEP] identifier[suffix] operator[SEP] identifier[ensureMaterialized] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[matchAt] operator[SEP] identifier[suffix] , identifier[sizeInBytes] operator[-] identifier[suffix] operator[SEP] identifier[sizeInBytes] operator[SEP] operator[SEP] }
@Override public QueryBuilder<V> from(String table) { Preconditions.checkNotNull(table, "FROM clause cannot be null"); table = removeKeyword(table, FROM); this.from = table; return this; }
class class_name[name] begin[{] method[from, return_type[type[QueryBuilder]], modifier[public], parameter[table]] begin[{] call[Preconditions.checkNotNull, parameter[member[.table], literal["FROM clause cannot be null"]]] assign[member[.table], call[.removeKeyword, parameter[member[.table], member[.FROM]]]] assign[THIS[member[None.from]], member[.table]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[QueryBuilder] operator[<] identifier[V] operator[>] identifier[from] operator[SEP] identifier[String] identifier[table] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[table] , literal[String] operator[SEP] operator[SEP] identifier[table] operator[=] identifier[removeKeyword] operator[SEP] identifier[table] , identifier[FROM] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[from] operator[=] identifier[table] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public CoreRemoteMongoDatabaseImpl getDatabase(final String databaseName) { return new CoreRemoteMongoDatabaseImpl( databaseName, service, dataSynchronizer, appInfo.getNetworkMonitor() ); }
class class_name[name] begin[{] method[getDatabase, return_type[type[CoreRemoteMongoDatabaseImpl]], modifier[public], parameter[databaseName]] begin[{] return[ClassCreator(arguments=[MemberReference(member=databaseName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=service, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dataSynchronizer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getNetworkMonitor, postfix_operators=[], prefix_operators=[], qualifier=appInfo, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CoreRemoteMongoDatabaseImpl, sub_type=None))] end[}] END[}]
Keyword[public] identifier[CoreRemoteMongoDatabaseImpl] identifier[getDatabase] operator[SEP] Keyword[final] identifier[String] identifier[databaseName] operator[SEP] { Keyword[return] Keyword[new] identifier[CoreRemoteMongoDatabaseImpl] operator[SEP] identifier[databaseName] , identifier[service] , identifier[dataSynchronizer] , identifier[appInfo] operator[SEP] identifier[getNetworkMonitor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public JPEParser getJPEParser(String format) throws NoParserRegisteredException { JPEParser parser = this.registeredFormats.get(format); if (parser == null) { throw new NoParserRegisteredException( "No parser registered for format: " + format); } try { return parser.getClass().newInstance(); } catch (InstantiationException e) { throw new NoParserRegisteredException( "No parser registered for format: " + format); } catch (IllegalAccessException e) { throw new NoParserRegisteredException( "No parser registered for format: " + format); } }
class class_name[name] begin[{] method[getJPEParser, return_type[type[JPEParser]], modifier[public], parameter[format]] begin[{] local_variable[type[JPEParser], parser] if[binary_operation[member[.parser], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No parser registered for format: "), operandr=MemberReference(member=format, 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=NoParserRegisteredException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[MethodInvocation(arguments=[], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No parser registered for format: "), operandr=MemberReference(member=format, 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=NoParserRegisteredException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstantiationException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No parser registered for format: "), operandr=MemberReference(member=format, 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=NoParserRegisteredException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[JPEParser] identifier[getJPEParser] operator[SEP] identifier[String] identifier[format] operator[SEP] Keyword[throws] identifier[NoParserRegisteredException] { identifier[JPEParser] identifier[parser] operator[=] Keyword[this] operator[SEP] identifier[registeredFormats] operator[SEP] identifier[get] operator[SEP] identifier[format] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parser] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NoParserRegisteredException] operator[SEP] literal[String] operator[+] identifier[format] operator[SEP] operator[SEP] } Keyword[try] { Keyword[return] identifier[parser] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InstantiationException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[NoParserRegisteredException] operator[SEP] literal[String] operator[+] identifier[format] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[NoParserRegisteredException] operator[SEP] literal[String] operator[+] identifier[format] operator[SEP] operator[SEP] } }
private String getPathVariables(final Map<String, Object> map) { final StringBuilder bpath = new StringBuilder(); for (Map.Entry<String, Object> param : map.entrySet()) { if (bpath.length() > 1) { bpath.append("&"); } try { bpath.append(URLEncoder.encode(param.getKey(), String.valueOf(StandardCharsets.UTF_8))).append("=").append(URLEncoder.encode(String.valueOf(param.getValue()), String.valueOf(StandardCharsets.UTF_8))); } catch (UnsupportedEncodingException exception) { // Do nothing } } return bpath.toString(); }
class class_name[name] begin[{] method[getPathVariables, return_type[type[String]], modifier[private], parameter[map]] begin[{] local_variable[type[StringBuilder], bpath] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=bpath, 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=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="&")], member=append, postfix_operators=[], prefix_operators=[], qualifier=bpath, selectors=[], type_arguments=None), label=None)])), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=StandardCharsets, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=encode, postfix_operators=[], prefix_operators=[], qualifier=URLEncoder, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=bpath, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="=")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=StandardCharsets, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=encode, postfix_operators=[], prefix_operators=[], qualifier=URLEncoder, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['UnsupportedEncodingException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=param)], 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=Object, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) return[call[bpath.toString, parameter[]]] end[}] END[}]
Keyword[private] identifier[String] identifier[getPathVariables] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[map] operator[SEP] { Keyword[final] identifier[StringBuilder] identifier[bpath] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[Object] operator[>] identifier[param] operator[:] identifier[map] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[bpath] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[bpath] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[bpath] operator[SEP] identifier[append] operator[SEP] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[param] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[URLEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[param] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[StandardCharsets] operator[SEP] identifier[UTF_8] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnsupportedEncodingException] identifier[exception] operator[SEP] { } } Keyword[return] identifier[bpath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void startRecovery(RecoveryLogFactory fac) { if (tc.isEntryEnabled()) Tr.entry(tc, "startRecovery", fac); // This is a stand alone server. HA can never effect this server so direct local recovery now. RecoveryDirector director = null; try { director = RecoveryDirectorFactory.recoveryDirector(); /* @LI1578-22A */ director.setRecoveryLogFactory(fac); ((RecoveryDirectorImpl) director).driveLocalRecovery();/* @LI1578-22C */ } catch (RecoveryFailedException exc) { FFDCFilter.processException(exc, "com.ibm.ws.recoverylog.spi.RecLogServiceImpl.startRecovery", "421", this); if (tc.isDebugEnabled()) Tr.debug(tc, "Local recovery failed."); // if (tc.isEntryEnabled()) Tr.exit(tc, "start", "RuntimeError"); // throw new RuntimeError("Unable to complete local recovery processing", exc); } catch (InternalLogException ile) { FFDCFilter.processException(ile, "com.ibm.ws.recoverylog.spi.RecLogServiceImpl.startRecovery", "478", this); if (tc.isDebugEnabled()) Tr.debug(tc, "Local recovery not attempted.", ile); // if (tc.isEntryEnabled()) Tr.exit(tc, "start", "RuntimeError"); // throw new RuntimeError("Unable to complete local recovery processing", ile); } if (director != null && _isPeerRecoverySupported) // used to test _recoveryGroup != null { if (checkPeersAtStartup()) { try { if (director instanceof LibertyRecoveryDirectorImpl) { ((LibertyRecoveryDirectorImpl) director).drivePeerRecovery(); } } catch (RecoveryFailedException exc) { FFDCFilter.processException(exc, "com.ibm.ws.recoverylog.spi.RecLogServiceImpl.startRecovery", "421", this); if (tc.isDebugEnabled()) Tr.debug(tc, "Local peer failed."); } } } if (tc.isEntryEnabled()) Tr.exit(tc, "startRecovery"); }
class class_name[name] begin[{] method[startRecovery, return_type[void], modifier[public], parameter[fac]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["startRecovery"], member[.fac]]] else begin[{] None end[}] local_variable[type[RecoveryDirector], director] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=director, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=recoveryDirector, postfix_operators=[], prefix_operators=[], qualifier=RecoveryDirectorFactory, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fac, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setRecoveryLogFactory, postfix_operators=[], prefix_operators=[], qualifier=director, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Cast(expression=MemberReference(member=director, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RecoveryDirectorImpl, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.recoverylog.spi.RecLogServiceImpl.startRecovery"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="421"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Local recovery failed.")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exc, types=['RecoveryFailedException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.recoverylog.spi.RecLogServiceImpl.startRecovery"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="478"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Local recovery not attempted."), MemberReference(member=ile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ile, types=['InternalLogException']))], finally_block=None, label=None, resources=None) if[binary_operation[binary_operation[member[.director], !=, literal[null]], &&, member[._isPeerRecoverySupported]]] begin[{] if[call[.checkPeersAtStartup, parameter[]]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=director, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=LibertyRecoveryDirectorImpl, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MemberReference(member=director, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LibertyRecoveryDirectorImpl, sub_type=None)), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.recoverylog.spi.RecLogServiceImpl.startRecovery"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="421"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Local peer failed.")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exc, types=['RecoveryFailedException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] None end[}] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["startRecovery"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[startRecovery] operator[SEP] identifier[RecoveryLogFactory] identifier[fac] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , identifier[fac] operator[SEP] operator[SEP] identifier[RecoveryDirector] identifier[director] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[director] operator[=] identifier[RecoveryDirectorFactory] operator[SEP] identifier[recoveryDirector] operator[SEP] operator[SEP] operator[SEP] identifier[director] operator[SEP] identifier[setRecoveryLogFactory] operator[SEP] identifier[fac] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[RecoveryDirectorImpl] operator[SEP] identifier[director] operator[SEP] operator[SEP] identifier[driveLocalRecovery] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RecoveryFailedException] identifier[exc] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[exc] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InternalLogException] identifier[ile] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[ile] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[ile] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[director] operator[!=] Other[null] operator[&&] identifier[_isPeerRecoverySupported] operator[SEP] { Keyword[if] operator[SEP] identifier[checkPeersAtStartup] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[director] Keyword[instanceof] identifier[LibertyRecoveryDirectorImpl] operator[SEP] { operator[SEP] operator[SEP] identifier[LibertyRecoveryDirectorImpl] operator[SEP] identifier[director] operator[SEP] operator[SEP] identifier[drivePeerRecovery] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecoveryFailedException] identifier[exc] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[exc] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
private Iterator<IEntityGroup> getMemberGroups() throws GroupsException { Set<IEntityGroup> rslt = new HashSet<>(); for (IGroupMember child : getChildren()) { if (child.isGroup()) { rslt.add((IEntityGroup) child); } } return rslt.iterator(); }
class class_name[name] begin[{] method[getMemberGroups, return_type[type[Iterator]], modifier[private], parameter[]] begin[{] local_variable[type[Set], rslt] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isGroup, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=IEntityGroup, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=rslt, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=child)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IGroupMember, sub_type=None))), label=None) return[call[rslt.iterator, parameter[]]] end[}] END[}]
Keyword[private] identifier[Iterator] operator[<] identifier[IEntityGroup] operator[>] identifier[getMemberGroups] operator[SEP] operator[SEP] Keyword[throws] identifier[GroupsException] { identifier[Set] operator[<] identifier[IEntityGroup] operator[>] identifier[rslt] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[IGroupMember] identifier[child] operator[:] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[child] operator[SEP] identifier[isGroup] operator[SEP] operator[SEP] operator[SEP] { identifier[rslt] operator[SEP] identifier[add] operator[SEP] operator[SEP] identifier[IEntityGroup] operator[SEP] identifier[child] operator[SEP] operator[SEP] } } Keyword[return] identifier[rslt] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] }
public int encodeDigits(ByteArrayOutputStream bos) { boolean isOdd = this.oddFlag == _FLAG_ODD; byte b = 0; int count = (!isOdd) ? address.length() : address.length() - 1; int bytesCount = 0; for (int i = 0; i < count - 1; i += 2) { String ds1 = address.substring(i, i + 1); String ds2 = address.substring(i + 1, i + 2); int d1 = Integer.parseInt(ds1, 16); int d2 = Integer.parseInt(ds2, 16); b = (byte) (d2 << 4 | d1); bos.write(b); bytesCount++; } if (isOdd) { String ds1 = address.substring(count, count + 1); int d = Integer.parseInt(ds1); b = (byte) (d & 0x0f); bos.write(b); bytesCount++; } return bytesCount; }
class class_name[name] begin[{] method[encodeDigits, return_type[type[int]], modifier[public], parameter[bos]] begin[{] local_variable[type[boolean], isOdd] local_variable[type[byte], b] local_variable[type[int], count] local_variable[type[int], bytesCount] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=address, selectors=[], type_arguments=None), name=ds1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=address, selectors=[], type_arguments=None), name=ds2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ds1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), name=d1)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ds2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), name=d2)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=d2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=<<), operandr=MemberReference(member=d1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=byte))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bos, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=bytesCount, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), label=None) if[member[.isOdd]] begin[{] local_variable[type[String], ds1] local_variable[type[int], d] assign[member[.b], Cast(expression=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0f), operator=&), type=BasicType(dimensions=[], name=byte))] call[bos.write, parameter[member[.b]]] member[.bytesCount] else begin[{] None end[}] return[member[.bytesCount]] end[}] END[}]
Keyword[public] Keyword[int] identifier[encodeDigits] operator[SEP] identifier[ByteArrayOutputStream] identifier[bos] operator[SEP] { Keyword[boolean] identifier[isOdd] operator[=] Keyword[this] operator[SEP] identifier[oddFlag] operator[==] identifier[_FLAG_ODD] operator[SEP] Keyword[byte] identifier[b] operator[=] Other[0] operator[SEP] Keyword[int] identifier[count] operator[=] operator[SEP] operator[!] identifier[isOdd] operator[SEP] operator[?] identifier[address] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[:] identifier[address] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] Keyword[int] identifier[bytesCount] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[count] operator[-] Other[1] operator[SEP] identifier[i] operator[+=] Other[2] operator[SEP] { identifier[String] identifier[ds1] operator[=] identifier[address] operator[SEP] identifier[substring] operator[SEP] identifier[i] , identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] identifier[String] identifier[ds2] operator[=] identifier[address] operator[SEP] identifier[substring] operator[SEP] identifier[i] operator[+] Other[1] , identifier[i] operator[+] Other[2] operator[SEP] operator[SEP] Keyword[int] identifier[d1] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[ds1] , Other[16] operator[SEP] operator[SEP] Keyword[int] identifier[d2] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[ds2] , Other[16] operator[SEP] operator[SEP] identifier[b] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[d2] operator[<<] Other[4] operator[|] identifier[d1] operator[SEP] operator[SEP] identifier[bos] operator[SEP] identifier[write] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[bytesCount] operator[++] operator[SEP] } Keyword[if] operator[SEP] identifier[isOdd] operator[SEP] { identifier[String] identifier[ds1] operator[=] identifier[address] operator[SEP] identifier[substring] operator[SEP] identifier[count] , identifier[count] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[d] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[ds1] operator[SEP] operator[SEP] identifier[b] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[d] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[bos] operator[SEP] identifier[write] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[bytesCount] operator[++] operator[SEP] } Keyword[return] identifier[bytesCount] operator[SEP] }
public static MozuUrl addExtendedPropertiesUrl() { UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/current/extendedproperties"); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
class class_name[name] begin[{] method[addExtendedPropertiesUrl, return_type[type[MozuUrl]], modifier[public static], parameter[]] begin[{] local_variable[type[UrlFormatter], formatter] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getResourceUrl, postfix_operators=[], prefix_operators=[], qualifier=formatter, selectors=[], type_arguments=None), MemberReference(member=TENANT_POD, postfix_operators=[], prefix_operators=[], qualifier=MozuUrl.UrlLocation, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MozuUrl, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[MozuUrl] identifier[addExtendedPropertiesUrl] operator[SEP] operator[SEP] { identifier[UrlFormatter] identifier[formatter] operator[=] Keyword[new] identifier[UrlFormatter] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MozuUrl] operator[SEP] identifier[formatter] operator[SEP] identifier[getResourceUrl] operator[SEP] operator[SEP] , identifier[MozuUrl] operator[SEP] identifier[UrlLocation] operator[SEP] identifier[TENANT_POD] operator[SEP] operator[SEP] }
public static boolean uniform(Color color, Pixel[] pixels) { return Arrays.stream(pixels).allMatch(p -> p.toInt() == color.toRGB().toInt()); }
class class_name[name] begin[{] method[uniform, return_type[type[boolean]], modifier[public static], parameter[color, pixels]] begin[{] return[call[Arrays.stream, parameter[member[.pixels]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[uniform] operator[SEP] identifier[Color] identifier[color] , identifier[Pixel] operator[SEP] operator[SEP] identifier[pixels] operator[SEP] { Keyword[return] identifier[Arrays] operator[SEP] identifier[stream] operator[SEP] identifier[pixels] operator[SEP] operator[SEP] identifier[allMatch] operator[SEP] identifier[p] operator[->] identifier[p] operator[SEP] identifier[toInt] operator[SEP] operator[SEP] operator[==] identifier[color] operator[SEP] identifier[toRGB] operator[SEP] operator[SEP] operator[SEP] identifier[toInt] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void cleanup(boolean atStartup) { boolean allTasksIdle = false; while (!allTasksIdle) { int activeCount = 0; for (Task task: taskDao.listTasks()) { if (!task.getState().equals(Task.IDLE)) { activeCount++; if (!task.getState().equals(Task.CANCELING)) { logger.info("Auto-canceling task " + task.getId() + " (" + task.getName() + ")"); taskDao.setTaskState(task.getId(), Task.CANCELING); task.setState(Task.CANCELING); } if (atStartup) { // We're cleaning up after an unclean shutdown. // Since the TaskRunner isn't actually running, we make // the direct call here to clean up the state in the // database, marking it as canceled. taskCanceled(task); } else { // In the normal case, the TaskRunner is running in a // separate thread and we just need to request that // it cancel at the next available opportunity. cancelTask(task); } } } if (activeCount == 0 || atStartup) { allTasksIdle = true; } else { logger.info("Waiting for " + activeCount + " task(s) to go idle."); sleepSeconds(1); } } }
class class_name[name] begin[{] method[cleanup, return_type[void], modifier[private], parameter[atStartup]] begin[{] local_variable[type[boolean], allTasksIdle] while[member[.allTasksIdle]] begin[{] local_variable[type[int], activeCount] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getState, postfix_operators=[], prefix_operators=['!'], qualifier=task, selectors=[MethodInvocation(arguments=[MemberReference(member=IDLE, postfix_operators=[], prefix_operators=[], qualifier=Task, selectors=[])], 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=MemberReference(member=activeCount, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=getState, postfix_operators=[], prefix_operators=['!'], qualifier=task, selectors=[MethodInvocation(arguments=[MemberReference(member=CANCELING, postfix_operators=[], prefix_operators=[], qualifier=Task, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Auto-canceling task "), operandr=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ("), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None), MemberReference(member=CANCELING, postfix_operators=[], prefix_operators=[], qualifier=Task, selectors=[])], member=setTaskState, postfix_operators=[], prefix_operators=[], qualifier=taskDao, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CANCELING, postfix_operators=[], prefix_operators=[], qualifier=Task, selectors=[])], member=setState, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MemberReference(member=atStartup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cancelTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=taskCanceled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=listTasks, postfix_operators=[], prefix_operators=[], qualifier=taskDao, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=task)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Task, sub_type=None))), label=None) if[binary_operation[binary_operation[member[.activeCount], ==, literal[0]], ||, member[.atStartup]]] begin[{] assign[member[.allTasksIdle], literal[true]] else begin[{] call[logger.info, parameter[binary_operation[binary_operation[literal["Waiting for "], +, member[.activeCount]], +, literal[" task(s) to go idle."]]]] call[.sleepSeconds, parameter[literal[1]]] end[}] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[cleanup] operator[SEP] Keyword[boolean] identifier[atStartup] operator[SEP] { Keyword[boolean] identifier[allTasksIdle] operator[=] literal[boolean] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[allTasksIdle] operator[SEP] { Keyword[int] identifier[activeCount] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Task] identifier[task] operator[:] identifier[taskDao] operator[SEP] identifier[listTasks] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[task] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Task] operator[SEP] identifier[IDLE] operator[SEP] operator[SEP] { identifier[activeCount] operator[++] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[task] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Task] operator[SEP] identifier[CANCELING] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[task] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[task] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[taskDao] operator[SEP] identifier[setTaskState] operator[SEP] identifier[task] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[Task] operator[SEP] identifier[CANCELING] operator[SEP] operator[SEP] identifier[task] operator[SEP] identifier[setState] operator[SEP] identifier[Task] operator[SEP] identifier[CANCELING] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[atStartup] operator[SEP] { identifier[taskCanceled] operator[SEP] identifier[task] operator[SEP] operator[SEP] } Keyword[else] { identifier[cancelTask] operator[SEP] identifier[task] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[activeCount] operator[==] Other[0] operator[||] identifier[atStartup] operator[SEP] { identifier[allTasksIdle] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[activeCount] operator[+] literal[String] operator[SEP] operator[SEP] identifier[sleepSeconds] operator[SEP] Other[1] operator[SEP] operator[SEP] } } }
public static <K, V> String joinIgnoreNull(Map<K, V> map, String separator, String keyValueSeparator) { return join(map, separator, keyValueSeparator, true); }
class class_name[name] begin[{] method[joinIgnoreNull, return_type[type[String]], modifier[public static], parameter[map, separator, keyValueSeparator]] begin[{] return[call[.join, parameter[member[.map], member[.separator], member[.keyValueSeparator], literal[true]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[String] identifier[joinIgnoreNull] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[map] , identifier[String] identifier[separator] , identifier[String] identifier[keyValueSeparator] operator[SEP] { Keyword[return] identifier[join] operator[SEP] identifier[map] , identifier[separator] , identifier[keyValueSeparator] , literal[boolean] operator[SEP] operator[SEP] }
@Override public final boolean removeExistingConfigurations(String filter) throws Exception { final boolean trace = TraceComponent.isAnyTracingEnabled(); ConfigurationAdmin configAdmin = configAdminRef.getService(); Configuration[] existingConfigurations = configAdmin.listConfigurations(filter); if (existingConfigurations != null) for (Configuration config : existingConfigurations) { Dictionary<?, ?> cfgProps = config.getProperties(); // Don't remove configuration that came from server.xml if (cfgProps != null && FILE.equals(cfgProps.get(CONFIG_SOURCE))) { if (trace && tc.isDebugEnabled()) Tr.debug(tc, "configuration found in server.xml: ", config.getPid()); return false; } else { if (trace && tc.isDebugEnabled()) Tr.debug(tc, "removing", config.getPid()); config.delete(); } } return true; }
class class_name[name] begin[{] method[removeExistingConfigurations, return_type[type[boolean]], modifier[final public], parameter[filter]] begin[{] local_variable[type[boolean], trace] local_variable[type[ConfigurationAdmin], configAdmin] local_variable[type[Configuration], existingConfigurations] if[binary_operation[member[.existingConfigurations], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getProperties, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), name=cfgProps)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Dictionary, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cfgProps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=CONFIG_SOURCE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=cfgProps, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=FILE, selectors=[], type_arguments=None), operator=&&), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=trace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="removing"), MethodInvocation(arguments=[], member=getPid, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=delete, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=trace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="configuration found in server.xml: "), MethodInvocation(arguments=[], member=getPid, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=existingConfigurations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=config)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Configuration, sub_type=None))), label=None) else begin[{] None end[}] return[literal[true]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[boolean] identifier[removeExistingConfigurations] operator[SEP] identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[final] Keyword[boolean] identifier[trace] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[ConfigurationAdmin] identifier[configAdmin] operator[=] identifier[configAdminRef] operator[SEP] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[Configuration] operator[SEP] operator[SEP] identifier[existingConfigurations] operator[=] identifier[configAdmin] operator[SEP] identifier[listConfigurations] operator[SEP] identifier[filter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[existingConfigurations] operator[!=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Configuration] identifier[config] operator[:] identifier[existingConfigurations] operator[SEP] { identifier[Dictionary] operator[<] operator[?] , operator[?] operator[>] identifier[cfgProps] operator[=] identifier[config] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cfgProps] operator[!=] Other[null] operator[&&] identifier[FILE] operator[SEP] identifier[equals] operator[SEP] identifier[cfgProps] operator[SEP] identifier[get] operator[SEP] identifier[CONFIG_SOURCE] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[trace] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[config] operator[SEP] identifier[getPid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[trace] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[config] operator[SEP] identifier[getPid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[config] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
@Override public boolean exists() { try { URL url = this.servletContext.getResource(this.path); return (url != null); } catch (MalformedURLException ex) { return false; } }
class class_name[name] begin[{] method[exists, return_type[type[boolean]], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=servletContext, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=path, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=getResource, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=url)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URL, sub_type=None)), ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['MalformedURLException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[exists] operator[SEP] operator[SEP] { Keyword[try] { identifier[URL] identifier[url] operator[=] Keyword[this] operator[SEP] identifier[servletContext] operator[SEP] identifier[getResource] operator[SEP] Keyword[this] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[url] operator[!=] Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedURLException] identifier[ex] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } }
public static Icon from(File file) throws IOException { Checks.notNull(file, "Provided File"); Checks.check(file.exists(), "Provided file does not exist!"); return from(IOUtil.readFully(file)); }
class class_name[name] begin[{] method[from, return_type[type[Icon]], modifier[public static], parameter[file]] begin[{] call[Checks.notNull, parameter[member[.file], literal["Provided File"]]] call[Checks.check, parameter[call[file.exists, parameter[]], literal["Provided file does not exist!"]]] return[call[.from, parameter[call[IOUtil.readFully, parameter[member[.file]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Icon] identifier[from] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Checks] operator[SEP] identifier[notNull] operator[SEP] identifier[file] , literal[String] operator[SEP] operator[SEP] identifier[Checks] operator[SEP] identifier[check] operator[SEP] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[from] operator[SEP] identifier[IOUtil] operator[SEP] identifier[readFully] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] }