code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static int execute(String... args) { Start jdoc = new Start(); return jdoc.begin(args).exitCode; }
class class_name[name] begin[{] method[execute, return_type[type[int]], modifier[public static], parameter[args]] begin[{] local_variable[type[Start], jdoc] return[call[jdoc.begin, parameter[member[.args]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[execute] operator[SEP] identifier[String] operator[...] identifier[args] operator[SEP] { identifier[Start] identifier[jdoc] operator[=] Keyword[new] identifier[Start] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[jdoc] operator[SEP] identifier[begin] operator[SEP] identifier[args] operator[SEP] operator[SEP] identifier[exitCode] operator[SEP] }
public static Bitmap clipSquare(@NonNull final Bitmap bitmap, final int size, final int borderWidth, @ColorInt final int borderColor) { Condition.INSTANCE.ensureAtLeast(borderWidth, 0, "The border width must be at least 0"); Bitmap clippedBitmap = clipSquare(bitmap, size); Bitmap result = Bitmap.createBitmap(clippedBitmap.getWidth(), clippedBitmap.getHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(result); float offset = borderWidth / 2.0f; Rect src = new Rect(0, 0, clippedBitmap.getWidth(), clippedBitmap.getHeight()); RectF dst = new RectF(offset, offset, result.getWidth() - offset, result.getHeight() - offset); canvas.drawBitmap(clippedBitmap, src, dst, null); if (borderWidth > 0 && Color.alpha(borderColor) != 0) { Paint paint = new Paint(); paint.setFilterBitmap(false); paint.setStyle(Paint.Style.STROKE); paint.setStrokeWidth(borderWidth); paint.setColor(borderColor); offset = borderWidth / 2.0f; RectF bounds = new RectF(offset, offset, result.getWidth() - offset, result.getWidth() - offset); canvas.drawRect(bounds, paint); } return result; }
class class_name[name] begin[{] method[clipSquare, return_type[type[Bitmap]], modifier[public static], parameter[bitmap, size, borderWidth, borderColor]] begin[{] call[Condition.INSTANCE.ensureAtLeast, parameter[member[.borderWidth], literal[0], literal["The border width must be at least 0"]]] local_variable[type[Bitmap], clippedBitmap] local_variable[type[Bitmap], result] local_variable[type[Canvas], canvas] local_variable[type[float], offset] local_variable[type[Rect], src] local_variable[type[RectF], dst] call[canvas.drawBitmap, parameter[member[.clippedBitmap], member[.src], member[.dst], literal[null]]] if[binary_operation[binary_operation[member[.borderWidth], >, literal[0]], &&, binary_operation[call[Color.alpha, parameter[member[.borderColor]]], !=, literal[0]]]] begin[{] local_variable[type[Paint], paint] call[paint.setFilterBitmap, parameter[literal[false]]] call[paint.setStyle, parameter[member[Paint.Style.STROKE]]] call[paint.setStrokeWidth, parameter[member[.borderWidth]]] call[paint.setColor, parameter[member[.borderColor]]] assign[member[.offset], binary_operation[member[.borderWidth], /, literal[2.0f]]] local_variable[type[RectF], bounds] call[canvas.drawRect, parameter[member[.bounds], member[.paint]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Bitmap] identifier[clipSquare] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Bitmap] identifier[bitmap] , Keyword[final] Keyword[int] identifier[size] , Keyword[final] Keyword[int] identifier[borderWidth] , annotation[@] identifier[ColorInt] Keyword[final] Keyword[int] identifier[borderColor] operator[SEP] { identifier[Condition] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[ensureAtLeast] operator[SEP] identifier[borderWidth] , Other[0] , literal[String] operator[SEP] operator[SEP] identifier[Bitmap] identifier[clippedBitmap] operator[=] identifier[clipSquare] operator[SEP] identifier[bitmap] , identifier[size] operator[SEP] operator[SEP] identifier[Bitmap] identifier[result] operator[=] identifier[Bitmap] operator[SEP] identifier[createBitmap] operator[SEP] identifier[clippedBitmap] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[clippedBitmap] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] , identifier[Bitmap] operator[SEP] identifier[Config] operator[SEP] identifier[ARGB_8888] operator[SEP] operator[SEP] identifier[Canvas] identifier[canvas] operator[=] Keyword[new] identifier[Canvas] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[float] identifier[offset] operator[=] identifier[borderWidth] operator[/] literal[Float] operator[SEP] identifier[Rect] identifier[src] operator[=] Keyword[new] identifier[Rect] operator[SEP] Other[0] , Other[0] , identifier[clippedBitmap] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[clippedBitmap] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[RectF] identifier[dst] operator[=] Keyword[new] identifier[RectF] operator[SEP] identifier[offset] , identifier[offset] , identifier[result] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[-] identifier[offset] , identifier[result] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[-] identifier[offset] operator[SEP] operator[SEP] identifier[canvas] operator[SEP] identifier[drawBitmap] operator[SEP] identifier[clippedBitmap] , identifier[src] , identifier[dst] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[borderWidth] operator[>] Other[0] operator[&&] identifier[Color] operator[SEP] identifier[alpha] operator[SEP] identifier[borderColor] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[Paint] identifier[paint] operator[=] Keyword[new] identifier[Paint] operator[SEP] operator[SEP] operator[SEP] identifier[paint] operator[SEP] identifier[setFilterBitmap] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[paint] operator[SEP] identifier[setStyle] operator[SEP] identifier[Paint] operator[SEP] identifier[Style] operator[SEP] identifier[STROKE] operator[SEP] operator[SEP] identifier[paint] operator[SEP] identifier[setStrokeWidth] operator[SEP] identifier[borderWidth] operator[SEP] operator[SEP] identifier[paint] operator[SEP] identifier[setColor] operator[SEP] identifier[borderColor] operator[SEP] operator[SEP] identifier[offset] operator[=] identifier[borderWidth] operator[/] literal[Float] operator[SEP] identifier[RectF] identifier[bounds] operator[=] Keyword[new] identifier[RectF] operator[SEP] identifier[offset] , identifier[offset] , identifier[result] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[-] identifier[offset] , identifier[result] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[-] identifier[offset] operator[SEP] operator[SEP] identifier[canvas] operator[SEP] identifier[drawRect] operator[SEP] identifier[bounds] , identifier[paint] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public Map<String, Object> parseToMap(String source) throws ParseException { ParsePosition pos = new ParsePosition(0); Map<String, Object> result = new HashMap<String, Object>(); parse(0, source, pos, null, result); if (pos.getIndex() == 0) // unchanged, returned object is null throw new ParseException("MessageFormat parse error!", pos.getErrorIndex()); return result; }
class class_name[name] begin[{] method[parseToMap, return_type[type[Map]], modifier[public], parameter[source]] begin[{] local_variable[type[ParsePosition], pos] local_variable[type[Map], result] call[.parse, parameter[literal[0], member[.source], member[.pos], literal[null], member[.result]]] if[binary_operation[call[pos.getIndex, parameter[]], ==, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="MessageFormat parse error!"), MethodInvocation(arguments=[], member=getErrorIndex, postfix_operators=[], prefix_operators=[], qualifier=pos, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parseToMap] operator[SEP] identifier[String] identifier[source] operator[SEP] Keyword[throws] identifier[ParseException] { identifier[ParsePosition] identifier[pos] operator[=] Keyword[new] identifier[ParsePosition] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[result] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[parse] operator[SEP] Other[0] , identifier[source] , identifier[pos] , Other[null] , identifier[result] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pos] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] literal[String] , identifier[pos] operator[SEP] identifier[getErrorIndex] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public ResultMatcher isArray() { return new AbstractResultMatcher(path, configuration) { public void doMatch(Object actual) { isPresent(actual); Node node = getNode(actual); if (node.getNodeType() != ARRAY) { failOnType(node, "an array"); } } }; }
class class_name[name] begin[{] method[isArray, return_type[type[ResultMatcher]], modifier[public], parameter[]] begin[{] return[ClassCreator(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configuration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=actual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isPresent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=actual, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNodeType, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), operandr=MemberReference(member=ARRAY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="an array")], member=failOnType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=doMatch, parameters=[FormalParameter(annotations=[], modifiers=set(), name=actual, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AbstractResultMatcher, sub_type=None))] end[}] END[}]
Keyword[public] identifier[ResultMatcher] identifier[isArray] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[AbstractResultMatcher] operator[SEP] identifier[path] , identifier[configuration] operator[SEP] { Keyword[public] Keyword[void] identifier[doMatch] operator[SEP] identifier[Object] identifier[actual] operator[SEP] { identifier[isPresent] operator[SEP] identifier[actual] operator[SEP] operator[SEP] identifier[Node] identifier[node] operator[=] identifier[getNode] operator[SEP] identifier[actual] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[getNodeType] operator[SEP] operator[SEP] operator[!=] identifier[ARRAY] operator[SEP] { identifier[failOnType] operator[SEP] identifier[node] , literal[String] operator[SEP] operator[SEP] } } } operator[SEP] }
public int getMaxActiveMessages() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, "getMaxActiveMessages"); SibTr.exit(tc, "getMaxActiveMessages", Integer.valueOf(_maxActiveMessages)); } return _maxActiveMessages; }
class class_name[name] begin[{] method[getMaxActiveMessages, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["getMaxActiveMessages"]]] call[SibTr.exit, parameter[member[.tc], literal["getMaxActiveMessages"], call[Integer.valueOf, parameter[member[._maxActiveMessages]]]]] else begin[{] None end[}] return[member[._maxActiveMessages]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getMaxActiveMessages] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[_maxActiveMessages] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[_maxActiveMessages] operator[SEP] }
protected void validate(String operationType) throws Exception { super.validate(operationType); MPSString serial_no_validator = new MPSString(); serial_no_validator.validate(operationType, serial_no, "\"serial_no\""); MPSString id_validator = new MPSString(); id_validator.validate(operationType, id, "\"id\""); MPSString session_id_validator = new MPSString(); session_id_validator.validate(operationType, session_id, "\"session_id\""); MPSString name_validator = new MPSString(); name_validator.validate(operationType, name, "\"name\""); MPSInt relevance_validator = new MPSInt(); relevance_validator.validate(operationType, relevance, "\"relevance\""); MPSString bind_type_validator = new MPSString(); bind_type_validator.validate(operationType, bind_type, "\"bind_type\""); MPSInt count_total_validator = new MPSInt(); count_total_validator.validate(operationType, count_total, "\"count_total\""); MPSInt count_available_validator = new MPSInt(); count_available_validator.validate(operationType, count_available, "\"count_available\""); MPSString date_purchased_validator = new MPSString(); date_purchased_validator.validate(operationType, date_purchased, "\"date_purchased\""); MPSString date_exp_validator = new MPSString(); date_exp_validator.validate(operationType, date_exp, "\"date_exp\""); MPSString features_validator = new MPSString(); features_validator.validate(operationType, features, "\"features\""); }
class class_name[name] begin[{] method[validate, return_type[void], modifier[protected], parameter[operationType]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=operationType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validate, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) local_variable[type[MPSString], serial_no_validator] call[serial_no_validator.validate, parameter[member[.operationType], member[.serial_no], literal["\"serial_no\""]]] local_variable[type[MPSString], id_validator] call[id_validator.validate, parameter[member[.operationType], member[.id], literal["\"id\""]]] local_variable[type[MPSString], session_id_validator] call[session_id_validator.validate, parameter[member[.operationType], member[.session_id], literal["\"session_id\""]]] local_variable[type[MPSString], name_validator] call[name_validator.validate, parameter[member[.operationType], member[.name], literal["\"name\""]]] local_variable[type[MPSInt], relevance_validator] call[relevance_validator.validate, parameter[member[.operationType], member[.relevance], literal["\"relevance\""]]] local_variable[type[MPSString], bind_type_validator] call[bind_type_validator.validate, parameter[member[.operationType], member[.bind_type], literal["\"bind_type\""]]] local_variable[type[MPSInt], count_total_validator] call[count_total_validator.validate, parameter[member[.operationType], member[.count_total], literal["\"count_total\""]]] local_variable[type[MPSInt], count_available_validator] call[count_available_validator.validate, parameter[member[.operationType], member[.count_available], literal["\"count_available\""]]] local_variable[type[MPSString], date_purchased_validator] call[date_purchased_validator.validate, parameter[member[.operationType], member[.date_purchased], literal["\"date_purchased\""]]] local_variable[type[MPSString], date_exp_validator] call[date_exp_validator.validate, parameter[member[.operationType], member[.date_exp], literal["\"date_exp\""]]] local_variable[type[MPSString], features_validator] call[features_validator.validate, parameter[member[.operationType], member[.features], literal["\"features\""]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[validate] operator[SEP] identifier[String] identifier[operationType] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[super] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] operator[SEP] operator[SEP] identifier[MPSString] identifier[serial_no_validator] operator[=] Keyword[new] identifier[MPSString] operator[SEP] operator[SEP] operator[SEP] identifier[serial_no_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[serial_no] , literal[String] operator[SEP] operator[SEP] identifier[MPSString] identifier[id_validator] operator[=] Keyword[new] identifier[MPSString] operator[SEP] operator[SEP] operator[SEP] identifier[id_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[id] , literal[String] operator[SEP] operator[SEP] identifier[MPSString] identifier[session_id_validator] operator[=] Keyword[new] identifier[MPSString] operator[SEP] operator[SEP] operator[SEP] identifier[session_id_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[session_id] , literal[String] operator[SEP] operator[SEP] identifier[MPSString] identifier[name_validator] operator[=] Keyword[new] identifier[MPSString] operator[SEP] operator[SEP] operator[SEP] identifier[name_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[name] , literal[String] operator[SEP] operator[SEP] identifier[MPSInt] identifier[relevance_validator] operator[=] Keyword[new] identifier[MPSInt] operator[SEP] operator[SEP] operator[SEP] identifier[relevance_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[relevance] , literal[String] operator[SEP] operator[SEP] identifier[MPSString] identifier[bind_type_validator] operator[=] Keyword[new] identifier[MPSString] operator[SEP] operator[SEP] operator[SEP] identifier[bind_type_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[bind_type] , literal[String] operator[SEP] operator[SEP] identifier[MPSInt] identifier[count_total_validator] operator[=] Keyword[new] identifier[MPSInt] operator[SEP] operator[SEP] operator[SEP] identifier[count_total_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[count_total] , literal[String] operator[SEP] operator[SEP] identifier[MPSInt] identifier[count_available_validator] operator[=] Keyword[new] identifier[MPSInt] operator[SEP] operator[SEP] operator[SEP] identifier[count_available_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[count_available] , literal[String] operator[SEP] operator[SEP] identifier[MPSString] identifier[date_purchased_validator] operator[=] Keyword[new] identifier[MPSString] operator[SEP] operator[SEP] operator[SEP] identifier[date_purchased_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[date_purchased] , literal[String] operator[SEP] operator[SEP] identifier[MPSString] identifier[date_exp_validator] operator[=] Keyword[new] identifier[MPSString] operator[SEP] operator[SEP] operator[SEP] identifier[date_exp_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[date_exp] , literal[String] operator[SEP] operator[SEP] identifier[MPSString] identifier[features_validator] operator[=] Keyword[new] identifier[MPSString] operator[SEP] operator[SEP] operator[SEP] identifier[features_validator] operator[SEP] identifier[validate] operator[SEP] identifier[operationType] , identifier[features] , literal[String] operator[SEP] operator[SEP] }
private void notifyListeners(List<PipelineTimelineEntry> newEntries) { Map<CaseInsensitiveString, PipelineTimelineEntry> pipelineToOldestEntry = new HashMap<>(); for (PipelineTimelineEntry challenger : newEntries) { CaseInsensitiveString pipelineName = new CaseInsensitiveString(challenger.getPipelineName()); PipelineTimelineEntry champion = pipelineToOldestEntry.get(pipelineName); if (champion == null || challenger.compareTo(champion) < 0) { pipelineToOldestEntry.put(pipelineName, challenger); } } for (TimelineUpdateListener listener : listeners) { for (Map.Entry<CaseInsensitiveString, PipelineTimelineEntry> entry : pipelineToOldestEntry.entrySet()) { try { listener.added(entry.getValue(), naturalOrderPmm.get(entry.getKey())); } catch (Exception e) { LOGGER.warn("Ignoring exception when notifying listener: {}", listener, e); } } } }
class class_name[name] begin[{] method[notifyListeners, return_type[void], modifier[private], parameter[newEntries]] begin[{] local_variable[type[Map], pipelineToOldestEntry] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getPipelineName, postfix_operators=[], prefix_operators=[], qualifier=challenger, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CaseInsensitiveString, sub_type=None)), name=pipelineName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CaseInsensitiveString, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=pipelineName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=pipelineToOldestEntry, selectors=[], type_arguments=None), name=champion)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PipelineTimelineEntry, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=champion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=champion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compareTo, postfix_operators=[], prefix_operators=[], qualifier=challenger, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pipelineName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=challenger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=pipelineToOldestEntry, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=newEntries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=challenger)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PipelineTimelineEntry, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=naturalOrderPmm, selectors=[], type_arguments=None)], member=added, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Ignoring exception when notifying listener: {}"), MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, 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)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=pipelineToOldestEntry, 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=CaseInsensitiveString, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=PipelineTimelineEntry, sub_type=None))], dimensions=None, name=Entry, sub_type=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=TimelineUpdateListener, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[notifyListeners] operator[SEP] identifier[List] operator[<] identifier[PipelineTimelineEntry] operator[>] identifier[newEntries] operator[SEP] { identifier[Map] operator[<] identifier[CaseInsensitiveString] , identifier[PipelineTimelineEntry] operator[>] identifier[pipelineToOldestEntry] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[PipelineTimelineEntry] identifier[challenger] operator[:] identifier[newEntries] operator[SEP] { identifier[CaseInsensitiveString] identifier[pipelineName] operator[=] Keyword[new] identifier[CaseInsensitiveString] operator[SEP] identifier[challenger] operator[SEP] identifier[getPipelineName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[PipelineTimelineEntry] identifier[champion] operator[=] identifier[pipelineToOldestEntry] operator[SEP] identifier[get] operator[SEP] identifier[pipelineName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[champion] operator[==] Other[null] operator[||] identifier[challenger] operator[SEP] identifier[compareTo] operator[SEP] identifier[champion] operator[SEP] operator[<] Other[0] operator[SEP] { identifier[pipelineToOldestEntry] operator[SEP] identifier[put] operator[SEP] identifier[pipelineName] , identifier[challenger] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[TimelineUpdateListener] identifier[listener] operator[:] identifier[listeners] operator[SEP] { Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[CaseInsensitiveString] , identifier[PipelineTimelineEntry] operator[>] identifier[entry] operator[:] identifier[pipelineToOldestEntry] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[listener] operator[SEP] identifier[added] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[naturalOrderPmm] operator[SEP] identifier[get] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[listener] , identifier[e] operator[SEP] operator[SEP] } } } }
public String getRegistryUrl() { String host = getRegistryHost(); int port = getRegistryPort(); host = host.substring(host.length() - 1).equals("/") ? host.substring(0, host.length() - 1) : host; host = host.replaceFirst("http://", ""); host = host.replaceFirst("https://", ""); return host + ":" + port; }
class class_name[name] begin[{] method[getRegistryUrl, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], host] local_variable[type[int], port] assign[member[.host], TernaryExpression(condition=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=host, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=host, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_false=MemberReference(member=host, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=host, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=host, selectors=[], type_arguments=None))] assign[member[.host], call[host.replaceFirst, parameter[literal["http://"], literal[""]]]] assign[member[.host], call[host.replaceFirst, parameter[literal["https://"], literal[""]]]] return[binary_operation[binary_operation[member[.host], +, literal[":"]], +, member[.port]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getRegistryUrl] operator[SEP] operator[SEP] { identifier[String] identifier[host] operator[=] identifier[getRegistryHost] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[port] operator[=] identifier[getRegistryPort] operator[SEP] operator[SEP] operator[SEP] identifier[host] operator[=] identifier[host] operator[SEP] identifier[substring] operator[SEP] identifier[host] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[?] identifier[host] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[host] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[:] identifier[host] operator[SEP] identifier[host] operator[=] identifier[host] operator[SEP] identifier[replaceFirst] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[host] operator[=] identifier[host] operator[SEP] identifier[replaceFirst] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[host] operator[+] literal[String] operator[+] identifier[port] operator[SEP] }
@MainThread public void removeObserver(@NonNull final Observer<T> observer) { assertMainThread("removeObserver"); ObserverWrapper removed = mObservers.remove(observer); if (removed == null) { return; } removed.detachObserver(); removed.activeStateChanged(false); }
class class_name[name] begin[{] method[removeObserver, return_type[void], modifier[public], parameter[observer]] begin[{] call[.assertMainThread, parameter[literal["removeObserver"]]] local_variable[type[ObserverWrapper], removed] if[binary_operation[member[.removed], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[removed.detachObserver, parameter[]] call[removed.activeStateChanged, parameter[literal[false]]] end[}] END[}]
annotation[@] identifier[MainThread] Keyword[public] Keyword[void] identifier[removeObserver] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Observer] operator[<] identifier[T] operator[>] identifier[observer] operator[SEP] { identifier[assertMainThread] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ObserverWrapper] identifier[removed] operator[=] identifier[mObservers] operator[SEP] identifier[remove] operator[SEP] identifier[observer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[removed] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[removed] operator[SEP] identifier[detachObserver] operator[SEP] operator[SEP] operator[SEP] identifier[removed] operator[SEP] identifier[activeStateChanged] operator[SEP] literal[boolean] operator[SEP] operator[SEP] }
public void trace(@Nullable final String event, @Nullable final String message) { log(LogLevel.TRACE, event, message, EMPTY_STRING_ARRAY, EMPTY_OBJECT_ARRAY, DEFAULT_THROWABLE); }
class class_name[name] begin[{] method[trace, return_type[void], modifier[public], parameter[event, message]] begin[{] call[.log, parameter[member[LogLevel.TRACE], member[.event], member[.message], member[.EMPTY_STRING_ARRAY], member[.EMPTY_OBJECT_ARRAY], member[.DEFAULT_THROWABLE]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[trace] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[event] , annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[message] operator[SEP] { identifier[log] operator[SEP] identifier[LogLevel] operator[SEP] identifier[TRACE] , identifier[event] , identifier[message] , identifier[EMPTY_STRING_ARRAY] , identifier[EMPTY_OBJECT_ARRAY] , identifier[DEFAULT_THROWABLE] operator[SEP] operator[SEP] }
public Client loginWithVerifier(String verifier) { Token token = service.getAccessToken(requestToken, new Verifier(verifier)); return loginWithAccessToken(token.getToken(), token.getSecret()); }
class class_name[name] begin[{] method[loginWithVerifier, return_type[type[Client]], modifier[public], parameter[verifier]] begin[{] local_variable[type[Token], token] return[call[.loginWithAccessToken, parameter[call[token.getToken, parameter[]], call[token.getSecret, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[Client] identifier[loginWithVerifier] operator[SEP] identifier[String] identifier[verifier] operator[SEP] { identifier[Token] identifier[token] operator[=] identifier[service] operator[SEP] identifier[getAccessToken] operator[SEP] identifier[requestToken] , Keyword[new] identifier[Verifier] operator[SEP] identifier[verifier] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[loginWithAccessToken] operator[SEP] identifier[token] operator[SEP] identifier[getToken] operator[SEP] operator[SEP] , identifier[token] operator[SEP] identifier[getSecret] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public boolean isRootedWithoutBusyBoxCheck() { return detectRootManagementApps() || detectPotentiallyDangerousApps() || checkForBinary(BINARY_SU) || checkForDangerousProps() || checkForRWPaths() || detectTestKeys() || checkSuExists() || checkForRootNative() || checkForMagiskBinary(); }
class class_name[name] begin[{] method[isRootedWithoutBusyBoxCheck, return_type[type[boolean]], modifier[public], parameter[]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[call[.detectRootManagementApps, parameter[]], ||, call[.detectPotentiallyDangerousApps, parameter[]]], ||, call[.checkForBinary, parameter[member[.BINARY_SU]]]], ||, call[.checkForDangerousProps, parameter[]]], ||, call[.checkForRWPaths, parameter[]]], ||, call[.detectTestKeys, parameter[]]], ||, call[.checkSuExists, parameter[]]], ||, call[.checkForRootNative, parameter[]]], ||, call[.checkForMagiskBinary, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isRootedWithoutBusyBoxCheck] operator[SEP] operator[SEP] { Keyword[return] identifier[detectRootManagementApps] operator[SEP] operator[SEP] operator[||] identifier[detectPotentiallyDangerousApps] operator[SEP] operator[SEP] operator[||] identifier[checkForBinary] operator[SEP] identifier[BINARY_SU] operator[SEP] operator[||] identifier[checkForDangerousProps] operator[SEP] operator[SEP] operator[||] identifier[checkForRWPaths] operator[SEP] operator[SEP] operator[||] identifier[detectTestKeys] operator[SEP] operator[SEP] operator[||] identifier[checkSuExists] operator[SEP] operator[SEP] operator[||] identifier[checkForRootNative] operator[SEP] operator[SEP] operator[||] identifier[checkForMagiskBinary] operator[SEP] operator[SEP] operator[SEP] }
public synchronized IDbgpService getDbgpService(int freePort) { // if (dbgpService == null) { dbgpService = new DbgpService(freePort); getPluginPreferences().addPropertyChangeListener(new DbgpServicePreferenceUpdater()); // } return dbgpService; }
class class_name[name] begin[{] method[getDbgpService, return_type[type[IDbgpService]], modifier[synchronized public], parameter[freePort]] begin[{] assign[member[.dbgpService], ClassCreator(arguments=[MemberReference(member=freePort, 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=DbgpService, sub_type=None))] call[.getPluginPreferences, parameter[]] return[member[.dbgpService]] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[IDbgpService] identifier[getDbgpService] operator[SEP] Keyword[int] identifier[freePort] operator[SEP] { identifier[dbgpService] operator[=] Keyword[new] identifier[DbgpService] operator[SEP] identifier[freePort] operator[SEP] operator[SEP] identifier[getPluginPreferences] operator[SEP] operator[SEP] operator[SEP] identifier[addPropertyChangeListener] operator[SEP] Keyword[new] identifier[DbgpServicePreferenceUpdater] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[dbgpService] operator[SEP] }
public static void runExample( AdManagerServices adManagerServices, AdManagerSession session, long productPackageId) throws RemoteException { // Get the ProductPackageService. ProductPackageServiceInterface productPackageService = adManagerServices.get(session, ProductPackageServiceInterface.class); // Create a statement to select a single product package. StatementBuilder statementBuilder = new StatementBuilder() .where("id = :id") .orderBy("id ASC") .limit(1) .withBindVariableValue("id", productPackageId); // Get the product package. ProductPackagePage page = productPackageService.getProductPackagesByStatement( statementBuilder.toStatement()); ProductPackage productPackage = Iterables.getOnlyElement( Arrays.asList(page.getResults())); System.out.printf("Product package with ID %d will be activated.%n", productPackage.getId()); // Remove limit and offset from statement. statementBuilder.removeLimitAndOffset(); // Create action to activate product packages. com.google.api.ads.admanager.axis.v201808.ActivateProductPackages action = new com.google.api.ads.admanager.axis.v201808.ActivateProductPackages(); // Perform action. UpdateResult result = productPackageService.performProductPackageAction( action, statementBuilder.toStatement()); if (result != null && result.getNumChanges() > 0) { System.out.printf("Number of product packages activated: %d%n", result.getNumChanges()); } else { System.out.println("No product packages were deactivated."); } }
class class_name[name] begin[{] method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session, productPackageId]] begin[{] local_variable[type[ProductPackageServiceInterface], productPackageService] local_variable[type[StatementBuilder], statementBuilder] local_variable[type[ProductPackagePage], page] local_variable[type[ProductPackage], productPackage] call[System.out.printf, parameter[literal["Product package with ID %d will be activated.%n"], call[productPackage.getId, parameter[]]]] call[statementBuilder.removeLimitAndOffset, parameter[]] local_variable[type[com], action] local_variable[type[UpdateResult], result] if[binary_operation[binary_operation[member[.result], !=, literal[null]], &&, binary_operation[call[result.getNumChanges, parameter[]], >, literal[0]]]] begin[{] call[System.out.printf, parameter[literal["Number of product packages activated: %d%n"], call[result.getNumChanges, parameter[]]]] else begin[{] call[System.out.println, parameter[literal["No product packages were deactivated."]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] , Keyword[long] identifier[productPackageId] operator[SEP] Keyword[throws] identifier[RemoteException] { identifier[ProductPackageServiceInterface] identifier[productPackageService] operator[=] identifier[adManagerServices] operator[SEP] identifier[get] operator[SEP] identifier[session] , identifier[ProductPackageServiceInterface] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[StatementBuilder] identifier[statementBuilder] operator[=] Keyword[new] identifier[StatementBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[where] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[orderBy] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[limit] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[withBindVariableValue] operator[SEP] literal[String] , identifier[productPackageId] operator[SEP] operator[SEP] identifier[ProductPackagePage] identifier[page] operator[=] identifier[productPackageService] operator[SEP] identifier[getProductPackagesByStatement] operator[SEP] identifier[statementBuilder] operator[SEP] identifier[toStatement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ProductPackage] identifier[productPackage] operator[=] identifier[Iterables] operator[SEP] identifier[getOnlyElement] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[page] operator[SEP] identifier[getResults] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[printf] operator[SEP] literal[String] , identifier[productPackage] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[statementBuilder] operator[SEP] identifier[removeLimitAndOffset] operator[SEP] operator[SEP] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201808] operator[SEP] identifier[ActivateProductPackages] identifier[action] operator[=] Keyword[new] 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[ActivateProductPackages] operator[SEP] operator[SEP] operator[SEP] identifier[UpdateResult] identifier[result] operator[=] identifier[productPackageService] operator[SEP] identifier[performProductPackageAction] operator[SEP] identifier[action] , identifier[statementBuilder] operator[SEP] identifier[toStatement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[&&] identifier[result] operator[SEP] identifier[getNumChanges] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[printf] operator[SEP] literal[String] , identifier[result] operator[SEP] identifier[getNumChanges] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
private String memberName(Member member) { if (member instanceof Constructor) return member.getDeclaringClass().getSimpleName(); else return member.getName(); }
class class_name[name] begin[{] method[memberName, return_type[type[String]], modifier[private], parameter[member]] begin[{] if[binary_operation[member[.member], instanceof, type[Constructor]]] begin[{] return[call[member.getDeclaringClass, parameter[]]] else begin[{] return[call[member.getName, parameter[]]] end[}] end[}] END[}]
Keyword[private] identifier[String] identifier[memberName] operator[SEP] identifier[Member] identifier[member] operator[SEP] { Keyword[if] operator[SEP] identifier[member] Keyword[instanceof] identifier[Constructor] operator[SEP] Keyword[return] identifier[member] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[return] identifier[member] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] }
private static ServiceAccount parseToServiceAccount(JsonArray jsonArray, String serviceInstanceName) { ServiceAccount account = null; for (int i = 0; i < jsonArray.size(); i++) { JsonObject gpObj = jsonArray.get(i).getAsJsonObject(); if (serviceInstanceName != null) { // When service instance name is specified, // this method returns only a matching entry JsonPrimitive name = gpObj.getAsJsonPrimitive("name"); if (name == null || !serviceInstanceName.equals(name.getAsString())) { continue; } } JsonObject credentials = gpObj.getAsJsonObject("credentials"); if (credentials == null) { continue; } JsonPrimitive jsonUrl = credentials.getAsJsonPrimitive("url"); JsonPrimitive jsonInstanceId = credentials.getAsJsonPrimitive("instanceId"); JsonPrimitive jsonUserId = credentials.getAsJsonPrimitive("userId"); JsonPrimitive jsonPassword = credentials.getAsJsonPrimitive("password"); JsonPrimitive jsonIamEndpoint = credentials.getAsJsonPrimitive("iam_endpoint"); JsonPrimitive jsonIamApiKey = credentials.getAsJsonPrimitive("apikey"); if (jsonUrl != null && jsonInstanceId != null) { if (jsonUserId != null && jsonPassword != null) { account = getInstance(jsonUrl.getAsString(), jsonInstanceId.getAsString(), jsonUserId.getAsString(), jsonPassword.getAsString()); logger.config( "A ServiceAccount is created from VCAP_SERVICES: url=" + jsonUrl + ", instanceId=" + jsonInstanceId + ", userId=" + jsonUserId + ", password=***"); break; } else if (jsonIamEndpoint != null && jsonIamApiKey != null) { account = getInstance(jsonUrl.getAsString(), jsonInstanceId.getAsString(), TokenManagerFactory.getTokenLifeCycleManager( jsonIamEndpoint.getAsString(), jsonIamApiKey.getAsString())); logger.config( "A ServiceAccount is created from VCAP_SERVICES: url=" + jsonUrl + ", instanceId=" + jsonInstanceId + ", iam_endpoint=" + jsonIamEndpoint + ", apikey=***"); break; } } } return account; }
class class_name[name] begin[{] method[parseToServiceAccount, return_type[type[ServiceAccount]], modifier[private static], parameter[jsonArray, serviceInstanceName]] begin[{] local_variable[type[ServiceAccount], account] 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=jsonArray, selectors=[MethodInvocation(arguments=[], member=getAsJsonObject, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=gpObj)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonObject, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serviceInstanceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="name")], member=getAsJsonPrimitive, postfix_operators=[], prefix_operators=[], qualifier=gpObj, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonPrimitive, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=serviceInstanceName, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)]))])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="credentials")], member=getAsJsonObject, postfix_operators=[], prefix_operators=[], qualifier=gpObj, selectors=[], type_arguments=None), name=credentials)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonObject, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=credentials, 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=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="url")], member=getAsJsonPrimitive, postfix_operators=[], prefix_operators=[], qualifier=credentials, selectors=[], type_arguments=None), name=jsonUrl)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonPrimitive, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="instanceId")], member=getAsJsonPrimitive, postfix_operators=[], prefix_operators=[], qualifier=credentials, selectors=[], type_arguments=None), name=jsonInstanceId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonPrimitive, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="userId")], member=getAsJsonPrimitive, postfix_operators=[], prefix_operators=[], qualifier=credentials, selectors=[], type_arguments=None), name=jsonUserId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonPrimitive, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="password")], member=getAsJsonPrimitive, postfix_operators=[], prefix_operators=[], qualifier=credentials, selectors=[], type_arguments=None), name=jsonPassword)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonPrimitive, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="iam_endpoint")], member=getAsJsonPrimitive, postfix_operators=[], prefix_operators=[], qualifier=credentials, selectors=[], type_arguments=None), name=jsonIamEndpoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonPrimitive, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="apikey")], member=getAsJsonPrimitive, postfix_operators=[], prefix_operators=[], qualifier=credentials, selectors=[], type_arguments=None), name=jsonIamApiKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonPrimitive, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=jsonUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=jsonInstanceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=jsonUserId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=jsonPassword, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=jsonIamEndpoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=jsonIamApiKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=account, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=[], prefix_operators=[], qualifier=jsonUrl, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getAsString, postfix_operators=[], prefix_operators=[], qualifier=jsonInstanceId, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=[], prefix_operators=[], qualifier=jsonIamEndpoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getAsString, postfix_operators=[], prefix_operators=[], qualifier=jsonIamApiKey, selectors=[], type_arguments=None)], member=getTokenLifeCycleManager, postfix_operators=[], prefix_operators=[], qualifier=TokenManagerFactory, selectors=[], type_arguments=None)], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="A ServiceAccount is created from VCAP_SERVICES: url="), operandr=MemberReference(member=jsonUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", instanceId="), operator=+), operandr=MemberReference(member=jsonInstanceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", iam_endpoint="), operator=+), operandr=MemberReference(member=jsonIamEndpoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", apikey=***"), operator=+)], member=config, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=account, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAsString, postfix_operators=[], prefix_operators=[], qualifier=jsonUrl, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getAsString, postfix_operators=[], prefix_operators=[], qualifier=jsonInstanceId, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getAsString, postfix_operators=[], prefix_operators=[], qualifier=jsonUserId, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getAsString, postfix_operators=[], prefix_operators=[], qualifier=jsonPassword, selectors=[], type_arguments=None)], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="A ServiceAccount is created from VCAP_SERVICES: url="), operandr=MemberReference(member=jsonUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", instanceId="), operator=+), operandr=MemberReference(member=jsonInstanceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", userId="), operator=+), operandr=MemberReference(member=jsonUserId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", password=***"), operator=+)], member=config, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=jsonArray, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.account]] end[}] END[}]
Keyword[private] Keyword[static] identifier[ServiceAccount] identifier[parseToServiceAccount] operator[SEP] identifier[JsonArray] identifier[jsonArray] , identifier[String] identifier[serviceInstanceName] operator[SEP] { identifier[ServiceAccount] identifier[account] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[jsonArray] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[JsonObject] identifier[gpObj] operator[=] identifier[jsonArray] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getAsJsonObject] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serviceInstanceName] operator[!=] Other[null] operator[SEP] { identifier[JsonPrimitive] identifier[name] operator[=] identifier[gpObj] operator[SEP] identifier[getAsJsonPrimitive] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[||] operator[!] identifier[serviceInstanceName] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } } identifier[JsonObject] identifier[credentials] operator[=] identifier[gpObj] operator[SEP] identifier[getAsJsonObject] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[credentials] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } identifier[JsonPrimitive] identifier[jsonUrl] operator[=] identifier[credentials] operator[SEP] identifier[getAsJsonPrimitive] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[JsonPrimitive] identifier[jsonInstanceId] operator[=] identifier[credentials] operator[SEP] identifier[getAsJsonPrimitive] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[JsonPrimitive] identifier[jsonUserId] operator[=] identifier[credentials] operator[SEP] identifier[getAsJsonPrimitive] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[JsonPrimitive] identifier[jsonPassword] operator[=] identifier[credentials] operator[SEP] identifier[getAsJsonPrimitive] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[JsonPrimitive] identifier[jsonIamEndpoint] operator[=] identifier[credentials] operator[SEP] identifier[getAsJsonPrimitive] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[JsonPrimitive] identifier[jsonIamApiKey] operator[=] identifier[credentials] operator[SEP] identifier[getAsJsonPrimitive] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jsonUrl] operator[!=] Other[null] operator[&&] identifier[jsonInstanceId] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[jsonUserId] operator[!=] Other[null] operator[&&] identifier[jsonPassword] operator[!=] Other[null] operator[SEP] { identifier[account] operator[=] identifier[getInstance] operator[SEP] identifier[jsonUrl] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] , identifier[jsonInstanceId] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] , identifier[jsonUserId] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] , identifier[jsonPassword] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[config] operator[SEP] literal[String] operator[+] identifier[jsonUrl] operator[+] literal[String] operator[+] identifier[jsonInstanceId] operator[+] literal[String] operator[+] identifier[jsonUserId] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[jsonIamEndpoint] operator[!=] Other[null] operator[&&] identifier[jsonIamApiKey] operator[!=] Other[null] operator[SEP] { identifier[account] operator[=] identifier[getInstance] operator[SEP] identifier[jsonUrl] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] , identifier[jsonInstanceId] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] , identifier[TokenManagerFactory] operator[SEP] identifier[getTokenLifeCycleManager] operator[SEP] identifier[jsonIamEndpoint] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] , identifier[jsonIamApiKey] operator[SEP] identifier[getAsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[config] operator[SEP] literal[String] operator[+] identifier[jsonUrl] operator[+] literal[String] operator[+] identifier[jsonInstanceId] operator[+] literal[String] operator[+] identifier[jsonIamEndpoint] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[return] identifier[account] operator[SEP] }
private boolean isReadOnlyKey(Collection.Key key) { return (key.equals(KeyConstants._java) || key.equals(KeyConstants._separator) || key.equals(KeyConstants._os) || key.equals(KeyConstants._coldfusion) || key.equals(KeyConstants._lucee)); }
class class_name[name] begin[{] method[isReadOnlyKey, return_type[type[boolean]], modifier[private], parameter[key]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[call[key.equals, parameter[member[KeyConstants._java]]], ||, call[key.equals, parameter[member[KeyConstants._separator]]]], ||, call[key.equals, parameter[member[KeyConstants._os]]]], ||, call[key.equals, parameter[member[KeyConstants._coldfusion]]]], ||, call[key.equals, parameter[member[KeyConstants._lucee]]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isReadOnlyKey] operator[SEP] identifier[Collection] operator[SEP] identifier[Key] identifier[key] operator[SEP] { Keyword[return] operator[SEP] identifier[key] operator[SEP] identifier[equals] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_java] operator[SEP] operator[||] identifier[key] operator[SEP] identifier[equals] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_separator] operator[SEP] operator[||] identifier[key] operator[SEP] identifier[equals] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_os] operator[SEP] operator[||] identifier[key] operator[SEP] identifier[equals] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_coldfusion] operator[SEP] operator[||] identifier[key] operator[SEP] identifier[equals] operator[SEP] identifier[KeyConstants] operator[SEP] identifier[_lucee] operator[SEP] operator[SEP] operator[SEP] }
public OperationTrace startAdvancedTracer(String name) { return new OperationTrace(name, tracer.get(), state.getSessionId()); }
class class_name[name] begin[{] method[startAdvancedTracer, return_type[type[OperationTrace]], modifier[public], parameter[name]] begin[{] return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=tracer, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getSessionId, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OperationTrace, sub_type=None))] end[}] END[}]
Keyword[public] identifier[OperationTrace] identifier[startAdvancedTracer] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[return] Keyword[new] identifier[OperationTrace] operator[SEP] identifier[name] , identifier[tracer] operator[SEP] identifier[get] operator[SEP] operator[SEP] , identifier[state] operator[SEP] identifier[getSessionId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public final AbstractItem findFirstMatching(final Filter filter) throws MessageStoreException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "findFirstMatching", filter); AbstractItem found = null; Link link = getHead(); while (link != null && found == null) { found = ((AbstractItemLink)link).matches(filter); if (found == null) { // Defect 493652/PK59872 // We need to lock on the list at this point as our current link // may have been unlinked by another thread during the matches() // call. In that case we need to start at the head of the list again // as the next/previous pointers for the unlinked link will not be // set. synchronized(this) { if (link.isPhysicallyUnlinked()) { // We have been unlinked while we were doing the match. // Start again at the beginning of the list. link = getHead(); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Current link is PhysicallyUnlinked so returning to beginning of list."); } else { link = link.getNextLogicalLink(); } } } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "findFirstMatching", found); return found; }
class class_name[name] begin[{] method[findFirstMatching, return_type[type[AbstractItem]], modifier[final public], parameter[filter]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["findFirstMatching"], member[.filter]]] else begin[{] None end[}] local_variable[type[AbstractItem], found] local_variable[type[Link], link] while[binary_operation[binary_operation[member[.link], !=, literal[null]], &&, binary_operation[member[.found], ==, literal[null]]]] begin[{] assign[member[.found], Cast(expression=MemberReference(member=link, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AbstractItemLink, sub_type=None))] if[binary_operation[member[.found], ==, literal[null]]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] if[call[link.isPhysicallyUnlinked, parameter[]]] begin[{] assign[member[.link], call[.getHead, parameter[]]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], literal["Current link is PhysicallyUnlinked so returning to beginning of list."]]] else begin[{] None end[}] else begin[{] assign[member[.link], call[link.getNextLogicalLink, parameter[]]] end[}] END[}] else begin[{] None end[}] end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["findFirstMatching"], member[.found]]] else begin[{] None end[}] return[member[.found]] end[}] END[}]
Keyword[public] Keyword[final] identifier[AbstractItem] identifier[findFirstMatching] operator[SEP] Keyword[final] identifier[Filter] identifier[filter] operator[SEP] Keyword[throws] identifier[MessageStoreException] { 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] , identifier[filter] operator[SEP] operator[SEP] identifier[AbstractItem] identifier[found] operator[=] Other[null] operator[SEP] identifier[Link] identifier[link] operator[=] identifier[getHead] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[link] operator[!=] Other[null] operator[&&] identifier[found] operator[==] Other[null] operator[SEP] { identifier[found] operator[=] operator[SEP] operator[SEP] identifier[AbstractItemLink] operator[SEP] identifier[link] operator[SEP] operator[SEP] identifier[matches] operator[SEP] identifier[filter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[found] operator[==] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[link] operator[SEP] identifier[isPhysicallyUnlinked] operator[SEP] operator[SEP] operator[SEP] { identifier[link] operator[=] identifier[getHead] 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[SEP] operator[SEP] } Keyword[else] { identifier[link] operator[=] identifier[link] operator[SEP] identifier[getNextLogicalLink] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[found] operator[SEP] operator[SEP] Keyword[return] identifier[found] operator[SEP] }
public static double[] cumsum (double[] vector) { // Initialize the return value: final double[] retval = new double[vector.length]; // Iterate and cumulate: retval[0] = vector[0]; for (int i = 1; i < retval.length; i++) { retval[i] = vector[i] + retval[i - 1]; } // Done, return: return retval; }
class class_name[name] begin[{] method[cumsum, return_type[type[double]], modifier[public static], parameter[vector]] begin[{] local_variable[type[double], retval] assign[member[.retval], member[.vector]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=retval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=MemberReference(member=vector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=retval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), 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=retval, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.retval]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] operator[SEP] operator[SEP] identifier[cumsum] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[vector] operator[SEP] { Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[retval] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[vector] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[retval] operator[SEP] Other[0] operator[SEP] operator[=] identifier[vector] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[retval] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[retval] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[vector] operator[SEP] identifier[i] operator[SEP] operator[+] identifier[retval] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] } Keyword[return] identifier[retval] operator[SEP] }
public ServiceFuture<Void> rebootAsync(String resourceGroupName, String name, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(rebootWithServiceResponseAsync(resourceGroupName, name), serviceCallback); }
class class_name[name] begin[{] method[rebootAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, name, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.rebootWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.name]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[Void] operator[>] identifier[rebootAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[name] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[Void] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[rebootWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[name] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public ResultsWrapper<Issue> getIssues(Params parameters) throws RedmineException { return transport.getObjectsListNoPaging(Issue.class, parameters.getList()); }
class class_name[name] begin[{] method[getIssues, return_type[type[ResultsWrapper]], modifier[public], parameter[parameters]] begin[{] return[call[transport.getObjectsListNoPaging, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Issue, sub_type=None)), call[parameters.getList, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[ResultsWrapper] operator[<] identifier[Issue] operator[>] identifier[getIssues] operator[SEP] identifier[Params] identifier[parameters] operator[SEP] Keyword[throws] identifier[RedmineException] { Keyword[return] identifier[transport] operator[SEP] identifier[getObjectsListNoPaging] operator[SEP] identifier[Issue] operator[SEP] Keyword[class] , identifier[parameters] operator[SEP] identifier[getList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static Typeface getFontFromTag(AssetManager assets, View view, boolean strict) { final Object tagObject = view.getTag(); final String tag = tagObject instanceof String ? (String) tagObject : null; final Typeface typeface = getFontFromString(assets, tag, strict); if (!(tagObject instanceof String)) { try { final String idName = view.getId() == -1 ? "unknown" : view.getResources().getResourceName(view.getId()); Log.w(TAG, "Cannot get font from tag '" + tagObject + "' for view id: " + idName); } catch (Exception ignored) { } } return typeface; }
class class_name[name] begin[{] method[getFontFromTag, return_type[type[Typeface]], modifier[private static], parameter[assets, view, strict]] begin[{] local_variable[type[Object], tagObject] local_variable[type[String], tag] local_variable[type[Typeface], typeface] if[binary_operation[member[.tagObject], instanceof, type[String]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), if_false=MethodInvocation(arguments=[], member=getResources, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None)], member=getResourceName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unknown")), name=idName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot get font from tag '"), operandr=MemberReference(member=tagObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' for view id: "), operator=+), operandr=MemberReference(member=idName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=w, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignored, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[member[.typeface]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Typeface] identifier[getFontFromTag] operator[SEP] identifier[AssetManager] identifier[assets] , identifier[View] identifier[view] , Keyword[boolean] identifier[strict] operator[SEP] { Keyword[final] identifier[Object] identifier[tagObject] operator[=] identifier[view] operator[SEP] identifier[getTag] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[tag] operator[=] identifier[tagObject] Keyword[instanceof] identifier[String] operator[?] operator[SEP] identifier[String] operator[SEP] identifier[tagObject] operator[:] Other[null] operator[SEP] Keyword[final] identifier[Typeface] identifier[typeface] operator[=] identifier[getFontFromString] operator[SEP] identifier[assets] , identifier[tag] , identifier[strict] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[tagObject] Keyword[instanceof] identifier[String] operator[SEP] operator[SEP] { Keyword[try] { Keyword[final] identifier[String] identifier[idName] operator[=] identifier[view] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[==] operator[-] Other[1] operator[?] literal[String] operator[:] identifier[view] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceName] operator[SEP] identifier[view] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[w] operator[SEP] identifier[TAG] , literal[String] operator[+] identifier[tagObject] operator[+] literal[String] operator[+] identifier[idName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ignored] operator[SEP] { } } Keyword[return] identifier[typeface] operator[SEP] }
public TenantEntity findTenantById(String tenantId) { checkAuthorization(Permissions.READ, Resources.TENANT, tenantId); return getDbEntityManager().selectById(TenantEntity.class, tenantId); }
class class_name[name] begin[{] method[findTenantById, return_type[type[TenantEntity]], modifier[public], parameter[tenantId]] begin[{] call[.checkAuthorization, parameter[member[Permissions.READ], member[Resources.TENANT], member[.tenantId]]] return[call[.getDbEntityManager, parameter[]]] end[}] END[}]
Keyword[public] identifier[TenantEntity] identifier[findTenantById] operator[SEP] identifier[String] identifier[tenantId] operator[SEP] { identifier[checkAuthorization] operator[SEP] identifier[Permissions] operator[SEP] identifier[READ] , identifier[Resources] operator[SEP] identifier[TENANT] , identifier[tenantId] operator[SEP] operator[SEP] Keyword[return] identifier[getDbEntityManager] operator[SEP] operator[SEP] operator[SEP] identifier[selectById] operator[SEP] identifier[TenantEntity] operator[SEP] Keyword[class] , identifier[tenantId] operator[SEP] operator[SEP] }
protected AjaxButton newOkButton(final String id) { final AjaxButton ok = new AjaxButton(id) { /** * The serialVersionUID. */ private static final long serialVersionUID = 1L; /** * {@inheritDoc} */ @Override protected void onError(final AjaxRequestTarget target, final Form<?> form) { final T obj = BaseModalPanel.this.getModelObject(); onSelect(target, obj); } /** * {@inheritDoc} */ @Override protected void onSubmit(final AjaxRequestTarget target, final Form<?> form) { final T obj = BaseModalPanel.this.getModelObject(); onSelect(target, obj); } }; return ok; }
class class_name[name] begin[{] method[newOkButton, return_type[type[AjaxButton]], modifier[protected], parameter[id]] begin[{] local_variable[type[AjaxButton], ok] return[member[.ok]] end[}] END[}]
Keyword[protected] identifier[AjaxButton] identifier[newOkButton] operator[SEP] Keyword[final] identifier[String] identifier[id] operator[SEP] { Keyword[final] identifier[AjaxButton] identifier[ok] operator[=] Keyword[new] identifier[AjaxButton] operator[SEP] identifier[id] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[1L] operator[SEP] annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[onError] operator[SEP] Keyword[final] identifier[AjaxRequestTarget] identifier[target] , Keyword[final] identifier[Form] operator[<] operator[?] operator[>] identifier[form] operator[SEP] { Keyword[final] identifier[T] identifier[obj] operator[=] identifier[BaseModalPanel] operator[SEP] Keyword[this] operator[SEP] identifier[getModelObject] operator[SEP] operator[SEP] operator[SEP] identifier[onSelect] operator[SEP] identifier[target] , identifier[obj] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[onSubmit] operator[SEP] Keyword[final] identifier[AjaxRequestTarget] identifier[target] , Keyword[final] identifier[Form] operator[<] operator[?] operator[>] identifier[form] operator[SEP] { Keyword[final] identifier[T] identifier[obj] operator[=] identifier[BaseModalPanel] operator[SEP] Keyword[this] operator[SEP] identifier[getModelObject] operator[SEP] operator[SEP] operator[SEP] identifier[onSelect] operator[SEP] identifier[target] , identifier[obj] operator[SEP] operator[SEP] } } operator[SEP] Keyword[return] identifier[ok] operator[SEP] }
public final ParserModel train(final TrainingParameters params, final InputStream taggerModel, final TrainingParameters chunkerParams) { if (getParserFactory() == null) { throw new IllegalStateException( "The ParserFactory must be instantiated!!"); } SequenceLabelerModel posModel = null; try { posModel = new SequenceLabelerModel(taggerModel); } catch (final IOException e1) { e1.printStackTrace(); } ParserModel trainedModel = null; ParserEvaluator parserEvaluator = null; try { trainedModel = ShiftReduceParser.train(this.lang, this.trainSamples, this.rules, params, this.parserFactory, posModel, chunkerParams, this.chunkerFactory); final ShiftReduceParser parser = new ShiftReduceParser(trainedModel); parserEvaluator = new ParserEvaluator(parser); parserEvaluator.evaluate(this.testSamples); } catch (final IOException e) { System.err.println("IO error while loading training and test sets!"); e.printStackTrace(); System.exit(1); } System.out.println("Final Result: \n" + parserEvaluator.getFMeasure()); return trainedModel; }
class class_name[name] begin[{] method[train, return_type[type[ParserModel]], modifier[final public], parameter[params, taggerModel, chunkerParams]] begin[{] if[binary_operation[call[.getParserFactory, parameter[]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The ParserFactory must be instantiated!!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[SequenceLabelerModel], posModel] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=posModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=taggerModel, 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=SequenceLabelerModel, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e1, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e1, types=['IOException']))], finally_block=None, label=None, resources=None) local_variable[type[ParserModel], trainedModel] local_variable[type[ParserEvaluator], parserEvaluator] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trainedModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=lang, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=trainSamples, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=rules, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=parserFactory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=posModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=chunkerParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=chunkerFactory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=train, postfix_operators=[], prefix_operators=[], qualifier=ShiftReduceParser, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=trainedModel, 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=ShiftReduceParser, sub_type=None)), name=parser)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ShiftReduceParser, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=parserEvaluator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=parser, 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=ParserEvaluator, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=testSamples, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=evaluate, postfix_operators=[], prefix_operators=[], qualifier=parserEvaluator, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="IO error while loading training and test sets!")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=exit, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) call[System.out.println, parameter[binary_operation[literal["Final Result: \n"], +, call[parserEvaluator.getFMeasure, parameter[]]]]] return[member[.trainedModel]] end[}] END[}]
Keyword[public] Keyword[final] identifier[ParserModel] identifier[train] operator[SEP] Keyword[final] identifier[TrainingParameters] identifier[params] , Keyword[final] identifier[InputStream] identifier[taggerModel] , Keyword[final] identifier[TrainingParameters] identifier[chunkerParams] operator[SEP] { Keyword[if] operator[SEP] identifier[getParserFactory] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[SequenceLabelerModel] identifier[posModel] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[posModel] operator[=] Keyword[new] identifier[SequenceLabelerModel] operator[SEP] identifier[taggerModel] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[e1] operator[SEP] { identifier[e1] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } identifier[ParserModel] identifier[trainedModel] operator[=] Other[null] operator[SEP] identifier[ParserEvaluator] identifier[parserEvaluator] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[trainedModel] operator[=] identifier[ShiftReduceParser] operator[SEP] identifier[train] operator[SEP] Keyword[this] operator[SEP] identifier[lang] , Keyword[this] operator[SEP] identifier[trainSamples] , Keyword[this] operator[SEP] identifier[rules] , identifier[params] , Keyword[this] operator[SEP] identifier[parserFactory] , identifier[posModel] , identifier[chunkerParams] , Keyword[this] operator[SEP] identifier[chunkerFactory] operator[SEP] operator[SEP] Keyword[final] identifier[ShiftReduceParser] identifier[parser] operator[=] Keyword[new] identifier[ShiftReduceParser] operator[SEP] identifier[trainedModel] operator[SEP] operator[SEP] identifier[parserEvaluator] operator[=] Keyword[new] identifier[ParserEvaluator] operator[SEP] identifier[parser] operator[SEP] operator[SEP] identifier[parserEvaluator] operator[SEP] identifier[evaluate] operator[SEP] Keyword[this] operator[SEP] identifier[testSamples] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[1] operator[SEP] operator[SEP] } identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[parserEvaluator] operator[SEP] identifier[getFMeasure] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[trainedModel] operator[SEP] }
@Override public Mono<MongoSession> createSession() { return Mono.justOrEmpty(this.maxInactiveIntervalInSeconds) // .map(MongoSession::new) // .doOnNext(mongoSession -> publishEvent(new SessionCreatedEvent(this, mongoSession))) // .switchIfEmpty(Mono.just(new MongoSession())); }
class class_name[name] begin[{] method[createSession, return_type[type[Mono]], modifier[public], parameter[]] begin[{] return[call[Mono.justOrEmpty, parameter[THIS[member[None.maxInactiveIntervalInSeconds]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Mono] operator[<] identifier[MongoSession] operator[>] identifier[createSession] operator[SEP] operator[SEP] { Keyword[return] identifier[Mono] operator[SEP] identifier[justOrEmpty] operator[SEP] Keyword[this] operator[SEP] identifier[maxInactiveIntervalInSeconds] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[MongoSession] operator[::] Keyword[new] operator[SEP] operator[SEP] identifier[doOnNext] operator[SEP] identifier[mongoSession] operator[->] identifier[publishEvent] operator[SEP] Keyword[new] identifier[SessionCreatedEvent] operator[SEP] Keyword[this] , identifier[mongoSession] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[switchIfEmpty] operator[SEP] identifier[Mono] operator[SEP] identifier[just] operator[SEP] Keyword[new] identifier[MongoSession] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public final synchronized L[] getListeners() { if (this.map == null) { return newArray(0); } List<L> list = new ArrayList<>(); L[] listeners = this.map.get(null); if (listeners != null) { for (L listener : listeners) { list.add(listener); } } for (Entry<String, L[]> entry : this.map.entrySet()) { String name = entry.getKey(); if (name != null) { for (L listener : entry.getValue()) { list.add(newProxy(name, listener)); } } } return list.toArray(newArray(list.size())); }
class class_name[name] begin[{] method[getListeners, return_type[type[L]], modifier[synchronized final public], parameter[]] begin[{] if[binary_operation[THIS[member[None.map]], ==, literal[null]]] begin[{] return[call[.newArray, parameter[literal[0]]]] else begin[{] None end[}] local_variable[type[List], list] local_variable[type[L], listeners] if[binary_operation[member[.listeners], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, 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=L, sub_type=None))), label=None) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=name, 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=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newProxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=listener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=L, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=map, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=entrySet, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], 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=[None], name=L, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) return[call[list.toArray, parameter[call[.newArray, parameter[call[list.size, parameter[]]]]]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[synchronized] identifier[L] operator[SEP] operator[SEP] identifier[getListeners] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[map] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[newArray] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[L] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[L] operator[SEP] operator[SEP] identifier[listeners] operator[=] Keyword[this] operator[SEP] identifier[map] operator[SEP] identifier[get] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[listeners] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[L] identifier[listener] operator[:] identifier[listeners] operator[SEP] { identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[listener] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[L] operator[SEP] operator[SEP] operator[>] identifier[entry] operator[:] Keyword[this] operator[SEP] identifier[map] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[L] identifier[listener] operator[:] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] { identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[newProxy] operator[SEP] identifier[name] , identifier[listener] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] identifier[list] operator[SEP] identifier[toArray] operator[SEP] identifier[newArray] operator[SEP] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static double round(double x, int scale, int roundingMethod) { try { return (new BigDecimal (Double.toString(x)) .setScale(scale, roundingMethod)) .doubleValue(); } catch (NumberFormatException ex) { if (Double.isInfinite(x)) { return x; } else { return Double.NaN; } } }
class class_name[name] begin[{] method[round, return_type[type[double]], modifier[public static], parameter[x, scale, roundingMethod]] begin[{] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=doubleValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None)), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInfinite, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=NaN, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[round] operator[SEP] Keyword[double] identifier[x] , Keyword[int] identifier[scale] , Keyword[int] identifier[roundingMethod] operator[SEP] { Keyword[try] { Keyword[return] operator[SEP] Keyword[new] identifier[BigDecimal] operator[SEP] identifier[Double] operator[SEP] identifier[toString] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[setScale] operator[SEP] identifier[scale] , identifier[roundingMethod] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[ex] operator[SEP] { Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[isInfinite] operator[SEP] identifier[x] operator[SEP] operator[SEP] { Keyword[return] identifier[x] operator[SEP] } Keyword[else] { Keyword[return] identifier[Double] operator[SEP] identifier[NaN] operator[SEP] } } }
protected void center(boolean horizontal, boolean vertical) { if (mBitmapDisplayed.getBitmap() == null) { return; } Matrix m = getImageViewMatrix(); RectF rect = new RectF(0, 0, mBitmapDisplayed.getBitmap().getWidth(), mBitmapDisplayed.getBitmap().getHeight()); m.mapRect(rect); float height = rect.height(); float width = rect.width(); float deltaX = 0, deltaY = 0; if (vertical) { int viewHeight = getHeight(); if (height < viewHeight) { deltaY = (viewHeight - height) / 2 - rect.top; } else if (rect.top > 0) { deltaY = -rect.top; } else if (rect.bottom < viewHeight) { deltaY = getHeight() - rect.bottom; } } if (horizontal) { int viewWidth = getWidth(); if (width < viewWidth) { deltaX = (viewWidth - width) / 2 - rect.left; } else if (rect.left > 0) { deltaX = -rect.left; } else if (rect.right < viewWidth) { deltaX = viewWidth - rect.right; } } postTranslate(deltaX, deltaY); setImageMatrix(getImageViewMatrix()); }
class class_name[name] begin[{] method[center, return_type[void], modifier[protected], parameter[horizontal, vertical]] begin[{] if[binary_operation[call[mBitmapDisplayed.getBitmap, parameter[]], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Matrix], m] local_variable[type[RectF], rect] call[m.mapRect, parameter[member[.rect]]] local_variable[type[float], height] local_variable[type[float], width] local_variable[type[float], deltaX] if[member[.vertical]] begin[{] local_variable[type[int], viewHeight] if[binary_operation[member[.height], <, member[.viewHeight]]] begin[{] assign[member[.deltaY], binary_operation[binary_operation[binary_operation[member[.viewHeight], -, member[.height]], /, literal[2]], -, member[rect.top]]] else begin[{] if[binary_operation[member[rect.top], >, literal[0]]] begin[{] assign[member[.deltaY], member[rect.top]] else begin[{] if[binary_operation[member[rect.bottom], <, member[.viewHeight]]] begin[{] assign[member[.deltaY], binary_operation[call[.getHeight, parameter[]], -, member[rect.bottom]]] else begin[{] None end[}] end[}] end[}] else begin[{] None end[}] if[member[.horizontal]] begin[{] local_variable[type[int], viewWidth] if[binary_operation[member[.width], <, member[.viewWidth]]] begin[{] assign[member[.deltaX], binary_operation[binary_operation[binary_operation[member[.viewWidth], -, member[.width]], /, literal[2]], -, member[rect.left]]] else begin[{] if[binary_operation[member[rect.left], >, literal[0]]] begin[{] assign[member[.deltaX], member[rect.left]] else begin[{] if[binary_operation[member[rect.right], <, member[.viewWidth]]] begin[{] assign[member[.deltaX], binary_operation[member[.viewWidth], -, member[rect.right]]] else begin[{] None end[}] end[}] end[}] else begin[{] None end[}] call[.postTranslate, parameter[member[.deltaX], member[.deltaY]]] call[.setImageMatrix, parameter[call[.getImageViewMatrix, parameter[]]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[center] operator[SEP] Keyword[boolean] identifier[horizontal] , Keyword[boolean] identifier[vertical] operator[SEP] { Keyword[if] operator[SEP] identifier[mBitmapDisplayed] operator[SEP] identifier[getBitmap] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[Matrix] identifier[m] operator[=] identifier[getImageViewMatrix] operator[SEP] operator[SEP] operator[SEP] identifier[RectF] identifier[rect] operator[=] Keyword[new] identifier[RectF] operator[SEP] Other[0] , Other[0] , identifier[mBitmapDisplayed] operator[SEP] identifier[getBitmap] operator[SEP] operator[SEP] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[mBitmapDisplayed] operator[SEP] identifier[getBitmap] operator[SEP] operator[SEP] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[mapRect] operator[SEP] identifier[rect] operator[SEP] operator[SEP] Keyword[float] identifier[height] operator[=] identifier[rect] operator[SEP] identifier[height] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[width] operator[=] identifier[rect] operator[SEP] identifier[width] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[deltaX] operator[=] Other[0] , identifier[deltaY] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[vertical] operator[SEP] { Keyword[int] identifier[viewHeight] operator[=] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[height] operator[<] identifier[viewHeight] operator[SEP] { identifier[deltaY] operator[=] operator[SEP] identifier[viewHeight] operator[-] identifier[height] operator[SEP] operator[/] Other[2] operator[-] identifier[rect] operator[SEP] identifier[top] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[rect] operator[SEP] identifier[top] operator[>] Other[0] operator[SEP] { identifier[deltaY] operator[=] operator[-] identifier[rect] operator[SEP] identifier[top] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[rect] operator[SEP] identifier[bottom] operator[<] identifier[viewHeight] operator[SEP] { identifier[deltaY] operator[=] identifier[getHeight] operator[SEP] operator[SEP] operator[-] identifier[rect] operator[SEP] identifier[bottom] operator[SEP] } } Keyword[if] operator[SEP] identifier[horizontal] operator[SEP] { Keyword[int] identifier[viewWidth] operator[=] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[width] operator[<] identifier[viewWidth] operator[SEP] { identifier[deltaX] operator[=] operator[SEP] identifier[viewWidth] operator[-] identifier[width] operator[SEP] operator[/] Other[2] operator[-] identifier[rect] operator[SEP] identifier[left] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[rect] operator[SEP] identifier[left] operator[>] Other[0] operator[SEP] { identifier[deltaX] operator[=] operator[-] identifier[rect] operator[SEP] identifier[left] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[rect] operator[SEP] identifier[right] operator[<] identifier[viewWidth] operator[SEP] { identifier[deltaX] operator[=] identifier[viewWidth] operator[-] identifier[rect] operator[SEP] identifier[right] operator[SEP] } } identifier[postTranslate] operator[SEP] identifier[deltaX] , identifier[deltaY] operator[SEP] operator[SEP] identifier[setImageMatrix] operator[SEP] identifier[getImageViewMatrix] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override protected String doRender(final RenderConfiguration config, final CommonNodeAttributes entity) { return config.getIndent() + entity.getId() + " " + attributeRenderer.render(config, entity.getAttributes()); }
class class_name[name] begin[{] method[doRender, return_type[type[String]], modifier[protected], parameter[config, entity]] begin[{] return[binary_operation[binary_operation[binary_operation[call[config.getIndent, parameter[]], +, call[entity.getId, parameter[]]], +, literal[" "]], +, call[attributeRenderer.render, parameter[member[.config], call[entity.getAttributes, parameter[]]]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[String] identifier[doRender] operator[SEP] Keyword[final] identifier[RenderConfiguration] identifier[config] , Keyword[final] identifier[CommonNodeAttributes] identifier[entity] operator[SEP] { Keyword[return] identifier[config] operator[SEP] identifier[getIndent] operator[SEP] operator[SEP] operator[+] identifier[entity] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[attributeRenderer] operator[SEP] identifier[render] operator[SEP] identifier[config] , identifier[entity] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static PactDslJsonBody arrayEachLike(Integer numberExamples) { PactDslJsonArray parent = new PactDslJsonArray("", "", null, true); parent.setNumberExamples(numberExamples); parent.matchers.addRule("", parent.matchMin(0)); return new PactDslJsonBody(".", "", parent); }
class class_name[name] begin[{] method[arrayEachLike, return_type[type[PactDslJsonBody]], modifier[public static], parameter[numberExamples]] begin[{] local_variable[type[PactDslJsonArray], parent] call[parent.setNumberExamples, parameter[member[.numberExamples]]] call[parent.matchers.addRule, parameter[literal[""], call[parent.matchMin, parameter[literal[0]]]]] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), MemberReference(member=parent, 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=PactDslJsonBody, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[PactDslJsonBody] identifier[arrayEachLike] operator[SEP] identifier[Integer] identifier[numberExamples] operator[SEP] { identifier[PactDslJsonArray] identifier[parent] operator[=] Keyword[new] identifier[PactDslJsonArray] operator[SEP] literal[String] , literal[String] , Other[null] , literal[boolean] operator[SEP] operator[SEP] identifier[parent] operator[SEP] identifier[setNumberExamples] operator[SEP] identifier[numberExamples] operator[SEP] operator[SEP] identifier[parent] operator[SEP] identifier[matchers] operator[SEP] identifier[addRule] operator[SEP] literal[String] , identifier[parent] operator[SEP] identifier[matchMin] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[PactDslJsonBody] operator[SEP] literal[String] , literal[String] , identifier[parent] operator[SEP] operator[SEP] }
@GwtIncompatible("incompatible method") private static boolean annotationArrayMemberEquals(final Annotation[] a1, final Annotation[] a2) { if (a1.length != a2.length) { return false; } for (int i = 0; i < a1.length; i++) { if (!equals(a1[i], a2[i])) { return false; } } return true; }
class class_name[name] begin[{] method[annotationArrayMemberEquals, return_type[type[boolean]], modifier[private static], parameter[a1, a2]] begin[{] if[binary_operation[member[a1.length], !=, member[a2.length]]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=a1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=a2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), 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=a1, 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[true]] end[}] END[}]
annotation[@] identifier[GwtIncompatible] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[static] Keyword[boolean] identifier[annotationArrayMemberEquals] operator[SEP] Keyword[final] identifier[Annotation] operator[SEP] operator[SEP] identifier[a1] , Keyword[final] identifier[Annotation] operator[SEP] operator[SEP] identifier[a2] operator[SEP] { Keyword[if] operator[SEP] identifier[a1] operator[SEP] identifier[length] operator[!=] identifier[a2] operator[SEP] identifier[length] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[a1] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[equals] operator[SEP] identifier[a1] operator[SEP] identifier[i] operator[SEP] , identifier[a2] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public TaskLevelPolicyChecker getTaskLevelPolicyChecker(TaskState taskState, int index) throws Exception { return TaskLevelPolicyCheckerBuilderFactory.newPolicyCheckerBuilder(taskState, index).build(); }
class class_name[name] begin[{] method[getTaskLevelPolicyChecker, return_type[type[TaskLevelPolicyChecker]], modifier[public], parameter[taskState, index]] begin[{] return[call[TaskLevelPolicyCheckerBuilderFactory.newPolicyCheckerBuilder, parameter[member[.taskState], member[.index]]]] end[}] END[}]
Keyword[public] identifier[TaskLevelPolicyChecker] identifier[getTaskLevelPolicyChecker] operator[SEP] identifier[TaskState] identifier[taskState] , Keyword[int] identifier[index] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[return] identifier[TaskLevelPolicyCheckerBuilderFactory] operator[SEP] identifier[newPolicyCheckerBuilder] operator[SEP] identifier[taskState] , identifier[index] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
synchronized public void setSeed(final int[] array) { if (array.length == 0) throw new IllegalArgumentException("Array length must be greater than zero"); int i, j, k; setSeed(19650218); i=1; j=0; k = (N>array.length ? N : array.length); for (; k!=0; k--) { mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >>> 30)) * 1664525)) + array[j] + j; /* non linear */ mt[i] &= 0xffffffff; /* for WORDSIZE > 32 machines */ i++; j++; if (i>=N) { mt[0] = mt[N-1]; i=1; } if (j>=array.length) j=0; } for (k=N-1; k!=0; k--) { mt[i] = (mt[i] ^ ((mt[i-1] ^ (mt[i-1] >>> 30)) * 1566083941)) - i; /* non linear */ mt[i] &= 0xffffffff; /* for WORDSIZE > 32 machines */ i++; if (i>=N) { mt[0] = mt[N-1]; i=1; } } mt[0] = 0x80000000; /* MSB is 1; assuring non-zero initial array */ }
class class_name[name] begin[{] method[setSeed, return_type[void], modifier[synchronized public], parameter[array]] begin[{] if[binary_operation[member[array.length], ==, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Array length must be greater than zero")], 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[int], i] call[.setSeed, parameter[literal[19650218]]] assign[member[.i], literal[1]] assign[member[.j], literal[0]] assign[member[.k], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=N, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=array, selectors=[]), operator=>), if_false=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=array, selectors=[]), if_true=MemberReference(member=N, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), operandr=BinaryOperation(operandl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30), operator=>>>), operator=^), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1664525), operator=*), operator=^), operandr=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=+), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=&=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xffffffff)), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=N, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=N, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=array, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), init=None, update=[MemberReference(member=k, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), operandr=BinaryOperation(operandl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=30), operator=>>>), operator=^), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1566083941), operator=*), operator=^), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=&=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xffffffff)), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=N, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=MemberReference(member=mt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=N, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), init=[Assignment(expressionl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=N, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))], update=[MemberReference(member=k, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.mt], literal[0x80000000]] end[}] END[}]
Keyword[synchronized] Keyword[public] Keyword[void] identifier[setSeed] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[array] operator[SEP] { Keyword[if] operator[SEP] identifier[array] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[i] , identifier[j] , identifier[k] operator[SEP] identifier[setSeed] operator[SEP] Other[19650218] operator[SEP] operator[SEP] identifier[i] operator[=] Other[1] operator[SEP] identifier[j] operator[=] Other[0] operator[SEP] identifier[k] operator[=] operator[SEP] identifier[N] operator[>] identifier[array] operator[SEP] identifier[length] operator[?] identifier[N] operator[:] identifier[array] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[k] operator[!=] Other[0] operator[SEP] identifier[k] operator[--] operator[SEP] { identifier[mt] operator[SEP] identifier[i] operator[SEP] operator[=] operator[SEP] identifier[mt] operator[SEP] identifier[i] operator[SEP] operator[^] operator[SEP] operator[SEP] identifier[mt] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[^] operator[SEP] identifier[mt] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[>] operator[>] operator[>] Other[30] operator[SEP] operator[SEP] operator[*] Other[1664525] operator[SEP] operator[SEP] operator[+] identifier[array] operator[SEP] identifier[j] operator[SEP] operator[+] identifier[j] operator[SEP] identifier[mt] operator[SEP] identifier[i] operator[SEP] operator[&=] literal[Integer] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[j] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[>=] identifier[N] operator[SEP] { identifier[mt] operator[SEP] Other[0] operator[SEP] operator[=] identifier[mt] operator[SEP] identifier[N] operator[-] Other[1] operator[SEP] operator[SEP] identifier[i] operator[=] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[j] operator[>=] identifier[array] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[=] Other[0] operator[SEP] } Keyword[for] operator[SEP] identifier[k] operator[=] identifier[N] operator[-] Other[1] operator[SEP] identifier[k] operator[!=] Other[0] operator[SEP] identifier[k] operator[--] operator[SEP] { identifier[mt] operator[SEP] identifier[i] operator[SEP] operator[=] operator[SEP] identifier[mt] operator[SEP] identifier[i] operator[SEP] operator[^] operator[SEP] operator[SEP] identifier[mt] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[^] operator[SEP] identifier[mt] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[>] operator[>] operator[>] Other[30] operator[SEP] operator[SEP] operator[*] Other[1566083941] operator[SEP] operator[SEP] operator[-] identifier[i] operator[SEP] identifier[mt] operator[SEP] identifier[i] operator[SEP] operator[&=] literal[Integer] operator[SEP] identifier[i] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[>=] identifier[N] operator[SEP] { identifier[mt] operator[SEP] Other[0] operator[SEP] operator[=] identifier[mt] operator[SEP] identifier[N] operator[-] Other[1] operator[SEP] operator[SEP] identifier[i] operator[=] Other[1] operator[SEP] } } identifier[mt] operator[SEP] Other[0] operator[SEP] operator[=] literal[Integer] operator[SEP] }
public static File noDirectory(File file) { Validate.exists(file); if(file.isDirectory()) throw new ParameterException("\""+file+"\" is a directory!"); return file; }
class class_name[name] begin[{] method[noDirectory, return_type[type[File]], modifier[public static], parameter[file]] begin[{] call[Validate.exists, parameter[member[.file]]] if[call[file.isDirectory, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\""), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" is a directory!"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParameterException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.file]] end[}] END[}]
Keyword[public] Keyword[static] identifier[File] identifier[noDirectory] operator[SEP] identifier[File] identifier[file] operator[SEP] { identifier[Validate] operator[SEP] identifier[exists] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ParameterException] operator[SEP] literal[String] operator[+] identifier[file] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[file] operator[SEP] }
@Override public int intersectionSize(IntSet o) { // special cases if (isEmpty() || o == null || o.isEmpty()) { return 0; } if (this == o) { return size(); } final ConciseSet other = convert(o); // check whether the first operator starts with a sequence that // completely "covers" the second operator if (isSequenceWithNoBits(this.words[0]) && maxLiteralLengthMultiplication(getSequenceCount(this.words[0]) + 1) > other.last) { if (isZeroSequence(this.words[0])) { return 0; } return other.size(); } if (isSequenceWithNoBits(other.words[0]) && maxLiteralLengthMultiplication(getSequenceCount(other.words[0]) + 1) > this.last) { if (isZeroSequence(other.words[0])) { return 0; } return this.size(); } int res = 0; // scan "this" and "other" WordIterator thisItr = new WordIterator(); WordIterator otherItr = other.new WordIterator(); while (true) { if (!thisItr.isLiteral) { if (!otherItr.isLiteral) { int minCount = Math.min(thisItr.count, otherItr.count); if ((ConciseSetUtils.SEQUENCE_BIT & thisItr.word & otherItr.word) != 0) { res += maxLiteralLengthMultiplication(minCount); } if (!thisItr.prepareNext(minCount) | !otherItr.prepareNext(minCount)) // NOT || { break; } } else { res += getLiteralBitCount(thisItr.toLiteral() & otherItr.word); thisItr.word--; if (!thisItr.prepareNext(1) | !otherItr.prepareNext()) // do NOT use "||" { break; } } } else if (!otherItr.isLiteral) { res += getLiteralBitCount(thisItr.word & otherItr.toLiteral()); otherItr.word--; if (!thisItr.prepareNext() | !otherItr.prepareNext(1)) // do NOT use "||" { break; } } else { res += getLiteralBitCount(thisItr.word & otherItr.word); if (!thisItr.prepareNext() | !otherItr.prepareNext()) // do NOT use "||" { break; } } } return res; }
class class_name[name] begin[{] method[intersectionSize, return_type[type[int]], modifier[public], parameter[o]] begin[{] if[binary_operation[binary_operation[call[.isEmpty, parameter[]], ||, binary_operation[member[.o], ==, literal[null]]], ||, call[o.isEmpty, parameter[]]]] begin[{] return[literal[0]] else begin[{] None end[}] if[binary_operation[THIS[], ==, member[.o]]] begin[{] return[call[.size, parameter[]]] else begin[{] None end[}] local_variable[type[ConciseSet], other] if[binary_operation[call[.isSequenceWithNoBits, parameter[THIS[member[None.words]ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]]], &&, binary_operation[call[.maxLiteralLengthMultiplication, parameter[binary_operation[call[.getSequenceCount, parameter[THIS[member[None.words]ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]]], +, literal[1]]]], >, member[other.last]]]] begin[{] if[call[.isZeroSequence, parameter[THIS[member[None.words]ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]]]] begin[{] return[literal[0]] else begin[{] None end[}] return[call[other.size, parameter[]]] else begin[{] None end[}] if[binary_operation[call[.isSequenceWithNoBits, parameter[member[other.words]]], &&, binary_operation[call[.maxLiteralLengthMultiplication, parameter[binary_operation[call[.getSequenceCount, parameter[member[other.words]]], +, literal[1]]]], >, THIS[member[None.last]]]]] begin[{] if[call[.isZeroSequence, parameter[member[other.words]]]] begin[{] return[literal[0]] else begin[{] None end[}] return[THIS[call[None.size, parameter[]]]] else begin[{] None end[}] local_variable[type[int], res] local_variable[type[WordIterator], thisItr] local_variable[type[WordIterator], otherItr] while[literal[true]] begin[{] if[member[thisItr.isLiteral]] begin[{] if[member[otherItr.isLiteral]] begin[{] local_variable[type[int], minCount] if[binary_operation[binary_operation[binary_operation[member[ConciseSetUtils.SEQUENCE_BIT], &, member[thisItr.word]], &, member[otherItr.word]], !=, literal[0]]] begin[{] assign[member[.res], call[.maxLiteralLengthMultiplication, parameter[member[.minCount]]]] else begin[{] None end[}] if[binary_operation[call[thisItr.prepareNext, parameter[member[.minCount]]], |, call[otherItr.prepareNext, parameter[member[.minCount]]]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] else begin[{] assign[member[.res], call[.getLiteralBitCount, parameter[binary_operation[call[thisItr.toLiteral, parameter[]], &, member[otherItr.word]]]]] member[thisItr.word] if[binary_operation[call[thisItr.prepareNext, parameter[literal[1]]], |, call[otherItr.prepareNext, parameter[]]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] else begin[{] if[member[otherItr.isLiteral]] begin[{] assign[member[.res], call[.getLiteralBitCount, parameter[binary_operation[member[thisItr.word], &, call[otherItr.toLiteral, parameter[]]]]]] member[otherItr.word] if[binary_operation[call[thisItr.prepareNext, parameter[]], |, call[otherItr.prepareNext, parameter[literal[1]]]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] else begin[{] assign[member[.res], call[.getLiteralBitCount, parameter[binary_operation[member[thisItr.word], &, member[otherItr.word]]]]] if[binary_operation[call[thisItr.prepareNext, parameter[]], |, call[otherItr.prepareNext, parameter[]]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] end[}] end[}] return[member[.res]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[intersectionSize] operator[SEP] identifier[IntSet] identifier[o] operator[SEP] { Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] identifier[o] operator[==] Other[null] operator[||] identifier[o] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[==] identifier[o] operator[SEP] { Keyword[return] identifier[size] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[ConciseSet] identifier[other] operator[=] identifier[convert] operator[SEP] identifier[o] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isSequenceWithNoBits] operator[SEP] Keyword[this] operator[SEP] identifier[words] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[&&] identifier[maxLiteralLengthMultiplication] operator[SEP] identifier[getSequenceCount] operator[SEP] Keyword[this] operator[SEP] identifier[words] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] operator[>] identifier[other] operator[SEP] identifier[last] operator[SEP] { Keyword[if] operator[SEP] identifier[isZeroSequence] operator[SEP] Keyword[this] operator[SEP] identifier[words] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[return] identifier[other] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isSequenceWithNoBits] operator[SEP] identifier[other] operator[SEP] identifier[words] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[&&] identifier[maxLiteralLengthMultiplication] operator[SEP] identifier[getSequenceCount] operator[SEP] identifier[other] operator[SEP] identifier[words] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] operator[>] Keyword[this] operator[SEP] identifier[last] operator[SEP] { Keyword[if] operator[SEP] identifier[isZeroSequence] operator[SEP] identifier[other] operator[SEP] identifier[words] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[res] operator[=] Other[0] operator[SEP] identifier[WordIterator] identifier[thisItr] operator[=] Keyword[new] identifier[WordIterator] operator[SEP] operator[SEP] operator[SEP] identifier[WordIterator] identifier[otherItr] operator[=] identifier[other] operator[SEP] Keyword[new] identifier[WordIterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[thisItr] operator[SEP] identifier[isLiteral] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[otherItr] operator[SEP] identifier[isLiteral] operator[SEP] { Keyword[int] identifier[minCount] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[thisItr] operator[SEP] identifier[count] , identifier[otherItr] operator[SEP] identifier[count] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[ConciseSetUtils] operator[SEP] identifier[SEQUENCE_BIT] operator[&] identifier[thisItr] operator[SEP] identifier[word] operator[&] identifier[otherItr] operator[SEP] identifier[word] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[res] operator[+=] identifier[maxLiteralLengthMultiplication] operator[SEP] identifier[minCount] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[thisItr] operator[SEP] identifier[prepareNext] operator[SEP] identifier[minCount] operator[SEP] operator[|] operator[!] identifier[otherItr] operator[SEP] identifier[prepareNext] operator[SEP] identifier[minCount] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[else] { identifier[res] operator[+=] identifier[getLiteralBitCount] operator[SEP] identifier[thisItr] operator[SEP] identifier[toLiteral] operator[SEP] operator[SEP] operator[&] identifier[otherItr] operator[SEP] identifier[word] operator[SEP] operator[SEP] identifier[thisItr] operator[SEP] identifier[word] operator[--] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[thisItr] operator[SEP] identifier[prepareNext] operator[SEP] Other[1] operator[SEP] operator[|] operator[!] identifier[otherItr] operator[SEP] identifier[prepareNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[otherItr] operator[SEP] identifier[isLiteral] operator[SEP] { identifier[res] operator[+=] identifier[getLiteralBitCount] operator[SEP] identifier[thisItr] operator[SEP] identifier[word] operator[&] identifier[otherItr] operator[SEP] identifier[toLiteral] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[otherItr] operator[SEP] identifier[word] operator[--] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[thisItr] operator[SEP] identifier[prepareNext] operator[SEP] operator[SEP] operator[|] operator[!] identifier[otherItr] operator[SEP] identifier[prepareNext] operator[SEP] Other[1] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[else] { identifier[res] operator[+=] identifier[getLiteralBitCount] operator[SEP] identifier[thisItr] operator[SEP] identifier[word] operator[&] identifier[otherItr] operator[SEP] identifier[word] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[thisItr] operator[SEP] identifier[prepareNext] operator[SEP] operator[SEP] operator[|] operator[!] identifier[otherItr] operator[SEP] identifier[prepareNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } } } Keyword[return] identifier[res] operator[SEP] }
public Mapping getInstance(String name) throws MappingNotFoundException { LOG.info("mappingFactory.getInstance: " + name); Mapping mapping = null; try { for (int i = 0; i < mappingList.size(); i++) { MappingParameters mappingParameters = mappingList.get(i); if (mappingParameters.getName().equals(name)) { LOG.info(mappingParameters.getName() + " (" + mappingParameters.getClassName() + ") mapping found"); // instantiate the mapping LOG.debug("instance the mapping"); mapping = (Mapping) (Class.forName(mappingParameters .getClassName())).newInstance(); // set the default parameters LOG.debug("set the default parameters"); mapping.setParameters(mappingParameters.getParameters()); } } } catch (ClassNotFoundException e) { throw new MappingNotFoundException(name + " Mapping not found."); } catch (Exception e) { LOG.error("woooops", e); } return mapping; }
class class_name[name] begin[{] method[getInstance, return_type[type[Mapping]], modifier[public], parameter[name]] begin[{] call[LOG.info, parameter[binary_operation[literal["mappingFactory.getInstance: "], +, member[.name]]]] local_variable[type[Mapping], mapping] TryStatement(block=[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=mappingList, selectors=[], type_arguments=None), name=mappingParameters)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MappingParameters, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=mappingParameters, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=mappingParameters, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ("), operator=+), operandr=MethodInvocation(arguments=[], member=getClassName, postfix_operators=[], prefix_operators=[], qualifier=mappingParameters, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") mapping found"), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="instance the mapping")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mapping, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClassName, postfix_operators=[], prefix_operators=[], qualifier=mappingParameters, selectors=[], type_arguments=None)], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[MethodInvocation(arguments=[], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Mapping, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="set the default parameters")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getParameters, postfix_operators=[], prefix_operators=[], qualifier=mappingParameters, selectors=[], type_arguments=None)], member=setParameters, postfix_operators=[], prefix_operators=[], qualifier=mapping, 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=mappingList, 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)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" Mapping not found."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MappingNotFoundException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="woooops"), 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) return[member[.mapping]] end[}] END[}]
Keyword[public] identifier[Mapping] identifier[getInstance] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[MappingNotFoundException] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[name] operator[SEP] operator[SEP] identifier[Mapping] identifier[mapping] operator[=] Other[null] operator[SEP] Keyword[try] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[mappingList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[MappingParameters] identifier[mappingParameters] operator[=] identifier[mappingList] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mappingParameters] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] identifier[mappingParameters] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[mappingParameters] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mapping] operator[=] operator[SEP] identifier[Mapping] operator[SEP] operator[SEP] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[mappingParameters] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[mapping] operator[SEP] identifier[setParameters] operator[SEP] identifier[mappingParameters] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MappingNotFoundException] operator[SEP] identifier[name] operator[+] literal[String] 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] } Keyword[return] identifier[mapping] operator[SEP] }
public static long deregisterNatives(long dllHandle, Class<?> clazz, String nativeDescriptorName, Object[] extraInfo) { if (!initialized) { if (loadFailure != null) { Error e = new UnsatisfiedLinkError(); e.initCause(loadFailure); throw e; } else { return 0; } } return ntv_deregisterNatives(dllHandle, clazz, nativeDescriptorName, extraInfo); }
class class_name[name] begin[{] method[deregisterNatives, return_type[type[long]], modifier[public static], parameter[dllHandle, clazz, nativeDescriptorName, extraInfo]] begin[{] if[member[.initialized]] begin[{] if[binary_operation[member[.loadFailure], !=, literal[null]]] begin[{] local_variable[type[Error], e] call[e.initCause, parameter[member[.loadFailure]]] ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] return[literal[0]] end[}] else begin[{] None end[}] return[call[.ntv_deregisterNatives, parameter[member[.dllHandle], member[.clazz], member[.nativeDescriptorName], member[.extraInfo]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[deregisterNatives] operator[SEP] Keyword[long] identifier[dllHandle] , identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[nativeDescriptorName] , identifier[Object] operator[SEP] operator[SEP] identifier[extraInfo] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[initialized] operator[SEP] { Keyword[if] operator[SEP] identifier[loadFailure] operator[!=] Other[null] operator[SEP] { identifier[Error] identifier[e] operator[=] Keyword[new] identifier[UnsatisfiedLinkError] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[initCause] operator[SEP] identifier[loadFailure] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[else] { Keyword[return] Other[0] operator[SEP] } } Keyword[return] identifier[ntv_deregisterNatives] operator[SEP] identifier[dllHandle] , identifier[clazz] , identifier[nativeDescriptorName] , identifier[extraInfo] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case XbasePackage.XSWITCH_EXPRESSION__SWITCH: setSwitch((XExpression)newValue); return; case XbasePackage.XSWITCH_EXPRESSION__CASES: getCases().clear(); getCases().addAll((Collection<? extends XCasePart>)newValue); return; case XbasePackage.XSWITCH_EXPRESSION__DEFAULT: setDefault((XExpression)newValue); return; case XbasePackage.XSWITCH_EXPRESSION__DECLARED_PARAM: setDeclaredParam((JvmFormalParameter)newValue); return; } super.eSet(featureID, newValue); }
class class_name[name] begin[{] method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=XSWITCH_EXPRESSION__SWITCH, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=XExpression, sub_type=None))], member=setSwitch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=XSWITCH_EXPRESSION__CASES, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getCases, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=clear, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getCases, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=XCasePart, sub_type=None))], dimensions=[], name=Collection, sub_type=None))], member=addAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=XSWITCH_EXPRESSION__DEFAULT, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=XExpression, sub_type=None))], member=setDefault, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=XSWITCH_EXPRESSION__DECLARED_PARAM, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JvmFormalParameter, sub_type=None))], member=setDeclaredParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eSet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[XbasePackage] operator[SEP] identifier[XSWITCH_EXPRESSION__SWITCH] operator[:] identifier[setSwitch] operator[SEP] operator[SEP] identifier[XExpression] operator[SEP] identifier[newValue] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[XbasePackage] operator[SEP] identifier[XSWITCH_EXPRESSION__CASES] operator[:] identifier[getCases] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[getCases] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[XCasePart] operator[>] operator[SEP] identifier[newValue] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[XbasePackage] operator[SEP] identifier[XSWITCH_EXPRESSION__DEFAULT] operator[:] identifier[setDefault] operator[SEP] operator[SEP] identifier[XExpression] operator[SEP] identifier[newValue] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[XbasePackage] operator[SEP] identifier[XSWITCH_EXPRESSION__DECLARED_PARAM] operator[:] identifier[setDeclaredParam] operator[SEP] operator[SEP] identifier[JvmFormalParameter] operator[SEP] identifier[newValue] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[super] operator[SEP] identifier[eSet] operator[SEP] identifier[featureID] , identifier[newValue] operator[SEP] operator[SEP] }
public static<T extends TBase<?,?>> TypeRef<T> getThriftTypeRef(String thriftClassName) { return ThriftUtils.getTypeRef(getClass(thriftClassName)); }
class class_name[name] begin[{] method[getThriftTypeRef, return_type[type[TypeRef]], modifier[public static], parameter[thriftClassName]] begin[{] return[call[ThriftUtils.getTypeRef, parameter[call[.getClass, parameter[member[.thriftClassName]]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[TBase] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[TypeRef] operator[<] identifier[T] operator[>] identifier[getThriftTypeRef] operator[SEP] identifier[String] identifier[thriftClassName] operator[SEP] { Keyword[return] identifier[ThriftUtils] operator[SEP] identifier[getTypeRef] operator[SEP] identifier[getClass] operator[SEP] identifier[thriftClassName] operator[SEP] operator[SEP] operator[SEP] }
protected FieldMetadata processArrayTypeFrom( FieldDeclaration fieldDeclaration ) { ArrayType arrayType = (ArrayType)fieldDeclaration.getType(); FieldMetadata arrayTypeFieldMetadata = null; // the element type is never an array type Type type = arrayType.getElementType(); if (type.isPrimitiveType()) { PrimitiveType primitiveType = (PrimitiveType)type; arrayTypeFieldMetadata = FieldMetadata.arrayType(primitiveType.getPrimitiveTypeCode().toString()); processModifiersAndVariablesOfFieldDeclaration(fieldDeclaration, arrayTypeFieldMetadata); arrayTypeFieldMetadata.setName(getFieldName(fieldDeclaration)); return arrayTypeFieldMetadata; } // can't be an array type if (type.isSimpleType()) { SimpleType simpleType = (SimpleType)type; arrayTypeFieldMetadata = FieldMetadata.arrayType(JavaMetadataUtil.getName(simpleType.getName())); processModifiersAndVariablesOfFieldDeclaration(fieldDeclaration, arrayTypeFieldMetadata); arrayTypeFieldMetadata.setName(getFieldName(fieldDeclaration)); return arrayTypeFieldMetadata; } return null; }
class class_name[name] begin[{] method[processArrayTypeFrom, return_type[type[FieldMetadata]], modifier[protected], parameter[fieldDeclaration]] begin[{] local_variable[type[ArrayType], arrayType] local_variable[type[FieldMetadata], arrayTypeFieldMetadata] local_variable[type[Type], type] if[call[type.isPrimitiveType, parameter[]]] begin[{] local_variable[type[PrimitiveType], primitiveType] assign[member[.arrayTypeFieldMetadata], call[FieldMetadata.arrayType, parameter[call[primitiveType.getPrimitiveTypeCode, parameter[]]]]] call[.processModifiersAndVariablesOfFieldDeclaration, parameter[member[.fieldDeclaration], member[.arrayTypeFieldMetadata]]] call[arrayTypeFieldMetadata.setName, parameter[call[.getFieldName, parameter[member[.fieldDeclaration]]]]] return[member[.arrayTypeFieldMetadata]] else begin[{] None end[}] if[call[type.isSimpleType, parameter[]]] begin[{] local_variable[type[SimpleType], simpleType] assign[member[.arrayTypeFieldMetadata], call[FieldMetadata.arrayType, parameter[call[JavaMetadataUtil.getName, parameter[call[simpleType.getName, parameter[]]]]]]] call[.processModifiersAndVariablesOfFieldDeclaration, parameter[member[.fieldDeclaration], member[.arrayTypeFieldMetadata]]] call[arrayTypeFieldMetadata.setName, parameter[call[.getFieldName, parameter[member[.fieldDeclaration]]]]] return[member[.arrayTypeFieldMetadata]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[protected] identifier[FieldMetadata] identifier[processArrayTypeFrom] operator[SEP] identifier[FieldDeclaration] identifier[fieldDeclaration] operator[SEP] { identifier[ArrayType] identifier[arrayType] operator[=] operator[SEP] identifier[ArrayType] operator[SEP] identifier[fieldDeclaration] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[FieldMetadata] identifier[arrayTypeFieldMetadata] operator[=] Other[null] operator[SEP] identifier[Type] identifier[type] operator[=] identifier[arrayType] operator[SEP] identifier[getElementType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[isPrimitiveType] operator[SEP] operator[SEP] operator[SEP] { identifier[PrimitiveType] identifier[primitiveType] operator[=] operator[SEP] identifier[PrimitiveType] operator[SEP] identifier[type] operator[SEP] identifier[arrayTypeFieldMetadata] operator[=] identifier[FieldMetadata] operator[SEP] identifier[arrayType] operator[SEP] identifier[primitiveType] operator[SEP] identifier[getPrimitiveTypeCode] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[processModifiersAndVariablesOfFieldDeclaration] operator[SEP] identifier[fieldDeclaration] , identifier[arrayTypeFieldMetadata] operator[SEP] operator[SEP] identifier[arrayTypeFieldMetadata] operator[SEP] identifier[setName] operator[SEP] identifier[getFieldName] operator[SEP] identifier[fieldDeclaration] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[arrayTypeFieldMetadata] operator[SEP] } Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[isSimpleType] operator[SEP] operator[SEP] operator[SEP] { identifier[SimpleType] identifier[simpleType] operator[=] operator[SEP] identifier[SimpleType] operator[SEP] identifier[type] operator[SEP] identifier[arrayTypeFieldMetadata] operator[=] identifier[FieldMetadata] operator[SEP] identifier[arrayType] operator[SEP] identifier[JavaMetadataUtil] operator[SEP] identifier[getName] operator[SEP] identifier[simpleType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[processModifiersAndVariablesOfFieldDeclaration] operator[SEP] identifier[fieldDeclaration] , identifier[arrayTypeFieldMetadata] operator[SEP] operator[SEP] identifier[arrayTypeFieldMetadata] operator[SEP] identifier[setName] operator[SEP] identifier[getFieldName] operator[SEP] identifier[fieldDeclaration] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[arrayTypeFieldMetadata] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public void setFilters(java.util.Collection<ServiceFilter> filters) { if (filters == null) { this.filters = null; return; } this.filters = new java.util.ArrayList<ServiceFilter>(filters); }
class class_name[name] begin[{] method[setFilters, return_type[void], modifier[public], parameter[filters]] begin[{] if[binary_operation[member[.filters], ==, literal[null]]] begin[{] assign[THIS[member[None.filters]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.filters]], ClassCreator(arguments=[MemberReference(member=filters, 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=ServiceFilter, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setFilters] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[ServiceFilter] operator[>] identifier[filters] operator[SEP] { Keyword[if] operator[SEP] identifier[filters] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[filters] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[filters] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[ServiceFilter] operator[>] operator[SEP] identifier[filters] operator[SEP] operator[SEP] }
@Override public final <T> List<T> retrieveListByQuery( final Map<String, Object> pAddParam, final Class<T> pEntityClass, final String pQuery) throws Exception { if (pQuery == null) { throw new ExceptionWithCode(ExceptionWithCode.WRONG_PARAMETER, "param_null_not_accepted"); } List<T> result = new ArrayList<T>(); IRecordSet<RS> recordSet = null; try { recordSet = getSrvDatabase().retrieveRecords(pQuery); if (recordSet.moveToFirst()) { do { result.add(retrieveEntity(pAddParam, pEntityClass, recordSet)); } while (recordSet.moveToNext()); } } finally { if (recordSet != null) { recordSet.close(); } } return result; }
class class_name[name] begin[{] method[retrieveListByQuery, return_type[type[List]], modifier[final public], parameter[pAddParam, pEntityClass, pQuery]] begin[{] if[binary_operation[member[.pQuery], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=WRONG_PARAMETER, postfix_operators=[], prefix_operators=[], qualifier=ExceptionWithCode, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="param_null_not_accepted")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ExceptionWithCode, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[List], result] local_variable[type[IRecordSet], recordSet] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=recordSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getSrvDatabase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=pQuery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=retrieveRecords, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=moveToFirst, postfix_operators=[], prefix_operators=[], qualifier=recordSet, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[DoStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=pAddParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pEntityClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=recordSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=retrieveEntity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=moveToNext, postfix_operators=[], prefix_operators=[], qualifier=recordSet, selectors=[], type_arguments=None), label=None)]))], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=recordSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=recordSet, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[retrieveListByQuery] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[pEntityClass] , Keyword[final] identifier[String] identifier[pQuery] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[pQuery] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[ExceptionWithCode] operator[SEP] identifier[ExceptionWithCode] operator[SEP] identifier[WRONG_PARAMETER] , literal[String] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[T] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[IRecordSet] operator[<] identifier[RS] operator[>] identifier[recordSet] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[recordSet] operator[=] identifier[getSrvDatabase] operator[SEP] operator[SEP] operator[SEP] identifier[retrieveRecords] operator[SEP] identifier[pQuery] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[recordSet] operator[SEP] identifier[moveToFirst] operator[SEP] operator[SEP] operator[SEP] { Keyword[do] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[retrieveEntity] operator[SEP] identifier[pAddParam] , identifier[pEntityClass] , identifier[recordSet] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[recordSet] operator[SEP] identifier[moveToNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[finally] { Keyword[if] operator[SEP] identifier[recordSet] operator[!=] Other[null] operator[SEP] { identifier[recordSet] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
@RequestMapping(value = "/setLayersForMap.action", method = RequestMethod.POST) public @ResponseBody java.util.Map<String, Object> setLayersForMap( @RequestParam("mapModuleId") Integer mapModuleId, @RequestParam("layerIds") List<Integer> layerIds) { try { if (mapModuleId == null || layerIds == null || layerIds.isEmpty()) { throw new Exception(); } List<Layer> layers = this.service.setLayersForMap(mapModuleId, layerIds); return ResultSet.success(layers); } catch (Exception e) { return ResultSet.error(COULD_NOT_SET_ERROR_MSG); } }
class class_name[name] begin[{] method[setLayersForMap, return_type[type[java]], modifier[public], parameter[mapModuleId, layerIds]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mapModuleId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MemberReference(member=layerIds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=||), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=layerIds, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=service, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=mapModuleId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=layerIds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setLayersForMap, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=layers)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Layer, sub_type=None))], dimensions=[], name=List, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=layers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=success, postfix_operators=[], prefix_operators=[], qualifier=ResultSet, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=COULD_NOT_SET_ERROR_MSG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=ResultSet, 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[}]
annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[RequestMethod] operator[SEP] identifier[POST] operator[SEP] Keyword[public] annotation[@] identifier[ResponseBody] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[setLayersForMap] operator[SEP] annotation[@] identifier[RequestParam] operator[SEP] literal[String] operator[SEP] identifier[Integer] identifier[mapModuleId] , annotation[@] identifier[RequestParam] operator[SEP] literal[String] operator[SEP] identifier[List] operator[<] identifier[Integer] operator[>] identifier[layerIds] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[mapModuleId] operator[==] Other[null] operator[||] identifier[layerIds] operator[==] Other[null] operator[||] identifier[layerIds] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[Layer] operator[>] identifier[layers] operator[=] Keyword[this] operator[SEP] identifier[service] operator[SEP] identifier[setLayersForMap] operator[SEP] identifier[mapModuleId] , identifier[layerIds] operator[SEP] operator[SEP] Keyword[return] identifier[ResultSet] operator[SEP] identifier[success] operator[SEP] identifier[layers] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] identifier[ResultSet] operator[SEP] identifier[error] operator[SEP] identifier[COULD_NOT_SET_ERROR_MSG] operator[SEP] operator[SEP] } }
@Override public void unlockSet(int requestNumber, SIMessageHandle[] msgHandles, boolean reply) // f199593, F219476.2 { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "unlockSet", new Object[] { requestNumber, msgHandles, reply }); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { SibTr.debug(this, tc, "Request to unlock " + msgHandles.length + " message(s)"); if (reply) SibTr.debug(this, tc, "The client is expecting a reply"); } try { bifSession.unlockSet(msgHandles); if (reply) { try { getConversation().send(poolManager.allocate(), JFapChannelConstants.SEG_UNLOCK_SET_R, requestNumber, JFapChannelConstants.PRIORITY_MEDIUM, true, ThrottlingPolicy.BLOCK_THREAD, null); } catch (SIException e) { FFDCFilter.processException(e, CLASS_NAME + ".unlockSet", CommsConstants.CATBIFCONSUMER_UNLOCKSET_01, this); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, e.getMessage(), e); SibTr.error(tc, "COMMUNICATION_ERROR_SICO2033", 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 + ".unlockSet", CommsConstants.CATBIFCONSUMER_UNLOCKSET_02, this); } if (reply) { StaticCATHelper.sendExceptionToClient(e, CommsConstants.CATBIFCONSUMER_UNLOCKSET_02, getConversation(), requestNumber); } else { SibTr.error(tc, "UNABLE_TO_UNLOCK_MSGS_SICO2032", e); } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "unlockSet"); }
class class_name[name] begin[{] method[unlockSet, return_type[void], modifier[public], parameter[requestNumber, msgHandles, reply]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["unlockSet"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msgHandles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reply, 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[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], binary_operation[binary_operation[literal["Request to unlock "], +, member[msgHandles.length]], +, literal[" message(s)"]]]] if[member[.reply]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], literal["The client is expecting a reply"]]] else begin[{] None end[}] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=msgHandles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unlockSet, postfix_operators=[], prefix_operators=[], qualifier=bifSession, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[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_UNLOCK_SET_R, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, selectors=[]), MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PRIORITY_MEDIUM, postfix_operators=[], prefix_operators=[], qualifier=JFapChannelConstants, 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=".unlockSet"), operator=+), MemberReference(member=CATBIFCONSUMER_UNLOCKSET_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=[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=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="COMMUNICATION_ERROR_SICO2033"), 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=".unlockSet"), operator=+), MemberReference(member=CATBIFCONSUMER_UNLOCKSET_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=MemberReference(member=reply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UNABLE_TO_UNLOCK_MSGS_SICO2032"), 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, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CATBIFCONSUMER_UNLOCKSET_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["unlockSet"]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[unlockSet] operator[SEP] Keyword[int] identifier[requestNumber] , identifier[SIMessageHandle] operator[SEP] operator[SEP] identifier[msgHandles] , Keyword[boolean] identifier[reply] 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] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[requestNumber] , identifier[msgHandles] , identifier[reply] } 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[msgHandles] operator[SEP] identifier[length] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[reply] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[bifSession] operator[SEP] identifier[unlockSet] operator[SEP] identifier[msgHandles] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[reply] 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_UNLOCK_SET_R] , identifier[requestNumber] , identifier[JFapChannelConstants] operator[SEP] identifier[PRIORITY_MEDIUM] , 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[CATBIFCONSUMER_UNLOCKSET_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] Keyword[this] , 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[CATBIFCONSUMER_UNLOCKSET_02] , Keyword[this] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[reply] operator[SEP] { identifier[StaticCATHelper] operator[SEP] identifier[sendExceptionToClient] operator[SEP] identifier[e] , identifier[CommsConstants] operator[SEP] identifier[CATBIFCONSUMER_UNLOCKSET_02] , identifier[getConversation] operator[SEP] operator[SEP] , identifier[requestNumber] operator[SEP] operator[SEP] } Keyword[else] { identifier[SibTr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[e] 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] }
private static void append(Appendable app, CharSequence s) { try { app.append(s); } catch (IOException e) { throw new ICUUncheckedIOException(e); } }
class class_name[name] begin[{] method[append, return_type[void], modifier[private static], parameter[app, s]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=app, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ICUUncheckedIOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[append] operator[SEP] identifier[Appendable] identifier[app] , identifier[CharSequence] identifier[s] operator[SEP] { Keyword[try] { identifier[app] operator[SEP] identifier[append] operator[SEP] identifier[s] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ICUUncheckedIOException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public static AtomicHistogram decodeFromByteBuffer(final ByteBuffer buffer, final long minBarForHighestTrackableValue) { return (AtomicHistogram) decodeFromByteBuffer(buffer, AtomicHistogram.class, minBarForHighestTrackableValue); }
class class_name[name] begin[{] method[decodeFromByteBuffer, return_type[type[AtomicHistogram]], modifier[public static], parameter[buffer, minBarForHighestTrackableValue]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AtomicHistogram, sub_type=None)), MemberReference(member=minBarForHighestTrackableValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decodeFromByteBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AtomicHistogram, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[AtomicHistogram] identifier[decodeFromByteBuffer] operator[SEP] Keyword[final] identifier[ByteBuffer] identifier[buffer] , Keyword[final] Keyword[long] identifier[minBarForHighestTrackableValue] operator[SEP] { Keyword[return] operator[SEP] identifier[AtomicHistogram] operator[SEP] identifier[decodeFromByteBuffer] operator[SEP] identifier[buffer] , identifier[AtomicHistogram] operator[SEP] Keyword[class] , identifier[minBarForHighestTrackableValue] operator[SEP] operator[SEP] }
private boolean isWildcardWithoutBounds() { if (this.type instanceof WildcardType) { WildcardType wt = (WildcardType) this.type; if (wt.getLowerBounds().length == 0) { Type[] upperBounds = wt.getUpperBounds(); if (upperBounds.length == 0 || (upperBounds.length == 1 && Object.class == upperBounds[0])) { return true; } } } return false; }
class class_name[name] begin[{] method[isWildcardWithoutBounds, return_type[type[boolean]], modifier[private], parameter[]] begin[{] if[binary_operation[THIS[member[None.type]], instanceof, type[WildcardType]]] begin[{] local_variable[type[WildcardType], wt] if[binary_operation[call[wt.getLowerBounds, parameter[]], ==, literal[0]]] begin[{] local_variable[type[Type], upperBounds] if[binary_operation[binary_operation[member[upperBounds.length], ==, literal[0]], ||, binary_operation[binary_operation[member[upperBounds.length], ==, literal[1]], &&, binary_operation[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), ==, member[.upperBounds]]]]] begin[{] return[literal[true]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isWildcardWithoutBounds] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[type] Keyword[instanceof] identifier[WildcardType] operator[SEP] { identifier[WildcardType] identifier[wt] operator[=] operator[SEP] identifier[WildcardType] operator[SEP] Keyword[this] operator[SEP] identifier[type] operator[SEP] Keyword[if] operator[SEP] identifier[wt] operator[SEP] identifier[getLowerBounds] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { identifier[Type] operator[SEP] operator[SEP] identifier[upperBounds] operator[=] identifier[wt] operator[SEP] identifier[getUpperBounds] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[upperBounds] operator[SEP] identifier[length] operator[==] Other[0] operator[||] operator[SEP] identifier[upperBounds] operator[SEP] identifier[length] operator[==] Other[1] operator[&&] identifier[Object] operator[SEP] Keyword[class] operator[==] identifier[upperBounds] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } } Keyword[return] literal[boolean] operator[SEP] }
public BigMoney minus(BigMoneyProvider moneyToSubtract) { BigMoney toSubtract = checkCurrencyEqual(moneyToSubtract); return minus(toSubtract.getAmount()); }
class class_name[name] begin[{] method[minus, return_type[type[BigMoney]], modifier[public], parameter[moneyToSubtract]] begin[{] local_variable[type[BigMoney], toSubtract] return[call[.minus, parameter[call[toSubtract.getAmount, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[BigMoney] identifier[minus] operator[SEP] identifier[BigMoneyProvider] identifier[moneyToSubtract] operator[SEP] { identifier[BigMoney] identifier[toSubtract] operator[=] identifier[checkCurrencyEqual] operator[SEP] identifier[moneyToSubtract] operator[SEP] operator[SEP] Keyword[return] identifier[minus] operator[SEP] identifier[toSubtract] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private JPanel getPanelMisc() { if (panelMisc == null) { panelMisc = new JPanel(); panelMisc.setLayout(new GridBagLayout()); panelMisc.add(getInMemoryStatsEnabledField(), LayoutHelper.getGBC(0, 0, 1, 0.5)); panelMisc.add(getStatsdStatsEnabledField(), LayoutHelper.getGBC(0, 1, 1, 0.5)); JPanel statsdPanel = new JPanel(); statsdPanel.setLayout(new GridBagLayout()); statsdPanel.setBorder( BorderFactory.createTitledBorder( null, Constant.messages.getString("stats.options.statsd.panel"), TitledBorder.DEFAULT_JUSTIFICATION, TitledBorder.DEFAULT_POSITION, FontUtils.getFont(FontUtils.Size.standard), Color.black)); statsdPanel.add(new JLabel(Constant.messages.getString("stats.options.label.statsd.host")), LayoutHelper.getGBC(0, 1, 1, 0.5)); statsdPanel.add(this.getStatsdHostField(), LayoutHelper.getGBC(1, 1, 1, 0.5)); statsdPanel.add(new JLabel(Constant.messages.getString("stats.options.label.statsd.port")), LayoutHelper.getGBC(0, 2, 1, 0.5)); statsdPanel.add(this.getStatsdPortField(), LayoutHelper.getGBC(1, 2, 1, 0.5)); statsdPanel.add(new JLabel(Constant.messages.getString("stats.options.label.statsd.prefix")), LayoutHelper.getGBC(0, 3, 1, 0.5)); statsdPanel.add(this.getStatsdPrefixField(), LayoutHelper.getGBC(1, 3, 1, 0.5)); panelMisc.add(statsdPanel, LayoutHelper.getGBC(0, 2, 1, 1.0D)); panelMisc.add(new JLabel(), LayoutHelper.getGBC(0, 10, 1, 0.5D, 1.0D)); // Spacer } return panelMisc; }
class class_name[name] begin[{] method[getPanelMisc, return_type[type[JPanel]], modifier[private], parameter[]] begin[{] if[binary_operation[member[.panelMisc], ==, literal[null]]] begin[{] assign[member[.panelMisc], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JPanel, sub_type=None))] call[panelMisc.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridBagLayout, sub_type=None))]] call[panelMisc.add, parameter[call[.getInMemoryStatsEnabledField, parameter[]], call[LayoutHelper.getGBC, parameter[literal[0], literal[0], literal[1], literal[0.5]]]]] call[panelMisc.add, parameter[call[.getStatsdStatsEnabledField, parameter[]], call[LayoutHelper.getGBC, parameter[literal[0], literal[1], literal[1], literal[0.5]]]]] local_variable[type[JPanel], statsdPanel] call[statsdPanel.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridBagLayout, sub_type=None))]] call[statsdPanel.setBorder, parameter[call[BorderFactory.createTitledBorder, parameter[literal[null], call[Constant.messages.getString, parameter[literal["stats.options.statsd.panel"]]], member[TitledBorder.DEFAULT_JUSTIFICATION], member[TitledBorder.DEFAULT_POSITION], call[FontUtils.getFont, parameter[member[FontUtils.Size.standard]]], member[Color.black]]]]] call[statsdPanel.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="stats.options.label.statsd.host")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Constant.messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), call[LayoutHelper.getGBC, parameter[literal[0], literal[1], literal[1], literal[0.5]]]]] call[statsdPanel.add, parameter[THIS[call[None.getStatsdHostField, parameter[]]], call[LayoutHelper.getGBC, parameter[literal[1], literal[1], literal[1], literal[0.5]]]]] call[statsdPanel.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="stats.options.label.statsd.port")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Constant.messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), call[LayoutHelper.getGBC, parameter[literal[0], literal[2], literal[1], literal[0.5]]]]] call[statsdPanel.add, parameter[THIS[call[None.getStatsdPortField, parameter[]]], call[LayoutHelper.getGBC, parameter[literal[1], literal[2], literal[1], literal[0.5]]]]] call[statsdPanel.add, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="stats.options.label.statsd.prefix")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Constant.messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), call[LayoutHelper.getGBC, parameter[literal[0], literal[3], literal[1], literal[0.5]]]]] call[statsdPanel.add, parameter[THIS[call[None.getStatsdPrefixField, parameter[]]], call[LayoutHelper.getGBC, parameter[literal[1], literal[3], literal[1], literal[0.5]]]]] call[panelMisc.add, parameter[member[.statsdPanel], call[LayoutHelper.getGBC, parameter[literal[0], literal[2], literal[1], literal[1.0D]]]]] call[panelMisc.add, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), call[LayoutHelper.getGBC, parameter[literal[0], literal[10], literal[1], literal[0.5D], literal[1.0D]]]]] else begin[{] None end[}] return[member[.panelMisc]] end[}] END[}]
Keyword[private] identifier[JPanel] identifier[getPanelMisc] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[panelMisc] operator[==] Other[null] operator[SEP] { identifier[panelMisc] operator[=] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[panelMisc] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[GridBagLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[panelMisc] operator[SEP] identifier[add] operator[SEP] identifier[getInMemoryStatsEnabledField] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[0] , Other[1] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[panelMisc] operator[SEP] identifier[add] operator[SEP] identifier[getStatsdStatsEnabledField] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[1] , Other[1] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[JPanel] identifier[statsdPanel] operator[=] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[statsdPanel] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[GridBagLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[statsdPanel] operator[SEP] identifier[setBorder] operator[SEP] identifier[BorderFactory] operator[SEP] identifier[createTitledBorder] operator[SEP] Other[null] , identifier[Constant] operator[SEP] identifier[messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] , identifier[TitledBorder] operator[SEP] identifier[DEFAULT_JUSTIFICATION] , identifier[TitledBorder] operator[SEP] identifier[DEFAULT_POSITION] , identifier[FontUtils] operator[SEP] identifier[getFont] operator[SEP] identifier[FontUtils] operator[SEP] identifier[Size] operator[SEP] identifier[standard] operator[SEP] , identifier[Color] operator[SEP] identifier[black] operator[SEP] operator[SEP] operator[SEP] identifier[statsdPanel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] identifier[Constant] operator[SEP] identifier[messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[1] , Other[1] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[statsdPanel] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] identifier[getStatsdHostField] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[1] , Other[1] , Other[1] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[statsdPanel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] identifier[Constant] operator[SEP] identifier[messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[2] , Other[1] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[statsdPanel] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] identifier[getStatsdPortField] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[1] , Other[2] , Other[1] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[statsdPanel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] identifier[Constant] operator[SEP] identifier[messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[3] , Other[1] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[statsdPanel] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] identifier[getStatsdPrefixField] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[1] , Other[3] , Other[1] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[panelMisc] operator[SEP] identifier[add] operator[SEP] identifier[statsdPanel] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[2] , Other[1] , literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[panelMisc] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] operator[SEP] , identifier[LayoutHelper] operator[SEP] identifier[getGBC] operator[SEP] Other[0] , Other[10] , Other[1] , literal[Float] , literal[Float] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[panelMisc] operator[SEP] }
@NonNull public static ArrayExpressionIn any(@NonNull VariableExpression variable) { if (variable == null) { throw new IllegalArgumentException("variable cannot be null."); } return new ArrayExpressionIn(QuantifiesType.ANY, variable); }
class class_name[name] begin[{] method[any, return_type[type[ArrayExpressionIn]], modifier[public static], parameter[variable]] begin[{] if[binary_operation[member[.variable], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="variable 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[}] return[ClassCreator(arguments=[MemberReference(member=ANY, postfix_operators=[], prefix_operators=[], qualifier=QuantifiesType, selectors=[]), MemberReference(member=variable, 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=ArrayExpressionIn, sub_type=None))] end[}] END[}]
annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[ArrayExpressionIn] identifier[any] operator[SEP] annotation[@] identifier[NonNull] identifier[VariableExpression] identifier[variable] operator[SEP] { Keyword[if] operator[SEP] identifier[variable] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[ArrayExpressionIn] operator[SEP] identifier[QuantifiesType] operator[SEP] identifier[ANY] , identifier[variable] operator[SEP] operator[SEP] }
public void sessionEnd(SessionStatus finishState) { if (sessionStatusToMetrics.containsKey(finishState)) { sessionStatusToMetrics.get(finishState).inc(); } else { throw new IllegalArgumentException("Invalid end state " + finishState); } }
class class_name[name] begin[{] method[sessionEnd, return_type[void], modifier[public], parameter[finishState]] begin[{] if[call[sessionStatusToMetrics.containsKey, parameter[member[.finishState]]]] begin[{] call[sessionStatusToMetrics.get, parameter[member[.finishState]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid end state "), operandr=MemberReference(member=finishState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[sessionEnd] operator[SEP] identifier[SessionStatus] identifier[finishState] operator[SEP] { Keyword[if] operator[SEP] identifier[sessionStatusToMetrics] operator[SEP] identifier[containsKey] operator[SEP] identifier[finishState] operator[SEP] operator[SEP] { identifier[sessionStatusToMetrics] operator[SEP] identifier[get] operator[SEP] identifier[finishState] operator[SEP] operator[SEP] identifier[inc] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[finishState] operator[SEP] operator[SEP] } }
private void parseValue(byte[] data, CookieData token) { int start = -1; int stop = -1; int pos = this.bytePosition; int num_quotes = 0; // cycle through each byte until we hit a delimiter or end of data for (; pos < data.length; pos++) { byte b = data[pos]; // check for delimiter if (';' == b) { break; } // check for quotes if ('"' == b) { num_quotes++; } // Commas should not be treated as delimiters when they are // part of the Expires attribute if (',' == b) { // Port="80,8080" is valid if (CookieData.cookiePort.equals(token)) { if (2 <= num_quotes) { // this comma is after the quoted port string break; } } else if (!CookieData.cookieExpires.equals(token)) { break; } } // ignore white space if (' ' != b && '\t' != b) { if (-1 == start) { start = pos; } stop = pos; } } // save where we stopped this.bytePosition = pos + 1; // check the output parameters if (-1 == start) { this.value = new byte[0]; return; } if (-1 == stop) { this.value = new byte[0]; return; } // filter out any surrounding quotes if ('"' == data[start] && '"' == data[stop]) { start++; stop--; } // Retrieve the cookie attribute value int len = stop - start + 1; if (0 <= len) { this.value = new byte[len]; if (0 < len) { System.arraycopy(data, start, this.value, 0, len); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "value: " + GenericUtils.nullOutPasswords(this.value, (byte) '&')); } } } }
class class_name[name] begin[{] method[parseValue, return_type[void], modifier[private], parameter[data, token]] begin[{] local_variable[type[int], start] local_variable[type[int], stop] local_variable[type[int], pos] local_variable[type[int], num_quotes] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=b)], modifiers=set(), type=BasicType(dimensions=[], name=byte)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=';'), operandr=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='"'), operandr=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=num_quotes, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)])), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=','), operandr=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=CookieData.cookiePort, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=CookieData.cookieExpires, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operandr=MemberReference(member=num_quotes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]))])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operandr=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\t'), operandr=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[]), operator=<), init=None, update=[MemberReference(member=pos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[THIS[member[None.bytePosition]], binary_operation[member[.pos], +, literal[1]]] if[binary_operation[literal[1], ==, member[.start]]] begin[{] assign[THIS[member[None.value]], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] return[None] else begin[{] None end[}] if[binary_operation[literal[1], ==, member[.stop]]] begin[{] assign[THIS[member[None.value]], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] return[None] else begin[{] None end[}] if[binary_operation[binary_operation[literal['"'], ==, member[.data]], &&, binary_operation[literal['"'], ==, member[.data]]]] begin[{] member[.start] member[.stop] else begin[{] None end[}] local_variable[type[int], len] if[binary_operation[literal[0], <=, member[.len]]] begin[{] assign[THIS[member[None.value]], ArrayCreator(dimensions=[MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] if[binary_operation[literal[0], <, member[.len]]] begin[{] call[System.arraycopy, parameter[member[.data], member[.start], THIS[member[None.value]], literal[0], member[.len]]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["value: "], +, call[GenericUtils.nullOutPasswords, parameter[THIS[member[None.value]], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='&'), type=BasicType(dimensions=[], name=byte))]]]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[parseValue] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] , identifier[CookieData] identifier[token] operator[SEP] { Keyword[int] identifier[start] operator[=] operator[-] Other[1] operator[SEP] Keyword[int] identifier[stop] operator[=] operator[-] Other[1] operator[SEP] Keyword[int] identifier[pos] operator[=] Keyword[this] operator[SEP] identifier[bytePosition] operator[SEP] Keyword[int] identifier[num_quotes] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[pos] operator[<] identifier[data] operator[SEP] identifier[length] operator[SEP] identifier[pos] operator[++] operator[SEP] { Keyword[byte] identifier[b] operator[=] identifier[data] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[==] identifier[b] operator[SEP] { Keyword[break] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[==] identifier[b] operator[SEP] { identifier[num_quotes] operator[++] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[==] identifier[b] operator[SEP] { Keyword[if] operator[SEP] identifier[CookieData] operator[SEP] identifier[cookiePort] operator[SEP] identifier[equals] operator[SEP] identifier[token] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Other[2] operator[<=] identifier[num_quotes] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[CookieData] operator[SEP] identifier[cookieExpires] operator[SEP] identifier[equals] operator[SEP] identifier[token] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] literal[String] operator[!=] identifier[b] operator[&&] literal[String] operator[!=] identifier[b] operator[SEP] { Keyword[if] operator[SEP] operator[-] Other[1] operator[==] identifier[start] operator[SEP] { identifier[start] operator[=] identifier[pos] operator[SEP] } identifier[stop] operator[=] identifier[pos] operator[SEP] } } Keyword[this] operator[SEP] identifier[bytePosition] operator[=] identifier[pos] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] operator[-] Other[1] operator[==] identifier[start] operator[SEP] { Keyword[this] operator[SEP] identifier[value] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] operator[-] Other[1] operator[==] identifier[stop] operator[SEP] { Keyword[this] operator[SEP] identifier[value] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[==] identifier[data] operator[SEP] identifier[start] operator[SEP] operator[&&] literal[String] operator[==] identifier[data] operator[SEP] identifier[stop] operator[SEP] operator[SEP] { identifier[start] operator[++] operator[SEP] identifier[stop] operator[--] operator[SEP] } Keyword[int] identifier[len] operator[=] identifier[stop] operator[-] identifier[start] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] Other[0] operator[<=] identifier[len] operator[SEP] { Keyword[this] operator[SEP] identifier[value] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[len] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[0] operator[<] identifier[len] operator[SEP] { identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[data] , identifier[start] , Keyword[this] operator[SEP] identifier[value] , Other[0] , identifier[len] 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[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[GenericUtils] operator[SEP] identifier[nullOutPasswords] operator[SEP] Keyword[this] operator[SEP] identifier[value] , operator[SEP] Keyword[byte] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } } } }
public R toFloat64Array(@Nullable Iterable<Double> values) { return handle(Value.float64Array(values)); }
class class_name[name] begin[{] method[toFloat64Array, return_type[type[R]], modifier[public], parameter[values]] begin[{] return[call[.handle, parameter[call[Value.float64Array, parameter[member[.values]]]]]] end[}] END[}]
Keyword[public] identifier[R] identifier[toFloat64Array] operator[SEP] annotation[@] identifier[Nullable] identifier[Iterable] operator[<] identifier[Double] operator[>] identifier[values] operator[SEP] { Keyword[return] identifier[handle] operator[SEP] identifier[Value] operator[SEP] identifier[float64Array] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] }
private void addPostParams(final Request request) { if (initiationActions != null) { request.addPostParam("InitiationActions", Converter.mapToJson(initiationActions)); } }
class class_name[name] begin[{] method[addPostParams, return_type[void], modifier[private], parameter[request]] begin[{] if[binary_operation[member[.initiationActions], !=, literal[null]]] begin[{] call[request.addPostParam, parameter[literal["InitiationActions"], call[Converter.mapToJson, parameter[member[.initiationActions]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addPostParams] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] { Keyword[if] operator[SEP] identifier[initiationActions] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[addPostParam] operator[SEP] literal[String] , identifier[Converter] operator[SEP] identifier[mapToJson] operator[SEP] identifier[initiationActions] operator[SEP] operator[SEP] operator[SEP] } }
public Observable<Page<RecordSetInner>> listAsync(final String resourceGroupName, final String privateZoneName) { return listWithServiceResponseAsync(resourceGroupName, privateZoneName) .map(new Func1<ServiceResponse<Page<RecordSetInner>>, Page<RecordSetInner>>() { @Override public Page<RecordSetInner> call(ServiceResponse<Page<RecordSetInner>> response) { return response.body(); } }); }
class class_name[name] begin[{] method[listAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, privateZoneName]] begin[{] return[call[.listWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.privateZoneName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[RecordSetInner] operator[>] operator[>] identifier[listAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[privateZoneName] operator[SEP] { Keyword[return] identifier[listWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[privateZoneName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RecordSetInner] operator[>] operator[>] , identifier[Page] operator[<] identifier[RecordSetInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[RecordSetInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RecordSetInner] operator[>] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void setAlbum(String newAlbum) { if (newAlbum.length() > ALBUM_SIZE) { album = newAlbum.substring(0, ALBUM_SIZE); } else { album = newAlbum; } }
class class_name[name] begin[{] method[setAlbum, return_type[void], modifier[public], parameter[newAlbum]] begin[{] if[binary_operation[call[newAlbum.length, parameter[]], >, member[.ALBUM_SIZE]]] begin[{] assign[member[.album], call[newAlbum.substring, parameter[literal[0], member[.ALBUM_SIZE]]]] else begin[{] assign[member[.album], member[.newAlbum]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAlbum] operator[SEP] identifier[String] identifier[newAlbum] operator[SEP] { Keyword[if] operator[SEP] identifier[newAlbum] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[ALBUM_SIZE] operator[SEP] { identifier[album] operator[=] identifier[newAlbum] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[ALBUM_SIZE] operator[SEP] operator[SEP] } Keyword[else] { identifier[album] operator[=] identifier[newAlbum] operator[SEP] } }
public static MutableLong fromExternal(final LongSupplier s, final LongConsumer c) { return new MutableLong() { @Override public long getAsLong() { return s.getAsLong(); } @Override public Long get() { return getAsLong(); } @Override public MutableLong set(final long value) { c.accept(value); return this; } }; }
class class_name[name] begin[{] method[fromExternal, return_type[type[MutableLong]], modifier[public static], parameter[s, c]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getAsLong, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=getAsLong, parameters=[], return_type=BasicType(dimensions=[], name=long), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getAsLong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=get, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=set, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=value, type=BasicType(dimensions=[], name=long), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=MutableLong, 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=MutableLong, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[MutableLong] identifier[fromExternal] operator[SEP] Keyword[final] identifier[LongSupplier] identifier[s] , Keyword[final] identifier[LongConsumer] identifier[c] operator[SEP] { Keyword[return] Keyword[new] identifier[MutableLong] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[getAsLong] operator[SEP] operator[SEP] { Keyword[return] identifier[s] operator[SEP] identifier[getAsLong] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[Long] identifier[get] operator[SEP] operator[SEP] { Keyword[return] identifier[getAsLong] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[MutableLong] identifier[set] operator[SEP] Keyword[final] Keyword[long] identifier[value] operator[SEP] { identifier[c] operator[SEP] identifier[accept] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] } } operator[SEP] }
public static boolean isAllFieldsPublic(Class c) { try { final Field[] list = c.getFields(); for (int i = 0; i < list.length; i++) if (!Modifier.isPublic(list[i].getModifiers())) return false; } catch (Exception e) { return false; } return true; }
class class_name[name] begin[{] method[isAllFieldsPublic, return_type[type[boolean]], modifier[public static], parameter[c]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getFields, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), name=list)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[None], name=Field, sub_type=None)), ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getModifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=isPublic, postfix_operators=[], prefix_operators=['!'], qualifier=Modifier, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), 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=list, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isAllFieldsPublic] operator[SEP] identifier[Class] identifier[c] operator[SEP] { Keyword[try] { Keyword[final] identifier[Field] operator[SEP] operator[SEP] identifier[list] operator[=] identifier[c] operator[SEP] identifier[getFields] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[list] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Modifier] operator[SEP] identifier[isPublic] operator[SEP] identifier[list] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
@Override public void getFlatComparator(List<TypeComparator> flatComparators) { for (NullAwareComparator<Object> c : comparators) { Collections.addAll(flatComparators, c.getFlatComparators()); } }
class class_name[name] begin[{] method[getFlatComparator, return_type[void], modifier[public], parameter[flatComparators]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=flatComparators, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getFlatComparators, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=comparators, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=NullAwareComparator, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[getFlatComparator] operator[SEP] identifier[List] operator[<] identifier[TypeComparator] operator[>] identifier[flatComparators] operator[SEP] { Keyword[for] operator[SEP] identifier[NullAwareComparator] operator[<] identifier[Object] operator[>] identifier[c] operator[:] identifier[comparators] operator[SEP] { identifier[Collections] operator[SEP] identifier[addAll] operator[SEP] identifier[flatComparators] , identifier[c] operator[SEP] identifier[getFlatComparators] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@Measure public PathsPromoteResult promotePaths( final PathsPromoteRequest request, final String baseUrl ) throws PromotionException, IndyWorkflowException { MDC.put( PROMOTION_TYPE, PATH_PROMOTION ); MDC.put( PROMOTION_SOURCE, request.getSource().toString() ); MDC.put( PROMOTION_TARGET, request.getTargetKey().toString() ); Future<PathsPromoteResult> future = submitPathsPromoteRequest( request, baseUrl ); if ( request.isAsync() ) { return new PathsPromoteResult( request ).accepted(); } else { try { return future.get(); } catch ( InterruptedException | ExecutionException e ) { logger.error( "Path prromotion failed: " + request.getSource() + " -> " + request.getTargetKey(), e ); throw new PromotionException( "Execution of path promotion failed.", e ); } } }
class class_name[name] begin[{] method[promotePaths, return_type[type[PathsPromoteResult]], modifier[public], parameter[request, baseUrl]] begin[{] call[MDC.put, parameter[member[.PROMOTION_TYPE], member[.PATH_PROMOTION]]] call[MDC.put, parameter[member[.PROMOTION_SOURCE], call[request.getSource, parameter[]]]] call[MDC.put, parameter[member[.PROMOTION_TARGET], call[request.getTargetKey, parameter[]]]] local_variable[type[Future], future] if[call[request.isAsync, parameter[]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=accepted, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=PathsPromoteResult, sub_type=None))] else begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=future, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Path prromotion failed: "), operandr=MethodInvocation(arguments=[], member=getSource, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" -> "), operator=+), operandr=MethodInvocation(arguments=[], member=getTargetKey, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Execution of path promotion failed."), 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=PromotionException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException', 'ExecutionException']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
annotation[@] identifier[Measure] Keyword[public] identifier[PathsPromoteResult] identifier[promotePaths] operator[SEP] Keyword[final] identifier[PathsPromoteRequest] identifier[request] , Keyword[final] identifier[String] identifier[baseUrl] operator[SEP] Keyword[throws] identifier[PromotionException] , identifier[IndyWorkflowException] { identifier[MDC] operator[SEP] identifier[put] operator[SEP] identifier[PROMOTION_TYPE] , identifier[PATH_PROMOTION] operator[SEP] operator[SEP] identifier[MDC] operator[SEP] identifier[put] operator[SEP] identifier[PROMOTION_SOURCE] , identifier[request] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[MDC] operator[SEP] identifier[put] operator[SEP] identifier[PROMOTION_TARGET] , identifier[request] operator[SEP] identifier[getTargetKey] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Future] operator[<] identifier[PathsPromoteResult] operator[>] identifier[future] operator[=] identifier[submitPathsPromoteRequest] operator[SEP] identifier[request] , identifier[baseUrl] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[request] operator[SEP] identifier[isAsync] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[PathsPromoteResult] operator[SEP] identifier[request] operator[SEP] operator[SEP] identifier[accepted] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[try] { Keyword[return] identifier[future] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] operator[|] identifier[ExecutionException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[request] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[request] operator[SEP] identifier[getTargetKey] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[PromotionException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } }
@BackendProperty public void setQueryTimeout(Integer seconds) { if (seconds != null && seconds.intValue() < 0) { throw new IllegalArgumentException("invalid seconds: " + seconds); } this.queryTimeout = seconds; }
class class_name[name] begin[{] method[setQueryTimeout, return_type[void], modifier[public], parameter[seconds]] begin[{] if[binary_operation[binary_operation[member[.seconds], !=, literal[null]], &&, binary_operation[call[seconds.intValue, parameter[]], <, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="invalid seconds: "), operandr=MemberReference(member=seconds, 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[}] assign[THIS[member[None.queryTimeout]], member[.seconds]] end[}] END[}]
annotation[@] identifier[BackendProperty] Keyword[public] Keyword[void] identifier[setQueryTimeout] operator[SEP] identifier[Integer] identifier[seconds] operator[SEP] { Keyword[if] operator[SEP] identifier[seconds] operator[!=] Other[null] operator[&&] identifier[seconds] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[seconds] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[queryTimeout] operator[=] identifier[seconds] operator[SEP] }
public static boolean detectCicular(List<Location> subLocations) { boolean isCircular = false; if(! consistentAccessions(subLocations)) return isCircular; int lastMax = 0; for (Location sub : subLocations) { if (sub.getEnd().getPosition() > lastMax) { lastMax = sub.getEnd().getPosition(); } else { isCircular = true; break; } } return isCircular; }
class class_name[name] begin[{] method[detectCicular, return_type[type[boolean]], modifier[public static], parameter[subLocations]] begin[{] local_variable[type[boolean], isCircular] if[call[.consistentAccessions, parameter[member[.subLocations]]]] begin[{] return[member[.isCircular]] else begin[{] None end[}] local_variable[type[int], lastMax] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEnd, postfix_operators=[], prefix_operators=[], qualifier=sub, selectors=[MethodInvocation(arguments=[], member=getPosition, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MemberReference(member=lastMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isCircular, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getEnd, postfix_operators=[], prefix_operators=[], qualifier=sub, selectors=[MethodInvocation(arguments=[], member=getPosition, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=subLocations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sub)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Location, sub_type=None))), label=None) return[member[.isCircular]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[detectCicular] operator[SEP] identifier[List] operator[<] identifier[Location] operator[>] identifier[subLocations] operator[SEP] { Keyword[boolean] identifier[isCircular] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[consistentAccessions] operator[SEP] identifier[subLocations] operator[SEP] operator[SEP] Keyword[return] identifier[isCircular] operator[SEP] Keyword[int] identifier[lastMax] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Location] identifier[sub] operator[:] identifier[subLocations] operator[SEP] { Keyword[if] operator[SEP] identifier[sub] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[SEP] identifier[getPosition] operator[SEP] operator[SEP] operator[>] identifier[lastMax] operator[SEP] { identifier[lastMax] operator[=] identifier[sub] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[SEP] identifier[getPosition] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[isCircular] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[return] identifier[isCircular] operator[SEP] }
public Observable<RegistryListCredentialsResultInner> regenerateCredentialAsync(String resourceGroupName, String registryName, PasswordName name) { return regenerateCredentialWithServiceResponseAsync(resourceGroupName, registryName, name).map(new Func1<ServiceResponse<RegistryListCredentialsResultInner>, RegistryListCredentialsResultInner>() { @Override public RegistryListCredentialsResultInner call(ServiceResponse<RegistryListCredentialsResultInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[regenerateCredentialAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, registryName, name]] begin[{] return[call[.regenerateCredentialWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.registryName], member[.name]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[RegistryListCredentialsResultInner] operator[>] identifier[regenerateCredentialAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[registryName] , identifier[PasswordName] identifier[name] operator[SEP] { Keyword[return] identifier[regenerateCredentialWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[registryName] , identifier[name] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[RegistryListCredentialsResultInner] operator[>] , identifier[RegistryListCredentialsResultInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[RegistryListCredentialsResultInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[RegistryListCredentialsResultInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public void addOperations(final Map<MemcachedNode, Operation> ops) { for (Map.Entry<MemcachedNode, Operation> me : ops.entrySet()) { addOperation(me.getKey(), me.getValue()); } }
class class_name[name] begin[{] method[addOperations, return_type[void], modifier[public], parameter[ops]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=me, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=me, selectors=[], type_arguments=None)], member=addOperation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=ops, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=me)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MemcachedNode, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Operation, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[addOperations] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[MemcachedNode] , identifier[Operation] operator[>] identifier[ops] operator[SEP] { Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[MemcachedNode] , identifier[Operation] operator[>] identifier[me] operator[:] identifier[ops] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[addOperation] operator[SEP] identifier[me] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[me] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static void preRegisterFileManager(Context context) { context.put( JavaFileManager.class, new Context.Factory<JavaFileManager>() { @Override public JavaFileManager make(Context c) { return new MaskedFileManager(c); } }); }
class class_name[name] begin[{] method[preRegisterFileManager, return_type[void], modifier[public static], parameter[context]] begin[{] call[context.put, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JavaFileManager, sub_type=None)), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MaskedFileManager, sub_type=None)), label=None)], documentation=None, modifiers={'public'}, name=make, parameters=[FormalParameter(annotations=[], modifiers=set(), name=c, type=ReferenceType(arguments=None, dimensions=[], name=Context, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=JavaFileManager, 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=Context, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=JavaFileManager, sub_type=None))], dimensions=None, name=Factory, sub_type=None)))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[preRegisterFileManager] operator[SEP] identifier[Context] identifier[context] operator[SEP] { identifier[context] operator[SEP] identifier[put] operator[SEP] identifier[JavaFileManager] operator[SEP] Keyword[class] , Keyword[new] identifier[Context] operator[SEP] identifier[Factory] operator[<] identifier[JavaFileManager] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[JavaFileManager] identifier[make] operator[SEP] identifier[Context] identifier[c] operator[SEP] { Keyword[return] Keyword[new] identifier[MaskedFileManager] operator[SEP] identifier[c] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static base_response delete(nitro_service client, Long td) throws Exception { nstrafficdomain deleteresource = new nstrafficdomain(); deleteresource.td = td; return deleteresource.delete_resource(client); }
class class_name[name] begin[{] method[delete, return_type[type[base_response]], modifier[public static], parameter[client, td]] begin[{] local_variable[type[nstrafficdomain], deleteresource] assign[member[deleteresource.td], member[.td]] return[call[deleteresource.delete_resource, parameter[member[.client]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[delete] operator[SEP] identifier[nitro_service] identifier[client] , identifier[Long] identifier[td] operator[SEP] Keyword[throws] identifier[Exception] { identifier[nstrafficdomain] identifier[deleteresource] operator[=] Keyword[new] identifier[nstrafficdomain] operator[SEP] operator[SEP] operator[SEP] identifier[deleteresource] operator[SEP] identifier[td] operator[=] identifier[td] operator[SEP] Keyword[return] identifier[deleteresource] operator[SEP] identifier[delete_resource] operator[SEP] identifier[client] operator[SEP] operator[SEP] }
protected void connect(InetAddress address, int port) throws IOException { this.port = port; this.address = address; try { connectToAddress(address, port, timeout); return; } catch (IOException e) { // everything failed close(); throw e; } }
class class_name[name] begin[{] method[connect, return_type[void], modifier[protected], parameter[address, port]] begin[{] assign[THIS[member[None.port]], member[.port]] assign[THIS[member[None.address]], member[.address]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=address, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=port, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=connectToAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[connect] operator[SEP] identifier[InetAddress] identifier[address] , Keyword[int] identifier[port] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[this] operator[SEP] identifier[port] operator[=] identifier[port] operator[SEP] Keyword[this] operator[SEP] identifier[address] operator[=] identifier[address] operator[SEP] Keyword[try] { identifier[connectToAddress] operator[SEP] identifier[address] , identifier[port] , identifier[timeout] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } }
public static Map<String, Object> ok(Map<String, Object> msg) { HashMap<String, Object> r = new HashMap<>(); r.put((String) msg.get("cmd"), "OK"); r.put("session", msg.get("session")); return r; }
class class_name[name] begin[{] method[ok, return_type[type[Map]], modifier[public static], parameter[msg]] begin[{] local_variable[type[HashMap], r] call[r.put, parameter[Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="cmd")], member=get, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), literal["OK"]]] call[r.put, parameter[literal["session"], call[msg.get, parameter[literal["session"]]]]] return[member[.r]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[ok] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[msg] operator[SEP] { identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[r] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[r] operator[SEP] identifier[put] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[msg] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[r] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[msg] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[r] operator[SEP] }
public static VoltType getNumericLiteralType(VoltType vt, String value) { try { Long.parseLong(value); } catch (NumberFormatException e) { // Our DECIMAL may not be bigger/smaller enough to store the constant value return VoltType.DECIMAL; } return vt; }
class class_name[name] begin[{] method[getNumericLiteralType, return_type[type[VoltType]], modifier[public static], parameter[vt, value]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseLong, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MemberReference(member=DECIMAL, postfix_operators=[], prefix_operators=[], qualifier=VoltType, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) return[member[.vt]] end[}] END[}]
Keyword[public] Keyword[static] identifier[VoltType] identifier[getNumericLiteralType] operator[SEP] identifier[VoltType] identifier[vt] , identifier[String] identifier[value] operator[SEP] { Keyword[try] { identifier[Long] operator[SEP] identifier[parseLong] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[e] operator[SEP] { Keyword[return] identifier[VoltType] operator[SEP] identifier[DECIMAL] operator[SEP] } Keyword[return] identifier[vt] operator[SEP] }
public java.util.List<String> getHsmsPendingRegistration() { if (hsmsPendingRegistration == null) { hsmsPendingRegistration = new com.amazonaws.internal.SdkInternalList<String>(); } return hsmsPendingRegistration; }
class class_name[name] begin[{] method[getHsmsPendingRegistration, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.hsmsPendingRegistration], ==, literal[null]]] begin[{] assign[member[.hsmsPendingRegistration], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.hsmsPendingRegistration]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getHsmsPendingRegistration] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[hsmsPendingRegistration] operator[==] Other[null] operator[SEP] { identifier[hsmsPendingRegistration] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[hsmsPendingRegistration] operator[SEP] }
public SpannableStringBuilder build() { if (mBeforeStringBuilder.length() > 0) { mStringBuilder.insert(0, mBeforeStringBuilder); // reset SpecialUnit start pos if (!mFinalSpecialUnit.isEmpty()) { for (BaseSpecialUnit specialUnit : mFinalSpecialUnit) { int[] tempStartPoss = specialUnit.getStartPoss(); if (null == tempStartPoss || tempStartPoss.length == 0) continue; for (int i = 0; i < tempStartPoss.length; i++) { int oldStartPos = tempStartPoss[i]; tempStartPoss[i] = oldStartPos + mBeforeStringBuilder.length(); } } } // reset Cache SpecialClickableUnit start pos if (!mCacheSpecialClickableUnitMap.isEmpty()) { for (Map.Entry<SpecialClickableUnit, PositionInfo> cm : mCacheSpecialClickableUnitMap.entrySet()) { cm.getValue().startPos += mBeforeStringBuilder.length(); } } } if (!mBeforeCacheSpecialClickableUnitMap.isEmpty()) { mCacheSpecialClickableUnitMap.putAll(mBeforeCacheSpecialClickableUnitMap); } if (!mBeforeSpecialUnit.isEmpty()) { mFinalSpecialUnit.addAll(mBeforeSpecialUnit); } if (mStringBuilder.length() == 0) return null; if (mFinalSpecialUnit.isEmpty()) return new SpannableStringBuilder(mStringBuilder.toString()); if (mNormalSizeText.length() == 0) mNormalSizeText.append(mStringBuilder); String normalSizeText = mNormalSizeText.toString(); SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder(mStringBuilder); boolean isInitClickListener = false; for (BaseSpecialUnit st : mFinalSpecialUnit) { String specialText = st.getText(); int[] startPoss = st.getStartPoss(); if (TextUtils.isEmpty(specialText) || null == startPoss || startPoss.length == 0) continue; int specialTextLength = specialText.length(); if (st instanceof SpecialTextUnit) { // text span SpecialTextUnit specialTextUnit = (SpecialTextUnit) st; final SpecialClickableUnit internalSpecialClickableUnit = specialTextUnit.getSpecialClickableUnit(); if (null != internalSpecialClickableUnit) { if (internalSpecialClickableUnit.getNormalTextColor() == 0) { internalSpecialClickableUnit.setNormalTextColor(specialTextUnit.getTextColor()); } if (internalSpecialClickableUnit.getNormalBgColor() == 0) { internalSpecialClickableUnit.setNormalBgColor(specialTextUnit.getTextBackgroundColor()); } } for (int startPos : startPoss) { // Set Text Color if (specialTextUnit.getTextColor() != 0) { spannableStringBuilder.setSpan(new ForegroundColorSpan(specialTextUnit.getTextColor()), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } // Set Text Background Color if (specialTextUnit.getTextBackgroundColor() != 0 && null == internalSpecialClickableUnit) { spannableStringBuilder.setSpan(new BackgroundColorSpan(specialTextUnit.getTextBackgroundColor()), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } // Add Underline if (specialTextUnit.isShowUnderline()) { spannableStringBuilder.setSpan(new UnderlineSpan(), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } // Add StrikeThrough if (specialTextUnit.isShowStrikeThrough()) { spannableStringBuilder.setSpan(new StrikethroughSpan(), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } // Set Text Bold if (specialTextUnit.isTextBold()) { spannableStringBuilder.setSpan(new StyleSpan(Typeface.BOLD), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } // Set Text Italic if (specialTextUnit.isTextItalic()) { spannableStringBuilder.setSpan(new StyleSpan(Typeface.ITALIC), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } // Set Text Style if (specialTextUnit.getTextStyle() != Typeface.NORMAL) { spannableStringBuilder.setSpan(new StyleSpan(specialTextUnit.getTextStyle()), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } // Set Text Size if (specialTextUnit.getTextSize() > 0) { TextView curTextView = specialTextUnit.getCurTextView(); int gravity = specialTextUnit.getGravity(); if (gravity != SpecialGravity.BOTTOM && null != curTextView) { spannableStringBuilder.setSpan(new CustomAbsoluteSizeSpan(normalSizeText, specialTextUnit.getText(), Math.round(specialTextUnit.getTextSize()), curTextView, gravity), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } else { spannableStringBuilder.setSpan(new AbsoluteSizeSpan(Math.round(specialTextUnit.getTextSize()), true), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } } // set clickable if (null != internalSpecialClickableUnit) { if (!isInitClickListener) { isInitClickListener = true; TextView curTextView = internalSpecialClickableUnit.getCurTextView(); if (null != curTextView) { curTextView.setMovementMethod(CustomLinkMovementMethod.getInstance()); } } spannableStringBuilder.setSpan(new CustomClickableSpan(internalSpecialClickableUnit), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } } } else if (st instanceof SpecialImageUnit) { // image Span SpecialImageUnit specialImageUnit = (SpecialImageUnit) st; Bitmap bitmap = specialImageUnit.getBitmap(); int imgWidth = specialImageUnit.getWidth(); int imgHeight = specialImageUnit.getHeight(); if (imgWidth > 0 && imgHeight > 0) { int bitWidth = bitmap.getWidth(); int bitHeight = bitmap.getHeight(); if (imgWidth < bitWidth && imgHeight < bitHeight) { Bitmap newBitmap = ThumbnailUtils.extractThumbnail(bitmap, imgWidth, imgHeight); if (null != newBitmap) { bitmap.recycle(); specialImageUnit.setBitmap(newBitmap); } } } for (int startPos : startPoss) { CustomImageSpan curCustomImageSpan = new CustomImageSpan(normalSizeText, specialImageUnit); spannableStringBuilder.setSpan(curCustomImageSpan, startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); if (specialImageUnit.isClickable()) { addClickStateChangeListeners(startPos, startPos + specialTextLength, curCustomImageSpan); } } } else if (st instanceof SpecialLabelUnit) { // label span SpecialLabelUnit specialLabelUnit = (SpecialLabelUnit) st; for (int startPos : startPoss) { CustomLabelSpan curCustomLabelSpan = new CustomLabelSpan(normalSizeText, specialLabelUnit); spannableStringBuilder.setSpan(curCustomLabelSpan, startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); if (specialLabelUnit.isClickable()) { addClickStateChangeListeners(startPos, startPos + specialTextLength, curCustomLabelSpan); } } } else if (st instanceof SpecialClickableUnit) { // clickable span SpecialClickableUnit specialClickableUnit = (SpecialClickableUnit) st; if (!isInitClickListener) { isInitClickListener = true; TextView curTextView = specialClickableUnit.getCurTextView(); if (null != curTextView) { curTextView.setMovementMethod(CustomLinkMovementMethod.getInstance()); } } int startPos = startPoss[0]; spannableStringBuilder.setSpan(new CustomClickableSpan(specialClickableUnit), startPos, startPos + specialTextLength, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); } else if (st instanceof SpecialRawSpanUnit) { // raw span SpecialRawSpanUnit specialRawSpanUnit = (SpecialRawSpanUnit) st; int startPos = startPoss[0]; spannableStringBuilder.setSpan(specialRawSpanUnit.getSpanObj(), startPos, startPos + specialTextLength, specialRawSpanUnit.getFlags()); // Temporarily unable to support all } } return spannableStringBuilder; }
class class_name[name] begin[{] method[build, return_type[type[SpannableStringBuilder]], modifier[public], parameter[]] begin[{] if[binary_operation[call[mBeforeStringBuilder.length, parameter[]], >, literal[0]]] begin[{] call[mStringBuilder.insert, parameter[literal[0], member[.mBeforeStringBuilder]]] if[call[mFinalSpecialUnit.isEmpty, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getStartPoss, postfix_operators=[], prefix_operators=[], qualifier=specialUnit, selectors=[], type_arguments=None), name=tempStartPoss)], modifiers=set(), type=BasicType(dimensions=[None], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=tempStartPoss, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=tempStartPoss, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=||), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=tempStartPoss, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=oldStartPos)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tempStartPoss, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=MemberReference(member=oldStartPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=mBeforeStringBuilder, selectors=[], type_arguments=None), 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=tempStartPoss, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=mFinalSpecialUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=specialUnit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BaseSpecialUnit, sub_type=None))), label=None) else begin[{] None end[}] if[call[mCacheSpecialClickableUnitMap.isEmpty, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=cm, selectors=[MemberReference(member=startPos, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), type=+=, value=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=mBeforeStringBuilder, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=mCacheSpecialClickableUnitMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cm)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SpecialClickableUnit, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=PositionInfo, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) else begin[{] None end[}] else begin[{] None end[}] if[call[mBeforeCacheSpecialClickableUnitMap.isEmpty, parameter[]]] begin[{] call[mCacheSpecialClickableUnitMap.putAll, parameter[member[.mBeforeCacheSpecialClickableUnitMap]]] else begin[{] None end[}] if[call[mBeforeSpecialUnit.isEmpty, parameter[]]] begin[{] call[mFinalSpecialUnit.addAll, parameter[member[.mBeforeSpecialUnit]]] else begin[{] None end[}] if[binary_operation[call[mStringBuilder.length, parameter[]], ==, literal[0]]] begin[{] return[literal[null]] else begin[{] None end[}] if[call[mFinalSpecialUnit.isEmpty, parameter[]]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=mStringBuilder, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SpannableStringBuilder, sub_type=None))] else begin[{] None end[}] if[binary_operation[call[mNormalSizeText.length, parameter[]], ==, literal[0]]] begin[{] call[mNormalSizeText.append, parameter[member[.mStringBuilder]]] else begin[{] None end[}] local_variable[type[String], normalSizeText] local_variable[type[SpannableStringBuilder], spannableStringBuilder] local_variable[type[boolean], isInitClickListener] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=st, selectors=[], type_arguments=None), name=specialText)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getStartPoss, postfix_operators=[], prefix_operators=[], qualifier=st, selectors=[], type_arguments=None), name=startPoss)], modifiers=set(), type=BasicType(dimensions=[None], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=specialText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=TextUtils, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=startPoss, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=startPoss, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=||), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=specialText, selectors=[], type_arguments=None), name=specialTextLength)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=SpecialTextUnit, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=SpecialImageUnit, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=SpecialLabelUnit, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=SpecialClickableUnit, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=SpecialRawSpanUnit, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SpecialRawSpanUnit, sub_type=None)), name=specialRawSpanUnit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SpecialRawSpanUnit, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=startPoss, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), name=startPos)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSpanObj, postfix_operators=[], prefix_operators=[], qualifier=specialRawSpanUnit, selectors=[], type_arguments=None), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MethodInvocation(arguments=[], member=getFlags, postfix_operators=[], prefix_operators=[], qualifier=specialRawSpanUnit, selectors=[], type_arguments=None)], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SpecialClickableUnit, sub_type=None)), name=specialClickableUnit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SpecialClickableUnit, sub_type=None)), IfStatement(condition=MemberReference(member=isInitClickListener, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isInitClickListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCurTextView, postfix_operators=[], prefix_operators=[], qualifier=specialClickableUnit, selectors=[], type_arguments=None), name=curTextView)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TextView, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=curTextView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=CustomLinkMovementMethod, selectors=[], type_arguments=None)], member=setMovementMethod, postfix_operators=[], prefix_operators=[], qualifier=curTextView, selectors=[], type_arguments=None), label=None)]))])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=startPoss, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), name=startPos)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=specialClickableUnit, 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=CustomClickableSpan, sub_type=None)), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SpecialLabelUnit, sub_type=None)), name=specialLabelUnit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SpecialLabelUnit, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=normalSizeText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=specialLabelUnit, 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=CustomLabelSpan, sub_type=None)), name=curCustomLabelSpan)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CustomLabelSpan, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=curCustomLabelSpan, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isClickable, postfix_operators=[], prefix_operators=[], qualifier=specialLabelUnit, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=curCustomLabelSpan, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addClickStateChangeListeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=startPoss, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=startPos)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SpecialImageUnit, sub_type=None)), name=specialImageUnit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SpecialImageUnit, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getBitmap, postfix_operators=[], prefix_operators=[], qualifier=specialImageUnit, selectors=[], type_arguments=None), name=bitmap)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Bitmap, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=specialImageUnit, selectors=[], type_arguments=None), name=imgWidth)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=specialImageUnit, selectors=[], type_arguments=None), name=imgHeight)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=imgWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=imgHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=bitmap, selectors=[], type_arguments=None), name=bitWidth)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=bitmap, selectors=[], type_arguments=None), name=bitHeight)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=imgWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bitWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=imgHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bitHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=bitmap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=imgWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=imgHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extractThumbnail, postfix_operators=[], prefix_operators=[], qualifier=ThumbnailUtils, selectors=[], type_arguments=None), name=newBitmap)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Bitmap, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=newBitmap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=recycle, postfix_operators=[], prefix_operators=[], qualifier=bitmap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newBitmap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setBitmap, postfix_operators=[], prefix_operators=[], qualifier=specialImageUnit, selectors=[], type_arguments=None), label=None)]))]))])), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=normalSizeText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=specialImageUnit, 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=CustomImageSpan, sub_type=None)), name=curCustomImageSpan)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CustomImageSpan, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=curCustomImageSpan, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isClickable, postfix_operators=[], prefix_operators=[], qualifier=specialImageUnit, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=curCustomImageSpan, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addClickStateChangeListeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=startPoss, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=startPos)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=st, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SpecialTextUnit, sub_type=None)), name=specialTextUnit)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SpecialTextUnit, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSpecialClickableUnit, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None), name=internalSpecialClickableUnit)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=SpecialClickableUnit, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=internalSpecialClickableUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNormalTextColor, postfix_operators=[], prefix_operators=[], qualifier=internalSpecialClickableUnit, 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=[MethodInvocation(arguments=[], member=getTextColor, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None)], member=setNormalTextColor, postfix_operators=[], prefix_operators=[], qualifier=internalSpecialClickableUnit, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNormalBgColor, postfix_operators=[], prefix_operators=[], qualifier=internalSpecialClickableUnit, 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=[MethodInvocation(arguments=[], member=getTextBackgroundColor, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None)], member=setNormalBgColor, postfix_operators=[], prefix_operators=[], qualifier=internalSpecialClickableUnit, selectors=[], type_arguments=None), label=None)]))])), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTextColor, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, 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=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getTextColor, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ForegroundColorSpan, sub_type=None)), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTextBackgroundColor, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=internalSpecialClickableUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getTextBackgroundColor, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BackgroundColorSpan, sub_type=None)), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isShowUnderline, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnderlineSpan, sub_type=None)), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isShowStrikeThrough, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StrikethroughSpan, sub_type=None)), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isTextBold, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=BOLD, postfix_operators=[], prefix_operators=[], qualifier=Typeface, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StyleSpan, sub_type=None)), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isTextItalic, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=ITALIC, postfix_operators=[], prefix_operators=[], qualifier=Typeface, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StyleSpan, sub_type=None)), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTextStyle, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None), operandr=MemberReference(member=NORMAL, postfix_operators=[], prefix_operators=[], qualifier=Typeface, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getTextStyle, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StyleSpan, sub_type=None)), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTextSize, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCurTextView, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None), name=curTextView)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TextView, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getGravity, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None), name=gravity)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=gravity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BOTTOM, postfix_operators=[], prefix_operators=[], qualifier=SpecialGravity, selectors=[]), operator=!=), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=curTextView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTextSize, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None)], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), 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=AbsoluteSizeSpan, sub_type=None)), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=normalSizeText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTextSize, postfix_operators=[], prefix_operators=[], qualifier=specialTextUnit, selectors=[], type_arguments=None)], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), MemberReference(member=curTextView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=gravity, 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=CustomAbsoluteSizeSpan, sub_type=None)), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=internalSpecialClickableUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=isInitClickListener, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isInitClickListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCurTextView, postfix_operators=[], prefix_operators=[], qualifier=internalSpecialClickableUnit, selectors=[], type_arguments=None), name=curTextView)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TextView, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=curTextView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=CustomLinkMovementMethod, selectors=[], type_arguments=None)], member=setMovementMethod, postfix_operators=[], prefix_operators=[], qualifier=curTextView, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=internalSpecialClickableUnit, 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=CustomClickableSpan, sub_type=None)), MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=startPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=specialTextLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=SPAN_EXCLUSIVE_EXCLUSIVE, postfix_operators=[], prefix_operators=[], qualifier=Spanned, selectors=[])], member=setSpan, postfix_operators=[], prefix_operators=[], qualifier=spannableStringBuilder, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=startPoss, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=startPos)], modifiers=set(), type=BasicType(dimensions=[], name=int))), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=mFinalSpecialUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=st)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BaseSpecialUnit, sub_type=None))), label=None) return[member[.spannableStringBuilder]] end[}] END[}]
Keyword[public] identifier[SpannableStringBuilder] identifier[build] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[mBeforeStringBuilder] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[mStringBuilder] operator[SEP] identifier[insert] operator[SEP] Other[0] , identifier[mBeforeStringBuilder] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[mFinalSpecialUnit] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[BaseSpecialUnit] identifier[specialUnit] operator[:] identifier[mFinalSpecialUnit] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[tempStartPoss] operator[=] identifier[specialUnit] operator[SEP] identifier[getStartPoss] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[tempStartPoss] operator[||] identifier[tempStartPoss] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] Keyword[continue] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[tempStartPoss] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[oldStartPos] operator[=] identifier[tempStartPoss] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[tempStartPoss] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[oldStartPos] operator[+] identifier[mBeforeStringBuilder] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] operator[!] identifier[mCacheSpecialClickableUnitMap] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[SpecialClickableUnit] , identifier[PositionInfo] operator[>] identifier[cm] operator[:] identifier[mCacheSpecialClickableUnitMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[cm] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[startPos] operator[+=] identifier[mBeforeStringBuilder] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] operator[!] identifier[mBeforeCacheSpecialClickableUnitMap] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[mCacheSpecialClickableUnitMap] operator[SEP] identifier[putAll] operator[SEP] identifier[mBeforeCacheSpecialClickableUnitMap] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[mBeforeSpecialUnit] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[mFinalSpecialUnit] operator[SEP] identifier[addAll] operator[SEP] identifier[mBeforeSpecialUnit] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[mStringBuilder] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[mFinalSpecialUnit] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[SpannableStringBuilder] operator[SEP] identifier[mStringBuilder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mNormalSizeText] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] identifier[mNormalSizeText] operator[SEP] identifier[append] operator[SEP] identifier[mStringBuilder] operator[SEP] operator[SEP] identifier[String] identifier[normalSizeText] operator[=] identifier[mNormalSizeText] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[SpannableStringBuilder] identifier[spannableStringBuilder] operator[=] Keyword[new] identifier[SpannableStringBuilder] operator[SEP] identifier[mStringBuilder] operator[SEP] operator[SEP] Keyword[boolean] identifier[isInitClickListener] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[BaseSpecialUnit] identifier[st] operator[:] identifier[mFinalSpecialUnit] operator[SEP] { identifier[String] identifier[specialText] operator[=] identifier[st] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[startPoss] operator[=] identifier[st] operator[SEP] identifier[getStartPoss] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TextUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[specialText] operator[SEP] operator[||] Other[null] operator[==] identifier[startPoss] operator[||] identifier[startPoss] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] Keyword[continue] operator[SEP] Keyword[int] identifier[specialTextLength] operator[=] identifier[specialText] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[st] Keyword[instanceof] identifier[SpecialTextUnit] operator[SEP] { identifier[SpecialTextUnit] identifier[specialTextUnit] operator[=] operator[SEP] identifier[SpecialTextUnit] operator[SEP] identifier[st] operator[SEP] Keyword[final] identifier[SpecialClickableUnit] identifier[internalSpecialClickableUnit] operator[=] identifier[specialTextUnit] operator[SEP] identifier[getSpecialClickableUnit] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[internalSpecialClickableUnit] operator[SEP] { Keyword[if] operator[SEP] identifier[internalSpecialClickableUnit] operator[SEP] identifier[getNormalTextColor] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[internalSpecialClickableUnit] operator[SEP] identifier[setNormalTextColor] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[getTextColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[internalSpecialClickableUnit] operator[SEP] identifier[getNormalBgColor] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[internalSpecialClickableUnit] operator[SEP] identifier[setNormalBgColor] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[getTextBackgroundColor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[int] identifier[startPos] operator[:] identifier[startPoss] operator[SEP] { Keyword[if] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[getTextColor] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] Keyword[new] identifier[ForegroundColorSpan] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[getTextColor] operator[SEP] operator[SEP] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[getTextBackgroundColor] operator[SEP] operator[SEP] operator[!=] Other[0] operator[&&] Other[null] operator[==] identifier[internalSpecialClickableUnit] operator[SEP] { identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] Keyword[new] identifier[BackgroundColorSpan] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[getTextBackgroundColor] operator[SEP] operator[SEP] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[isShowUnderline] operator[SEP] operator[SEP] operator[SEP] { identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] Keyword[new] identifier[UnderlineSpan] operator[SEP] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[isShowStrikeThrough] operator[SEP] operator[SEP] operator[SEP] { identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] Keyword[new] identifier[StrikethroughSpan] operator[SEP] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[isTextBold] operator[SEP] operator[SEP] operator[SEP] { identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] Keyword[new] identifier[StyleSpan] operator[SEP] identifier[Typeface] operator[SEP] identifier[BOLD] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[isTextItalic] operator[SEP] operator[SEP] operator[SEP] { identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] Keyword[new] identifier[StyleSpan] operator[SEP] identifier[Typeface] operator[SEP] identifier[ITALIC] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[getTextStyle] operator[SEP] operator[SEP] operator[!=] identifier[Typeface] operator[SEP] identifier[NORMAL] operator[SEP] { identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] Keyword[new] identifier[StyleSpan] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[getTextStyle] operator[SEP] operator[SEP] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[getTextSize] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[TextView] identifier[curTextView] operator[=] identifier[specialTextUnit] operator[SEP] identifier[getCurTextView] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[gravity] operator[=] identifier[specialTextUnit] operator[SEP] identifier[getGravity] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[gravity] operator[!=] identifier[SpecialGravity] operator[SEP] identifier[BOTTOM] operator[&&] Other[null] operator[!=] identifier[curTextView] operator[SEP] { identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] Keyword[new] identifier[CustomAbsoluteSizeSpan] operator[SEP] identifier[normalSizeText] , identifier[specialTextUnit] operator[SEP] identifier[getText] operator[SEP] operator[SEP] , identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[getTextSize] operator[SEP] operator[SEP] operator[SEP] , identifier[curTextView] , identifier[gravity] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] } Keyword[else] { identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] Keyword[new] identifier[AbsoluteSizeSpan] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[specialTextUnit] operator[SEP] identifier[getTextSize] operator[SEP] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] Other[null] operator[!=] identifier[internalSpecialClickableUnit] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isInitClickListener] operator[SEP] { identifier[isInitClickListener] operator[=] literal[boolean] operator[SEP] identifier[TextView] identifier[curTextView] operator[=] identifier[internalSpecialClickableUnit] operator[SEP] identifier[getCurTextView] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[curTextView] operator[SEP] { identifier[curTextView] operator[SEP] identifier[setMovementMethod] operator[SEP] identifier[CustomLinkMovementMethod] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] Keyword[new] identifier[CustomClickableSpan] operator[SEP] identifier[internalSpecialClickableUnit] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[st] Keyword[instanceof] identifier[SpecialImageUnit] operator[SEP] { identifier[SpecialImageUnit] identifier[specialImageUnit] operator[=] operator[SEP] identifier[SpecialImageUnit] operator[SEP] identifier[st] operator[SEP] identifier[Bitmap] identifier[bitmap] operator[=] identifier[specialImageUnit] operator[SEP] identifier[getBitmap] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[imgWidth] operator[=] identifier[specialImageUnit] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[imgHeight] operator[=] identifier[specialImageUnit] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[imgWidth] operator[>] Other[0] operator[&&] identifier[imgHeight] operator[>] Other[0] operator[SEP] { Keyword[int] identifier[bitWidth] operator[=] identifier[bitmap] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[bitHeight] operator[=] identifier[bitmap] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[imgWidth] operator[<] identifier[bitWidth] operator[&&] identifier[imgHeight] operator[<] identifier[bitHeight] operator[SEP] { identifier[Bitmap] identifier[newBitmap] operator[=] identifier[ThumbnailUtils] operator[SEP] identifier[extractThumbnail] operator[SEP] identifier[bitmap] , identifier[imgWidth] , identifier[imgHeight] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[newBitmap] operator[SEP] { identifier[bitmap] operator[SEP] identifier[recycle] operator[SEP] operator[SEP] operator[SEP] identifier[specialImageUnit] operator[SEP] identifier[setBitmap] operator[SEP] identifier[newBitmap] operator[SEP] operator[SEP] } } } Keyword[for] operator[SEP] Keyword[int] identifier[startPos] operator[:] identifier[startPoss] operator[SEP] { identifier[CustomImageSpan] identifier[curCustomImageSpan] operator[=] Keyword[new] identifier[CustomImageSpan] operator[SEP] identifier[normalSizeText] , identifier[specialImageUnit] operator[SEP] operator[SEP] identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] identifier[curCustomImageSpan] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[specialImageUnit] operator[SEP] identifier[isClickable] operator[SEP] operator[SEP] operator[SEP] { identifier[addClickStateChangeListeners] operator[SEP] identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[curCustomImageSpan] operator[SEP] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[st] Keyword[instanceof] identifier[SpecialLabelUnit] operator[SEP] { identifier[SpecialLabelUnit] identifier[specialLabelUnit] operator[=] operator[SEP] identifier[SpecialLabelUnit] operator[SEP] identifier[st] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[startPos] operator[:] identifier[startPoss] operator[SEP] { identifier[CustomLabelSpan] identifier[curCustomLabelSpan] operator[=] Keyword[new] identifier[CustomLabelSpan] operator[SEP] identifier[normalSizeText] , identifier[specialLabelUnit] operator[SEP] operator[SEP] identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] identifier[curCustomLabelSpan] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[specialLabelUnit] operator[SEP] identifier[isClickable] operator[SEP] operator[SEP] operator[SEP] { identifier[addClickStateChangeListeners] operator[SEP] identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[curCustomLabelSpan] operator[SEP] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[st] Keyword[instanceof] identifier[SpecialClickableUnit] operator[SEP] { identifier[SpecialClickableUnit] identifier[specialClickableUnit] operator[=] operator[SEP] identifier[SpecialClickableUnit] operator[SEP] identifier[st] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isInitClickListener] operator[SEP] { identifier[isInitClickListener] operator[=] literal[boolean] operator[SEP] identifier[TextView] identifier[curTextView] operator[=] identifier[specialClickableUnit] operator[SEP] identifier[getCurTextView] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[curTextView] operator[SEP] { identifier[curTextView] operator[SEP] identifier[setMovementMethod] operator[SEP] identifier[CustomLinkMovementMethod] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[int] identifier[startPos] operator[=] identifier[startPoss] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] Keyword[new] identifier[CustomClickableSpan] operator[SEP] identifier[specialClickableUnit] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[Spanned] operator[SEP] identifier[SPAN_EXCLUSIVE_EXCLUSIVE] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[st] Keyword[instanceof] identifier[SpecialRawSpanUnit] operator[SEP] { identifier[SpecialRawSpanUnit] identifier[specialRawSpanUnit] operator[=] operator[SEP] identifier[SpecialRawSpanUnit] operator[SEP] identifier[st] operator[SEP] Keyword[int] identifier[startPos] operator[=] identifier[startPoss] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[spannableStringBuilder] operator[SEP] identifier[setSpan] operator[SEP] identifier[specialRawSpanUnit] operator[SEP] identifier[getSpanObj] operator[SEP] operator[SEP] , identifier[startPos] , identifier[startPos] operator[+] identifier[specialTextLength] , identifier[specialRawSpanUnit] operator[SEP] identifier[getFlags] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[spannableStringBuilder] operator[SEP] }
public static HttpResponse toHttpResponse(final int streamId, final Http2Headers http2Headers, final boolean validateHttpHeaders) throws Http2Exception { final HttpResponseStatus status = parseStatus(http2Headers.status()); // HTTP/2 does not define a way to carry the version or reason phrase that is included in an // HTTP/1.1 status line. final HttpResponse msg = new DefaultHttpResponse(HttpVersion.HTTP_1_1, status, validateHttpHeaders); try { addHttp2ToHttpHeaders(streamId, http2Headers, msg.headers(), msg.protocolVersion(), false, true); } catch (final Http2Exception e) { throw e; } catch (final Throwable t) { throw streamError(streamId, PROTOCOL_ERROR, t, "HTTP/2 to HTTP/1.x headers conversion error"); } return msg; }
class class_name[name] begin[{] method[toHttpResponse, return_type[type[HttpResponse]], modifier[public static], parameter[streamId, http2Headers, validateHttpHeaders]] begin[{] local_variable[type[HttpResponseStatus], status] local_variable[type[HttpResponse], msg] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=streamId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=http2Headers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=headers, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=protocolVersion, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=addHttp2ToHttpHeaders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Http2Exception'])), CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=streamId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PROTOCOL_ERROR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="HTTP/2 to HTTP/1.x headers conversion error")], member=streamError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) return[member[.msg]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HttpResponse] identifier[toHttpResponse] operator[SEP] Keyword[final] Keyword[int] identifier[streamId] , Keyword[final] identifier[Http2Headers] identifier[http2Headers] , Keyword[final] Keyword[boolean] identifier[validateHttpHeaders] operator[SEP] Keyword[throws] identifier[Http2Exception] { Keyword[final] identifier[HttpResponseStatus] identifier[status] operator[=] identifier[parseStatus] operator[SEP] identifier[http2Headers] operator[SEP] identifier[status] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[HttpResponse] identifier[msg] operator[=] Keyword[new] identifier[DefaultHttpResponse] operator[SEP] identifier[HttpVersion] operator[SEP] identifier[HTTP_1_1] , identifier[status] , identifier[validateHttpHeaders] operator[SEP] operator[SEP] Keyword[try] { identifier[addHttp2ToHttpHeaders] operator[SEP] identifier[streamId] , identifier[http2Headers] , identifier[msg] operator[SEP] identifier[headers] operator[SEP] operator[SEP] , identifier[msg] operator[SEP] identifier[protocolVersion] operator[SEP] operator[SEP] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Http2Exception] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Throwable] identifier[t] operator[SEP] { Keyword[throw] identifier[streamError] operator[SEP] identifier[streamId] , identifier[PROTOCOL_ERROR] , identifier[t] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[msg] operator[SEP] }
public static void assertXpathValuesEqual(String controlXpath, String testXpath, String inXMLString) throws SAXException, IOException, XpathException { assertXpathValuesEqual(controlXpath, testXpath, XMLUnit.buildControlDocument(inXMLString)); }
class class_name[name] begin[{] method[assertXpathValuesEqual, return_type[void], modifier[public static], parameter[controlXpath, testXpath, inXMLString]] begin[{] call[.assertXpathValuesEqual, parameter[member[.controlXpath], member[.testXpath], call[XMLUnit.buildControlDocument, parameter[member[.inXMLString]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[assertXpathValuesEqual] operator[SEP] identifier[String] identifier[controlXpath] , identifier[String] identifier[testXpath] , identifier[String] identifier[inXMLString] operator[SEP] Keyword[throws] identifier[SAXException] , identifier[IOException] , identifier[XpathException] { identifier[assertXpathValuesEqual] operator[SEP] identifier[controlXpath] , identifier[testXpath] , identifier[XMLUnit] operator[SEP] identifier[buildControlDocument] operator[SEP] identifier[inXMLString] operator[SEP] operator[SEP] operator[SEP] }
public static synchronized <T> List<T> fromExcel(final File file, final Class<T> type) { final ArrayList<T> list = new ArrayList<>(); fromExcel(file, type, list::add); return list; }
class class_name[name] begin[{] method[fromExcel, return_type[type[List]], modifier[synchronized public static], parameter[file, type]] begin[{] local_variable[type[ArrayList], list] call[.fromExcel, parameter[member[.file], member[.type], MethodReference(expression=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] return[member[.list]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[synchronized] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[fromExcel] operator[SEP] Keyword[final] identifier[File] identifier[file] , Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] operator[SEP] { Keyword[final] identifier[ArrayList] operator[<] identifier[T] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[fromExcel] operator[SEP] identifier[file] , identifier[type] , identifier[list] operator[::] identifier[add] operator[SEP] operator[SEP] Keyword[return] identifier[list] operator[SEP] }
private void removeListenerFromChain(ChainEventListener listener, ChainData chainData) { ChainGroupData[] otherGroups = null; boolean foundOtherGroupWithListener = false; // Extract the groups that this chain is involved in. try { otherGroups = this.framework.getAllChainGroups(chainData.getName()); foundOtherGroupWithListener = false; int i = 0; for (i = 0; i < otherGroups.length; i++) { if (((ChainGroupDataImpl) otherGroups[i]).containsChainEventListener(listener)) { // Chain is in another group that has this listener. foundOtherGroupWithListener = true; break; } } if (!foundOtherGroupWithListener) { // Chain is NOT in another group that has this listener, so listener can // be removed. if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Removing listener from chain config, " + chainData.getName()); } ((ChainDataImpl) chainData).removeChainEventListener(listener); } else { // Chain was found in another group with this listener if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Found chain " + chainData.getName() + " in another group, " + otherGroups[i].getName()); } } } catch (ChainException e) { // This shouldn't ever happen, but in case it does, we know no refs were // found. if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Chain not found in config: " + chainData.getName() + ", but will remove listener."); } ((ChainDataImpl) chainData).removeChainEventListener(listener); } }
class class_name[name] begin[{] method[removeListenerFromChain, return_type[void], modifier[private], parameter[listener, chainData]] begin[{] local_variable[type[ChainGroupData], otherGroups] local_variable[type[boolean], foundOtherGroupWithListener] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=otherGroups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=framework, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=chainData, selectors=[], type_arguments=None)], member=getAllChainGroups, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=foundOtherGroupWithListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Cast(expression=MemberReference(member=otherGroups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=ReferenceType(arguments=None, dimensions=[], name=ChainGroupDataImpl, sub_type=None)), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=foundOtherGroupWithListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=otherGroups, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=MemberReference(member=foundOtherGroupWithListener, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[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=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Found chain "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=chainData, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in another group, "), operator=+), operandr=MemberReference(member=otherGroups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[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=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Removing listener from chain config, "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=chainData, selectors=[], type_arguments=None), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Cast(expression=MemberReference(member=chainData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ChainDataImpl, sub_type=None)), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Chain not found in config: "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=chainData, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", but will remove listener."), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Cast(expression=MemberReference(member=chainData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ChainDataImpl, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ChainException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[removeListenerFromChain] operator[SEP] identifier[ChainEventListener] identifier[listener] , identifier[ChainData] identifier[chainData] operator[SEP] { identifier[ChainGroupData] operator[SEP] operator[SEP] identifier[otherGroups] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[foundOtherGroupWithListener] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[otherGroups] operator[=] Keyword[this] operator[SEP] identifier[framework] operator[SEP] identifier[getAllChainGroups] operator[SEP] identifier[chainData] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[foundOtherGroupWithListener] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[otherGroups] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[ChainGroupDataImpl] operator[SEP] identifier[otherGroups] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[containsChainEventListener] operator[SEP] identifier[listener] operator[SEP] operator[SEP] { identifier[foundOtherGroupWithListener] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[foundOtherGroupWithListener] 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[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[chainData] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[ChainDataImpl] operator[SEP] identifier[chainData] operator[SEP] operator[SEP] identifier[removeChainEventListener] operator[SEP] identifier[listener] operator[SEP] operator[SEP] } Keyword[else] { 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[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[chainData] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[otherGroups] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[ChainException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[chainData] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[ChainDataImpl] operator[SEP] identifier[chainData] operator[SEP] operator[SEP] identifier[removeChainEventListener] operator[SEP] identifier[listener] operator[SEP] operator[SEP] } }
public static float vDist2D(float[] v1, float[] v2) { float dx = v2[0] - v1[0]; float dz = v2[2] - v1[2]; return (float) Math.sqrt(dx * dx + dz * dz); }
class class_name[name] begin[{] method[vDist2D, return_type[type[float]], modifier[public static], parameter[v1, v2]] begin[{] local_variable[type[float], dx] local_variable[type[float], dz] return[Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=dz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+)], member=sqrt, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[float] identifier[vDist2D] operator[SEP] Keyword[float] operator[SEP] operator[SEP] identifier[v1] , Keyword[float] operator[SEP] operator[SEP] identifier[v2] operator[SEP] { Keyword[float] identifier[dx] operator[=] identifier[v2] operator[SEP] Other[0] operator[SEP] operator[-] identifier[v1] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[float] identifier[dz] operator[=] identifier[v2] operator[SEP] Other[2] operator[SEP] operator[-] identifier[v1] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[float] operator[SEP] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[dx] operator[*] identifier[dx] operator[+] identifier[dz] operator[*] identifier[dz] operator[SEP] operator[SEP] }
private static void copyEntries(File zip, final ZipOutputStream out) { // this one doesn't call copyEntries with ignoredEntries, because that has poorer performance final Set<String> names = new HashSet<String>(); iterate(zip, new ZipEntryCallback() { public void process(InputStream in, ZipEntry zipEntry) throws IOException { String entryName = zipEntry.getName(); if (names.add(entryName)) { ZipEntryUtil.copyEntry(zipEntry, in, out); } else if (log.isDebugEnabled()) { log.debug("Duplicate entry: {}", entryName); } } }); }
class class_name[name] begin[{] method[copyEntries, return_type[void], modifier[private static], parameter[zip, out]] begin[{] local_variable[type[Set], names] call[.iterate, parameter[member[.zip], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=zipEntry, selectors=[], type_arguments=None), name=entryName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=entryName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=names, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Duplicate entry: {}"), MemberReference(member=entryName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=zipEntry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyEntry, postfix_operators=[], prefix_operators=[], qualifier=ZipEntryUtil, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=process, parameters=[FormalParameter(annotations=[], modifiers=set(), name=in, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=zipEntry, type=ReferenceType(arguments=None, dimensions=[], name=ZipEntry, sub_type=None), varargs=False)], return_type=None, throws=['IOException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ZipEntryCallback, sub_type=None))]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[copyEntries] operator[SEP] identifier[File] identifier[zip] , Keyword[final] identifier[ZipOutputStream] identifier[out] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[names] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[iterate] operator[SEP] identifier[zip] , Keyword[new] identifier[ZipEntryCallback] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[process] operator[SEP] identifier[InputStream] identifier[in] , identifier[ZipEntry] identifier[zipEntry] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[entryName] operator[=] identifier[zipEntry] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[names] operator[SEP] identifier[add] operator[SEP] identifier[entryName] operator[SEP] operator[SEP] { identifier[ZipEntryUtil] operator[SEP] identifier[copyEntry] operator[SEP] identifier[zipEntry] , identifier[in] , identifier[out] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[entryName] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public static void sampleWithoutReplacement(int[] array, int numArgClasses, Random rand) { int[] temp = new int[numArgClasses]; for (int i = 0; i < temp.length; i++) { temp[i] = i; } shuffle(temp, rand); System.arraycopy(temp, 0, array, 0, array.length); }
class class_name[name] begin[{] method[sampleWithoutReplacement, return_type[void], modifier[public static], parameter[array, numArgClasses, rand]] begin[{] local_variable[type[int], temp] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=temp, 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) call[.shuffle, parameter[member[.temp], member[.rand]]] call[System.arraycopy, parameter[member[.temp], literal[0], member[.array], literal[0], member[array.length]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[sampleWithoutReplacement] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[array] , Keyword[int] identifier[numArgClasses] , identifier[Random] identifier[rand] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[temp] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[numArgClasses] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[temp] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[temp] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[i] operator[SEP] } identifier[shuffle] operator[SEP] identifier[temp] , identifier[rand] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[temp] , Other[0] , identifier[array] , Other[0] , identifier[array] operator[SEP] identifier[length] operator[SEP] operator[SEP] }
public PDPDistanceMatrix getDistanceMatrix(Atom[] protein) throws StructureException{ int[][] dist = new int[protein.length+3][protein.length+3]; int i,j; double d,dt1,dt2,dt3,dt4; int nclose=0; int[] iclose = new int[protein.length*protein.length]; int[] jclose= new int[protein.length*protein.length]; if(protein.length >= PDPParameters.MAXLEN) { System.err.println(String.format("%d protein.len > MAXLEN %d\n",protein.length,PDPParameters.MAXLEN)); return null; } for(i=0;i<protein.length;i++) { for(j=i;j<protein.length;j++) { dist[i][j]=0; dist[j][i]=0; d=0; Atom ca1 = protein[i]; Atom ca2 = protein[j]; Group g1 = ca1.getGroup(); Group g2 = ca2.getGroup(); Atom cb1 = getCBeta(g1); Atom cb2 = getCBeta(g2); boolean hasCbeta1 = cb1 != null; boolean hasCbeta2 = cb2 != null; dt1=81; dt2=64; dt3=49; dt4=36; if(hasCbeta1 && hasCbeta2) { double distance = Calc.getDistance(cb1,cb2); d+= distance*distance; } else if(hasCbeta1 && ! hasCbeta2) { double distance = 999; distance = Calc.getDistance(cb1, ca2); d += distance * distance; } else if(!hasCbeta1&&hasCbeta2) { double distance = Calc.getDistance(ca1, cb2); d += distance * distance; } else if( ! hasCbeta1&&!hasCbeta2) { double distance = Calc.getDistance(ca1, ca2); d += distance * distance; } if(d<dt1) { dist[i][j]=1; dist[j][i]=1; if(d<dt2) { dist[i][j]=2; dist[j][i]=2; if(j-i>35) { iclose[nclose]=i; jclose[nclose]=j; nclose++; } if(d<dt3) { dist[i][j]=4; dist[j][i]=4; if(d<dt4) { dist[i][j]=6; dist[j][i]=6; } } } } } } /* secondary structure interaction */ for(i=1;i<protein.length;i++) { for(j=i;j<protein.length-1;j++) { /* beta-sheet */ if(dist[i][j]>=2&&j-i>5) { if(dist[i-1][j-1]>=2&&dist[i+1][j+1]>=2||dist[i-1][j+1]>=2&&dist[i+1][j-1]>=2) { dist[i][j]+=4; dist[j][i]+=4; /* printf("1: %d %d %d\n",i,j,dist[i][j]); */ } /* alpha-helices */ else if(i>2&&j<protein.length-2) { if(dist[i-3][j-3]>=1&&dist[i+3][j+3]>=1||dist[i-3][j+3]>=1&&dist[i+3][j-3]>=1) { dist[i][j]+=4; dist[j][i]+=4; /* printf("3: %d %d %d\n",i,j,dist[i][j]); */ } else if(i>3&&j<protein.length-3) { if((dist[i-3][j-3]>=1||dist[i-3][j-4]>=1||dist[i-4][j-3]>=1||dist[i-4][j-4]>=1)&& (dist[i+4][j+4]>=1||dist[i+4][j+3]>=1||dist[i+3][j+3]>=1||dist[i+3][j+4]>=1) ||(dist[i-4][j+4]>=1||dist[i-4][j+3]>=1||dist[i-3][j+4]>=1||dist[i-3][j+3]>=1)&& (dist[i+4][j-4]>=1||dist[i+4][j-3]>=1||dist[i+3][j-4]>=1||dist[i+3][j-3]>=1)) { dist[i][j]+=4; dist[j][i]+=4; /* printf("4: %d %d %d\n",i,j,dist[i][j]); */ } } } } } } PDPDistanceMatrix matrix = new PDPDistanceMatrix(); matrix.setNclose(nclose); matrix.setIclose(iclose); matrix.setJclose(jclose); matrix.setDist(dist); return matrix; }
class class_name[name] begin[{] method[getDistanceMatrix, return_type[type[PDPDistanceMatrix]], modifier[public], parameter[protein]] begin[{] local_variable[type[int], dist] local_variable[type[int], i] local_variable[type[double], d] local_variable[type[int], nclose] local_variable[type[int], iclose] local_variable[type[int], jclose] if[binary_operation[member[protein.length], >=, member[PDPParameters.MAXLEN]]] begin[{] call[System.err.println, parameter[call[String.format, parameter[literal["%d protein.len > MAXLEN %d\n"], member[protein.length], member[PDPParameters.MAXLEN]]]]] return[literal[null]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=protein, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=ca1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Atom, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=protein, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=ca2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Atom, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getGroup, postfix_operators=[], prefix_operators=[], qualifier=ca1, selectors=[], type_arguments=None), name=g1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Group, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getGroup, postfix_operators=[], prefix_operators=[], qualifier=ca2, selectors=[], type_arguments=None), name=g2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Group, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=g1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCBeta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=cb1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Atom, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=g2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCBeta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=cb2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Atom, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=cb1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), name=hasCbeta1)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=cb2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), name=hasCbeta2)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dt1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=81)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dt2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=64)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dt3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=49)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dt4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=36)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=hasCbeta1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=hasCbeta2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=hasCbeta1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=hasCbeta2, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=hasCbeta1, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=MemberReference(member=hasCbeta2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=hasCbeta1, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=MemberReference(member=hasCbeta2, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ca1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ca2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDistance, postfix_operators=[], prefix_operators=[], qualifier=Calc, selectors=[], type_arguments=None), name=distance)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ca1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cb2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDistance, postfix_operators=[], prefix_operators=[], qualifier=Calc, selectors=[], type_arguments=None), name=distance)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=999), name=distance)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=cb1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ca2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDistance, postfix_operators=[], prefix_operators=[], qualifier=Calc, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=cb1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cb2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDistance, postfix_operators=[], prefix_operators=[], qualifier=Calc, selectors=[], type_arguments=None), name=distance)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=distance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dt1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dt2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=35), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=iclose, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=nclose, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=jclose, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=nclose, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=nclose, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dt3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dt4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)), label=None)]))]))]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=protein, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], 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=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=protein, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>=), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), operator=>), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>=), operator=&&), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=protein, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=-), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=&&), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=protein, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-), operator=<), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operandr=BinaryOperation(operandl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=+)), ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator=-))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), operator=||), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=protein, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), init=[Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], 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=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=protein, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) local_variable[type[PDPDistanceMatrix], matrix] call[matrix.setNclose, parameter[member[.nclose]]] call[matrix.setIclose, parameter[member[.iclose]]] call[matrix.setJclose, parameter[member[.jclose]]] call[matrix.setDist, parameter[member[.dist]]] return[member[.matrix]] end[}] END[}]
Keyword[public] identifier[PDPDistanceMatrix] identifier[getDistanceMatrix] operator[SEP] identifier[Atom] operator[SEP] operator[SEP] identifier[protein] operator[SEP] Keyword[throws] identifier[StructureException] { Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dist] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[protein] operator[SEP] identifier[length] operator[+] Other[3] operator[SEP] operator[SEP] identifier[protein] operator[SEP] identifier[length] operator[+] Other[3] operator[SEP] operator[SEP] Keyword[int] identifier[i] , identifier[j] operator[SEP] Keyword[double] identifier[d] , identifier[dt1] , identifier[dt2] , identifier[dt3] , identifier[dt4] operator[SEP] Keyword[int] identifier[nclose] operator[=] Other[0] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[iclose] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[protein] operator[SEP] identifier[length] operator[*] identifier[protein] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[jclose] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[protein] operator[SEP] identifier[length] operator[*] identifier[protein] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[protein] operator[SEP] identifier[length] operator[>=] identifier[PDPParameters] operator[SEP] identifier[MAXLEN] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[protein] operator[SEP] identifier[length] , identifier[PDPParameters] operator[SEP] identifier[MAXLEN] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[for] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[protein] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] identifier[j] operator[=] identifier[i] operator[SEP] identifier[j] operator[<] identifier[protein] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[dist] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[=] Other[0] operator[SEP] identifier[dist] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[=] Other[0] operator[SEP] identifier[d] operator[=] Other[0] operator[SEP] identifier[Atom] identifier[ca1] operator[=] identifier[protein] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[Atom] identifier[ca2] operator[=] identifier[protein] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[Group] identifier[g1] operator[=] identifier[ca1] operator[SEP] identifier[getGroup] operator[SEP] operator[SEP] operator[SEP] identifier[Group] identifier[g2] operator[=] identifier[ca2] operator[SEP] identifier[getGroup] operator[SEP] operator[SEP] operator[SEP] identifier[Atom] identifier[cb1] operator[=] identifier[getCBeta] operator[SEP] identifier[g1] operator[SEP] operator[SEP] identifier[Atom] identifier[cb2] operator[=] identifier[getCBeta] operator[SEP] identifier[g2] operator[SEP] operator[SEP] Keyword[boolean] identifier[hasCbeta1] operator[=] identifier[cb1] operator[!=] Other[null] operator[SEP] Keyword[boolean] identifier[hasCbeta2] operator[=] identifier[cb2] operator[!=] Other[null] operator[SEP] identifier[dt1] operator[=] Other[81] operator[SEP] identifier[dt2] operator[=] Other[64] operator[SEP] identifier[dt3] operator[=] Other[49] operator[SEP] identifier[dt4] operator[=] Other[36] operator[SEP] Keyword[if] operator[SEP] identifier[hasCbeta1] operator[&&] identifier[hasCbeta2] operator[SEP] { Keyword[double] identifier[distance] operator[=] identifier[Calc] operator[SEP] identifier[getDistance] operator[SEP] identifier[cb1] , identifier[cb2] operator[SEP] operator[SEP] identifier[d] operator[+=] identifier[distance] operator[*] identifier[distance] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[hasCbeta1] operator[&&] operator[!] identifier[hasCbeta2] operator[SEP] { Keyword[double] identifier[distance] operator[=] Other[999] operator[SEP] identifier[distance] operator[=] identifier[Calc] operator[SEP] identifier[getDistance] operator[SEP] identifier[cb1] , identifier[ca2] operator[SEP] operator[SEP] identifier[d] operator[+=] identifier[distance] operator[*] identifier[distance] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[hasCbeta1] operator[&&] identifier[hasCbeta2] operator[SEP] { Keyword[double] identifier[distance] operator[=] identifier[Calc] operator[SEP] identifier[getDistance] operator[SEP] identifier[ca1] , identifier[cb2] operator[SEP] operator[SEP] identifier[d] operator[+=] identifier[distance] operator[*] identifier[distance] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[hasCbeta1] operator[&&] operator[!] identifier[hasCbeta2] operator[SEP] { Keyword[double] identifier[distance] operator[=] identifier[Calc] operator[SEP] identifier[getDistance] operator[SEP] identifier[ca1] , identifier[ca2] operator[SEP] operator[SEP] identifier[d] operator[+=] identifier[distance] operator[*] identifier[distance] operator[SEP] } Keyword[if] operator[SEP] identifier[d] operator[<] identifier[dt1] operator[SEP] { identifier[dist] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[=] Other[1] operator[SEP] identifier[dist] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[=] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[d] operator[<] identifier[dt2] operator[SEP] { identifier[dist] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[=] Other[2] operator[SEP] identifier[dist] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[=] Other[2] operator[SEP] Keyword[if] operator[SEP] identifier[j] operator[-] identifier[i] operator[>] Other[35] operator[SEP] { identifier[iclose] operator[SEP] identifier[nclose] operator[SEP] operator[=] identifier[i] operator[SEP] identifier[jclose] operator[SEP] identifier[nclose] operator[SEP] operator[=] identifier[j] operator[SEP] identifier[nclose] operator[++] operator[SEP] } Keyword[if] operator[SEP] identifier[d] operator[<] identifier[dt3] operator[SEP] { identifier[dist] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[=] Other[4] operator[SEP] identifier[dist] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[=] Other[4] operator[SEP] Keyword[if] operator[SEP] identifier[d] operator[<] identifier[dt4] operator[SEP] { identifier[dist] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[=] Other[6] operator[SEP] identifier[dist] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[=] Other[6] operator[SEP] } } } } } } Keyword[for] operator[SEP] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[protein] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] identifier[j] operator[=] identifier[i] operator[SEP] identifier[j] operator[<] identifier[protein] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[dist] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[>=] Other[2] operator[&&] identifier[j] operator[-] identifier[i] operator[>] Other[5] operator[SEP] { Keyword[if] operator[SEP] identifier[dist] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] identifier[j] operator[-] Other[1] operator[SEP] operator[>=] Other[2] operator[&&] identifier[dist] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[>=] Other[2] operator[||] identifier[dist] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[>=] Other[2] operator[&&] identifier[dist] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] identifier[j] operator[-] Other[1] operator[SEP] operator[>=] Other[2] operator[SEP] { identifier[dist] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[+=] Other[4] operator[SEP] identifier[dist] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[+=] Other[4] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[i] operator[>] Other[2] operator[&&] identifier[j] operator[<] identifier[protein] operator[SEP] identifier[length] operator[-] Other[2] operator[SEP] { Keyword[if] operator[SEP] identifier[dist] operator[SEP] identifier[i] operator[-] Other[3] operator[SEP] operator[SEP] identifier[j] operator[-] Other[3] operator[SEP] operator[>=] Other[1] operator[&&] identifier[dist] operator[SEP] identifier[i] operator[+] Other[3] operator[SEP] operator[SEP] identifier[j] operator[+] Other[3] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[-] Other[3] operator[SEP] operator[SEP] identifier[j] operator[+] Other[3] operator[SEP] operator[>=] Other[1] operator[&&] identifier[dist] operator[SEP] identifier[i] operator[+] Other[3] operator[SEP] operator[SEP] identifier[j] operator[-] Other[3] operator[SEP] operator[>=] Other[1] operator[SEP] { identifier[dist] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[+=] Other[4] operator[SEP] identifier[dist] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[+=] Other[4] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[i] operator[>] Other[3] operator[&&] identifier[j] operator[<] identifier[protein] operator[SEP] identifier[length] operator[-] Other[3] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[dist] operator[SEP] identifier[i] operator[-] Other[3] operator[SEP] operator[SEP] identifier[j] operator[-] Other[3] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[-] Other[3] operator[SEP] operator[SEP] identifier[j] operator[-] Other[4] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[-] Other[4] operator[SEP] operator[SEP] identifier[j] operator[-] Other[3] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[-] Other[4] operator[SEP] operator[SEP] identifier[j] operator[-] Other[4] operator[SEP] operator[>=] Other[1] operator[SEP] operator[&&] operator[SEP] identifier[dist] operator[SEP] identifier[i] operator[+] Other[4] operator[SEP] operator[SEP] identifier[j] operator[+] Other[4] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[+] Other[4] operator[SEP] operator[SEP] identifier[j] operator[+] Other[3] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[+] Other[3] operator[SEP] operator[SEP] identifier[j] operator[+] Other[3] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[+] Other[3] operator[SEP] operator[SEP] identifier[j] operator[+] Other[4] operator[SEP] operator[>=] Other[1] operator[SEP] operator[||] operator[SEP] identifier[dist] operator[SEP] identifier[i] operator[-] Other[4] operator[SEP] operator[SEP] identifier[j] operator[+] Other[4] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[-] Other[4] operator[SEP] operator[SEP] identifier[j] operator[+] Other[3] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[-] Other[3] operator[SEP] operator[SEP] identifier[j] operator[+] Other[4] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[-] Other[3] operator[SEP] operator[SEP] identifier[j] operator[+] Other[3] operator[SEP] operator[>=] Other[1] operator[SEP] operator[&&] operator[SEP] identifier[dist] operator[SEP] identifier[i] operator[+] Other[4] operator[SEP] operator[SEP] identifier[j] operator[-] Other[4] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[+] Other[4] operator[SEP] operator[SEP] identifier[j] operator[-] Other[3] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[+] Other[3] operator[SEP] operator[SEP] identifier[j] operator[-] Other[4] operator[SEP] operator[>=] Other[1] operator[||] identifier[dist] operator[SEP] identifier[i] operator[+] Other[3] operator[SEP] operator[SEP] identifier[j] operator[-] Other[3] operator[SEP] operator[>=] Other[1] operator[SEP] operator[SEP] { identifier[dist] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[+=] Other[4] operator[SEP] identifier[dist] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[+=] Other[4] operator[SEP] } } } } } } identifier[PDPDistanceMatrix] identifier[matrix] operator[=] Keyword[new] identifier[PDPDistanceMatrix] operator[SEP] operator[SEP] operator[SEP] identifier[matrix] operator[SEP] identifier[setNclose] operator[SEP] identifier[nclose] operator[SEP] operator[SEP] identifier[matrix] operator[SEP] identifier[setIclose] operator[SEP] identifier[iclose] operator[SEP] operator[SEP] identifier[matrix] operator[SEP] identifier[setJclose] operator[SEP] identifier[jclose] operator[SEP] operator[SEP] identifier[matrix] operator[SEP] identifier[setDist] operator[SEP] identifier[dist] operator[SEP] operator[SEP] Keyword[return] identifier[matrix] operator[SEP] }
public LocalFsBlobStoreFile read(String key) throws IOException { return new LocalFsBlobStoreFile(getKeyDir(key), BlobStoreFile.BLOBSTORE_DATA_FILE); }
class class_name[name] begin[{] method[read, return_type[type[LocalFsBlobStoreFile]], modifier[public], parameter[key]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getKeyDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=BLOBSTORE_DATA_FILE, postfix_operators=[], prefix_operators=[], qualifier=BlobStoreFile, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LocalFsBlobStoreFile, sub_type=None))] end[}] END[}]
Keyword[public] identifier[LocalFsBlobStoreFile] identifier[read] operator[SEP] identifier[String] identifier[key] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] Keyword[new] identifier[LocalFsBlobStoreFile] operator[SEP] identifier[getKeyDir] operator[SEP] identifier[key] operator[SEP] , identifier[BlobStoreFile] operator[SEP] identifier[BLOBSTORE_DATA_FILE] operator[SEP] operator[SEP] }
private void finalizeRecord() { myPage.setVal(currentPos, new IntegerConstant(getLastRecordPosition())); setPreviousNextRecordPosition(currentPos + pointerSize); setLastRecordPosition(currentPos); currentPos += pointerSize; setNextRecordPosition(currentPos); // leave for next pointer currentPos += pointerSize; }
class class_name[name] begin[{] method[finalizeRecord, return_type[void], modifier[private], parameter[]] begin[{] call[myPage.setVal, parameter[member[.currentPos], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getLastRecordPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IntegerConstant, sub_type=None))]] call[.setPreviousNextRecordPosition, parameter[binary_operation[member[.currentPos], +, member[.pointerSize]]]] call[.setLastRecordPosition, parameter[member[.currentPos]]] assign[member[.currentPos], member[.pointerSize]] call[.setNextRecordPosition, parameter[member[.currentPos]]] assign[member[.currentPos], member[.pointerSize]] end[}] END[}]
Keyword[private] Keyword[void] identifier[finalizeRecord] operator[SEP] operator[SEP] { identifier[myPage] operator[SEP] identifier[setVal] operator[SEP] identifier[currentPos] , Keyword[new] identifier[IntegerConstant] operator[SEP] identifier[getLastRecordPosition] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setPreviousNextRecordPosition] operator[SEP] identifier[currentPos] operator[+] identifier[pointerSize] operator[SEP] operator[SEP] identifier[setLastRecordPosition] operator[SEP] identifier[currentPos] operator[SEP] operator[SEP] identifier[currentPos] operator[+=] identifier[pointerSize] operator[SEP] identifier[setNextRecordPosition] operator[SEP] identifier[currentPos] operator[SEP] operator[SEP] identifier[currentPos] operator[+=] identifier[pointerSize] operator[SEP] }
@Override public void visit(JavadocComment jdoc, ControllerModel controller) { controller.setDescription(extractDescription(jdoc)); Set<String> version = extractDocAnnotation("@version",jdoc); if(!version.isEmpty()){ controller.setVersion(version.iterator().next()); } }
class class_name[name] begin[{] method[visit, return_type[void], modifier[public], parameter[jdoc, controller]] begin[{] call[controller.setDescription, parameter[call[.extractDescription, parameter[member[.jdoc]]]]] local_variable[type[Set], version] if[call[version.isEmpty, parameter[]]] begin[{] call[controller.setVersion, parameter[call[version.iterator, parameter[]]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] identifier[JavadocComment] identifier[jdoc] , identifier[ControllerModel] identifier[controller] operator[SEP] { identifier[controller] operator[SEP] identifier[setDescription] operator[SEP] identifier[extractDescription] operator[SEP] identifier[jdoc] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[version] operator[=] identifier[extractDocAnnotation] operator[SEP] literal[String] , identifier[jdoc] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[version] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[controller] operator[SEP] identifier[setVersion] operator[SEP] identifier[version] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public com.squareup.okhttp.Call getStatusesAsync(String tid, Integer count, Integer offset, String status, String dids, final ApiCallback<TaskStatusesEnvelope> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = getStatusesValidateBeforeCall(tid, count, offset, status, dids, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<TaskStatusesEnvelope>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
class class_name[name] begin[{] method[getStatusesAsync, return_type[type[com]], modifier[public], parameter[tid, count, offset, status, dids, callback]] begin[{] local_variable[type[ProgressResponseBody], progressListener] local_variable[type[ProgressRequestBody], progressRequestListener] if[binary_operation[member[.callback], !=, literal[null]]] begin[{] assign[member[.progressListener], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytesRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contentLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=done, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onDownloadProgress, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=update, parameters=[FormalParameter(annotations=[], modifiers=set(), name=bytesRead, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=contentLength, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=done, type=BasicType(dimensions=[], name=boolean), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProgressResponseBody, sub_type=ReferenceType(arguments=None, dimensions=None, name=ProgressListener, sub_type=None)))] assign[member[.progressRequestListener], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytesWritten, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contentLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=done, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onUploadProgress, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onRequestProgress, parameters=[FormalParameter(annotations=[], modifiers=set(), name=bytesWritten, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=contentLength, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=done, type=BasicType(dimensions=[], name=boolean), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProgressRequestBody, sub_type=ReferenceType(arguments=None, dimensions=None, name=ProgressRequestListener, sub_type=None)))] else begin[{] None end[}] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] call[apiClient.executeAsync, parameter[member[.call], member[.localVarReturnType], member[.callback]]] return[member[.call]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[getStatusesAsync] operator[SEP] identifier[String] identifier[tid] , identifier[Integer] identifier[count] , identifier[Integer] identifier[offset] , identifier[String] identifier[status] , identifier[String] identifier[dids] , Keyword[final] identifier[ApiCallback] operator[<] identifier[TaskStatusesEnvelope] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ProgressResponseBody] operator[SEP] identifier[ProgressListener] identifier[progressListener] operator[=] Other[null] operator[SEP] identifier[ProgressRequestBody] operator[SEP] identifier[ProgressRequestListener] identifier[progressRequestListener] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[callback] operator[!=] Other[null] operator[SEP] { identifier[progressListener] operator[=] Keyword[new] identifier[ProgressResponseBody] operator[SEP] identifier[ProgressListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[update] operator[SEP] Keyword[long] identifier[bytesRead] , Keyword[long] identifier[contentLength] , Keyword[boolean] identifier[done] operator[SEP] { identifier[callback] operator[SEP] identifier[onDownloadProgress] operator[SEP] identifier[bytesRead] , identifier[contentLength] , identifier[done] operator[SEP] operator[SEP] } } operator[SEP] identifier[progressRequestListener] operator[=] Keyword[new] identifier[ProgressRequestBody] operator[SEP] identifier[ProgressRequestListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onRequestProgress] operator[SEP] Keyword[long] identifier[bytesWritten] , Keyword[long] identifier[contentLength] , Keyword[boolean] identifier[done] operator[SEP] { identifier[callback] operator[SEP] identifier[onUploadProgress] operator[SEP] identifier[bytesWritten] , identifier[contentLength] , identifier[done] operator[SEP] operator[SEP] } } operator[SEP] } identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[getStatusesValidateBeforeCall] operator[SEP] identifier[tid] , identifier[count] , identifier[offset] , identifier[status] , identifier[dids] , identifier[progressListener] , identifier[progressRequestListener] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[TaskStatusesEnvelope] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[apiClient] operator[SEP] identifier[executeAsync] operator[SEP] identifier[call] , identifier[localVarReturnType] , identifier[callback] operator[SEP] operator[SEP] Keyword[return] identifier[call] operator[SEP] }
public static String computeAttachmentHash(byte[] attachment) { byte[] rawDigest = MESSAGE_DIGESTER.digest(attachment); return Base64.encode(rawDigest); }
class class_name[name] begin[{] method[computeAttachmentHash, return_type[type[String]], modifier[public static], parameter[attachment]] begin[{] local_variable[type[byte], rawDigest] return[call[Base64.encode, parameter[member[.rawDigest]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[computeAttachmentHash] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[attachment] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[rawDigest] operator[=] identifier[MESSAGE_DIGESTER] operator[SEP] identifier[digest] operator[SEP] identifier[attachment] operator[SEP] operator[SEP] Keyword[return] identifier[Base64] operator[SEP] identifier[encode] operator[SEP] identifier[rawDigest] operator[SEP] operator[SEP] }
public void writeEDLMentions(Iterable<EDLMention> edlMentions, CharSink sink) throws IOException { final List<String> lines = Lists.newArrayList(); for (final EDLMention edlMention : edlMentions) { lines.add(toLine(edlMention)); } sink.writeLines(lines, "\n"); }
class class_name[name] begin[{] method[writeEDLMentions, return_type[void], modifier[public], parameter[edlMentions, sink]] begin[{] local_variable[type[List], lines] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=edlMention, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=lines, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=edlMentions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=edlMention)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=EDLMention, sub_type=None))), label=None) call[sink.writeLines, parameter[member[.lines], literal["\n"]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeEDLMentions] operator[SEP] identifier[Iterable] operator[<] identifier[EDLMention] operator[>] identifier[edlMentions] , identifier[CharSink] identifier[sink] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[lines] operator[=] identifier[Lists] operator[SEP] identifier[newArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[EDLMention] identifier[edlMention] operator[:] identifier[edlMentions] operator[SEP] { identifier[lines] operator[SEP] identifier[add] operator[SEP] identifier[toLine] operator[SEP] identifier[edlMention] operator[SEP] operator[SEP] operator[SEP] } identifier[sink] operator[SEP] identifier[writeLines] operator[SEP] identifier[lines] , literal[String] operator[SEP] operator[SEP] }
private List<MavenPluginDescriptor> createMavenPluginDescriptors(List<Plugin> plugins, ScannerContext context) { Store store = context.getStore(); List<MavenPluginDescriptor> pluginDescriptors = new ArrayList<>(); for (Plugin plugin : plugins) { MavenPluginDescriptor mavenPluginDescriptor = store.create(MavenPluginDescriptor.class); MavenArtifactDescriptor artifactDescriptor = getArtifactResolver(context).resolve(new PluginCoordinates(plugin), context); mavenPluginDescriptor.setArtifact(artifactDescriptor); mavenPluginDescriptor.setInherited(plugin.isInherited()); mavenPluginDescriptor.getDeclaresDependencies() .addAll(getDependencies(mavenPluginDescriptor, plugin.getDependencies(), PluginDependsOnDescriptor.class, context)); addPluginExecutions(mavenPluginDescriptor, plugin, store); addConfiguration(mavenPluginDescriptor, (Xpp3Dom) plugin.getConfiguration(), store); pluginDescriptors.add(mavenPluginDescriptor); } return pluginDescriptors; }
class class_name[name] begin[{] method[createMavenPluginDescriptors, return_type[type[List]], modifier[private], parameter[plugins, context]] begin[{] local_variable[type[Store], store] local_variable[type[List], pluginDescriptors] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MavenPluginDescriptor, sub_type=None))], member=create, postfix_operators=[], prefix_operators=[], qualifier=store, selectors=[], type_arguments=None), name=mavenPluginDescriptor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MavenPluginDescriptor, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getArtifactResolver, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=plugin, 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=PluginCoordinates, sub_type=None)), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolve, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=artifactDescriptor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MavenArtifactDescriptor, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=artifactDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setArtifact, postfix_operators=[], prefix_operators=[], qualifier=mavenPluginDescriptor, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=isInherited, postfix_operators=[], prefix_operators=[], qualifier=plugin, selectors=[], type_arguments=None)], member=setInherited, postfix_operators=[], prefix_operators=[], qualifier=mavenPluginDescriptor, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getDeclaresDependencies, postfix_operators=[], prefix_operators=[], qualifier=mavenPluginDescriptor, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=mavenPluginDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getDependencies, postfix_operators=[], prefix_operators=[], qualifier=plugin, selectors=[], type_arguments=None), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PluginDependsOnDescriptor, sub_type=None)), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mavenPluginDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=plugin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=store, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addPluginExecutions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mavenPluginDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[], member=getConfiguration, postfix_operators=[], prefix_operators=[], qualifier=plugin, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Xpp3Dom, sub_type=None)), MemberReference(member=store, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addConfiguration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mavenPluginDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=pluginDescriptors, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=plugins, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=plugin)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Plugin, sub_type=None))), label=None) return[member[.pluginDescriptors]] end[}] END[}]
Keyword[private] identifier[List] operator[<] identifier[MavenPluginDescriptor] operator[>] identifier[createMavenPluginDescriptors] operator[SEP] identifier[List] operator[<] identifier[Plugin] operator[>] identifier[plugins] , identifier[ScannerContext] identifier[context] operator[SEP] { identifier[Store] identifier[store] operator[=] identifier[context] operator[SEP] identifier[getStore] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[MavenPluginDescriptor] operator[>] identifier[pluginDescriptors] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Plugin] identifier[plugin] operator[:] identifier[plugins] operator[SEP] { identifier[MavenPluginDescriptor] identifier[mavenPluginDescriptor] operator[=] identifier[store] operator[SEP] identifier[create] operator[SEP] identifier[MavenPluginDescriptor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[MavenArtifactDescriptor] identifier[artifactDescriptor] operator[=] identifier[getArtifactResolver] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[resolve] operator[SEP] Keyword[new] identifier[PluginCoordinates] operator[SEP] identifier[plugin] operator[SEP] , identifier[context] operator[SEP] operator[SEP] identifier[mavenPluginDescriptor] operator[SEP] identifier[setArtifact] operator[SEP] identifier[artifactDescriptor] operator[SEP] operator[SEP] identifier[mavenPluginDescriptor] operator[SEP] identifier[setInherited] operator[SEP] identifier[plugin] operator[SEP] identifier[isInherited] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mavenPluginDescriptor] operator[SEP] identifier[getDeclaresDependencies] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[getDependencies] operator[SEP] identifier[mavenPluginDescriptor] , identifier[plugin] operator[SEP] identifier[getDependencies] operator[SEP] operator[SEP] , identifier[PluginDependsOnDescriptor] operator[SEP] Keyword[class] , identifier[context] operator[SEP] operator[SEP] operator[SEP] identifier[addPluginExecutions] operator[SEP] identifier[mavenPluginDescriptor] , identifier[plugin] , identifier[store] operator[SEP] operator[SEP] identifier[addConfiguration] operator[SEP] identifier[mavenPluginDescriptor] , operator[SEP] identifier[Xpp3Dom] operator[SEP] identifier[plugin] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] , identifier[store] operator[SEP] operator[SEP] identifier[pluginDescriptors] operator[SEP] identifier[add] operator[SEP] identifier[mavenPluginDescriptor] operator[SEP] operator[SEP] } Keyword[return] identifier[pluginDescriptors] operator[SEP] }
@Override public CreateUserDefinedFunctionResult createUserDefinedFunction(CreateUserDefinedFunctionRequest request) { request = beforeClientExecution(request); return executeCreateUserDefinedFunction(request); }
class class_name[name] begin[{] method[createUserDefinedFunction, return_type[type[CreateUserDefinedFunctionResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateUserDefinedFunction, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CreateUserDefinedFunctionResult] identifier[createUserDefinedFunction] operator[SEP] identifier[CreateUserDefinedFunctionRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreateUserDefinedFunction] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public CharSequence format() { if (pieces.isEmpty()) { return input; } String target; for (Piece piece : pieces) { target = BRACE_START + piece.getKey() + BRACE_END; input = input.replace(target, String.valueOf(piece.getValue())); } return input; }
class class_name[name] begin[{] method[format, return_type[type[CharSequence]], modifier[public], parameter[]] begin[{] if[call[pieces.isEmpty, parameter[]]] begin[{] return[member[.input]] else begin[{] None end[}] local_variable[type[String], target] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=BRACE_START, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=piece, selectors=[], type_arguments=None), operator=+), operandr=MemberReference(member=BRACE_END, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=piece, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=replace, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=pieces, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=piece)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Piece, sub_type=None))), label=None) return[member[.input]] end[}] END[}]
Keyword[public] identifier[CharSequence] identifier[format] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[pieces] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[input] operator[SEP] } identifier[String] identifier[target] operator[SEP] Keyword[for] operator[SEP] identifier[Piece] identifier[piece] operator[:] identifier[pieces] operator[SEP] { identifier[target] operator[=] identifier[BRACE_START] operator[+] identifier[piece] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[+] identifier[BRACE_END] operator[SEP] identifier[input] operator[=] identifier[input] operator[SEP] identifier[replace] operator[SEP] identifier[target] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[piece] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[input] operator[SEP] }
@Override @UiThread public void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) { super.onAttachedToRecyclerView(recyclerView); mAttachedRecyclerViewPool.add(recyclerView); }
class class_name[name] begin[{] method[onAttachedToRecyclerView, return_type[void], modifier[public], parameter[recyclerView]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=recyclerView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onAttachedToRecyclerView, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) call[mAttachedRecyclerViewPool.add, parameter[member[.recyclerView]]] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[UiThread] Keyword[public] Keyword[void] identifier[onAttachedToRecyclerView] operator[SEP] annotation[@] identifier[NonNull] identifier[RecyclerView] identifier[recyclerView] operator[SEP] { Keyword[super] operator[SEP] identifier[onAttachedToRecyclerView] operator[SEP] identifier[recyclerView] operator[SEP] operator[SEP] identifier[mAttachedRecyclerViewPool] operator[SEP] identifier[add] operator[SEP] identifier[recyclerView] operator[SEP] operator[SEP] }
private Put getJobStatusPut() { Put pStatus = new Put(jobKeyBytes); byte[] valueBytes = Bytes.toBytes(this.jobStatus); byte[] qualifier = Bytes.toBytes(JobHistoryKeys.JOB_STATUS.toString().toLowerCase()); pStatus.addColumn(Constants.INFO_FAM_BYTES, qualifier, valueBytes); return pStatus; }
class class_name[name] begin[{] method[getJobStatusPut, return_type[type[Put]], modifier[private], parameter[]] begin[{] local_variable[type[Put], pStatus] local_variable[type[byte], valueBytes] local_variable[type[byte], qualifier] call[pStatus.addColumn, parameter[member[Constants.INFO_FAM_BYTES], member[.qualifier], member[.valueBytes]]] return[member[.pStatus]] end[}] END[}]
Keyword[private] identifier[Put] identifier[getJobStatusPut] operator[SEP] operator[SEP] { identifier[Put] identifier[pStatus] operator[=] Keyword[new] identifier[Put] operator[SEP] identifier[jobKeyBytes] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[valueBytes] operator[=] identifier[Bytes] operator[SEP] identifier[toBytes] operator[SEP] Keyword[this] operator[SEP] identifier[jobStatus] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[qualifier] operator[=] identifier[Bytes] operator[SEP] identifier[toBytes] operator[SEP] identifier[JobHistoryKeys] operator[SEP] identifier[JOB_STATUS] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pStatus] operator[SEP] identifier[addColumn] operator[SEP] identifier[Constants] operator[SEP] identifier[INFO_FAM_BYTES] , identifier[qualifier] , identifier[valueBytes] operator[SEP] operator[SEP] Keyword[return] identifier[pStatus] operator[SEP] }
public static boolean contentEqualsIgnoreCase(CharSequence a, CharSequence b) { if (a == null || b == null) { return a == b; } if (a.getClass() == AsciiString.class) { return ((AsciiString) a).contentEqualsIgnoreCase(b); } if (b.getClass() == AsciiString.class) { return ((AsciiString) b).contentEqualsIgnoreCase(a); } if (a.length() != b.length()) { return false; } for (int i = 0; i < a.length(); ++i) { if (!equalsIgnoreCase(a.charAt(i), b.charAt(i))) { return false; } } return true; }
class class_name[name] begin[{] method[contentEqualsIgnoreCase, return_type[type[boolean]], modifier[public static], parameter[a, b]] begin[{] if[binary_operation[binary_operation[member[.a], ==, literal[null]], ||, binary_operation[member[.b], ==, literal[null]]]] begin[{] return[binary_operation[member[.a], ==, member[.b]]] else begin[{] None end[}] if[binary_operation[call[a.getClass, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AsciiString, sub_type=None))]] begin[{] return[Cast(expression=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AsciiString, sub_type=None))] else begin[{] None end[}] if[binary_operation[call[b.getClass, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AsciiString, sub_type=None))]] begin[{] return[Cast(expression=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AsciiString, sub_type=None))] else begin[{] None end[}] if[binary_operation[call[a.length, parameter[]], !=, call[b.length, parameter[]]]] begin[{] return[literal[false]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None)], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[contentEqualsIgnoreCase] operator[SEP] identifier[CharSequence] identifier[a] , identifier[CharSequence] identifier[b] operator[SEP] { Keyword[if] operator[SEP] identifier[a] operator[==] Other[null] operator[||] identifier[b] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[a] operator[==] identifier[b] operator[SEP] } Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[AsciiString] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[AsciiString] operator[SEP] identifier[a] operator[SEP] operator[SEP] identifier[contentEqualsIgnoreCase] operator[SEP] identifier[b] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[b] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[AsciiString] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[AsciiString] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[contentEqualsIgnoreCase] operator[SEP] identifier[a] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] identifier[b] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[a] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[equalsIgnoreCase] operator[SEP] identifier[a] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] , identifier[b] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
@JsonAnySetter protected void handleUnknown(String key, Object value) { StringBuilder unknown = new StringBuilder(this.getClass().getSimpleName()); unknown.append(": Unknown property='").append(key); unknown.append("' value='").append(value).append("'"); LOG.trace(unknown.toString()); }
class class_name[name] begin[{] method[handleUnknown, return_type[void], modifier[protected], parameter[key, value]] begin[{] local_variable[type[StringBuilder], unknown] call[unknown.append, parameter[literal[": Unknown property='"]]] call[unknown.append, parameter[literal["' value='"]]] call[LOG.trace, parameter[call[unknown.toString, parameter[]]]] end[}] END[}]
annotation[@] identifier[JsonAnySetter] Keyword[protected] Keyword[void] identifier[handleUnknown] operator[SEP] identifier[String] identifier[key] , identifier[Object] identifier[value] operator[SEP] { identifier[StringBuilder] identifier[unknown] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[unknown] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[unknown] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[trace] operator[SEP] identifier[unknown] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static Value convertFromJava(Object o) { if (o instanceof Long) { return new NumberValue(new BigDecimal((Long) o)); } else if (o instanceof Integer) { return new NumberValue(new BigDecimal((Integer) o)); } else if (o instanceof Double) { return new NumberValue(new BigDecimal((Double) o)); } else if (o instanceof Float) { return new NumberValue(new BigDecimal((Float) o)); } else if (o instanceof String) { return new StringValue((String) o); } else if (o instanceof Date) { return new DateValue((Date) o); } else if (o instanceof Boolean) { return BooleanValue.getInstance((Boolean) o); } else if (o == null) { return NilValue.getInstance(); } throw new CommandExecutionException("Could not convert Java object " + o + " to an equivalent srec value"); }
class class_name[name] begin[{] method[convertFromJava, return_type[type[Value]], modifier[public static], parameter[o]] begin[{] if[binary_operation[member[.o], instanceof, type[Long]]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Long, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NumberValue, sub_type=None))] else begin[{] if[binary_operation[member[.o], instanceof, type[Integer]]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NumberValue, sub_type=None))] else begin[{] if[binary_operation[member[.o], instanceof, type[Double]]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Double, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NumberValue, sub_type=None))] else begin[{] if[binary_operation[member[.o], instanceof, type[Float]]] begin[{] return[ClassCreator(arguments=[ClassCreator(arguments=[Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Float, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigDecimal, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NumberValue, sub_type=None))] else begin[{] if[binary_operation[member[.o], instanceof, type[String]]] begin[{] return[ClassCreator(arguments=[Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringValue, sub_type=None))] else begin[{] if[binary_operation[member[.o], instanceof, type[Date]]] begin[{] return[ClassCreator(arguments=[Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DateValue, sub_type=None))] else begin[{] if[binary_operation[member[.o], instanceof, type[Boolean]]] begin[{] return[call[BooleanValue.getInstance, parameter[Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))]]] else begin[{] if[binary_operation[member[.o], ==, literal[null]]] begin[{] return[call[NilValue.getInstance, parameter[]]] else begin[{] None end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not convert Java object "), operandr=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" to an equivalent srec value"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommandExecutionException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Value] identifier[convertFromJava] operator[SEP] identifier[Object] identifier[o] operator[SEP] { Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[Long] operator[SEP] { Keyword[return] Keyword[new] identifier[NumberValue] operator[SEP] Keyword[new] identifier[BigDecimal] operator[SEP] operator[SEP] identifier[Long] operator[SEP] identifier[o] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[Integer] operator[SEP] { Keyword[return] Keyword[new] identifier[NumberValue] operator[SEP] Keyword[new] identifier[BigDecimal] operator[SEP] operator[SEP] identifier[Integer] operator[SEP] identifier[o] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[Double] operator[SEP] { Keyword[return] Keyword[new] identifier[NumberValue] operator[SEP] Keyword[new] identifier[BigDecimal] operator[SEP] operator[SEP] identifier[Double] operator[SEP] identifier[o] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[Float] operator[SEP] { Keyword[return] Keyword[new] identifier[NumberValue] operator[SEP] Keyword[new] identifier[BigDecimal] operator[SEP] operator[SEP] identifier[Float] operator[SEP] identifier[o] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[String] operator[SEP] { Keyword[return] Keyword[new] identifier[StringValue] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[o] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[Date] operator[SEP] { Keyword[return] Keyword[new] identifier[DateValue] operator[SEP] operator[SEP] identifier[Date] operator[SEP] identifier[o] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[Boolean] operator[SEP] { Keyword[return] identifier[BooleanValue] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] identifier[Boolean] operator[SEP] identifier[o] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[o] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[NilValue] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[CommandExecutionException] operator[SEP] literal[String] operator[+] identifier[o] operator[+] literal[String] operator[SEP] operator[SEP] }
private JPanel getMainPanel() { if (mainPanel == null) { mainPanel = new JPanel(); mainPanel.setLayout(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); c.insets = new Insets(5, 5, 5, 5); c.fill = GridBagConstraints.HORIZONTAL; c.gridx = 0; c.gridy = 0; c.weightx = 0.0D; mainPanel.add(new JLabel("Host"), c); c.gridx = 1; c.weightx = 1.0D; mainPanel.add(getHostField(), c); c.gridx = 0; c.gridy = 1; c.weightx = 0.0D; mainPanel.add(new JLabel("User"), c); c.gridx = 1; c.weightx = 1.0D; mainPanel.add(getUserField(), c); c.gridx = 0; c.gridy = 2; c.weightx = 0.0D; mainPanel.add(new JLabel("Password"), c); c.gridx = 1; c.weightx = 1.0D; mainPanel.add(getPasswordField(), c); c.gridx = 0; c.gridy = 3; c.weightx = 1.0D; c.gridwidth = 2; mainPanel.add(getRememberPasswordCheckBox(), c); c.gridx = 0; c.gridy = 4; c.weightx = 1.0D; c.weighty = 1.0D; c.gridwidth = 2; mainPanel.add(new JPanel(), c); } return mainPanel; }
class class_name[name] begin[{] method[getMainPanel, return_type[type[JPanel]], modifier[private], parameter[]] begin[{] if[binary_operation[member[.mainPanel], ==, literal[null]]] begin[{] assign[member[.mainPanel], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JPanel, sub_type=None))] call[mainPanel.setLayout, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridBagLayout, sub_type=None))]] local_variable[type[GridBagConstraints], c] assign[member[c.insets], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Insets, sub_type=None))] assign[member[c.fill], member[GridBagConstraints.HORIZONTAL]] assign[member[c.gridx], literal[0]] assign[member[c.gridy], literal[0]] assign[member[c.weightx], literal[0.0D]] call[mainPanel.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Host")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), member[.c]]] assign[member[c.gridx], literal[1]] assign[member[c.weightx], literal[1.0D]] call[mainPanel.add, parameter[call[.getHostField, parameter[]], member[.c]]] assign[member[c.gridx], literal[0]] assign[member[c.gridy], literal[1]] assign[member[c.weightx], literal[0.0D]] call[mainPanel.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="User")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), member[.c]]] assign[member[c.gridx], literal[1]] assign[member[c.weightx], literal[1.0D]] call[mainPanel.add, parameter[call[.getUserField, parameter[]], member[.c]]] assign[member[c.gridx], literal[0]] assign[member[c.gridy], literal[2]] assign[member[c.weightx], literal[0.0D]] call[mainPanel.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Password")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JLabel, sub_type=None)), member[.c]]] assign[member[c.gridx], literal[1]] assign[member[c.weightx], literal[1.0D]] call[mainPanel.add, parameter[call[.getPasswordField, parameter[]], member[.c]]] assign[member[c.gridx], literal[0]] assign[member[c.gridy], literal[3]] assign[member[c.weightx], literal[1.0D]] assign[member[c.gridwidth], literal[2]] call[mainPanel.add, parameter[call[.getRememberPasswordCheckBox, parameter[]], member[.c]]] assign[member[c.gridx], literal[0]] assign[member[c.gridy], literal[4]] assign[member[c.weightx], literal[1.0D]] assign[member[c.weighty], literal[1.0D]] assign[member[c.gridwidth], literal[2]] call[mainPanel.add, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JPanel, sub_type=None)), member[.c]]] else begin[{] None end[}] return[member[.mainPanel]] end[}] END[}]
Keyword[private] identifier[JPanel] identifier[getMainPanel] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[mainPanel] operator[==] Other[null] operator[SEP] { identifier[mainPanel] operator[=] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] operator[SEP] identifier[mainPanel] operator[SEP] identifier[setLayout] operator[SEP] Keyword[new] identifier[GridBagLayout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[GridBagConstraints] identifier[c] operator[=] Keyword[new] identifier[GridBagConstraints] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[insets] operator[=] Keyword[new] identifier[Insets] operator[SEP] Other[5] , Other[5] , Other[5] , Other[5] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[fill] operator[=] identifier[GridBagConstraints] operator[SEP] identifier[HORIZONTAL] operator[SEP] identifier[c] operator[SEP] identifier[gridx] operator[=] Other[0] operator[SEP] identifier[c] operator[SEP] identifier[gridy] operator[=] Other[0] operator[SEP] identifier[c] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[mainPanel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] literal[String] operator[SEP] , identifier[c] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[gridx] operator[=] Other[1] operator[SEP] identifier[c] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[mainPanel] operator[SEP] identifier[add] operator[SEP] identifier[getHostField] operator[SEP] operator[SEP] , identifier[c] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[gridx] operator[=] Other[0] operator[SEP] identifier[c] operator[SEP] identifier[gridy] operator[=] Other[1] operator[SEP] identifier[c] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[mainPanel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] literal[String] operator[SEP] , identifier[c] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[gridx] operator[=] Other[1] operator[SEP] identifier[c] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[mainPanel] operator[SEP] identifier[add] operator[SEP] identifier[getUserField] operator[SEP] operator[SEP] , identifier[c] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[gridx] operator[=] Other[0] operator[SEP] identifier[c] operator[SEP] identifier[gridy] operator[=] Other[2] operator[SEP] identifier[c] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[mainPanel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JLabel] operator[SEP] literal[String] operator[SEP] , identifier[c] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[gridx] operator[=] Other[1] operator[SEP] identifier[c] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[mainPanel] operator[SEP] identifier[add] operator[SEP] identifier[getPasswordField] operator[SEP] operator[SEP] , identifier[c] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[gridx] operator[=] Other[0] operator[SEP] identifier[c] operator[SEP] identifier[gridy] operator[=] Other[3] operator[SEP] identifier[c] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[c] operator[SEP] identifier[gridwidth] operator[=] Other[2] operator[SEP] identifier[mainPanel] operator[SEP] identifier[add] operator[SEP] identifier[getRememberPasswordCheckBox] operator[SEP] operator[SEP] , identifier[c] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[gridx] operator[=] Other[0] operator[SEP] identifier[c] operator[SEP] identifier[gridy] operator[=] Other[4] operator[SEP] identifier[c] operator[SEP] identifier[weightx] operator[=] literal[Float] operator[SEP] identifier[c] operator[SEP] identifier[weighty] operator[=] literal[Float] operator[SEP] identifier[c] operator[SEP] identifier[gridwidth] operator[=] Other[2] operator[SEP] identifier[mainPanel] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[JPanel] operator[SEP] operator[SEP] , identifier[c] operator[SEP] operator[SEP] } Keyword[return] identifier[mainPanel] operator[SEP] }
public void add(final Class<?> clazz) { if (this.clazzes.contains(clazz)) { throw new IllegalArgumentException( "Only one class-instance per benchmark allowed"); } else { this.clazzes.add(clazz); } }
class class_name[name] begin[{] method[add, return_type[void], modifier[public], parameter[clazz]] begin[{] if[THIS[member[None.clazzes]call[None.contains, parameter[member[.clazz]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Only one class-instance per benchmark allowed")], 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[{] THIS[member[None.clazzes]call[None.add, parameter[member[.clazz]]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[add] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[clazzes] operator[SEP] identifier[contains] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[clazzes] operator[SEP] identifier[add] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] } }
public String getReplaced(String substitute, int start, int end) { int restLength = this.limit - end; StringBuilder builder = builder(null); builder.append(this.buffer, this.initialOffset, start); builder.append(substitute); builder.append(this.buffer, this.initialOffset + end, restLength); return builder.toString(); }
class class_name[name] begin[{] method[getReplaced, return_type[type[String]], modifier[public], parameter[substitute, start, end]] begin[{] local_variable[type[int], restLength] local_variable[type[StringBuilder], builder] call[builder.append, parameter[THIS[member[None.buffer]], THIS[member[None.initialOffset]], member[.start]]] call[builder.append, parameter[member[.substitute]]] call[builder.append, parameter[THIS[member[None.buffer]], binary_operation[THIS[member[None.initialOffset]], +, member[.end]], member[.restLength]]] return[call[builder.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getReplaced] operator[SEP] identifier[String] identifier[substitute] , Keyword[int] identifier[start] , Keyword[int] identifier[end] operator[SEP] { Keyword[int] identifier[restLength] operator[=] Keyword[this] operator[SEP] identifier[limit] operator[-] identifier[end] operator[SEP] identifier[StringBuilder] identifier[builder] operator[=] identifier[builder] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] Keyword[this] operator[SEP] identifier[buffer] , Keyword[this] operator[SEP] identifier[initialOffset] , identifier[start] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[substitute] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] Keyword[this] operator[SEP] identifier[buffer] , Keyword[this] operator[SEP] identifier[initialOffset] operator[+] identifier[end] , identifier[restLength] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public <S extends AbstractColumn<T>> S describedAs(String description) { setDescription(description); return (S) this; }
class class_name[name] begin[{] method[describedAs, return_type[type[S]], modifier[public], parameter[description]] begin[{] call[.setDescription, parameter[member[.description]]] return[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=S, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[S] Keyword[extends] identifier[AbstractColumn] operator[<] identifier[T] operator[>] operator[>] identifier[S] identifier[describedAs] operator[SEP] identifier[String] identifier[description] operator[SEP] { identifier[setDescription] operator[SEP] identifier[description] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[S] operator[SEP] Keyword[this] operator[SEP] }
final protected Collection common_values() { //TODO: make efficient ArrayList<Object> al = new ArrayList<Object>(); Enumeration vEnum = cache.getAllIds(); while (vEnum.hasMoreElements()) al.add(get(vEnum.nextElement())); return al; }
class class_name[name] begin[{] method[common_values, return_type[type[Collection]], modifier[final protected], parameter[]] begin[{] local_variable[type[ArrayList], al] local_variable[type[Enumeration], vEnum] while[call[vEnum.hasMoreElements, parameter[]]] begin[{] call[al.add, parameter[call[.get, parameter[call[vEnum.nextElement, parameter[]]]]]] end[}] return[member[.al]] end[}] END[}]
Keyword[final] Keyword[protected] identifier[Collection] identifier[common_values] operator[SEP] operator[SEP] { identifier[ArrayList] operator[<] identifier[Object] operator[>] identifier[al] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Enumeration] identifier[vEnum] operator[=] identifier[cache] operator[SEP] identifier[getAllIds] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[vEnum] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] identifier[al] operator[SEP] identifier[add] operator[SEP] identifier[get] operator[SEP] identifier[vEnum] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[al] operator[SEP] }