code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static <E> ImmutableList<ImmutableList<E>> partitionAlmostEvenly(final List<E> list, final int partitions) { checkNotNull(list); checkArgument(partitions > 0, "Number of partitions must be positive"); checkArgument(partitions <= list.size(), "Cannot request more partitions than there are list items"); // Divide into partitions, with the remainder falling into the extra partitions final List<List<E>> prelimPartitions = Lists.partition(list, IntMath.divide(list.size(), partitions, RoundingMode.DOWN)); // Create output final ImmutableList.Builder<ImmutableList<E>> ret = ImmutableList.builder(); // If we evenly partitioned, just do the type conversion and return. The type conversion is // performed because Lists#partition returns list views. if (prelimPartitions.size() == partitions) { for (List<E> partition : prelimPartitions) { ret.add(ImmutableList.copyOf(partition)); } } else { // Otherwise, distribute the extras // Make a builder for each output partition and the extras. The extras are anything in the // preliminary partitions after the number of partitions we actually want. Thus, the // first index of extras is the same as the number of partitions. final ImmutableList.Builder<ImmutableList.Builder<E>> builderOfBuilders = ImmutableList.builder(); final ImmutableList.Builder<E> extrasBuilder = ImmutableList.builder(); for (int i = 0; i < prelimPartitions.size(); i++) { if (i < partitions) { builderOfBuilders.add(ImmutableList.<E>builder().addAll(prelimPartitions.get(i))); } else { extrasBuilder.addAll(prelimPartitions.get(i)); } } final ImmutableList<ImmutableList.Builder<E>> builders = builderOfBuilders.build(); final ImmutableList<E> extras = extrasBuilder.build(); // Distribute the extra elements. We cannot overrun the bounds of builders because the number // of extras is always at least one less than the number of builders (otherwise, we would've // just had larger partitions). int partitionIdx = 0; for (E item : extras) { builders.get(partitionIdx++).add(item); } // Fill in output for (ImmutableList.Builder<E> builder : builders) { ret.add(builder.build()); } } final ImmutableList<ImmutableList<E>> finalPartitions = ret.build(); checkState(finalPartitions.size() == partitions, "Partitioning failed: number of output partitions (" + finalPartitions.size() + ") does not match requested number (" + partitions + ")"); return finalPartitions; }
class class_name[name] begin[{] method[partitionAlmostEvenly, return_type[type[ImmutableList]], modifier[public static], parameter[list, partitions]] begin[{] call[.checkNotNull, parameter[member[.list]]] call[.checkArgument, parameter[binary_operation[member[.partitions], >, literal[0]], literal["Number of partitions must be positive"]]] call[.checkArgument, parameter[binary_operation[member[.partitions], <=, call[list.size, parameter[]]], literal["Cannot request more partitions than there are list items"]]] local_variable[type[List], prelimPartitions] local_variable[type[ImmutableList], ret] if[binary_operation[call[prelimPartitions.size, parameter[]], ==, member[.partitions]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=partition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyOf, postfix_operators=[], prefix_operators=[], qualifier=ImmutableList, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=prelimPartitions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=partition)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=[], name=List, sub_type=None))), label=None) else begin[{] local_variable[type[ImmutableList], builderOfBuilders] local_variable[type[ImmutableList], extrasBuilder] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=partitions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=prelimPartitions, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=extrasBuilder, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=ImmutableList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=prelimPartitions, selectors=[], type_arguments=None)], member=addAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))])], member=add, postfix_operators=[], prefix_operators=[], qualifier=builderOfBuilders, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=prelimPartitions, 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) local_variable[type[ImmutableList], builders] local_variable[type[ImmutableList], extras] local_variable[type[int], partitionIdx] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=partitionIdx, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=builders, selectors=[MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=extras, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=build, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=builders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=builder)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ImmutableList, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=None, name=Builder, sub_type=None)))), label=None) end[}] local_variable[type[ImmutableList], finalPartitions] call[.checkState, parameter[binary_operation[call[finalPartitions.size, parameter[]], ==, member[.partitions]], binary_operation[binary_operation[binary_operation[binary_operation[literal["Partitioning failed: number of output partitions ("], +, call[finalPartitions.size, parameter[]]], +, literal[") does not match requested number ("]], +, member[.partitions]], +, literal[")"]]]] return[member[.finalPartitions]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[ImmutableList] operator[<] identifier[ImmutableList] operator[<] identifier[E] operator[>] operator[>] identifier[partitionAlmostEvenly] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[E] operator[>] identifier[list] , Keyword[final] Keyword[int] identifier[partitions] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[list] operator[SEP] operator[SEP] identifier[checkArgument] operator[SEP] identifier[partitions] operator[>] Other[0] , literal[String] operator[SEP] operator[SEP] identifier[checkArgument] operator[SEP] identifier[partitions] operator[<=] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[List] operator[<] identifier[E] operator[>] operator[>] identifier[prelimPartitions] operator[=] identifier[Lists] operator[SEP] identifier[partition] operator[SEP] identifier[list] , identifier[IntMath] operator[SEP] identifier[divide] operator[SEP] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[partitions] , identifier[RoundingMode] operator[SEP] identifier[DOWN] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ImmutableList] operator[SEP] identifier[Builder] operator[<] identifier[ImmutableList] operator[<] identifier[E] operator[>] operator[>] identifier[ret] operator[=] identifier[ImmutableList] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[prelimPartitions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] identifier[partitions] operator[SEP] { Keyword[for] operator[SEP] identifier[List] operator[<] identifier[E] operator[>] identifier[partition] operator[:] identifier[prelimPartitions] operator[SEP] { identifier[ret] operator[SEP] identifier[add] operator[SEP] identifier[ImmutableList] operator[SEP] identifier[copyOf] operator[SEP] identifier[partition] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[final] identifier[ImmutableList] operator[SEP] identifier[Builder] operator[<] identifier[ImmutableList] operator[SEP] identifier[Builder] operator[<] identifier[E] operator[>] operator[>] identifier[builderOfBuilders] operator[=] identifier[ImmutableList] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ImmutableList] operator[SEP] identifier[Builder] operator[<] identifier[E] operator[>] identifier[extrasBuilder] operator[=] identifier[ImmutableList] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[prelimPartitions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[<] identifier[partitions] operator[SEP] { identifier[builderOfBuilders] operator[SEP] identifier[add] operator[SEP] identifier[ImmutableList] operator[SEP] operator[<] identifier[E] operator[>] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[prelimPartitions] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[extrasBuilder] operator[SEP] identifier[addAll] operator[SEP] identifier[prelimPartitions] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } Keyword[final] identifier[ImmutableList] operator[<] identifier[ImmutableList] operator[SEP] identifier[Builder] operator[<] identifier[E] operator[>] operator[>] identifier[builders] operator[=] identifier[builderOfBuilders] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ImmutableList] operator[<] identifier[E] operator[>] identifier[extras] operator[=] identifier[extrasBuilder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[partitionIdx] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[E] identifier[item] operator[:] identifier[extras] operator[SEP] { identifier[builders] operator[SEP] identifier[get] operator[SEP] identifier[partitionIdx] operator[++] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[item] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[ImmutableList] operator[SEP] identifier[Builder] operator[<] identifier[E] operator[>] identifier[builder] operator[:] identifier[builders] operator[SEP] { identifier[ret] operator[SEP] identifier[add] operator[SEP] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[final] identifier[ImmutableList] operator[<] identifier[ImmutableList] operator[<] identifier[E] operator[>] operator[>] identifier[finalPartitions] operator[=] identifier[ret] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[checkState] operator[SEP] identifier[finalPartitions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] identifier[partitions] , literal[String] operator[+] identifier[finalPartitions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[partitions] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[finalPartitions] operator[SEP] }
final public String explainScore(String s, String t) { return explainScore(prepare(s),prepare(t)); }
class class_name[name] begin[{] method[explainScore, return_type[type[String]], modifier[final public], parameter[s, t]] begin[{] return[call[.explainScore, parameter[call[.prepare, parameter[member[.s]]], call[.prepare, parameter[member[.t]]]]]] end[}] END[}]
Keyword[final] Keyword[public] identifier[String] identifier[explainScore] operator[SEP] identifier[String] identifier[s] , identifier[String] identifier[t] operator[SEP] { Keyword[return] identifier[explainScore] operator[SEP] identifier[prepare] operator[SEP] identifier[s] operator[SEP] , identifier[prepare] operator[SEP] identifier[t] operator[SEP] operator[SEP] operator[SEP] }
public void setFaceMatches(java.util.Collection<CompareFacesMatch> faceMatches) { if (faceMatches == null) { this.faceMatches = null; return; } this.faceMatches = new java.util.ArrayList<CompareFacesMatch>(faceMatches); }
class class_name[name] begin[{] method[setFaceMatches, return_type[void], modifier[public], parameter[faceMatches]] begin[{] if[binary_operation[member[.faceMatches], ==, literal[null]]] begin[{] assign[THIS[member[None.faceMatches]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.faceMatches]], ClassCreator(arguments=[MemberReference(member=faceMatches, 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=CompareFacesMatch, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setFaceMatches] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[CompareFacesMatch] operator[>] identifier[faceMatches] operator[SEP] { Keyword[if] operator[SEP] identifier[faceMatches] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[faceMatches] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[faceMatches] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[CompareFacesMatch] operator[>] operator[SEP] identifier[faceMatches] operator[SEP] operator[SEP] }
public Response<Double> incrByFloat(final String key, final double increment) { writeAsync(key, () -> shadowPipeline.incrByFloat(key, increment)); return DynoDualWriterPipeline.super.incrByFloat(key,increment); }
class class_name[name] begin[{] method[incrByFloat, return_type[type[Response]], modifier[public], parameter[key, increment]] begin[{] call[.writeAsync, parameter[member[.key], LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=increment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=incrByFloat, postfix_operators=[], prefix_operators=[], qualifier=shadowPipeline, selectors=[], type_arguments=None), parameters=[])]] return[member[.DynoDualWriterPipeline]] end[}] END[}]
Keyword[public] identifier[Response] operator[<] identifier[Double] operator[>] identifier[incrByFloat] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] Keyword[double] identifier[increment] operator[SEP] { identifier[writeAsync] operator[SEP] identifier[key] , operator[SEP] operator[SEP] operator[->] identifier[shadowPipeline] operator[SEP] identifier[incrByFloat] operator[SEP] identifier[key] , identifier[increment] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[DynoDualWriterPipeline] operator[SEP] Keyword[super] operator[SEP] identifier[incrByFloat] operator[SEP] identifier[key] , identifier[increment] operator[SEP] operator[SEP] }
public MessageToSend prepareMessageToSend() { originalMessage.getParts().clear(); originalMessage.getParts().addAll(publicParts); return originalMessage; }
class class_name[name] begin[{] method[prepareMessageToSend, return_type[type[MessageToSend]], modifier[public], parameter[]] begin[{] call[originalMessage.getParts, parameter[]] call[originalMessage.getParts, parameter[]] return[member[.originalMessage]] end[}] END[}]
Keyword[public] identifier[MessageToSend] identifier[prepareMessageToSend] operator[SEP] operator[SEP] { identifier[originalMessage] operator[SEP] identifier[getParts] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[originalMessage] operator[SEP] identifier[getParts] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[publicParts] operator[SEP] operator[SEP] Keyword[return] identifier[originalMessage] operator[SEP] }
@Override public MediaFeed searchMedia(double latitude, double longitude, int distance) throws InstagramException { Map<String, String> params = new HashMap<String, String>(); params.put(QueryParam.LATITUDE, Double.toString(latitude)); params.put(QueryParam.LONGITUDE, Double.toString(longitude)); params.put(QueryParam.DISTANCE, String.valueOf(distance)); return createInstagramObject(Verbs.GET, MediaFeed.class, Methods.MEDIA_SEARCH, params); }
class class_name[name] begin[{] method[searchMedia, return_type[type[MediaFeed]], modifier[public], parameter[latitude, longitude, distance]] begin[{] local_variable[type[Map], params] call[params.put, parameter[member[QueryParam.LATITUDE], call[Double.toString, parameter[member[.latitude]]]]] call[params.put, parameter[member[QueryParam.LONGITUDE], call[Double.toString, parameter[member[.longitude]]]]] call[params.put, parameter[member[QueryParam.DISTANCE], call[String.valueOf, parameter[member[.distance]]]]] return[call[.createInstagramObject, parameter[member[Verbs.GET], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MediaFeed, sub_type=None)), member[Methods.MEDIA_SEARCH], member[.params]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[MediaFeed] identifier[searchMedia] operator[SEP] Keyword[double] identifier[latitude] , Keyword[double] identifier[longitude] , Keyword[int] identifier[distance] operator[SEP] Keyword[throws] identifier[InstagramException] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] identifier[QueryParam] operator[SEP] identifier[LATITUDE] , identifier[Double] operator[SEP] identifier[toString] operator[SEP] identifier[latitude] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] identifier[QueryParam] operator[SEP] identifier[LONGITUDE] , identifier[Double] operator[SEP] identifier[toString] operator[SEP] identifier[longitude] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] identifier[QueryParam] operator[SEP] identifier[DISTANCE] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[distance] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[createInstagramObject] operator[SEP] identifier[Verbs] operator[SEP] identifier[GET] , identifier[MediaFeed] operator[SEP] Keyword[class] , identifier[Methods] operator[SEP] identifier[MEDIA_SEARCH] , identifier[params] operator[SEP] operator[SEP] }
private Violation isFieldImmutable( Optional<Tree> tree, ImmutableSet<String> immutableTyParams, ClassSymbol classSym, ClassType classType, VarSymbol var, ViolationReporter reporter) { if (bugChecker.isSuppressed(var)) { return Violation.absent(); } if (!var.getModifiers().contains(Modifier.FINAL) && !ASTHelpers.hasAnnotation(var, LazyInit.class, state)) { Violation info = Violation.of( String.format( "'%s' has non-final field '%s'", threadSafety.getPrettyName(classSym), var.getSimpleName())); if (tree.isPresent()) { // If we have a tree to attach diagnostics to, report the error immediately instead of // accumulating the path to the error from the top-level class being checked state.reportMatch( reporter.report( tree.get(), info, SuggestedFixes.addModifiers(tree.get(), state, Modifier.FINAL))); return Violation.absent(); } return info; } Type varType = state.getTypes().memberType(classType, var); Violation info = threadSafety.isThreadSafeType( /* allowContainerTypeParameters= */ true, immutableTyParams, varType); if (info.isPresent()) { info = info.plus( String.format( "'%s' has field '%s' of type '%s'", threadSafety.getPrettyName(classSym), var.getSimpleName(), varType)); if (tree.isPresent()) { // If we have a tree to attach diagnostics to, report the error immediately instead of // accumulating the path to the error from the top-level class being checked state.reportMatch(reporter.report(tree.get(), info, Optional.empty())); return Violation.absent(); } return info; } return Violation.absent(); }
class class_name[name] begin[{] method[isFieldImmutable, return_type[type[Violation]], modifier[private], parameter[tree, immutableTyParams, classSym, classType, var, reporter]] begin[{] if[call[bugChecker.isSuppressed, parameter[member[.var]]]] begin[{] return[call[Violation.absent, parameter[]]] else begin[{] None end[}] if[binary_operation[call[var.getModifiers, parameter[]], &&, call[ASTHelpers.hasAnnotation, parameter[member[.var], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LazyInit, sub_type=None)), member[.state]]]]] begin[{] local_variable[type[Violation], info] if[call[tree.isPresent, parameter[]]] begin[{] call[state.reportMatch, parameter[call[reporter.report, parameter[call[tree.get, parameter[]], member[.info], call[SuggestedFixes.addModifiers, parameter[call[tree.get, parameter[]], member[.state], member[Modifier.FINAL]]]]]]] return[call[Violation.absent, parameter[]]] else begin[{] None end[}] return[member[.info]] else begin[{] None end[}] local_variable[type[Type], varType] local_variable[type[Violation], info] if[call[info.isPresent, parameter[]]] begin[{] assign[member[.info], call[info.plus, parameter[call[String.format, parameter[literal["'%s' has field '%s' of type '%s'"], call[threadSafety.getPrettyName, parameter[member[.classSym]]], call[var.getSimpleName, parameter[]], member[.varType]]]]]] if[call[tree.isPresent, parameter[]]] begin[{] call[state.reportMatch, parameter[call[reporter.report, parameter[call[tree.get, parameter[]], member[.info], call[Optional.empty, parameter[]]]]]] return[call[Violation.absent, parameter[]]] else begin[{] None end[}] return[member[.info]] else begin[{] None end[}] return[call[Violation.absent, parameter[]]] end[}] END[}]
Keyword[private] identifier[Violation] identifier[isFieldImmutable] operator[SEP] identifier[Optional] operator[<] identifier[Tree] operator[>] identifier[tree] , identifier[ImmutableSet] operator[<] identifier[String] operator[>] identifier[immutableTyParams] , identifier[ClassSymbol] identifier[classSym] , identifier[ClassType] identifier[classType] , identifier[VarSymbol] identifier[var] , identifier[ViolationReporter] identifier[reporter] operator[SEP] { Keyword[if] operator[SEP] identifier[bugChecker] operator[SEP] identifier[isSuppressed] operator[SEP] identifier[var] operator[SEP] operator[SEP] { Keyword[return] identifier[Violation] operator[SEP] identifier[absent] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[var] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[Modifier] operator[SEP] identifier[FINAL] operator[SEP] operator[&&] operator[!] identifier[ASTHelpers] operator[SEP] identifier[hasAnnotation] operator[SEP] identifier[var] , identifier[LazyInit] operator[SEP] Keyword[class] , identifier[state] operator[SEP] operator[SEP] { identifier[Violation] identifier[info] operator[=] identifier[Violation] operator[SEP] identifier[of] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[threadSafety] operator[SEP] identifier[getPrettyName] operator[SEP] identifier[classSym] operator[SEP] , identifier[var] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tree] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { identifier[state] operator[SEP] identifier[reportMatch] operator[SEP] identifier[reporter] operator[SEP] identifier[report] operator[SEP] identifier[tree] operator[SEP] identifier[get] operator[SEP] operator[SEP] , identifier[info] , identifier[SuggestedFixes] operator[SEP] identifier[addModifiers] operator[SEP] identifier[tree] operator[SEP] identifier[get] operator[SEP] operator[SEP] , identifier[state] , identifier[Modifier] operator[SEP] identifier[FINAL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Violation] operator[SEP] identifier[absent] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[info] operator[SEP] } identifier[Type] identifier[varType] operator[=] identifier[state] operator[SEP] identifier[getTypes] operator[SEP] operator[SEP] operator[SEP] identifier[memberType] operator[SEP] identifier[classType] , identifier[var] operator[SEP] operator[SEP] identifier[Violation] identifier[info] operator[=] identifier[threadSafety] operator[SEP] identifier[isThreadSafeType] operator[SEP] literal[boolean] , identifier[immutableTyParams] , identifier[varType] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[info] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { identifier[info] operator[=] identifier[info] operator[SEP] identifier[plus] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[threadSafety] operator[SEP] identifier[getPrettyName] operator[SEP] identifier[classSym] operator[SEP] , identifier[var] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] , identifier[varType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tree] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { identifier[state] operator[SEP] identifier[reportMatch] operator[SEP] identifier[reporter] operator[SEP] identifier[report] operator[SEP] identifier[tree] operator[SEP] identifier[get] operator[SEP] operator[SEP] , identifier[info] , identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Violation] operator[SEP] identifier[absent] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[info] operator[SEP] } Keyword[return] identifier[Violation] operator[SEP] identifier[absent] operator[SEP] operator[SEP] operator[SEP] }
public void setConnectionLostTimeout( int connectionLostTimeout ) { synchronized (syncConnectionLost) { this.connectionLostTimeout = TimeUnit.SECONDS.toNanos(connectionLostTimeout); if (this.connectionLostTimeout <= 0) { log.trace("Connection lost timer stopped"); cancelConnectionLostTimer(); return; } if (this.websocketRunning) { log.trace("Connection lost timer restarted"); //Reset all the pings try { ArrayList<WebSocket> connections = new ArrayList<WebSocket>(getConnections()); WebSocketImpl webSocketImpl; for (WebSocket conn : connections) { if (conn instanceof WebSocketImpl) { webSocketImpl = (WebSocketImpl) conn; webSocketImpl.updateLastPong(); } } } catch (Exception e) { log.error("Exception during connection lost restart", e); } restartConnectionLostTimer(); } } }
class class_name[name] begin[{] method[setConnectionLostTimeout, return_type[void], modifier[public], parameter[connectionLostTimeout]] begin[{] SYNCHRONIZED[member[.syncConnectionLost]] BEGIN[{] assign[THIS[member[None.connectionLostTimeout]], call[TimeUnit.SECONDS.toNanos, parameter[member[.connectionLostTimeout]]]] if[binary_operation[THIS[member[None.connectionLostTimeout]], <=, literal[0]]] begin[{] call[log.trace, parameter[literal["Connection lost timer stopped"]]] call[.cancelConnectionLostTimer, parameter[]] return[None] else begin[{] None end[}] if[THIS[member[None.websocketRunning]]] begin[{] call[log.trace, parameter[literal["Connection lost timer restarted"]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getConnections, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=WebSocket, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=connections)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=WebSocket, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=webSocketImpl)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WebSocketImpl, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=WebSocketImpl, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=webSocketImpl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=WebSocketImpl, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=updateLastPong, postfix_operators=[], prefix_operators=[], qualifier=webSocketImpl, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=connections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=conn)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WebSocket, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception during connection lost restart"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) call[.restartConnectionLostTimer, parameter[]] else begin[{] None end[}] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setConnectionLostTimeout] operator[SEP] Keyword[int] identifier[connectionLostTimeout] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[syncConnectionLost] operator[SEP] { Keyword[this] operator[SEP] identifier[connectionLostTimeout] operator[=] identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SEP] identifier[toNanos] operator[SEP] identifier[connectionLostTimeout] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[connectionLostTimeout] operator[<=] Other[0] operator[SEP] { identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cancelConnectionLostTimer] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[websocketRunning] operator[SEP] { identifier[log] operator[SEP] identifier[trace] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[ArrayList] operator[<] identifier[WebSocket] operator[>] identifier[connections] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[WebSocket] operator[>] operator[SEP] identifier[getConnections] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[WebSocketImpl] identifier[webSocketImpl] operator[SEP] Keyword[for] operator[SEP] identifier[WebSocket] identifier[conn] operator[:] identifier[connections] operator[SEP] { Keyword[if] operator[SEP] identifier[conn] Keyword[instanceof] identifier[WebSocketImpl] operator[SEP] { identifier[webSocketImpl] operator[=] operator[SEP] identifier[WebSocketImpl] operator[SEP] identifier[conn] operator[SEP] identifier[webSocketImpl] operator[SEP] identifier[updateLastPong] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } identifier[restartConnectionLostTimer] operator[SEP] operator[SEP] operator[SEP] } } }
public void verify(PublicKey key) throws CRLException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, SignatureException { verify(key, ""); }
class class_name[name] begin[{] method[verify, return_type[void], modifier[public], parameter[key]] begin[{] call[.verify, parameter[member[.key], literal[""]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[verify] operator[SEP] identifier[PublicKey] identifier[key] operator[SEP] Keyword[throws] identifier[CRLException] , identifier[NoSuchAlgorithmException] , identifier[InvalidKeyException] , identifier[NoSuchProviderException] , identifier[SignatureException] { identifier[verify] operator[SEP] identifier[key] , literal[String] operator[SEP] operator[SEP] }
public AzkabanClientStatus deleteProject(String projectName) throws AzkabanClientException { AzkabanMultiCallables.DeleteProjectCallable callable = AzkabanMultiCallables.DeleteProjectCallable.builder() .client(this) .projectName(projectName) .build(); return runWithRetry(callable, AzkabanClientStatus.class); }
class class_name[name] begin[{] method[deleteProject, return_type[type[AzkabanClientStatus]], modifier[public], parameter[projectName]] begin[{] local_variable[type[AzkabanMultiCallables], callable] return[call[.runWithRetry, parameter[member[.callable], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AzkabanClientStatus, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[AzkabanClientStatus] identifier[deleteProject] operator[SEP] identifier[String] identifier[projectName] operator[SEP] Keyword[throws] identifier[AzkabanClientException] { identifier[AzkabanMultiCallables] operator[SEP] identifier[DeleteProjectCallable] identifier[callable] operator[=] identifier[AzkabanMultiCallables] operator[SEP] identifier[DeleteProjectCallable] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[client] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[projectName] operator[SEP] identifier[projectName] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[runWithRetry] operator[SEP] identifier[callable] , identifier[AzkabanClientStatus] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public Iterable<Vertex> getVertices(final String iKey, Object iValue) { makeActive(); if (iKey.equals("@class")) return getVerticesOfClass(iValue.toString()); int pos = iKey.indexOf('.'); final String className = pos > -1 ? iKey.substring(0, pos) : OrientVertexType.CLASS_NAME; final String key = pos > -1 ? iKey.substring(pos + 1) : iKey; OClass clazz = getDatabase().getMetadata().getImmutableSchemaSnapshot().getClass(className); if (clazz == null) { throw new IllegalArgumentException("OClass not found in the schema: " + className); } OIndex<?> idx = null; final Collection<? extends OIndex<?>> indexes = clazz.getIndexes(); for (OIndex<?> index : indexes) { OIndexDefinition indexDef = index.getDefinition(); if ("lucene".equalsIgnoreCase(index.getAlgorithm())) { continue; } List<String> indexedFields = indexDef.getFields(); if (indexedFields != null && indexedFields.size() > 0 && indexedFields.get(0).equals(key)) { idx = index; break; } } if (idx == null) { idx = getDatabase().getMetadata().getIndexManager().getIndex(iKey); } if (idx != null) { iValue = convertKey(idx, iValue); Object indexValue = idx.get(iValue); if (indexValue != null && !(indexValue instanceof Iterable<?>)) indexValue = Arrays.asList(indexValue); return new OrientElementIterable<Vertex>(this, (Iterable<?>) indexValue); } else { // NO INDEX: EXECUTE A QUERY OrientGraphQuery query = (OrientGraphQuery) query(); query.labels(clazz.getName()); return query.has(key, iValue).vertices(); } }
class class_name[name] begin[{] method[getVertices, return_type[type[Iterable]], modifier[public], parameter[iKey, iValue]] begin[{] call[.makeActive, parameter[]] if[call[iKey.equals, parameter[literal["@class"]]]] begin[{] return[call[.getVerticesOfClass, parameter[call[iValue.toString, parameter[]]]]] else begin[{] None end[}] local_variable[type[int], pos] local_variable[type[String], className] local_variable[type[String], key] local_variable[type[OClass], clazz] if[binary_operation[member[.clazz], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="OClass not found in the schema: "), operandr=MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[OIndex], idx] local_variable[type[Collection], indexes] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDefinition, postfix_operators=[], prefix_operators=[], qualifier=index, selectors=[], type_arguments=None), name=indexDef)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=OIndexDefinition, sub_type=None)), IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAlgorithm, postfix_operators=[], prefix_operators=[], qualifier=index, selectors=[], type_arguments=None)], member=equalsIgnoreCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="lucene"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getFields, postfix_operators=[], prefix_operators=[], qualifier=indexDef, selectors=[], type_arguments=None), name=indexedFields)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=indexedFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=indexedFields, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=indexedFields, selectors=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=indexes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=index)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=OIndex, sub_type=None))), label=None) if[binary_operation[member[.idx], ==, literal[null]]] begin[{] assign[member[.idx], call[.getDatabase, parameter[]]] else begin[{] None end[}] if[binary_operation[member[.idx], !=, literal[null]]] begin[{] assign[member[.iValue], call[.convertKey, parameter[member[.idx], member[.iValue]]]] local_variable[type[Object], indexValue] if[binary_operation[binary_operation[member[.indexValue], !=, literal[null]], &&, binary_operation[member[.indexValue], instanceof, type[Iterable]]]] begin[{] assign[member[.indexValue], call[Arrays.asList, parameter[member[.indexValue]]]] else begin[{] None end[}] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Cast(expression=MemberReference(member=indexValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Iterable, sub_type=None))], 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=Vertex, sub_type=None))], dimensions=None, name=OrientElementIterable, sub_type=None))] else begin[{] local_variable[type[OrientGraphQuery], query] call[query.labels, parameter[call[clazz.getName, parameter[]]]] return[call[query.has, parameter[member[.key], member[.iValue]]]] end[}] end[}] END[}]
Keyword[public] identifier[Iterable] operator[<] identifier[Vertex] operator[>] identifier[getVertices] operator[SEP] Keyword[final] identifier[String] identifier[iKey] , identifier[Object] identifier[iValue] operator[SEP] { identifier[makeActive] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[iKey] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[getVerticesOfClass] operator[SEP] identifier[iValue] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[pos] operator[=] identifier[iKey] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[className] operator[=] identifier[pos] operator[>] operator[-] Other[1] operator[?] identifier[iKey] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[pos] operator[SEP] operator[:] identifier[OrientVertexType] operator[SEP] identifier[CLASS_NAME] operator[SEP] Keyword[final] identifier[String] identifier[key] operator[=] identifier[pos] operator[>] operator[-] Other[1] operator[?] identifier[iKey] operator[SEP] identifier[substring] operator[SEP] identifier[pos] operator[+] Other[1] operator[SEP] operator[:] identifier[iKey] operator[SEP] identifier[OClass] identifier[clazz] operator[=] identifier[getDatabase] operator[SEP] operator[SEP] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getImmutableSchemaSnapshot] operator[SEP] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] identifier[className] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[clazz] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[className] operator[SEP] operator[SEP] } identifier[OIndex] operator[<] operator[?] operator[>] identifier[idx] operator[=] Other[null] operator[SEP] Keyword[final] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[OIndex] operator[<] operator[?] operator[>] operator[>] identifier[indexes] operator[=] identifier[clazz] operator[SEP] identifier[getIndexes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[OIndex] operator[<] operator[?] operator[>] identifier[index] operator[:] identifier[indexes] operator[SEP] { identifier[OIndexDefinition] identifier[indexDef] operator[=] identifier[index] operator[SEP] identifier[getDefinition] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[index] operator[SEP] identifier[getAlgorithm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[List] operator[<] identifier[String] operator[>] identifier[indexedFields] operator[=] identifier[indexDef] operator[SEP] identifier[getFields] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[indexedFields] operator[!=] Other[null] operator[&&] identifier[indexedFields] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[&&] identifier[indexedFields] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[key] operator[SEP] operator[SEP] { identifier[idx] operator[=] identifier[index] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[idx] operator[==] Other[null] operator[SEP] { identifier[idx] operator[=] identifier[getDatabase] operator[SEP] operator[SEP] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getIndexManager] operator[SEP] operator[SEP] operator[SEP] identifier[getIndex] operator[SEP] identifier[iKey] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[idx] operator[!=] Other[null] operator[SEP] { identifier[iValue] operator[=] identifier[convertKey] operator[SEP] identifier[idx] , identifier[iValue] operator[SEP] operator[SEP] identifier[Object] identifier[indexValue] operator[=] identifier[idx] operator[SEP] identifier[get] operator[SEP] identifier[iValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[indexValue] operator[!=] Other[null] operator[&&] operator[!] operator[SEP] identifier[indexValue] Keyword[instanceof] identifier[Iterable] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[indexValue] operator[=] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[indexValue] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[OrientElementIterable] operator[<] identifier[Vertex] operator[>] operator[SEP] Keyword[this] , operator[SEP] identifier[Iterable] operator[<] operator[?] operator[>] operator[SEP] identifier[indexValue] operator[SEP] operator[SEP] } Keyword[else] { identifier[OrientGraphQuery] identifier[query] operator[=] operator[SEP] identifier[OrientGraphQuery] operator[SEP] identifier[query] operator[SEP] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[labels] operator[SEP] identifier[clazz] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[query] operator[SEP] identifier[has] operator[SEP] identifier[key] , identifier[iValue] operator[SEP] operator[SEP] identifier[vertices] operator[SEP] operator[SEP] operator[SEP] } }
private static void processEmoticonsToRegex() { List<String> emoticons=new ArrayList<String>(); for(Emoji e: emojiData) { if(e.getEmoticons()!=null) { emoticons.addAll(e.getEmoticons()); } } //List of emotions should be pre-processed to handle instances of subtrings like :-) :- //Without this pre-processing, emoticons in a string won't be processed properly for(int i=0;i<emoticons.size();i++) { for(int j=i+1;j<emoticons.size();j++) { String o1=emoticons.get(i); String o2=emoticons.get(j); if(o2.contains(o1)) { String temp = o2; emoticons.remove(j); emoticons.add(i, temp); } } } StringBuilder sb=new StringBuilder(); for(String emoticon: emoticons) { if(sb.length() !=0) { sb.append("|"); } sb.append(Pattern.quote(emoticon)); } emoticonRegexPattern = Pattern.compile(sb.toString()); }
class class_name[name] begin[{] method[processEmoticonsToRegex, return_type[void], modifier[private static], parameter[]] begin[{] local_variable[type[List], emoticons] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEmoticons, postfix_operators=[], prefix_operators=[], qualifier=e, 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=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEmoticons, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=emoticons, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=emojiData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Emoji, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=emoticons, selectors=[], type_arguments=None), name=o1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=emoticons, selectors=[], type_arguments=None), name=o2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=o2, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=o2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=temp)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=emoticons, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=emoticons, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=emoticons, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=emoticons, 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) local_variable[type[StringBuilder], sb] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), 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=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="|")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=emoticon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=quote, postfix_operators=[], prefix_operators=[], qualifier=Pattern, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=emoticons, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=emoticon)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) assign[member[.emoticonRegexPattern], call[Pattern.compile, parameter[call[sb.toString, parameter[]]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[processEmoticonsToRegex] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[emoticons] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Emoji] identifier[e] operator[:] identifier[emojiData] operator[SEP] { Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getEmoticons] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[emoticons] operator[SEP] identifier[addAll] operator[SEP] identifier[e] operator[SEP] identifier[getEmoticons] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[emoticons] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[i] operator[+] Other[1] operator[SEP] identifier[j] operator[<] identifier[emoticons] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[String] identifier[o1] operator[=] identifier[emoticons] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[String] identifier[o2] operator[=] identifier[emoticons] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[o2] operator[SEP] identifier[contains] operator[SEP] identifier[o1] operator[SEP] operator[SEP] { identifier[String] identifier[temp] operator[=] identifier[o2] operator[SEP] identifier[emoticons] operator[SEP] identifier[remove] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[emoticons] operator[SEP] identifier[add] operator[SEP] identifier[i] , identifier[temp] operator[SEP] operator[SEP] } } } identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[emoticon] operator[:] identifier[emoticons] operator[SEP] { Keyword[if] operator[SEP] identifier[sb] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[Pattern] operator[SEP] identifier[quote] operator[SEP] identifier[emoticon] operator[SEP] operator[SEP] operator[SEP] } identifier[emoticonRegexPattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected boolean tomcatIsRunning() { CloseableHttpClient client= HttpClients.createDefault(); CloseableHttpResponse response = null; try { HttpGet httpget = new HttpGet("http://localhost:" + getPort() + "/alfresco"); response = client.execute(httpget); getLog().info("Tomcat is running on port "+ getPort()); return true; } catch (Exception ex) { getLog().info("Tomcat is not running on port " + getPort() ); return false; } }
class class_name[name] begin[{] method[tomcatIsRunning, return_type[type[boolean]], modifier[protected], parameter[]] begin[{] local_variable[type[CloseableHttpClient], client] local_variable[type[CloseableHttpResponse], response] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="http://localhost:"), operandr=MethodInvocation(arguments=[], member=getPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/alfresco"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HttpGet, sub_type=None)), name=httpget)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HttpGet, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=httpget, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execute, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Tomcat is running on port "), operandr=MethodInvocation(arguments=[], member=getPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], member=info, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Tomcat is not running on port "), operandr=MethodInvocation(arguments=[], member=getPort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+)], member=info, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[tomcatIsRunning] operator[SEP] operator[SEP] { identifier[CloseableHttpClient] identifier[client] operator[=] identifier[HttpClients] operator[SEP] identifier[createDefault] operator[SEP] operator[SEP] operator[SEP] identifier[CloseableHttpResponse] identifier[response] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[HttpGet] identifier[httpget] operator[=] Keyword[new] identifier[HttpGet] operator[SEP] literal[String] operator[+] identifier[getPort] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[response] operator[=] identifier[client] operator[SEP] identifier[execute] operator[SEP] identifier[httpget] operator[SEP] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } }
protected SerializationPolicy getSerializationPolicy(CmsObject cms, String moduleBaseURL, String strongName) { if (m_serializationPolicyPath == null) { m_serializationPolicyPath = getSerializationPolicyPath(moduleBaseURL, strongName); } return getSerializationPolicy(cms); }
class class_name[name] begin[{] method[getSerializationPolicy, return_type[type[SerializationPolicy]], modifier[protected], parameter[cms, moduleBaseURL, strongName]] begin[{] if[binary_operation[member[.m_serializationPolicyPath], ==, literal[null]]] begin[{] assign[member[.m_serializationPolicyPath], call[.getSerializationPolicyPath, parameter[member[.moduleBaseURL], member[.strongName]]]] else begin[{] None end[}] return[call[.getSerializationPolicy, parameter[member[.cms]]]] end[}] END[}]
Keyword[protected] identifier[SerializationPolicy] identifier[getSerializationPolicy] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[String] identifier[moduleBaseURL] , identifier[String] identifier[strongName] operator[SEP] { Keyword[if] operator[SEP] identifier[m_serializationPolicyPath] operator[==] Other[null] operator[SEP] { identifier[m_serializationPolicyPath] operator[=] identifier[getSerializationPolicyPath] operator[SEP] identifier[moduleBaseURL] , identifier[strongName] operator[SEP] operator[SEP] } Keyword[return] identifier[getSerializationPolicy] operator[SEP] identifier[cms] operator[SEP] operator[SEP] }
private void notifyHandlers(Room sfsRoom, User sfsUser) { ApiRoom apiRoom = AgentUtil.getRoomAgent(sfsRoom); ApiUser apiUser = AgentUtil.getUserAgent(sfsUser); for(RoomHandlerClass handler : handlers) { Object userAgent = checkUserAgent(handler, apiUser); if(!checkHandler(handler, apiRoom, userAgent)) continue; Object instance = handler.newInstance(); callHandleMethod(handler.getHandleMethod(), instance, apiRoom, userAgent); } }
class class_name[name] begin[{] method[notifyHandlers, return_type[void], modifier[private], parameter[sfsRoom, sfsUser]] begin[{] local_variable[type[ApiRoom], apiRoom] local_variable[type[ApiUser], apiUser] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=apiUser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkUserAgent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=userAgent)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=apiRoom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=userAgent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkHandler, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), name=instance)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHandleMethod, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=apiRoom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=userAgent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=callHandleMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=handlers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=handler)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RoomHandlerClass, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[notifyHandlers] operator[SEP] identifier[Room] identifier[sfsRoom] , identifier[User] identifier[sfsUser] operator[SEP] { identifier[ApiRoom] identifier[apiRoom] operator[=] identifier[AgentUtil] operator[SEP] identifier[getRoomAgent] operator[SEP] identifier[sfsRoom] operator[SEP] operator[SEP] identifier[ApiUser] identifier[apiUser] operator[=] identifier[AgentUtil] operator[SEP] identifier[getUserAgent] operator[SEP] identifier[sfsUser] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[RoomHandlerClass] identifier[handler] operator[:] identifier[handlers] operator[SEP] { identifier[Object] identifier[userAgent] operator[=] identifier[checkUserAgent] operator[SEP] identifier[handler] , identifier[apiUser] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[checkHandler] operator[SEP] identifier[handler] , identifier[apiRoom] , identifier[userAgent] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] identifier[Object] identifier[instance] operator[=] identifier[handler] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[callHandleMethod] operator[SEP] identifier[handler] operator[SEP] identifier[getHandleMethod] operator[SEP] operator[SEP] , identifier[instance] , identifier[apiRoom] , identifier[userAgent] operator[SEP] operator[SEP] } }
public void fireQueryChanged(String newgroup, String newquery, String newid) { for (SavedQueriesPanelListener listener : listeners) { listener.selectedQueryChanged(newgroup, newquery, newid); } }
class class_name[name] begin[{] method[fireQueryChanged, return_type[void], modifier[public], parameter[newgroup, newquery, newid]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newgroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newquery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=selectedQueryChanged, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=listeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=listener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SavedQueriesPanelListener, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[fireQueryChanged] operator[SEP] identifier[String] identifier[newgroup] , identifier[String] identifier[newquery] , identifier[String] identifier[newid] operator[SEP] { Keyword[for] operator[SEP] identifier[SavedQueriesPanelListener] identifier[listener] operator[:] identifier[listeners] operator[SEP] { identifier[listener] operator[SEP] identifier[selectedQueryChanged] operator[SEP] identifier[newgroup] , identifier[newquery] , identifier[newid] operator[SEP] operator[SEP] } }
public static Fetch createDefaultAttributeFetch(Attribute attr, String languageCode) { Fetch fetch; if (isReferenceType(attr)) { fetch = new Fetch(); EntityType refEntityType = attr.getRefEntity(); String idAttrName = refEntityType.getIdAttribute().getName(); fetch.field(idAttrName); String labelAttrName = refEntityType.getLabelAttribute(languageCode).getName(); if (!labelAttrName.equals(idAttrName)) { fetch.field(labelAttrName); } if (attr.getDataType() == FILE) { fetch.field(FileMetaMetadata.URL); } } else { fetch = null; } return fetch; }
class class_name[name] begin[{] method[createDefaultAttributeFetch, return_type[type[Fetch]], modifier[public static], parameter[attr, languageCode]] begin[{] local_variable[type[Fetch], fetch] if[call[.isReferenceType, parameter[member[.attr]]]] begin[{] assign[member[.fetch], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Fetch, sub_type=None))] local_variable[type[EntityType], refEntityType] local_variable[type[String], idAttrName] call[fetch.field, parameter[member[.idAttrName]]] local_variable[type[String], labelAttrName] if[call[labelAttrName.equals, parameter[member[.idAttrName]]]] begin[{] call[fetch.field, parameter[member[.labelAttrName]]] else begin[{] None end[}] if[binary_operation[call[attr.getDataType, parameter[]], ==, member[.FILE]]] begin[{] call[fetch.field, parameter[member[FileMetaMetadata.URL]]] else begin[{] None end[}] else begin[{] assign[member[.fetch], literal[null]] end[}] return[member[.fetch]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Fetch] identifier[createDefaultAttributeFetch] operator[SEP] identifier[Attribute] identifier[attr] , identifier[String] identifier[languageCode] operator[SEP] { identifier[Fetch] identifier[fetch] operator[SEP] Keyword[if] operator[SEP] identifier[isReferenceType] operator[SEP] identifier[attr] operator[SEP] operator[SEP] { identifier[fetch] operator[=] Keyword[new] identifier[Fetch] operator[SEP] operator[SEP] operator[SEP] identifier[EntityType] identifier[refEntityType] operator[=] identifier[attr] operator[SEP] identifier[getRefEntity] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[idAttrName] operator[=] identifier[refEntityType] operator[SEP] identifier[getIdAttribute] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[fetch] operator[SEP] identifier[field] operator[SEP] identifier[idAttrName] operator[SEP] operator[SEP] identifier[String] identifier[labelAttrName] operator[=] identifier[refEntityType] operator[SEP] identifier[getLabelAttribute] operator[SEP] identifier[languageCode] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[labelAttrName] operator[SEP] identifier[equals] operator[SEP] identifier[idAttrName] operator[SEP] operator[SEP] { identifier[fetch] operator[SEP] identifier[field] operator[SEP] identifier[labelAttrName] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[attr] operator[SEP] identifier[getDataType] operator[SEP] operator[SEP] operator[==] identifier[FILE] operator[SEP] { identifier[fetch] operator[SEP] identifier[field] operator[SEP] identifier[FileMetaMetadata] operator[SEP] identifier[URL] operator[SEP] operator[SEP] } } Keyword[else] { identifier[fetch] operator[=] Other[null] operator[SEP] } Keyword[return] identifier[fetch] operator[SEP] }
@SuppressWarnings("rawtypes") @Override public List getSerListFromCtObjChart(final Object ctObjChart) { if (ctObjChart instanceof CTBarChart) { return ((CTBarChart) ctObjChart).getSerList(); } return emptySerlist; }
class class_name[name] begin[{] method[getSerListFromCtObjChart, return_type[type[List]], modifier[public], parameter[ctObjChart]] begin[{] if[binary_operation[member[.ctObjChart], instanceof, type[CTBarChart]]] begin[{] return[Cast(expression=MemberReference(member=ctObjChart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CTBarChart, sub_type=None))] else begin[{] None end[}] return[member[.emptySerlist]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[List] identifier[getSerListFromCtObjChart] operator[SEP] Keyword[final] identifier[Object] identifier[ctObjChart] operator[SEP] { Keyword[if] operator[SEP] identifier[ctObjChart] Keyword[instanceof] identifier[CTBarChart] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[CTBarChart] operator[SEP] identifier[ctObjChart] operator[SEP] operator[SEP] identifier[getSerList] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[emptySerlist] operator[SEP] }
@Override public final void unlock(int handle) throws DataStoreException { if (SAFE_MODE) checkHandle(handle); if (locks.flip(handle)) { locks.flip(handle); // Restore state throw new DataStoreException("Handle was not locked : "+handle); } }
class class_name[name] begin[{] method[unlock, return_type[void], modifier[final public], parameter[handle]] begin[{] if[member[.SAFE_MODE]] begin[{] call[.checkHandle, parameter[member[.handle]]] else begin[{] None end[}] if[call[locks.flip, parameter[member[.handle]]]] begin[{] call[locks.flip, parameter[member[.handle]]] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Handle was not locked : "), operandr=MemberReference(member=handle, 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=DataStoreException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[unlock] operator[SEP] Keyword[int] identifier[handle] operator[SEP] Keyword[throws] identifier[DataStoreException] { Keyword[if] operator[SEP] identifier[SAFE_MODE] operator[SEP] identifier[checkHandle] operator[SEP] identifier[handle] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[locks] operator[SEP] identifier[flip] operator[SEP] identifier[handle] operator[SEP] operator[SEP] { identifier[locks] operator[SEP] identifier[flip] operator[SEP] identifier[handle] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[DataStoreException] operator[SEP] literal[String] operator[+] identifier[handle] operator[SEP] operator[SEP] } }
public static <E> E toObject(Class<E> clazz, List<Entity> entities, Map<com.google.appengine.api.datastore.Key, Object> references, AppEngineDatastoreService datastore) { return toObject(clazz, entities, references, datastore, 0); }
class class_name[name] begin[{] method[toObject, return_type[type[E]], modifier[public static], parameter[clazz, entities, references, datastore]] begin[{] return[call[.toObject, parameter[member[.clazz], member[.entities], member[.references], member[.datastore], literal[0]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] operator[>] identifier[E] identifier[toObject] operator[SEP] identifier[Class] operator[<] identifier[E] operator[>] identifier[clazz] , identifier[List] operator[<] identifier[Entity] operator[>] identifier[entities] , identifier[Map] operator[<] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[appengine] operator[SEP] identifier[api] operator[SEP] identifier[datastore] operator[SEP] identifier[Key] , identifier[Object] operator[>] identifier[references] , identifier[AppEngineDatastoreService] identifier[datastore] operator[SEP] { Keyword[return] identifier[toObject] operator[SEP] identifier[clazz] , identifier[entities] , identifier[references] , identifier[datastore] , Other[0] operator[SEP] operator[SEP] }
public static int[] getAppWidgetIds(AppWidgetManager appWidgetManager, Context context, Class<?> clazz) { return appWidgetManager.getAppWidgetIds(new ComponentName(context, clazz)); }
class class_name[name] begin[{] method[getAppWidgetIds, return_type[type[int]], modifier[public static], parameter[appWidgetManager, context, clazz]] begin[{] return[call[appWidgetManager.getAppWidgetIds, parameter[ClassCreator(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=clazz, 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=ComponentName, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] operator[SEP] operator[SEP] identifier[getAppWidgetIds] operator[SEP] identifier[AppWidgetManager] identifier[appWidgetManager] , identifier[Context] identifier[context] , identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] { Keyword[return] identifier[appWidgetManager] operator[SEP] identifier[getAppWidgetIds] operator[SEP] Keyword[new] identifier[ComponentName] operator[SEP] identifier[context] , identifier[clazz] operator[SEP] operator[SEP] operator[SEP] }
@Override protected void doHandle(CommandContext ctx) throws CommandLineException { final ForControlFlow forCF = ForControlFlow.get(ctx); if (forCF == null) { throw new CommandLineException("done is not available outside 'for' loop"); } forCF.run(ctx, discard.isPresent(ctx.getParsedCommandLine())); }
class class_name[name] begin[{] method[doHandle, return_type[void], modifier[protected], parameter[ctx]] begin[{] local_variable[type[ForControlFlow], forCF] if[binary_operation[member[.forCF], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="done is not available outside 'for' loop")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommandLineException, sub_type=None)), label=None) else begin[{] None end[}] call[forCF.run, parameter[member[.ctx], call[discard.isPresent, parameter[call[ctx.getParsedCommandLine, parameter[]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[doHandle] operator[SEP] identifier[CommandContext] identifier[ctx] operator[SEP] Keyword[throws] identifier[CommandLineException] { Keyword[final] identifier[ForControlFlow] identifier[forCF] operator[=] identifier[ForControlFlow] operator[SEP] identifier[get] operator[SEP] identifier[ctx] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[forCF] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[CommandLineException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[forCF] operator[SEP] identifier[run] operator[SEP] identifier[ctx] , identifier[discard] operator[SEP] identifier[isPresent] operator[SEP] identifier[ctx] operator[SEP] identifier[getParsedCommandLine] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private CompletableFuture<Void> applyInitialize(Indexed<InitializeEntry> entry) { for (RaftServiceContext service : raft.getServices()) { service.keepAliveSessions(entry.index(), entry.entry().timestamp()); } return CompletableFuture.completedFuture(null); }
class class_name[name] begin[{] method[applyInitialize, return_type[type[CompletableFuture]], modifier[private], parameter[entry]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=index, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=entry, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=timestamp, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=keepAliveSessions, postfix_operators=[], prefix_operators=[], qualifier=service, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getServices, postfix_operators=[], prefix_operators=[], qualifier=raft, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=service)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RaftServiceContext, sub_type=None))), label=None) return[call[CompletableFuture.completedFuture, parameter[literal[null]]]] end[}] END[}]
Keyword[private] identifier[CompletableFuture] operator[<] identifier[Void] operator[>] identifier[applyInitialize] operator[SEP] identifier[Indexed] operator[<] identifier[InitializeEntry] operator[>] identifier[entry] operator[SEP] { Keyword[for] operator[SEP] identifier[RaftServiceContext] identifier[service] operator[:] identifier[raft] operator[SEP] identifier[getServices] operator[SEP] operator[SEP] operator[SEP] { identifier[service] operator[SEP] identifier[keepAliveSessions] operator[SEP] identifier[entry] operator[SEP] identifier[index] operator[SEP] operator[SEP] , identifier[entry] operator[SEP] identifier[entry] operator[SEP] operator[SEP] operator[SEP] identifier[timestamp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[CompletableFuture] operator[SEP] identifier[completedFuture] operator[SEP] Other[null] operator[SEP] operator[SEP] }
public synchronized void removeSessionLogs(SessionId sessionId) { if (storeLogsOnSessionQuit) { return; } ThreadKey threadId = sessionToThreadMap.get(sessionId); SessionId sessionIdForThread = threadToSessionMap.get(threadId); if (threadId != null && sessionIdForThread != null && sessionIdForThread.equals(sessionId)) { threadToSessionMap.remove(threadId); sessionToThreadMap.remove(sessionId); } perSessionRecords.remove(sessionId); logFileRepository.removeLogFile(sessionId); }
class class_name[name] begin[{] method[removeSessionLogs, return_type[void], modifier[synchronized public], parameter[sessionId]] begin[{] if[member[.storeLogsOnSessionQuit]] begin[{] return[None] else begin[{] None end[}] local_variable[type[ThreadKey], threadId] local_variable[type[SessionId], sessionIdForThread] if[binary_operation[binary_operation[binary_operation[member[.threadId], !=, literal[null]], &&, binary_operation[member[.sessionIdForThread], !=, literal[null]]], &&, call[sessionIdForThread.equals, parameter[member[.sessionId]]]]] begin[{] call[threadToSessionMap.remove, parameter[member[.threadId]]] call[sessionToThreadMap.remove, parameter[member[.sessionId]]] else begin[{] None end[}] call[perSessionRecords.remove, parameter[member[.sessionId]]] call[logFileRepository.removeLogFile, parameter[member[.sessionId]]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[removeSessionLogs] operator[SEP] identifier[SessionId] identifier[sessionId] operator[SEP] { Keyword[if] operator[SEP] identifier[storeLogsOnSessionQuit] operator[SEP] { Keyword[return] operator[SEP] } identifier[ThreadKey] identifier[threadId] operator[=] identifier[sessionToThreadMap] operator[SEP] identifier[get] operator[SEP] identifier[sessionId] operator[SEP] operator[SEP] identifier[SessionId] identifier[sessionIdForThread] operator[=] identifier[threadToSessionMap] operator[SEP] identifier[get] operator[SEP] identifier[threadId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[threadId] operator[!=] Other[null] operator[&&] identifier[sessionIdForThread] operator[!=] Other[null] operator[&&] identifier[sessionIdForThread] operator[SEP] identifier[equals] operator[SEP] identifier[sessionId] operator[SEP] operator[SEP] { identifier[threadToSessionMap] operator[SEP] identifier[remove] operator[SEP] identifier[threadId] operator[SEP] operator[SEP] identifier[sessionToThreadMap] operator[SEP] identifier[remove] operator[SEP] identifier[sessionId] operator[SEP] operator[SEP] } identifier[perSessionRecords] operator[SEP] identifier[remove] operator[SEP] identifier[sessionId] operator[SEP] operator[SEP] identifier[logFileRepository] operator[SEP] identifier[removeLogFile] operator[SEP] identifier[sessionId] operator[SEP] operator[SEP] }
public static String cutFromIndexOf(String string, final String substring) { int i = string.indexOf(substring); if (i != -1) { string = string.substring(i); } return string; }
class class_name[name] begin[{] method[cutFromIndexOf, return_type[type[String]], modifier[public static], parameter[string, substring]] begin[{] local_variable[type[int], i] if[binary_operation[member[.i], !=, literal[1]]] begin[{] assign[member[.string], call[string.substring, parameter[member[.i]]]] else begin[{] None end[}] return[member[.string]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[cutFromIndexOf] operator[SEP] identifier[String] identifier[string] , Keyword[final] identifier[String] identifier[substring] operator[SEP] { Keyword[int] identifier[i] operator[=] identifier[string] operator[SEP] identifier[indexOf] operator[SEP] identifier[substring] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[!=] operator[-] Other[1] operator[SEP] { identifier[string] operator[=] identifier[string] operator[SEP] identifier[substring] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[string] operator[SEP] }
public boolean replace(final int key, final int oldValue, final int newValue) { final int curValue = get(key); if (curValue != oldValue || curValue == missingValue) { return false; } put(key, newValue); return true; }
class class_name[name] begin[{] method[replace, return_type[type[boolean]], modifier[public], parameter[key, oldValue, newValue]] begin[{] local_variable[type[int], curValue] if[binary_operation[binary_operation[member[.curValue], !=, member[.oldValue]], ||, binary_operation[member[.curValue], ==, member[.missingValue]]]] begin[{] return[literal[false]] else begin[{] None end[}] call[.put, parameter[member[.key], member[.newValue]]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[replace] operator[SEP] Keyword[final] Keyword[int] identifier[key] , Keyword[final] Keyword[int] identifier[oldValue] , Keyword[final] Keyword[int] identifier[newValue] operator[SEP] { Keyword[final] Keyword[int] identifier[curValue] operator[=] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[curValue] operator[!=] identifier[oldValue] operator[||] identifier[curValue] operator[==] identifier[missingValue] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[put] operator[SEP] identifier[key] , identifier[newValue] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public EClass getIfcCrewResource() { if (ifcCrewResourceEClass == null) { ifcCrewResourceEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(129); } return ifcCrewResourceEClass; }
class class_name[name] begin[{] method[getIfcCrewResource, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcCrewResourceEClass], ==, literal[null]]] begin[{] assign[member[.ifcCrewResourceEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=129)], 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[.ifcCrewResourceEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getIfcCrewResource] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcCrewResourceEClass] operator[==] Other[null] operator[SEP] { identifier[ifcCrewResourceEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[129] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcCrewResourceEClass] operator[SEP] }
public static List<Integer> arrayToList(int[] array, int codeLen) { List<Integer> result = new ArrayList<>(); for (int x = 0; x < codeLen; x++) { result.add(array[x]); } return result; }
class class_name[name] begin[{] method[arrayToList, return_type[type[List]], modifier[public static], parameter[array, codeLen]] begin[{] local_variable[type[List], result] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=codeLen, 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=x)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=x, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Integer] operator[>] identifier[arrayToList] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[array] , Keyword[int] identifier[codeLen] operator[SEP] { identifier[List] operator[<] identifier[Integer] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[x] operator[=] Other[0] operator[SEP] identifier[x] operator[<] identifier[codeLen] operator[SEP] identifier[x] operator[++] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[array] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
@NonNull public List<Span> getSpans(int start, int end) { final int length = length(); if (!isPositionValid(length, start, end)) { // we might as well throw here return Collections.emptyList(); } // all requested if (start == 0 && length == end) { // but also copy (do not allow external modification) final List<Span> list = new ArrayList<>(spans); Collections.reverse(list); return Collections.unmodifiableList(list); } final List<Span> list = new ArrayList<>(0); final Iterator<Span> iterator = spans.descendingIterator(); Span span; while (iterator.hasNext()) { span = iterator.next(); // we must execute 2 checks: if overlap with specified range or fully include it // if span.start is >= range.start -> check if it's before range.end // if span.end is <= end -> check if it's after range.start if ( (span.start >= start && span.start < end) || (span.end <= end && span.end > start) || (span.start < start && span.end > end)) { list.add(span); } } return Collections.unmodifiableList(list); }
class class_name[name] begin[{] method[getSpans, return_type[type[List]], modifier[public], parameter[start, end]] begin[{] local_variable[type[int], length] if[call[.isPositionValid, parameter[member[.length], member[.start], member[.end]]]] begin[{] return[call[Collections.emptyList, parameter[]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.start], ==, literal[0]], &&, binary_operation[member[.length], ==, member[.end]]]] begin[{] local_variable[type[List], list] call[Collections.reverse, parameter[member[.list]]] return[call[Collections.unmodifiableList, parameter[member[.list]]]] else begin[{] None end[}] local_variable[type[List], list] local_variable[type[Iterator], iterator] local_variable[type[Span], span] while[call[iterator.hasNext, parameter[]]] begin[{] assign[member[.span], call[iterator.next, parameter[]]] if[binary_operation[binary_operation[binary_operation[binary_operation[member[span.start], >=, member[.start]], &&, binary_operation[member[span.start], <, member[.end]]], ||, binary_operation[binary_operation[member[span.end], <=, member[.end]], &&, binary_operation[member[span.end], >, member[.start]]]], ||, binary_operation[binary_operation[member[span.start], <, member[.start]], &&, binary_operation[member[span.end], >, member[.end]]]]] begin[{] call[list.add, parameter[member[.span]]] else begin[{] None end[}] end[}] return[call[Collections.unmodifiableList, parameter[member[.list]]]] end[}] END[}]
annotation[@] identifier[NonNull] Keyword[public] identifier[List] operator[<] identifier[Span] operator[>] identifier[getSpans] operator[SEP] Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[final] Keyword[int] identifier[length] operator[=] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isPositionValid] operator[SEP] identifier[length] , identifier[start] , identifier[end] operator[SEP] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[start] operator[==] Other[0] operator[&&] identifier[length] operator[==] identifier[end] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[Span] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[spans] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[reverse] operator[SEP] identifier[list] operator[SEP] operator[SEP] Keyword[return] identifier[Collections] operator[SEP] identifier[unmodifiableList] operator[SEP] identifier[list] operator[SEP] operator[SEP] } Keyword[final] identifier[List] operator[<] identifier[Span] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[final] identifier[Iterator] operator[<] identifier[Span] operator[>] identifier[iterator] operator[=] identifier[spans] operator[SEP] identifier[descendingIterator] operator[SEP] operator[SEP] operator[SEP] identifier[Span] identifier[span] operator[SEP] Keyword[while] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[span] operator[=] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[span] operator[SEP] identifier[start] operator[>=] identifier[start] operator[&&] identifier[span] operator[SEP] identifier[start] operator[<] identifier[end] operator[SEP] operator[||] operator[SEP] identifier[span] operator[SEP] identifier[end] operator[<=] identifier[end] operator[&&] identifier[span] operator[SEP] identifier[end] operator[>] identifier[start] operator[SEP] operator[||] operator[SEP] identifier[span] operator[SEP] identifier[start] operator[<] identifier[start] operator[&&] identifier[span] operator[SEP] identifier[end] operator[>] identifier[end] operator[SEP] operator[SEP] { identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[span] operator[SEP] operator[SEP] } } Keyword[return] identifier[Collections] operator[SEP] identifier[unmodifiableList] operator[SEP] identifier[list] operator[SEP] operator[SEP] }
public com.google.api.ads.admanager.axis.v201808.CreativeAsset getFallbackImageAsset() { return fallbackImageAsset; }
class class_name[name] begin[{] method[getFallbackImageAsset, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.fallbackImageAsset]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201808] operator[SEP] identifier[CreativeAsset] identifier[getFallbackImageAsset] operator[SEP] operator[SEP] { Keyword[return] identifier[fallbackImageAsset] operator[SEP] }
public static DatagramPacket buildPacket(PacketType type, ByteBuffer deviceName, ByteBuffer payload) { ByteBuffer content = ByteBuffer.allocate(0x1f + payload.remaining()); content.put(getMagicHeader()); content.put(type.protocolValue); content.put(deviceName); content.put(payload); return new DatagramPacket(content.array(), content.capacity()); }
class class_name[name] begin[{] method[buildPacket, return_type[type[DatagramPacket]], modifier[public static], parameter[type, deviceName, payload]] begin[{] local_variable[type[ByteBuffer], content] call[content.put, parameter[call[.getMagicHeader, parameter[]]]] call[content.put, parameter[member[type.protocolValue]]] call[content.put, parameter[member[.deviceName]]] call[content.put, parameter[member[.payload]]] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=array, postfix_operators=[], prefix_operators=[], qualifier=content, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=capacity, postfix_operators=[], prefix_operators=[], qualifier=content, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatagramPacket, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[DatagramPacket] identifier[buildPacket] operator[SEP] identifier[PacketType] identifier[type] , identifier[ByteBuffer] identifier[deviceName] , identifier[ByteBuffer] identifier[payload] operator[SEP] { identifier[ByteBuffer] identifier[content] operator[=] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] literal[Integer] operator[+] identifier[payload] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[put] operator[SEP] identifier[getMagicHeader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[put] operator[SEP] identifier[type] operator[SEP] identifier[protocolValue] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[put] operator[SEP] identifier[deviceName] operator[SEP] operator[SEP] identifier[content] operator[SEP] identifier[put] operator[SEP] identifier[payload] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[DatagramPacket] operator[SEP] identifier[content] operator[SEP] identifier[array] operator[SEP] operator[SEP] , identifier[content] operator[SEP] identifier[capacity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected List<String> extractWords() throws IOException { while( true ) { lineNumber++; String line = in.readLine(); if( line == null ) { return null; } // skip comment lines if( hasComment ) { if( line.charAt(0) == comment ) continue; } // extract the words, which are the variables encoded return parseWords(line); } }
class class_name[name] begin[{] method[extractWords, return_type[type[List]], modifier[protected], parameter[]] begin[{] while[literal[true]] begin[{] member[.lineNumber] local_variable[type[String], line] if[binary_operation[member[.line], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[member[.hasComment]] begin[{] if[binary_operation[call[line.charAt, parameter[literal[0]]], ==, member[.comment]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] else begin[{] None end[}] return[call[.parseWords, parameter[member[.line]]]] end[}] end[}] END[}]
Keyword[protected] identifier[List] operator[<] identifier[String] operator[>] identifier[extractWords] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[while] operator[SEP] literal[boolean] operator[SEP] { identifier[lineNumber] operator[++] operator[SEP] identifier[String] identifier[line] operator[=] identifier[in] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[line] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[hasComment] operator[SEP] { Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] identifier[comment] operator[SEP] Keyword[continue] operator[SEP] } Keyword[return] identifier[parseWords] operator[SEP] identifier[line] operator[SEP] operator[SEP] } }
@Override public ImmutableSet<Cell<V>> cells() { ImmutableSet<Cell<V>> c = cellSet; if (c == null) { c = ImmutableSet.copyOf(cells); cellSet = c; } return c; }
class class_name[name] begin[{] method[cells, return_type[type[ImmutableSet]], modifier[public], parameter[]] begin[{] local_variable[type[ImmutableSet], c] if[binary_operation[member[.c], ==, literal[null]]] begin[{] assign[member[.c], call[ImmutableSet.copyOf, parameter[member[.cells]]]] assign[member[.cellSet], member[.c]] else begin[{] None end[}] return[member[.c]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ImmutableSet] operator[<] identifier[Cell] operator[<] identifier[V] operator[>] operator[>] identifier[cells] operator[SEP] operator[SEP] { identifier[ImmutableSet] operator[<] identifier[Cell] operator[<] identifier[V] operator[>] operator[>] identifier[c] operator[=] identifier[cellSet] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] Other[null] operator[SEP] { identifier[c] operator[=] identifier[ImmutableSet] operator[SEP] identifier[copyOf] operator[SEP] identifier[cells] operator[SEP] operator[SEP] identifier[cellSet] operator[=] identifier[c] operator[SEP] } Keyword[return] identifier[c] operator[SEP] }
public void marshall(BatchDeleteImportDataError batchDeleteImportDataError, ProtocolMarshaller protocolMarshaller) { if (batchDeleteImportDataError == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(batchDeleteImportDataError.getImportTaskId(), IMPORTTASKID_BINDING); protocolMarshaller.marshall(batchDeleteImportDataError.getErrorCode(), ERRORCODE_BINDING); protocolMarshaller.marshall(batchDeleteImportDataError.getErrorDescription(), ERRORDESCRIPTION_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[batchDeleteImportDataError, protocolMarshaller]] begin[{] if[binary_operation[member[.batchDeleteImportDataError], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getImportTaskId, postfix_operators=[], prefix_operators=[], qualifier=batchDeleteImportDataError, selectors=[], type_arguments=None), MemberReference(member=IMPORTTASKID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getErrorCode, postfix_operators=[], prefix_operators=[], qualifier=batchDeleteImportDataError, selectors=[], type_arguments=None), MemberReference(member=ERRORCODE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getErrorDescription, postfix_operators=[], prefix_operators=[], qualifier=batchDeleteImportDataError, selectors=[], type_arguments=None), MemberReference(member=ERRORDESCRIPTION_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[BatchDeleteImportDataError] identifier[batchDeleteImportDataError] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[batchDeleteImportDataError] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[batchDeleteImportDataError] operator[SEP] identifier[getImportTaskId] operator[SEP] operator[SEP] , identifier[IMPORTTASKID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[batchDeleteImportDataError] operator[SEP] identifier[getErrorCode] operator[SEP] operator[SEP] , identifier[ERRORCODE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[batchDeleteImportDataError] operator[SEP] identifier[getErrorDescription] operator[SEP] operator[SEP] , identifier[ERRORDESCRIPTION_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public final TreeModelFilter<SQLPPTriplesMap> type() throws RecognitionException { TreeModelFilter<SQLPPTriplesMap> value = null; try { // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:69:3: ( ID | TEXT | TARGET | SOURCE | FUNCT | PRED ) int alt4=6; switch ( input.LA(1) ) { case ID: { alt4=1; } break; case TEXT: { alt4=2; } break; case TARGET: { alt4=3; } break; case SOURCE: { alt4=4; } break; case FUNCT: { alt4=5; } break; case PRED: { alt4=6; } break; default: NoViableAltException nvae = new NoViableAltException("", 4, 0, input); throw nvae; } switch (alt4) { case 1 : // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:69:5: ID { match(input,ID,FOLLOW_ID_in_type120); value = new MappingIDTreeModelFilter(); } break; case 2 : // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:70:5: TEXT { match(input,TEXT,FOLLOW_TEXT_in_type133); value = new MappingStringTreeModelFilter(); } break; case 3 : // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:71:5: TARGET { match(input,TARGET,FOLLOW_TARGET_in_type144); value = new MappingHeadVariableTreeModelFilter(); } break; case 4 : // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:72:5: SOURCE { match(input,SOURCE,FOLLOW_SOURCE_in_type153); value = new MappingSQLStringTreeModelFilter(); } break; case 5 : // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:73:5: FUNCT { match(input,FUNCT,FOLLOW_FUNCT_in_type162); value = new MappingFunctorTreeModelFilter(); } break; case 6 : // C:\\Project\\Obdalib\\obdalib-parent\\obdalib-core\\src\\main\\java\\it\\unibz\\inf\\obda\\gui\\swing\\utils\\MappingFilter.g:74:5: PRED { match(input,PRED,FOLLOW_PRED_in_type172); value = new MappingPredicateTreeModelFilter(); } break; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { // do for sure before leaving } return value; }
class class_name[name] begin[{] method[type, return_type[type[TreeModelFilter]], modifier[final public], parameter[]] begin[{] local_variable[type[TreeModelFilter], value] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), name=alt4)], modifiers=set(), type=BasicType(dimensions=[], name=int)), SwitchStatement(cases=[SwitchStatementCase(case=['ID'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['TEXT'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['TARGET'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SOURCE'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['FUNCT'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['PRED'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoViableAltException, sub_type=None)), name=nvae)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NoViableAltException, sub_type=None)), ThrowStatement(expression=MemberReference(member=nvae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_ID_in_type120, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MappingIDTreeModelFilter, sub_type=None))), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=TEXT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_TEXT_in_type133, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MappingStringTreeModelFilter, sub_type=None))), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=TARGET, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_TARGET_in_type144, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MappingHeadVariableTreeModelFilter, sub_type=None))), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SOURCE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_SOURCE_in_type153, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MappingSQLStringTreeModelFilter, sub_type=None))), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FUNCT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_FUNCT_in_type162, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MappingFunctorTreeModelFilter, sub_type=None))), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PRED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_PRED_in_type172, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MappingPredicateTreeModelFilter, sub_type=None))), label=None)]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.value]] end[}] END[}]
Keyword[public] Keyword[final] identifier[TreeModelFilter] operator[<] identifier[SQLPPTriplesMap] operator[>] identifier[type] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[TreeModelFilter] operator[<] identifier[SQLPPTriplesMap] operator[>] identifier[value] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[int] identifier[alt4] operator[=] Other[6] operator[SEP] Keyword[switch] operator[SEP] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] { Keyword[case] identifier[ID] operator[:] { identifier[alt4] operator[=] Other[1] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[TEXT] operator[:] { identifier[alt4] operator[=] Other[2] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[TARGET] operator[:] { identifier[alt4] operator[=] Other[3] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[SOURCE] operator[:] { identifier[alt4] operator[=] Other[4] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[FUNCT] operator[:] { identifier[alt4] operator[=] Other[5] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[PRED] operator[:] { identifier[alt4] operator[=] Other[6] operator[SEP] } Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[NoViableAltException] identifier[nvae] operator[=] Keyword[new] identifier[NoViableAltException] operator[SEP] literal[String] , Other[4] , Other[0] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[nvae] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt4] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[match] operator[SEP] identifier[input] , identifier[ID] , identifier[FOLLOW_ID_in_type120] operator[SEP] operator[SEP] identifier[value] operator[=] Keyword[new] identifier[MappingIDTreeModelFilter] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] { identifier[match] operator[SEP] identifier[input] , identifier[TEXT] , identifier[FOLLOW_TEXT_in_type133] operator[SEP] operator[SEP] identifier[value] operator[=] Keyword[new] identifier[MappingStringTreeModelFilter] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[3] operator[:] { identifier[match] operator[SEP] identifier[input] , identifier[TARGET] , identifier[FOLLOW_TARGET_in_type144] operator[SEP] operator[SEP] identifier[value] operator[=] Keyword[new] identifier[MappingHeadVariableTreeModelFilter] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[4] operator[:] { identifier[match] operator[SEP] identifier[input] , identifier[SOURCE] , identifier[FOLLOW_SOURCE_in_type153] operator[SEP] operator[SEP] identifier[value] operator[=] Keyword[new] identifier[MappingSQLStringTreeModelFilter] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[5] operator[:] { identifier[match] operator[SEP] identifier[input] , identifier[FUNCT] , identifier[FOLLOW_FUNCT_in_type162] operator[SEP] operator[SEP] identifier[value] operator[=] Keyword[new] identifier[MappingFunctorTreeModelFilter] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[6] operator[:] { identifier[match] operator[SEP] identifier[input] , identifier[PRED] , identifier[FOLLOW_PRED_in_type172] operator[SEP] operator[SEP] identifier[value] operator[=] Keyword[new] identifier[MappingPredicateTreeModelFilter] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[value] operator[SEP] }
public static vpnsessionpolicy[] get_filtered(nitro_service service, String filter) throws Exception{ vpnsessionpolicy obj = new vpnsessionpolicy(); options option = new options(); option.set_filter(filter); vpnsessionpolicy[] response = (vpnsessionpolicy[]) obj.getfiltered(service, option); return response; }
class class_name[name] begin[{] method[get_filtered, return_type[type[vpnsessionpolicy]], modifier[public static], parameter[service, filter]] begin[{] local_variable[type[vpnsessionpolicy], obj] local_variable[type[options], option] call[option.set_filter, parameter[member[.filter]]] local_variable[type[vpnsessionpolicy], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[vpnsessionpolicy] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] { identifier[vpnsessionpolicy] identifier[obj] operator[=] Keyword[new] identifier[vpnsessionpolicy] operator[SEP] operator[SEP] operator[SEP] identifier[options] identifier[option] operator[=] Keyword[new] identifier[options] operator[SEP] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_filter] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[vpnsessionpolicy] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[vpnsessionpolicy] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[getfiltered] operator[SEP] identifier[service] , identifier[option] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public OperationFuture<List<Server>> powerOff(GroupFilter groupFilter) { return serverService().powerOff( getServerSearchCriteria(groupFilter) ); }
class class_name[name] begin[{] method[powerOff, return_type[type[OperationFuture]], modifier[public], parameter[groupFilter]] begin[{] return[call[.serverService, parameter[]]] end[}] END[}]
Keyword[public] identifier[OperationFuture] operator[<] identifier[List] operator[<] identifier[Server] operator[>] operator[>] identifier[powerOff] operator[SEP] identifier[GroupFilter] identifier[groupFilter] operator[SEP] { Keyword[return] identifier[serverService] operator[SEP] operator[SEP] operator[SEP] identifier[powerOff] operator[SEP] identifier[getServerSearchCriteria] operator[SEP] identifier[groupFilter] operator[SEP] operator[SEP] operator[SEP] }
public CharBuffer append (CharSequence csq) { if (csq != null) { return put(csq.toString()); } return put("null"); //$NON-NLS-1$ }
class class_name[name] begin[{] method[append, return_type[type[CharBuffer]], modifier[public], parameter[csq]] begin[{] if[binary_operation[member[.csq], !=, literal[null]]] begin[{] return[call[.put, parameter[call[csq.toString, parameter[]]]]] else begin[{] None end[}] return[call[.put, parameter[literal["null"]]]] end[}] END[}]
Keyword[public] identifier[CharBuffer] identifier[append] operator[SEP] identifier[CharSequence] identifier[csq] operator[SEP] { Keyword[if] operator[SEP] identifier[csq] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[put] operator[SEP] identifier[csq] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[put] operator[SEP] literal[String] operator[SEP] operator[SEP] }
void persist() { getPreferences(EvernoteSession.getInstance().getApplicationContext()) .edit() .putString(KEY_AUTH_TOKEN, mAuthToken) .putString(KEY_NOTESTORE_URL, mNoteStoreUrl) .putString(KEY_WEB_API_URL_PREFIX, mWebApiUrlPrefix) .putString(KEY_EVERNOTE_HOST, mEvernoteHost) .putInt(KEY_USER_ID, mUserId) .putBoolean(KEY_IS_APP_LINKED_NOTEBOOK, mIsAppLinkedNotebook) .apply(); }
class class_name[name] begin[{] method[persist, return_type[void], modifier[default], parameter[]] begin[{] call[.getPreferences, parameter[call[EvernoteSession.getInstance, parameter[]]]] end[}] END[}]
Keyword[void] identifier[persist] operator[SEP] operator[SEP] { identifier[getPreferences] operator[SEP] identifier[EvernoteSession] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getApplicationContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[edit] operator[SEP] operator[SEP] operator[SEP] identifier[putString] operator[SEP] identifier[KEY_AUTH_TOKEN] , identifier[mAuthToken] operator[SEP] operator[SEP] identifier[putString] operator[SEP] identifier[KEY_NOTESTORE_URL] , identifier[mNoteStoreUrl] operator[SEP] operator[SEP] identifier[putString] operator[SEP] identifier[KEY_WEB_API_URL_PREFIX] , identifier[mWebApiUrlPrefix] operator[SEP] operator[SEP] identifier[putString] operator[SEP] identifier[KEY_EVERNOTE_HOST] , identifier[mEvernoteHost] operator[SEP] operator[SEP] identifier[putInt] operator[SEP] identifier[KEY_USER_ID] , identifier[mUserId] operator[SEP] operator[SEP] identifier[putBoolean] operator[SEP] identifier[KEY_IS_APP_LINKED_NOTEBOOK] , identifier[mIsAppLinkedNotebook] operator[SEP] operator[SEP] identifier[apply] operator[SEP] operator[SEP] operator[SEP] }
protected void doRender(final String html, final HttpServletRequest request, final HttpServletResponse response) throws Exception { PrintWriter writer; try { writer = response.getWriter(); } catch (final Exception e) { writer = new PrintWriter(response.getOutputStream()); } try { if (response.isCommitted()) { // response has been sent redirect writer.flush(); writer.close(); return; } writer.write(html); writer.flush(); writer.close(); } catch (final Exception e) { LOGGER.log(Level.ERROR, "Writes pipe failed: " + e.getMessage()); } }
class class_name[name] begin[{] method[doRender, return_type[void], modifier[protected], parameter[html, request, response]] begin[{] local_variable[type[PrintWriter], writer] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getWriter, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getOutputStream, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PrintWriter, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isCommitted, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=html, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ERROR, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Writes pipe failed: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], member=log, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[doRender] operator[SEP] Keyword[final] identifier[String] identifier[html] , Keyword[final] identifier[HttpServletRequest] identifier[request] , Keyword[final] identifier[HttpServletResponse] identifier[response] operator[SEP] Keyword[throws] identifier[Exception] { identifier[PrintWriter] identifier[writer] operator[SEP] Keyword[try] { identifier[writer] operator[=] identifier[response] operator[SEP] identifier[getWriter] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] { identifier[writer] operator[=] Keyword[new] identifier[PrintWriter] operator[SEP] identifier[response] operator[SEP] identifier[getOutputStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { Keyword[if] operator[SEP] identifier[response] operator[SEP] identifier[isCommitted] operator[SEP] operator[SEP] operator[SEP] { identifier[writer] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[writer] operator[SEP] identifier[write] operator[SEP] identifier[html] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[ERROR] , literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public List<Post> queuedPosts(Map<String, ?> options) { return client.blogQueuedPosts(name, options); }
class class_name[name] begin[{] method[queuedPosts, return_type[type[List]], modifier[public], parameter[options]] begin[{] return[call[client.blogQueuedPosts, parameter[member[.name], member[.options]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Post] operator[>] identifier[queuedPosts] operator[SEP] identifier[Map] operator[<] identifier[String] , operator[?] operator[>] identifier[options] operator[SEP] { Keyword[return] identifier[client] operator[SEP] identifier[blogQueuedPosts] operator[SEP] identifier[name] , identifier[options] operator[SEP] operator[SEP] }
public static long firstLong(Cursor cursor, boolean close) { long l = cursor.moveToFirst() ? cursor.getLong(0) : Long.MIN_VALUE; close(cursor, close); return l; }
class class_name[name] begin[{] method[firstLong, return_type[type[long]], modifier[public static], parameter[cursor, close]] begin[{] local_variable[type[long], l] call[.close, parameter[member[.cursor], member[.close]]] return[member[.l]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[firstLong] operator[SEP] identifier[Cursor] identifier[cursor] , Keyword[boolean] identifier[close] operator[SEP] { Keyword[long] identifier[l] operator[=] identifier[cursor] operator[SEP] identifier[moveToFirst] operator[SEP] operator[SEP] operator[?] identifier[cursor] operator[SEP] identifier[getLong] operator[SEP] Other[0] operator[SEP] operator[:] identifier[Long] operator[SEP] identifier[MIN_VALUE] operator[SEP] identifier[close] operator[SEP] identifier[cursor] , identifier[close] operator[SEP] operator[SEP] Keyword[return] identifier[l] operator[SEP] }
public void putCachedAttributesFor(final RegisteredService registeredService, final CachingPrincipalAttributesRepository repository, final String id, final Map<String, List<Object>> attributes) { val cache = getRegisteredServiceCacheInstance(registeredService, repository); cache.put(id, attributes); }
class class_name[name] begin[{] method[putCachedAttributesFor, return_type[void], modifier[public], parameter[registeredService, repository, id, attributes]] begin[{] local_variable[type[val], cache] call[cache.put, parameter[member[.id], member[.attributes]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[putCachedAttributesFor] operator[SEP] Keyword[final] identifier[RegisteredService] identifier[registeredService] , Keyword[final] identifier[CachingPrincipalAttributesRepository] identifier[repository] , Keyword[final] identifier[String] identifier[id] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[Object] operator[>] operator[>] identifier[attributes] operator[SEP] { identifier[val] identifier[cache] operator[=] identifier[getRegisteredServiceCacheInstance] operator[SEP] identifier[registeredService] , identifier[repository] operator[SEP] operator[SEP] identifier[cache] operator[SEP] identifier[put] operator[SEP] identifier[id] , identifier[attributes] operator[SEP] operator[SEP] }
public static Query select(Column... columns) { return new Query(Arrays.asList(nullSafeArray(columns, Column.class))); }
class class_name[name] begin[{] method[select, return_type[type[Query]], modifier[public static], parameter[columns]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=columns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Column, sub_type=None))], member=nullSafeArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=asList, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Query, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Query] identifier[select] operator[SEP] identifier[Column] operator[...] identifier[columns] operator[SEP] { Keyword[return] Keyword[new] identifier[Query] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[nullSafeArray] operator[SEP] identifier[columns] , identifier[Column] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public ClasspathScanDescriptorProvider scanPackage(final String packageName, final boolean recursive) { return scanPackage(packageName, recursive, ClassLoaderUtils.getParentClassLoader(), false); }
class class_name[name] begin[{] method[scanPackage, return_type[type[ClasspathScanDescriptorProvider]], modifier[public], parameter[packageName, recursive]] begin[{] return[call[.scanPackage, parameter[member[.packageName], member[.recursive], call[ClassLoaderUtils.getParentClassLoader, parameter[]], literal[false]]]] end[}] END[}]
Keyword[public] identifier[ClasspathScanDescriptorProvider] identifier[scanPackage] operator[SEP] Keyword[final] identifier[String] identifier[packageName] , Keyword[final] Keyword[boolean] identifier[recursive] operator[SEP] { Keyword[return] identifier[scanPackage] operator[SEP] identifier[packageName] , identifier[recursive] , identifier[ClassLoaderUtils] operator[SEP] identifier[getParentClassLoader] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] }
public void marshall(DescribeConfigRulesRequest describeConfigRulesRequest, ProtocolMarshaller protocolMarshaller) { if (describeConfigRulesRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(describeConfigRulesRequest.getConfigRuleNames(), CONFIGRULENAMES_BINDING); protocolMarshaller.marshall(describeConfigRulesRequest.getNextToken(), NEXTTOKEN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[describeConfigRulesRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.describeConfigRulesRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getConfigRuleNames, postfix_operators=[], prefix_operators=[], qualifier=describeConfigRulesRequest, selectors=[], type_arguments=None), MemberReference(member=CONFIGRULENAMES_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=describeConfigRulesRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[DescribeConfigRulesRequest] identifier[describeConfigRulesRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[describeConfigRulesRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeConfigRulesRequest] operator[SEP] identifier[getConfigRuleNames] operator[SEP] operator[SEP] , identifier[CONFIGRULENAMES_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[describeConfigRulesRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
CssFormatter comment( String msg ) { getOutput().append( insets ).append( msg ).append( '\n' ); return this; }
class class_name[name] begin[{] method[comment, return_type[type[CssFormatter]], modifier[default], parameter[msg]] begin[{] call[.getOutput, parameter[]] return[THIS[]] end[}] END[}]
identifier[CssFormatter] identifier[comment] operator[SEP] identifier[String] identifier[msg] operator[SEP] { identifier[getOutput] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[insets] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[msg] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@POST @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @RequiresPermissions(I18nPermissions.LOCALE_WRITE) public Response addAvailableLocale(LocaleRepresentation representation, @Context UriInfo uriInfo) throws URISyntaxException { WebAssertions.assertNotNull(representation, LOCALE_SHOULD_NOT_BE_BLANK); Locale result; if (!localeRepository.contains(representation.getCode())) { result = factory.createFromCode(representation.getCode()); localeRepository.add(result); } else { return Response.status(Response.Status.CONFLICT).build(); } return Response.created(new URI(uriInfo.getRequestUri() + "/" + result.getId())) .entity(localeFinder.findAvailableLocale(result.getId())).build(); }
class class_name[name] begin[{] method[addAvailableLocale, return_type[type[Response]], modifier[public], parameter[representation, uriInfo]] begin[{] call[WebAssertions.assertNotNull, parameter[member[.representation], member[.LOCALE_SHOULD_NOT_BE_BLANK]]] local_variable[type[Locale], result] if[call[localeRepository.contains, parameter[call[representation.getCode, parameter[]]]]] begin[{] assign[member[.result], call[factory.createFromCode, parameter[call[representation.getCode, parameter[]]]]] call[localeRepository.add, parameter[member[.result]]] else begin[{] return[call[Response.status, parameter[member[Response.Status.CONFLICT]]]] end[}] return[call[Response.created, parameter[ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getRequestUri, postfix_operators=[], prefix_operators=[], qualifier=uriInfo, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+), operandr=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=URI, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[POST] annotation[@] identifier[Consumes] operator[SEP] identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON] operator[SEP] annotation[@] identifier[Produces] operator[SEP] identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON] operator[SEP] annotation[@] identifier[RequiresPermissions] operator[SEP] identifier[I18nPermissions] operator[SEP] identifier[LOCALE_WRITE] operator[SEP] Keyword[public] identifier[Response] identifier[addAvailableLocale] operator[SEP] identifier[LocaleRepresentation] identifier[representation] , annotation[@] identifier[Context] identifier[UriInfo] identifier[uriInfo] operator[SEP] Keyword[throws] identifier[URISyntaxException] { identifier[WebAssertions] operator[SEP] identifier[assertNotNull] operator[SEP] identifier[representation] , identifier[LOCALE_SHOULD_NOT_BE_BLANK] operator[SEP] operator[SEP] identifier[Locale] identifier[result] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[localeRepository] operator[SEP] identifier[contains] operator[SEP] identifier[representation] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[=] identifier[factory] operator[SEP] identifier[createFromCode] operator[SEP] identifier[representation] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[localeRepository] operator[SEP] identifier[add] operator[SEP] identifier[result] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[Response] operator[SEP] identifier[status] operator[SEP] identifier[Response] operator[SEP] identifier[Status] operator[SEP] identifier[CONFLICT] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[Response] operator[SEP] identifier[created] operator[SEP] Keyword[new] identifier[URI] operator[SEP] identifier[uriInfo] operator[SEP] identifier[getRequestUri] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[result] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[entity] operator[SEP] identifier[localeFinder] operator[SEP] identifier[findAvailableLocale] operator[SEP] identifier[result] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
protected File executePartialPut(HttpServletRequest req, CmsWebdavRange range, String path) throws IOException { // Append data specified in ranges to existing content for this // resource - create a temp. file on the local filesystem to // perform this operation File tempDir = (File)getServletContext().getAttribute(ATT_SERVLET_TEMPDIR); // Convert all '/' characters to '.' in resourcePath String convertedResourcePath = path.replace('/', '.'); File contentFile = new File(tempDir, convertedResourcePath); contentFile.createNewFile(); RandomAccessFile randAccessContentFile = new RandomAccessFile(contentFile, "rw"); InputStream oldResourceStream = null; try { I_CmsRepositoryItem item = m_session.getItem(path); oldResourceStream = new ByteArrayInputStream(item.getContent()); } catch (CmsException e) { if (LOG.isErrorEnabled()) { LOG.error(Messages.get().getBundle().key(Messages.LOG_ITEM_NOT_FOUND_1, path), e); } } // Copy data in oldRevisionContent to contentFile if (oldResourceStream != null) { int numBytesRead; byte[] copyBuffer = new byte[BUFFER_SIZE]; while ((numBytesRead = oldResourceStream.read(copyBuffer)) != -1) { randAccessContentFile.write(copyBuffer, 0, numBytesRead); } oldResourceStream.close(); } randAccessContentFile.setLength(range.getLength()); // Append data in request input stream to contentFile randAccessContentFile.seek(range.getStart()); int numBytesRead; byte[] transferBuffer = new byte[BUFFER_SIZE]; BufferedInputStream requestBufInStream = new BufferedInputStream(req.getInputStream(), BUFFER_SIZE); while ((numBytesRead = requestBufInStream.read(transferBuffer)) != -1) { randAccessContentFile.write(transferBuffer, 0, numBytesRead); } randAccessContentFile.close(); requestBufInStream.close(); return contentFile; }
class class_name[name] begin[{] method[executePartialPut, return_type[type[File]], modifier[protected], parameter[req, range, path]] begin[{] local_variable[type[File], tempDir] local_variable[type[String], convertedResourcePath] local_variable[type[File], contentFile] call[contentFile.createNewFile, parameter[]] local_variable[type[RandomAccessFile], randAccessContentFile] local_variable[type[InputStream], oldResourceStream] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getItem, postfix_operators=[], prefix_operators=[], qualifier=m_session, selectors=[], type_arguments=None), name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=I_CmsRepositoryItem, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=oldResourceStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getContent, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None))), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isErrorEnabled, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[], member=getBundle, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=LOG_ITEM_NOT_FOUND_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.oldResourceStream], !=, literal[null]]] begin[{] local_variable[type[int], numBytesRead] local_variable[type[byte], copyBuffer] while[binary_operation[assign[member[.numBytesRead], call[oldResourceStream.read, parameter[member[.copyBuffer]]]], !=, literal[1]]] begin[{] call[randAccessContentFile.write, parameter[member[.copyBuffer], literal[0], member[.numBytesRead]]] end[}] call[oldResourceStream.close, parameter[]] else begin[{] None end[}] call[randAccessContentFile.setLength, parameter[call[range.getLength, parameter[]]]] call[randAccessContentFile.seek, parameter[call[range.getStart, parameter[]]]] local_variable[type[int], numBytesRead] local_variable[type[byte], transferBuffer] local_variable[type[BufferedInputStream], requestBufInStream] while[binary_operation[assign[member[.numBytesRead], call[requestBufInStream.read, parameter[member[.transferBuffer]]]], !=, literal[1]]] begin[{] call[randAccessContentFile.write, parameter[member[.transferBuffer], literal[0], member[.numBytesRead]]] end[}] call[randAccessContentFile.close, parameter[]] call[requestBufInStream.close, parameter[]] return[member[.contentFile]] end[}] END[}]
Keyword[protected] identifier[File] identifier[executePartialPut] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[CmsWebdavRange] identifier[range] , identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[IOException] { identifier[File] identifier[tempDir] operator[=] operator[SEP] identifier[File] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] identifier[getAttribute] operator[SEP] identifier[ATT_SERVLET_TEMPDIR] operator[SEP] operator[SEP] identifier[String] identifier[convertedResourcePath] operator[=] identifier[path] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[File] identifier[contentFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[tempDir] , identifier[convertedResourcePath] operator[SEP] operator[SEP] identifier[contentFile] operator[SEP] identifier[createNewFile] operator[SEP] operator[SEP] operator[SEP] identifier[RandomAccessFile] identifier[randAccessContentFile] operator[=] Keyword[new] identifier[RandomAccessFile] operator[SEP] identifier[contentFile] , literal[String] operator[SEP] operator[SEP] identifier[InputStream] identifier[oldResourceStream] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[I_CmsRepositoryItem] identifier[item] operator[=] identifier[m_session] operator[SEP] identifier[getItem] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[oldResourceStream] operator[=] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[item] operator[SEP] identifier[getContent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmsException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isErrorEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[LOG_ITEM_NOT_FOUND_1] , identifier[path] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[oldResourceStream] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[numBytesRead] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[copyBuffer] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[BUFFER_SIZE] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[numBytesRead] operator[=] identifier[oldResourceStream] operator[SEP] identifier[read] operator[SEP] identifier[copyBuffer] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { identifier[randAccessContentFile] operator[SEP] identifier[write] operator[SEP] identifier[copyBuffer] , Other[0] , identifier[numBytesRead] operator[SEP] operator[SEP] } identifier[oldResourceStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } identifier[randAccessContentFile] operator[SEP] identifier[setLength] operator[SEP] identifier[range] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[randAccessContentFile] operator[SEP] identifier[seek] operator[SEP] identifier[range] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[numBytesRead] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[transferBuffer] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[BUFFER_SIZE] operator[SEP] operator[SEP] identifier[BufferedInputStream] identifier[requestBufInStream] operator[=] Keyword[new] identifier[BufferedInputStream] operator[SEP] identifier[req] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] , identifier[BUFFER_SIZE] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[numBytesRead] operator[=] identifier[requestBufInStream] operator[SEP] identifier[read] operator[SEP] identifier[transferBuffer] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { identifier[randAccessContentFile] operator[SEP] identifier[write] operator[SEP] identifier[transferBuffer] , Other[0] , identifier[numBytesRead] operator[SEP] operator[SEP] } identifier[randAccessContentFile] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[requestBufInStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[contentFile] operator[SEP] }
private static boolean mayBrowse( final IAuthorizationPrincipal principal, final String targetId) { Validate.notNull(principal, "Cannot determine permissions for a null user."); Validate.notNull(targetId, "Cannot determine permissions on a null target."); return (principal.hasPermission( IPermission.PORTAL_SUBSCRIBE, IPermission.PORTLET_BROWSE_ACTIVITY, targetId)); }
class class_name[name] begin[{] method[mayBrowse, return_type[type[boolean]], modifier[private static], parameter[principal, targetId]] begin[{] call[Validate.notNull, parameter[member[.principal], literal["Cannot determine permissions for a null user."]]] call[Validate.notNull, parameter[member[.targetId], literal["Cannot determine permissions on a null target."]]] return[call[principal.hasPermission, parameter[member[IPermission.PORTAL_SUBSCRIBE], member[IPermission.PORTLET_BROWSE_ACTIVITY], member[.targetId]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[mayBrowse] operator[SEP] Keyword[final] identifier[IAuthorizationPrincipal] identifier[principal] , Keyword[final] identifier[String] identifier[targetId] operator[SEP] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[principal] , literal[String] operator[SEP] operator[SEP] identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[targetId] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[principal] operator[SEP] identifier[hasPermission] operator[SEP] identifier[IPermission] operator[SEP] identifier[PORTAL_SUBSCRIBE] , identifier[IPermission] operator[SEP] identifier[PORTLET_BROWSE_ACTIVITY] , identifier[targetId] operator[SEP] operator[SEP] operator[SEP] }
@CheckForSigned protected int findByte (final byte nValue, final int nPos) { for (int i = nPos; i < m_nTail; i++) if (m_aBuffer[i] == nValue) return i; return -1; }
class class_name[name] begin[{] method[findByte, return_type[type[int]], modifier[protected], parameter[nValue, nPos]] begin[{] ForStatement(body=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=m_aBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=nValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=m_nTail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=nPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[1]] end[}] END[}]
annotation[@] identifier[CheckForSigned] Keyword[protected] Keyword[int] identifier[findByte] operator[SEP] Keyword[final] Keyword[byte] identifier[nValue] , Keyword[final] Keyword[int] identifier[nPos] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[nPos] operator[SEP] identifier[i] operator[<] identifier[m_nTail] operator[SEP] identifier[i] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[m_aBuffer] operator[SEP] identifier[i] operator[SEP] operator[==] identifier[nValue] operator[SEP] Keyword[return] identifier[i] operator[SEP] Keyword[return] operator[-] Other[1] operator[SEP] }
@Override public EClass getMethodMetric() { if (methodMetricEClass == null) { methodMetricEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI).getEClassifiers().get(102); } return methodMetricEClass; }
class class_name[name] begin[{] method[getMethodMetric, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.methodMetricEClass], ==, literal[null]]] begin[{] assign[member[.methodMetricEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=StorePackage, 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=102)], 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[.methodMetricEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getMethodMetric] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[methodMetricEClass] operator[==] Other[null] operator[SEP] { identifier[methodMetricEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[StorePackage] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[102] operator[SEP] operator[SEP] } Keyword[return] identifier[methodMetricEClass] operator[SEP] }
protected boolean eventTargetsPopup(NativeEvent event) { EventTarget target = event.getEventTarget(); if (Element.is(target)) { return getElement().isOrHasChild(Element.as(target)); } return false; }
class class_name[name] begin[{] method[eventTargetsPopup, return_type[type[boolean]], modifier[protected], parameter[event]] begin[{] local_variable[type[EventTarget], target] if[call[Element.is, parameter[member[.target]]]] begin[{] return[call[.getElement, parameter[]]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[eventTargetsPopup] operator[SEP] identifier[NativeEvent] identifier[event] operator[SEP] { identifier[EventTarget] identifier[target] operator[=] identifier[event] operator[SEP] identifier[getEventTarget] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Element] operator[SEP] identifier[is] operator[SEP] identifier[target] operator[SEP] operator[SEP] { Keyword[return] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] identifier[isOrHasChild] operator[SEP] identifier[Element] operator[SEP] identifier[as] operator[SEP] identifier[target] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
private SelectorBuilderImpl multipleValuePredicate(String field, String[] propertyValues, PredicateOperator operator) { if (propertyValues == null) { return this; } Predicate predicate = new Predicate(); predicate.setOperator(operator); predicate.setField(field); String[] values = Arrays.copyOf(propertyValues, propertyValues.length); predicate.setValues(values); this.predicates.add(predicate); return this; }
class class_name[name] begin[{] method[multipleValuePredicate, return_type[type[SelectorBuilderImpl]], modifier[private], parameter[field, propertyValues, operator]] begin[{] if[binary_operation[member[.propertyValues], ==, literal[null]]] begin[{] return[THIS[]] else begin[{] None end[}] local_variable[type[Predicate], predicate] call[predicate.setOperator, parameter[member[.operator]]] call[predicate.setField, parameter[member[.field]]] local_variable[type[String], values] call[predicate.setValues, parameter[member[.values]]] THIS[member[None.predicates]call[None.add, parameter[member[.predicate]]]] return[THIS[]] end[}] END[}]
Keyword[private] identifier[SelectorBuilderImpl] identifier[multipleValuePredicate] operator[SEP] identifier[String] identifier[field] , identifier[String] operator[SEP] operator[SEP] identifier[propertyValues] , identifier[PredicateOperator] identifier[operator] operator[SEP] { Keyword[if] operator[SEP] identifier[propertyValues] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } identifier[Predicate] identifier[predicate] operator[=] Keyword[new] identifier[Predicate] operator[SEP] operator[SEP] operator[SEP] identifier[predicate] operator[SEP] identifier[setOperator] operator[SEP] identifier[operator] operator[SEP] operator[SEP] identifier[predicate] operator[SEP] identifier[setField] operator[SEP] identifier[field] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[values] operator[=] identifier[Arrays] operator[SEP] identifier[copyOf] operator[SEP] identifier[propertyValues] , identifier[propertyValues] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[predicate] operator[SEP] identifier[setValues] operator[SEP] identifier[values] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[predicates] operator[SEP] identifier[add] operator[SEP] identifier[predicate] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public void createMaxXFunction() { createFunction(MAX_X_FUNCTION, new GeometryFunction() { @Override public Object execute(GeoPackageGeometryData data) { Object value = null; GeometryEnvelope envelope = getEnvelope(data); if (envelope != null) { value = envelope.getMaxX(); } return value; } }); }
class class_name[name] begin[{] method[createMaxXFunction, return_type[void], modifier[public], parameter[]] begin[{] call[.createFunction, parameter[member[.MAX_X_FUNCTION], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getEnvelope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=envelope)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GeometryEnvelope, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=envelope, 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=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getMaxX, postfix_operators=[], prefix_operators=[], qualifier=envelope, selectors=[], type_arguments=None)), label=None)])), ReturnStatement(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=execute, parameters=[FormalParameter(annotations=[], modifiers=set(), name=data, type=ReferenceType(arguments=None, dimensions=[], name=GeoPackageGeometryData, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GeometryFunction, sub_type=None))]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[createMaxXFunction] operator[SEP] operator[SEP] { identifier[createFunction] operator[SEP] identifier[MAX_X_FUNCTION] , Keyword[new] identifier[GeometryFunction] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[execute] operator[SEP] identifier[GeoPackageGeometryData] identifier[data] operator[SEP] { identifier[Object] identifier[value] operator[=] Other[null] operator[SEP] identifier[GeometryEnvelope] identifier[envelope] operator[=] identifier[getEnvelope] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[envelope] operator[!=] Other[null] operator[SEP] { identifier[value] operator[=] identifier[envelope] operator[SEP] identifier[getMaxX] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[value] operator[SEP] } } operator[SEP] operator[SEP] }
public static <P> Setting of( String description, ListProperty<P> items, ObjectProperty<P> selection) { return new Setting<>( description, Field.ofSingleSelectionType(items, selection) .label(description) .render(new SimpleComboBoxControl<>()), selection); }
class class_name[name] begin[{] method[of, return_type[type[Setting]], modifier[public static], parameter[description, items, selection]] begin[{] return[ClassCreator(arguments=[MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=items, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=selection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ofSingleSelectionType, postfix_operators=[], prefix_operators=[], qualifier=Field, selectors=[MethodInvocation(arguments=[MemberReference(member=description, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=label, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=SimpleComboBoxControl, sub_type=None))], member=render, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=selection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Setting, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[P] operator[>] identifier[Setting] identifier[of] operator[SEP] identifier[String] identifier[description] , identifier[ListProperty] operator[<] identifier[P] operator[>] identifier[items] , identifier[ObjectProperty] operator[<] identifier[P] operator[>] identifier[selection] operator[SEP] { Keyword[return] Keyword[new] identifier[Setting] operator[<] operator[>] operator[SEP] identifier[description] , identifier[Field] operator[SEP] identifier[ofSingleSelectionType] operator[SEP] identifier[items] , identifier[selection] operator[SEP] operator[SEP] identifier[label] operator[SEP] identifier[description] operator[SEP] operator[SEP] identifier[render] operator[SEP] Keyword[new] identifier[SimpleComboBoxControl] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] , identifier[selection] operator[SEP] operator[SEP] }
public final Future<List<InetAddress>> resolveAll(String inetHost, Iterable<DnsRecord> additionals) { return resolveAll(inetHost, additionals, executor().<List<InetAddress>>newPromise()); }
class class_name[name] begin[{] method[resolveAll, return_type[type[Future]], modifier[final public], parameter[inetHost, additionals]] begin[{] return[call[.resolveAll, parameter[member[.inetHost], member[.additionals], call[.executor, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Future] operator[<] identifier[List] operator[<] identifier[InetAddress] operator[>] operator[>] identifier[resolveAll] operator[SEP] identifier[String] identifier[inetHost] , identifier[Iterable] operator[<] identifier[DnsRecord] operator[>] identifier[additionals] operator[SEP] { Keyword[return] identifier[resolveAll] operator[SEP] identifier[inetHost] , identifier[additionals] , identifier[executor] operator[SEP] operator[SEP] operator[SEP] operator[<] identifier[List] operator[<] identifier[InetAddress] operator[>] operator[>] identifier[newPromise] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static File computeCacheDirectory() { String path = System.getenv("COURSIER_CACHE"); if (path == null) path = System.getProperty("coursier.cache"); File baseXdgDir = new File(coursierDirectories.cacheDir); File xdgDir = new File(baseXdgDir, "v1"); String xdgPath = xdgDir.getAbsolutePath(); if (path == null) { if (baseXdgDir.isDirectory()) path = xdgPath; } if (path == null) { File coursierDotFile = new File(System.getProperty("user.home") + "/.coursier"); if (coursierDotFile.isDirectory()) path = System.getProperty("user.home") + "/.coursier/cache/v1/"; } if (path == null) { path = xdgPath; xdgDir.mkdirs(); } return new File(path).getAbsoluteFile(); }
class class_name[name] begin[{] method[computeCacheDirectory, return_type[type[File]], modifier[private static], parameter[]] begin[{] local_variable[type[String], path] if[binary_operation[member[.path], ==, literal[null]]] begin[{] assign[member[.path], call[System.getProperty, parameter[literal["coursier.cache"]]]] else begin[{] None end[}] local_variable[type[File], baseXdgDir] local_variable[type[File], xdgDir] local_variable[type[String], xdgPath] if[binary_operation[member[.path], ==, literal[null]]] begin[{] if[call[baseXdgDir.isDirectory, parameter[]]] begin[{] assign[member[.path], member[.xdgPath]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.path], ==, literal[null]]] begin[{] local_variable[type[File], coursierDotFile] if[call[coursierDotFile.isDirectory, parameter[]]] begin[{] assign[member[.path], binary_operation[call[System.getProperty, parameter[literal["user.home"]]], +, literal["/.coursier/cache/v1/"]]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.path], ==, literal[null]]] begin[{] assign[member[.path], member[.xdgPath]] call[xdgDir.mkdirs, parameter[]] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getAbsoluteFile, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] end[}] END[}]
Keyword[private] Keyword[static] identifier[File] identifier[computeCacheDirectory] operator[SEP] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[System] operator[SEP] identifier[getenv] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[path] operator[==] Other[null] operator[SEP] identifier[path] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[File] identifier[baseXdgDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[coursierDirectories] operator[SEP] identifier[cacheDir] operator[SEP] operator[SEP] identifier[File] identifier[xdgDir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[baseXdgDir] , literal[String] operator[SEP] operator[SEP] identifier[String] identifier[xdgPath] operator[=] identifier[xdgDir] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[path] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[baseXdgDir] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] identifier[path] operator[=] identifier[xdgPath] operator[SEP] } Keyword[if] operator[SEP] identifier[path] operator[==] Other[null] operator[SEP] { identifier[File] identifier[coursierDotFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[coursierDotFile] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] identifier[path] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] } Keyword[if] operator[SEP] identifier[path] operator[==] Other[null] operator[SEP] { identifier[path] operator[=] identifier[xdgPath] operator[SEP] identifier[xdgDir] operator[SEP] identifier[mkdirs] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[File] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[getAbsoluteFile] operator[SEP] operator[SEP] operator[SEP] }
private boolean notifyOnSkip() { boolean result = true; NavigationPreference selectedNavigationPreference = navigationFragment.getSelectedNavigationPreference(); if (selectedNavigationPreference != null && preferenceFragment != null) { for (WizardListener listener : wizardListeners) { result &= listener.onSkip(selectedNavigationPreference, preferenceFragment, selectedPreferenceFragmentArguments); } } return result; }
class class_name[name] begin[{] method[notifyOnSkip, return_type[type[boolean]], modifier[private], parameter[]] begin[{] local_variable[type[boolean], result] local_variable[type[NavigationPreference], selectedNavigationPreference] if[binary_operation[binary_operation[member[.selectedNavigationPreference], !=, literal[null]], &&, binary_operation[member[.preferenceFragment], !=, literal[null]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=&=, value=MethodInvocation(arguments=[MemberReference(member=selectedNavigationPreference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=preferenceFragment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=selectedPreferenceFragmentArguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onSkip, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=wizardListeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=listener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WizardListener, sub_type=None))), label=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[notifyOnSkip] operator[SEP] operator[SEP] { Keyword[boolean] identifier[result] operator[=] literal[boolean] operator[SEP] identifier[NavigationPreference] identifier[selectedNavigationPreference] operator[=] identifier[navigationFragment] operator[SEP] identifier[getSelectedNavigationPreference] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[selectedNavigationPreference] operator[!=] Other[null] operator[&&] identifier[preferenceFragment] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[WizardListener] identifier[listener] operator[:] identifier[wizardListeners] operator[SEP] { identifier[result] operator[&=] identifier[listener] operator[SEP] identifier[onSkip] operator[SEP] identifier[selectedNavigationPreference] , identifier[preferenceFragment] , identifier[selectedPreferenceFragmentArguments] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
public static String extractIPAddress(final HttpServletRequest request) { String ip = request.getHeader("x-forwarded-for"); if (isIPAdressValid(ip)) { return ip; } ip = request.getHeader("Proxy-Client-IP"); if (isIPAdressValid(ip)) { return ip; } ip = request.getHeader("WL-Proxy-Client-IP"); if (isIPAdressValid(ip)) { return ip; } return request.getRemoteAddr(); }
class class_name[name] begin[{] method[extractIPAddress, return_type[type[String]], modifier[public static], parameter[request]] begin[{] local_variable[type[String], ip] if[call[.isIPAdressValid, parameter[member[.ip]]]] begin[{] return[member[.ip]] else begin[{] None end[}] assign[member[.ip], call[request.getHeader, parameter[literal["Proxy-Client-IP"]]]] if[call[.isIPAdressValid, parameter[member[.ip]]]] begin[{] return[member[.ip]] else begin[{] None end[}] assign[member[.ip], call[request.getHeader, parameter[literal["WL-Proxy-Client-IP"]]]] if[call[.isIPAdressValid, parameter[member[.ip]]]] begin[{] return[member[.ip]] else begin[{] None end[}] return[call[request.getRemoteAddr, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[extractIPAddress] operator[SEP] Keyword[final] identifier[HttpServletRequest] identifier[request] operator[SEP] { identifier[String] identifier[ip] operator[=] identifier[request] operator[SEP] identifier[getHeader] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isIPAdressValid] operator[SEP] identifier[ip] operator[SEP] operator[SEP] { Keyword[return] identifier[ip] operator[SEP] } identifier[ip] operator[=] identifier[request] operator[SEP] identifier[getHeader] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isIPAdressValid] operator[SEP] identifier[ip] operator[SEP] operator[SEP] { Keyword[return] identifier[ip] operator[SEP] } identifier[ip] operator[=] identifier[request] operator[SEP] identifier[getHeader] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isIPAdressValid] operator[SEP] identifier[ip] operator[SEP] operator[SEP] { Keyword[return] identifier[ip] operator[SEP] } Keyword[return] identifier[request] operator[SEP] identifier[getRemoteAddr] operator[SEP] operator[SEP] operator[SEP] }
public void setSection (Section section) { _sections.put(key(section.x, section.y), section); }
class class_name[name] begin[{] method[setSection, return_type[void], modifier[public], parameter[section]] begin[{] call[_sections.put, parameter[call[.key, parameter[member[section.x], member[section.y]]], member[.section]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSection] operator[SEP] identifier[Section] identifier[section] operator[SEP] { identifier[_sections] operator[SEP] identifier[put] operator[SEP] identifier[key] operator[SEP] identifier[section] operator[SEP] identifier[x] , identifier[section] operator[SEP] identifier[y] operator[SEP] , identifier[section] operator[SEP] operator[SEP] }
public UpdateRequest updateUpdateRequest(long sheetId, UpdateRequest updateRequest) throws SmartsheetException { return this.updateResource("sheets/" + sheetId + "/updaterequests/" + updateRequest.getId(), UpdateRequest.class, updateRequest); }
class class_name[name] begin[{] method[updateUpdateRequest, return_type[type[UpdateRequest]], modifier[public], parameter[sheetId, updateRequest]] begin[{] return[THIS[call[None.updateResource, parameter[binary_operation[binary_operation[binary_operation[literal["sheets/"], +, member[.sheetId]], +, literal["/updaterequests/"]], +, call[updateRequest.getId, parameter[]]], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UpdateRequest, sub_type=None)), member[.updateRequest]]]]] end[}] END[}]
Keyword[public] identifier[UpdateRequest] identifier[updateUpdateRequest] operator[SEP] Keyword[long] identifier[sheetId] , identifier[UpdateRequest] identifier[updateRequest] operator[SEP] Keyword[throws] identifier[SmartsheetException] { Keyword[return] Keyword[this] operator[SEP] identifier[updateResource] operator[SEP] literal[String] operator[+] identifier[sheetId] operator[+] literal[String] operator[+] identifier[updateRequest] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[UpdateRequest] operator[SEP] Keyword[class] , identifier[updateRequest] operator[SEP] operator[SEP] }
public void onItemClick() { if (selected) { selected = false; getView().reset(); if (onResetCommand != null) { onResetCommand.execute(); } } else { selected = true; getView().select(); if (onSelectCommand != null) { onSelectCommand.execute(); } } }
class class_name[name] begin[{] method[onItemClick, return_type[void], modifier[public], parameter[]] begin[{] if[member[.selected]] begin[{] assign[member[.selected], literal[false]] call[.getView, parameter[]] if[binary_operation[member[.onResetCommand], !=, literal[null]]] begin[{] call[onResetCommand.execute, parameter[]] else begin[{] None end[}] else begin[{] assign[member[.selected], literal[true]] call[.getView, parameter[]] if[binary_operation[member[.onSelectCommand], !=, literal[null]]] begin[{] call[onSelectCommand.execute, parameter[]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[onItemClick] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[selected] operator[SEP] { identifier[selected] operator[=] literal[boolean] operator[SEP] identifier[getView] operator[SEP] operator[SEP] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[onResetCommand] operator[!=] Other[null] operator[SEP] { identifier[onResetCommand] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[selected] operator[=] literal[boolean] operator[SEP] identifier[getView] operator[SEP] operator[SEP] operator[SEP] identifier[select] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[onSelectCommand] operator[!=] Other[null] operator[SEP] { identifier[onSelectCommand] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] } } }
public static float cublasSdot(int n, Pointer x, int incx, Pointer y, int incy) { float result = cublasSdotNative(n, x, incx, y, incy); checkResultBLAS(); return result; }
class class_name[name] begin[{] method[cublasSdot, return_type[type[float]], modifier[public static], parameter[n, x, incx, y, incy]] begin[{] local_variable[type[float], result] call[.checkResultBLAS, parameter[]] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[float] identifier[cublasSdot] operator[SEP] Keyword[int] identifier[n] , identifier[Pointer] identifier[x] , Keyword[int] identifier[incx] , identifier[Pointer] identifier[y] , Keyword[int] identifier[incy] operator[SEP] { Keyword[float] identifier[result] operator[=] identifier[cublasSdotNative] operator[SEP] identifier[n] , identifier[x] , identifier[incx] , identifier[y] , identifier[incy] operator[SEP] operator[SEP] identifier[checkResultBLAS] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static void main(String[] args) { // Parse the command line options ArgumentsLoader.parse(args); // Load the configuration Config config = ArgumentsLoader.getConfig(); // Initialise the system with the given arguments if (!init(config)) { return; } // load all extensions if (!Program.loadExtensions(config)) { return; } // Start the engine start(config); // Wait until the agents become idle waitUntilIdle(); // finish up finish(); }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] call[ArgumentsLoader.parse, parameter[member[.args]]] local_variable[type[Config], config] if[call[.init, parameter[member[.config]]]] begin[{] return[None] else begin[{] None end[}] if[call[Program.loadExtensions, parameter[member[.config]]]] begin[{] return[None] else begin[{] None end[}] call[.start, parameter[member[.config]]] call[.waitUntilIdle, parameter[]] call[.finish, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { identifier[ArgumentsLoader] operator[SEP] identifier[parse] operator[SEP] identifier[args] operator[SEP] operator[SEP] identifier[Config] identifier[config] operator[=] identifier[ArgumentsLoader] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[init] operator[SEP] identifier[config] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[Program] operator[SEP] identifier[loadExtensions] operator[SEP] identifier[config] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[start] operator[SEP] identifier[config] operator[SEP] operator[SEP] identifier[waitUntilIdle] operator[SEP] operator[SEP] operator[SEP] identifier[finish] operator[SEP] operator[SEP] operator[SEP] }
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case COLUMN_FAMILY: return isSetColumn_family(); case SUPER_COLUMN: return isSetSuper_column(); case COLUMN: return isSetColumn(); } throw new IllegalStateException(); }
class class_name[name] begin[{] method[isSet, return_type[type[boolean]], modifier[public], parameter[field]] begin[{] if[binary_operation[member[.field], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] SwitchStatement(cases=[SwitchStatementCase(case=['COLUMN_FAMILY'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=isSetColumn_family, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['SUPER_COLUMN'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=isSetSuper_column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['COLUMN'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=isSetColumn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) ThrowStatement(expression=ClassCreator(arguments=[], 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) end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isSet] operator[SEP] identifier[_Fields] identifier[field] operator[SEP] { Keyword[if] operator[SEP] identifier[field] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } Keyword[switch] operator[SEP] identifier[field] operator[SEP] { Keyword[case] identifier[COLUMN_FAMILY] operator[:] Keyword[return] identifier[isSetColumn_family] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[SUPER_COLUMN] operator[:] Keyword[return] identifier[isSetSuper_column] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[COLUMN] operator[:] Keyword[return] identifier[isSetColumn] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(GetGroupRequest getGroupRequest, ProtocolMarshaller protocolMarshaller) { if (getGroupRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getGroupRequest.getGroupId(), GROUPID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[getGroupRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.getGroupRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getGroupId, postfix_operators=[], prefix_operators=[], qualifier=getGroupRequest, selectors=[], type_arguments=None), MemberReference(member=GROUPID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetGroupRequest] identifier[getGroupRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[getGroupRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[getGroupRequest] operator[SEP] identifier[getGroupId] operator[SEP] operator[SEP] , identifier[GROUPID_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public final void batchWriteSpans(ProjectName name, List<Span> spans) { BatchWriteSpansRequest request = BatchWriteSpansRequest.newBuilder() .setName(name == null ? null : name.toString()) .addAllSpans(spans) .build(); batchWriteSpans(request); }
class class_name[name] begin[{] method[batchWriteSpans, return_type[void], modifier[final public], parameter[name, spans]] begin[{] local_variable[type[BatchWriteSpansRequest], request] call[.batchWriteSpans, parameter[member[.request]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[batchWriteSpans] operator[SEP] identifier[ProjectName] identifier[name] , identifier[List] operator[<] identifier[Span] operator[>] identifier[spans] operator[SEP] { identifier[BatchWriteSpansRequest] identifier[request] operator[=] identifier[BatchWriteSpansRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setName] operator[SEP] identifier[name] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[name] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addAllSpans] operator[SEP] identifier[spans] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[batchWriteSpans] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
private static Scope getRootScope() { if (root == null) { synchronized (Scope.class) { root = new Scope(true); root.create("pi").makeConstant(Math.PI); root.create("euler").makeConstant(Math.E); } } return root; }
class class_name[name] begin[{] method[getRootScope, return_type[type[Scope]], modifier[private static], parameter[]] begin[{] if[binary_operation[member[.root], ==, literal[null]]] begin[{] SYNCHRONIZED[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Scope, sub_type=None))] BEGIN[{] assign[member[.root], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Scope, sub_type=None))] call[root.create, parameter[literal["pi"]]] call[root.create, parameter[literal["euler"]]] END[}] else begin[{] None end[}] return[member[.root]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Scope] identifier[getRootScope] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[root] operator[==] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[Scope] operator[SEP] Keyword[class] operator[SEP] { identifier[root] operator[=] Keyword[new] identifier[Scope] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[root] operator[SEP] identifier[create] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[makeConstant] operator[SEP] identifier[Math] operator[SEP] identifier[PI] operator[SEP] operator[SEP] identifier[root] operator[SEP] identifier[create] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[makeConstant] operator[SEP] identifier[Math] operator[SEP] identifier[E] operator[SEP] operator[SEP] } } Keyword[return] identifier[root] operator[SEP] }
public ConfigParseOptions setOriginDescription(String originDescription) { // findbugs complains about == here but is wrong, do not "fix" if (this.originDescription == originDescription) return this; else if (this.originDescription != null && originDescription != null && this.originDescription.equals(originDescription)) return this; else return new ConfigParseOptions(this.syntax, originDescription, this.allowMissing, this.includer, this.classLoader); }
class class_name[name] begin[{] method[setOriginDescription, return_type[type[ConfigParseOptions]], modifier[public], parameter[originDescription]] begin[{] if[binary_operation[THIS[member[None.originDescription]], ==, member[.originDescription]]] begin[{] return[THIS[]] else begin[{] if[binary_operation[binary_operation[binary_operation[THIS[member[None.originDescription]], !=, literal[null]], &&, binary_operation[member[.originDescription], !=, literal[null]]], &&, THIS[member[None.originDescription]call[None.equals, parameter[member[.originDescription]]]]]] begin[{] return[THIS[]] else begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=syntax, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=originDescription, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=allowMissing, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=includer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=classLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ConfigParseOptions, sub_type=None))] end[}] end[}] end[}] END[}]
Keyword[public] identifier[ConfigParseOptions] identifier[setOriginDescription] operator[SEP] identifier[String] identifier[originDescription] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[originDescription] operator[==] identifier[originDescription] operator[SEP] Keyword[return] Keyword[this] operator[SEP] Keyword[else] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[originDescription] operator[!=] Other[null] operator[&&] identifier[originDescription] operator[!=] Other[null] operator[&&] Keyword[this] operator[SEP] identifier[originDescription] operator[SEP] identifier[equals] operator[SEP] identifier[originDescription] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] Keyword[else] Keyword[return] Keyword[new] identifier[ConfigParseOptions] operator[SEP] Keyword[this] operator[SEP] identifier[syntax] , identifier[originDescription] , Keyword[this] operator[SEP] identifier[allowMissing] , Keyword[this] operator[SEP] identifier[includer] , Keyword[this] operator[SEP] identifier[classLoader] operator[SEP] operator[SEP] }
@SuppressWarnings({"unchecked", "rawtypes"}) public Collection<KeywordAnnotation> parseKeywordAnnotations() throws EnhancementParserException { Multimap<Enhancement, String> relations = ArrayListMultimap.create(); Map<String, Enhancement> enhancementsByUri = Maps.newHashMap(); try { RepositoryConnection conn = repository.getConnection(); conn.begin(); Collection<KeywordAnnotation> kas = parseKeywordAnnotations(conn, relations, enhancementsByUri); Collection<KeywordAnnotation> result = (Collection) resolveRelations( relations, conn); // Safe Casting for (KeywordAnnotation ka : kas) if (!result.contains(ka)) result.add(ka); conn.close(); return result; } catch (RepositoryException e) { throw new EnhancementParserException("Error querying the RDF Model obtained as Service Response", e); } }
class class_name[name] begin[{] method[parseKeywordAnnotations, return_type[type[Collection]], modifier[public], parameter[]] begin[{] local_variable[type[Multimap], relations] local_variable[type[Map], enhancementsByUri] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getConnection, postfix_operators=[], prefix_operators=[], qualifier=repository, selectors=[], type_arguments=None), name=conn)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RepositoryConnection, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=begin, postfix_operators=[], prefix_operators=[], qualifier=conn, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=relations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=enhancementsByUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseKeywordAnnotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=kas)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=KeywordAnnotation, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=relations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveRelations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Collection, sub_type=None)), name=result)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=KeywordAnnotation, sub_type=None))], dimensions=[], name=Collection, sub_type=None)), ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=ka, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=result, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ka, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)), control=EnhancedForControl(iterable=MemberReference(member=kas, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ka)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=KeywordAnnotation, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=conn, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error querying the RDF Model obtained as Service Response"), 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=EnhancementParserException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RepositoryException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[public] identifier[Collection] operator[<] identifier[KeywordAnnotation] operator[>] identifier[parseKeywordAnnotations] operator[SEP] operator[SEP] Keyword[throws] identifier[EnhancementParserException] { identifier[Multimap] operator[<] identifier[Enhancement] , identifier[String] operator[>] identifier[relations] operator[=] identifier[ArrayListMultimap] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Enhancement] operator[>] identifier[enhancementsByUri] operator[=] identifier[Maps] operator[SEP] identifier[newHashMap] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[RepositoryConnection] identifier[conn] operator[=] identifier[repository] operator[SEP] identifier[getConnection] operator[SEP] operator[SEP] operator[SEP] identifier[conn] operator[SEP] identifier[begin] operator[SEP] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[KeywordAnnotation] operator[>] identifier[kas] operator[=] identifier[parseKeywordAnnotations] operator[SEP] identifier[conn] , identifier[relations] , identifier[enhancementsByUri] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[KeywordAnnotation] operator[>] identifier[result] operator[=] operator[SEP] identifier[Collection] operator[SEP] identifier[resolveRelations] operator[SEP] identifier[relations] , identifier[conn] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[KeywordAnnotation] identifier[ka] operator[:] identifier[kas] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[result] operator[SEP] identifier[contains] operator[SEP] identifier[ka] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[ka] operator[SEP] operator[SEP] identifier[conn] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] } Keyword[catch] operator[SEP] identifier[RepositoryException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[EnhancementParserException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
@Override public void flush(int requestNumber) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "flush", "" + requestNumber); try { // Make sure it is stopped before we activate it if (mainConsumer.isStarted()) getConsumerSession().stop(); getConsumerSession().activateAsynchConsumer(true); if (mainConsumer.isStarted()) getConsumerSession().start(false); short jfapPriority = JFapChannelConstants.getJFAPPriority(Integer.valueOf(mainConsumer.getLowestPriority())); // d172528 if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Sending with JFAP priority of " + jfapPriority); // d172528 try { getConversation().send(poolManager.allocate(), JFapChannelConstants.SEG_FLUSH_SESS_R, requestNumber, jfapPriority, true, ThrottlingPolicy.BLOCK_THREAD, null); } catch (SIException e) { FFDCFilter.processException(e, CLASS_NAME + ".flush", CommsConstants.CATASYNCHCONSUMER_FLUSH_01, this); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(tc, e.getMessage(), e); SibTr.error(tc, "COMMUNICATION_ERROR_SICO2017", e); } } catch (SIException e) { //No FFDC code needed //Only FFDC if we haven't received a meTerminated event. if (!((ConversationState) getConversation().getAttachment()).hasMETerminated()) { FFDCFilter.processException(e, CLASS_NAME + ".flush", CommsConstants.CATASYNCHCONSUMER_FLUSH_02, this); } if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, e.getMessage(), e); StaticCATHelper.sendExceptionToClient(e, CommsConstants.CATASYNCHCONSUMER_FLUSH_02, getConversation(), requestNumber); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "flush"); }
class class_name[name] begin[{] method[flush, return_type[void], modifier[public], parameter[requestNumber]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["flush"], binary_operation[literal[""], +, member[.requestNumber]]]] else begin[{] None end[}] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isStarted, postfix_operators=[], prefix_operators=[], qualifier=mainConsumer, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=getConsumerSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=stop, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getConsumerSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=activateAsynchConsumer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isStarted, postfix_operators=[], prefix_operators=[], qualifier=mainConsumer, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[], member=getConsumerSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=start, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLowestPriority, postfix_operators=[], prefix_operators=[], qualifier=mainConsumer, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], member=getJFAPPriority, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[], type_arguments=None), name=jfapPriority)], modifiers=set(), type=BasicType(dimensions=[], name=short)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Sending with JFAP priority of "), operandr=MemberReference(member=jfapPriority, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getConversation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=allocate, postfix_operators=[], prefix_operators=[], qualifier=poolManager, selectors=[], type_arguments=None), MemberReference(member=SEG_FLUSH_SESS_R, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[]), MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=jfapPriority, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), MemberReference(member=BLOCK_THREAD, postfix_operators=[], prefix_operators=[], qualifier=ThrottlingPolicy, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=send, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".flush"), operator=+), MemberReference(member=CATASYNCHCONSUMER_FLUSH_01, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="COMMUNICATION_ERROR_SICO2017"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIException']))], finally_block=None, label=None, resources=None)], catches=[CatchClause(block=[IfStatement(condition=Cast(expression=MethodInvocation(arguments=[], member=getConversation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getAttachment, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ConversationState, sub_type=None)), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".flush"), operator=+), MemberReference(member=CATASYNCHCONSUMER_FLUSH_02, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CATASYNCHCONSUMER_FLUSH_02, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[]), MethodInvocation(arguments=[], member=getConversation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendExceptionToClient, postfix_operators=[], prefix_operators=[], qualifier=StaticCATHelper, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIException']))], finally_block=None, label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["flush"]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[flush] operator[SEP] Keyword[int] identifier[requestNumber] 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] , literal[String] operator[+] identifier[requestNumber] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[mainConsumer] operator[SEP] identifier[isStarted] operator[SEP] operator[SEP] operator[SEP] identifier[getConsumerSession] operator[SEP] operator[SEP] operator[SEP] identifier[stop] operator[SEP] operator[SEP] operator[SEP] identifier[getConsumerSession] operator[SEP] operator[SEP] operator[SEP] identifier[activateAsynchConsumer] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mainConsumer] operator[SEP] identifier[isStarted] operator[SEP] operator[SEP] operator[SEP] identifier[getConsumerSession] operator[SEP] operator[SEP] operator[SEP] identifier[start] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[short] identifier[jfapPriority] operator[=] identifier[JFapChannelConstants] operator[SEP] identifier[getJFAPPriority] operator[SEP] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[mainConsumer] operator[SEP] identifier[getLowestPriority] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[jfapPriority] operator[SEP] operator[SEP] Keyword[try] { identifier[getConversation] operator[SEP] operator[SEP] operator[SEP] identifier[send] operator[SEP] identifier[poolManager] operator[SEP] identifier[allocate] operator[SEP] operator[SEP] , identifier[JFapChannelConstants] operator[SEP] identifier[SEG_FLUSH_SESS_R] , identifier[requestNumber] , identifier[jfapPriority] , literal[boolean] , identifier[ThrottlingPolicy] operator[SEP] identifier[BLOCK_THREAD] , Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SIException] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[CommsConstants] operator[SEP] identifier[CATASYNCHCONSUMER_FLUSH_01] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SIException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] operator[SEP] identifier[ConversationState] operator[SEP] identifier[getConversation] operator[SEP] operator[SEP] operator[SEP] identifier[getAttachment] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[hasMETerminated] operator[SEP] operator[SEP] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[CommsConstants] operator[SEP] identifier[CATASYNCHCONSUMER_FLUSH_02] , Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] identifier[StaticCATHelper] operator[SEP] identifier[sendExceptionToClient] operator[SEP] identifier[e] , identifier[CommsConstants] operator[SEP] identifier[CATASYNCHCONSUMER_FLUSH_02] , identifier[getConversation] operator[SEP] operator[SEP] , identifier[requestNumber] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public static Matcher<AssignmentTree> assignment( final Matcher<ExpressionTree> variableMatcher, final Matcher<? super ExpressionTree> expressionMatcher) { return new Matcher<AssignmentTree>() { @Override public boolean matches(AssignmentTree t, VisitorState state) { return variableMatcher.matches(t.getVariable(), state) && expressionMatcher.matches(t.getExpression(), state); } }; }
class class_name[name] begin[{] method[assignment, return_type[type[Matcher]], modifier[public static], parameter[variableMatcher, expressionMatcher]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getVariable, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matches, postfix_operators=[], prefix_operators=[], qualifier=variableMatcher, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getExpression, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matches, postfix_operators=[], prefix_operators=[], qualifier=expressionMatcher, selectors=[], type_arguments=None), operator=&&), label=None)], documentation=None, modifiers={'public'}, name=matches, parameters=[FormalParameter(annotations=[], modifiers=set(), name=t, type=ReferenceType(arguments=None, dimensions=[], name=AssignmentTree, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=state, type=ReferenceType(arguments=None, dimensions=[], name=VisitorState, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AssignmentTree, sub_type=None))], dimensions=None, name=Matcher, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Matcher] operator[<] identifier[AssignmentTree] operator[>] identifier[assignment] operator[SEP] Keyword[final] identifier[Matcher] operator[<] identifier[ExpressionTree] operator[>] identifier[variableMatcher] , Keyword[final] identifier[Matcher] operator[<] operator[?] Keyword[super] identifier[ExpressionTree] operator[>] identifier[expressionMatcher] operator[SEP] { Keyword[return] Keyword[new] identifier[Matcher] operator[<] identifier[AssignmentTree] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[matches] operator[SEP] identifier[AssignmentTree] identifier[t] , identifier[VisitorState] identifier[state] operator[SEP] { Keyword[return] identifier[variableMatcher] operator[SEP] identifier[matches] operator[SEP] identifier[t] operator[SEP] identifier[getVariable] operator[SEP] operator[SEP] , identifier[state] operator[SEP] operator[&&] identifier[expressionMatcher] operator[SEP] identifier[matches] operator[SEP] identifier[t] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] , identifier[state] operator[SEP] operator[SEP] } } operator[SEP] }
public void draw() { //================================================================= //Now plot the STP with the Utility.PlotSTPTemporalModule class //================================================================= PlotSTPTemporalModule view; Toolkit tk = Toolkit.getDefaultToolkit(); int xSize = ((int) tk.getScreenSize().getWidth()); int ySize = ((int) tk.getScreenSize().getHeight()); //int ySize = 500; //GIVE tm TO VISIUALIZER view = new PlotSTPTemporalModule(this, xSize, ySize); JFrame myFrame = new JFrame("Simple Temporal Network"); Container pane = myFrame.getContentPane(); pane.setLayout(new BorderLayout()); pane.add(view, BorderLayout.NORTH); myFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); myFrame.setSize(xSize,ySize); myFrame.pack(); myFrame.setVisible(true); view.touchLBUBNodes(); //================================================================= //End STP plotting //================================================================= }
class class_name[name] begin[{] method[draw, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[PlotSTPTemporalModule], view] local_variable[type[Toolkit], tk] local_variable[type[int], xSize] local_variable[type[int], ySize] assign[member[.view], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=xSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ySize, 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=PlotSTPTemporalModule, sub_type=None))] local_variable[type[JFrame], myFrame] local_variable[type[Container], pane] call[pane.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BorderLayout, sub_type=None))]] call[pane.add, parameter[member[.view], member[BorderLayout.NORTH]]] call[myFrame.setDefaultCloseOperation, parameter[member[JFrame.DISPOSE_ON_CLOSE]]] call[myFrame.setSize, parameter[member[.xSize], member[.ySize]]] call[myFrame.pack, parameter[]] call[myFrame.setVisible, parameter[literal[true]]] call[view.touchLBUBNodes, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[draw] operator[SEP] operator[SEP] { identifier[PlotSTPTemporalModule] identifier[view] operator[SEP] identifier[Toolkit] identifier[tk] operator[=] identifier[Toolkit] operator[SEP] identifier[getDefaultToolkit] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[xSize] operator[=] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[tk] operator[SEP] identifier[getScreenSize] operator[SEP] operator[SEP] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[ySize] operator[=] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[tk] operator[SEP] identifier[getScreenSize] operator[SEP] operator[SEP] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[view] operator[=] Keyword[new] identifier[PlotSTPTemporalModule] operator[SEP] Keyword[this] , identifier[xSize] , identifier[ySize] operator[SEP] operator[SEP] identifier[JFrame] identifier[myFrame] operator[=] Keyword[new] identifier[JFrame] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Container] identifier[pane] operator[=] identifier[myFrame] operator[SEP] identifier[getContentPane] operator[SEP] operator[SEP] operator[SEP] identifier[pane] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[BorderLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pane] operator[SEP] identifier[add] operator[SEP] identifier[view] , identifier[BorderLayout] operator[SEP] identifier[NORTH] operator[SEP] operator[SEP] identifier[myFrame] operator[SEP] identifier[setDefaultCloseOperation] operator[SEP] identifier[JFrame] operator[SEP] identifier[DISPOSE_ON_CLOSE] operator[SEP] operator[SEP] identifier[myFrame] operator[SEP] identifier[setSize] operator[SEP] identifier[xSize] , identifier[ySize] operator[SEP] operator[SEP] identifier[myFrame] operator[SEP] identifier[pack] operator[SEP] operator[SEP] operator[SEP] identifier[myFrame] operator[SEP] identifier[setVisible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[view] operator[SEP] identifier[touchLBUBNodes] operator[SEP] operator[SEP] operator[SEP] }
@Override public List<ExportFormat> exportFormats(IssueServiceConfiguration issueServiceConfiguration) { return issueExportServiceFactory.getIssueExportServices().stream() .map(IssueExportService::getExportFormat) .collect(Collectors.toList()); }
class class_name[name] begin[{] method[exportFormats, return_type[type[List]], modifier[public], parameter[issueServiceConfiguration]] begin[{] return[call[issueExportServiceFactory.getIssueExportServices, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[ExportFormat] operator[>] identifier[exportFormats] operator[SEP] identifier[IssueServiceConfiguration] identifier[issueServiceConfiguration] operator[SEP] { Keyword[return] identifier[issueExportServiceFactory] operator[SEP] identifier[getIssueExportServices] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[IssueExportService] operator[::] identifier[getExportFormat] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@PublicEvolving static <T extends Writable> TypeInformation<T> getWritableTypeInfo(Class<T> typeClass) { if (Writable.class.isAssignableFrom(typeClass) && !typeClass.equals(Writable.class)) { return new WritableTypeInfo<T>(typeClass); } else { throw new InvalidTypesException("The given class is no subclass of " + Writable.class.getName()); } }
class class_name[name] begin[{] method[getWritableTypeInfo, return_type[type[TypeInformation]], modifier[static], parameter[typeClass]] begin[{] if[binary_operation[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=typeClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Writable, sub_type=None)), &&, call[typeClass.equals, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Writable, sub_type=None))]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=typeClass, 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=T, sub_type=None))], dimensions=None, name=WritableTypeInfo, sub_type=None))] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The given class is no subclass of "), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Writable, sub_type=None)), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidTypesException, sub_type=None)), label=None) end[}] end[}] END[}]
annotation[@] identifier[PublicEvolving] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Writable] operator[>] identifier[TypeInformation] operator[<] identifier[T] operator[>] identifier[getWritableTypeInfo] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[typeClass] operator[SEP] { Keyword[if] operator[SEP] identifier[Writable] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[typeClass] operator[SEP] operator[&&] operator[!] identifier[typeClass] operator[SEP] identifier[equals] operator[SEP] identifier[Writable] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[WritableTypeInfo] operator[<] identifier[T] operator[>] operator[SEP] identifier[typeClass] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[InvalidTypesException] operator[SEP] literal[String] operator[+] identifier[Writable] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException { if (null == context || null == component) { throw new NullPointerException(); } try { methodBinding.invoke(context, new Object[] {context, component, value}); } catch (EvaluationException ee) { Throwable cause = this.getExpectedCause(ValidatorException.class, ee); if (cause instanceof ValidatorException) { throw ((ValidatorException) cause); } if (cause instanceof RuntimeException) { throw ((RuntimeException) cause); } throw new IllegalStateException(ee); } }
class class_name[name] begin[{] method[validate, return_type[void], modifier[public], parameter[context, component, value]] begin[{] if[binary_operation[binary_operation[literal[null], ==, member[.context]], ||, binary_operation[literal[null], ==, member[.component]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, 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=invoke, postfix_operators=[], prefix_operators=[], qualifier=methodBinding, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ValidatorException, sub_type=None)), MemberReference(member=ee, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getExpectedCause, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=cause)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ValidatorException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=Cast(expression=MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ValidatorException, sub_type=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=RuntimeException, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=Cast(expression=MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RuntimeException, sub_type=None)), label=None)])), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ee, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ee, types=['EvaluationException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[validate] operator[SEP] identifier[FacesContext] identifier[context] , identifier[UIComponent] identifier[component] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[ValidatorException] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[context] operator[||] Other[null] operator[==] identifier[component] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[methodBinding] operator[SEP] identifier[invoke] operator[SEP] identifier[context] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[context] , identifier[component] , identifier[value] } operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[EvaluationException] identifier[ee] operator[SEP] { identifier[Throwable] identifier[cause] operator[=] Keyword[this] operator[SEP] identifier[getExpectedCause] operator[SEP] identifier[ValidatorException] operator[SEP] Keyword[class] , identifier[ee] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cause] Keyword[instanceof] identifier[ValidatorException] operator[SEP] { Keyword[throw] operator[SEP] operator[SEP] identifier[ValidatorException] operator[SEP] identifier[cause] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[cause] Keyword[instanceof] identifier[RuntimeException] operator[SEP] { Keyword[throw] operator[SEP] operator[SEP] identifier[RuntimeException] operator[SEP] identifier[cause] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[ee] operator[SEP] operator[SEP] } }
public void init(CEEvaluator ceEval, BaseTypeFactory factory, ClauseFactory clauseFactory, ServerDDS sdds, List<AST> nodes) { this.ceEval = ceEval; this.clauseFactory = clauseFactory; this.factory = factory; this.sdds = sdds; this.root = this; for(AST node : nodes) node.setRoot(this); }
class class_name[name] begin[{] method[init, return_type[void], modifier[public], parameter[ceEval, factory, clauseFactory, sdds, nodes]] begin[{] assign[THIS[member[None.ceEval]], member[.ceEval]] assign[THIS[member[None.clauseFactory]], member[.clauseFactory]] assign[THIS[member[None.factory]], member[.factory]] assign[THIS[member[None.sdds]], member[.sdds]] assign[THIS[member[None.root]], THIS[]] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=setRoot, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MemberReference(member=nodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AST, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[init] operator[SEP] identifier[CEEvaluator] identifier[ceEval] , identifier[BaseTypeFactory] identifier[factory] , identifier[ClauseFactory] identifier[clauseFactory] , identifier[ServerDDS] identifier[sdds] , identifier[List] operator[<] identifier[AST] operator[>] identifier[nodes] operator[SEP] { Keyword[this] operator[SEP] identifier[ceEval] operator[=] identifier[ceEval] operator[SEP] Keyword[this] operator[SEP] identifier[clauseFactory] operator[=] identifier[clauseFactory] operator[SEP] Keyword[this] operator[SEP] identifier[factory] operator[=] identifier[factory] operator[SEP] Keyword[this] operator[SEP] identifier[sdds] operator[=] identifier[sdds] operator[SEP] Keyword[this] operator[SEP] identifier[root] operator[=] Keyword[this] operator[SEP] Keyword[for] operator[SEP] identifier[AST] identifier[node] operator[:] identifier[nodes] operator[SEP] identifier[node] operator[SEP] identifier[setRoot] operator[SEP] Keyword[this] operator[SEP] operator[SEP] }
public void addMailHost(String hostname, String order, String protocol, String username, String password) { addMailHost(hostname, "25", order, protocol, null, username, password); }
class class_name[name] begin[{] method[addMailHost, return_type[void], modifier[public], parameter[hostname, order, protocol, username, password]] begin[{] call[.addMailHost, parameter[member[.hostname], literal["25"], member[.order], member[.protocol], literal[null], member[.username], member[.password]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addMailHost] operator[SEP] identifier[String] identifier[hostname] , identifier[String] identifier[order] , identifier[String] identifier[protocol] , identifier[String] identifier[username] , identifier[String] identifier[password] operator[SEP] { identifier[addMailHost] operator[SEP] identifier[hostname] , literal[String] , identifier[order] , identifier[protocol] , Other[null] , identifier[username] , identifier[password] operator[SEP] operator[SEP] }
public synchronized Object get(@Sensitive String key) { Object curEntry = primaryTable.get(key); // Not found in primary if (curEntry == null) { curEntry = secondaryTable.get(key); // Not found in primary or secondary if (curEntry == null) { curEntry = tertiaryTable.get(key); } } return curEntry; }
class class_name[name] begin[{] method[get, return_type[type[Object]], modifier[synchronized public], parameter[key]] begin[{] local_variable[type[Object], curEntry] if[binary_operation[member[.curEntry], ==, literal[null]]] begin[{] assign[member[.curEntry], call[secondaryTable.get, parameter[member[.key]]]] if[binary_operation[member[.curEntry], ==, literal[null]]] begin[{] assign[member[.curEntry], call[tertiaryTable.get, parameter[member[.key]]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.curEntry]] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[Object] identifier[get] operator[SEP] annotation[@] identifier[Sensitive] identifier[String] identifier[key] operator[SEP] { identifier[Object] identifier[curEntry] operator[=] identifier[primaryTable] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[curEntry] operator[==] Other[null] operator[SEP] { identifier[curEntry] operator[=] identifier[secondaryTable] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[curEntry] operator[==] Other[null] operator[SEP] { identifier[curEntry] operator[=] identifier[tertiaryTable] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] } } Keyword[return] identifier[curEntry] operator[SEP] }
public JsPermittedChainUsage fromString(String name) { JsPermittedChainUsage result = null; for (int i = 0; i < _set.length && result == null; i++) { if (name.equals(_set[i].toString())) result = _set[i]; } return result; }
class class_name[name] begin[{] method[fromString, return_type[type[JsPermittedChainUsage]], modifier[public], parameter[name]] begin[{] local_variable[type[JsPermittedChainUsage], result] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=_set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=_set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=_set, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.result]] end[}] END[}]
Keyword[public] identifier[JsPermittedChainUsage] identifier[fromString] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[JsPermittedChainUsage] identifier[result] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[_set] operator[SEP] identifier[length] operator[&&] identifier[result] operator[==] Other[null] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[_set] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[_set] operator[SEP] identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
private String getStatsString() { SplitTypeStats allTypeStats = splitTypeStatsMap.get(SplitType.ALL); Map<String, Map<String, Number>> statsMapMap = new HashMap<String, Map<String, Number>>(); for (Map.Entry<SplitType, SplitTypeStats> entry : splitTypeStatsMap.entrySet()) { Map<String, Number> statsMap = new HashMap<String, Number>(); statsMapMap.put(entry.getKey().toString(), statsMap); float percentTotalSplitCount = (100f * entry.getValue().getTotalSplitCount()) / allTypeStats.getTotalSplitCount(); float percentTotalSize = (100f * entry.getValue().getTotalSize()) / allTypeStats.getTotalSize(); float percentTotalBlockCount = (100f * entry.getValue().getTotalBlockCount()) / allTypeStats.getTotalBlockCount(); float averageSizePerSplit = ((float) entry.getValue().getTotalSize()) / entry.getValue().getTotalSplitCount(); float averageHostCountPerSplit = ((float) entry.getValue().getTotalHostCount()) / entry.getValue().getTotalSplitCount(); float averageBlockCountPerSplit = ((float) entry.getValue().getTotalBlockCount()) / entry.getValue().getTotalSplitCount(); statsMap.put("totalSplitCount", entry.getValue().getTotalSplitCount()); statsMap.put("percentTotalSplitCount", percentTotalSplitCount); statsMap.put("totalSize", entry.getValue().getTotalSize()); statsMap.put("percentTotalSize", percentTotalSize); statsMap.put("averageSizePerSplit", averageSizePerSplit); statsMap.put("totalHostCount", entry.getValue().getTotalHostCount()); statsMap.put("averageHostCountPerSplit", averageHostCountPerSplit); statsMap.put("totalBlockCount", entry.getValue().getTotalBlockCount()); statsMap.put("percentTotalBlockCount", percentTotalBlockCount); statsMap.put("averageBlockCountPerSplit", averageBlockCountPerSplit); } return JSON.toString(statsMapMap); }
class class_name[name] begin[{] method[getStatsString, return_type[type[String]], modifier[private], parameter[]] begin[{] local_variable[type[SplitTypeStats], allTypeStats] local_variable[type[Map], statsMapMap] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None))], dimensions=None, name=HashMap, sub_type=None)), name=statsMap)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None))], dimensions=[], name=Map, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=statsMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=statsMapMap, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=100f), operandr=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalSplitCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=*), operandr=MethodInvocation(arguments=[], member=getTotalSplitCount, postfix_operators=[], prefix_operators=[], qualifier=allTypeStats, selectors=[], type_arguments=None), operator=/), name=percentTotalSplitCount)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=100f), operandr=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=*), operandr=MethodInvocation(arguments=[], member=getTotalSize, postfix_operators=[], prefix_operators=[], qualifier=allTypeStats, selectors=[], type_arguments=None), operator=/), name=percentTotalSize)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=100f), operandr=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalBlockCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=*), operandr=MethodInvocation(arguments=[], member=getTotalBlockCount, postfix_operators=[], prefix_operators=[], qualifier=allTypeStats, selectors=[], type_arguments=None), operator=/), name=percentTotalBlockCount)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=BasicType(dimensions=[], name=float)), operandr=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalSplitCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=/), name=averageSizePerSplit)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalHostCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=BasicType(dimensions=[], name=float)), operandr=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalSplitCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=/), name=averageHostCountPerSplit)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalBlockCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=BasicType(dimensions=[], name=float)), operandr=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalSplitCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=/), name=averageBlockCountPerSplit)], modifiers=set(), type=BasicType(dimensions=[], name=float)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="totalSplitCount"), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalSplitCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=statsMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="percentTotalSplitCount"), MemberReference(member=percentTotalSplitCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=statsMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="totalSize"), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=statsMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="percentTotalSize"), MemberReference(member=percentTotalSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=statsMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="averageSizePerSplit"), MemberReference(member=averageSizePerSplit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=statsMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="totalHostCount"), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalHostCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=statsMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="averageHostCountPerSplit"), MemberReference(member=averageHostCountPerSplit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=statsMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="totalBlockCount"), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=getTotalBlockCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=statsMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="percentTotalBlockCount"), MemberReference(member=percentTotalBlockCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=statsMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="averageBlockCountPerSplit"), MemberReference(member=averageBlockCountPerSplit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=statsMap, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=splitTypeStatsMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SplitType, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SplitTypeStats, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) return[call[JSON.toString, parameter[member[.statsMapMap]]]] end[}] END[}]
Keyword[private] identifier[String] identifier[getStatsString] operator[SEP] operator[SEP] { identifier[SplitTypeStats] identifier[allTypeStats] operator[=] identifier[splitTypeStatsMap] operator[SEP] identifier[get] operator[SEP] identifier[SplitType] operator[SEP] identifier[ALL] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[Number] operator[>] operator[>] identifier[statsMapMap] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Map] operator[<] identifier[String] , identifier[Number] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[SplitType] , identifier[SplitTypeStats] operator[>] identifier[entry] operator[:] identifier[splitTypeStatsMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Number] operator[>] identifier[statsMap] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Number] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[statsMapMap] operator[SEP] identifier[put] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[statsMap] operator[SEP] operator[SEP] Keyword[float] identifier[percentTotalSplitCount] operator[=] operator[SEP] literal[Float] operator[*] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalSplitCount] operator[SEP] operator[SEP] operator[SEP] operator[/] identifier[allTypeStats] operator[SEP] identifier[getTotalSplitCount] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[percentTotalSize] operator[=] operator[SEP] literal[Float] operator[*] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalSize] operator[SEP] operator[SEP] operator[SEP] operator[/] identifier[allTypeStats] operator[SEP] identifier[getTotalSize] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[percentTotalBlockCount] operator[=] operator[SEP] literal[Float] operator[*] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalBlockCount] operator[SEP] operator[SEP] operator[SEP] operator[/] identifier[allTypeStats] operator[SEP] identifier[getTotalBlockCount] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[averageSizePerSplit] operator[=] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalSize] operator[SEP] operator[SEP] operator[SEP] operator[/] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalSplitCount] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[averageHostCountPerSplit] operator[=] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalHostCount] operator[SEP] operator[SEP] operator[SEP] operator[/] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalSplitCount] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[averageBlockCountPerSplit] operator[=] operator[SEP] operator[SEP] Keyword[float] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalBlockCount] operator[SEP] operator[SEP] operator[SEP] operator[/] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalSplitCount] operator[SEP] operator[SEP] operator[SEP] identifier[statsMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalSplitCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[statsMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[percentTotalSplitCount] operator[SEP] operator[SEP] identifier[statsMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[statsMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[percentTotalSize] operator[SEP] operator[SEP] identifier[statsMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[averageSizePerSplit] operator[SEP] operator[SEP] identifier[statsMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalHostCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[statsMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[averageHostCountPerSplit] operator[SEP] operator[SEP] identifier[statsMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalBlockCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[statsMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[percentTotalBlockCount] operator[SEP] operator[SEP] identifier[statsMap] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[averageBlockCountPerSplit] operator[SEP] operator[SEP] } Keyword[return] identifier[JSON] operator[SEP] identifier[toString] operator[SEP] identifier[statsMapMap] operator[SEP] operator[SEP] }
protected void removeItem(int item, int bin) throws ContradictionException { updateLoads(item, bin); if (decoKPSimple != null) { decoKPSimple.postRemoveItem(item, bin); } }
class class_name[name] begin[{] method[removeItem, return_type[void], modifier[protected], parameter[item, bin]] begin[{] call[.updateLoads, parameter[member[.item], member[.bin]]] if[binary_operation[member[.decoKPSimple], !=, literal[null]]] begin[{] call[decoKPSimple.postRemoveItem, parameter[member[.item], member[.bin]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[removeItem] operator[SEP] Keyword[int] identifier[item] , Keyword[int] identifier[bin] operator[SEP] Keyword[throws] identifier[ContradictionException] { identifier[updateLoads] operator[SEP] identifier[item] , identifier[bin] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[decoKPSimple] operator[!=] Other[null] operator[SEP] { identifier[decoKPSimple] operator[SEP] identifier[postRemoveItem] operator[SEP] identifier[item] , identifier[bin] operator[SEP] operator[SEP] } }
@Deprecated public AtomixClusterBuilder setBroadcastInterval(Duration interval) { GroupMembershipProtocolConfig protocolConfig = config.getProtocolConfig(); if (protocolConfig instanceof HeartbeatMembershipProtocolConfig) { ((HeartbeatMembershipProtocolConfig) protocolConfig).setHeartbeatInterval(interval); } return this; }
class class_name[name] begin[{] method[setBroadcastInterval, return_type[type[AtomixClusterBuilder]], modifier[public], parameter[interval]] begin[{] local_variable[type[GroupMembershipProtocolConfig], protocolConfig] if[binary_operation[member[.protocolConfig], instanceof, type[HeartbeatMembershipProtocolConfig]]] begin[{] Cast(expression=MemberReference(member=protocolConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=HeartbeatMembershipProtocolConfig, sub_type=None)) else begin[{] None end[}] return[THIS[]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] identifier[AtomixClusterBuilder] identifier[setBroadcastInterval] operator[SEP] identifier[Duration] identifier[interval] operator[SEP] { identifier[GroupMembershipProtocolConfig] identifier[protocolConfig] operator[=] identifier[config] operator[SEP] identifier[getProtocolConfig] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[protocolConfig] Keyword[instanceof] identifier[HeartbeatMembershipProtocolConfig] operator[SEP] { operator[SEP] operator[SEP] identifier[HeartbeatMembershipProtocolConfig] operator[SEP] identifier[protocolConfig] operator[SEP] operator[SEP] identifier[setHeartbeatInterval] operator[SEP] identifier[interval] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public boolean isPositiveLS(long utc) { if (utc <= 0) { return false; } final ExtendedLSE[] events = this.getEventsInDescendingOrder(); for (int i = 0; i < events.length; i++) { long comp = events[i].utc(); if (comp == utc) { return (events[i].getShift() == 1); } else if (comp < utc) { break; } } return false; }
class class_name[name] begin[{] method[isPositiveLS, return_type[type[boolean]], modifier[public], parameter[utc]] begin[{] if[binary_operation[member[.utc], <=, literal[0]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[ExtendedLSE], events] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=events, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=utc, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=comp)], modifiers=set(), type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=utc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=utc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=events, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getShift, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), 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=events, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isPositiveLS] operator[SEP] Keyword[long] identifier[utc] operator[SEP] { Keyword[if] operator[SEP] identifier[utc] operator[<=] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[final] identifier[ExtendedLSE] operator[SEP] operator[SEP] identifier[events] operator[=] Keyword[this] operator[SEP] identifier[getEventsInDescendingOrder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[events] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[long] identifier[comp] operator[=] identifier[events] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[utc] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[comp] operator[==] identifier[utc] operator[SEP] { Keyword[return] operator[SEP] identifier[events] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getShift] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[comp] operator[<] identifier[utc] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public static <T> List<T> getParents(DirectedGraph g, T n) { List<IndexedEdge> incoming = new ArrayList(g.incomingEdgesOf(n)); Collections.sort(incoming); List<T> ret = new ArrayList(); for(IndexedEdge e: incoming) { ret.add((T)e.source); } return ret; }
class class_name[name] begin[{] method[getParents, return_type[type[List]], modifier[public static], parameter[g, n]] begin[{] local_variable[type[List], incoming] call[Collections.sort, parameter[member[.incoming]]] local_variable[type[List], ret] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=source, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=ret, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=incoming, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IndexedEdge, sub_type=None))), label=None) return[member[.ret]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[getParents] operator[SEP] identifier[DirectedGraph] identifier[g] , identifier[T] identifier[n] operator[SEP] { identifier[List] operator[<] identifier[IndexedEdge] operator[>] identifier[incoming] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] identifier[g] operator[SEP] identifier[incomingEdgesOf] operator[SEP] identifier[n] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[incoming] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[ret] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[IndexedEdge] identifier[e] operator[:] identifier[incoming] operator[SEP] { identifier[ret] operator[SEP] identifier[add] operator[SEP] operator[SEP] identifier[T] operator[SEP] identifier[e] operator[SEP] identifier[source] operator[SEP] operator[SEP] } Keyword[return] identifier[ret] operator[SEP] }
protected Logic resolveLogic (String path) { // look for a cached logic instance String lclass = _app.generateClass(path); Logic logic = _logic.get(lclass); if (logic == null) { logic = instantiateLogic(path, lclass); // if something failed, use a dummy in it's place so that we don't sit around all day // freaking out about our inability to instantiate the proper logic class if (logic == null) { logic = new DummyLogic(); } // cache the resolved logic instance _logic.put(lclass, logic); } return logic; }
class class_name[name] begin[{] method[resolveLogic, return_type[type[Logic]], modifier[protected], parameter[path]] begin[{] local_variable[type[String], lclass] local_variable[type[Logic], logic] if[binary_operation[member[.logic], ==, literal[null]]] begin[{] assign[member[.logic], call[.instantiateLogic, parameter[member[.path], member[.lclass]]]] if[binary_operation[member[.logic], ==, literal[null]]] begin[{] assign[member[.logic], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DummyLogic, sub_type=None))] else begin[{] None end[}] call[_logic.put, parameter[member[.lclass], member[.logic]]] else begin[{] None end[}] return[member[.logic]] end[}] END[}]
Keyword[protected] identifier[Logic] identifier[resolveLogic] operator[SEP] identifier[String] identifier[path] operator[SEP] { identifier[String] identifier[lclass] operator[=] identifier[_app] operator[SEP] identifier[generateClass] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[Logic] identifier[logic] operator[=] identifier[_logic] operator[SEP] identifier[get] operator[SEP] identifier[lclass] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[logic] operator[==] Other[null] operator[SEP] { identifier[logic] operator[=] identifier[instantiateLogic] operator[SEP] identifier[path] , identifier[lclass] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[logic] operator[==] Other[null] operator[SEP] { identifier[logic] operator[=] Keyword[new] identifier[DummyLogic] operator[SEP] operator[SEP] operator[SEP] } identifier[_logic] operator[SEP] identifier[put] operator[SEP] identifier[lclass] , identifier[logic] operator[SEP] operator[SEP] } Keyword[return] identifier[logic] operator[SEP] }
protected void buildTokens(final char commandPrefix, final List<Token> tokens, final List<NodeOc> depth, final List<NodeOc> line, final String value) { for (int n = 0; n < line.size(); n++) { if (depth.size() <= n) { /* * This is a new command */ depth.add(line.get(n)); /* * an empty keyword means a positional parameter */ if (line.get(n).key.length() > 0) { tokens.add(new Token(commandPrefix, dashed(commandPrefix, line.get(n).key), 0, 0, false)); } /* * if the depth so far is shorter than the namespace then it is * necessary to start a group */ if (n < line.size() - 1) tokens.add(new Token(commandPrefix, OPEN_GROUP, 0, 0, false)); } else if (depth.get(n).key.equalsIgnoreCase(line.get(n).key)) { /* * This is a subsequent command for the same namespace at this * level. Check the occurrence to see if a new multiple group )( * should be started. If the occurrence is the same then the * subsequent namespace will make it unique and this specific * node in the namespace can be safely ignored. In essence we * are within a sub-structure and only change instance * variables. */ if (depth.get(n).occurrance == line.get(n).occurrance) continue; /* * A new occurrence of the same namespace node. So we close off * deeper groups. */ for (int d = depth.size() - 1; d > n; d--) { depth.remove(d); tokens.add(new Token(commandPrefix, CLOSE_GROUP, 0, 0, false)); } depth.get(n).occurrance = line.get(n).occurrance; if (n < line.size() - 1) tokens.add(new Token(commandPrefix, OPEN_GROUP, 0, 0, false)); continue; } else { for (int d = depth.size() - 1; d > n; d--) { depth.remove(d); tokens.add(new Token(commandPrefix, CLOSE_GROUP, 0, 0, false)); } depth.get(n).key = line.get(n).key; depth.get(n).occurrance = line.get(n).occurrance; /* * an empty keyword means a positional parameter */ if (line.get(n).key.length() > 0) tokens.add(new Token(commandPrefix, dashed(commandPrefix, line.get(n).key), 0, 0, false)); if (n < line.size() - 1) tokens.add(new Token(commandPrefix, OPEN_GROUP, 0, 0, false)); continue; } } /* * booleans have no value */ if (value != null && value.length() > 0) { tokens.add(new Token(commandPrefix, value, 0, 0, true)); } }
class class_name[name] begin[{] method[buildTokens, return_type[void], modifier[protected], parameter[commandPrefix, tokens, depth, line, value]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=depth, selectors=[], type_arguments=None), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=depth, selectors=[MemberReference(member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MemberReference(member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)], member=equalsIgnoreCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=depth, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=commandPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CLOSE_GROUP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=depth, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=d)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=d, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=depth, selectors=[MemberReference(member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MemberReference(member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=depth, selectors=[MemberReference(member=occurrance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MemberReference(member=occurrance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MemberReference(member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=commandPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=commandPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MemberReference(member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)], member=dashed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=commandPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=OPEN_GROUP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), label=None)), ContinueStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=depth, selectors=[MemberReference(member=occurrance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MemberReference(member=occurrance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operator===), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=depth, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=commandPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CLOSE_GROUP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=depth, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=d)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=d, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=depth, selectors=[MemberReference(member=occurrance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type==, value=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MemberReference(member=occurrance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=commandPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=OPEN_GROUP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), label=None)), ContinueStatement(goto=None, label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=depth, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MemberReference(member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=commandPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=commandPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MemberReference(member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)], member=dashed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=commandPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=OPEN_GROUP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=tokens, selectors=[], type_arguments=None), label=None))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=n, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[binary_operation[member[.value], !=, literal[null]], &&, binary_operation[call[value.length, parameter[]], >, literal[0]]]] begin[{] call[tokens.add, parameter[ClassCreator(arguments=[MemberReference(member=commandPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[buildTokens] operator[SEP] Keyword[final] Keyword[char] identifier[commandPrefix] , Keyword[final] identifier[List] operator[<] identifier[Token] operator[>] identifier[tokens] , Keyword[final] identifier[List] operator[<] identifier[NodeOc] operator[>] identifier[depth] , Keyword[final] identifier[List] operator[<] identifier[NodeOc] operator[>] identifier[line] , Keyword[final] identifier[String] identifier[value] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[n] operator[=] Other[0] operator[SEP] identifier[n] operator[<] identifier[line] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[n] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[depth] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<=] identifier[n] operator[SEP] { identifier[depth] operator[SEP] identifier[add] operator[SEP] identifier[line] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[tokens] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Token] operator[SEP] identifier[commandPrefix] , identifier[dashed] operator[SEP] identifier[commandPrefix] , identifier[line] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[key] operator[SEP] , Other[0] , Other[0] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[n] operator[<] identifier[line] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[tokens] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Token] operator[SEP] identifier[commandPrefix] , identifier[OPEN_GROUP] , Other[0] , Other[0] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[depth] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[line] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[key] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[depth] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[occurrance] operator[==] identifier[line] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[occurrance] operator[SEP] Keyword[continue] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[d] operator[=] identifier[depth] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[d] operator[>] identifier[n] operator[SEP] identifier[d] operator[--] operator[SEP] { identifier[depth] operator[SEP] identifier[remove] operator[SEP] identifier[d] operator[SEP] operator[SEP] identifier[tokens] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Token] operator[SEP] identifier[commandPrefix] , identifier[CLOSE_GROUP] , Other[0] , Other[0] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] } identifier[depth] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[occurrance] operator[=] identifier[line] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[occurrance] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[<] identifier[line] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[tokens] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Token] operator[SEP] identifier[commandPrefix] , identifier[OPEN_GROUP] , Other[0] , Other[0] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[else] { Keyword[for] operator[SEP] Keyword[int] identifier[d] operator[=] identifier[depth] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[d] operator[>] identifier[n] operator[SEP] identifier[d] operator[--] operator[SEP] { identifier[depth] operator[SEP] identifier[remove] operator[SEP] identifier[d] operator[SEP] operator[SEP] identifier[tokens] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Token] operator[SEP] identifier[commandPrefix] , identifier[CLOSE_GROUP] , Other[0] , Other[0] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] } identifier[depth] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[key] operator[=] identifier[line] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[depth] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[occurrance] operator[=] identifier[line] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[occurrance] operator[SEP] Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] identifier[tokens] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Token] operator[SEP] identifier[commandPrefix] , identifier[dashed] operator[SEP] identifier[commandPrefix] , identifier[line] operator[SEP] identifier[get] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[key] operator[SEP] , Other[0] , Other[0] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[<] identifier[line] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[tokens] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Token] operator[SEP] identifier[commandPrefix] , identifier[OPEN_GROUP] , Other[0] , Other[0] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } } Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[&&] identifier[value] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[tokens] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Token] operator[SEP] identifier[commandPrefix] , identifier[value] , Other[0] , Other[0] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] } }
public static double haversineFormulaDeg(double lat1, double lon1, double lat2, double lon2) { return haversineFormulaRad(deg2rad(lat1), deg2rad(lon1), deg2rad(lat2), deg2rad(lon2)); }
class class_name[name] begin[{] method[haversineFormulaDeg, return_type[type[double]], modifier[public static], parameter[lat1, lon1, lat2, lon2]] begin[{] return[call[.haversineFormulaRad, parameter[call[.deg2rad, parameter[member[.lat1]]], call[.deg2rad, parameter[member[.lon1]]], call[.deg2rad, parameter[member[.lat2]]], call[.deg2rad, parameter[member[.lon2]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[haversineFormulaDeg] operator[SEP] Keyword[double] identifier[lat1] , Keyword[double] identifier[lon1] , Keyword[double] identifier[lat2] , Keyword[double] identifier[lon2] operator[SEP] { Keyword[return] identifier[haversineFormulaRad] operator[SEP] identifier[deg2rad] operator[SEP] identifier[lat1] operator[SEP] , identifier[deg2rad] operator[SEP] identifier[lon1] operator[SEP] , identifier[deg2rad] operator[SEP] identifier[lat2] operator[SEP] , identifier[deg2rad] operator[SEP] identifier[lon2] operator[SEP] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<Page<KeyItem>>> getKeysNextSinglePageAsync(final String nextPageLink) { if (nextPageLink == null) { throw new IllegalArgumentException("Parameter nextPageLink is required and cannot be null."); } String nextUrl = String.format("%s", nextPageLink); return service.getKeysNext(nextUrl, this.acceptLanguage(), this.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<KeyItem>>>>() { @Override public Observable<ServiceResponse<Page<KeyItem>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<KeyItem>> result = getKeysNextDelegate(response); return Observable.just(new ServiceResponse<Page<KeyItem>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[getKeysNextSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] if[binary_operation[member[.nextPageLink], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter nextPageLink is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], nextUrl] return[call[service.getKeysNext, parameter[member[.nextUrl], THIS[call[None.acceptLanguage, parameter[]]], THIS[call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[KeyItem] operator[>] operator[>] operator[>] identifier[getKeysNextSinglePageAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[if] operator[SEP] identifier[nextPageLink] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[nextUrl] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[nextPageLink] operator[SEP] operator[SEP] Keyword[return] identifier[service] operator[SEP] identifier[getKeysNext] operator[SEP] identifier[nextUrl] , Keyword[this] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[KeyItem] operator[>] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[KeyItem] operator[>] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[PageImpl] operator[<] identifier[KeyItem] operator[>] operator[>] identifier[result] operator[=] identifier[getKeysNextDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] Keyword[new] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[KeyItem] operator[>] operator[>] operator[SEP] identifier[result] operator[SEP] identifier[body] operator[SEP] operator[SEP] , identifier[result] operator[SEP] identifier[response] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
boolean process(InputStream inputStream) throws IOException { LOG.entering(CLASS_NAME, "process"); int b; for (;;) { switch (state) { // handle alignment with start-of-frame boundary (after mark) case START_OF_FRAME: b = inputStream.read(); if (b == -1) { return false; //end of stream } fin = (b & 0x80) != 0; opcode = WsFrameEncodingSupport.Opcode.getById((b & 0x0f)); state = DecodingState.READING_PAYLOADLENGTH; //start read mask & payload length byte break; case READING_PAYLOADLENGTH: //reading mask bit and payload length (7) b = inputStream.read(); if (b == -1) { return false; //end of stream } masked = (b & 0x80) != 0; if (masked) { maskkeyBuf = ByteBuffer.allocate(4); //4 byte mask key } dataLength = b & 0x7f; if (dataLength==126) { //length is 16 bit long unsigned int - must fill first two bytes with 0,0 to handle unsigned state = DecodingState.READING_PAYLOADLENGTH_EXT; payLoadLengthBuf = ByteBuffer.allocate(4); payLoadLengthBuf.put(new byte[] {0x00, 0x00}); //fill 2 bytes with 0 } else if (dataLength==127) { //length is 64 bit long state = DecodingState.READING_PAYLOADLENGTH_EXT; payLoadLengthBuf = ByteBuffer.allocate(8); } else { state = DecodingState.READING_MASK_KEY; } break; case READING_PAYLOADLENGTH_EXT: byte[] bytes = new byte[payLoadLengthBuf.remaining()]; int num = inputStream.read(bytes); if (num == -1) { return false; //end of stream } payLoadLengthBuf.put(bytes, 0, num); if (!payLoadLengthBuf.hasRemaining()) { //payload length bytes has been read payLoadLengthBuf.flip(); if (payLoadLengthBuf.capacity() == 4) { // 16 bit length dataLength = payLoadLengthBuf.getInt(); } else { dataLength = (int) payLoadLengthBuf.getLong(); } state = DecodingState.READING_MASK_KEY; break; } break; case READING_MASK_KEY: if (!masked) { //unmasked, skip READ_MASK_KEY data = ByteBuffer.allocate(dataLength); state = DecodingState.READING_PAYLOAD; break; } bytes = new byte[maskkeyBuf.remaining()]; num = inputStream.read(bytes); if (num == -1) { return false; //end of stream } maskkeyBuf.put(bytes, 0, num); if (!maskkeyBuf.hasRemaining()) { //4 bytes has been read, done with mask key maskkeyBuf.flip(); //move postion to 0 maskkey = maskkeyBuf.getInt(); data = ByteBuffer.allocate(dataLength); state = DecodingState.READING_PAYLOAD; } break; case READING_PAYLOAD: if (dataLength == 0) { // empty message state = DecodingState.END_OF_FRAME; break; } bytes = new byte[data.remaining()]; num = inputStream.read(bytes); if (num == -1) { return false; //end of stream } data.put(bytes, 0, num); if (!data.hasRemaining()) { //all payload has been read data.flip(); state = DecodingState.END_OF_FRAME; break; } break; case END_OF_FRAME: //finished load payload switch (opcode) { case BINARY: if (masked) { WsFrameEncodingSupport.unmask(data, maskkey); } listener.messageReceived(data, "BINARY"); break; case TEXT: if (masked) { WsFrameEncodingSupport.unmask(data, maskkey); } listener.messageReceived(data, "TEXT"); break; case PING: listener.messageReceived(data, "PING"); break; case PONG: //do nothing break; case CLOSE: listener.messageReceived(data, "CLOSE"); break; } state = DecodingState.START_OF_FRAME; break; } } }
class class_name[name] begin[{] method[process, return_type[type[boolean]], modifier[default], parameter[inputStream]] begin[{] call[LOG.entering, parameter[member[.CLASS_NAME], literal["process"]]] local_variable[type[int], b] ForStatement(body=BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=['START_OF_FRAME'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=inputStream, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), 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)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=opcode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0f), operator=&)], member=getById, postfix_operators=[], prefix_operators=[], qualifier=WsFrameEncodingSupport.Opcode, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=READING_PAYLOADLENGTH, postfix_operators=[], prefix_operators=[], qualifier=DecodingState, selectors=[])), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['READING_PAYLOADLENGTH'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=inputStream, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), 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)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=masked, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=)), label=None), IfStatement(condition=MemberReference(member=masked, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=maskkeyBuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], member=allocate, postfix_operators=[], prefix_operators=[], qualifier=ByteBuffer, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x7f), operator=&)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dataLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=126), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dataLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=127), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=READING_MASK_KEY, postfix_operators=[], prefix_operators=[], qualifier=DecodingState, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=READING_PAYLOADLENGTH_EXT, postfix_operators=[], prefix_operators=[], qualifier=DecodingState, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=payLoadLengthBuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)], member=allocate, postfix_operators=[], prefix_operators=[], qualifier=ByteBuffer, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=READING_PAYLOADLENGTH_EXT, postfix_operators=[], prefix_operators=[], qualifier=DecodingState, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=payLoadLengthBuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], member=allocate, postfix_operators=[], prefix_operators=[], qualifier=ByteBuffer, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x00), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x00)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))], member=put, postfix_operators=[], prefix_operators=[], qualifier=payLoadLengthBuf, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['READING_PAYLOADLENGTH_EXT'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=remaining, postfix_operators=[], prefix_operators=[], qualifier=payLoadLengthBuf, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=bytes)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=inputStream, selectors=[], type_arguments=None), name=num)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), 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)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=payLoadLengthBuf, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=hasRemaining, postfix_operators=[], prefix_operators=['!'], qualifier=payLoadLengthBuf, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=flip, postfix_operators=[], prefix_operators=[], qualifier=payLoadLengthBuf, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=capacity, postfix_operators=[], prefix_operators=[], qualifier=payLoadLengthBuf, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=getLong, postfix_operators=[], prefix_operators=[], qualifier=payLoadLengthBuf, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dataLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=payLoadLengthBuf, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=READING_MASK_KEY, postfix_operators=[], prefix_operators=[], qualifier=DecodingState, selectors=[])), label=None), BreakStatement(goto=None, label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['READING_MASK_KEY'], statements=[IfStatement(condition=MemberReference(member=masked, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=dataLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=allocate, postfix_operators=[], prefix_operators=[], qualifier=ByteBuffer, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=READING_PAYLOAD, postfix_operators=[], prefix_operators=[], qualifier=DecodingState, selectors=[])), label=None), BreakStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=remaining, postfix_operators=[], prefix_operators=[], qualifier=maskkeyBuf, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=inputStream, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), 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)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=maskkeyBuf, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=hasRemaining, postfix_operators=[], prefix_operators=['!'], qualifier=maskkeyBuf, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=flip, postfix_operators=[], prefix_operators=[], qualifier=maskkeyBuf, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=maskkey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInt, postfix_operators=[], prefix_operators=[], qualifier=maskkeyBuf, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=dataLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=allocate, postfix_operators=[], prefix_operators=[], qualifier=ByteBuffer, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=READING_PAYLOAD, postfix_operators=[], prefix_operators=[], qualifier=DecodingState, selectors=[])), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['READING_PAYLOAD'], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dataLength, 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=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=END_OF_FRAME, postfix_operators=[], prefix_operators=[], qualifier=DecodingState, selectors=[])), label=None), BreakStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=remaining, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=inputStream, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), 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)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=hasRemaining, postfix_operators=[], prefix_operators=['!'], qualifier=data, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=flip, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=END_OF_FRAME, postfix_operators=[], prefix_operators=[], qualifier=DecodingState, selectors=[])), label=None), BreakStatement(goto=None, label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['END_OF_FRAME'], statements=[SwitchStatement(cases=[SwitchStatementCase(case=['BINARY'], statements=[IfStatement(condition=MemberReference(member=masked, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maskkey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unmask, postfix_operators=[], prefix_operators=[], qualifier=WsFrameEncodingSupport, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="BINARY")], member=messageReceived, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['TEXT'], statements=[IfStatement(condition=MemberReference(member=masked, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maskkey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unmask, postfix_operators=[], prefix_operators=[], qualifier=WsFrameEncodingSupport, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TEXT")], member=messageReceived, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['PING'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="PING")], member=messageReceived, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['PONG'], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['CLOSE'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="CLOSE")], member=messageReceived, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=opcode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=START_OF_FRAME, postfix_operators=[], prefix_operators=[], qualifier=DecodingState, selectors=[])), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=ForControl(condition=None, init=None, update=None), label=None) end[}] END[}]
Keyword[boolean] identifier[process] operator[SEP] identifier[InputStream] identifier[inputStream] operator[SEP] Keyword[throws] identifier[IOException] { identifier[LOG] operator[SEP] identifier[entering] operator[SEP] identifier[CLASS_NAME] , literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[b] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[switch] operator[SEP] identifier[state] operator[SEP] { Keyword[case] identifier[START_OF_FRAME] operator[:] identifier[b] operator[=] identifier[inputStream] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[b] operator[==] operator[-] Other[1] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[fin] operator[=] operator[SEP] identifier[b] operator[&] literal[Integer] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[opcode] operator[=] identifier[WsFrameEncodingSupport] operator[SEP] identifier[Opcode] operator[SEP] identifier[getById] operator[SEP] operator[SEP] identifier[b] operator[&] literal[Integer] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[=] identifier[DecodingState] operator[SEP] identifier[READING_PAYLOADLENGTH] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[READING_PAYLOADLENGTH] operator[:] identifier[b] operator[=] identifier[inputStream] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[b] operator[==] operator[-] Other[1] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[masked] operator[=] operator[SEP] identifier[b] operator[&] literal[Integer] operator[SEP] operator[!=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[masked] operator[SEP] { identifier[maskkeyBuf] operator[=] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] Other[4] operator[SEP] operator[SEP] } identifier[dataLength] operator[=] identifier[b] operator[&] literal[Integer] operator[SEP] Keyword[if] operator[SEP] identifier[dataLength] operator[==] Other[126] operator[SEP] { identifier[state] operator[=] identifier[DecodingState] operator[SEP] identifier[READING_PAYLOADLENGTH_EXT] operator[SEP] identifier[payLoadLengthBuf] operator[=] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[payLoadLengthBuf] operator[SEP] identifier[put] operator[SEP] Keyword[new] Keyword[byte] operator[SEP] operator[SEP] { literal[Integer] , literal[Integer] } operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[dataLength] operator[==] Other[127] operator[SEP] { identifier[state] operator[=] identifier[DecodingState] operator[SEP] identifier[READING_PAYLOADLENGTH_EXT] operator[SEP] identifier[payLoadLengthBuf] operator[=] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] Other[8] operator[SEP] operator[SEP] } Keyword[else] { identifier[state] operator[=] identifier[DecodingState] operator[SEP] identifier[READING_MASK_KEY] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[READING_PAYLOADLENGTH_EXT] operator[:] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[payLoadLengthBuf] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[num] operator[=] identifier[inputStream] operator[SEP] identifier[read] operator[SEP] identifier[bytes] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[num] operator[==] operator[-] Other[1] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[payLoadLengthBuf] operator[SEP] identifier[put] operator[SEP] identifier[bytes] , Other[0] , identifier[num] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[payLoadLengthBuf] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] { identifier[payLoadLengthBuf] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[payLoadLengthBuf] operator[SEP] identifier[capacity] operator[SEP] operator[SEP] operator[==] Other[4] operator[SEP] { identifier[dataLength] operator[=] identifier[payLoadLengthBuf] operator[SEP] identifier[getInt] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[dataLength] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[payLoadLengthBuf] operator[SEP] identifier[getLong] operator[SEP] operator[SEP] operator[SEP] } identifier[state] operator[=] identifier[DecodingState] operator[SEP] identifier[READING_MASK_KEY] operator[SEP] Keyword[break] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[READING_MASK_KEY] operator[:] Keyword[if] operator[SEP] operator[!] identifier[masked] operator[SEP] { identifier[data] operator[=] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] identifier[dataLength] operator[SEP] operator[SEP] identifier[state] operator[=] identifier[DecodingState] operator[SEP] identifier[READING_PAYLOAD] operator[SEP] Keyword[break] operator[SEP] } identifier[bytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[maskkeyBuf] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[num] operator[=] identifier[inputStream] operator[SEP] identifier[read] operator[SEP] identifier[bytes] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[num] operator[==] operator[-] Other[1] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[maskkeyBuf] operator[SEP] identifier[put] operator[SEP] identifier[bytes] , Other[0] , identifier[num] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[maskkeyBuf] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] { identifier[maskkeyBuf] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] identifier[maskkey] operator[=] identifier[maskkeyBuf] operator[SEP] identifier[getInt] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[=] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] identifier[dataLength] operator[SEP] operator[SEP] identifier[state] operator[=] identifier[DecodingState] operator[SEP] identifier[READING_PAYLOAD] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[READING_PAYLOAD] operator[:] Keyword[if] operator[SEP] identifier[dataLength] operator[==] Other[0] operator[SEP] { identifier[state] operator[=] identifier[DecodingState] operator[SEP] identifier[END_OF_FRAME] operator[SEP] Keyword[break] operator[SEP] } identifier[bytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[data] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[num] operator[=] identifier[inputStream] operator[SEP] identifier[read] operator[SEP] identifier[bytes] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[num] operator[==] operator[-] Other[1] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[data] operator[SEP] identifier[put] operator[SEP] identifier[bytes] , Other[0] , identifier[num] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[data] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] { identifier[data] operator[SEP] identifier[flip] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[=] identifier[DecodingState] operator[SEP] identifier[END_OF_FRAME] operator[SEP] Keyword[break] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[END_OF_FRAME] operator[:] Keyword[switch] operator[SEP] identifier[opcode] operator[SEP] { Keyword[case] identifier[BINARY] operator[:] Keyword[if] operator[SEP] identifier[masked] operator[SEP] { identifier[WsFrameEncodingSupport] operator[SEP] identifier[unmask] operator[SEP] identifier[data] , identifier[maskkey] operator[SEP] operator[SEP] } identifier[listener] operator[SEP] identifier[messageReceived] operator[SEP] identifier[data] , literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[TEXT] operator[:] Keyword[if] operator[SEP] identifier[masked] operator[SEP] { identifier[WsFrameEncodingSupport] operator[SEP] identifier[unmask] operator[SEP] identifier[data] , identifier[maskkey] operator[SEP] operator[SEP] } identifier[listener] operator[SEP] identifier[messageReceived] operator[SEP] identifier[data] , literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[PING] operator[:] identifier[listener] operator[SEP] identifier[messageReceived] operator[SEP] identifier[data] , literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[PONG] operator[:] Keyword[break] operator[SEP] Keyword[case] identifier[CLOSE] operator[:] identifier[listener] operator[SEP] identifier[messageReceived] operator[SEP] identifier[data] , literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[state] operator[=] identifier[DecodingState] operator[SEP] identifier[START_OF_FRAME] operator[SEP] Keyword[break] operator[SEP] } } }
public void setExcludedRules(java.util.Collection<ExcludedRule> excludedRules) { if (excludedRules == null) { this.excludedRules = null; return; } this.excludedRules = new java.util.ArrayList<ExcludedRule>(excludedRules); }
class class_name[name] begin[{] method[setExcludedRules, return_type[void], modifier[public], parameter[excludedRules]] begin[{] if[binary_operation[member[.excludedRules], ==, literal[null]]] begin[{] assign[THIS[member[None.excludedRules]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.excludedRules]], ClassCreator(arguments=[MemberReference(member=excludedRules, 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=ExcludedRule, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setExcludedRules] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ExcludedRule] operator[>] identifier[excludedRules] operator[SEP] { Keyword[if] operator[SEP] identifier[excludedRules] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[excludedRules] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[excludedRules] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[ExcludedRule] operator[>] operator[SEP] identifier[excludedRules] operator[SEP] operator[SEP] }
protected boolean isNameDifferentBetweenPropertyAndColumn( EntityDesc entityDesc, EntityPropertyDesc propertyDesc) { String propertyName = propertyDesc.getName(); String columnName = propertyDesc.getColumnName(); NamingType namingType = entityDesc.getNamingType(); return !columnName.equalsIgnoreCase(namingType.apply(propertyName)); }
class class_name[name] begin[{] method[isNameDifferentBetweenPropertyAndColumn, return_type[type[boolean]], modifier[protected], parameter[entityDesc, propertyDesc]] begin[{] local_variable[type[String], propertyName] local_variable[type[String], columnName] local_variable[type[NamingType], namingType] return[call[columnName.equalsIgnoreCase, parameter[call[namingType.apply, parameter[member[.propertyName]]]]]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[isNameDifferentBetweenPropertyAndColumn] operator[SEP] identifier[EntityDesc] identifier[entityDesc] , identifier[EntityPropertyDesc] identifier[propertyDesc] operator[SEP] { identifier[String] identifier[propertyName] operator[=] identifier[propertyDesc] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[columnName] operator[=] identifier[propertyDesc] operator[SEP] identifier[getColumnName] operator[SEP] operator[SEP] operator[SEP] identifier[NamingType] identifier[namingType] operator[=] identifier[entityDesc] operator[SEP] identifier[getNamingType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[!] identifier[columnName] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[namingType] operator[SEP] identifier[apply] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] operator[SEP] }
private static String formatLogParam(Clob obj) { String result=""; try { result= "(cblob of length "+obj.length()+")"; } catch (SQLException e) { result = "(cblob of unknown length)"; } return result; }
class class_name[name] begin[{] method[formatLogParam, return_type[type[String]], modifier[private static], parameter[obj]] begin[{] local_variable[type[String], result] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="(cblob of length "), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=obj, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="(cblob of unknown length)")), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None) return[member[.result]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[formatLogParam] operator[SEP] identifier[Clob] identifier[obj] operator[SEP] { identifier[String] identifier[result] operator[=] literal[String] operator[SEP] Keyword[try] { identifier[result] operator[=] literal[String] operator[+] identifier[obj] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { identifier[result] operator[=] literal[String] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
@Pure @Inline(value = "PhysicsUtil.getPhysicsEngine().motionNewtonLaw(($1), ($2), ($3))", imported = {PhysicsUtil.class}) public static double motionNewtonLaw( double speed, double acceleration, double dt) { return engine.motionNewtonLaw(speed, acceleration, dt); }
class class_name[name] begin[{] method[motionNewtonLaw, return_type[type[double]], modifier[public static], parameter[speed, acceleration, dt]] begin[{] return[call[engine.motionNewtonLaw, parameter[member[.speed], member[.acceleration], member[.dt]]]] end[}] END[}]
annotation[@] identifier[Pure] annotation[@] identifier[Inline] operator[SEP] identifier[value] operator[=] literal[String] , identifier[imported] operator[=] { identifier[PhysicsUtil] operator[SEP] Keyword[class] } operator[SEP] Keyword[public] Keyword[static] Keyword[double] identifier[motionNewtonLaw] operator[SEP] Keyword[double] identifier[speed] , Keyword[double] identifier[acceleration] , Keyword[double] identifier[dt] operator[SEP] { Keyword[return] identifier[engine] operator[SEP] identifier[motionNewtonLaw] operator[SEP] identifier[speed] , identifier[acceleration] , identifier[dt] operator[SEP] operator[SEP] }
private final static Throwable getNestedThrowable(Throwable t) { // This is the current list of Throwables that we know of that support nested // exceptions. Add to the list if more show up. // D200273 // Throwables that support nested exceptions using getCause are not special any more since // in JDK1.4 that's what it's supposed to be called. // if (t instanceof com.ibm.ws.exception.WsNestedException) //D200273 // return ((com.ibm.ws.exception.WsNestedException)t).getCause(); //D200273 Class<?> cName = t.getClass(); if (cName.getName().equals("org.omg.CORBA.portable.UnknownException")) return (Throwable) getFieldValue(t, "originalEx"); if (t instanceof java.rmi.RemoteException) return ((java.rmi.RemoteException) t).detail; if (t instanceof java.lang.reflect.InvocationTargetException) return ((java.lang.reflect.InvocationTargetException) t).getTargetException(); if (t instanceof javax.naming.NamingException) return ((javax.naming.NamingException) t).getRootCause(); // 131536 package javax.ejb doesnot exist.Implemented Reflection API. // if (t instanceof javax.ejb.EJBException) // return ((javax.ejb.EJBException)t).getCausedByException(); if (cName.getName().equals("javax.ejb.EJBException")) return invokeMethod(t, "getCausedByException"); if (t instanceof java.sql.SQLException) return ((java.sql.SQLException) t).getNextException(); if (cName.getName().equals("javax.mail.MessagingException")) return invokeMethod(t, "getNextException"); if (cName.getName().equals("org.xml.sax.SAXException")) return invokeMethod(t, "getException"); // if (t instanceof javax.xml.transform.TransformerException) //D200273 // return ((javax.xml.transform.TransformerException)t).getCause(); //D200273 if (cName.getName().equals("javax.servlet.jsp.JspException")) return invokeMethod(t, "getCause"); if (cName.getName().equals("javax.servlet.ServletException")) return invokeMethod(t, "getRootCause"); if (cName.getName().equals("javax.resource.ResourceException")) return invokeMethod(t, "getCause"); if (cName.getName().equals("javax.jms.JMSException")) return invokeMethod(t, "getLinkedException"); if (t instanceof java.lang.reflect.UndeclaredThrowableException) return ((java.lang.reflect.UndeclaredThrowableException) t).getUndeclaredThrowable(); if (t instanceof java.io.WriteAbortedException) return ((java.io.WriteAbortedException) t).detail; if (t instanceof java.rmi.server.ServerCloneException) return ((java.rmi.server.ServerCloneException) t).detail; if (t instanceof java.security.PrivilegedActionException) return ((java.security.PrivilegedActionException) t).getException(); // These Exceptions are not used in WebSphere currently, or the contact has // indicated we shouldn't process them. Leave here as comments, in case this changes. /* * if (t instanceof java.lang.ClassNotFoundException) * return ((java.lang.ClassNotFoundException)t).getException(); */ return null; }
class class_name[name] begin[{] method[getNestedThrowable, return_type[type[Throwable]], modifier[final private static], parameter[t]] begin[{] local_variable[type[Class], cName] if[call[cName.getName, parameter[]]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="originalEx")], member=getFieldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.t], instanceof, type[java]]] begin[{] return[Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=rmi, sub_type=ReferenceType(arguments=None, dimensions=None, name=RemoteException, sub_type=None))))] else begin[{] None end[}] if[binary_operation[member[.t], instanceof, type[java]]] begin[{] return[Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=lang, sub_type=ReferenceType(arguments=None, dimensions=None, name=reflect, sub_type=ReferenceType(arguments=None, dimensions=None, name=InvocationTargetException, sub_type=None)))))] else begin[{] None end[}] if[binary_operation[member[.t], instanceof, type[javax]]] begin[{] return[Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=javax, sub_type=ReferenceType(arguments=None, dimensions=None, name=naming, sub_type=ReferenceType(arguments=None, dimensions=None, name=NamingException, sub_type=None))))] else begin[{] None end[}] if[call[cName.getName, parameter[]]] begin[{] return[call[.invokeMethod, parameter[member[.t], literal["getCausedByException"]]]] else begin[{] None end[}] if[binary_operation[member[.t], instanceof, type[java]]] begin[{] return[Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=sql, sub_type=ReferenceType(arguments=None, dimensions=None, name=SQLException, sub_type=None))))] else begin[{] None end[}] if[call[cName.getName, parameter[]]] begin[{] return[call[.invokeMethod, parameter[member[.t], literal["getNextException"]]]] else begin[{] None end[}] if[call[cName.getName, parameter[]]] begin[{] return[call[.invokeMethod, parameter[member[.t], literal["getException"]]]] else begin[{] None end[}] if[call[cName.getName, parameter[]]] begin[{] return[call[.invokeMethod, parameter[member[.t], literal["getCause"]]]] else begin[{] None end[}] if[call[cName.getName, parameter[]]] begin[{] return[call[.invokeMethod, parameter[member[.t], literal["getRootCause"]]]] else begin[{] None end[}] if[call[cName.getName, parameter[]]] begin[{] return[call[.invokeMethod, parameter[member[.t], literal["getCause"]]]] else begin[{] None end[}] if[call[cName.getName, parameter[]]] begin[{] return[call[.invokeMethod, parameter[member[.t], literal["getLinkedException"]]]] else begin[{] None end[}] if[binary_operation[member[.t], instanceof, type[java]]] begin[{] return[Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=lang, sub_type=ReferenceType(arguments=None, dimensions=None, name=reflect, sub_type=ReferenceType(arguments=None, dimensions=None, name=UndeclaredThrowableException, sub_type=None)))))] else begin[{] None end[}] if[binary_operation[member[.t], instanceof, type[java]]] begin[{] return[Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=WriteAbortedException, sub_type=None))))] else begin[{] None end[}] if[binary_operation[member[.t], instanceof, type[java]]] begin[{] return[Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=rmi, sub_type=ReferenceType(arguments=None, dimensions=None, name=server, sub_type=ReferenceType(arguments=None, dimensions=None, name=ServerCloneException, sub_type=None)))))] else begin[{] None end[}] if[binary_operation[member[.t], instanceof, type[java]]] begin[{] return[Cast(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=security, sub_type=ReferenceType(arguments=None, dimensions=None, name=PrivilegedActionException, sub_type=None))))] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] Keyword[final] Keyword[static] identifier[Throwable] identifier[getNestedThrowable] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] identifier[cName] operator[=] identifier[t] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cName] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[Throwable] operator[SEP] identifier[getFieldValue] operator[SEP] identifier[t] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[java] operator[SEP] identifier[rmi] operator[SEP] identifier[RemoteException] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[rmi] operator[SEP] identifier[RemoteException] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[detail] operator[SEP] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[reflect] operator[SEP] identifier[InvocationTargetException] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[reflect] operator[SEP] identifier[InvocationTargetException] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[getTargetException] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[javax] operator[SEP] identifier[naming] operator[SEP] identifier[NamingException] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[javax] operator[SEP] identifier[naming] operator[SEP] identifier[NamingException] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[getRootCause] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cName] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[invokeMethod] operator[SEP] identifier[t] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[SQLException] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[SQLException] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[getNextException] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cName] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[invokeMethod] operator[SEP] identifier[t] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cName] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[invokeMethod] operator[SEP] identifier[t] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cName] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[invokeMethod] operator[SEP] identifier[t] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cName] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[invokeMethod] operator[SEP] identifier[t] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cName] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[invokeMethod] operator[SEP] identifier[t] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cName] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[invokeMethod] operator[SEP] identifier[t] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[reflect] operator[SEP] identifier[UndeclaredThrowableException] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[reflect] operator[SEP] identifier[UndeclaredThrowableException] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[getUndeclaredThrowable] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[WriteAbortedException] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[WriteAbortedException] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[detail] operator[SEP] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[java] operator[SEP] identifier[rmi] operator[SEP] identifier[server] operator[SEP] identifier[ServerCloneException] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[rmi] operator[SEP] identifier[server] operator[SEP] identifier[ServerCloneException] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[detail] operator[SEP] Keyword[if] operator[SEP] identifier[t] Keyword[instanceof] identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[PrivilegedActionException] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[security] operator[SEP] identifier[PrivilegedActionException] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[getException] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
@Trivial static boolean isImmediateExpression(String expression, boolean mask) { final String methodName = "isImmediateExpression"; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.entry(tc, methodName, new Object[] { (expression == null) ? null : mask ? OBFUSCATED_STRING : expression, mask }); } boolean result = expression.startsWith("${") && expression.endsWith("}"); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { Tr.exit(tc, methodName, result); } return result; }
class class_name[name] begin[{] method[isImmediateExpression, return_type[type[boolean]], modifier[static], parameter[expression, mask]] begin[{] local_variable[type[String], methodName] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], member[.methodName], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=expression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=TernaryExpression(condition=MemberReference(member=mask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=expression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=OBFUSCATED_STRING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), MemberReference(member=mask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] local_variable[type[boolean], result] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], member[.methodName], member[.result]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
annotation[@] identifier[Trivial] Keyword[static] Keyword[boolean] identifier[isImmediateExpression] operator[SEP] identifier[String] identifier[expression] , Keyword[boolean] identifier[mask] operator[SEP] { Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , identifier[methodName] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { operator[SEP] identifier[expression] operator[==] Other[null] operator[SEP] operator[?] Other[null] operator[:] identifier[mask] operator[?] identifier[OBFUSCATED_STRING] operator[:] identifier[expression] , identifier[mask] } operator[SEP] operator[SEP] } Keyword[boolean] identifier[result] operator[=] identifier[expression] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[expression] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , identifier[methodName] , identifier[result] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
@Override public void release() throws CpoException { for (CpoReleasible releasible : releasibles) { try { releasible.release(); } catch (CpoException ce) { logger.error("Error Releasing Callable Statement Transform Object", ce); throw ce; } } }
class class_name[name] begin[{] method[release, return_type[void], modifier[public], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=release, postfix_operators=[], prefix_operators=[], qualifier=releasible, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error Releasing Callable Statement Transform Object"), MemberReference(member=ce, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=ce, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ce, types=['CpoException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=releasibles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=releasible)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CpoReleasible, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[release] operator[SEP] operator[SEP] Keyword[throws] identifier[CpoException] { Keyword[for] operator[SEP] identifier[CpoReleasible] identifier[releasible] operator[:] identifier[releasibles] operator[SEP] { Keyword[try] { identifier[releasible] operator[SEP] identifier[release] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CpoException] identifier[ce] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[ce] operator[SEP] operator[SEP] Keyword[throw] identifier[ce] operator[SEP] } } }
public long restart(String str, PrintStream stream) { long elapsed = this.report(str, stream); this.start(); return elapsed; }
class class_name[name] begin[{] method[restart, return_type[type[long]], modifier[public], parameter[str, stream]] begin[{] local_variable[type[long], elapsed] THIS[call[None.start, parameter[]]] return[member[.elapsed]] end[}] END[}]
Keyword[public] Keyword[long] identifier[restart] operator[SEP] identifier[String] identifier[str] , identifier[PrintStream] identifier[stream] operator[SEP] { Keyword[long] identifier[elapsed] operator[=] Keyword[this] operator[SEP] identifier[report] operator[SEP] identifier[str] , identifier[stream] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[elapsed] operator[SEP] }
public T deserialize(String xml) { if (xml == null || xml.equals("")) { throw new RuntimeException("XML cannot be null or empty"); } else { return deserialize(new StreamSource(new StringReader(xml))); } }
class class_name[name] begin[{] method[deserialize, return_type[type[T]], modifier[public], parameter[xml]] begin[{] if[binary_operation[binary_operation[member[.xml], ==, literal[null]], ||, call[xml.equals, parameter[literal[""]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="XML cannot be null or empty")], 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[{] return[call[.deserialize, parameter[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=xml, 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=StringReader, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StreamSource, sub_type=None))]]] end[}] end[}] END[}]
Keyword[public] identifier[T] identifier[deserialize] operator[SEP] identifier[String] identifier[xml] operator[SEP] { Keyword[if] operator[SEP] identifier[xml] operator[==] Other[null] operator[||] identifier[xml] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[deserialize] operator[SEP] Keyword[new] identifier[StreamSource] operator[SEP] Keyword[new] identifier[StringReader] operator[SEP] identifier[xml] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }