code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
private static void renewCCTokenAsync(final Jwt jwt) { // Not expired yet, try to renew async but let requests use the old token. logger.trace("In renew window but token is not expired yet."); if(!jwt.isRenewing() || System.currentTimeMillis() > jwt.getEarlyRetryTimeout()) { jwt.setRenewing(true); jwt.setEarlyRetryTimeout(System.currentTimeMillis() + jwt.getEarlyRefreshRetryDelay()); logger.trace("Retrieve token async is called while token is not expired yet"); ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor(); executor.schedule(() -> { Result<Jwt> result = getCCTokenRemotely(jwt); if(result.isFailure()) { // swallow the exception here as it is on a best effort basis. logger.error("Async retrieve token error with status: {}", result.getError().toString()); } //set renewing flag to false after response, doesn't matter if it's success or fail. jwt.setRenewing(false); }, 50, TimeUnit.MILLISECONDS); executor.shutdown(); } }
class class_name[name] begin[{] method[renewCCTokenAsync, return_type[void], modifier[private static], parameter[jwt]] begin[{] call[logger.trace, parameter[literal["In renew window but token is not expired yet."]]] if[binary_operation[call[jwt.isRenewing, parameter[]], ||, binary_operation[call[System.currentTimeMillis, parameter[]], >, call[jwt.getEarlyRetryTimeout, parameter[]]]]] begin[{] call[jwt.setRenewing, parameter[literal[true]]] call[jwt.setEarlyRetryTimeout, parameter[binary_operation[call[System.currentTimeMillis, parameter[]], +, call[jwt.getEarlyRefreshRetryDelay, parameter[]]]]] call[logger.trace, parameter[literal["Retrieve token async is called while token is not expired yet"]]] local_variable[type[ScheduledExecutorService], executor] call[executor.schedule, parameter[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=jwt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCCTokenRemotely, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Jwt, sub_type=None))], dimensions=[], name=Result, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isFailure, postfix_operators=[], prefix_operators=[], qualifier=result, 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="Async retrieve token error with status: {}"), MethodInvocation(arguments=[], member=getError, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setRenewing, postfix_operators=[], prefix_operators=[], qualifier=jwt, selectors=[], type_arguments=None), label=None)], parameters=[]), literal[50], member[TimeUnit.MILLISECONDS]]] call[executor.shutdown, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[renewCCTokenAsync] operator[SEP] Keyword[final] identifier[Jwt] identifier[jwt] operator[SEP] { identifier[logger] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[jwt] operator[SEP] identifier[isRenewing] operator[SEP] operator[SEP] operator[||] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[>] identifier[jwt] operator[SEP] identifier[getEarlyRetryTimeout] operator[SEP] operator[SEP] operator[SEP] { identifier[jwt] operator[SEP] identifier[setRenewing] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[jwt] operator[SEP] identifier[setEarlyRetryTimeout] operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[+] identifier[jwt] operator[SEP] identifier[getEarlyRefreshRetryDelay] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ScheduledExecutorService] identifier[executor] operator[=] identifier[Executors] operator[SEP] identifier[newSingleThreadScheduledExecutor] operator[SEP] operator[SEP] operator[SEP] identifier[executor] operator[SEP] identifier[schedule] operator[SEP] operator[SEP] operator[SEP] operator[->] { identifier[Result] operator[<] identifier[Jwt] operator[>] identifier[result] operator[=] identifier[getCCTokenRemotely] operator[SEP] identifier[jwt] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[isFailure] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[result] operator[SEP] identifier[getError] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[jwt] operator[SEP] identifier[setRenewing] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } , Other[50] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] identifier[executor] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] } }
public static PagerStats getDatabaseInfo() { PagerStats stats = new PagerStats(); nativeGetPagerStats(stats); stats.dbStats = SQLiteDatabase.getDbStats(); return stats; }
class class_name[name] begin[{] method[getDatabaseInfo, return_type[type[PagerStats]], modifier[public static], parameter[]] begin[{] local_variable[type[PagerStats], stats] call[.nativeGetPagerStats, parameter[member[.stats]]] assign[member[stats.dbStats], call[SQLiteDatabase.getDbStats, parameter[]]] return[member[.stats]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PagerStats] identifier[getDatabaseInfo] operator[SEP] operator[SEP] { identifier[PagerStats] identifier[stats] operator[=] Keyword[new] identifier[PagerStats] operator[SEP] operator[SEP] operator[SEP] identifier[nativeGetPagerStats] operator[SEP] identifier[stats] operator[SEP] operator[SEP] identifier[stats] operator[SEP] identifier[dbStats] operator[=] identifier[SQLiteDatabase] operator[SEP] identifier[getDbStats] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[stats] operator[SEP] }
@Override public EClass getIfcAreaMeasure() { if (ifcAreaMeasureEClass == null) { ifcAreaMeasureEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(783); } return ifcAreaMeasureEClass; }
class class_name[name] begin[{] method[getIfcAreaMeasure, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcAreaMeasureEClass], ==, literal[null]]] begin[{] assign[member[.ifcAreaMeasureEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=783)], 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[.ifcAreaMeasureEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcAreaMeasure] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcAreaMeasureEClass] operator[==] Other[null] operator[SEP] { identifier[ifcAreaMeasureEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[783] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcAreaMeasureEClass] operator[SEP] }
public Matrix4f set(Matrix4dc m) { this._m00((float) m.m00()); this._m01((float) m.m01()); this._m02((float) m.m02()); this._m03((float) m.m03()); this._m10((float) m.m10()); this._m11((float) m.m11()); this._m12((float) m.m12()); this._m13((float) m.m13()); this._m20((float) m.m20()); this._m21((float) m.m21()); this._m22((float) m.m22()); this._m23((float) m.m23()); this._m30((float) m.m30()); this._m31((float) m.m31()); this._m32((float) m.m32()); this._m33((float) m.m33()); this._properties(m.properties()); return this; }
class class_name[name] begin[{] method[set, return_type[type[Matrix4f]], modifier[public], parameter[m]] begin[{] THIS[call[None._m00, parameter[Cast(expression=MethodInvocation(arguments=[], member=m00, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m01, parameter[Cast(expression=MethodInvocation(arguments=[], member=m01, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m02, parameter[Cast(expression=MethodInvocation(arguments=[], member=m02, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m03, parameter[Cast(expression=MethodInvocation(arguments=[], member=m03, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m10, parameter[Cast(expression=MethodInvocation(arguments=[], member=m10, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m11, parameter[Cast(expression=MethodInvocation(arguments=[], member=m11, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m12, parameter[Cast(expression=MethodInvocation(arguments=[], member=m12, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m13, parameter[Cast(expression=MethodInvocation(arguments=[], member=m13, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m20, parameter[Cast(expression=MethodInvocation(arguments=[], member=m20, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m21, parameter[Cast(expression=MethodInvocation(arguments=[], member=m21, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m22, parameter[Cast(expression=MethodInvocation(arguments=[], member=m22, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m23, parameter[Cast(expression=MethodInvocation(arguments=[], member=m23, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m30, parameter[Cast(expression=MethodInvocation(arguments=[], member=m30, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m31, parameter[Cast(expression=MethodInvocation(arguments=[], member=m31, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m32, parameter[Cast(expression=MethodInvocation(arguments=[], member=m32, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._m33, parameter[Cast(expression=MethodInvocation(arguments=[], member=m33, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))]]] THIS[call[None._properties, parameter[call[m.properties, parameter[]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Matrix4f] identifier[set] operator[SEP] identifier[Matrix4dc] identifier[m] operator[SEP] { Keyword[this] operator[SEP] identifier[_m00] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m00] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m01] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m01] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m02] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m02] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m03] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m03] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m10] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m10] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m11] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m11] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m12] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m12] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m13] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m13] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m20] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m20] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m21] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m21] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m22] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m22] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m23] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m23] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m30] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m30] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m31] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m31] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m32] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m32] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m33] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[m] operator[SEP] identifier[m33] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_properties] operator[SEP] identifier[m] operator[SEP] identifier[properties] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
void cparc(Arc oa, State from, State to) { newarc(oa.type, oa.co, from, to); }
class class_name[name] begin[{] method[cparc, return_type[void], modifier[default], parameter[oa, from, to]] begin[{] call[.newarc, parameter[member[oa.type], member[oa.co], member[.from], member[.to]]] end[}] END[}]
Keyword[void] identifier[cparc] operator[SEP] identifier[Arc] identifier[oa] , identifier[State] identifier[from] , identifier[State] identifier[to] operator[SEP] { identifier[newarc] operator[SEP] identifier[oa] operator[SEP] identifier[type] , identifier[oa] operator[SEP] identifier[co] , identifier[from] , identifier[to] operator[SEP] operator[SEP] }
@Override public List<CPDisplayLayout> findAll(int start, int end) { return findAll(start, end, null); }
class class_name[name] begin[{] method[findAll, return_type[type[List]], modifier[public], parameter[start, end]] begin[{] return[call[.findAll, parameter[member[.start], member[.end], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPDisplayLayout] operator[>] identifier[findAll] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[return] identifier[findAll] operator[SEP] identifier[start] , identifier[end] , Other[null] operator[SEP] operator[SEP] }
static String getResourceTypeIconClass(String resourceTypeName, boolean small) { StringBuffer sb = new StringBuffer(CmsGwtConstants.TYPE_ICON_CLASS); sb.append("_").append(resourceTypeName.hashCode()); if (small) { sb.append(SMALL_SUFFIX); } return sb.toString(); }
class class_name[name] begin[{] method[getResourceTypeIconClass, return_type[type[String]], modifier[static], parameter[resourceTypeName, small]] begin[{] local_variable[type[StringBuffer], sb] call[sb.append, parameter[literal["_"]]] if[member[.small]] begin[{] call[sb.append, parameter[member[.SMALL_SUFFIX]]] else begin[{] None end[}] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[static] identifier[String] identifier[getResourceTypeIconClass] operator[SEP] identifier[String] identifier[resourceTypeName] , Keyword[boolean] identifier[small] operator[SEP] { identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] identifier[CmsGwtConstants] operator[SEP] identifier[TYPE_ICON_CLASS] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[resourceTypeName] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[small] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[SMALL_SUFFIX] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public JimfsPath createRoot(Name root) { return createPath(checkNotNull(root), ImmutableList.<Name>of()); }
class class_name[name] begin[{] method[createRoot, return_type[type[JimfsPath]], modifier[public], parameter[root]] begin[{] return[call[.createPath, parameter[call[.checkNotNull, parameter[member[.root]]], call[.ImmutableList, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[JimfsPath] identifier[createRoot] operator[SEP] identifier[Name] identifier[root] operator[SEP] { Keyword[return] identifier[createPath] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[root] operator[SEP] , identifier[ImmutableList] operator[SEP] operator[<] identifier[Name] operator[>] identifier[of] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Type makeSomethingFromGTS(List<Element> children) throws Exception { if (children.isEmpty()) return null; if (children.size() == 1) { String type = children.get(0).getAttribute("xsi:type"); if (type.equals("IVL_TS")) return makePeriodFromIVL(children.get(0)); else throw new Exception("Unknown GTS type '"+type+"'"); } CommaSeparatedStringBuilder t = new CommaSeparatedStringBuilder(); for (Element c : children) t.append(c.getAttribute("xsi:type")); if (t.toString().equals("IVL_TS, PIVL_TS")) return makeTimingFromBoundedPIVL(children.get(0), children.get(1)); if (t.toString().equals("IVL_TS, EIVL_TS")) return makeTimingFromBoundedEIVL(children.get(0), children.get(1)); throw new Exception("Unknown GTS pattern '"+t.toString()+"'"); }
class class_name[name] begin[{] method[makeSomethingFromGTS, return_type[type[Type]], modifier[public], parameter[children]] begin[{] if[call[children.isEmpty, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[call[children.size, parameter[]], ==, literal[1]]] begin[{] local_variable[type[String], type] if[call[type.equals, parameter[literal["IVL_TS"]]]] begin[{] return[call[.makePeriodFromIVL, parameter[call[children.get, parameter[literal[0]]]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown GTS type '"), operandr=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) end[}] else begin[{] None end[}] local_variable[type[CommaSeparatedStringBuilder], t] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="xsi:type")], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MemberReference(member=children, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None))), label=None) if[call[t.toString, parameter[]]] begin[{] return[call[.makeTimingFromBoundedPIVL, parameter[call[children.get, parameter[literal[0]]], call[children.get, parameter[literal[1]]]]]] else begin[{] None end[}] if[call[t.toString, parameter[]]] begin[{] return[call[.makeTimingFromBoundedEIVL, parameter[call[children.get, parameter[literal[0]]], call[children.get, parameter[literal[1]]]]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown GTS pattern '"), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) end[}] END[}]
Keyword[public] identifier[Type] identifier[makeSomethingFromGTS] operator[SEP] identifier[List] operator[<] identifier[Element] operator[>] identifier[children] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[children] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[children] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[String] identifier[type] operator[=] identifier[children] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[makePeriodFromIVL] operator[SEP] identifier[children] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[type] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[CommaSeparatedStringBuilder] identifier[t] operator[=] Keyword[new] identifier[CommaSeparatedStringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Element] identifier[c] operator[:] identifier[children] operator[SEP] identifier[t] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[makeTimingFromBoundedPIVL] operator[SEP] identifier[children] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] , identifier[children] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[makeTimingFromBoundedEIVL] operator[SEP] identifier[children] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] , identifier[children] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[t] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] }
public String getDisplayName(Locale locale) { if (locale.getLanguage().equals("am")) { return AMHARIC[this.index - 1]; } return TRANSSCRIPTION[this.index - 1]; }
class class_name[name] begin[{] method[getDisplayName, return_type[type[String]], modifier[public], parameter[locale]] begin[{] if[call[locale.getLanguage, parameter[]]] begin[{] return[member[.AMHARIC]] else begin[{] None end[}] return[member[.TRANSSCRIPTION]] end[}] END[}]
Keyword[public] identifier[String] identifier[getDisplayName] operator[SEP] identifier[Locale] identifier[locale] operator[SEP] { Keyword[if] operator[SEP] identifier[locale] operator[SEP] identifier[getLanguage] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[AMHARIC] operator[SEP] Keyword[this] operator[SEP] identifier[index] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[return] identifier[TRANSSCRIPTION] operator[SEP] Keyword[this] operator[SEP] identifier[index] operator[-] Other[1] operator[SEP] operator[SEP] }
protected void addPrependingAddOnToInputGroup(FacesContext context, ResponseWriter rw, UIComponent prependingAddOnFacet, boolean hasPrependingAddOn, SelectOneMenu menu) throws IOException { if (hasPrependingAddOn) { R.decorateFacetComponent(menu, prependingAddOnFacet, context, rw); } }
class class_name[name] begin[{] method[addPrependingAddOnToInputGroup, return_type[void], modifier[protected], parameter[context, rw, prependingAddOnFacet, hasPrependingAddOn, menu]] begin[{] if[member[.hasPrependingAddOn]] begin[{] call[R.decorateFacetComponent, parameter[member[.menu], member[.prependingAddOnFacet], member[.context], member[.rw]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addPrependingAddOnToInputGroup] operator[SEP] identifier[FacesContext] identifier[context] , identifier[ResponseWriter] identifier[rw] , identifier[UIComponent] identifier[prependingAddOnFacet] , Keyword[boolean] identifier[hasPrependingAddOn] , identifier[SelectOneMenu] identifier[menu] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[hasPrependingAddOn] operator[SEP] { identifier[R] operator[SEP] identifier[decorateFacetComponent] operator[SEP] identifier[menu] , identifier[prependingAddOnFacet] , identifier[context] , identifier[rw] operator[SEP] operator[SEP] } }
public long getMetadataLastModified( String path ) throws IOException, MetadataNotFoundException { Entry entry = backing.get( StringUtils.join( StringUtils.split( StringUtils.strip( path, "/" ), "/" ), "/" ) + "/maven-metadata.xml" ); if ( !( entry instanceof FileEntry ) ) { throw new MetadataNotFoundException( path ); } return entry.getLastModified(); }
class class_name[name] begin[{] method[getMetadataLastModified, return_type[type[long]], modifier[public], parameter[path]] begin[{] local_variable[type[Entry], entry] if[binary_operation[member[.entry], instanceof, type[FileEntry]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=path, 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=MetadataNotFoundException, sub_type=None)), label=None) else begin[{] None end[}] return[call[entry.getLastModified, parameter[]]] end[}] END[}]
Keyword[public] Keyword[long] identifier[getMetadataLastModified] operator[SEP] identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[IOException] , identifier[MetadataNotFoundException] { identifier[Entry] identifier[entry] operator[=] identifier[backing] operator[SEP] identifier[get] operator[SEP] identifier[StringUtils] operator[SEP] identifier[join] operator[SEP] identifier[StringUtils] operator[SEP] identifier[split] operator[SEP] identifier[StringUtils] operator[SEP] identifier[strip] operator[SEP] identifier[path] , literal[String] operator[SEP] , literal[String] operator[SEP] , literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[entry] Keyword[instanceof] identifier[FileEntry] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[MetadataNotFoundException] operator[SEP] identifier[path] operator[SEP] operator[SEP] } Keyword[return] identifier[entry] operator[SEP] identifier[getLastModified] operator[SEP] operator[SEP] operator[SEP] }
public static List<Path> getSubPathList(Path startDirectoryPath, Predicate<Path> filter) { return getSubPathList(startDirectoryPath, Integer.MAX_VALUE, filter); }
class class_name[name] begin[{] method[getSubPathList, return_type[type[List]], modifier[public static], parameter[startDirectoryPath, filter]] begin[{] return[call[.getSubPathList, parameter[member[.startDirectoryPath], member[Integer.MAX_VALUE], member[.filter]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Path] operator[>] identifier[getSubPathList] operator[SEP] identifier[Path] identifier[startDirectoryPath] , identifier[Predicate] operator[<] identifier[Path] operator[>] identifier[filter] operator[SEP] { Keyword[return] identifier[getSubPathList] operator[SEP] identifier[startDirectoryPath] , identifier[Integer] operator[SEP] identifier[MAX_VALUE] , identifier[filter] operator[SEP] operator[SEP] }
@Override public byte[] getUserSessionKey ( CIFSContext tc, byte[] chlng ) { if ( this.hashesExternal ) { return null; } return super.getUserSessionKey(tc, chlng); }
class class_name[name] begin[{] method[getUserSessionKey, return_type[type[byte]], modifier[public], parameter[tc, chlng]] begin[{] if[THIS[member[None.hashesExternal]]] begin[{] return[literal[null]] else begin[{] None end[}] return[SuperMethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=chlng, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getUserSessionKey, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[getUserSessionKey] operator[SEP] identifier[CIFSContext] identifier[tc] , Keyword[byte] operator[SEP] operator[SEP] identifier[chlng] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[hashesExternal] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[getUserSessionKey] operator[SEP] identifier[tc] , identifier[chlng] operator[SEP] operator[SEP] }
@Override public GetDetectorResult getDetector(GetDetectorRequest request) { request = beforeClientExecution(request); return executeGetDetector(request); }
class class_name[name] begin[{] method[getDetector, return_type[type[GetDetectorResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetDetector, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GetDetectorResult] identifier[getDetector] operator[SEP] identifier[GetDetectorRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeGetDetector] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public JvmConstructor toConstructor(/* @Nullable */ EObject sourceElement, /* @Nullable */ Procedure1<? super JvmConstructor> initializer) { if(sourceElement == null) return null; JvmConstructor constructor = typesFactory.createJvmConstructor(); constructor.setVisibility(JvmVisibility.PUBLIC); associate(sourceElement, constructor); return initializeSafely(constructor, initializer); }
class class_name[name] begin[{] method[toConstructor, return_type[type[JvmConstructor]], modifier[public], parameter[sourceElement, initializer]] begin[{] if[binary_operation[member[.sourceElement], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[JvmConstructor], constructor] call[constructor.setVisibility, parameter[member[JvmVisibility.PUBLIC]]] call[.associate, parameter[member[.sourceElement], member[.constructor]]] return[call[.initializeSafely, parameter[member[.constructor], member[.initializer]]]] end[}] END[}]
Keyword[public] identifier[JvmConstructor] identifier[toConstructor] operator[SEP] identifier[EObject] identifier[sourceElement] , identifier[Procedure1] operator[<] operator[?] Keyword[super] identifier[JvmConstructor] operator[>] identifier[initializer] operator[SEP] { Keyword[if] operator[SEP] identifier[sourceElement] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[JvmConstructor] identifier[constructor] operator[=] identifier[typesFactory] operator[SEP] identifier[createJvmConstructor] operator[SEP] operator[SEP] operator[SEP] identifier[constructor] operator[SEP] identifier[setVisibility] operator[SEP] identifier[JvmVisibility] operator[SEP] identifier[PUBLIC] operator[SEP] operator[SEP] identifier[associate] operator[SEP] identifier[sourceElement] , identifier[constructor] operator[SEP] operator[SEP] Keyword[return] identifier[initializeSafely] operator[SEP] identifier[constructor] , identifier[initializer] operator[SEP] operator[SEP] }
public boolean addMapping(String hostName, String contextPath, String globalName) { log.info("Add mapping global: {} host: {} context: {}", new Object[] { globalName, hostName, contextPath }); final String key = getKey(hostName, contextPath); log.debug("Add mapping: {} => {}", key, globalName); return (mapping.putIfAbsent(key, globalName) == null); }
class class_name[name] begin[{] method[addMapping, return_type[type[boolean]], modifier[public], parameter[hostName, contextPath, globalName]] begin[{] call[log.info, parameter[literal["Add mapping global: {} host: {} context: {}"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=globalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hostName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contextPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] local_variable[type[String], key] call[log.debug, parameter[literal["Add mapping: {} => {}"], member[.key], member[.globalName]]] return[binary_operation[call[mapping.putIfAbsent, parameter[member[.key], member[.globalName]]], ==, literal[null]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[addMapping] operator[SEP] identifier[String] identifier[hostName] , identifier[String] identifier[contextPath] , identifier[String] identifier[globalName] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[globalName] , identifier[hostName] , identifier[contextPath] } operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[key] operator[=] identifier[getKey] operator[SEP] identifier[hostName] , identifier[contextPath] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[key] , identifier[globalName] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[mapping] operator[SEP] identifier[putIfAbsent] operator[SEP] identifier[key] , identifier[globalName] operator[SEP] operator[==] Other[null] operator[SEP] operator[SEP] }
public static String toPDB(Chain chain){ StringBuffer w = new StringBuffer(); int nrGroups = chain.getAtomLength(); for ( int h=0; h<nrGroups;h++){ Group g= chain.getAtomGroup(h); toPDB(g,w); } return w.toString(); }
class class_name[name] begin[{] method[toPDB, return_type[type[String]], modifier[public static], parameter[chain]] begin[{] local_variable[type[StringBuffer], w] local_variable[type[int], nrGroups] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAtomGroup, postfix_operators=[], prefix_operators=[], qualifier=chain, selectors=[], type_arguments=None), name=g)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Group, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toPDB, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nrGroups, 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=h)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=h, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[w.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[toPDB] operator[SEP] identifier[Chain] identifier[chain] operator[SEP] { identifier[StringBuffer] identifier[w] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[nrGroups] operator[=] identifier[chain] operator[SEP] identifier[getAtomLength] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[h] operator[=] Other[0] operator[SEP] identifier[h] operator[<] identifier[nrGroups] operator[SEP] identifier[h] operator[++] operator[SEP] { identifier[Group] identifier[g] operator[=] identifier[chain] operator[SEP] identifier[getAtomGroup] operator[SEP] identifier[h] operator[SEP] operator[SEP] identifier[toPDB] operator[SEP] identifier[g] , identifier[w] operator[SEP] operator[SEP] } Keyword[return] identifier[w] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static Vec extractTrueVec(Vec b) { while(b instanceof VecPaired) b = ((VecPaired) b).getVector(); return b; }
class class_name[name] begin[{] method[extractTrueVec, return_type[type[Vec]], modifier[public static], parameter[b]] begin[{] while[binary_operation[member[.b], instanceof, type[VecPaired]]] begin[{] assign[member[.b], Cast(expression=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=VecPaired, sub_type=None))] end[}] return[member[.b]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Vec] identifier[extractTrueVec] operator[SEP] identifier[Vec] identifier[b] operator[SEP] { Keyword[while] operator[SEP] identifier[b] Keyword[instanceof] identifier[VecPaired] operator[SEP] identifier[b] operator[=] operator[SEP] operator[SEP] identifier[VecPaired] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[getVector] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[b] operator[SEP] }
int getRawWidth(int c, String name) { Object metrics[]; if (name == null) { // font specific metrics = (Object[])CharMetrics.get(Integer.valueOf(c)); } else { if (name.equals(".notdef")) return 0; metrics = (Object[])CharMetrics.get(name); } if (metrics != null) return ((Integer)(metrics[1])).intValue(); return 0; }
class class_name[name] begin[{] method[getRawWidth, return_type[type[int]], modifier[default], parameter[c, name]] begin[{] local_variable[type[Object], metrics] if[binary_operation[member[.name], ==, literal[null]]] begin[{] assign[member[.metrics], Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=CharMetrics, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[None], name=Object, sub_type=None))] else begin[{] if[call[name.equals, parameter[literal[".notdef"]]]] begin[{] return[literal[0]] else begin[{] None end[}] assign[member[.metrics], Cast(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=CharMetrics, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[None], name=Object, sub_type=None))] end[}] if[binary_operation[member[.metrics], !=, literal[null]]] begin[{] return[Cast(expression=MemberReference(member=metrics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] else begin[{] None end[}] return[literal[0]] end[}] END[}]
Keyword[int] identifier[getRawWidth] operator[SEP] Keyword[int] identifier[c] , identifier[String] identifier[name] operator[SEP] { identifier[Object] identifier[metrics] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] { identifier[metrics] operator[=] operator[SEP] identifier[Object] operator[SEP] operator[SEP] operator[SEP] identifier[CharMetrics] operator[SEP] identifier[get] operator[SEP] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[c] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Other[0] operator[SEP] identifier[metrics] operator[=] operator[SEP] identifier[Object] operator[SEP] operator[SEP] operator[SEP] identifier[CharMetrics] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[metrics] operator[!=] Other[null] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] operator[SEP] identifier[metrics] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[0] operator[SEP] }
@Override public ResourceSet<Binding> read(final TwilioRestClient client) { return new ResourceSet<>(this, client, firstPage(client)); }
class class_name[name] begin[{] method[read, return_type[type[ResourceSet]], modifier[public], parameter[client]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=firstPage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ResourceSet, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ResourceSet] operator[<] identifier[Binding] operator[>] identifier[read] operator[SEP] Keyword[final] identifier[TwilioRestClient] identifier[client] operator[SEP] { Keyword[return] Keyword[new] identifier[ResourceSet] operator[<] operator[>] operator[SEP] Keyword[this] , identifier[client] , identifier[firstPage] operator[SEP] identifier[client] operator[SEP] operator[SEP] operator[SEP] }
public final EObject entryRuleXReturnExpression() throws RecognitionException { EObject current = null; EObject iv_ruleXReturnExpression = null; try { // InternalSARL.g:15404:58: (iv_ruleXReturnExpression= ruleXReturnExpression EOF ) // InternalSARL.g:15405:2: iv_ruleXReturnExpression= ruleXReturnExpression EOF { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXReturnExpressionRule()); } pushFollow(FOLLOW_1); iv_ruleXReturnExpression=ruleXReturnExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current =iv_ruleXReturnExpression; } match(input,EOF,FOLLOW_2); if (state.failed) return current; } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[entryRuleXReturnExpression, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[EObject], iv_ruleXReturnExpression] TryStatement(block=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXReturnExpressionRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=iv_ruleXReturnExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXReturnExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=iv_ruleXReturnExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[EObject] identifier[entryRuleXReturnExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[iv_ruleXReturnExpression] operator[=] Other[null] operator[SEP] Keyword[try] { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXReturnExpressionRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_1] operator[SEP] operator[SEP] identifier[iv_ruleXReturnExpression] operator[=] identifier[ruleXReturnExpression] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[iv_ruleXReturnExpression] operator[SEP] } identifier[match] operator[SEP] identifier[input] , identifier[EOF] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }
public int getReplaceContextLength() { if (replaceContextLength == null) { int replacementOffset = getReplaceRegion().getOffset(); ITextRegion currentRegion = getCurrentNode().getTextRegion(); int replaceContextLength = currentRegion.getLength() - (replacementOffset - currentRegion.getOffset()); this.replaceContextLength = replaceContextLength; return replaceContextLength; } return replaceContextLength.intValue(); }
class class_name[name] begin[{] method[getReplaceContextLength, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.replaceContextLength], ==, literal[null]]] begin[{] local_variable[type[int], replacementOffset] local_variable[type[ITextRegion], currentRegion] local_variable[type[int], replaceContextLength] assign[THIS[member[None.replaceContextLength]], member[.replaceContextLength]] return[member[.replaceContextLength]] else begin[{] None end[}] return[call[replaceContextLength.intValue, parameter[]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getReplaceContextLength] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[replaceContextLength] operator[==] Other[null] operator[SEP] { Keyword[int] identifier[replacementOffset] operator[=] identifier[getReplaceRegion] operator[SEP] operator[SEP] operator[SEP] identifier[getOffset] operator[SEP] operator[SEP] operator[SEP] identifier[ITextRegion] identifier[currentRegion] operator[=] identifier[getCurrentNode] operator[SEP] operator[SEP] operator[SEP] identifier[getTextRegion] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[replaceContextLength] operator[=] identifier[currentRegion] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[-] operator[SEP] identifier[replacementOffset] operator[-] identifier[currentRegion] operator[SEP] identifier[getOffset] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[replaceContextLength] operator[=] identifier[replaceContextLength] operator[SEP] Keyword[return] identifier[replaceContextLength] operator[SEP] } Keyword[return] identifier[replaceContextLength] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] }
public boolean hasBuilder() throws CoreException { Vector<ICommand> buildCommands = new Vector<ICommand>(); IProjectDescription description = project.getDescription(); for (ICommand command : description.getBuildSpec()) { buildCommands.add(command); if (command.getBuilderName().equals(ICoreConstants.BUILDER_ID)) return true; } return false; }
class class_name[name] begin[{] method[hasBuilder, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[Vector], buildCommands] local_variable[type[IProjectDescription], description] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=buildCommands, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=getBuilderName, postfix_operators=[], prefix_operators=[], qualifier=command, selectors=[MethodInvocation(arguments=[MemberReference(member=BUILDER_ID, postfix_operators=[], prefix_operators=[], qualifier=ICoreConstants, 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=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getBuildSpec, postfix_operators=[], prefix_operators=[], qualifier=description, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=command)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ICommand, sub_type=None))), label=None) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[hasBuilder] operator[SEP] operator[SEP] Keyword[throws] identifier[CoreException] { identifier[Vector] operator[<] identifier[ICommand] operator[>] identifier[buildCommands] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[ICommand] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[IProjectDescription] identifier[description] operator[=] identifier[project] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ICommand] identifier[command] operator[:] identifier[description] operator[SEP] identifier[getBuildSpec] operator[SEP] operator[SEP] operator[SEP] { identifier[buildCommands] operator[SEP] identifier[add] operator[SEP] identifier[command] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[command] operator[SEP] identifier[getBuilderName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[ICoreConstants] operator[SEP] identifier[BUILDER_ID] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
@Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.LLE__LNK_TYPE: setLnkType(LNK_TYPE_EDEFAULT); return; case AfplibPackage.LLE__RG: getRG().clear(); return; } super.eUnset(featureID); }
class class_name[name] begin[{] method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=LLE__LNK_TYPE, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=LNK_TYPE_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setLnkType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=LLE__RG, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getRG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=clear, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eUnset, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[LLE__LNK_TYPE] operator[:] identifier[setLnkType] operator[SEP] identifier[LNK_TYPE_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[LLE__RG] operator[:] identifier[getRG] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[super] operator[SEP] identifier[eUnset] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
public Transactions getInvoiceTransactions(final String invoiceId) { return doGET(Invoices.INVOICES_RESOURCE + "/" + invoiceId + Transactions.TRANSACTIONS_RESOURCE, Transactions.class, new QueryParams()); }
class class_name[name] begin[{] method[getInvoiceTransactions, return_type[type[Transactions]], modifier[public], parameter[invoiceId]] begin[{] return[call[.doGET, parameter[binary_operation[binary_operation[binary_operation[member[Invoices.INVOICES_RESOURCE], +, literal["/"]], +, member[.invoiceId]], +, member[Transactions.TRANSACTIONS_RESOURCE]], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Transactions, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QueryParams, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Transactions] identifier[getInvoiceTransactions] operator[SEP] Keyword[final] identifier[String] identifier[invoiceId] operator[SEP] { Keyword[return] identifier[doGET] operator[SEP] identifier[Invoices] operator[SEP] identifier[INVOICES_RESOURCE] operator[+] literal[String] operator[+] identifier[invoiceId] operator[+] identifier[Transactions] operator[SEP] identifier[TRANSACTIONS_RESOURCE] , identifier[Transactions] operator[SEP] Keyword[class] , Keyword[new] identifier[QueryParams] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static void eachObject(File self, Closure closure) throws IOException, ClassNotFoundException { IOGroovyMethods.eachObject(newObjectInputStream(self), closure); }
class class_name[name] begin[{] method[eachObject, return_type[void], modifier[public static], parameter[self, closure]] begin[{] call[IOGroovyMethods.eachObject, parameter[call[.newObjectInputStream, parameter[member[.self]]], member[.closure]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[eachObject] operator[SEP] identifier[File] identifier[self] , identifier[Closure] identifier[closure] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { identifier[IOGroovyMethods] operator[SEP] identifier[eachObject] operator[SEP] identifier[newObjectInputStream] operator[SEP] identifier[self] operator[SEP] , identifier[closure] operator[SEP] operator[SEP] }
@Override protected void visitPrintNode(PrintNode node) { Expression expr = translateExpr(node.getExpr()); // Process directives. for (PrintDirectiveNode directiveNode : node.getChildren()) { // Get directive. SoyPrintDirective directive = directiveNode.getPrintDirective(); if (!(directive instanceof SoyJsSrcPrintDirective)) { errorReporter.report( node.getSourceLocation(), UNKNOWN_SOY_JS_SRC_PRINT_DIRECTIVE, directiveNode.getName()); return; } // Get directive args. List<ExprRootNode> argNodes = directiveNode.getArgs(); // Convert args to CodeChunks. List<Expression> argChunks = new ArrayList<>(argNodes.size()); for (ExprRootNode argNode : argNodes) { argChunks.add(translateExpr(argNode)); } // Apply directive. expr = SoyJsPluginUtils.applyDirective( expr, (SoyJsSrcPrintDirective) directive, argChunks, node.getSourceLocation(), errorReporter); } chunks.add(expr); }
class class_name[name] begin[{] method[visitPrintNode, return_type[void], modifier[protected], parameter[node]] begin[{] local_variable[type[Expression], expr] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getPrintDirective, postfix_operators=[], prefix_operators=[], qualifier=directiveNode, selectors=[], type_arguments=None), name=directive)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SoyPrintDirective, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=directive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=SoyJsSrcPrintDirective, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSourceLocation, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), MemberReference(member=UNKNOWN_SOY_JS_SRC_PRINT_DIRECTIVE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=directiveNode, selectors=[], type_arguments=None)], member=report, postfix_operators=[], prefix_operators=[], qualifier=errorReporter, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getArgs, postfix_operators=[], prefix_operators=[], qualifier=directiveNode, selectors=[], type_arguments=None), name=argNodes)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ExprRootNode, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=argNodes, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=argChunks)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=argNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=translateExpr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=argChunks, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=argNodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=argNode)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ExprRootNode, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=directive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SoyJsSrcPrintDirective, sub_type=None)), MemberReference(member=argChunks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getSourceLocation, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), MemberReference(member=errorReporter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyDirective, postfix_operators=[], prefix_operators=[], qualifier=SoyJsPluginUtils, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=directiveNode)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PrintDirectiveNode, sub_type=None))), label=None) call[chunks.add, parameter[member[.expr]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[visitPrintNode] operator[SEP] identifier[PrintNode] identifier[node] operator[SEP] { identifier[Expression] identifier[expr] operator[=] identifier[translateExpr] operator[SEP] identifier[node] operator[SEP] identifier[getExpr] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[PrintDirectiveNode] identifier[directiveNode] operator[:] identifier[node] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] { identifier[SoyPrintDirective] identifier[directive] operator[=] identifier[directiveNode] operator[SEP] identifier[getPrintDirective] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[directive] Keyword[instanceof] identifier[SoyJsSrcPrintDirective] operator[SEP] operator[SEP] { identifier[errorReporter] operator[SEP] identifier[report] operator[SEP] identifier[node] operator[SEP] identifier[getSourceLocation] operator[SEP] operator[SEP] , identifier[UNKNOWN_SOY_JS_SRC_PRINT_DIRECTIVE] , identifier[directiveNode] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[List] operator[<] identifier[ExprRootNode] operator[>] identifier[argNodes] operator[=] identifier[directiveNode] operator[SEP] identifier[getArgs] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Expression] operator[>] identifier[argChunks] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[argNodes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ExprRootNode] identifier[argNode] operator[:] identifier[argNodes] operator[SEP] { identifier[argChunks] operator[SEP] identifier[add] operator[SEP] identifier[translateExpr] operator[SEP] identifier[argNode] operator[SEP] operator[SEP] operator[SEP] } identifier[expr] operator[=] identifier[SoyJsPluginUtils] operator[SEP] identifier[applyDirective] operator[SEP] identifier[expr] , operator[SEP] identifier[SoyJsSrcPrintDirective] operator[SEP] identifier[directive] , identifier[argChunks] , identifier[node] operator[SEP] identifier[getSourceLocation] operator[SEP] operator[SEP] , identifier[errorReporter] operator[SEP] operator[SEP] } identifier[chunks] operator[SEP] identifier[add] operator[SEP] identifier[expr] operator[SEP] operator[SEP] }
public static void record(MonitorConfig config, TimeUnit reportUnit, long duration, TimeUnit durationUnit) { INSTANCE.get(config, reportUnit).record(duration, durationUnit); }
class class_name[name] begin[{] method[record, return_type[void], modifier[public static], parameter[config, reportUnit, duration, durationUnit]] begin[{] call[INSTANCE.get, parameter[member[.config], member[.reportUnit]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[record] operator[SEP] identifier[MonitorConfig] identifier[config] , identifier[TimeUnit] identifier[reportUnit] , Keyword[long] identifier[duration] , identifier[TimeUnit] identifier[durationUnit] operator[SEP] { identifier[INSTANCE] operator[SEP] identifier[get] operator[SEP] identifier[config] , identifier[reportUnit] operator[SEP] operator[SEP] identifier[record] operator[SEP] identifier[duration] , identifier[durationUnit] operator[SEP] operator[SEP] }
public CreateSimulationApplicationResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
class class_name[name] begin[{] method[withTags, return_type[type[CreateSimulationApplicationResult]], modifier[public], parameter[tags]] begin[{] call[.setTags, parameter[member[.tags]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[CreateSimulationApplicationResult] identifier[withTags] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[tags] operator[SEP] { identifier[setTags] operator[SEP] identifier[tags] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
protected InputStream getStreamFromFile(String imageUri, Object extra) throws IOException { String filePath = Scheme.FILE.crop(imageUri); if (isVideoFileUri(imageUri)) { return getVideoThumbnailStream(filePath); } else { BufferedInputStream imageStream = new BufferedInputStream(new FileInputStream(filePath), BUFFER_SIZE); return new ContentLengthInputStream(imageStream, (int) new File(filePath).length()); } }
class class_name[name] begin[{] method[getStreamFromFile, return_type[type[InputStream]], modifier[protected], parameter[imageUri, extra]] begin[{] local_variable[type[String], filePath] if[call[.isVideoFileUri, parameter[member[.imageUri]]]] begin[{] return[call[.getVideoThumbnailStream, parameter[member[.filePath]]]] else begin[{] local_variable[type[BufferedInputStream], imageStream] return[ClassCreator(arguments=[MemberReference(member=imageStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=ClassCreator(arguments=[MemberReference(member=filePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), type=BasicType(dimensions=[], name=int))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ContentLengthInputStream, sub_type=None))] end[}] end[}] END[}]
Keyword[protected] identifier[InputStream] identifier[getStreamFromFile] operator[SEP] identifier[String] identifier[imageUri] , identifier[Object] identifier[extra] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[filePath] operator[=] identifier[Scheme] operator[SEP] identifier[FILE] operator[SEP] identifier[crop] operator[SEP] identifier[imageUri] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isVideoFileUri] operator[SEP] identifier[imageUri] operator[SEP] operator[SEP] { Keyword[return] identifier[getVideoThumbnailStream] operator[SEP] identifier[filePath] operator[SEP] operator[SEP] } Keyword[else] { identifier[BufferedInputStream] identifier[imageStream] operator[=] Keyword[new] identifier[BufferedInputStream] operator[SEP] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[filePath] operator[SEP] , identifier[BUFFER_SIZE] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ContentLengthInputStream] operator[SEP] identifier[imageStream] , operator[SEP] Keyword[int] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[filePath] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static <T> Set<T> createSet (Iterable<T> elements) { return createSet (elements.iterator ()); }
class class_name[name] begin[{] method[createSet, return_type[type[Set]], modifier[public static], parameter[elements]] begin[{] return[call[.createSet, parameter[call[elements.iterator, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Set] operator[<] identifier[T] operator[>] identifier[createSet] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[elements] operator[SEP] { Keyword[return] identifier[createSet] operator[SEP] identifier[elements] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public List<GroovyRowResult> executeInsert(Map params, String sql, List<String> keyColumnNames) throws SQLException { return executeInsert(sql, singletonList(params), keyColumnNames); }
class class_name[name] begin[{] method[executeInsert, return_type[type[List]], modifier[public], parameter[params, sql, keyColumnNames]] begin[{] return[call[.executeInsert, parameter[member[.sql], call[.singletonList, parameter[member[.params]]], member[.keyColumnNames]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[GroovyRowResult] operator[>] identifier[executeInsert] operator[SEP] identifier[Map] identifier[params] , identifier[String] identifier[sql] , identifier[List] operator[<] identifier[String] operator[>] identifier[keyColumnNames] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[return] identifier[executeInsert] operator[SEP] identifier[sql] , identifier[singletonList] operator[SEP] identifier[params] operator[SEP] , identifier[keyColumnNames] operator[SEP] operator[SEP] }
private List<String> getProcessList(String queueName) throws RabbitmqCommunicateException { List<String> processList = getContextBuilder().getProcessList(queueName); if (processList == null || processList.size() == 0) { String messageFmt = "QueueName's ProcessList is not defined. QueueName={0}"; String message = MessageFormat.format(messageFmt, queueName); throw new RabbitmqCommunicateException(message); } return processList; }
class class_name[name] begin[{] method[getProcessList, return_type[type[List]], modifier[private], parameter[queueName]] begin[{] local_variable[type[List], processList] if[binary_operation[binary_operation[member[.processList], ==, literal[null]], ||, binary_operation[call[processList.size, parameter[]], ==, literal[0]]]] begin[{] local_variable[type[String], messageFmt] local_variable[type[String], message] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RabbitmqCommunicateException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.processList]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[String] operator[>] identifier[getProcessList] operator[SEP] identifier[String] identifier[queueName] operator[SEP] Keyword[throws] identifier[RabbitmqCommunicateException] { identifier[List] operator[<] identifier[String] operator[>] identifier[processList] operator[=] identifier[getContextBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[getProcessList] operator[SEP] identifier[queueName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[processList] operator[==] Other[null] operator[||] identifier[processList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[String] identifier[messageFmt] operator[=] literal[String] operator[SEP] identifier[String] identifier[message] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] identifier[messageFmt] , identifier[queueName] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[RabbitmqCommunicateException] operator[SEP] identifier[message] operator[SEP] operator[SEP] } Keyword[return] identifier[processList] operator[SEP] }
public Metadata remove(String path) { this.values.remove(this.pathToProperty(path)); this.addOp("remove", path, (String) null); return this; }
class class_name[name] begin[{] method[remove, return_type[type[Metadata]], modifier[public], parameter[path]] begin[{] THIS[member[None.values]call[None.remove, parameter[THIS[call[None.pathToProperty, parameter[member[.path]]]]]]] THIS[call[None.addOp, parameter[literal["remove"], member[.path], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Metadata] identifier[remove] operator[SEP] identifier[String] identifier[path] operator[SEP] { Keyword[this] operator[SEP] identifier[values] operator[SEP] identifier[remove] operator[SEP] Keyword[this] operator[SEP] identifier[pathToProperty] operator[SEP] identifier[path] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addOp] operator[SEP] literal[String] , identifier[path] , operator[SEP] identifier[String] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public List<DatabaseInner> listByServer(String resourceGroupName, String serverName, String expand, String filter) { return listByServerWithServiceResponseAsync(resourceGroupName, serverName, expand, filter).toBlocking().single().body(); }
class class_name[name] begin[{] method[listByServer, return_type[type[List]], modifier[public], parameter[resourceGroupName, serverName, expand, filter]] begin[{] return[call[.listByServerWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.serverName], member[.expand], member[.filter]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[DatabaseInner] operator[>] identifier[listByServer] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[serverName] , identifier[String] identifier[expand] , identifier[String] identifier[filter] operator[SEP] { Keyword[return] identifier[listByServerWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[serverName] , identifier[expand] , identifier[filter] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public JsonValidationContext addStates(Object... states) throws IllegalArgumentException { for (Object state : states) { addState(state, state.getClass()); } return this; }
class class_name[name] begin[{] method[addStates, return_type[type[JsonValidationContext]], modifier[public], parameter[states]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None)], member=addState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=states, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=state)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[JsonValidationContext] identifier[addStates] operator[SEP] identifier[Object] operator[...] identifier[states] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] { Keyword[for] operator[SEP] identifier[Object] identifier[state] operator[:] identifier[states] operator[SEP] { identifier[addState] operator[SEP] identifier[state] , identifier[state] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static double inverfc(double p) { double x, err, t, pp; if (p >= 2.0) { return -100.; } if (p <= 0.0) { return 100.; } pp = (p < 1.0) ? p : 2. - p; t = Math.sqrt(-2. * Math.log(pp / 2.)); x = -0.70711 * ((2.30753 + t * 0.27061) / (1. + t * (0.99229 + t * 0.04481)) - t); for (int j = 0; j < 2; j++) { err = erfc(x) - pp; x += err / (1.12837916709551257 * Math.exp(-x * x) - x * err); } return (p < 1.0 ? x : -x); }
class class_name[name] begin[{] method[inverfc, return_type[type[double]], modifier[public static], parameter[p]] begin[{] local_variable[type[double], x] if[binary_operation[member[.p], >=, literal[2.0]]] begin[{] return[literal[100.]] else begin[{] None end[}] if[binary_operation[member[.p], <=, literal[0.0]]] begin[{] return[literal[100.]] else begin[{] None end[}] assign[member[.pp], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0), operator=<), if_false=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.), operandr=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), if_true=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] assign[member[.t], call[Math.sqrt, parameter[binary_operation[literal[2.], *, call[Math.log, parameter[binary_operation[member[.pp], /, literal[2.]]]]]]]] assign[member[.x], binary_operation[literal[0.70711], *, binary_operation[binary_operation[binary_operation[literal[2.30753], +, binary_operation[member[.t], *, literal[0.27061]]], /, binary_operation[literal[1.], +, binary_operation[member[.t], *, binary_operation[literal[0.99229], +, binary_operation[member[.t], *, literal[0.04481]]]]]], -, member[.t]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=erfc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=MemberReference(member=pp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.12837916709551257), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[]), operandr=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)], member=exp, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=-), operator=/)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), 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) return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0), operator=<), if_false=MemberReference(member=x, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[]), if_true=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[inverfc] operator[SEP] Keyword[double] identifier[p] operator[SEP] { Keyword[double] identifier[x] , identifier[err] , identifier[t] , identifier[pp] operator[SEP] Keyword[if] operator[SEP] identifier[p] operator[>=] literal[Float] operator[SEP] { Keyword[return] operator[-] literal[Float] operator[SEP] } Keyword[if] operator[SEP] identifier[p] operator[<=] literal[Float] operator[SEP] { Keyword[return] literal[Float] operator[SEP] } identifier[pp] operator[=] operator[SEP] identifier[p] operator[<] literal[Float] operator[SEP] operator[?] identifier[p] operator[:] literal[Float] operator[-] identifier[p] operator[SEP] identifier[t] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] operator[-] literal[Float] operator[*] identifier[Math] operator[SEP] identifier[log] operator[SEP] identifier[pp] operator[/] literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[x] operator[=] operator[-] literal[Float] operator[*] operator[SEP] operator[SEP] literal[Float] operator[+] identifier[t] operator[*] literal[Float] operator[SEP] operator[/] operator[SEP] literal[Float] operator[+] identifier[t] operator[*] operator[SEP] literal[Float] operator[+] identifier[t] operator[*] literal[Float] operator[SEP] operator[SEP] operator[-] identifier[t] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] Other[2] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[err] operator[=] identifier[erfc] operator[SEP] identifier[x] operator[SEP] operator[-] identifier[pp] operator[SEP] identifier[x] operator[+=] identifier[err] operator[/] operator[SEP] literal[Float] operator[*] identifier[Math] operator[SEP] identifier[exp] operator[SEP] operator[-] identifier[x] operator[*] identifier[x] operator[SEP] operator[-] identifier[x] operator[*] identifier[err] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[p] operator[<] literal[Float] operator[?] identifier[x] operator[:] operator[-] identifier[x] operator[SEP] operator[SEP] }
private boolean startingMultiLineComment( String content, int startOffset, int endOffset ) throws BadLocationException { int index = indexOf(content, getStartDelimiter(), startOffset); if ((index < 0) || (index > endOffset)) return false; else { setMultiLineComment(true); return true; } }
class class_name[name] begin[{] method[startingMultiLineComment, return_type[type[boolean]], modifier[private], parameter[content, startOffset, endOffset]] begin[{] local_variable[type[int], index] if[binary_operation[binary_operation[member[.index], <, literal[0]], ||, binary_operation[member[.index], >, member[.endOffset]]]] begin[{] return[literal[false]] else begin[{] call[.setMultiLineComment, parameter[literal[true]]] return[literal[true]] end[}] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[startingMultiLineComment] operator[SEP] identifier[String] identifier[content] , Keyword[int] identifier[startOffset] , Keyword[int] identifier[endOffset] operator[SEP] Keyword[throws] identifier[BadLocationException] { Keyword[int] identifier[index] operator[=] identifier[indexOf] operator[SEP] identifier[content] , identifier[getStartDelimiter] operator[SEP] operator[SEP] , identifier[startOffset] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[index] operator[<] Other[0] operator[SEP] operator[||] operator[SEP] identifier[index] operator[>] identifier[endOffset] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[else] { identifier[setMultiLineComment] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } }
@RequestMapping(value = "/{userId}/userGroups", method = RequestMethod.GET) public ResponseEntity<Set<UserGroup>> findGroupsOfUser(@PathVariable Integer userId) { try { Set<UserGroup> userGroupsSet = this.service.getGroupsOfUser(userId); return new ResponseEntity<Set<UserGroup>>(userGroupsSet, HttpStatus.OK); } catch (Exception e) { LOG.error("Error finding user with id " + userId + ": " + e.getMessage()); return new ResponseEntity<Set<UserGroup>>(HttpStatus.NOT_FOUND); } }
class class_name[name] begin[{] method[findGroupsOfUser, return_type[type[ResponseEntity]], modifier[public], parameter[userId]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=service, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=userId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getGroupsOfUser, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=userGroupsSet)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=UserGroup, sub_type=None))], dimensions=[], name=Set, sub_type=None)), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=userGroupsSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=OK, postfix_operators=[], prefix_operators=[], qualifier=HttpStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=UserGroup, sub_type=None))], dimensions=[], name=Set, sub_type=None))], dimensions=None, name=ResponseEntity, sub_type=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error finding user with id "), operandr=MemberReference(member=userId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=HttpStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=UserGroup, sub_type=None))], dimensions=[], name=Set, sub_type=None))], dimensions=None, name=ResponseEntity, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[GET] operator[SEP] Keyword[public] identifier[ResponseEntity] operator[<] identifier[Set] operator[<] identifier[UserGroup] operator[>] operator[>] identifier[findGroupsOfUser] operator[SEP] annotation[@] identifier[PathVariable] identifier[Integer] identifier[userId] operator[SEP] { Keyword[try] { identifier[Set] operator[<] identifier[UserGroup] operator[>] identifier[userGroupsSet] operator[=] Keyword[this] operator[SEP] identifier[service] operator[SEP] identifier[getGroupsOfUser] operator[SEP] identifier[userId] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ResponseEntity] operator[<] identifier[Set] operator[<] identifier[UserGroup] operator[>] operator[>] operator[SEP] identifier[userGroupsSet] , identifier[HttpStatus] operator[SEP] identifier[OK] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[userId] operator[+] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ResponseEntity] operator[<] identifier[Set] operator[<] identifier[UserGroup] operator[>] operator[>] operator[SEP] identifier[HttpStatus] operator[SEP] identifier[NOT_FOUND] operator[SEP] operator[SEP] } }
public static <T extends AVUser> T cast(AVUser user, Class<T> clazz) { try { T newUser = AVObject.cast(user, clazz); return newUser; } catch (Exception e) { } return null; }
class class_name[name] begin[{] method[cast, return_type[type[T]], modifier[public static], parameter[user, clazz]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=user, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cast, postfix_operators=[], prefix_operators=[], qualifier=AVObject, selectors=[], type_arguments=None), name=newUser)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), ReturnStatement(expression=MemberReference(member=newUser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[AVUser] operator[>] identifier[T] identifier[cast] operator[SEP] identifier[AVUser] identifier[user] , identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] operator[SEP] { Keyword[try] { identifier[T] identifier[newUser] operator[=] identifier[AVObject] operator[SEP] identifier[cast] operator[SEP] identifier[user] , identifier[clazz] operator[SEP] operator[SEP] Keyword[return] identifier[newUser] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } Keyword[return] Other[null] operator[SEP] }
private int read(final byte memAddr) throws IOException { // ask device for reading data - see FIGURE 7-5 byte[] cmd = new byte[] { (byte) ((memAddr << 4) | CMD_READ) }; // read two bytes byte[] buf = new byte[2]; int read = i2cDevice.read(cmd, 0, cmd.length, buf, 0, buf.length); if (read != 2) { throw new IOException("Expected to read two bytes but got: " + read); } // transform signed byte to unsigned byte stored as int int first = buf[0] & 0xFF; int second = buf[1] & 0xFF; // interpret two bytes as one integer return (first << 8) | second; }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[private], parameter[memAddr]] begin[{] local_variable[type[byte], cmd] local_variable[type[byte], buf] local_variable[type[int], read] if[binary_operation[member[.read], !=, literal[2]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected to read two bytes but got: "), operandr=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], first] local_variable[type[int], second] return[binary_operation[binary_operation[member[.first], <<, literal[8]], |, member[.second]]] end[}] END[}]
Keyword[private] Keyword[int] identifier[read] operator[SEP] Keyword[final] Keyword[byte] identifier[memAddr] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[cmd] operator[=] Keyword[new] Keyword[byte] operator[SEP] operator[SEP] { operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[memAddr] operator[<<] Other[4] operator[SEP] operator[|] identifier[CMD_READ] operator[SEP] } operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buf] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[int] identifier[read] operator[=] identifier[i2cDevice] operator[SEP] identifier[read] operator[SEP] identifier[cmd] , Other[0] , identifier[cmd] operator[SEP] identifier[length] , identifier[buf] , Other[0] , identifier[buf] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[read] operator[!=] Other[2] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[read] operator[SEP] operator[SEP] } Keyword[int] identifier[first] operator[=] identifier[buf] operator[SEP] Other[0] operator[SEP] operator[&] literal[Integer] operator[SEP] Keyword[int] identifier[second] operator[=] identifier[buf] operator[SEP] Other[1] operator[SEP] operator[&] literal[Integer] operator[SEP] Keyword[return] operator[SEP] identifier[first] operator[<<] Other[8] operator[SEP] operator[|] identifier[second] operator[SEP] }
@Override public String decrypt(String encrypted) throws TechnicalException { return decrypt(Context.getCryptoKey(), encrypted); }
class class_name[name] begin[{] method[decrypt, return_type[type[String]], modifier[public], parameter[encrypted]] begin[{] return[call[.decrypt, parameter[call[Context.getCryptoKey, parameter[]], member[.encrypted]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[decrypt] operator[SEP] identifier[String] identifier[encrypted] operator[SEP] Keyword[throws] identifier[TechnicalException] { Keyword[return] identifier[decrypt] operator[SEP] identifier[Context] operator[SEP] identifier[getCryptoKey] operator[SEP] operator[SEP] , identifier[encrypted] operator[SEP] operator[SEP] }
public void setOptMLower(boolean optMLower) { checkCanSetRenameOption("-m"); if (optMLower && optMUpper) { throw new IllegalArgumentException(ExceptionMessageMap.getMessage("000120") + " -m cannot be used with -M."); } this.optMLower = optMLower; }
class class_name[name] begin[{] method[setOptMLower, return_type[void], modifier[public], parameter[optMLower]] begin[{] call[.checkCanSetRenameOption, parameter[literal["-m"]]] if[binary_operation[member[.optMLower], &&, member[.optMUpper]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="000120")], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ExceptionMessageMap, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" -m cannot be used with -M."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[THIS[member[None.optMLower]], member[.optMLower]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOptMLower] operator[SEP] Keyword[boolean] identifier[optMLower] operator[SEP] { identifier[checkCanSetRenameOption] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[optMLower] operator[&&] identifier[optMUpper] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[ExceptionMessageMap] operator[SEP] identifier[getMessage] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[optMLower] operator[=] identifier[optMLower] operator[SEP] }
public <T> T act(final FileCallable<T> callable) throws IOException, InterruptedException { return act(callable,callable.getClass().getClassLoader()); }
class class_name[name] begin[{] method[act, return_type[type[T]], modifier[public], parameter[callable]] begin[{] return[call[.act, parameter[member[.callable], call[callable.getClass, parameter[]]]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[act] operator[SEP] Keyword[final] identifier[FileCallable] operator[<] identifier[T] operator[>] identifier[callable] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InterruptedException] { Keyword[return] identifier[act] operator[SEP] identifier[callable] , identifier[callable] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static int compare(int char32a, int char32b, int options) { return internalCompare(UTF16.valueOf(char32a), UTF16.valueOf(char32b), options|INPUT_IS_FCD); }
class class_name[name] begin[{] method[compare, return_type[type[int]], modifier[public static], parameter[char32a, char32b, options]] begin[{] return[call[.internalCompare, parameter[call[UTF16.valueOf, parameter[member[.char32a]]], call[UTF16.valueOf, parameter[member[.char32b]]], binary_operation[member[.options], |, member[.INPUT_IS_FCD]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[compare] operator[SEP] Keyword[int] identifier[char32a] , Keyword[int] identifier[char32b] , Keyword[int] identifier[options] operator[SEP] { Keyword[return] identifier[internalCompare] operator[SEP] identifier[UTF16] operator[SEP] identifier[valueOf] operator[SEP] identifier[char32a] operator[SEP] , identifier[UTF16] operator[SEP] identifier[valueOf] operator[SEP] identifier[char32b] operator[SEP] , identifier[options] operator[|] identifier[INPUT_IS_FCD] operator[SEP] operator[SEP] }
private final JsMessageImpl createNewGeneralized(JsMsgObject newJmo) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "createNewGeneralized"); JsMessageImpl newMsg = null; /* Now create the new JsMessage */ newMsg = new JsMessageImpl(newJmo); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "createNewGeneralized", newMsg); return newMsg; }
class class_name[name] begin[{] method[createNewGeneralized, return_type[type[JsMessageImpl]], modifier[final private], parameter[newJmo]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["createNewGeneralized"]]] else begin[{] None end[}] local_variable[type[JsMessageImpl], newMsg] assign[member[.newMsg], ClassCreator(arguments=[MemberReference(member=newJmo, 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=JsMessageImpl, sub_type=None))] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["createNewGeneralized"], member[.newMsg]]] else begin[{] None end[}] return[member[.newMsg]] end[}] END[}]
Keyword[private] Keyword[final] identifier[JsMessageImpl] identifier[createNewGeneralized] operator[SEP] identifier[JsMsgObject] identifier[newJmo] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[JsMessageImpl] identifier[newMsg] operator[=] Other[null] operator[SEP] identifier[newMsg] operator[=] Keyword[new] identifier[JsMessageImpl] operator[SEP] identifier[newJmo] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[newMsg] operator[SEP] operator[SEP] Keyword[return] identifier[newMsg] operator[SEP] }
public static <E> boolean intersects(Set<E> s1, Set<E> s2) { // loop over whichever set is smaller if (s1.size() < s2.size()) { for (E element1 : s1) { if (s2.contains(element1)) { return true; } } } else { for (E element2 : s2) { if (s1.contains(element2)) { return true; } } } return false; }
class class_name[name] begin[{] method[intersects, return_type[type[boolean]], modifier[public static], parameter[s1, s2]] begin[{] if[binary_operation[call[s1.size, parameter[]], <, call[s2.size, parameter[]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=element1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=s2, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=s1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))), label=None) else begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=element2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=s1, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=s2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))), label=None) end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] Keyword[boolean] identifier[intersects] operator[SEP] identifier[Set] operator[<] identifier[E] operator[>] identifier[s1] , identifier[Set] operator[<] identifier[E] operator[>] identifier[s2] operator[SEP] { Keyword[if] operator[SEP] identifier[s1] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] identifier[s2] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[E] identifier[element1] operator[:] identifier[s1] operator[SEP] { Keyword[if] operator[SEP] identifier[s2] operator[SEP] identifier[contains] operator[SEP] identifier[element1] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } } Keyword[else] { Keyword[for] operator[SEP] identifier[E] identifier[element2] operator[:] identifier[s2] operator[SEP] { Keyword[if] operator[SEP] identifier[s1] operator[SEP] identifier[contains] operator[SEP] identifier[element2] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } } Keyword[return] literal[boolean] operator[SEP] }
@java.lang.Deprecated public java.util.Map<java.lang.String, com.google.datastore.v1.GqlQueryParameter> getNamedBindings() { return getNamedBindingsMap(); }
class class_name[name] begin[{] method[getNamedBindings, return_type[type[java]], modifier[public], parameter[]] begin[{] return[call[.getNamedBindingsMap, parameter[]]] end[}] END[}]
annotation[@] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Deprecated] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] , identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[datastore] operator[SEP] identifier[v1] operator[SEP] identifier[GqlQueryParameter] operator[>] identifier[getNamedBindings] operator[SEP] operator[SEP] { Keyword[return] identifier[getNamedBindingsMap] operator[SEP] operator[SEP] operator[SEP] }
public String listSipSessionIds() { StringBuffer sb=new StringBuffer(); Iterator<MobicentsSipSession> sipSessions = sipManagerDelegate.getAllSipSessions(); while (sipSessions.hasNext()) { sb.append(sipSessions.next().getKey()).append(" "); } return sb.toString(); }
class class_name[name] begin[{] method[listSipSessionIds, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuffer], sb] local_variable[type[Iterator], sipSessions] while[call[sipSessions.hasNext, parameter[]]] begin[{] call[sb.append, parameter[call[sipSessions.next, parameter[]]]] end[}] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[listSipSessionIds] operator[SEP] operator[SEP] { identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[MobicentsSipSession] operator[>] identifier[sipSessions] operator[=] identifier[sipManagerDelegate] operator[SEP] identifier[getAllSipSessions] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[sipSessions] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[sipSessions] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] 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 void performClientExchange(String clientIdentification, String serverIdentification, byte[] clientKexInit, byte[] serverKexInit) throws SshException { try { this.clientId = clientIdentification; this.serverId = serverIdentification; this.clientKexInit = clientKexInit; this.serverKexInit = serverKexInit; try { dhKeyFactory = JCEProvider .getProviderForAlgorithm(JCEAlgorithms.JCE_DH) == null ? KeyFactory .getInstance(JCEAlgorithms.JCE_DH) : KeyFactory .getInstance(JCEAlgorithms.JCE_DH, JCEProvider .getProviderForAlgorithm(JCEAlgorithms.JCE_DH)); dhKeyPairGen = JCEProvider .getProviderForAlgorithm(JCEAlgorithms.JCE_DH) == null ? KeyPairGenerator .getInstance(JCEAlgorithms.JCE_DH) : KeyPairGenerator .getInstance(JCEAlgorithms.JCE_DH, JCEProvider .getProviderForAlgorithm(JCEAlgorithms.JCE_DH)); dhKeyAgreement = JCEProvider .getProviderForAlgorithm(JCEAlgorithms.JCE_DH) == null ? KeyAgreement .getInstance(JCEAlgorithms.JCE_DH) : KeyAgreement .getInstance(JCEAlgorithms.JCE_DH, JCEProvider .getProviderForAlgorithm(JCEAlgorithms.JCE_DH)); } catch (NoSuchAlgorithmException ex) { throw new SshException( "JCE does not support Diffie Hellman key exchange", SshException.JCE_ERROR); } ByteArrayWriter msg = new ByteArrayWriter(); /* * SSH_MSG_KEX_DH_GEX_REQUEST_OLD is used for backwards * compatibility. Instead of sending "min || n || max", the client * only sends "n". Additionally, the hash is calculated using only * "n" instead of "min || n || max". */ boolean disableBackwardsCompatibility = !transport.getContext() .isDHGroupExchangeBackwardsCompatible(); int preferredKeySize = transport.getContext() .getDHGroupExchangeKeySize(); try { msg.write(disableBackwardsCompatibility ? SSH_MSG_KEXDH_GEX_REQUEST : SSH_MSG_KEXDH_GEX_REQUEST_OLD); if (disableBackwardsCompatibility) { // This breaks some old servers, use backwards compatibility msg.writeInt(1024); msg.writeInt(preferredKeySize); msg.writeInt(8192); } else { msg.writeInt(preferredKeySize); } transport.sendMessage(msg.toByteArray(), true); } finally { try { msg.close(); } catch (IOException e) { } } byte[] tmp = transport.nextMessage(); if (tmp[0] != SSH_MSG_KEXDH_GEX_GROUP) { transport.disconnect(TransportProtocol.KEY_EXCHANGE_FAILED, "Expected SSH_MSG_KEX_GEX_GROUP"); throw new SshException( "Key exchange failed: Expected SSH_MSG_KEX_GEX_GROUP [id=" + tmp[0] + "]", SshException.INTERNAL_ERROR); } ByteArrayReader bar = new ByteArrayReader(tmp, 1, tmp.length - 1); try { p = bar.readBigInteger(); g = bar.readBigInteger(); DHParameterSpec dhSkipParamSpec = new DHParameterSpec(p, g); dhKeyPairGen.initialize(dhSkipParamSpec); KeyPair dhKeyPair = dhKeyPairGen.generateKeyPair(); dhKeyAgreement.init(dhKeyPair.getPrivate()); e = ((DHPublicKey) dhKeyPair.getPublic()).getY(); } catch (InvalidKeyException ex) { throw new SshException("Failed to generate DH value", SshException.JCE_ERROR); } catch (InvalidAlgorithmParameterException ex) { throw new SshException("Failed to generate DH value", SshException.JCE_ERROR); } finally { try { bar.close(); } catch (IOException e) { } } // Send DH_INIT message msg.reset(); msg.write(SSH_MSG_KEXDH_GEX_INIT); msg.writeBigInteger(e); transport.sendMessage(msg.toByteArray(), true); // Wait for the reply processing any valid transport messages tmp = transport.nextMessage(); if (tmp[0] != SSH_MSG_KEXDH_GEX_REPLY) { transport.disconnect(TransportProtocol.KEY_EXCHANGE_FAILED, "Expected SSH_MSG_KEXDH_GEX_REPLY"); throw new SshException( "Key exchange failed: Expected SSH_MSG_KEXDH_GEX_REPLY [id=" + tmp[0] + "]", SshException.INTERNAL_ERROR); } bar = new ByteArrayReader(tmp, 1, tmp.length - 1); try { hostKey = bar.readBinaryString(); f = bar.readBigInteger(); signature = bar.readBinaryString(); // Calculate diffie hellman k value DHPublicKeySpec spec = new DHPublicKeySpec(f, p, g); DHPublicKey key = (DHPublicKey) dhKeyFactory .generatePublic(spec); dhKeyAgreement.doPhase(key, true); tmp = dhKeyAgreement.generateSecret(); if ((tmp[0] & 0x80) == 0x80) { byte[] tmp2 = new byte[tmp.length + 1]; System.arraycopy(tmp, 0, tmp2, 1, tmp.length); tmp = tmp2; } // Calculate diffe hellman k value secret = new BigInteger(tmp); // Calculate the exchange hash calculateExchangeHash(disableBackwardsCompatibility, preferredKeySize); } finally { bar.close(); } } catch (Exception ex) { throw new SshException(ex, SshException.INTERNAL_ERROR); } }
class class_name[name] begin[{] method[performClientExchange, return_type[void], modifier[public], parameter[clientIdentification, serverIdentification, clientKexInit, serverKexInit]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=clientId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=clientIdentification, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=serverId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=serverIdentification, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=clientKexInit, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=clientKexInit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=serverKexInit, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=serverKexInit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dhKeyFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[])], member=getProviderForAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=JCEProvider, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[]), MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[])], member=getProviderForAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=JCEProvider, selectors=[], type_arguments=None)], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=KeyFactory, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=KeyFactory, selectors=[], type_arguments=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dhKeyPairGen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[])], member=getProviderForAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=JCEProvider, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[]), MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[])], member=getProviderForAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=JCEProvider, selectors=[], type_arguments=None)], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=KeyPairGenerator, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=KeyPairGenerator, selectors=[], type_arguments=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dhKeyAgreement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[])], member=getProviderForAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=JCEProvider, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[]), MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[])], member=getProviderForAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=JCEProvider, selectors=[], type_arguments=None)], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=KeyAgreement, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=JCE_DH, postfix_operators=[], prefix_operators=[], qualifier=JCEAlgorithms, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=KeyAgreement, selectors=[], type_arguments=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JCE does not support Diffie Hellman key exchange"), MemberReference(member=JCE_ERROR, postfix_operators=[], prefix_operators=[], qualifier=SshException, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SshException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['NoSuchAlgorithmException']))], finally_block=None, label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayWriter, sub_type=None)), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayWriter, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=['!'], qualifier=transport, selectors=[MethodInvocation(arguments=[], member=isDHGroupExchangeBackwardsCompatible, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=disableBackwardsCompatibility)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=transport, selectors=[MethodInvocation(arguments=[], member=getDHGroupExchangeKeySize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=preferredKeySize)], modifiers=set(), type=BasicType(dimensions=[], name=int)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[TernaryExpression(condition=MemberReference(member=disableBackwardsCompatibility, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=SSH_MSG_KEXDH_GEX_REQUEST_OLD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=SSH_MSG_KEXDH_GEX_REQUEST, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], member=write, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=disableBackwardsCompatibility, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=preferredKeySize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeInt, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1024)], member=writeInt, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=preferredKeySize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeInt, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8192)], member=writeInt, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=sendMessage, postfix_operators=[], prefix_operators=[], qualifier=transport, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)], label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nextMessage, postfix_operators=[], prefix_operators=[], qualifier=transport, selectors=[], type_arguments=None), name=tmp)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=SSH_MSG_KEXDH_GEX_GROUP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=KEY_EXCHANGE_FAILED, postfix_operators=[], prefix_operators=[], qualifier=TransportProtocol, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected SSH_MSG_KEX_GEX_GROUP")], member=disconnect, postfix_operators=[], prefix_operators=[], qualifier=transport, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Key exchange failed: Expected SSH_MSG_KEX_GEX_GROUP [id="), operandr=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), MemberReference(member=INTERNAL_ERROR, postfix_operators=[], prefix_operators=[], qualifier=SshException, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SshException, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=tmp, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayReader, sub_type=None)), name=bar)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayReader, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readBigInteger, postfix_operators=[], prefix_operators=[], qualifier=bar, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readBigInteger, postfix_operators=[], prefix_operators=[], qualifier=bar, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=g, 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=DHParameterSpec, sub_type=None)), name=dhSkipParamSpec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DHParameterSpec, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dhSkipParamSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=dhKeyPairGen, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=generateKeyPair, postfix_operators=[], prefix_operators=[], qualifier=dhKeyPairGen, selectors=[], type_arguments=None), name=dhKeyPair)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=KeyPair, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPrivate, postfix_operators=[], prefix_operators=[], qualifier=dhKeyPair, selectors=[], type_arguments=None)], member=init, postfix_operators=[], prefix_operators=[], qualifier=dhKeyAgreement, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=getPublic, postfix_operators=[], prefix_operators=[], qualifier=dhKeyPair, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=DHPublicKey, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to generate DH value"), MemberReference(member=JCE_ERROR, postfix_operators=[], prefix_operators=[], qualifier=SshException, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SshException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['InvalidKeyException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to generate DH value"), MemberReference(member=JCE_ERROR, postfix_operators=[], prefix_operators=[], qualifier=SshException, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SshException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['InvalidAlgorithmParameterException']))], finally_block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=bar, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)], label=None, resources=None), StatementExpression(expression=MethodInvocation(arguments=[], member=reset, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SSH_MSG_KEXDH_GEX_INIT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeBigInteger, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=sendMessage, postfix_operators=[], prefix_operators=[], qualifier=transport, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=nextMessage, postfix_operators=[], prefix_operators=[], qualifier=transport, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=SSH_MSG_KEXDH_GEX_REPLY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=KEY_EXCHANGE_FAILED, postfix_operators=[], prefix_operators=[], qualifier=TransportProtocol, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected SSH_MSG_KEXDH_GEX_REPLY")], member=disconnect, postfix_operators=[], prefix_operators=[], qualifier=transport, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Key exchange failed: Expected SSH_MSG_KEXDH_GEX_REPLY [id="), operandr=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+), MemberReference(member=INTERNAL_ERROR, postfix_operators=[], prefix_operators=[], qualifier=SshException, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SshException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=tmp, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayReader, sub_type=None))), label=None), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hostKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readBinaryString, postfix_operators=[], prefix_operators=[], qualifier=bar, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readBigInteger, postfix_operators=[], prefix_operators=[], qualifier=bar, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=signature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readBinaryString, postfix_operators=[], prefix_operators=[], qualifier=bar, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=g, 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=DHPublicKeySpec, sub_type=None)), name=spec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DHPublicKeySpec, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=spec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generatePublic, postfix_operators=[], prefix_operators=[], qualifier=dhKeyFactory, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=DHPublicKey, sub_type=None)), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DHPublicKey, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=doPhase, postfix_operators=[], prefix_operators=[], qualifier=dhKeyAgreement, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=generateSecret, postfix_operators=[], prefix_operators=[], qualifier=dhKeyAgreement, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=tmp, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=tmp2)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=tmp2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=tmp, selectors=[])], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=tmp2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=secret, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=tmp, 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=BigInteger, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=disableBackwardsCompatibility, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=preferredKeySize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=calculateExchangeHash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=bar, selectors=[], type_arguments=None), label=None)], label=None, resources=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=INTERNAL_ERROR, postfix_operators=[], prefix_operators=[], qualifier=SshException, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SshException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[performClientExchange] operator[SEP] identifier[String] identifier[clientIdentification] , identifier[String] identifier[serverIdentification] , Keyword[byte] operator[SEP] operator[SEP] identifier[clientKexInit] , Keyword[byte] operator[SEP] operator[SEP] identifier[serverKexInit] operator[SEP] Keyword[throws] identifier[SshException] { Keyword[try] { Keyword[this] operator[SEP] identifier[clientId] operator[=] identifier[clientIdentification] operator[SEP] Keyword[this] operator[SEP] identifier[serverId] operator[=] identifier[serverIdentification] operator[SEP] Keyword[this] operator[SEP] identifier[clientKexInit] operator[=] identifier[clientKexInit] operator[SEP] Keyword[this] operator[SEP] identifier[serverKexInit] operator[=] identifier[serverKexInit] operator[SEP] Keyword[try] { identifier[dhKeyFactory] operator[=] identifier[JCEProvider] operator[SEP] identifier[getProviderForAlgorithm] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] operator[SEP] operator[==] Other[null] operator[?] identifier[KeyFactory] operator[SEP] identifier[getInstance] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] operator[SEP] operator[:] identifier[KeyFactory] operator[SEP] identifier[getInstance] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] , identifier[JCEProvider] operator[SEP] identifier[getProviderForAlgorithm] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] operator[SEP] operator[SEP] operator[SEP] identifier[dhKeyPairGen] operator[=] identifier[JCEProvider] operator[SEP] identifier[getProviderForAlgorithm] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] operator[SEP] operator[==] Other[null] operator[?] identifier[KeyPairGenerator] operator[SEP] identifier[getInstance] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] operator[SEP] operator[:] identifier[KeyPairGenerator] operator[SEP] identifier[getInstance] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] , identifier[JCEProvider] operator[SEP] identifier[getProviderForAlgorithm] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] operator[SEP] operator[SEP] operator[SEP] identifier[dhKeyAgreement] operator[=] identifier[JCEProvider] operator[SEP] identifier[getProviderForAlgorithm] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] operator[SEP] operator[==] Other[null] operator[?] identifier[KeyAgreement] operator[SEP] identifier[getInstance] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] operator[SEP] operator[:] identifier[KeyAgreement] operator[SEP] identifier[getInstance] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] , identifier[JCEProvider] operator[SEP] identifier[getProviderForAlgorithm] operator[SEP] identifier[JCEAlgorithms] operator[SEP] identifier[JCE_DH] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchAlgorithmException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[SshException] operator[SEP] literal[String] , identifier[SshException] operator[SEP] identifier[JCE_ERROR] operator[SEP] operator[SEP] } identifier[ByteArrayWriter] identifier[msg] operator[=] Keyword[new] identifier[ByteArrayWriter] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[disableBackwardsCompatibility] operator[=] operator[!] identifier[transport] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[isDHGroupExchangeBackwardsCompatible] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[preferredKeySize] operator[=] identifier[transport] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[getDHGroupExchangeKeySize] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[msg] operator[SEP] identifier[write] operator[SEP] identifier[disableBackwardsCompatibility] operator[?] identifier[SSH_MSG_KEXDH_GEX_REQUEST] operator[:] identifier[SSH_MSG_KEXDH_GEX_REQUEST_OLD] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[disableBackwardsCompatibility] operator[SEP] { identifier[msg] operator[SEP] identifier[writeInt] operator[SEP] Other[1024] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[writeInt] operator[SEP] identifier[preferredKeySize] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[writeInt] operator[SEP] Other[8192] operator[SEP] operator[SEP] } Keyword[else] { identifier[msg] operator[SEP] identifier[writeInt] operator[SEP] identifier[preferredKeySize] operator[SEP] operator[SEP] } identifier[transport] operator[SEP] identifier[sendMessage] operator[SEP] identifier[msg] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[try] { identifier[msg] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { } } Keyword[byte] operator[SEP] operator[SEP] identifier[tmp] operator[=] identifier[transport] operator[SEP] identifier[nextMessage] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmp] operator[SEP] Other[0] operator[SEP] operator[!=] identifier[SSH_MSG_KEXDH_GEX_GROUP] operator[SEP] { identifier[transport] operator[SEP] identifier[disconnect] operator[SEP] identifier[TransportProtocol] operator[SEP] identifier[KEY_EXCHANGE_FAILED] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SshException] operator[SEP] literal[String] operator[+] identifier[tmp] operator[SEP] Other[0] operator[SEP] operator[+] literal[String] , identifier[SshException] operator[SEP] identifier[INTERNAL_ERROR] operator[SEP] operator[SEP] } identifier[ByteArrayReader] identifier[bar] operator[=] Keyword[new] identifier[ByteArrayReader] operator[SEP] identifier[tmp] , Other[1] , identifier[tmp] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[try] { identifier[p] operator[=] identifier[bar] operator[SEP] identifier[readBigInteger] operator[SEP] operator[SEP] operator[SEP] identifier[g] operator[=] identifier[bar] operator[SEP] identifier[readBigInteger] operator[SEP] operator[SEP] operator[SEP] identifier[DHParameterSpec] identifier[dhSkipParamSpec] operator[=] Keyword[new] identifier[DHParameterSpec] operator[SEP] identifier[p] , identifier[g] operator[SEP] operator[SEP] identifier[dhKeyPairGen] operator[SEP] identifier[initialize] operator[SEP] identifier[dhSkipParamSpec] operator[SEP] operator[SEP] identifier[KeyPair] identifier[dhKeyPair] operator[=] identifier[dhKeyPairGen] operator[SEP] identifier[generateKeyPair] operator[SEP] operator[SEP] operator[SEP] identifier[dhKeyAgreement] operator[SEP] identifier[init] operator[SEP] identifier[dhKeyPair] operator[SEP] identifier[getPrivate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[=] operator[SEP] operator[SEP] identifier[DHPublicKey] operator[SEP] identifier[dhKeyPair] operator[SEP] identifier[getPublic] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvalidKeyException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[SshException] operator[SEP] literal[String] , identifier[SshException] operator[SEP] identifier[JCE_ERROR] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvalidAlgorithmParameterException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[SshException] operator[SEP] literal[String] , identifier[SshException] operator[SEP] identifier[JCE_ERROR] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[try] { identifier[bar] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { } } identifier[msg] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[write] operator[SEP] identifier[SSH_MSG_KEXDH_GEX_INIT] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[writeBigInteger] operator[SEP] identifier[e] operator[SEP] operator[SEP] identifier[transport] operator[SEP] identifier[sendMessage] operator[SEP] identifier[msg] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] identifier[tmp] operator[=] identifier[transport] operator[SEP] identifier[nextMessage] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tmp] operator[SEP] Other[0] operator[SEP] operator[!=] identifier[SSH_MSG_KEXDH_GEX_REPLY] operator[SEP] { identifier[transport] operator[SEP] identifier[disconnect] operator[SEP] identifier[TransportProtocol] operator[SEP] identifier[KEY_EXCHANGE_FAILED] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SshException] operator[SEP] literal[String] operator[+] identifier[tmp] operator[SEP] Other[0] operator[SEP] operator[+] literal[String] , identifier[SshException] operator[SEP] identifier[INTERNAL_ERROR] operator[SEP] operator[SEP] } identifier[bar] operator[=] Keyword[new] identifier[ByteArrayReader] operator[SEP] identifier[tmp] , Other[1] , identifier[tmp] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[try] { identifier[hostKey] operator[=] identifier[bar] operator[SEP] identifier[readBinaryString] operator[SEP] operator[SEP] operator[SEP] identifier[f] operator[=] identifier[bar] operator[SEP] identifier[readBigInteger] operator[SEP] operator[SEP] operator[SEP] identifier[signature] operator[=] identifier[bar] operator[SEP] identifier[readBinaryString] operator[SEP] operator[SEP] operator[SEP] identifier[DHPublicKeySpec] identifier[spec] operator[=] Keyword[new] identifier[DHPublicKeySpec] operator[SEP] identifier[f] , identifier[p] , identifier[g] operator[SEP] operator[SEP] identifier[DHPublicKey] identifier[key] operator[=] operator[SEP] identifier[DHPublicKey] operator[SEP] identifier[dhKeyFactory] operator[SEP] identifier[generatePublic] operator[SEP] identifier[spec] operator[SEP] operator[SEP] identifier[dhKeyAgreement] operator[SEP] identifier[doPhase] operator[SEP] identifier[key] , literal[boolean] operator[SEP] operator[SEP] identifier[tmp] operator[=] identifier[dhKeyAgreement] operator[SEP] identifier[generateSecret] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[tmp] operator[SEP] Other[0] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[==] literal[Integer] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[tmp2] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[tmp] operator[SEP] identifier[length] operator[+] Other[1] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[tmp] , Other[0] , identifier[tmp2] , Other[1] , identifier[tmp] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[tmp] operator[=] identifier[tmp2] operator[SEP] } identifier[secret] operator[=] Keyword[new] identifier[BigInteger] operator[SEP] identifier[tmp] operator[SEP] operator[SEP] identifier[calculateExchangeHash] operator[SEP] identifier[disableBackwardsCompatibility] , identifier[preferredKeySize] operator[SEP] operator[SEP] } Keyword[finally] { identifier[bar] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[SshException] operator[SEP] identifier[ex] , identifier[SshException] operator[SEP] identifier[INTERNAL_ERROR] operator[SEP] operator[SEP] } }
static Map<String, Object> sumOfDelta(Map<String, Object> state, Map<String, Object> delta) { InstanceKey instanceId = (InstanceKey) delta.get("InstanceKey"); if (instanceId == null) { throw new RuntimeException("InstanceKey can not be null"); } for (String key : delta.keySet()) { Object existing = state.get(key); Object current = delta.get(key); if (current instanceof Number) { if (existing == null) { existing = 0; } Number v = (Number) existing; Number d = (Number) delta.get(key); state.put(key, v.longValue() + d.longValue()); } else if (current instanceof NumberList) { if (existing == null) { state.put(key, current); } else { state.put(key, ((NumberList) existing).sum((NumberList) current)); } } else { Object o = delta.get(key); if (o instanceof String[]) { String[] vs = (String[]) o; if (vs.length == 1) { Object previousAggregateString = state.get(key); if (previousAggregateString instanceof AggregateString) { state.put(key, ((AggregateString) previousAggregateString).update(null, vs[0], instanceId)); } else { state.put(key, AggregateString.create(vs[0], instanceId)); } } else { // it should always be AggregateString here since that's all we add above AggregateString pas = (AggregateString) state.get(key); state.put(key, pas.update(vs[0], vs[1], instanceId)); } } else { state.put(key, String.valueOf(o)); } } } return state; }
class class_name[name] begin[{] method[sumOfDelta, return_type[type[Map]], modifier[static], parameter[state, delta]] begin[{] local_variable[type[InstanceKey], instanceId] if[binary_operation[member[.instanceId], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="InstanceKey can not be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), name=existing)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=delta, selectors=[], type_arguments=None), name=current)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=NumberList, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=delta, selectors=[], type_arguments=None), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), name=vs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=vs, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AggregateString, sub_type=None)), name=pas)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AggregateString, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=vs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), MemberReference(member=vs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), MemberReference(member=instanceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=update, postfix_operators=[], prefix_operators=[], qualifier=pas, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), name=previousAggregateString)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=previousAggregateString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=AggregateString, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=vs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), MemberReference(member=instanceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=AggregateString, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=previousAggregateString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AggregateString, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), label=None)]))]))]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=existing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=existing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=NumberList, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=existing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=existing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=existing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None)), name=v)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=delta, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None)), name=d)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[], member=longValue, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=longValue, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None), operator=+)], member=put, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=delta, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.state]] end[}] END[}]
Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[sumOfDelta] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[state] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[delta] operator[SEP] { identifier[InstanceKey] identifier[instanceId] operator[=] operator[SEP] identifier[InstanceKey] operator[SEP] identifier[delta] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[instanceId] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[delta] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] identifier[existing] operator[=] identifier[state] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[Object] identifier[current] operator[=] identifier[delta] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[current] Keyword[instanceof] identifier[Number] operator[SEP] { Keyword[if] operator[SEP] identifier[existing] operator[==] Other[null] operator[SEP] { identifier[existing] operator[=] Other[0] operator[SEP] } identifier[Number] identifier[v] operator[=] operator[SEP] identifier[Number] operator[SEP] identifier[existing] operator[SEP] identifier[Number] identifier[d] operator[=] operator[SEP] identifier[Number] operator[SEP] identifier[delta] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[v] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[+] identifier[d] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[current] Keyword[instanceof] identifier[NumberList] operator[SEP] { Keyword[if] operator[SEP] identifier[existing] operator[==] Other[null] operator[SEP] { identifier[state] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[current] operator[SEP] operator[SEP] } Keyword[else] { identifier[state] operator[SEP] identifier[put] operator[SEP] identifier[key] , operator[SEP] operator[SEP] identifier[NumberList] operator[SEP] identifier[existing] operator[SEP] operator[SEP] identifier[sum] operator[SEP] operator[SEP] identifier[NumberList] operator[SEP] identifier[current] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[Object] identifier[o] operator[=] identifier[delta] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[String] operator[SEP] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[vs] operator[=] operator[SEP] identifier[String] operator[SEP] operator[SEP] operator[SEP] identifier[o] operator[SEP] Keyword[if] operator[SEP] identifier[vs] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] { identifier[Object] identifier[previousAggregateString] operator[=] identifier[state] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[previousAggregateString] Keyword[instanceof] identifier[AggregateString] operator[SEP] { identifier[state] operator[SEP] identifier[put] operator[SEP] identifier[key] , operator[SEP] operator[SEP] identifier[AggregateString] operator[SEP] identifier[previousAggregateString] operator[SEP] operator[SEP] identifier[update] operator[SEP] Other[null] , identifier[vs] operator[SEP] Other[0] operator[SEP] , identifier[instanceId] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[state] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[AggregateString] operator[SEP] identifier[create] operator[SEP] identifier[vs] operator[SEP] Other[0] operator[SEP] , identifier[instanceId] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[AggregateString] identifier[pas] operator[=] operator[SEP] identifier[AggregateString] operator[SEP] identifier[state] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[pas] operator[SEP] identifier[update] operator[SEP] identifier[vs] operator[SEP] Other[0] operator[SEP] , identifier[vs] operator[SEP] Other[1] operator[SEP] , identifier[instanceId] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[state] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[o] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] identifier[state] operator[SEP] }
public RunningJob submitJobInternal(JobConf job ) throws FileNotFoundException, ClassNotFoundException, InterruptedException, IOException { /* * configure the command line options correctly on the submitting dfs */ boolean shared = job.getBoolean("mapred.cache.shared.enabled", false); JobID jobId = jobSubmitClient.getNewJobId(); Path submitJobDir = new Path(getSystemDir(), jobId.toString()); Path sharedFilesDir = new Path(getSystemDir(), jobSubmitClient.CAR); Path submitSplitFile = new Path(submitJobDir, "job.split"); getFs(); if (jobSubmitClient instanceof LocalJobRunner) { symLinkAndConfigureFiles(job); } else { copyAndConfigureFiles(job, (shared) ? sharedFilesDir : submitJobDir, shared); } Path submitJobFile = new Path(submitJobDir, "job.xml"); int reduces = job.getNumReduceTasks(); JobContext context = new JobContext(job, jobId); // Check the output specification if (reduces == 0 ? job.getUseNewMapper() : job.getUseNewReducer()) { org.apache.hadoop.mapreduce.OutputFormat<?,?> output = ReflectionUtils.newInstance(context.getOutputFormatClass(), job); output.checkOutputSpecs(context); } else { job.getOutputFormat().checkOutputSpecs(fs, job); } // Create the splits for the job LOG.debug("Creating splits at " + fs.makeQualified(submitSplitFile)); List<RawSplit> maps; if (job.getUseNewMapper()) { maps = computeNewSplits(context); } else { maps = computeOldSplits(job); } job.setNumMapTasks(maps.size()); if (!isJobTrackerInProc) { JobConf conf = null; if (job.getUseNewMapper()) { conf = context.getJobConf(); } else { conf = job; } writeComputedSplits(conf, maps, submitSplitFile); job.set("mapred.job.split.file", submitSplitFile.toString()); } else { synchronized(JobClient.jobSplitCache) { if (JobClient.jobSplitCache.containsKey(jobId)) { throw new IOException("Job split already cached " + jobId); } JobClient.jobSplitCache.put(jobId, maps); } synchronized(JobClient.jobConfCache) { if (JobClient.jobConfCache.containsKey(jobId)) { throw new IOException("Job conf already cached " + jobId); } jobConfCache.put(jobId, job); } } // Write job file to JobTracker's fs FSDataOutputStream out = FileSystem.create(fs, submitJobFile, new FsPermission(JOB_FILE_PERMISSION)); try { job.writeXml(out); } finally { out.close(); } // // Now, actually submit the job (using the submit name) // JobStatus status = jobSubmitClient.submitJob(jobId); if (status != null) { return new NetworkedJob(status); } else { throw new IOException("Could not launch job"); } }
class class_name[name] begin[{] method[submitJobInternal, return_type[type[RunningJob]], modifier[public], parameter[job]] begin[{] local_variable[type[boolean], shared] local_variable[type[JobID], jobId] local_variable[type[Path], submitJobDir] local_variable[type[Path], sharedFilesDir] local_variable[type[Path], submitSplitFile] call[.getFs, parameter[]] if[binary_operation[member[.jobSubmitClient], instanceof, type[LocalJobRunner]]] begin[{] call[.symLinkAndConfigureFiles, parameter[member[.job]]] else begin[{] call[.copyAndConfigureFiles, parameter[member[.job], TernaryExpression(condition=MemberReference(member=shared, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=submitJobDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=sharedFilesDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), member[.shared]]] end[}] local_variable[type[Path], submitJobFile] local_variable[type[int], reduces] local_variable[type[JobContext], context] if[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=reduces, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=MethodInvocation(arguments=[], member=getUseNewReducer, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[], member=getUseNewMapper, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[], type_arguments=None))] begin[{] local_variable[type[org], output] call[output.checkOutputSpecs, parameter[member[.context]]] else begin[{] call[job.getOutputFormat, parameter[]] end[}] call[LOG.debug, parameter[binary_operation[literal["Creating splits at "], +, call[fs.makeQualified, parameter[member[.submitSplitFile]]]]]] local_variable[type[List], maps] if[call[job.getUseNewMapper, parameter[]]] begin[{] assign[member[.maps], call[.computeNewSplits, parameter[member[.context]]]] else begin[{] assign[member[.maps], call[.computeOldSplits, parameter[member[.job]]]] end[}] call[job.setNumMapTasks, parameter[call[maps.size, parameter[]]]] if[member[.isJobTrackerInProc]] begin[{] local_variable[type[JobConf], conf] if[call[job.getUseNewMapper, parameter[]]] begin[{] assign[member[.conf], call[context.getJobConf, parameter[]]] else begin[{] assign[member[.conf], member[.job]] end[}] call[.writeComputedSplits, parameter[member[.conf], member[.maps], member[.submitSplitFile]]] call[job.set, parameter[literal["mapred.job.split.file"], call[submitSplitFile.toString, parameter[]]]] else begin[{] SYNCHRONIZED[member[JobClient.jobSplitCache]] BEGIN[{] if[call[JobClient.jobSplitCache.containsKey, parameter[member[.jobId]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Job split already cached "), operandr=MemberReference(member=jobId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] call[JobClient.jobSplitCache.put, parameter[member[.jobId], member[.maps]]] END[}] SYNCHRONIZED[member[JobClient.jobConfCache]] BEGIN[{] if[call[JobClient.jobConfCache.containsKey, parameter[member[.jobId]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Job conf already cached "), operandr=MemberReference(member=jobId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] call[jobConfCache.put, parameter[member[.jobId], member[.job]]] END[}] end[}] local_variable[type[FSDataOutputStream], out] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeXml, postfix_operators=[], prefix_operators=[], qualifier=job, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)], label=None, resources=None) local_variable[type[JobStatus], status] if[binary_operation[member[.status], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=status, 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=NetworkedJob, sub_type=None))] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not launch job")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) end[}] end[}] END[}]
Keyword[public] identifier[RunningJob] identifier[submitJobInternal] operator[SEP] identifier[JobConf] identifier[job] operator[SEP] Keyword[throws] identifier[FileNotFoundException] , identifier[ClassNotFoundException] , identifier[InterruptedException] , identifier[IOException] { Keyword[boolean] identifier[shared] operator[=] identifier[job] operator[SEP] identifier[getBoolean] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[JobID] identifier[jobId] operator[=] identifier[jobSubmitClient] operator[SEP] identifier[getNewJobId] operator[SEP] operator[SEP] operator[SEP] identifier[Path] identifier[submitJobDir] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[getSystemDir] operator[SEP] operator[SEP] , identifier[jobId] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Path] identifier[sharedFilesDir] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[getSystemDir] operator[SEP] operator[SEP] , identifier[jobSubmitClient] operator[SEP] identifier[CAR] operator[SEP] operator[SEP] identifier[Path] identifier[submitSplitFile] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[submitJobDir] , literal[String] operator[SEP] operator[SEP] identifier[getFs] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jobSubmitClient] Keyword[instanceof] identifier[LocalJobRunner] operator[SEP] { identifier[symLinkAndConfigureFiles] operator[SEP] identifier[job] operator[SEP] operator[SEP] } Keyword[else] { identifier[copyAndConfigureFiles] operator[SEP] identifier[job] , operator[SEP] identifier[shared] operator[SEP] operator[?] identifier[sharedFilesDir] operator[:] identifier[submitJobDir] , identifier[shared] operator[SEP] operator[SEP] } identifier[Path] identifier[submitJobFile] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[submitJobDir] , literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[reduces] operator[=] identifier[job] operator[SEP] identifier[getNumReduceTasks] operator[SEP] operator[SEP] operator[SEP] identifier[JobContext] identifier[context] operator[=] Keyword[new] identifier[JobContext] operator[SEP] identifier[job] , identifier[jobId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[reduces] operator[==] Other[0] operator[?] identifier[job] operator[SEP] identifier[getUseNewMapper] operator[SEP] operator[SEP] operator[:] identifier[job] operator[SEP] identifier[getUseNewReducer] operator[SEP] operator[SEP] operator[SEP] { identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[hadoop] operator[SEP] identifier[mapreduce] operator[SEP] identifier[OutputFormat] operator[<] operator[?] , operator[?] operator[>] identifier[output] operator[=] identifier[ReflectionUtils] operator[SEP] identifier[newInstance] operator[SEP] identifier[context] operator[SEP] identifier[getOutputFormatClass] operator[SEP] operator[SEP] , identifier[job] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[checkOutputSpecs] operator[SEP] identifier[context] operator[SEP] operator[SEP] } Keyword[else] { identifier[job] operator[SEP] identifier[getOutputFormat] operator[SEP] operator[SEP] operator[SEP] identifier[checkOutputSpecs] operator[SEP] identifier[fs] , identifier[job] operator[SEP] operator[SEP] } identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[fs] operator[SEP] identifier[makeQualified] operator[SEP] identifier[submitSplitFile] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[RawSplit] operator[>] identifier[maps] operator[SEP] Keyword[if] operator[SEP] identifier[job] operator[SEP] identifier[getUseNewMapper] operator[SEP] operator[SEP] operator[SEP] { identifier[maps] operator[=] identifier[computeNewSplits] operator[SEP] identifier[context] operator[SEP] operator[SEP] } Keyword[else] { identifier[maps] operator[=] identifier[computeOldSplits] operator[SEP] identifier[job] operator[SEP] operator[SEP] } identifier[job] operator[SEP] identifier[setNumMapTasks] operator[SEP] identifier[maps] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isJobTrackerInProc] operator[SEP] { identifier[JobConf] identifier[conf] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[job] operator[SEP] identifier[getUseNewMapper] operator[SEP] operator[SEP] operator[SEP] { identifier[conf] operator[=] identifier[context] operator[SEP] identifier[getJobConf] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[conf] operator[=] identifier[job] operator[SEP] } identifier[writeComputedSplits] operator[SEP] identifier[conf] , identifier[maps] , identifier[submitSplitFile] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[set] operator[SEP] literal[String] , identifier[submitSplitFile] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[synchronized] operator[SEP] identifier[JobClient] operator[SEP] identifier[jobSplitCache] operator[SEP] { Keyword[if] operator[SEP] identifier[JobClient] operator[SEP] identifier[jobSplitCache] operator[SEP] identifier[containsKey] operator[SEP] identifier[jobId] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[jobId] operator[SEP] operator[SEP] } identifier[JobClient] operator[SEP] identifier[jobSplitCache] operator[SEP] identifier[put] operator[SEP] identifier[jobId] , identifier[maps] operator[SEP] operator[SEP] } Keyword[synchronized] operator[SEP] identifier[JobClient] operator[SEP] identifier[jobConfCache] operator[SEP] { Keyword[if] operator[SEP] identifier[JobClient] operator[SEP] identifier[jobConfCache] operator[SEP] identifier[containsKey] operator[SEP] identifier[jobId] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[jobId] operator[SEP] operator[SEP] } identifier[jobConfCache] operator[SEP] identifier[put] operator[SEP] identifier[jobId] , identifier[job] operator[SEP] operator[SEP] } } identifier[FSDataOutputStream] identifier[out] operator[=] identifier[FileSystem] operator[SEP] identifier[create] operator[SEP] identifier[fs] , identifier[submitJobFile] , Keyword[new] identifier[FsPermission] operator[SEP] identifier[JOB_FILE_PERMISSION] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[job] operator[SEP] identifier[writeXml] operator[SEP] identifier[out] operator[SEP] operator[SEP] } Keyword[finally] { identifier[out] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } identifier[JobStatus] identifier[status] operator[=] identifier[jobSubmitClient] operator[SEP] identifier[submitJob] operator[SEP] identifier[jobId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[status] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[NetworkedJob] operator[SEP] identifier[status] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public void getMiniInfo(int[] ids, Callback<List<Mini>> callback) throws GuildWars2Exception, NullPointerException { isParamValid(new ParamChecker(ids)); gw2API.getMiniInfo(processIds(ids), GuildWars2.lang.getValue()).enqueue(callback); }
class class_name[name] begin[{] method[getMiniInfo, return_type[void], modifier[public], parameter[ids, callback]] begin[{] call[.isParamValid, parameter[ClassCreator(arguments=[MemberReference(member=ids, 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=ParamChecker, sub_type=None))]] call[gw2API.getMiniInfo, parameter[call[.processIds, parameter[member[.ids]]], call[GuildWars2.lang.getValue, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[getMiniInfo] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[ids] , identifier[Callback] operator[<] identifier[List] operator[<] identifier[Mini] operator[>] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier[GuildWars2Exception] , identifier[NullPointerException] { identifier[isParamValid] operator[SEP] Keyword[new] identifier[ParamChecker] operator[SEP] identifier[ids] operator[SEP] operator[SEP] operator[SEP] identifier[gw2API] operator[SEP] identifier[getMiniInfo] operator[SEP] identifier[processIds] operator[SEP] identifier[ids] operator[SEP] , identifier[GuildWars2] operator[SEP] identifier[lang] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[enqueue] operator[SEP] identifier[callback] operator[SEP] operator[SEP] }
public int logFileSize() { if (tc.isEntryEnabled()) Tr.entry(tc, "logFileSize", this); if (tc.isEntryEnabled()) Tr.exit(tc, "logFileSize", new Integer(_logFileSize)); return _logFileSize; }
class class_name[name] begin[{] method[logFileSize, return_type[type[int]], modifier[public], parameter[]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["logFileSize"], THIS[]]] else begin[{] None end[}] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["logFileSize"], ClassCreator(arguments=[MemberReference(member=_logFileSize, 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=Integer, sub_type=None))]] else begin[{] None end[}] return[member[._logFileSize]] end[}] END[}]
Keyword[public] Keyword[int] identifier[logFileSize] 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[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[this] 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] , Keyword[new] identifier[Integer] operator[SEP] identifier[_logFileSize] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[_logFileSize] operator[SEP] }
public static MultiTypeData getMultiTypeData(boolean b) { // Convert the value to a String and return the set of types that that String can be converted to. MultiTypeData result = getMultiTypeData(Boolean.toString(b)); result.nativeType = BOOLEAN; return result; }
class class_name[name] begin[{] method[getMultiTypeData, return_type[type[MultiTypeData]], modifier[public static], parameter[b]] begin[{] local_variable[type[MultiTypeData], result] assign[member[result.nativeType], member[.BOOLEAN]] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MultiTypeData] identifier[getMultiTypeData] operator[SEP] Keyword[boolean] identifier[b] operator[SEP] { identifier[MultiTypeData] identifier[result] operator[=] identifier[getMultiTypeData] operator[SEP] identifier[Boolean] operator[SEP] identifier[toString] operator[SEP] identifier[b] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[nativeType] operator[=] identifier[BOOLEAN] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public DateRangeParam setLowerBoundInclusive(Date theLowerBound) { validateAndSet(new DateParam(ParamPrefixEnum.GREATERTHAN_OR_EQUALS, theLowerBound), myUpperBound); return this; }
class class_name[name] begin[{] method[setLowerBoundInclusive, return_type[type[DateRangeParam]], modifier[public], parameter[theLowerBound]] begin[{] call[.validateAndSet, parameter[ClassCreator(arguments=[MemberReference(member=GREATERTHAN_OR_EQUALS, postfix_operators=[], prefix_operators=[], qualifier=ParamPrefixEnum, selectors=[]), MemberReference(member=theLowerBound, 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=DateParam, sub_type=None)), member[.myUpperBound]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[DateRangeParam] identifier[setLowerBoundInclusive] operator[SEP] identifier[Date] identifier[theLowerBound] operator[SEP] { identifier[validateAndSet] operator[SEP] Keyword[new] identifier[DateParam] operator[SEP] identifier[ParamPrefixEnum] operator[SEP] identifier[GREATERTHAN_OR_EQUALS] , identifier[theLowerBound] operator[SEP] , identifier[myUpperBound] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void submitApplication(final ApplicationSubmission applicationSubmission) throws IOException { final String url = "ws/v1/cluster/apps"; final HttpPost post = preparePost(url); final StringWriter writer = new StringWriter(); try { this.objectMapper.writeValue(writer, applicationSubmission); } catch (final IOException e) { throw new RuntimeException(e); } final String message = writer.toString(); LOG.log(Level.FINE, "Sending:\n{0}", message.replace("\n", "\n\t")); post.setEntity(new StringEntity(message, ContentType.APPLICATION_JSON)); try (final CloseableHttpResponse response = this.httpClient.execute(post, this.httpClientContext)) { final String responseMessage = IOUtils.toString(response.getEntity().getContent()); LOG.log(Level.FINE, "Response: {0}", responseMessage.replace("\n", "\n\t")); } }
class class_name[name] begin[{] method[submitApplication, return_type[void], modifier[public], parameter[applicationSubmission]] begin[{] local_variable[type[String], url] local_variable[type[HttpPost], post] local_variable[type[StringWriter], writer] TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=objectMapper, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=applicationSubmission, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) local_variable[type[String], message] call[LOG.log, parameter[member[Level.FINE], literal["Sending:\n{0}"], call[message.replace, parameter[literal["\n"], literal["\n\t"]]]]] call[post.setEntity, parameter[ClassCreator(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=APPLICATION_JSON, postfix_operators=[], prefix_operators=[], qualifier=ContentType, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringEntity, sub_type=None))]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEntity, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[MethodInvocation(arguments=[], member=getContent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=toString, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), name=responseMessage)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FINE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Response: {0}"), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n\t")], member=replace, postfix_operators=[], prefix_operators=[], qualifier=responseMessage, selectors=[], type_arguments=None)], member=log, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers={'final'}, name=response, type=ReferenceType(arguments=None, dimensions=[], name=CloseableHttpResponse, sub_type=None), value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=httpClient, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=post, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=httpClientContext, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=execute, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]))]) end[}] END[}]
Keyword[public] Keyword[void] identifier[submitApplication] operator[SEP] Keyword[final] identifier[ApplicationSubmission] identifier[applicationSubmission] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[String] identifier[url] operator[=] literal[String] operator[SEP] Keyword[final] identifier[HttpPost] identifier[post] operator[=] identifier[preparePost] operator[SEP] identifier[url] operator[SEP] operator[SEP] Keyword[final] identifier[StringWriter] identifier[writer] operator[=] Keyword[new] identifier[StringWriter] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[this] operator[SEP] identifier[objectMapper] operator[SEP] identifier[writeValue] operator[SEP] identifier[writer] , identifier[applicationSubmission] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[message] operator[=] identifier[writer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , literal[String] , identifier[message] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[post] operator[SEP] identifier[setEntity] operator[SEP] Keyword[new] identifier[StringEntity] operator[SEP] identifier[message] , identifier[ContentType] operator[SEP] identifier[APPLICATION_JSON] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] Keyword[final] identifier[CloseableHttpResponse] identifier[response] operator[=] Keyword[this] operator[SEP] identifier[httpClient] operator[SEP] identifier[execute] operator[SEP] identifier[post] , Keyword[this] operator[SEP] identifier[httpClientContext] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[responseMessage] operator[=] identifier[IOUtils] operator[SEP] identifier[toString] operator[SEP] identifier[response] operator[SEP] identifier[getEntity] operator[SEP] operator[SEP] operator[SEP] identifier[getContent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , literal[String] , identifier[responseMessage] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] } }
@Override public ListIterator<E> listIterator(final int index) { Object[] elements = getArray(); int len = elements.length; if (index < 0 || index > len) throw new IndexOutOfBoundsException("Index: " + index); return new COWIterator<E>(elements, index); }
class class_name[name] begin[{] method[listIterator, return_type[type[ListIterator]], modifier[public], parameter[index]] begin[{] local_variable[type[Object], elements] local_variable[type[int], len] if[binary_operation[binary_operation[member[.index], <, literal[0]], ||, binary_operation[member[.index], >, member[.len]]]] 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=elements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=None, name=COWIterator, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ListIterator] operator[<] identifier[E] operator[>] identifier[listIterator] operator[SEP] Keyword[final] Keyword[int] identifier[index] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[elements] operator[=] identifier[getArray] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[len] operator[=] identifier[elements] operator[SEP] identifier[length] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[<] Other[0] operator[||] identifier[index] operator[>] identifier[len] operator[SEP] Keyword[throw] Keyword[new] identifier[IndexOutOfBoundsException] operator[SEP] literal[String] operator[+] identifier[index] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[COWIterator] operator[<] identifier[E] operator[>] operator[SEP] identifier[elements] , identifier[index] operator[SEP] operator[SEP] }
public static int numberOfLeadingZerosSigned(long[] v) { for(int p = 0, ip = v.length - 1; p < v.length; p++, ip--) { if(v[ip] != 0) { return Long.numberOfLeadingZeros(v[ip]) + p * Long.SIZE; } } return -1; }
class class_name[name] begin[{] method[numberOfLeadingZerosSigned, return_type[type[int]], modifier[public static], parameter[v]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=ip, 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=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=ip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=numberOfLeadingZeros, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SIZE, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[]), operator=*), operator=+), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=p), VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=ip)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=p, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ip, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[1]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[numberOfLeadingZerosSigned] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[v] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[p] operator[=] Other[0] , identifier[ip] operator[=] identifier[v] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identifier[p] operator[<] identifier[v] operator[SEP] identifier[length] operator[SEP] identifier[p] operator[++] , identifier[ip] operator[--] operator[SEP] { Keyword[if] operator[SEP] identifier[v] operator[SEP] identifier[ip] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[Long] operator[SEP] identifier[numberOfLeadingZeros] operator[SEP] identifier[v] operator[SEP] identifier[ip] operator[SEP] operator[SEP] operator[+] identifier[p] operator[*] identifier[Long] operator[SEP] identifier[SIZE] operator[SEP] } } Keyword[return] operator[-] Other[1] operator[SEP] }
@Override protected boolean validateSettings() throws IllegalArgumentException { // Validate values which do not require user input first to avoid unnecesary // work on the user part. // dates Date startDate = getStartDate(); Date stopDate = getStopDate(); if (startDate != null && stopDate != null) { if (startDate.after(stopDate)) { // stop date is before the start date. throw new IllegalArgumentException(getLocalizedString("BL_MINDATE_AFTER_MAXDATE")); } } // Validate levels if specified. Level minLevel = getMinLevel(); Level maxLevel = getMaxLevel(); if (maxLevel != null && minLevel != null) { // We have both a max and min level. Check that the min level is // equal to or less than the max level if (minLevel.intValue() > maxLevel.intValue()) { // Min is greater than Max level. Report error throw new IllegalArgumentException(getLocalizedString("BL_MINLEVEL_GREATER_THAN_MAXLEVEL")); } } // Required options try { setBinaryRepositoryDir(unvalidatedRepositoryDir.getCanonicalPath()); System.out.println(getLocalizedParmString("BL_REPOSITORY_DIRECTORY", new Object[] { getValidatedBinaryRepositoryDir() })); } catch (IOException e) { throw new IllegalArgumentException(getLocalizedParmString("BL_INVALID_REPOSITORYDIR", new Object[] { unvalidatedRepositoryDir })); } // in case of copy action, we have an unvalidatedTargetDir set try { if (unvalidatedTargetDir != null) { String dir = unvalidatedTargetDir.getCanonicalPath(); setOutputRepositoryDir(dir); System.out.println(getLocalizedParmString("BL_TARGET_DIRECTORY", new Object[] { dir })); } } catch (IOException e) { throw new IllegalArgumentException(getLocalizedParmString("BL_INVALID_TARGETDIR", new Object[] { unvalidatedTargetDir })); } return false; }
class class_name[name] begin[{] method[validateSettings, return_type[type[boolean]], modifier[protected], parameter[]] begin[{] local_variable[type[Date], startDate] local_variable[type[Date], stopDate] if[binary_operation[binary_operation[member[.startDate], !=, literal[null]], &&, binary_operation[member[.stopDate], !=, literal[null]]]] begin[{] if[call[startDate.after, parameter[member[.stopDate]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BL_MINDATE_AFTER_MAXDATE")], member=getLocalizedString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] local_variable[type[Level], minLevel] local_variable[type[Level], maxLevel] if[binary_operation[binary_operation[member[.maxLevel], !=, literal[null]], &&, binary_operation[member[.minLevel], !=, literal[null]]]] begin[{] if[binary_operation[call[minLevel.intValue, parameter[]], >, call[maxLevel.intValue, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BL_MINLEVEL_GREATER_THAN_MAXLEVEL")], member=getLocalizedString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCanonicalPath, postfix_operators=[], prefix_operators=[], qualifier=unvalidatedRepositoryDir, selectors=[], type_arguments=None)], member=setBinaryRepositoryDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BL_REPOSITORY_DIRECTORY"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getValidatedBinaryRepositoryDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=getLocalizedParmString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BL_INVALID_REPOSITORYDIR"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=unvalidatedRepositoryDir, 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=getLocalizedParmString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=unvalidatedTargetDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCanonicalPath, postfix_operators=[], prefix_operators=[], qualifier=unvalidatedTargetDir, selectors=[], type_arguments=None), name=dir)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOutputRepositoryDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BL_TARGET_DIRECTORY"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=dir, 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=getLocalizedParmString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BL_INVALID_TARGETDIR"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=unvalidatedTargetDir, 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=getLocalizedParmString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) return[literal[false]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[boolean] identifier[validateSettings] operator[SEP] operator[SEP] Keyword[throws] identifier[IllegalArgumentException] { identifier[Date] identifier[startDate] operator[=] identifier[getStartDate] operator[SEP] operator[SEP] operator[SEP] identifier[Date] identifier[stopDate] operator[=] identifier[getStopDate] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[startDate] operator[!=] Other[null] operator[&&] identifier[stopDate] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[startDate] operator[SEP] identifier[after] operator[SEP] identifier[stopDate] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[getLocalizedString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } } identifier[Level] identifier[minLevel] operator[=] identifier[getMinLevel] operator[SEP] operator[SEP] operator[SEP] identifier[Level] identifier[maxLevel] operator[=] identifier[getMaxLevel] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[maxLevel] operator[!=] Other[null] operator[&&] identifier[minLevel] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[minLevel] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[>] identifier[maxLevel] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[getLocalizedString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } } Keyword[try] { identifier[setBinaryRepositoryDir] operator[SEP] identifier[unvalidatedRepositoryDir] operator[SEP] identifier[getCanonicalPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[getLocalizedParmString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[getValidatedBinaryRepositoryDir] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[getLocalizedParmString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[unvalidatedRepositoryDir] } operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { Keyword[if] operator[SEP] identifier[unvalidatedTargetDir] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[dir] operator[=] identifier[unvalidatedTargetDir] operator[SEP] identifier[getCanonicalPath] operator[SEP] operator[SEP] operator[SEP] identifier[setOutputRepositoryDir] operator[SEP] identifier[dir] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[getLocalizedParmString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[dir] } operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[getLocalizedParmString] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[unvalidatedTargetDir] } operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public RequestedLocalProperties filterByNodesConstantSet(OptimizerNode node, int input) { if (this.ordering != null) { final FieldList involvedIndexes = this.ordering.getInvolvedIndexes(); for (int i = 0; i < involvedIndexes.size(); i++) { if (!node.isFieldConstant(input, involvedIndexes.get(i))) { return null; } } } else if (this.groupedFields != null) { // check, whether the local key grouping is preserved for (Integer index : this.groupedFields) { if (!node.isFieldConstant(input, index)) { return null; } } } return this; }
class class_name[name] begin[{] method[filterByNodesConstantSet, return_type[type[RequestedLocalProperties]], modifier[public], parameter[node, input]] begin[{] if[binary_operation[THIS[member[None.ordering]], !=, literal[null]]] begin[{] local_variable[type[FieldList], involvedIndexes] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=involvedIndexes, selectors=[], type_arguments=None)], member=isFieldConstant, postfix_operators=[], prefix_operators=['!'], qualifier=node, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=involvedIndexes, 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) else begin[{] if[binary_operation[THIS[member[None.groupedFields]], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isFieldConstant, postfix_operators=[], prefix_operators=['!'], qualifier=node, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)]))]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=groupedFields, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=index)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))), label=None) else begin[{] None end[}] end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[RequestedLocalProperties] identifier[filterByNodesConstantSet] operator[SEP] identifier[OptimizerNode] identifier[node] , Keyword[int] identifier[input] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[ordering] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[FieldList] identifier[involvedIndexes] operator[=] Keyword[this] operator[SEP] identifier[ordering] operator[SEP] identifier[getInvolvedIndexes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[involvedIndexes] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[node] operator[SEP] identifier[isFieldConstant] operator[SEP] identifier[input] , identifier[involvedIndexes] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[groupedFields] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[Integer] identifier[index] operator[:] Keyword[this] operator[SEP] identifier[groupedFields] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[node] operator[SEP] identifier[isFieldConstant] operator[SEP] identifier[input] , identifier[index] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } } } Keyword[return] Keyword[this] operator[SEP] }
@Override public void getShare(SocializeSession session, long id, ShareListener listener) { getAsync(session, ENDPOINT, String.valueOf(id), listener); }
class class_name[name] begin[{] method[getShare, return_type[void], modifier[public], parameter[session, id, listener]] begin[{] call[.getAsync, parameter[member[.session], member[.ENDPOINT], call[String.valueOf, parameter[member[.id]]], member[.listener]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[getShare] operator[SEP] identifier[SocializeSession] identifier[session] , Keyword[long] identifier[id] , identifier[ShareListener] identifier[listener] operator[SEP] { identifier[getAsync] operator[SEP] identifier[session] , identifier[ENDPOINT] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[id] operator[SEP] , identifier[listener] operator[SEP] operator[SEP] }
public void addClassConstant(Content summariesTree, Content classConstantTree) { if (configuration.allowTag(HtmlTag.SECTION)) { summaryTree.addContent(classConstantTree); } else { summariesTree.addContent(classConstantTree); } }
class class_name[name] begin[{] method[addClassConstant, return_type[void], modifier[public], parameter[summariesTree, classConstantTree]] begin[{] if[call[configuration.allowTag, parameter[member[HtmlTag.SECTION]]]] begin[{] call[summaryTree.addContent, parameter[member[.classConstantTree]]] else begin[{] call[summariesTree.addContent, parameter[member[.classConstantTree]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addClassConstant] operator[SEP] identifier[Content] identifier[summariesTree] , identifier[Content] identifier[classConstantTree] operator[SEP] { Keyword[if] operator[SEP] identifier[configuration] operator[SEP] identifier[allowTag] operator[SEP] identifier[HtmlTag] operator[SEP] identifier[SECTION] operator[SEP] operator[SEP] { identifier[summaryTree] operator[SEP] identifier[addContent] operator[SEP] identifier[classConstantTree] operator[SEP] operator[SEP] } Keyword[else] { identifier[summariesTree] operator[SEP] identifier[addContent] operator[SEP] identifier[classConstantTree] operator[SEP] operator[SEP] } }
public void addProgressChangeListener(MapboxNavigation navigation) { this.navigation = navigation; navigation.setCameraEngine(new DynamicCamera(mapboxMap)); navigation.addProgressChangeListener(progressChangeListener); }
class class_name[name] begin[{] method[addProgressChangeListener, return_type[void], modifier[public], parameter[navigation]] begin[{] assign[THIS[member[None.navigation]], member[.navigation]] call[navigation.setCameraEngine, parameter[ClassCreator(arguments=[MemberReference(member=mapboxMap, 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=DynamicCamera, sub_type=None))]] call[navigation.addProgressChangeListener, parameter[member[.progressChangeListener]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addProgressChangeListener] operator[SEP] identifier[MapboxNavigation] identifier[navigation] operator[SEP] { Keyword[this] operator[SEP] identifier[navigation] operator[=] identifier[navigation] operator[SEP] identifier[navigation] operator[SEP] identifier[setCameraEngine] operator[SEP] Keyword[new] identifier[DynamicCamera] operator[SEP] identifier[mapboxMap] operator[SEP] operator[SEP] operator[SEP] identifier[navigation] operator[SEP] identifier[addProgressChangeListener] operator[SEP] identifier[progressChangeListener] operator[SEP] operator[SEP] }
@Override public synchronized Object put(Object key, Object value) { ValueWrapper valueWrapper = new ValueWrapper(value); return super.put(key, valueWrapper); }
class class_name[name] begin[{] method[put, return_type[type[Object]], modifier[synchronized public], parameter[key, value]] begin[{] local_variable[type[ValueWrapper], valueWrapper] return[SuperMethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=valueWrapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] identifier[Object] identifier[put] operator[SEP] identifier[Object] identifier[key] , identifier[Object] identifier[value] operator[SEP] { identifier[ValueWrapper] identifier[valueWrapper] operator[=] Keyword[new] identifier[ValueWrapper] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[return] Keyword[super] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[valueWrapper] operator[SEP] operator[SEP] }
public static int cudnnBatchNormalizationForwardTraining( cudnnHandle handle, int mode, Pointer alpha, /** alpha[0] = result blend factor */ Pointer beta, /** beta[0] = dest layer blend factor */ cudnnTensorDescriptor xDesc, Pointer x, /** NxCxHxW */ cudnnTensorDescriptor yDesc, Pointer y, /** NxCxHxW */ /** * <pre> * Shared desc for the next 6 tensors in the argument list. Data type to be set as follows: type = (typeOf(x) == double) ? double : float Dimensions for this descriptor depend on normalization mode - Spatial Normalization : tensors are expected to have dims 1xCx1x1 (normalization is performed across NxHxW) - Per-Activation Normalization : tensors are expected to have dims of 1xCxHxW * (normalization is performed across N) * </pre> */ cudnnTensorDescriptor bnScaleBiasMeanVarDesc, /** 'Gamma' and 'Beta' respectively in Ioffe and Szegedy's paper's notation */ Pointer bnScale, Pointer bnBias, /** * <pre> * MUST use factor=1 in the very first call of a complete training cycle. Use a factor=1/(1+n) at N-th call to the function to get Cumulative Moving Average (CMA) behavior CMA[n] = (x[1]+...+x[n])/n Since CMA[n+1] = (n*CMA[n]+x[n+1])/(n+1) = ((n+1)*CMA[n]-CMA[n])/(n+1) + x[n+1]/(n+1) = * CMA[n]*(1-1/(n+1)) + x[n+1]*1/(n+1) * </pre> */ double exponentialAverageFactor, /** Used in Training phase only. runningMean = newMean*factor + runningMean*(1-factor) */ Pointer resultRunningMean, /** Output in training mode, input in inference. Is the moving average of variance[x] (factor is applied in the same way as for runningMean) */ Pointer resultRunningVariance, /** Has to be >= CUDNN_BN_MIN_EPSILON. Should be the same in forward and backward functions. */ double epsilon, /** Optionally save intermediate results from the forward pass here - can be reused to speed up backward pass. NULL if unused */ Pointer resultSaveMean, Pointer resultSaveInvVariance) { return checkResult(cudnnBatchNormalizationForwardTrainingNative(handle, mode, alpha, beta, xDesc, x, yDesc, y, bnScaleBiasMeanVarDesc, bnScale, bnBias, exponentialAverageFactor, resultRunningMean, resultRunningVariance, epsilon, resultSaveMean, resultSaveInvVariance)); }
class class_name[name] begin[{] method[cudnnBatchNormalizationForwardTraining, return_type[type[int]], modifier[public static], parameter[handle, mode, alpha, beta, xDesc, x, yDesc, y, bnScaleBiasMeanVarDesc, bnScale, bnBias, exponentialAverageFactor, resultRunningMean, resultRunningVariance, epsilon, resultSaveMean, resultSaveInvVariance]] begin[{] return[call[.checkResult, parameter[call[.cudnnBatchNormalizationForwardTrainingNative, parameter[member[.handle], member[.mode], member[.alpha], member[.beta], member[.xDesc], member[.x], member[.yDesc], member[.y], member[.bnScaleBiasMeanVarDesc], member[.bnScale], member[.bnBias], member[.exponentialAverageFactor], member[.resultRunningMean], member[.resultRunningVariance], member[.epsilon], member[.resultSaveMean], member[.resultSaveInvVariance]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[cudnnBatchNormalizationForwardTraining] operator[SEP] identifier[cudnnHandle] identifier[handle] , Keyword[int] identifier[mode] , identifier[Pointer] identifier[alpha] , identifier[Pointer] identifier[beta] , identifier[cudnnTensorDescriptor] identifier[xDesc] , identifier[Pointer] identifier[x] , identifier[cudnnTensorDescriptor] identifier[yDesc] , identifier[Pointer] identifier[y] , identifier[cudnnTensorDescriptor] identifier[bnScaleBiasMeanVarDesc] , identifier[Pointer] identifier[bnScale] , identifier[Pointer] identifier[bnBias] , Keyword[double] identifier[exponentialAverageFactor] , identifier[Pointer] identifier[resultRunningMean] , identifier[Pointer] identifier[resultRunningVariance] , Keyword[double] identifier[epsilon] , identifier[Pointer] identifier[resultSaveMean] , identifier[Pointer] identifier[resultSaveInvVariance] operator[SEP] { Keyword[return] identifier[checkResult] operator[SEP] identifier[cudnnBatchNormalizationForwardTrainingNative] operator[SEP] identifier[handle] , identifier[mode] , identifier[alpha] , identifier[beta] , identifier[xDesc] , identifier[x] , identifier[yDesc] , identifier[y] , identifier[bnScaleBiasMeanVarDesc] , identifier[bnScale] , identifier[bnBias] , identifier[exponentialAverageFactor] , identifier[resultRunningMean] , identifier[resultRunningVariance] , identifier[epsilon] , identifier[resultSaveMean] , identifier[resultSaveInvVariance] operator[SEP] operator[SEP] operator[SEP] }
public static String generateSignature( String secretKey, String method, String requestURI, Map<String, String> params, Map<String, String> headers) { String signature = ""; String strToSign = getStringToSignature(method, requestURI, params, headers); logger.log(Level.INFO, "== String to sign ==\n" + strToSign + "\n"); signature = generateSignature(secretKey, strToSign); return signature; }
class class_name[name] begin[{] method[generateSignature, return_type[type[String]], modifier[public static], parameter[secretKey, method, requestURI, params, headers]] begin[{] local_variable[type[String], signature] local_variable[type[String], strToSign] call[logger.log, parameter[member[Level.INFO], binary_operation[binary_operation[literal["== String to sign ==\n"], +, member[.strToSign]], +, literal["\n"]]]] assign[member[.signature], call[.generateSignature, parameter[member[.secretKey], member[.strToSign]]]] return[member[.signature]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[generateSignature] operator[SEP] identifier[String] identifier[secretKey] , identifier[String] identifier[method] , identifier[String] identifier[requestURI] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[headers] operator[SEP] { identifier[String] identifier[signature] operator[=] literal[String] operator[SEP] identifier[String] identifier[strToSign] operator[=] identifier[getStringToSignature] operator[SEP] identifier[method] , identifier[requestURI] , identifier[params] , identifier[headers] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[INFO] , literal[String] operator[+] identifier[strToSign] operator[+] literal[String] operator[SEP] operator[SEP] identifier[signature] operator[=] identifier[generateSignature] operator[SEP] identifier[secretKey] , identifier[strToSign] operator[SEP] operator[SEP] Keyword[return] identifier[signature] operator[SEP] }
@Override protected Content getClassLink(LinkInfo linkInfo) { Configuration configuration = m_writer.configuration; Utils utils = configuration.utils; LinkInfoImpl classLinkInfo = (LinkInfoImpl) linkInfo; boolean noLabel = linkInfo.label == null || linkInfo.label.isEmpty(); TypeElement typeElement = classLinkInfo.typeElement; // Create a tool tip if we are linking to a class or interface. Don't // create one if we are linking to a member. String title = ""; if (classLinkInfo.where == null || classLinkInfo.where.length() == 0) { boolean isTypeLink = classLinkInfo.type != null && utils.isTypeVariable(utils.getComponentType(classLinkInfo.type)); title = getClassToolTip(typeElement, isTypeLink); } Content label = classLinkInfo.getClassLinkLabel(m_writer.configuration); Content link = new ContentBuilder(); if (utils.isIncluded(typeElement)) { if (configuration.isGeneratedDoc(typeElement)) { DocPath filename = getPath(classLinkInfo); if (linkInfo.linkToSelf || !(DocPath.forName(utils, typeElement)).equals(m_writer.filename)) { link.addContent(m_writer.getHyperLink( filename.fragment(classLinkInfo.where), label, classLinkInfo.isStrong, classLinkInfo.styleName, title, classLinkInfo.target)); if (noLabel && !classLinkInfo.excludeTypeParameterLinks) { link.addContent(getTypeParameterLinks(linkInfo)); } return link; } } } else { Content crossLink = m_writer.getCrossClassLink( typeElement.getQualifiedName().toString(), classLinkInfo.where, label, classLinkInfo.isStrong, classLinkInfo.styleName, true); if (crossLink != null) { link.addContent(crossLink); if (noLabel && !classLinkInfo.excludeTypeParameterLinks) { link.addContent(getTypeParameterLinks(linkInfo)); } return link; } } // Can't link so just write label. link.addContent(label); if (noLabel && !classLinkInfo.excludeTypeParameterLinks) { link.addContent(getTypeParameterLinks(linkInfo)); } return link; }
class class_name[name] begin[{] method[getClassLink, return_type[type[Content]], modifier[protected], parameter[linkInfo]] begin[{] local_variable[type[Configuration], configuration] local_variable[type[Utils], utils] local_variable[type[LinkInfoImpl], classLinkInfo] local_variable[type[boolean], noLabel] local_variable[type[TypeElement], typeElement] local_variable[type[String], title] if[binary_operation[binary_operation[member[classLinkInfo.where], ==, literal[null]], ||, binary_operation[call[classLinkInfo.where.length, parameter[]], ==, literal[0]]]] begin[{] local_variable[type[boolean], isTypeLink] assign[member[.title], call[.getClassToolTip, parameter[member[.typeElement], member[.isTypeLink]]]] else begin[{] None end[}] local_variable[type[Content], label] local_variable[type[Content], link] if[call[utils.isIncluded, parameter[member[.typeElement]]]] begin[{] if[call[configuration.isGeneratedDoc, parameter[member[.typeElement]]]] begin[{] local_variable[type[DocPath], filename] if[binary_operation[member[linkInfo.linkToSelf], ||, call[DocPath.forName, parameter[member[.utils], member[.typeElement]]]]] begin[{] call[link.addContent, parameter[call[m_writer.getHyperLink, parameter[call[filename.fragment, parameter[member[classLinkInfo.where]]], member[.label], member[classLinkInfo.isStrong], member[classLinkInfo.styleName], member[.title], member[classLinkInfo.target]]]]] if[binary_operation[member[.noLabel], &&, member[classLinkInfo.excludeTypeParameterLinks]]] begin[{] call[link.addContent, parameter[call[.getTypeParameterLinks, parameter[member[.linkInfo]]]]] else begin[{] None end[}] return[member[.link]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] local_variable[type[Content], crossLink] if[binary_operation[member[.crossLink], !=, literal[null]]] begin[{] call[link.addContent, parameter[member[.crossLink]]] if[binary_operation[member[.noLabel], &&, member[classLinkInfo.excludeTypeParameterLinks]]] begin[{] call[link.addContent, parameter[call[.getTypeParameterLinks, parameter[member[.linkInfo]]]]] else begin[{] None end[}] return[member[.link]] else begin[{] None end[}] end[}] call[link.addContent, parameter[member[.label]]] if[binary_operation[member[.noLabel], &&, member[classLinkInfo.excludeTypeParameterLinks]]] begin[{] call[link.addContent, parameter[call[.getTypeParameterLinks, parameter[member[.linkInfo]]]]] else begin[{] None end[}] return[member[.link]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[Content] identifier[getClassLink] operator[SEP] identifier[LinkInfo] identifier[linkInfo] operator[SEP] { identifier[Configuration] identifier[configuration] operator[=] identifier[m_writer] operator[SEP] identifier[configuration] operator[SEP] identifier[Utils] identifier[utils] operator[=] identifier[configuration] operator[SEP] identifier[utils] operator[SEP] identifier[LinkInfoImpl] identifier[classLinkInfo] operator[=] operator[SEP] identifier[LinkInfoImpl] operator[SEP] identifier[linkInfo] operator[SEP] Keyword[boolean] identifier[noLabel] operator[=] identifier[linkInfo] operator[SEP] identifier[label] operator[==] Other[null] operator[||] identifier[linkInfo] operator[SEP] identifier[label] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] identifier[TypeElement] identifier[typeElement] operator[=] identifier[classLinkInfo] operator[SEP] identifier[typeElement] operator[SEP] identifier[String] identifier[title] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[classLinkInfo] operator[SEP] identifier[where] operator[==] Other[null] operator[||] identifier[classLinkInfo] operator[SEP] identifier[where] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[boolean] identifier[isTypeLink] operator[=] identifier[classLinkInfo] operator[SEP] identifier[type] operator[!=] Other[null] operator[&&] identifier[utils] operator[SEP] identifier[isTypeVariable] operator[SEP] identifier[utils] operator[SEP] identifier[getComponentType] operator[SEP] identifier[classLinkInfo] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[SEP] identifier[title] operator[=] identifier[getClassToolTip] operator[SEP] identifier[typeElement] , identifier[isTypeLink] operator[SEP] operator[SEP] } identifier[Content] identifier[label] operator[=] identifier[classLinkInfo] operator[SEP] identifier[getClassLinkLabel] operator[SEP] identifier[m_writer] operator[SEP] identifier[configuration] operator[SEP] operator[SEP] identifier[Content] identifier[link] operator[=] Keyword[new] identifier[ContentBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[utils] operator[SEP] identifier[isIncluded] operator[SEP] identifier[typeElement] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[configuration] operator[SEP] identifier[isGeneratedDoc] operator[SEP] identifier[typeElement] operator[SEP] operator[SEP] { identifier[DocPath] identifier[filename] operator[=] identifier[getPath] operator[SEP] identifier[classLinkInfo] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[linkInfo] operator[SEP] identifier[linkToSelf] operator[||] operator[!] operator[SEP] identifier[DocPath] operator[SEP] identifier[forName] operator[SEP] identifier[utils] , identifier[typeElement] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[m_writer] operator[SEP] identifier[filename] operator[SEP] operator[SEP] { identifier[link] operator[SEP] identifier[addContent] operator[SEP] identifier[m_writer] operator[SEP] identifier[getHyperLink] operator[SEP] identifier[filename] operator[SEP] identifier[fragment] operator[SEP] identifier[classLinkInfo] operator[SEP] identifier[where] operator[SEP] , identifier[label] , identifier[classLinkInfo] operator[SEP] identifier[isStrong] , identifier[classLinkInfo] operator[SEP] identifier[styleName] , identifier[title] , identifier[classLinkInfo] operator[SEP] identifier[target] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[noLabel] operator[&&] operator[!] identifier[classLinkInfo] operator[SEP] identifier[excludeTypeParameterLinks] operator[SEP] { identifier[link] operator[SEP] identifier[addContent] operator[SEP] identifier[getTypeParameterLinks] operator[SEP] identifier[linkInfo] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[link] operator[SEP] } } } Keyword[else] { identifier[Content] identifier[crossLink] operator[=] identifier[m_writer] operator[SEP] identifier[getCrossClassLink] operator[SEP] identifier[typeElement] operator[SEP] identifier[getQualifiedName] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[classLinkInfo] operator[SEP] identifier[where] , identifier[label] , identifier[classLinkInfo] operator[SEP] identifier[isStrong] , identifier[classLinkInfo] operator[SEP] identifier[styleName] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[crossLink] operator[!=] Other[null] operator[SEP] { identifier[link] operator[SEP] identifier[addContent] operator[SEP] identifier[crossLink] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[noLabel] operator[&&] operator[!] identifier[classLinkInfo] operator[SEP] identifier[excludeTypeParameterLinks] operator[SEP] { identifier[link] operator[SEP] identifier[addContent] operator[SEP] identifier[getTypeParameterLinks] operator[SEP] identifier[linkInfo] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[link] operator[SEP] } } identifier[link] operator[SEP] identifier[addContent] operator[SEP] identifier[label] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[noLabel] operator[&&] operator[!] identifier[classLinkInfo] operator[SEP] identifier[excludeTypeParameterLinks] operator[SEP] { identifier[link] operator[SEP] identifier[addContent] operator[SEP] identifier[getTypeParameterLinks] operator[SEP] identifier[linkInfo] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[link] operator[SEP] }
public static ResidueRange parse(String s) { Matcher matcher = RANGE_REGEX.matcher(s); if (matcher.matches()) { ResidueNumber start = null, end = null; String chain = null; try { chain = matcher.group(1); if (matcher.group(2) != null) { // ^ indicates first res (start==null) if(!"^".equals(matcher.group(2)) ) { start = ResidueNumber.fromString(matcher.group(2)); start.setChainName(chain); } } if(matcher.group(3) == null) { // single-residue range end = start; } else // $ indicates last res (end==null) if( matcher.group(4) != null && !"$".equals(matcher.group(4)) ){ end = ResidueNumber.fromString(matcher.group(4)); end.setChainName(chain); } return new ResidueRange(chain, start, end); } catch (IllegalStateException e) { throw new IllegalArgumentException("Range " + s + " was not valid", e); } } else if (CHAIN_REGEX.matcher(s).matches()) { return new ResidueRange(s, (ResidueNumber)null, null); } throw new IllegalArgumentException("Illegal ResidueRange format:" + s); }
class class_name[name] begin[{] method[parse, return_type[type[ResidueRange]], modifier[public static], parameter[s]] begin[{] local_variable[type[Matcher], matcher] if[call[matcher.matches, parameter[]]] begin[{] local_variable[type[ResidueNumber], start] local_variable[type[String], chain] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=chain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=['!'], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="^"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None)], member=fromString, postfix_operators=[], prefix_operators=[], qualifier=ResidueNumber, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=chain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setChainName, postfix_operators=[], prefix_operators=[], qualifier=start, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=Literal(postfix_operators=[], prefix_operators=['!'], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="$"), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None)], member=fromString, postfix_operators=[], prefix_operators=[], qualifier=ResidueNumber, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=chain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setChainName, postfix_operators=[], prefix_operators=[], qualifier=end, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=chain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=end, 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=ResidueRange, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Range "), operandr=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" was not valid"), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalStateException']))], finally_block=None, label=None, resources=None) else begin[{] if[call[CHAIN_REGEX.matcher, parameter[member[.s]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=ResidueNumber, 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=ResidueRange, sub_type=None))] else begin[{] None end[}] end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal ResidueRange format:"), operandr=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[ResidueRange] identifier[parse] operator[SEP] identifier[String] identifier[s] operator[SEP] { identifier[Matcher] identifier[matcher] operator[=] identifier[RANGE_REGEX] operator[SEP] identifier[matcher] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { identifier[ResidueNumber] identifier[start] operator[=] Other[null] , identifier[end] operator[=] Other[null] operator[SEP] identifier[String] identifier[chain] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[chain] operator[=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[2] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[!] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] { identifier[start] operator[=] identifier[ResidueNumber] operator[SEP] identifier[fromString] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] identifier[start] operator[SEP] identifier[setChainName] operator[SEP] identifier[chain] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[3] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[end] operator[=] identifier[start] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[4] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[4] operator[SEP] operator[SEP] operator[SEP] { identifier[end] operator[=] identifier[ResidueNumber] operator[SEP] identifier[fromString] operator[SEP] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[4] operator[SEP] operator[SEP] operator[SEP] identifier[end] operator[SEP] identifier[setChainName] operator[SEP] identifier[chain] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[ResidueRange] operator[SEP] identifier[chain] , identifier[start] , identifier[end] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalStateException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[s] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[CHAIN_REGEX] operator[SEP] identifier[matcher] operator[SEP] identifier[s] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ResidueRange] operator[SEP] identifier[s] , operator[SEP] identifier[ResidueNumber] operator[SEP] Other[null] , Other[null] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[s] operator[SEP] operator[SEP] }
public void setMin(int min) { mMin = min; if (mMin > mMax) { setMax(mMin + 1); } updateKeyboardRange(); mSeekBarDrawable.setNumSegments(mMax - mMin); if (mValue < mMin || mValue > mMax) { setProgress(mValue); } else { updateThumbPosForScale(-1); } }
class class_name[name] begin[{] method[setMin, return_type[void], modifier[public], parameter[min]] begin[{] assign[member[.mMin], member[.min]] if[binary_operation[member[.mMin], >, member[.mMax]]] begin[{] call[.setMax, parameter[binary_operation[member[.mMin], +, literal[1]]]] else begin[{] None end[}] call[.updateKeyboardRange, parameter[]] call[mSeekBarDrawable.setNumSegments, parameter[binary_operation[member[.mMax], -, member[.mMin]]]] if[binary_operation[binary_operation[member[.mValue], <, member[.mMin]], ||, binary_operation[member[.mValue], >, member[.mMax]]]] begin[{] call[.setProgress, parameter[member[.mValue]]] else begin[{] call[.updateThumbPosForScale, parameter[literal[1]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setMin] operator[SEP] Keyword[int] identifier[min] operator[SEP] { identifier[mMin] operator[=] identifier[min] operator[SEP] Keyword[if] operator[SEP] identifier[mMin] operator[>] identifier[mMax] operator[SEP] { identifier[setMax] operator[SEP] identifier[mMin] operator[+] Other[1] operator[SEP] operator[SEP] } identifier[updateKeyboardRange] operator[SEP] operator[SEP] operator[SEP] identifier[mSeekBarDrawable] operator[SEP] identifier[setNumSegments] operator[SEP] identifier[mMax] operator[-] identifier[mMin] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mValue] operator[<] identifier[mMin] operator[||] identifier[mValue] operator[>] identifier[mMax] operator[SEP] { identifier[setProgress] operator[SEP] identifier[mValue] operator[SEP] operator[SEP] } Keyword[else] { identifier[updateThumbPosForScale] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] } }
private static String getFullPath(final ContextModel model, final String path) { String fullPath = path.trim(); if (model.getContextName().length() > 0) { fullPath = "/" + model.getContextName(); if (!"/".equals(path.trim())) { if ((!(fullPath.endsWith("/"))) && (!(path.startsWith("/")))) { fullPath += "/"; } fullPath = fullPath + path; } } return fullPath; }
class class_name[name] begin[{] method[getFullPath, return_type[type[String]], modifier[private static], parameter[model, path]] begin[{] local_variable[type[String], fullPath] if[binary_operation[call[model.getContextName, parameter[]], >, literal[0]]] begin[{] assign[member[.fullPath], binary_operation[literal["/"], +, call[model.getContextName, parameter[]]]] if[literal["/"]] begin[{] if[binary_operation[call[fullPath.endsWith, parameter[literal["/"]]], &&, call[path.startsWith, parameter[literal["/"]]]]] begin[{] assign[member[.fullPath], literal["/"]] else begin[{] None end[}] assign[member[.fullPath], binary_operation[member[.fullPath], +, member[.path]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.fullPath]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[getFullPath] operator[SEP] Keyword[final] identifier[ContextModel] identifier[model] , Keyword[final] identifier[String] identifier[path] operator[SEP] { identifier[String] identifier[fullPath] operator[=] identifier[path] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[model] operator[SEP] identifier[getContextName] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[fullPath] operator[=] literal[String] operator[+] identifier[model] operator[SEP] identifier[getContextName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[path] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] operator[!] operator[SEP] identifier[fullPath] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] operator[!] operator[SEP] identifier[path] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[fullPath] operator[+=] literal[String] operator[SEP] } identifier[fullPath] operator[=] identifier[fullPath] operator[+] identifier[path] operator[SEP] } } Keyword[return] identifier[fullPath] operator[SEP] }
@Override public void _proximity(int proximity) { List<QueryToken> tokens = getCurrentWhereTokens(); if (tokens.isEmpty()) { throw new IllegalStateException("Proximity can only be used right after search clause"); } QueryToken whereToken = tokens.get(tokens.size() - 1); if (!(whereToken instanceof WhereToken)) { throw new IllegalStateException("Proximity can only be used right after search clause"); } if (((WhereToken) whereToken).getWhereOperator() != WhereOperator.SEARCH) { throw new IllegalStateException("Proximity can only be used right after search clause"); } if (proximity < 1) { throw new IllegalArgumentException("Proximity distance must be a positive number"); } ((WhereToken) whereToken).getOptions().setProximity(proximity); }
class class_name[name] begin[{] method[_proximity, return_type[void], modifier[public], parameter[proximity]] begin[{] local_variable[type[List], tokens] if[call[tokens.isEmpty, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Proximity can only be used right after search clause")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[QueryToken], whereToken] if[binary_operation[member[.whereToken], instanceof, type[WhereToken]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Proximity can only be used right after search clause")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[Cast(expression=MemberReference(member=whereToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=WhereToken, sub_type=None)), !=, member[WhereOperator.SEARCH]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Proximity can only be used right after search clause")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.proximity], <, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Proximity distance must be a positive number")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] Cast(expression=MemberReference(member=whereToken, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=WhereToken, sub_type=None)) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[_proximity] operator[SEP] Keyword[int] identifier[proximity] operator[SEP] { identifier[List] operator[<] identifier[QueryToken] operator[>] identifier[tokens] operator[=] identifier[getCurrentWhereTokens] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tokens] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[QueryToken] identifier[whereToken] operator[=] identifier[tokens] operator[SEP] identifier[get] operator[SEP] identifier[tokens] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[whereToken] Keyword[instanceof] identifier[WhereToken] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[WhereToken] operator[SEP] identifier[whereToken] operator[SEP] operator[SEP] identifier[getWhereOperator] operator[SEP] operator[SEP] operator[!=] identifier[WhereOperator] operator[SEP] identifier[SEARCH] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[proximity] operator[<] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[WhereToken] operator[SEP] identifier[whereToken] operator[SEP] operator[SEP] identifier[getOptions] operator[SEP] operator[SEP] operator[SEP] identifier[setProximity] operator[SEP] identifier[proximity] operator[SEP] operator[SEP] }
@Override public CPDefinitionVirtualSetting findByUUID_G(String uuid, long groupId) throws NoSuchCPDefinitionVirtualSettingException { CPDefinitionVirtualSetting cpDefinitionVirtualSetting = fetchByUUID_G(uuid, groupId); if (cpDefinitionVirtualSetting == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("uuid="); msg.append(uuid); msg.append(", groupId="); msg.append(groupId); msg.append("}"); if (_log.isDebugEnabled()) { _log.debug(msg.toString()); } throw new NoSuchCPDefinitionVirtualSettingException(msg.toString()); } return cpDefinitionVirtualSetting; }
class class_name[name] begin[{] method[findByUUID_G, return_type[type[CPDefinitionVirtualSetting]], modifier[public], parameter[uuid, groupId]] begin[{] local_variable[type[CPDefinitionVirtualSetting], cpDefinitionVirtualSetting] if[binary_operation[member[.cpDefinitionVirtualSetting], ==, literal[null]]] begin[{] local_variable[type[StringBundler], msg] call[msg.append, parameter[member[._NO_SUCH_ENTITY_WITH_KEY]]] call[msg.append, parameter[literal["uuid="]]] call[msg.append, parameter[member[.uuid]]] call[msg.append, parameter[literal[", groupId="]]] call[msg.append, parameter[member[.groupId]]] call[msg.append, parameter[literal["}"]]] if[call[_log.isDebugEnabled, parameter[]]] begin[{] call[_log.debug, parameter[call[msg.toString, parameter[]]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchCPDefinitionVirtualSettingException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.cpDefinitionVirtualSetting]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionVirtualSetting] identifier[findByUUID_G] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[groupId] operator[SEP] Keyword[throws] identifier[NoSuchCPDefinitionVirtualSettingException] { identifier[CPDefinitionVirtualSetting] identifier[cpDefinitionVirtualSetting] operator[=] identifier[fetchByUUID_G] operator[SEP] identifier[uuid] , identifier[groupId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cpDefinitionVirtualSetting] operator[==] Other[null] operator[SEP] { identifier[StringBundler] identifier[msg] operator[=] Keyword[new] identifier[StringBundler] operator[SEP] Other[6] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[_NO_SUCH_ENTITY_WITH_KEY] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[uuid] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[groupId] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[_log] operator[SEP] identifier[debug] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[NoSuchCPDefinitionVirtualSettingException] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[cpDefinitionVirtualSetting] operator[SEP] }
public CList parse(String infixExpression, Object... values) throws ParseException { // get variable names LinkedHashMap<String, Num> vNames = mapValues(infixExpression, values); return parse(infixExpression, vNames); }
class class_name[name] begin[{] method[parse, return_type[type[CList]], modifier[public], parameter[infixExpression, values]] begin[{] local_variable[type[LinkedHashMap], vNames] return[call[.parse, parameter[member[.infixExpression], member[.vNames]]]] end[}] END[}]
Keyword[public] identifier[CList] identifier[parse] operator[SEP] identifier[String] identifier[infixExpression] , identifier[Object] operator[...] identifier[values] operator[SEP] Keyword[throws] identifier[ParseException] { identifier[LinkedHashMap] operator[<] identifier[String] , identifier[Num] operator[>] identifier[vNames] operator[=] identifier[mapValues] operator[SEP] identifier[infixExpression] , identifier[values] operator[SEP] operator[SEP] Keyword[return] identifier[parse] operator[SEP] identifier[infixExpression] , identifier[vNames] operator[SEP] operator[SEP] }
public void ifHasMemberWithTag(String template, Properties attributes) throws XDocletException { ArrayList allMemberNames = new ArrayList(); HashMap allMembers = new HashMap(); boolean hasTag = false; addMembers(allMemberNames, allMembers, getCurrentClass(), null, null, null); for (Iterator it = allMemberNames.iterator(); it.hasNext(); ) { XMember member = (XMember) allMembers.get(it.next()); if (member instanceof XField) { setCurrentField((XField)member); if (hasTag(attributes, FOR_FIELD)) { hasTag = true; } setCurrentField(null); } else if (member instanceof XMethod) { setCurrentMethod((XMethod)member); if (hasTag(attributes, FOR_METHOD)) { hasTag = true; } setCurrentMethod(null); } if (hasTag) { generate(template); break; } } }
class class_name[name] begin[{] method[ifHasMemberWithTag, return_type[void], modifier[public], parameter[template, attributes]] begin[{] local_variable[type[ArrayList], allMemberNames] local_variable[type[HashMap], allMembers] local_variable[type[boolean], hasTag] call[.addMembers, parameter[member[.allMemberNames], member[.allMembers], call[.getCurrentClass, parameter[]], literal[null], literal[null], literal[null]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=allMembers, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=XMember, sub_type=None)), name=member)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=XMember, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=member, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=XField, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=member, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=XMethod, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=member, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=XMethod, sub_type=None))], member=setCurrentMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=attributes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOR_METHOD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasTag, 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=hasTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=setCurrentMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=member, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=XField, sub_type=None))], member=setCurrentField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=attributes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOR_FIELD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasTag, 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=hasTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=setCurrentField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MemberReference(member=hasTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=template, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=allMemberNames, selectors=[], type_arguments=None), name=it)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[ifHasMemberWithTag] operator[SEP] identifier[String] identifier[template] , identifier[Properties] identifier[attributes] operator[SEP] Keyword[throws] identifier[XDocletException] { identifier[ArrayList] identifier[allMemberNames] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[HashMap] identifier[allMembers] operator[=] Keyword[new] identifier[HashMap] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[hasTag] operator[=] literal[boolean] operator[SEP] identifier[addMembers] operator[SEP] identifier[allMemberNames] , identifier[allMembers] , identifier[getCurrentClass] operator[SEP] operator[SEP] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] identifier[it] operator[=] identifier[allMemberNames] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[XMember] identifier[member] operator[=] operator[SEP] identifier[XMember] operator[SEP] identifier[allMembers] operator[SEP] identifier[get] operator[SEP] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[member] Keyword[instanceof] identifier[XField] operator[SEP] { identifier[setCurrentField] operator[SEP] operator[SEP] identifier[XField] operator[SEP] identifier[member] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasTag] operator[SEP] identifier[attributes] , identifier[FOR_FIELD] operator[SEP] operator[SEP] { identifier[hasTag] operator[=] literal[boolean] operator[SEP] } identifier[setCurrentField] operator[SEP] Other[null] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[member] Keyword[instanceof] identifier[XMethod] operator[SEP] { identifier[setCurrentMethod] operator[SEP] operator[SEP] identifier[XMethod] operator[SEP] identifier[member] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasTag] operator[SEP] identifier[attributes] , identifier[FOR_METHOD] operator[SEP] operator[SEP] { identifier[hasTag] operator[=] literal[boolean] operator[SEP] } identifier[setCurrentMethod] operator[SEP] Other[null] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[hasTag] operator[SEP] { identifier[generate] operator[SEP] identifier[template] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } }
public byte[] getData() { if (this.data == null) { return new byte[] { }; } if (this.data.length == 0) { Family family = getSaFamily(); if (family == Family.AF_INET6) { this.data = new byte[Inet6Address.IPV6_ADDRESS_LENGTH]; } else { this.data = new byte[Inet4Address.IPV4_ADDRESS_LENGTH]; } } byte[] data = new byte[this.data.length]; System.arraycopy(this.data, 0, data, 0, data.length); return data; }
class class_name[name] begin[{] method[getData, return_type[type[byte]], modifier[public], parameter[]] begin[{] if[binary_operation[THIS[member[None.data]], ==, literal[null]]] begin[{] return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] else begin[{] None end[}] if[binary_operation[THIS[member[None.data]member[None.length]], ==, literal[0]]] begin[{] local_variable[type[Family], family] if[binary_operation[member[.family], ==, member[Family.AF_INET6]]] begin[{] assign[THIS[member[None.data]], ArrayCreator(dimensions=[MemberReference(member=IPV6_ADDRESS_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=Inet6Address, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] else begin[{] assign[THIS[member[None.data]], ArrayCreator(dimensions=[MemberReference(member=IPV4_ADDRESS_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=Inet4Address, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] end[}] else begin[{] None end[}] local_variable[type[byte], data] call[System.arraycopy, parameter[THIS[member[None.data]], literal[0], member[.data], literal[0], member[data.length]]] return[member[.data]] end[}] END[}]
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[getData] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[data] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] Keyword[byte] operator[SEP] operator[SEP] { } operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { identifier[Family] identifier[family] operator[=] identifier[getSaFamily] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[family] operator[==] identifier[Family] operator[SEP] identifier[AF_INET6] operator[SEP] { Keyword[this] operator[SEP] identifier[data] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[Inet6Address] operator[SEP] identifier[IPV6_ADDRESS_LENGTH] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[data] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[Inet4Address] operator[SEP] identifier[IPV4_ADDRESS_LENGTH] operator[SEP] operator[SEP] } } Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[=] Keyword[new] Keyword[byte] operator[SEP] Keyword[this] operator[SEP] identifier[data] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] Keyword[this] operator[SEP] identifier[data] , Other[0] , identifier[data] , Other[0] , identifier[data] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[return] identifier[data] operator[SEP] }
public static String parse(String commandLine, final CommandLineParser.CallbackHandler handler) throws CommandFormatException { return parse(commandLine, handler, true); }
class class_name[name] begin[{] method[parse, return_type[type[String]], modifier[public static], parameter[commandLine, handler]] begin[{] return[call[.parse, parameter[member[.commandLine], member[.handler], literal[true]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[parse] operator[SEP] identifier[String] identifier[commandLine] , Keyword[final] identifier[CommandLineParser] operator[SEP] identifier[CallbackHandler] identifier[handler] operator[SEP] Keyword[throws] identifier[CommandFormatException] { Keyword[return] identifier[parse] operator[SEP] identifier[commandLine] , identifier[handler] , literal[boolean] operator[SEP] operator[SEP] }
@Override public int prestartAllCoreThreads() { int answer = 0; synchronized (workers) { for (int i = super.getCorePoolSize() - workers.size() ; i > 0; i --) { addWorker(); answer ++; } } return answer; }
class class_name[name] begin[{] method[prestartAllCoreThreads, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[int], answer] SYNCHRONIZED[member[.workers]] BEGIN[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=addWorker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=answer, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=SuperMethodInvocation(arguments=[], member=getCorePoolSize, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=workers, selectors=[], type_arguments=None), operator=-), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) END[}] return[member[.answer]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[prestartAllCoreThreads] operator[SEP] operator[SEP] { Keyword[int] identifier[answer] operator[=] Other[0] operator[SEP] Keyword[synchronized] operator[SEP] identifier[workers] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Keyword[super] operator[SEP] identifier[getCorePoolSize] operator[SEP] operator[SEP] operator[-] identifier[workers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[>] Other[0] operator[SEP] identifier[i] operator[--] operator[SEP] { identifier[addWorker] operator[SEP] operator[SEP] operator[SEP] identifier[answer] operator[++] operator[SEP] } } Keyword[return] identifier[answer] operator[SEP] }
@Override public void toFile(File file, Engine engine) throws IOException { if (engine.getInputVariables().isEmpty()) { throw new RuntimeException("[exporter error] engine has no input variables to export the surface"); } if (engine.getOutputVariables().isEmpty()) { throw new RuntimeException("[exporter error] engine has no output variables to export the surface"); } InputVariable a = engine.getInputVariables().get(0); InputVariable b = engine.getInputVariables().get(1 % engine.numberOfInputVariables()); toFile(file, engine, a, b, 1024, FldExporter.ScopeOfValues.AllVariables, engine.getOutputVariables()); }
class class_name[name] begin[{] method[toFile, return_type[void], modifier[public], parameter[file, engine]] begin[{] if[call[engine.getInputVariables, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[exporter error] engine has no input variables to export the surface")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] if[call[engine.getOutputVariables, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[exporter error] engine has no output variables to export the surface")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[InputVariable], a] local_variable[type[InputVariable], b] call[.toFile, parameter[member[.file], member[.engine], member[.a], member[.b], literal[1024], member[FldExporter.ScopeOfValues.AllVariables], call[engine.getOutputVariables, parameter[]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[toFile] operator[SEP] identifier[File] identifier[file] , identifier[Engine] identifier[engine] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[engine] operator[SEP] identifier[getInputVariables] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[engine] operator[SEP] identifier[getOutputVariables] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[InputVariable] identifier[a] operator[=] identifier[engine] operator[SEP] identifier[getInputVariables] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[InputVariable] identifier[b] operator[=] identifier[engine] operator[SEP] identifier[getInputVariables] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[1] operator[%] identifier[engine] operator[SEP] identifier[numberOfInputVariables] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toFile] operator[SEP] identifier[file] , identifier[engine] , identifier[a] , identifier[b] , Other[1024] , identifier[FldExporter] operator[SEP] identifier[ScopeOfValues] operator[SEP] identifier[AllVariables] , identifier[engine] operator[SEP] identifier[getOutputVariables] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@java.lang.Deprecated public java.util.Map<java.lang.String, alluxio.grpc.MountPointInfo> getMountPoints() { return getMountPointsMap(); }
class class_name[name] begin[{] method[getMountPoints, return_type[type[java]], modifier[public], parameter[]] begin[{] return[call[.getMountPointsMap, parameter[]]] end[}] END[}]
annotation[@] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Deprecated] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] , identifier[alluxio] operator[SEP] identifier[grpc] operator[SEP] identifier[MountPointInfo] operator[>] identifier[getMountPoints] operator[SEP] operator[SEP] { Keyword[return] identifier[getMountPointsMap] operator[SEP] operator[SEP] operator[SEP] }
@Override public <R> OperationResult<R> executeWithFailover(Operation<CL, R> op, RetryPolicy retry) throws ConnectionException { //Tracing operation OperationTracer opsTracer = config.getOperationTracer(); final AstyanaxContext context = opsTracer.getAstyanaxContext(); if(context != null) { opsTracer.onCall(context, op); } retry.begin(); ConnectionException lastException = null; do { try { OperationResult<R> result = newExecuteWithFailover(op).tryOperation(op); retry.success(); if(context != null) opsTracer.onSuccess(context, op); return result; } catch (OperationException e) { if(context != null) opsTracer.onException(context, op, e); retry.failure(e); throw e; } catch (ConnectionException e) { lastException = e; } if (retry.allowRetry()) { LOG.debug("Retry policy[" + retry.toString() + "] will allow a subsequent retry for operation [" + op.getClass() + "] on keyspace [" + op.getKeyspace() + "] on pinned host[" + op.getPinnedHost() + "]"); } } while (retry.allowRetry()); if(context != null && lastException != null) opsTracer.onException(context, op, lastException); retry.failure(lastException); throw lastException; }
class class_name[name] begin[{] method[executeWithFailover, return_type[type[OperationResult]], modifier[public], parameter[op, retry]] begin[{] local_variable[type[OperationTracer], opsTracer] local_variable[type[AstyanaxContext], context] if[binary_operation[member[.context], !=, literal[null]]] begin[{] call[opsTracer.onCall, parameter[member[.context], member[.op]]] else begin[{] None end[}] call[retry.begin, parameter[]] local_variable[type[ConnectionException], lastException] do[call[retry.allowRetry, parameter[]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newExecuteWithFailover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tryOperation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=R, sub_type=None))], dimensions=[], name=OperationResult, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=success, postfix_operators=[], prefix_operators=[], qualifier=retry, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onSuccess, postfix_operators=[], prefix_operators=[], qualifier=opsTracer, selectors=[], type_arguments=None), label=None)), ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=op, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onException, postfix_operators=[], prefix_operators=[], qualifier=opsTracer, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=failure, postfix_operators=[], prefix_operators=[], qualifier=retry, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['OperationException'])), CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ConnectionException']))], finally_block=None, label=None, resources=None) if[call[retry.allowRetry, parameter[]]] begin[{] call[LOG.debug, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["Retry policy["], +, call[retry.toString, parameter[]]], +, literal["] will allow a subsequent retry for operation ["]], +, call[op.getClass, parameter[]]], +, literal["] on keyspace ["]], +, call[op.getKeyspace, parameter[]]], +, literal["] on pinned host["]], +, call[op.getPinnedHost, parameter[]]], +, literal["]"]]]] else begin[{] None end[}] end[}] if[binary_operation[binary_operation[member[.context], !=, literal[null]], &&, binary_operation[member[.lastException], !=, literal[null]]]] begin[{] call[opsTracer.onException, parameter[member[.context], member[.op], member[.lastException]]] else begin[{] None end[}] call[retry.failure, parameter[member[.lastException]]] ThrowStatement(expression=MemberReference(member=lastException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[R] operator[>] identifier[OperationResult] operator[<] identifier[R] operator[>] identifier[executeWithFailover] operator[SEP] identifier[Operation] operator[<] identifier[CL] , identifier[R] operator[>] identifier[op] , identifier[RetryPolicy] identifier[retry] operator[SEP] Keyword[throws] identifier[ConnectionException] { identifier[OperationTracer] identifier[opsTracer] operator[=] identifier[config] operator[SEP] identifier[getOperationTracer] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[AstyanaxContext] identifier[context] operator[=] identifier[opsTracer] operator[SEP] identifier[getAstyanaxContext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[!=] Other[null] operator[SEP] { identifier[opsTracer] operator[SEP] identifier[onCall] operator[SEP] identifier[context] , identifier[op] operator[SEP] operator[SEP] } identifier[retry] operator[SEP] identifier[begin] operator[SEP] operator[SEP] operator[SEP] identifier[ConnectionException] identifier[lastException] operator[=] Other[null] operator[SEP] Keyword[do] { Keyword[try] { identifier[OperationResult] operator[<] identifier[R] operator[>] identifier[result] operator[=] identifier[newExecuteWithFailover] operator[SEP] identifier[op] operator[SEP] operator[SEP] identifier[tryOperation] operator[SEP] identifier[op] operator[SEP] operator[SEP] identifier[retry] operator[SEP] identifier[success] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[!=] Other[null] operator[SEP] identifier[opsTracer] operator[SEP] identifier[onSuccess] operator[SEP] identifier[context] , identifier[op] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] } Keyword[catch] operator[SEP] identifier[OperationException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[context] operator[!=] Other[null] operator[SEP] identifier[opsTracer] operator[SEP] identifier[onException] operator[SEP] identifier[context] , identifier[op] , identifier[e] operator[SEP] operator[SEP] identifier[retry] operator[SEP] identifier[failure] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[ConnectionException] identifier[e] operator[SEP] { identifier[lastException] operator[=] identifier[e] operator[SEP] } Keyword[if] operator[SEP] identifier[retry] operator[SEP] identifier[allowRetry] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[retry] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[op] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[op] operator[SEP] identifier[getKeyspace] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[op] operator[SEP] identifier[getPinnedHost] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[while] operator[SEP] identifier[retry] operator[SEP] identifier[allowRetry] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[!=] Other[null] operator[&&] identifier[lastException] operator[!=] Other[null] operator[SEP] identifier[opsTracer] operator[SEP] identifier[onException] operator[SEP] identifier[context] , identifier[op] , identifier[lastException] operator[SEP] operator[SEP] identifier[retry] operator[SEP] identifier[failure] operator[SEP] identifier[lastException] operator[SEP] operator[SEP] Keyword[throw] identifier[lastException] operator[SEP] }
public static void config(Config config) { try { provider.config(config); } catch (Throwable t) { provider = new DefaultLogProvider(); Log log = provider.getLogger(LogFactory.class.getName()); log.error("Fail on logger provider configuration. Reset logging system to default provider."); log.dump("Logging configuration stack dump:", t); } }
class class_name[name] begin[{] method[config, return_type[void], modifier[public static], parameter[config]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=config, postfix_operators=[], prefix_operators=[], qualifier=provider, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=provider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultLogProvider, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=LogFactory, sub_type=None))], member=getLogger, postfix_operators=[], prefix_operators=[], qualifier=provider, selectors=[], type_arguments=None), name=log)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Log, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Fail on logger provider configuration. Reset logging system to default provider.")], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Logging configuration stack dump:"), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=dump, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[config] operator[SEP] identifier[Config] identifier[config] operator[SEP] { Keyword[try] { identifier[provider] operator[SEP] identifier[config] operator[SEP] identifier[config] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[provider] operator[=] Keyword[new] identifier[DefaultLogProvider] operator[SEP] operator[SEP] operator[SEP] identifier[Log] identifier[log] operator[=] identifier[provider] operator[SEP] identifier[getLogger] operator[SEP] identifier[LogFactory] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[dump] operator[SEP] literal[String] , identifier[t] operator[SEP] operator[SEP] } }
public void setTableStyle(String featureTable, GeometryType geometryType, StyleRow style) { deleteTableStyle(featureTable, geometryType); if (style != null) { createTableStyleRelationship(featureTable); long featureContentsId = contentsId.getOrCreateId(featureTable); long styleId = getOrInsertStyle(style); StyleMappingDao mappingDao = getTableStyleMappingDao(featureTable); insertStyleMapping(mappingDao, featureContentsId, styleId, geometryType); } }
class class_name[name] begin[{] method[setTableStyle, return_type[void], modifier[public], parameter[featureTable, geometryType, style]] begin[{] call[.deleteTableStyle, parameter[member[.featureTable], member[.geometryType]]] if[binary_operation[member[.style], !=, literal[null]]] begin[{] call[.createTableStyleRelationship, parameter[member[.featureTable]]] local_variable[type[long], featureContentsId] local_variable[type[long], styleId] local_variable[type[StyleMappingDao], mappingDao] call[.insertStyleMapping, parameter[member[.mappingDao], member[.featureContentsId], member[.styleId], member[.geometryType]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setTableStyle] operator[SEP] identifier[String] identifier[featureTable] , identifier[GeometryType] identifier[geometryType] , identifier[StyleRow] identifier[style] operator[SEP] { identifier[deleteTableStyle] operator[SEP] identifier[featureTable] , identifier[geometryType] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[style] operator[!=] Other[null] operator[SEP] { identifier[createTableStyleRelationship] operator[SEP] identifier[featureTable] operator[SEP] operator[SEP] Keyword[long] identifier[featureContentsId] operator[=] identifier[contentsId] operator[SEP] identifier[getOrCreateId] operator[SEP] identifier[featureTable] operator[SEP] operator[SEP] Keyword[long] identifier[styleId] operator[=] identifier[getOrInsertStyle] operator[SEP] identifier[style] operator[SEP] operator[SEP] identifier[StyleMappingDao] identifier[mappingDao] operator[=] identifier[getTableStyleMappingDao] operator[SEP] identifier[featureTable] operator[SEP] operator[SEP] identifier[insertStyleMapping] operator[SEP] identifier[mappingDao] , identifier[featureContentsId] , identifier[styleId] , identifier[geometryType] operator[SEP] operator[SEP] } }
public void removeExtension() { if (geoPackage.isTable(DataColumns.TABLE_NAME)) { geoPackage.dropTable(DataColumns.TABLE_NAME); } if (geoPackage.isTable(DataColumnConstraints.TABLE_NAME)) { geoPackage.dropTable(DataColumnConstraints.TABLE_NAME); } try { if (extensionsDao.isTableExists()) { extensionsDao.deleteByExtension(EXTENSION_NAME); } } catch (SQLException e) { throw new GeoPackageException( "Failed to delete Schema extension. GeoPackage: " + geoPackage.getName(), e); } }
class class_name[name] begin[{] method[removeExtension, return_type[void], modifier[public], parameter[]] begin[{] if[call[geoPackage.isTable, parameter[member[DataColumns.TABLE_NAME]]]] begin[{] call[geoPackage.dropTable, parameter[member[DataColumns.TABLE_NAME]]] else begin[{] None end[}] if[call[geoPackage.isTable, parameter[member[DataColumnConstraints.TABLE_NAME]]]] begin[{] call[geoPackage.dropTable, parameter[member[DataColumnConstraints.TABLE_NAME]]] else begin[{] None end[}] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isTableExists, postfix_operators=[], prefix_operators=[], qualifier=extensionsDao, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=EXTENSION_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deleteByExtension, postfix_operators=[], prefix_operators=[], qualifier=extensionsDao, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to delete Schema extension. GeoPackage: "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=geoPackage, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GeoPackageException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[removeExtension] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[geoPackage] operator[SEP] identifier[isTable] operator[SEP] identifier[DataColumns] operator[SEP] identifier[TABLE_NAME] operator[SEP] operator[SEP] { identifier[geoPackage] operator[SEP] identifier[dropTable] operator[SEP] identifier[DataColumns] operator[SEP] identifier[TABLE_NAME] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[geoPackage] operator[SEP] identifier[isTable] operator[SEP] identifier[DataColumnConstraints] operator[SEP] identifier[TABLE_NAME] operator[SEP] operator[SEP] { identifier[geoPackage] operator[SEP] identifier[dropTable] operator[SEP] identifier[DataColumnConstraints] operator[SEP] identifier[TABLE_NAME] operator[SEP] operator[SEP] } Keyword[try] { Keyword[if] operator[SEP] identifier[extensionsDao] operator[SEP] identifier[isTableExists] operator[SEP] operator[SEP] operator[SEP] { identifier[extensionsDao] operator[SEP] identifier[deleteByExtension] operator[SEP] identifier[EXTENSION_NAME] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[GeoPackageException] operator[SEP] literal[String] operator[+] identifier[geoPackage] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public QueryResult execute(long offset, long limit, boolean caseInsensitiveOrder) throws RepositoryException { if (log.isDebugEnabled()) { log.debug("Executing query: \n" + root.dump()); } setCaseInsensitiveOrder(caseInsensitiveOrder); // build lucene query Query query = LuceneQueryBuilder.createQuery(root, session, index.getContext().getItemStateManager(), index.getNamespaceMappings(), index.getTextAnalyzer(), propReg, index.getSynonymProvider(), index.getIndexFormatVersion(), index.getContext().getVirtualTableResolver(), index.getIndexingConfig()); OrderQueryNode orderNode = root.getOrderNode(); OrderQueryNode.OrderSpec[] orderSpecs; if (orderNode != null) { orderSpecs = orderNode.getOrderSpecs(); } else { orderSpecs = new OrderQueryNode.OrderSpec[0]; } QPath[] orderProperties = new QPath[orderSpecs.length]; boolean[] ascSpecs = new boolean[orderSpecs.length]; for (int i = 0; i < orderSpecs.length; i++) { orderProperties[i] = orderSpecs[i].getPropertyPath(); ascSpecs[i] = orderSpecs[i].isAscending(); } return new SingleColumnQueryResult(index, itemMgr, session, session.getAccessManager(), this, query, new SpellSuggestion(index.getSpellChecker(), root), getSelectProperties(), orderProperties, ascSpecs, orderProperties.length == 0 && getRespectDocumentOrder(), offset, limit); }
class class_name[name] begin[{] method[execute, return_type[type[QueryResult]], modifier[public], parameter[offset, limit, caseInsensitiveOrder]] begin[{] if[call[log.isDebugEnabled, parameter[]]] begin[{] call[log.debug, parameter[binary_operation[literal["Executing query: \n"], +, call[root.dump, parameter[]]]]] else begin[{] None end[}] call[.setCaseInsensitiveOrder, parameter[member[.caseInsensitiveOrder]]] local_variable[type[Query], query] local_variable[type[OrderQueryNode], orderNode] local_variable[type[OrderQueryNode], orderSpecs] if[binary_operation[member[.orderNode], !=, literal[null]]] begin[{] assign[member[.orderSpecs], call[orderNode.getOrderSpecs, parameter[]]] else begin[{] assign[member[.orderSpecs], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OrderQueryNode, sub_type=ReferenceType(arguments=None, dimensions=None, name=OrderSpec, sub_type=None)))] end[}] local_variable[type[QPath], orderProperties] local_variable[type[boolean], ascSpecs] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=orderProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=orderSpecs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getPropertyPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ascSpecs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=orderSpecs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=isAscending, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, 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=orderSpecs, 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[ClassCreator(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=itemMgr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getAccessManager, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MethodInvocation(arguments=[], member=getSpellChecker, postfix_operators=[], prefix_operators=[], qualifier=index, selectors=[], type_arguments=None), MemberReference(member=root, 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=SpellSuggestion, sub_type=None)), MethodInvocation(arguments=[], member=getSelectProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=orderProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ascSpecs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=orderProperties, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=MethodInvocation(arguments=[], member=getRespectDocumentOrder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=limit, 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=SingleColumnQueryResult, sub_type=None))] end[}] END[}]
Keyword[public] identifier[QueryResult] identifier[execute] operator[SEP] Keyword[long] identifier[offset] , Keyword[long] identifier[limit] , Keyword[boolean] identifier[caseInsensitiveOrder] operator[SEP] Keyword[throws] identifier[RepositoryException] { 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] operator[+] identifier[root] operator[SEP] identifier[dump] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[setCaseInsensitiveOrder] operator[SEP] identifier[caseInsensitiveOrder] operator[SEP] operator[SEP] identifier[Query] identifier[query] operator[=] identifier[LuceneQueryBuilder] operator[SEP] identifier[createQuery] operator[SEP] identifier[root] , identifier[session] , identifier[index] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[getItemStateManager] operator[SEP] operator[SEP] , identifier[index] operator[SEP] identifier[getNamespaceMappings] operator[SEP] operator[SEP] , identifier[index] operator[SEP] identifier[getTextAnalyzer] operator[SEP] operator[SEP] , identifier[propReg] , identifier[index] operator[SEP] identifier[getSynonymProvider] operator[SEP] operator[SEP] , identifier[index] operator[SEP] identifier[getIndexFormatVersion] operator[SEP] operator[SEP] , identifier[index] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[getVirtualTableResolver] operator[SEP] operator[SEP] , identifier[index] operator[SEP] identifier[getIndexingConfig] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[OrderQueryNode] identifier[orderNode] operator[=] identifier[root] operator[SEP] identifier[getOrderNode] operator[SEP] operator[SEP] operator[SEP] identifier[OrderQueryNode] operator[SEP] identifier[OrderSpec] operator[SEP] operator[SEP] identifier[orderSpecs] operator[SEP] Keyword[if] operator[SEP] identifier[orderNode] operator[!=] Other[null] operator[SEP] { identifier[orderSpecs] operator[=] identifier[orderNode] operator[SEP] identifier[getOrderSpecs] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[orderSpecs] operator[=] Keyword[new] identifier[OrderQueryNode] operator[SEP] identifier[OrderSpec] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[QPath] operator[SEP] operator[SEP] identifier[orderProperties] operator[=] Keyword[new] identifier[QPath] operator[SEP] identifier[orderSpecs] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[boolean] operator[SEP] operator[SEP] identifier[ascSpecs] operator[=] Keyword[new] Keyword[boolean] operator[SEP] identifier[orderSpecs] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[orderSpecs] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[orderProperties] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[orderSpecs] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getPropertyPath] operator[SEP] operator[SEP] operator[SEP] identifier[ascSpecs] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[orderSpecs] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[isAscending] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[SingleColumnQueryResult] operator[SEP] identifier[index] , identifier[itemMgr] , identifier[session] , identifier[session] operator[SEP] identifier[getAccessManager] operator[SEP] operator[SEP] , Keyword[this] , identifier[query] , Keyword[new] identifier[SpellSuggestion] operator[SEP] identifier[index] operator[SEP] identifier[getSpellChecker] operator[SEP] operator[SEP] , identifier[root] operator[SEP] , identifier[getSelectProperties] operator[SEP] operator[SEP] , identifier[orderProperties] , identifier[ascSpecs] , identifier[orderProperties] operator[SEP] identifier[length] operator[==] Other[0] operator[&&] identifier[getRespectDocumentOrder] operator[SEP] operator[SEP] , identifier[offset] , identifier[limit] operator[SEP] operator[SEP] }
public Response deleteDeptUser(String CorpNum) throws PopbillException{ if (CorpNum == null || CorpNum.isEmpty()) throw new PopbillException(-99999999, "연동회원 사업자번호(CorpNum)가 입력되지 않았습니다."); return httppost("/HomeTax/Cashbill/DeptUser", CorpNum, null, null, "DELETE", Response.class); }
class class_name[name] begin[{] method[deleteDeptUser, return_type[type[Response]], modifier[public], parameter[CorpNum]] begin[{] if[binary_operation[binary_operation[member[.CorpNum], ==, literal[null]], ||, call[CorpNum.isEmpty, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=99999999), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="연동회원 사업자번호(CorpNum)가 입력되지 않았습니다.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PopbillException, sub_type=None)), label=None) else begin[{] None end[}] return[call[.httppost, parameter[literal["/HomeTax/Cashbill/DeptUser"], member[.CorpNum], literal[null], literal[null], literal["DELETE"], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Response, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Response] identifier[deleteDeptUser] operator[SEP] identifier[String] identifier[CorpNum] operator[SEP] Keyword[throws] identifier[PopbillException] { Keyword[if] operator[SEP] identifier[CorpNum] operator[==] Other[null] operator[||] identifier[CorpNum] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[PopbillException] operator[SEP] operator[-] Other[99999999] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[httppost] operator[SEP] literal[String] , identifier[CorpNum] , Other[null] , Other[null] , literal[String] , identifier[Response] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
private void visitFunction(Node n) { if (NodeUtil.isEs6Constructor(n)) { return; // These will be checked via the CLASS node. } FunctionType functionType = JSType.toMaybeFunctionType(n.getJSType()); if (functionType.isConstructor()) { checkConstructor(n, functionType); } else if (functionType.isInterface()) { checkInterface(n, functionType); } else if (n.isAsyncGeneratorFunction()) { // An async generator function must return a AsyncGenerator or supertype of AsyncGenerator JSType returnType = functionType.getReturnType(); validator.expectAsyncGeneratorSupertype( n, returnType, "An async generator function must return a (supertype of) AsyncGenerator"); } else if (n.isGeneratorFunction()) { // A generator function must return a Generator or supertype of Generator JSType returnType = functionType.getReturnType(); validator.expectGeneratorSupertype( n, returnType, "A generator function must return a (supertype of) Generator"); } else if (n.isAsyncFunction()) { // An async function must return a Promise or supertype of Promise JSType returnType = functionType.getReturnType(); validator.expectValidAsyncReturnType(n, returnType); } }
class class_name[name] begin[{] method[visitFunction, return_type[void], modifier[private], parameter[n]] begin[{] if[call[NodeUtil.isEs6Constructor, parameter[member[.n]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[FunctionType], functionType] if[call[functionType.isConstructor, parameter[]]] begin[{] call[.checkConstructor, parameter[member[.n], member[.functionType]]] else begin[{] if[call[functionType.isInterface, parameter[]]] begin[{] call[.checkInterface, parameter[member[.n], member[.functionType]]] else begin[{] if[call[n.isAsyncGeneratorFunction, parameter[]]] begin[{] local_variable[type[JSType], returnType] call[validator.expectAsyncGeneratorSupertype, parameter[member[.n], member[.returnType], literal["An async generator function must return a (supertype of) AsyncGenerator"]]] else begin[{] if[call[n.isGeneratorFunction, parameter[]]] begin[{] local_variable[type[JSType], returnType] call[validator.expectGeneratorSupertype, parameter[member[.n], member[.returnType], literal["A generator function must return a (supertype of) Generator"]]] else begin[{] if[call[n.isAsyncFunction, parameter[]]] begin[{] local_variable[type[JSType], returnType] call[validator.expectValidAsyncReturnType, parameter[member[.n], member[.returnType]]] else begin[{] None end[}] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[visitFunction] operator[SEP] identifier[Node] identifier[n] operator[SEP] { Keyword[if] operator[SEP] identifier[NodeUtil] operator[SEP] identifier[isEs6Constructor] operator[SEP] identifier[n] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[FunctionType] identifier[functionType] operator[=] identifier[JSType] operator[SEP] identifier[toMaybeFunctionType] operator[SEP] identifier[n] operator[SEP] identifier[getJSType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[functionType] operator[SEP] identifier[isConstructor] operator[SEP] operator[SEP] operator[SEP] { identifier[checkConstructor] operator[SEP] identifier[n] , identifier[functionType] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[functionType] operator[SEP] identifier[isInterface] operator[SEP] operator[SEP] operator[SEP] { identifier[checkInterface] operator[SEP] identifier[n] , identifier[functionType] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[n] operator[SEP] identifier[isAsyncGeneratorFunction] operator[SEP] operator[SEP] operator[SEP] { identifier[JSType] identifier[returnType] operator[=] identifier[functionType] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[SEP] identifier[validator] operator[SEP] identifier[expectAsyncGeneratorSupertype] operator[SEP] identifier[n] , identifier[returnType] , literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[n] operator[SEP] identifier[isGeneratorFunction] operator[SEP] operator[SEP] operator[SEP] { identifier[JSType] identifier[returnType] operator[=] identifier[functionType] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[SEP] identifier[validator] operator[SEP] identifier[expectGeneratorSupertype] operator[SEP] identifier[n] , identifier[returnType] , literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[n] operator[SEP] identifier[isAsyncFunction] operator[SEP] operator[SEP] operator[SEP] { identifier[JSType] identifier[returnType] operator[=] identifier[functionType] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[SEP] identifier[validator] operator[SEP] identifier[expectValidAsyncReturnType] operator[SEP] identifier[n] , identifier[returnType] operator[SEP] operator[SEP] } }
public BigFloat divide(BigFloat x) { if (x.isSpecial()) { if (x == NaN) { return NaN; } else { return context.valueOf(0); } } if (this.isZero() && !x.isZero()) { return context.valueOf(0); } if (x.isZero()) { if (this.isZero()) { return NaN; // 0 or -0 / 0 = NaN } else if (this.isNegative()) { return NEGATIVE_INFINITY;// -N / 0 = -INF } else { return POSITIVE_INFINITY;// N / 0 = +INF } } Context c = max(context, x.context); return c.valueOf(value.divide(x.value, c.mathContext)); }
class class_name[name] begin[{] method[divide, return_type[type[BigFloat]], modifier[public], parameter[x]] begin[{] if[call[x.isSpecial, parameter[]]] begin[{] if[binary_operation[member[.x], ==, member[.NaN]]] begin[{] return[member[.NaN]] else begin[{] return[call[context.valueOf, parameter[literal[0]]]] end[}] else begin[{] None end[}] if[binary_operation[THIS[call[None.isZero, parameter[]]], &&, call[x.isZero, parameter[]]]] begin[{] return[call[context.valueOf, parameter[literal[0]]]] else begin[{] None end[}] if[call[x.isZero, parameter[]]] begin[{] if[THIS[call[None.isZero, parameter[]]]] begin[{] return[member[.NaN]] else begin[{] if[THIS[call[None.isNegative, parameter[]]]] begin[{] return[member[.NEGATIVE_INFINITY]] else begin[{] return[member[.POSITIVE_INFINITY]] end[}] end[}] else begin[{] None end[}] local_variable[type[Context], c] return[call[c.valueOf, parameter[call[value.divide, parameter[member[x.value], member[c.mathContext]]]]]] end[}] END[}]
Keyword[public] identifier[BigFloat] identifier[divide] operator[SEP] identifier[BigFloat] identifier[x] operator[SEP] { Keyword[if] operator[SEP] identifier[x] operator[SEP] identifier[isSpecial] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[x] operator[==] identifier[NaN] operator[SEP] { Keyword[return] identifier[NaN] operator[SEP] } Keyword[else] { Keyword[return] identifier[context] operator[SEP] identifier[valueOf] operator[SEP] Other[0] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[isZero] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[x] operator[SEP] identifier[isZero] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[context] operator[SEP] identifier[valueOf] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[x] operator[SEP] identifier[isZero] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[isZero] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[NaN] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[isNegative] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[NEGATIVE_INFINITY] operator[SEP] } Keyword[else] { Keyword[return] identifier[POSITIVE_INFINITY] operator[SEP] } } identifier[Context] identifier[c] operator[=] identifier[max] operator[SEP] identifier[context] , identifier[x] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[return] identifier[c] operator[SEP] identifier[valueOf] operator[SEP] identifier[value] operator[SEP] identifier[divide] operator[SEP] identifier[x] operator[SEP] identifier[value] , identifier[c] operator[SEP] identifier[mathContext] operator[SEP] operator[SEP] operator[SEP] }
public static Node copyTreeToNode(Node tree, Node node) { DOMResult result = new DOMResult(node); if (Utility.copyTreeToResult(tree, result)) return node.getLastChild(); else return null; // Failure }
class class_name[name] begin[{] method[copyTreeToNode, return_type[type[Node]], modifier[public static], parameter[tree, node]] begin[{] local_variable[type[DOMResult], result] if[call[Utility.copyTreeToResult, parameter[member[.tree], member[.result]]]] begin[{] return[call[node.getLastChild, parameter[]]] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[Node] identifier[copyTreeToNode] operator[SEP] identifier[Node] identifier[tree] , identifier[Node] identifier[node] operator[SEP] { identifier[DOMResult] identifier[result] operator[=] Keyword[new] identifier[DOMResult] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Utility] operator[SEP] identifier[copyTreeToResult] operator[SEP] identifier[tree] , identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[node] operator[SEP] identifier[getLastChild] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] Other[null] operator[SEP] }
public void setOutputs(java.util.Collection<Output> outputs) { if (outputs == null) { this.outputs = null; return; } this.outputs = new java.util.ArrayList<Output>(outputs); }
class class_name[name] begin[{] method[setOutputs, return_type[void], modifier[public], parameter[outputs]] begin[{] if[binary_operation[member[.outputs], ==, literal[null]]] begin[{] assign[THIS[member[None.outputs]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.outputs]], ClassCreator(arguments=[MemberReference(member=outputs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Output, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOutputs] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[Output] operator[>] identifier[outputs] operator[SEP] { Keyword[if] operator[SEP] identifier[outputs] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[outputs] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[outputs] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[Output] operator[>] operator[SEP] identifier[outputs] operator[SEP] operator[SEP] }
public boolean remove() { boolean bSuccess = false; try { //? if ((m_table.getFieldInfo().getEditMode() == Constants.EDIT_IN_PROGRESS) //? || (m_table.getFieldInfo().getEditMode() == Constants.EDIT_CURRENT)) m_table.remove(); } catch (Exception ex) { ex.printStackTrace(); bSuccess = false; } return bSuccess; }
class class_name[name] begin[{] method[remove, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[boolean], bSuccess] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=m_table, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bSuccess, 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=ex, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.bSuccess]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[remove] operator[SEP] operator[SEP] { Keyword[boolean] identifier[bSuccess] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[m_table] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[ex] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] identifier[bSuccess] operator[=] literal[boolean] operator[SEP] } Keyword[return] identifier[bSuccess] operator[SEP] }
public void setCSPACE(Integer newCSPACE) { Integer oldCSPACE = cspace; cspace = newCSPACE; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.TILE_SET_COLOR__CSPACE, oldCSPACE, cspace)); }
class class_name[name] begin[{] method[setCSPACE, return_type[void], modifier[public], parameter[newCSPACE]] begin[{] local_variable[type[Integer], oldCSPACE] assign[member[.cspace], member[.newCSPACE]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=TILE_SET_COLOR__CSPACE, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[]), MemberReference(member=oldCSPACE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cspace, 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=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCSPACE] operator[SEP] identifier[Integer] identifier[newCSPACE] operator[SEP] { identifier[Integer] identifier[oldCSPACE] operator[=] identifier[cspace] operator[SEP] identifier[cspace] operator[=] identifier[newCSPACE] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[AfplibPackage] operator[SEP] identifier[TILE_SET_COLOR__CSPACE] , identifier[oldCSPACE] , identifier[cspace] operator[SEP] operator[SEP] operator[SEP] }
@Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.GBIMG__XPOS: setXPOS(XPOS_EDEFAULT); return; case AfplibPackage.GBIMG__YPOS: setYPOS(YPOS_EDEFAULT); return; case AfplibPackage.GBIMG__FORMAT: setFORMAT(FORMAT_EDEFAULT); return; case AfplibPackage.GBIMG__RES: setRES(RES_EDEFAULT); return; case AfplibPackage.GBIMG__WIDTH: setWIDTH(WIDTH_EDEFAULT); return; case AfplibPackage.GBIMG__HEIGHT: setHEIGHT(HEIGHT_EDEFAULT); return; } super.eUnset(featureID); }
class class_name[name] begin[{] method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=GBIMG__XPOS, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=XPOS_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setXPOS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=GBIMG__YPOS, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=YPOS_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setYPOS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=GBIMG__FORMAT, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FORMAT_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setFORMAT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=GBIMG__RES, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=RES_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setRES, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=GBIMG__WIDTH, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=WIDTH_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setWIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=GBIMG__HEIGHT, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=HEIGHT_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setHEIGHT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eUnset, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[GBIMG__XPOS] operator[:] identifier[setXPOS] operator[SEP] identifier[XPOS_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[GBIMG__YPOS] operator[:] identifier[setYPOS] operator[SEP] identifier[YPOS_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[GBIMG__FORMAT] operator[:] identifier[setFORMAT] operator[SEP] identifier[FORMAT_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[GBIMG__RES] operator[:] identifier[setRES] operator[SEP] identifier[RES_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[GBIMG__WIDTH] operator[:] identifier[setWIDTH] operator[SEP] identifier[WIDTH_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[GBIMG__HEIGHT] operator[:] identifier[setHEIGHT] operator[SEP] identifier[HEIGHT_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[super] operator[SEP] identifier[eUnset] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
private RoadSegment removeRoadSegmentAt(RoadPath path, int index, PathIterator iterator) { final int pathIndex = this.paths.indexOf(path); assert pathIndex >= 0 && pathIndex < this.paths.size(); assert index >= 0 && index < path.size(); final RoadPath syncPath; final RoadSegment sgmt; if (index == 0 || index == path.size() - 1) { // Remove one of the bounds of the path. if cause // minimal insertion changes in the clustered road-path sgmt = path.remove(index); } else { // Split the path somewhere between the first and last positions sgmt = path.get(index); assert sgmt != null; final RoadPath rest = path.splitAfter(sgmt); path.remove(sgmt); if (rest != null && !rest.isEmpty()) { // put back the rest of the segments this.paths.add(pathIndex + 1, rest); } } --this.segmentCount; if (path.isEmpty()) { this.paths.remove(path); if (pathIndex > 0) { syncPath = this.paths.get(pathIndex - 1); } else { syncPath = null; } } else { syncPath = path; } if (iterator != null) { iterator.reset(syncPath); } return sgmt; }
class class_name[name] begin[{] method[removeRoadSegmentAt, return_type[type[RoadSegment]], modifier[private], parameter[path, index, iterator]] begin[{] local_variable[type[int], pathIndex] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pathIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=pathIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=paths, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=<), operator=&&), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None), operator=<), operator=&&), label=None, value=None) local_variable[type[RoadPath], syncPath] local_variable[type[RoadSegment], sgmt] if[binary_operation[binary_operation[member[.index], ==, literal[0]], ||, binary_operation[member[.index], ==, binary_operation[call[path.size, parameter[]], -, literal[1]]]]] begin[{] assign[member[.sgmt], call[path.remove, parameter[member[.index]]]] else begin[{] assign[member[.sgmt], call[path.get, parameter[member[.index]]]] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=sgmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) local_variable[type[RoadPath], rest] call[path.remove, parameter[member[.sgmt]]] if[binary_operation[binary_operation[member[.rest], !=, literal[null]], &&, call[rest.isEmpty, parameter[]]]] begin[{] THIS[member[None.paths]call[None.add, parameter[binary_operation[member[.pathIndex], +, literal[1]], member[.rest]]]] else begin[{] None end[}] end[}] THIS[member[None.segmentCount]] if[call[path.isEmpty, parameter[]]] begin[{] THIS[member[None.paths]call[None.remove, parameter[member[.path]]]] if[binary_operation[member[.pathIndex], >, literal[0]]] begin[{] assign[member[.syncPath], THIS[member[None.paths]call[None.get, parameter[binary_operation[member[.pathIndex], -, literal[1]]]]]] else begin[{] assign[member[.syncPath], literal[null]] end[}] else begin[{] assign[member[.syncPath], member[.path]] end[}] if[binary_operation[member[.iterator], !=, literal[null]]] begin[{] call[iterator.reset, parameter[member[.syncPath]]] else begin[{] None end[}] return[member[.sgmt]] end[}] END[}]
Keyword[private] identifier[RoadSegment] identifier[removeRoadSegmentAt] operator[SEP] identifier[RoadPath] identifier[path] , Keyword[int] identifier[index] , identifier[PathIterator] identifier[iterator] operator[SEP] { Keyword[final] Keyword[int] identifier[pathIndex] operator[=] Keyword[this] operator[SEP] identifier[paths] operator[SEP] identifier[indexOf] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[assert] identifier[pathIndex] operator[>=] Other[0] operator[&&] identifier[pathIndex] operator[<] Keyword[this] operator[SEP] identifier[paths] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[index] operator[>=] Other[0] operator[&&] identifier[index] operator[<] identifier[path] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[RoadPath] identifier[syncPath] operator[SEP] Keyword[final] identifier[RoadSegment] identifier[sgmt] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[==] Other[0] operator[||] identifier[index] operator[==] identifier[path] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] { identifier[sgmt] operator[=] identifier[path] operator[SEP] identifier[remove] operator[SEP] identifier[index] operator[SEP] operator[SEP] } Keyword[else] { identifier[sgmt] operator[=] identifier[path] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[assert] identifier[sgmt] operator[!=] Other[null] operator[SEP] Keyword[final] identifier[RoadPath] identifier[rest] operator[=] identifier[path] operator[SEP] identifier[splitAfter] operator[SEP] identifier[sgmt] operator[SEP] operator[SEP] identifier[path] operator[SEP] identifier[remove] operator[SEP] identifier[sgmt] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rest] operator[!=] Other[null] operator[&&] operator[!] identifier[rest] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[paths] operator[SEP] identifier[add] operator[SEP] identifier[pathIndex] operator[+] Other[1] , identifier[rest] operator[SEP] operator[SEP] } } operator[--] Keyword[this] operator[SEP] identifier[segmentCount] operator[SEP] Keyword[if] operator[SEP] identifier[path] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[paths] operator[SEP] identifier[remove] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pathIndex] operator[>] Other[0] operator[SEP] { identifier[syncPath] operator[=] Keyword[this] operator[SEP] identifier[paths] operator[SEP] identifier[get] operator[SEP] identifier[pathIndex] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[syncPath] operator[=] Other[null] operator[SEP] } } Keyword[else] { identifier[syncPath] operator[=] identifier[path] operator[SEP] } Keyword[if] operator[SEP] identifier[iterator] operator[!=] Other[null] operator[SEP] { identifier[iterator] operator[SEP] identifier[reset] operator[SEP] identifier[syncPath] operator[SEP] operator[SEP] } Keyword[return] identifier[sgmt] operator[SEP] }
private static void checkSensibility(AnnotatedType<?> type) { // check if it has a constructor if (type.getConstructors().isEmpty() && !type.getJavaClass().isInterface()) { MetadataLogger.LOG.noConstructor(type); } Set<Class<?>> hierarchy = new HashSet<Class<?>>(); for (Class<?> clazz = type.getJavaClass(); clazz != null; clazz = clazz.getSuperclass()) { hierarchy.add(clazz); hierarchy.addAll(Reflections.getInterfaceClosure(clazz)); } checkMembersBelongToHierarchy(type.getConstructors(), hierarchy, type); checkMembersBelongToHierarchy(type.getMethods(), hierarchy, type); checkMembersBelongToHierarchy(type.getFields(), hierarchy, type); }
class class_name[name] begin[{] method[checkSensibility, return_type[void], modifier[private static], parameter[type]] begin[{] if[binary_operation[call[type.getConstructors, parameter[]], &&, call[type.getJavaClass, parameter[]]]] begin[{] call[MetadataLogger.LOG.noConstructor, parameter[member[.type]]] else begin[{] None end[}] local_variable[type[Set], hierarchy] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=hierarchy, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInterfaceClosure, postfix_operators=[], prefix_operators=[], qualifier=Reflections, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=hierarchy, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=getJavaClass, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), name=clazz)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getSuperclass, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None))]), label=None) call[.checkMembersBelongToHierarchy, parameter[call[type.getConstructors, parameter[]], member[.hierarchy], member[.type]]] call[.checkMembersBelongToHierarchy, parameter[call[type.getMethods, parameter[]], member[.hierarchy], member[.type]]] call[.checkMembersBelongToHierarchy, parameter[call[type.getFields, parameter[]], member[.hierarchy], member[.type]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[checkSensibility] operator[SEP] identifier[AnnotatedType] operator[<] operator[?] operator[>] identifier[type] operator[SEP] { Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[getConstructors] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[type] operator[SEP] identifier[getJavaClass] operator[SEP] operator[SEP] operator[SEP] identifier[isInterface] operator[SEP] operator[SEP] operator[SEP] { identifier[MetadataLogger] operator[SEP] identifier[LOG] operator[SEP] identifier[noConstructor] operator[SEP] identifier[type] operator[SEP] operator[SEP] } identifier[Set] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[hierarchy] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[type] operator[SEP] identifier[getJavaClass] operator[SEP] operator[SEP] operator[SEP] identifier[clazz] operator[!=] Other[null] operator[SEP] identifier[clazz] operator[=] identifier[clazz] operator[SEP] identifier[getSuperclass] operator[SEP] operator[SEP] operator[SEP] { identifier[hierarchy] operator[SEP] identifier[add] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] identifier[hierarchy] operator[SEP] identifier[addAll] operator[SEP] identifier[Reflections] operator[SEP] identifier[getInterfaceClosure] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] operator[SEP] } identifier[checkMembersBelongToHierarchy] operator[SEP] identifier[type] operator[SEP] identifier[getConstructors] operator[SEP] operator[SEP] , identifier[hierarchy] , identifier[type] operator[SEP] operator[SEP] identifier[checkMembersBelongToHierarchy] operator[SEP] identifier[type] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] , identifier[hierarchy] , identifier[type] operator[SEP] operator[SEP] identifier[checkMembersBelongToHierarchy] operator[SEP] identifier[type] operator[SEP] identifier[getFields] operator[SEP] operator[SEP] , identifier[hierarchy] , identifier[type] operator[SEP] operator[SEP] }
private CmsPushButton createCancelButton() { addDialogClose(null); CmsPushButton button = new CmsPushButton(); button.setText(Messages.get().key(Messages.GUI_CANCEL_0)); button.setUseMinWidth(true); button.addClickHandler(new ClickHandler() { /** * @see com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event.dom.client.ClickEvent) */ public void onClick(ClickEvent event) { CmsSeoOptionsDialog.this.hide(); } }); return button; }
class class_name[name] begin[{] method[createCancelButton, return_type[type[CmsPushButton]], modifier[private], parameter[]] begin[{] call[.addDialogClose, parameter[literal[null]]] local_variable[type[CmsPushButton], button] call[button.setText, parameter[call[Messages.get, parameter[]]]] call[button.setUseMinWidth, parameter[literal[true]]] call[button.addClickHandler, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=CmsSeoOptionsDialog, selectors=[MethodInvocation(arguments=[], member=hide, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], documentation=/** * @see com.google.gwt.event.dom.client.ClickHandler#onClick(com.google.gwt.event.dom.client.ClickEvent) */, modifiers={'public'}, name=onClick, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ClickEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClickHandler, sub_type=None))]] return[member[.button]] end[}] END[}]
Keyword[private] identifier[CmsPushButton] identifier[createCancelButton] operator[SEP] operator[SEP] { identifier[addDialogClose] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[CmsPushButton] identifier[button] operator[=] Keyword[new] identifier[CmsPushButton] operator[SEP] operator[SEP] operator[SEP] identifier[button] operator[SEP] identifier[setText] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_CANCEL_0] operator[SEP] operator[SEP] operator[SEP] identifier[button] operator[SEP] identifier[setUseMinWidth] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[button] operator[SEP] identifier[addClickHandler] operator[SEP] Keyword[new] identifier[ClickHandler] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[onClick] operator[SEP] identifier[ClickEvent] identifier[event] operator[SEP] { identifier[CmsSeoOptionsDialog] operator[SEP] Keyword[this] operator[SEP] identifier[hide] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[return] identifier[button] operator[SEP] }
public void invalidate(InternalIndex index) { String[] components = index.getComponents(); if (components == null) { cache.remove(index.getName()); return; } for (String component : components) { TypeConverter converter = cache.get(component); if (converter instanceof UnresolvedConverter) { cache.remove(component); } } }
class class_name[name] begin[{] method[invalidate, return_type[void], modifier[public], parameter[index]] begin[{] local_variable[type[String], components] if[binary_operation[member[.components], ==, literal[null]]] begin[{] call[cache.remove, parameter[call[index.getName, parameter[]]]] return[None] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=cache, selectors=[], type_arguments=None), name=converter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TypeConverter, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=converter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=UnresolvedConverter, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=cache, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=components, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=component)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[invalidate] operator[SEP] identifier[InternalIndex] identifier[index] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[components] operator[=] identifier[index] operator[SEP] identifier[getComponents] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[components] operator[==] Other[null] operator[SEP] { identifier[cache] operator[SEP] identifier[remove] operator[SEP] identifier[index] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[component] operator[:] identifier[components] operator[SEP] { identifier[TypeConverter] identifier[converter] operator[=] identifier[cache] operator[SEP] identifier[get] operator[SEP] identifier[component] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[converter] Keyword[instanceof] identifier[UnresolvedConverter] operator[SEP] { identifier[cache] operator[SEP] identifier[remove] operator[SEP] identifier[component] operator[SEP] operator[SEP] } } }
protected void fitIntoLoops(final ChannelMemory actMemo) { final Sample ins = actMemo.currentSample; // If Forward direction: if (actMemo.currentDirection>=0) { actMemo.currentTuningPos += actMemo.currentTuning; if (actMemo.currentTuningPos >= Helpers.SHIFT_ONE) { actMemo.currentSamplePos += (actMemo.currentTuningPos >> Helpers.SHIFT); actMemo.currentTuningPos &= Helpers.SHIFT_MASK; if ((ins.loopType & Helpers.LOOP_ON)==0) // NoLoop { actMemo.instrumentFinished = actMemo.currentSamplePos>=ins.length; } else // loop is On { if ((ins.loopType & Helpers.LOOP_IS_PINGPONG)==0) // No Ping Pong { if (actMemo.currentSamplePos >= ins.repeatStop) actMemo.currentSamplePos = ins.repeatStart + ((actMemo.currentSamplePos-ins.repeatStart)%ins.repeatLength); } else // is PingPong { if (actMemo.currentSamplePos >= ins.repeatStop) { actMemo.currentDirection = -1; actMemo.currentSamplePos = ins.repeatStop - ((actMemo.currentSamplePos-ins.repeatStart)%ins.repeatLength) - 1; } } } } } else // Loop is on and we have ping pong! { actMemo.currentTuningPos -= actMemo.currentTuning; if (actMemo.currentTuningPos <= 0) { int hi = ((-actMemo.currentTuningPos) >> Helpers.SHIFT) + 1; actMemo.currentSamplePos -= hi; actMemo.currentTuningPos += hi<<Helpers.SHIFT; if (actMemo.currentSamplePos <= ins.repeatStart) { actMemo.currentDirection = 1; actMemo.currentSamplePos = ins.repeatStart + ((ins.repeatStart-actMemo.currentSamplePos)%ins.repeatLength); } } } }
class class_name[name] begin[{] method[fitIntoLoops, return_type[void], modifier[protected], parameter[actMemo]] begin[{] local_variable[type[Sample], ins] if[binary_operation[member[actMemo.currentDirection], >=, literal[0]]] begin[{] assign[member[actMemo.currentTuningPos], member[actMemo.currentTuning]] if[binary_operation[member[actMemo.currentTuningPos], >=, member[Helpers.SHIFT_ONE]]] begin[{] assign[member[actMemo.currentSamplePos], binary_operation[member[actMemo.currentTuningPos], >>, member[Helpers.SHIFT]]] assign[member[actMemo.currentTuningPos], member[Helpers.SHIFT_MASK]] if[binary_operation[binary_operation[member[ins.loopType], &, member[Helpers.LOOP_ON]], ==, literal[0]]] begin[{] assign[member[actMemo.instrumentFinished], binary_operation[member[actMemo.currentSamplePos], >=, member[ins.length]]] else begin[{] if[binary_operation[binary_operation[member[ins.loopType], &, member[Helpers.LOOP_IS_PINGPONG]], ==, literal[0]]] begin[{] if[binary_operation[member[actMemo.currentSamplePos], >=, member[ins.repeatStop]]] begin[{] assign[member[actMemo.currentSamplePos], binary_operation[member[ins.repeatStart], +, binary_operation[binary_operation[member[actMemo.currentSamplePos], -, member[ins.repeatStart]], %, member[ins.repeatLength]]]] else begin[{] None end[}] else begin[{] if[binary_operation[member[actMemo.currentSamplePos], >=, member[ins.repeatStop]]] begin[{] assign[member[actMemo.currentDirection], literal[1]] assign[member[actMemo.currentSamplePos], binary_operation[binary_operation[member[ins.repeatStop], -, binary_operation[binary_operation[member[actMemo.currentSamplePos], -, member[ins.repeatStart]], %, member[ins.repeatLength]]], -, literal[1]]] else begin[{] None end[}] end[}] end[}] else begin[{] None end[}] else begin[{] assign[member[actMemo.currentTuningPos], member[actMemo.currentTuning]] if[binary_operation[member[actMemo.currentTuningPos], <=, literal[0]]] begin[{] local_variable[type[int], hi] assign[member[actMemo.currentSamplePos], member[.hi]] assign[member[actMemo.currentTuningPos], binary_operation[member[.hi], <<, member[Helpers.SHIFT]]] if[binary_operation[member[actMemo.currentSamplePos], <=, member[ins.repeatStart]]] begin[{] assign[member[actMemo.currentDirection], literal[1]] assign[member[actMemo.currentSamplePos], binary_operation[member[ins.repeatStart], +, binary_operation[binary_operation[member[ins.repeatStart], -, member[actMemo.currentSamplePos]], %, member[ins.repeatLength]]]] else begin[{] None end[}] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[fitIntoLoops] operator[SEP] Keyword[final] identifier[ChannelMemory] identifier[actMemo] operator[SEP] { Keyword[final] identifier[Sample] identifier[ins] operator[=] identifier[actMemo] operator[SEP] identifier[currentSample] operator[SEP] Keyword[if] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentDirection] operator[>=] Other[0] operator[SEP] { identifier[actMemo] operator[SEP] identifier[currentTuningPos] operator[+=] identifier[actMemo] operator[SEP] identifier[currentTuning] operator[SEP] Keyword[if] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentTuningPos] operator[>=] identifier[Helpers] operator[SEP] identifier[SHIFT_ONE] operator[SEP] { identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[+=] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentTuningPos] operator[>] operator[>] identifier[Helpers] operator[SEP] identifier[SHIFT] operator[SEP] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentTuningPos] operator[&=] identifier[Helpers] operator[SEP] identifier[SHIFT_MASK] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[ins] operator[SEP] identifier[loopType] operator[&] identifier[Helpers] operator[SEP] identifier[LOOP_ON] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[actMemo] operator[SEP] identifier[instrumentFinished] operator[=] identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[>=] identifier[ins] operator[SEP] identifier[length] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] operator[SEP] identifier[ins] operator[SEP] identifier[loopType] operator[&] identifier[Helpers] operator[SEP] identifier[LOOP_IS_PINGPONG] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[>=] identifier[ins] operator[SEP] identifier[repeatStop] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[=] identifier[ins] operator[SEP] identifier[repeatStart] operator[+] operator[SEP] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[-] identifier[ins] operator[SEP] identifier[repeatStart] operator[SEP] operator[%] identifier[ins] operator[SEP] identifier[repeatLength] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[>=] identifier[ins] operator[SEP] identifier[repeatStop] operator[SEP] { identifier[actMemo] operator[SEP] identifier[currentDirection] operator[=] operator[-] Other[1] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[=] identifier[ins] operator[SEP] identifier[repeatStop] operator[-] operator[SEP] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[-] identifier[ins] operator[SEP] identifier[repeatStart] operator[SEP] operator[%] identifier[ins] operator[SEP] identifier[repeatLength] operator[SEP] operator[-] Other[1] operator[SEP] } } } } } Keyword[else] { identifier[actMemo] operator[SEP] identifier[currentTuningPos] operator[-=] identifier[actMemo] operator[SEP] identifier[currentTuning] operator[SEP] Keyword[if] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentTuningPos] operator[<=] Other[0] operator[SEP] { Keyword[int] identifier[hi] operator[=] operator[SEP] operator[SEP] operator[-] identifier[actMemo] operator[SEP] identifier[currentTuningPos] operator[SEP] operator[>] operator[>] identifier[Helpers] operator[SEP] identifier[SHIFT] operator[SEP] operator[+] Other[1] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[-=] identifier[hi] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentTuningPos] operator[+=] identifier[hi] operator[<<] identifier[Helpers] operator[SEP] identifier[SHIFT] operator[SEP] Keyword[if] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[<=] identifier[ins] operator[SEP] identifier[repeatStart] operator[SEP] { identifier[actMemo] operator[SEP] identifier[currentDirection] operator[=] Other[1] operator[SEP] identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[=] identifier[ins] operator[SEP] identifier[repeatStart] operator[+] operator[SEP] operator[SEP] identifier[ins] operator[SEP] identifier[repeatStart] operator[-] identifier[actMemo] operator[SEP] identifier[currentSamplePos] operator[SEP] operator[%] identifier[ins] operator[SEP] identifier[repeatLength] operator[SEP] operator[SEP] } } } }
public AnalyzerJob getAnalyzerJob(final String descriptorName, final String analyzerName, final String analyzerInputName) { List<AnalyzerJob> candidates = new ArrayList<>(_jobs); // filter analyzers of the corresponding type candidates = CollectionUtils2.refineCandidates(candidates, o -> { final String actualDescriptorName = o.getDescriptor().getDisplayName(); return descriptorName.equals(actualDescriptorName); }); if (analyzerName != null) { // filter analyzers with a particular name candidates = CollectionUtils2.refineCandidates(candidates, o -> { final String actualAnalyzerName = o.getName(); return analyzerName.equals(actualAnalyzerName); }); } if (analyzerInputName != null) { // filter analyzers with a particular input candidates = CollectionUtils2.refineCandidates(candidates, o -> { final InputColumn<?> inputColumn = getIdentifyingInputColumn(o); if (inputColumn == null) { return false; } return analyzerInputName.equals(inputColumn.getName()); }); } if (candidates.isEmpty()) { logger.error("No more AnalyzerJob candidates to choose from"); return null; } else if (candidates.size() > 1) { logger.warn("Multiple ({}) AnalyzerJob candidates to choose from, picking first"); } return candidates.iterator().next(); }
class class_name[name] begin[{] method[getAnalyzerJob, return_type[type[AnalyzerJob]], modifier[public], parameter[descriptorName, analyzerName, analyzerInputName]] begin[{] local_variable[type[List], candidates] assign[member[.candidates], call[CollectionUtils2.refineCandidates, parameter[member[.candidates], LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDescriptor, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[MethodInvocation(arguments=[], member=getDisplayName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=actualDescriptorName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=actualDescriptorName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=descriptorName, selectors=[], type_arguments=None), label=None)], parameters=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] if[binary_operation[member[.analyzerName], !=, literal[null]]] begin[{] assign[member[.candidates], call[CollectionUtils2.refineCandidates, parameter[member[.candidates], LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), name=actualAnalyzerName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=actualAnalyzerName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=analyzerName, selectors=[], type_arguments=None), label=None)], parameters=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] else begin[{] None end[}] if[binary_operation[member[.analyzerInputName], !=, literal[null]]] begin[{] assign[member[.candidates], call[CollectionUtils2.refineCandidates, parameter[member[.candidates], LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getIdentifyingInputColumn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=inputColumn)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=InputColumn, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=inputColumn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=inputColumn, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=analyzerInputName, selectors=[], type_arguments=None), label=None)], parameters=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] else begin[{] None end[}] if[call[candidates.isEmpty, parameter[]]] begin[{] call[logger.error, parameter[literal["No more AnalyzerJob candidates to choose from"]]] return[literal[null]] else begin[{] if[binary_operation[call[candidates.size, parameter[]], >, literal[1]]] begin[{] call[logger.warn, parameter[literal["Multiple ({}) AnalyzerJob candidates to choose from, picking first"]]] else begin[{] None end[}] end[}] return[call[candidates.iterator, parameter[]]] end[}] END[}]
Keyword[public] identifier[AnalyzerJob] identifier[getAnalyzerJob] operator[SEP] Keyword[final] identifier[String] identifier[descriptorName] , Keyword[final] identifier[String] identifier[analyzerName] , Keyword[final] identifier[String] identifier[analyzerInputName] operator[SEP] { identifier[List] operator[<] identifier[AnalyzerJob] operator[>] identifier[candidates] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[_jobs] operator[SEP] operator[SEP] identifier[candidates] operator[=] identifier[CollectionUtils2] operator[SEP] identifier[refineCandidates] operator[SEP] identifier[candidates] , identifier[o] operator[->] { Keyword[final] identifier[String] identifier[actualDescriptorName] operator[=] identifier[o] operator[SEP] identifier[getDescriptor] operator[SEP] operator[SEP] operator[SEP] identifier[getDisplayName] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[descriptorName] operator[SEP] identifier[equals] operator[SEP] identifier[actualDescriptorName] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[analyzerName] operator[!=] Other[null] operator[SEP] { identifier[candidates] operator[=] identifier[CollectionUtils2] operator[SEP] identifier[refineCandidates] operator[SEP] identifier[candidates] , identifier[o] operator[->] { Keyword[final] identifier[String] identifier[actualAnalyzerName] operator[=] identifier[o] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[analyzerName] operator[SEP] identifier[equals] operator[SEP] identifier[actualAnalyzerName] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[analyzerInputName] operator[!=] Other[null] operator[SEP] { identifier[candidates] operator[=] identifier[CollectionUtils2] operator[SEP] identifier[refineCandidates] operator[SEP] identifier[candidates] , identifier[o] operator[->] { Keyword[final] identifier[InputColumn] operator[<] operator[?] operator[>] identifier[inputColumn] operator[=] identifier[getIdentifyingInputColumn] operator[SEP] identifier[o] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[inputColumn] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] identifier[analyzerInputName] operator[SEP] identifier[equals] operator[SEP] identifier[inputColumn] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[candidates] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[candidates] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[candidates] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] }