code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public void setThreshold(final double THRESHOLD) { if (Double.compare(THRESHOLD, minValue) >= 0 && Double.compare(THRESHOLD, maxValue) <= 0) { threshold = THRESHOLD; } else { if (THRESHOLD < niceMinValue) { threshold = niceMinValue; } if (THRESHOLD > niceMaxValue) { threshold = niceMaxValue; } } fireStateChanged(); }
class class_name[name] begin[{] method[setThreshold, return_type[void], modifier[public], parameter[THRESHOLD]] begin[{] if[binary_operation[binary_operation[call[Double.compare, parameter[member[.THRESHOLD], member[.minValue]]], >=, literal[0]], &&, binary_operation[call[Double.compare, parameter[member[.THRESHOLD], member[.maxValue]]], <=, literal[0]]]] begin[{] assign[member[.threshold], member[.THRESHOLD]] else begin[{] if[binary_operation[member[.THRESHOLD], <, member[.niceMinValue]]] begin[{] assign[member[.threshold], member[.niceMinValue]] else begin[{] None end[}] if[binary_operation[member[.THRESHOLD], >, member[.niceMaxValue]]] begin[{] assign[member[.threshold], member[.niceMaxValue]] else begin[{] None end[}] end[}] call[.fireStateChanged, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setThreshold] operator[SEP] Keyword[final] Keyword[double] identifier[THRESHOLD] operator[SEP] { Keyword[if] operator[SEP] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[THRESHOLD] , identifier[minValue] operator[SEP] operator[>=] Other[0] operator[&&] identifier[Double] operator[SEP] identifier[compare] operator[SEP] identifier[THRESHOLD] , identifier[maxValue] operator[SEP] operator[<=] Other[0] operator[SEP] { identifier[threshold] operator[=] identifier[THRESHOLD] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[THRESHOLD] operator[<] identifier[niceMinValue] operator[SEP] { identifier[threshold] operator[=] identifier[niceMinValue] operator[SEP] } Keyword[if] operator[SEP] identifier[THRESHOLD] operator[>] identifier[niceMaxValue] operator[SEP] { identifier[threshold] operator[=] identifier[niceMaxValue] operator[SEP] } } identifier[fireStateChanged] operator[SEP] operator[SEP] operator[SEP] }
public static void clearallLocalDBs() { for (final Map.Entry<MongoClient, Boolean> entry : localInstances.entrySet()) { for (final String dbName : entry.getKey().listDatabaseNames()) { entry.getKey().getDatabase(dbName).drop(); } } }
class class_name[name] begin[{] method[clearallLocalDBs, return_type[void], modifier[public static], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[MemberReference(member=dbName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDatabase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=drop, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=listDatabaseNames, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dbName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=localInstances, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MongoClient, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[clearallLocalDBs] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[MongoClient] , identifier[Boolean] operator[>] identifier[entry] operator[:] identifier[localInstances] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[dbName] operator[:] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[listDatabaseNames] operator[SEP] operator[SEP] operator[SEP] { identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[getDatabase] operator[SEP] identifier[dbName] operator[SEP] operator[SEP] identifier[drop] operator[SEP] operator[SEP] operator[SEP] } } }
public synchronized Collection<T> getAll() { List<T> all = new ArrayList<T>(size); for (T e = head; e != null; e = e.getNext()) { all.add(e); } return all; }
class class_name[name] begin[{] method[getAll, return_type[type[Collection]], modifier[synchronized public], parameter[]] begin[{] local_variable[type[List], all] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=all, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=head, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getNext, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None))]), label=None) return[member[.all]] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[Collection] operator[<] identifier[T] operator[>] identifier[getAll] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[T] operator[>] identifier[all] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[T] operator[>] operator[SEP] identifier[size] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[T] identifier[e] operator[=] identifier[head] operator[SEP] identifier[e] operator[!=] Other[null] operator[SEP] identifier[e] operator[=] identifier[e] operator[SEP] identifier[getNext] operator[SEP] operator[SEP] operator[SEP] { identifier[all] operator[SEP] identifier[add] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[all] operator[SEP] }
@Pure @SuppressWarnings({"checkstyle:returncount", "checkstyle:npathcomplexity"}) public static Class<?> forName(String name) throws ClassNotFoundException { if (name == null || "".equals(name) || "null".equals(name) //$NON-NLS-1$ //$NON-NLS-2$ || "void".equals(name)) { //$NON-NLS-1$ return void.class; } if ("boolean".equals(name)) { //$NON-NLS-1$ return boolean.class; } if ("byte".equals(name)) { //$NON-NLS-1$ return byte.class; } if ("char".equals(name)) { //$NON-NLS-1$ return char.class; } if ("double".equals(name)) { //$NON-NLS-1$ return double.class; } if ("float".equals(name)) { //$NON-NLS-1$ return float.class; } if ("int".equals(name)) { //$NON-NLS-1$ return int.class; } if ("long".equals(name)) { //$NON-NLS-1$ return long.class; } if ("short".equals(name)) { //$NON-NLS-1$ return short.class; } return Class.forName(name); }
class class_name[name] begin[{] method[forName, return_type[type[Class]], modifier[public static], parameter[name]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.name], ==, literal[null]], ||, literal[""]], ||, literal["null"]], ||, literal["void"]]] begin[{] return[VoidClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=None)] else begin[{] None end[}] if[literal["boolean"]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=boolean))] else begin[{] None end[}] if[literal["byte"]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=byte))] else begin[{] None end[}] if[literal["char"]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=char))] else begin[{] None end[}] if[literal["double"]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=double))] else begin[{] None end[}] if[literal["float"]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=float))] else begin[{] None end[}] if[literal["int"]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=int))] else begin[{] None end[}] if[literal["long"]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=long))] else begin[{] None end[}] if[literal["short"]] begin[{] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=short))] else begin[{] None end[}] return[call[Class.forName, parameter[member[.name]]]] end[}] END[}]
annotation[@] identifier[Pure] annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[forName] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] { Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] Keyword[void] operator[SEP] Keyword[class] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] Keyword[boolean] operator[SEP] Keyword[class] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] Keyword[byte] operator[SEP] Keyword[class] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] Keyword[char] operator[SEP] Keyword[class] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] Keyword[double] operator[SEP] Keyword[class] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] Keyword[float] operator[SEP] Keyword[class] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] Keyword[int] operator[SEP] Keyword[class] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] Keyword[long] operator[SEP] Keyword[class] operator[SEP] } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] Keyword[short] operator[SEP] Keyword[class] operator[SEP] } Keyword[return] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[name] operator[SEP] operator[SEP] }
public final void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; HttpServletResponse response = (HttpServletResponse) servletResponse; String localPath = request.getRequestURI().substring(request.getContextPath().length()); if (localPath.startsWith(requestProcessor.getUrlPrefix())) { requestProcessor.processRequest(request, response); return; } filterChain.doFilter(request, response); }
class class_name[name] begin[{] method[doFilter, return_type[void], modifier[final public], parameter[servletRequest, servletResponse, filterChain]] begin[{] local_variable[type[HttpServletRequest], request] local_variable[type[HttpServletResponse], response] local_variable[type[String], localPath] if[call[localPath.startsWith, parameter[call[requestProcessor.getUrlPrefix, parameter[]]]]] begin[{] call[requestProcessor.processRequest, parameter[member[.request], member[.response]]] return[None] else begin[{] None end[}] call[filterChain.doFilter, parameter[member[.request], member[.response]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[doFilter] operator[SEP] identifier[ServletRequest] identifier[servletRequest] , identifier[ServletResponse] identifier[servletResponse] , identifier[FilterChain] identifier[filterChain] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] { identifier[HttpServletRequest] identifier[request] operator[=] operator[SEP] identifier[HttpServletRequest] operator[SEP] identifier[servletRequest] operator[SEP] identifier[HttpServletResponse] identifier[response] operator[=] operator[SEP] identifier[HttpServletResponse] operator[SEP] identifier[servletResponse] operator[SEP] identifier[String] identifier[localPath] operator[=] identifier[request] operator[SEP] identifier[getRequestURI] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] identifier[request] operator[SEP] identifier[getContextPath] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[localPath] operator[SEP] identifier[startsWith] operator[SEP] identifier[requestProcessor] operator[SEP] identifier[getUrlPrefix] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[requestProcessor] operator[SEP] identifier[processRequest] operator[SEP] identifier[request] , identifier[response] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[filterChain] operator[SEP] identifier[doFilter] operator[SEP] identifier[request] , identifier[response] operator[SEP] operator[SEP] }
public static final FilterOperation mapFilterHintToOperation(FilterOperationHint hint) { for(int i = 0; i < FILTER_OPERATIONS.length; i++) { FilterOperation op = FILTER_OPERATIONS[i]; if(op.getOperationHint().equals(hint)) return op; } return null; }
class class_name[name] begin[{] method[mapFilterHintToOperation, return_type[type[FilterOperation]], modifier[final public static], parameter[hint]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=FILTER_OPERATIONS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=op)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FilterOperation, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=getOperationHint, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[MemberReference(member=hint, 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=ReturnStatement(expression=MemberReference(member=op, 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=FILTER_OPERATIONS, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] identifier[FilterOperation] identifier[mapFilterHintToOperation] operator[SEP] identifier[FilterOperationHint] identifier[hint] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[FILTER_OPERATIONS] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[FilterOperation] identifier[op] operator[=] identifier[FILTER_OPERATIONS] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[op] operator[SEP] identifier[getOperationHint] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[hint] operator[SEP] operator[SEP] Keyword[return] identifier[op] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static GenerationConfig getGenerationConfig(Boolean generateBuilders, Boolean includeAdditionalProperties, Boolean includeDynamicAccessors, Boolean useLongIntegers) { return new DefaultGenerationConfig() { @Override public boolean isGenerateBuilders() { // set config option by // overriding method if (generateBuilders != null) { return generateBuilders; } else { return true; } } @Override public boolean isIncludeAdditionalProperties() { if (includeAdditionalProperties != null) { return includeAdditionalProperties; } else { return false; } } @Override public boolean isIncludeDynamicAccessors() { if (includeDynamicAccessors != null) { return includeDynamicAccessors; } else { return false; } } @Override public boolean isUseLongIntegers() { if (useLongIntegers != null) { return useLongIntegers; } else { return super.isUseLongIntegers(); } } }; }
class class_name[name] begin[{] method[getGenerationConfig, return_type[type[GenerationConfig]], modifier[public static], parameter[generateBuilders, includeAdditionalProperties, includeDynamicAccessors, useLongIntegers]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=generateBuilders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=generateBuilders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], documentation=None, modifiers={'public'}, name=isGenerateBuilders, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=includeAdditionalProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=includeAdditionalProperties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], documentation=None, modifiers={'public'}, name=isIncludeAdditionalProperties, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=includeDynamicAccessors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=includeDynamicAccessors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], documentation=None, modifiers={'public'}, name=isIncludeDynamicAccessors, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=useLongIntegers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=SuperMethodInvocation(arguments=[], member=isUseLongIntegers, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=useLongIntegers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], documentation=None, modifiers={'public'}, name=isUseLongIntegers, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultGenerationConfig, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[GenerationConfig] identifier[getGenerationConfig] operator[SEP] identifier[Boolean] identifier[generateBuilders] , identifier[Boolean] identifier[includeAdditionalProperties] , identifier[Boolean] identifier[includeDynamicAccessors] , identifier[Boolean] identifier[useLongIntegers] operator[SEP] { Keyword[return] Keyword[new] identifier[DefaultGenerationConfig] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isGenerateBuilders] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[generateBuilders] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[generateBuilders] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } } annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isIncludeAdditionalProperties] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[includeAdditionalProperties] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[includeAdditionalProperties] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } } annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isIncludeDynamicAccessors] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[includeDynamicAccessors] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[includeDynamicAccessors] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } } annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isUseLongIntegers] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[useLongIntegers] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[useLongIntegers] operator[SEP] } Keyword[else] { Keyword[return] Keyword[super] operator[SEP] identifier[isUseLongIntegers] operator[SEP] operator[SEP] operator[SEP] } } } operator[SEP] }
@Nonnull public BugInstance addClassAndMethod(MethodGen methodGen, String sourceFile) { addClass(methodGen.getClassName()); addMethod(methodGen, sourceFile); if (!MemberUtils.isUserGenerated(methodGen)) { foundInAutogeneratedMethod(); } return this; }
class class_name[name] begin[{] method[addClassAndMethod, return_type[type[BugInstance]], modifier[public], parameter[methodGen, sourceFile]] begin[{] call[.addClass, parameter[call[methodGen.getClassName, parameter[]]]] call[.addMethod, parameter[member[.methodGen], member[.sourceFile]]] if[call[MemberUtils.isUserGenerated, parameter[member[.methodGen]]]] begin[{] call[.foundInAutogeneratedMethod, parameter[]] else begin[{] None end[}] return[THIS[]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] identifier[BugInstance] identifier[addClassAndMethod] operator[SEP] identifier[MethodGen] identifier[methodGen] , identifier[String] identifier[sourceFile] operator[SEP] { identifier[addClass] operator[SEP] identifier[methodGen] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addMethod] operator[SEP] identifier[methodGen] , identifier[sourceFile] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[MemberUtils] operator[SEP] identifier[isUserGenerated] operator[SEP] identifier[methodGen] operator[SEP] operator[SEP] { identifier[foundInAutogeneratedMethod] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static BinaryData toHawkularFormat(BasicMessage msg, InputStream extraData) { String msgJson = toHawkularFormat(msg); return new BinaryData(msgJson.getBytes(), extraData); }
class class_name[name] begin[{] method[toHawkularFormat, return_type[type[BinaryData]], modifier[public static], parameter[msg, extraData]] begin[{] local_variable[type[String], msgJson] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=msgJson, selectors=[], type_arguments=None), MemberReference(member=extraData, 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=BinaryData, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[BinaryData] identifier[toHawkularFormat] operator[SEP] identifier[BasicMessage] identifier[msg] , identifier[InputStream] identifier[extraData] operator[SEP] { identifier[String] identifier[msgJson] operator[=] identifier[toHawkularFormat] operator[SEP] identifier[msg] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[BinaryData] operator[SEP] identifier[msgJson] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] , identifier[extraData] operator[SEP] operator[SEP] }
@Override public List<V> load(List<SortProperty> sorting) { return load(getFirst(), getPageSize(), sorting); }
class class_name[name] begin[{] method[load, return_type[type[List]], modifier[public], parameter[sorting]] begin[{] return[call[.load, parameter[call[.getFirst, parameter[]], call[.getPageSize, parameter[]], member[.sorting]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[V] operator[>] identifier[load] operator[SEP] identifier[List] operator[<] identifier[SortProperty] operator[>] identifier[sorting] operator[SEP] { Keyword[return] identifier[load] operator[SEP] identifier[getFirst] operator[SEP] operator[SEP] , identifier[getPageSize] operator[SEP] operator[SEP] , identifier[sorting] operator[SEP] operator[SEP] }
public void execute() throws ActivityException { EventWaitInstance received = registerWaitEvents(false, true); if (received!=null) { setReturnCodeAndExitStatus(received.getCompletionCode()); processMessage(getExternalEventInstanceDetails(received.getMessageDocumentId())); boolean toFinish = handleCompletionCode(); if (toFinish && exitStatus==null) exitStatus = WorkStatus.STATUS_COMPLETED; } else { try { // set timeouts int timeout = getTimeoutSeconds(); if (timeout > 0) { loginfo("set activity timeout as " + timeout + " seconds"); InternalEvent delayMsg = InternalEvent.createActivityDelayMessage(getActivityInstance(), getMasterRequestId()); getEngine().sendDelayedInternalEvent(delayMsg, timeout, ScheduledEvent.INTERNAL_EVENT_PREFIX+getActivityInstanceId()+"timeout", false); } } catch (MdwException e) { throw new ActivityException(0, "Failed to set timeout", e); } } }
class class_name[name] begin[{] method[execute, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[EventWaitInstance], received] if[binary_operation[member[.received], !=, literal[null]]] begin[{] call[.setReturnCodeAndExitStatus, parameter[call[received.getCompletionCode, parameter[]]]] call[.processMessage, parameter[call[.getExternalEventInstanceDetails, parameter[call[received.getMessageDocumentId, parameter[]]]]]] local_variable[type[boolean], toFinish] if[binary_operation[member[.toFinish], &&, binary_operation[member[.exitStatus], ==, literal[null]]]] begin[{] assign[member[.exitStatus], member[WorkStatus.STATUS_COMPLETED]] else begin[{] None end[}] else begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getTimeoutSeconds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=timeout)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="set activity timeout as "), operandr=MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" seconds"), operator=+)], member=loginfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getActivityInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getMasterRequestId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=createActivityDelayMessage, postfix_operators=[], prefix_operators=[], qualifier=InternalEvent, selectors=[], type_arguments=None), name=delayMsg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InternalEvent, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getEngine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=delayMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=timeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=INTERNAL_EVENT_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=ScheduledEvent, selectors=[]), operandr=MethodInvocation(arguments=[], member=getActivityInstanceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="timeout"), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=sendDelayedInternalEvent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to set timeout"), 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=ActivityException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MdwException']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[execute] operator[SEP] operator[SEP] Keyword[throws] identifier[ActivityException] { identifier[EventWaitInstance] identifier[received] operator[=] identifier[registerWaitEvents] operator[SEP] literal[boolean] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[received] operator[!=] Other[null] operator[SEP] { identifier[setReturnCodeAndExitStatus] operator[SEP] identifier[received] operator[SEP] identifier[getCompletionCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[processMessage] operator[SEP] identifier[getExternalEventInstanceDetails] operator[SEP] identifier[received] operator[SEP] identifier[getMessageDocumentId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[toFinish] operator[=] identifier[handleCompletionCode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[toFinish] operator[&&] identifier[exitStatus] operator[==] Other[null] operator[SEP] identifier[exitStatus] operator[=] identifier[WorkStatus] operator[SEP] identifier[STATUS_COMPLETED] operator[SEP] } Keyword[else] { Keyword[try] { Keyword[int] identifier[timeout] operator[=] identifier[getTimeoutSeconds] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[timeout] operator[>] Other[0] operator[SEP] { identifier[loginfo] operator[SEP] literal[String] operator[+] identifier[timeout] operator[+] literal[String] operator[SEP] operator[SEP] identifier[InternalEvent] identifier[delayMsg] operator[=] identifier[InternalEvent] operator[SEP] identifier[createActivityDelayMessage] operator[SEP] identifier[getActivityInstance] operator[SEP] operator[SEP] , identifier[getMasterRequestId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getEngine] operator[SEP] operator[SEP] operator[SEP] identifier[sendDelayedInternalEvent] operator[SEP] identifier[delayMsg] , identifier[timeout] , identifier[ScheduledEvent] operator[SEP] identifier[INTERNAL_EVENT_PREFIX] operator[+] identifier[getActivityInstanceId] operator[SEP] operator[SEP] operator[+] literal[String] , literal[boolean] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[MdwException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ActivityException] operator[SEP] Other[0] , literal[String] , identifier[e] operator[SEP] operator[SEP] } } }
protected boolean reportHeartBeat(DatanodeID node) { if (node != null && shouldUpdateNodes()) { reportRegister(node); synchronized(this) { if (outStandingHeartbeats.remove(node)) { outStandingReports.add(node); return true; } } } return false; }
class class_name[name] begin[{] method[reportHeartBeat, return_type[type[boolean]], modifier[protected], parameter[node]] begin[{] if[binary_operation[binary_operation[member[.node], !=, literal[null]], &&, call[.shouldUpdateNodes, parameter[]]]] begin[{] call[.reportRegister, parameter[member[.node]]] SYNCHRONIZED[THIS[]] BEGIN[{] if[call[outStandingHeartbeats.remove, parameter[member[.node]]]] begin[{] call[outStandingReports.add, parameter[member[.node]]] return[literal[true]] else begin[{] None end[}] END[}] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[reportHeartBeat] operator[SEP] identifier[DatanodeID] identifier[node] operator[SEP] { Keyword[if] operator[SEP] identifier[node] operator[!=] Other[null] operator[&&] identifier[shouldUpdateNodes] operator[SEP] operator[SEP] operator[SEP] { identifier[reportRegister] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[outStandingHeartbeats] operator[SEP] identifier[remove] operator[SEP] identifier[node] operator[SEP] operator[SEP] { identifier[outStandingReports] operator[SEP] identifier[add] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } } Keyword[return] literal[boolean] operator[SEP] }
private String toLabel(final TimeUnit unit) { switch(unit) { case DAYS: return "day"; case HOURS: return "hour"; case MINUTES: return "minute"; case SECONDS: return "second"; case MILLISECONDS: return "ms"; case MICROSECONDS: return "us"; case NANOSECONDS: return "ns"; default: return ""; } }
class class_name[name] begin[{] method[toLabel, return_type[type[String]], modifier[private], parameter[unit]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['DAYS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="day"), label=None)]), SwitchStatementCase(case=['HOURS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="hour"), label=None)]), SwitchStatementCase(case=['MINUTES'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="minute"), label=None)]), SwitchStatementCase(case=['SECONDS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="second"), label=None)]), SwitchStatementCase(case=['MILLISECONDS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ms"), label=None)]), SwitchStatementCase(case=['MICROSECONDS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="us"), label=None)]), SwitchStatementCase(case=['NANOSECONDS'], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ns"), label=None)]), SwitchStatementCase(case=[], statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), label=None)])], expression=MemberReference(member=unit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[private] identifier[String] identifier[toLabel] operator[SEP] Keyword[final] identifier[TimeUnit] identifier[unit] operator[SEP] { Keyword[switch] operator[SEP] identifier[unit] operator[SEP] { Keyword[case] identifier[DAYS] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[HOURS] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[MINUTES] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[SECONDS] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[MILLISECONDS] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[MICROSECONDS] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[case] identifier[NANOSECONDS] operator[:] Keyword[return] literal[String] operator[SEP] Keyword[default] operator[:] Keyword[return] literal[String] operator[SEP] } }
protected void doWrite(HttpServletRequest request, HttpServletResponse response, String tunnelUUID) throws GuacamoleException { GuacamoleTunnel tunnel = getTunnel(tunnelUUID); // We still need to set the content type to avoid the default of // text/html, as such a content type would cause some browsers to // attempt to parse the result, even though the JavaScript client // does not explicitly request such parsing. response.setContentType("application/octet-stream"); response.setHeader("Cache-Control", "no-cache"); response.setContentLength(0); // Send data try { // Get writer from tunnel GuacamoleWriter writer = tunnel.acquireWriter(); // Get input reader for HTTP stream Reader input = new InputStreamReader( request.getInputStream(), "UTF-8"); // Transfer data from input stream to tunnel output, ensuring // input is always closed try { // Buffer int length; char[] buffer = new char[8192]; // Transfer data using buffer while (tunnel.isOpen() && (length = input.read(buffer, 0, buffer.length)) != -1) writer.write(buffer, 0, length); } // Close input stream in all cases finally { input.close(); } } catch (GuacamoleConnectionClosedException e) { logger.debug("Connection to guacd closed.", e); } catch (IOException e) { // Deregister and close deregisterTunnel(tunnel); tunnel.close(); throw new GuacamoleServerException("I/O Error sending data to server: " + e.getMessage(), e); } finally { tunnel.releaseWriter(); } }
class class_name[name] begin[{] method[doWrite, return_type[void], modifier[protected], parameter[request, response, tunnelUUID]] begin[{] local_variable[type[GuacamoleTunnel], tunnel] call[response.setContentType, parameter[literal["application/octet-stream"]]] call[response.setHeader, parameter[literal["Cache-Control"], literal["no-cache"]]] call[response.setContentLength, parameter[literal[0]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=acquireWriter, postfix_operators=[], prefix_operators=[], qualifier=tunnel, selectors=[], type_arguments=None), name=writer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=GuacamoleWriter, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamReader, sub_type=None)), name=input)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Reader, sub_type=None)), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=length)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8192)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=char)), name=buffer)], modifiers=set(), type=BasicType(dimensions=[None], name=char)), WhileStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None), condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isOpen, postfix_operators=[], prefix_operators=[], qualifier=tunnel, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), operator=&&), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), label=None)], label=None, resources=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Connection to guacd closed."), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['GuacamoleConnectionClosedException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tunnel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deregisterTunnel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=tunnel, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="I/O Error sending data to server: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GuacamoleServerException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=releaseWriter, postfix_operators=[], prefix_operators=[], qualifier=tunnel, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[doWrite] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , identifier[String] identifier[tunnelUUID] operator[SEP] Keyword[throws] identifier[GuacamoleException] { identifier[GuacamoleTunnel] identifier[tunnel] operator[=] identifier[getTunnel] operator[SEP] identifier[tunnelUUID] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setContentType] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setHeader] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setContentLength] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[try] { identifier[GuacamoleWriter] identifier[writer] operator[=] identifier[tunnel] operator[SEP] identifier[acquireWriter] operator[SEP] operator[SEP] operator[SEP] identifier[Reader] identifier[input] operator[=] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[request] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] Keyword[try] { Keyword[int] identifier[length] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[buffer] operator[=] Keyword[new] Keyword[char] operator[SEP] Other[8192] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[tunnel] operator[SEP] identifier[isOpen] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[length] operator[=] identifier[input] operator[SEP] identifier[read] operator[SEP] identifier[buffer] , Other[0] , identifier[buffer] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] identifier[writer] operator[SEP] identifier[write] operator[SEP] identifier[buffer] , Other[0] , identifier[length] operator[SEP] operator[SEP] } Keyword[finally] { identifier[input] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[GuacamoleConnectionClosedException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[deregisterTunnel] operator[SEP] identifier[tunnel] operator[SEP] operator[SEP] identifier[tunnel] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[GuacamoleServerException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[tunnel] operator[SEP] identifier[releaseWriter] operator[SEP] operator[SEP] operator[SEP] } }
protected Link extractLink(Object element, LinkRelation rel) { return new Link(element.toString(), rel); }
class class_name[name] begin[{] method[extractLink, return_type[type[Link]], modifier[protected], parameter[element, rel]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[], type_arguments=None), MemberReference(member=rel, 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=Link, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[Link] identifier[extractLink] operator[SEP] identifier[Object] identifier[element] , identifier[LinkRelation] identifier[rel] operator[SEP] { Keyword[return] Keyword[new] identifier[Link] operator[SEP] identifier[element] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[rel] operator[SEP] operator[SEP] }
public static String getInvalidFileSizeMessage(final long maxFileSize) { return String.format(I18nUtilities.format(null, InternalMessages.DEFAULT_VALIDATION_ERROR_FILE_WRONG_SIZE), FileUtil.readableFileSize(maxFileSize)); }
class class_name[name] begin[{] method[getInvalidFileSizeMessage, return_type[type[String]], modifier[public static], parameter[maxFileSize]] begin[{] return[call[String.format, parameter[call[I18nUtilities.format, parameter[literal[null], member[InternalMessages.DEFAULT_VALIDATION_ERROR_FILE_WRONG_SIZE]]], call[FileUtil.readableFileSize, parameter[member[.maxFileSize]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getInvalidFileSizeMessage] operator[SEP] Keyword[final] Keyword[long] identifier[maxFileSize] operator[SEP] { Keyword[return] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[I18nUtilities] operator[SEP] identifier[format] operator[SEP] Other[null] , identifier[InternalMessages] operator[SEP] identifier[DEFAULT_VALIDATION_ERROR_FILE_WRONG_SIZE] operator[SEP] , identifier[FileUtil] operator[SEP] identifier[readableFileSize] operator[SEP] identifier[maxFileSize] operator[SEP] operator[SEP] operator[SEP] }
public static String getPackageResource(Class<?> type, String resourceName) { StringBuilder builder = new StringBuilder(); builder.append(type.getPackage().getName().replace('.', '/')); if(resourceName.charAt(0) != '/') { builder.append('/'); } builder.append(resourceName); return builder.toString(); }
class class_name[name] begin[{] method[getPackageResource, return_type[type[String]], modifier[public static], parameter[type, resourceName]] begin[{] local_variable[type[StringBuilder], builder] call[builder.append, parameter[call[type.getPackage, parameter[]]]] if[binary_operation[call[resourceName.charAt, parameter[literal[0]]], !=, literal['/']]] begin[{] call[builder.append, parameter[literal['/']]] else begin[{] None end[}] call[builder.append, parameter[member[.resourceName]]] return[call[builder.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getPackageResource] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] , identifier[String] identifier[resourceName] operator[SEP] { identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[type] operator[SEP] identifier[getPackage] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resourceName] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[!=] literal[String] operator[SEP] { identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[resourceName] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public DatePickerNumberOfMonths getNumberOfMonths() { IComplexOption numberOfMonths = getComplexOption("numberOfMonths"); if (numberOfMonths != null && numberOfMonths instanceof DatePickerNumberOfMonths) { return (DatePickerNumberOfMonths) numberOfMonths; } return new DatePickerNumberOfMonths(new Short("1")); }
class class_name[name] begin[{] method[getNumberOfMonths, return_type[type[DatePickerNumberOfMonths]], modifier[public], parameter[]] begin[{] local_variable[type[IComplexOption], numberOfMonths] if[binary_operation[binary_operation[member[.numberOfMonths], !=, literal[null]], &&, binary_operation[member[.numberOfMonths], instanceof, type[DatePickerNumberOfMonths]]]] begin[{] return[Cast(expression=MemberReference(member=numberOfMonths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DatePickerNumberOfMonths, sub_type=None))] else begin[{] None end[}] return[ClassCreator(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Short, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatePickerNumberOfMonths, sub_type=None))] end[}] END[}]
Keyword[public] identifier[DatePickerNumberOfMonths] identifier[getNumberOfMonths] operator[SEP] operator[SEP] { identifier[IComplexOption] identifier[numberOfMonths] operator[=] identifier[getComplexOption] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numberOfMonths] operator[!=] Other[null] operator[&&] identifier[numberOfMonths] Keyword[instanceof] identifier[DatePickerNumberOfMonths] operator[SEP] { Keyword[return] operator[SEP] identifier[DatePickerNumberOfMonths] operator[SEP] identifier[numberOfMonths] operator[SEP] } Keyword[return] Keyword[new] identifier[DatePickerNumberOfMonths] operator[SEP] Keyword[new] identifier[Short] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] }
private void a2(StringBuilder sb, int x) { if (x < 10) { sb.append('0'); } sb.append(x); }
class class_name[name] begin[{] method[a2, return_type[void], modifier[private], parameter[sb, x]] begin[{] if[binary_operation[member[.x], <, literal[10]]] begin[{] call[sb.append, parameter[literal['0']]] else begin[{] None end[}] call[sb.append, parameter[member[.x]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[a2] operator[SEP] identifier[StringBuilder] identifier[sb] , Keyword[int] identifier[x] operator[SEP] { Keyword[if] operator[SEP] identifier[x] operator[<] Other[10] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[x] operator[SEP] operator[SEP] }
@Exported public int getBusyExecutors() { int r=0; for (Node n : getNodes()) { Computer c = n.toComputer(); if(c!=null && c.isOnline()) r += c.countBusy(); } return r; }
class class_name[name] begin[{] method[getBusyExecutors, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[int], r] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=toComputer, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Computer, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isOnline, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=countBusy, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None)), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getNodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=n)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None))), label=None) return[member[.r]] end[}] END[}]
annotation[@] identifier[Exported] Keyword[public] Keyword[int] identifier[getBusyExecutors] operator[SEP] operator[SEP] { Keyword[int] identifier[r] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Node] identifier[n] operator[:] identifier[getNodes] operator[SEP] operator[SEP] operator[SEP] { identifier[Computer] identifier[c] operator[=] identifier[n] operator[SEP] identifier[toComputer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[!=] Other[null] operator[&&] identifier[c] operator[SEP] identifier[isOnline] operator[SEP] operator[SEP] operator[SEP] identifier[r] operator[+=] identifier[c] operator[SEP] identifier[countBusy] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[r] operator[SEP] }
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case VALUES: return isSetValues(); case NULLS: return isSetNulls(); } throw new IllegalStateException(); }
class class_name[name] begin[{] method[isSet, return_type[type[boolean]], modifier[public], parameter[field]] begin[{] if[binary_operation[member[.field], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] SwitchStatement(cases=[SwitchStatementCase(case=['VALUES'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=isSetValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['NULLS'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=isSetNulls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isSet] operator[SEP] identifier[_Fields] identifier[field] operator[SEP] { Keyword[if] operator[SEP] identifier[field] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } Keyword[switch] operator[SEP] identifier[field] operator[SEP] { Keyword[case] identifier[VALUES] operator[:] Keyword[return] identifier[isSetValues] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[NULLS] operator[:] Keyword[return] identifier[isSetNulls] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] operator[SEP] operator[SEP] }
public UserListing getAllUsersByJobView(JobView jobViewParam) { if(this.serviceTicket != null && jobViewParam != null) { jobViewParam.setServiceTicket(this.serviceTicket); } try { return new UserListing(this.postJson( jobViewParam, WS.Path.User.Version1.getAllUsersByJobView())); } catch (JSONException jsonExcept) { throw new FluidClientException(jsonExcept.getMessage(), FluidClientException.ErrorCode.JSON_PARSING); } }
class class_name[name] begin[{] method[getAllUsersByJobView, return_type[type[UserListing]], modifier[public], parameter[jobViewParam]] begin[{] if[binary_operation[binary_operation[THIS[member[None.serviceTicket]], !=, literal[null]], &&, binary_operation[member[.jobViewParam], !=, literal[null]]]] begin[{] call[jobViewParam.setServiceTicket, parameter[THIS[member[None.serviceTicket]]]] else begin[{] None end[}] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=jobViewParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getAllUsersByJobView, postfix_operators=[], prefix_operators=[], qualifier=WS.Path.User.Version1, selectors=[], type_arguments=None)], member=postJson, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UserListing, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=jsonExcept, selectors=[], type_arguments=None), MemberReference(member=JSON_PARSING, postfix_operators=[], prefix_operators=[], qualifier=FluidClientException.ErrorCode, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FluidClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=jsonExcept, types=['JSONException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[UserListing] identifier[getAllUsersByJobView] operator[SEP] identifier[JobView] identifier[jobViewParam] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[serviceTicket] operator[!=] Other[null] operator[&&] identifier[jobViewParam] operator[!=] Other[null] operator[SEP] { identifier[jobViewParam] operator[SEP] identifier[setServiceTicket] operator[SEP] Keyword[this] operator[SEP] identifier[serviceTicket] operator[SEP] operator[SEP] } Keyword[try] { Keyword[return] Keyword[new] identifier[UserListing] operator[SEP] Keyword[this] operator[SEP] identifier[postJson] operator[SEP] identifier[jobViewParam] , identifier[WS] operator[SEP] identifier[Path] operator[SEP] identifier[User] operator[SEP] identifier[Version1] operator[SEP] identifier[getAllUsersByJobView] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JSONException] identifier[jsonExcept] operator[SEP] { Keyword[throw] Keyword[new] identifier[FluidClientException] operator[SEP] identifier[jsonExcept] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[FluidClientException] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[JSON_PARSING] operator[SEP] operator[SEP] } }
@GwtIncompatible // TODO public static ListeningExecutorService listeningDecorator(ExecutorService delegate) { return (delegate instanceof ListeningExecutorService) ? (ListeningExecutorService) delegate : (delegate instanceof ScheduledExecutorService) ? new ScheduledListeningDecorator((ScheduledExecutorService) delegate) : new ListeningDecorator(delegate); }
class class_name[name] begin[{] method[listeningDecorator, return_type[type[ListeningExecutorService]], modifier[public static], parameter[delegate]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ListeningExecutorService, sub_type=None), operator=instanceof), if_false=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ScheduledExecutorService, sub_type=None), operator=instanceof), if_false=ClassCreator(arguments=[MemberReference(member=delegate, 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=ListeningDecorator, sub_type=None)), if_true=ClassCreator(arguments=[Cast(expression=MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ScheduledExecutorService, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ScheduledListeningDecorator, sub_type=None))), if_true=Cast(expression=MemberReference(member=delegate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ListeningExecutorService, sub_type=None)))] end[}] END[}]
annotation[@] identifier[GwtIncompatible] Keyword[public] Keyword[static] identifier[ListeningExecutorService] identifier[listeningDecorator] operator[SEP] identifier[ExecutorService] identifier[delegate] operator[SEP] { Keyword[return] operator[SEP] identifier[delegate] Keyword[instanceof] identifier[ListeningExecutorService] operator[SEP] operator[?] operator[SEP] identifier[ListeningExecutorService] operator[SEP] identifier[delegate] operator[:] operator[SEP] identifier[delegate] Keyword[instanceof] identifier[ScheduledExecutorService] operator[SEP] operator[?] Keyword[new] identifier[ScheduledListeningDecorator] operator[SEP] operator[SEP] identifier[ScheduledExecutorService] operator[SEP] identifier[delegate] operator[SEP] operator[:] Keyword[new] identifier[ListeningDecorator] operator[SEP] identifier[delegate] operator[SEP] operator[SEP] }
@Override public void readFragmentFrom(MwsReader r) { payment = r.read("Payment", Money.class); paymentMethod = r.read("PaymentMethod", String.class); }
class class_name[name] begin[{] method[readFragmentFrom, return_type[void], modifier[public], parameter[r]] begin[{] assign[member[.payment], call[r.read, parameter[literal["Payment"], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Money, sub_type=None))]]] assign[member[.paymentMethod], call[r.read, parameter[literal["PaymentMethod"], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[readFragmentFrom] operator[SEP] identifier[MwsReader] identifier[r] operator[SEP] { identifier[payment] operator[=] identifier[r] operator[SEP] identifier[read] operator[SEP] literal[String] , identifier[Money] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[paymentMethod] operator[=] identifier[r] operator[SEP] identifier[read] operator[SEP] literal[String] , identifier[String] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public Map<String, UserGroup> getUserGroups(LDAPConnection ldapConnection) throws GuacamoleException { // Do not return any user groups if base DN is not specified String groupBaseDN = confService.getGroupBaseDN(); if (groupBaseDN == null) return Collections.emptyMap(); // Retrieve all visible user groups which are not guacConfigGroups Collection<String> attributes = confService.getGroupNameAttributes(); List<LDAPEntry> results = queryService.search( ldapConnection, groupBaseDN, getGroupSearchFilter(), attributes, null ); // Convert retrieved user groups to map of identifier to Guacamole // user group object return queryService.asMap(results, entry -> { // Translate entry into UserGroup object having proper identifier String name = queryService.getIdentifier(entry, attributes); if (name != null) return new SimpleUserGroup(name); // Ignore user groups which lack a name attribute logger.debug("User group \"{}\" is missing a name attribute " + "and will be ignored.", entry.getDN()); return null; }); }
class class_name[name] begin[{] method[getUserGroups, return_type[type[Map]], modifier[public], parameter[ldapConnection]] begin[{] local_variable[type[String], groupBaseDN] if[binary_operation[member[.groupBaseDN], ==, literal[null]]] begin[{] return[call[Collections.emptyMap, parameter[]]] else begin[{] None end[}] local_variable[type[Collection], attributes] local_variable[type[List], results] return[call[queryService.asMap, parameter[member[.results], LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=attributes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=queryService, 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=ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SimpleUserGroup, sub_type=None)), label=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="User group \"{}\" is missing a name attribute "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="and will be ignored."), operator=+), MethodInvocation(arguments=[], member=getDN, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], parameters=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[UserGroup] operator[>] identifier[getUserGroups] operator[SEP] identifier[LDAPConnection] identifier[ldapConnection] operator[SEP] Keyword[throws] identifier[GuacamoleException] { identifier[String] identifier[groupBaseDN] operator[=] identifier[confService] operator[SEP] identifier[getGroupBaseDN] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[groupBaseDN] operator[==] Other[null] operator[SEP] Keyword[return] identifier[Collections] operator[SEP] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[attributes] operator[=] identifier[confService] operator[SEP] identifier[getGroupNameAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[LDAPEntry] operator[>] identifier[results] operator[=] identifier[queryService] operator[SEP] identifier[search] operator[SEP] identifier[ldapConnection] , identifier[groupBaseDN] , identifier[getGroupSearchFilter] operator[SEP] operator[SEP] , identifier[attributes] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[queryService] operator[SEP] identifier[asMap] operator[SEP] identifier[results] , identifier[entry] operator[->] { identifier[String] identifier[name] operator[=] identifier[queryService] operator[SEP] identifier[getIdentifier] operator[SEP] identifier[entry] , identifier[attributes] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[!=] Other[null] operator[SEP] Keyword[return] Keyword[new] identifier[SimpleUserGroup] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] literal[String] , identifier[entry] operator[SEP] identifier[getDN] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } operator[SEP] operator[SEP] }
private void executeInParallel(Collection<Object> objList, String description, final Callback callback) { SimultaneousExecutor executor = new SimultaneousExecutor(threadsPerCpu, getClass(), description); for(final Object obj : objList) { executor.execute(() -> callback.call(obj)); } try { executor.awaitSuccessfulCompletion(); } catch(Exception e) { throw new RuntimeException(e); } }
class class_name[name] begin[{] method[executeInParallel, return_type[void], modifier[private], parameter[objList, description, callback]] begin[{] local_variable[type[SimultaneousExecutor], executor] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=call, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), parameters=[])], member=execute, postfix_operators=[], prefix_operators=[], qualifier=executor, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=objList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=obj)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=awaitSuccessfulCompletion, postfix_operators=[], prefix_operators=[], qualifier=executor, 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[executeInParallel] operator[SEP] identifier[Collection] operator[<] identifier[Object] operator[>] identifier[objList] , identifier[String] identifier[description] , Keyword[final] identifier[Callback] identifier[callback] operator[SEP] { identifier[SimultaneousExecutor] identifier[executor] operator[=] Keyword[new] identifier[SimultaneousExecutor] operator[SEP] identifier[threadsPerCpu] , identifier[getClass] operator[SEP] operator[SEP] , identifier[description] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Object] identifier[obj] operator[:] identifier[objList] operator[SEP] { identifier[executor] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[callback] operator[SEP] identifier[call] operator[SEP] identifier[obj] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[executor] operator[SEP] identifier[awaitSuccessfulCompletion] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public static void hash(@Nonnull final InstructionGroup group, @Nonnull final String className) { final InstructionGroupHasher groupHasher = new InstructionGroupHasher(group, className); final String name = groupHasher.hashAndGetName(); group.setName(name); }
class class_name[name] begin[{] method[hash, return_type[void], modifier[public static], parameter[group, className]] begin[{] local_variable[type[InstructionGroupHasher], groupHasher] local_variable[type[String], name] call[group.setName, parameter[member[.name]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[hash] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[InstructionGroup] identifier[group] , annotation[@] identifier[Nonnull] Keyword[final] identifier[String] identifier[className] operator[SEP] { Keyword[final] identifier[InstructionGroupHasher] identifier[groupHasher] operator[=] Keyword[new] identifier[InstructionGroupHasher] operator[SEP] identifier[group] , identifier[className] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[=] identifier[groupHasher] operator[SEP] identifier[hashAndGetName] operator[SEP] operator[SEP] operator[SEP] identifier[group] operator[SEP] identifier[setName] operator[SEP] identifier[name] operator[SEP] operator[SEP] }
private static boolean analyse500Response(final String content) { if (content.contains("error") && content.contains("{not_found, missing_named_view}")) { LOGGER.debug("Design document not found, error is {}", content); return false; } if (content.contains("error") && content.contains("\"badarg\"")) { LOGGER.debug("Malformed view query"); return false; } return true; }
class class_name[name] begin[{] method[analyse500Response, return_type[type[boolean]], modifier[private static], parameter[content]] begin[{] if[binary_operation[call[content.contains, parameter[literal["error"]]], &&, call[content.contains, parameter[literal["{not_found, missing_named_view}"]]]]] begin[{] call[LOGGER.debug, parameter[literal["Design document not found, error is {}"], member[.content]]] return[literal[false]] else begin[{] None end[}] if[binary_operation[call[content.contains, parameter[literal["error"]]], &&, call[content.contains, parameter[literal["\"badarg\""]]]]] begin[{] call[LOGGER.debug, parameter[literal["Malformed view query"]]] return[literal[false]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[analyse500Response] operator[SEP] Keyword[final] identifier[String] identifier[content] operator[SEP] { Keyword[if] operator[SEP] identifier[content] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[content] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[content] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[content] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[content] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
@Override public void merge(JMSConnectionFactoryDefinition annotation, Class<?> instanceClass, Member member) throws InjectionException { if (member != null) { // ConnectionFactoryDefinition is a class-level annotation only. throw new IllegalArgumentException(member.toString()); } interfaceName = mergeAnnotationValue(interfaceName, isXmlInterfaceNameSet, annotation.interfaceName(), JMSConnectionFactoryProperties.INTERFACE_NAME.getAnnotationKey(), JMSResourceDefinitionConstants.JMS_CONNECTION_FACTORY_INTERFACE); className = mergeAnnotationValue(className, isXmlClassNameSet, annotation.className(), JMSConnectionFactoryProperties.CLASS_NAME.getAnnotationKey(), ""); resourceAdapter = mergeAnnotationValue(resourceAdapter, isXmlResourceAdapterSet, annotation.resourceAdapter(), JMSConnectionFactoryProperties.RESOURCE_ADAPTER.getAnnotationKey(), JMSResourceDefinitionConstants.DEFAULT_JMS_RESOURCE_ADAPTER); user = mergeAnnotationValue(user, isXMLUserSet, annotation.user(), JMSConnectionFactoryProperties.USER.getAnnotationKey(), ""); password = mergeAnnotationValue(password, isXmlPasswordSet, annotation.password(), JMSConnectionFactoryProperties.PASSWORD.getAnnotationKey(), ""); clientId = mergeAnnotationValue(clientId, isXmlClientIdSet, annotation.clientId(), JMSConnectionFactoryProperties.CLIENT_ID.getAnnotationKey(), ""); properties = mergeAnnotationProperties(properties, xmlProperties, annotation.properties()); transactional = mergeAnnotationBoolean(transactional, isXmlTransactionalSet, annotation.transactional(), JMSConnectionFactoryProperties.TRANSACTIONAL.getAnnotationKey(), JMSResourceDefinitionConstants.DEFAULT_TRANSACTIONAL_VALUE); description = mergeAnnotationValue(description, isXmlDescriptionSet, annotation.description(), JMSConnectionFactoryProperties.DESCRIPTION.getAnnotationKey(), ""); // d662109 maxPoolSize = mergeAnnotationInteger(maxPoolSize, isXmlMaxPoolSizeSet, annotation.maxPoolSize(), JMSConnectionFactoryProperties.MAX_POOL_SIZE.getAnnotationKey(), -1, null); minPoolSize = mergeAnnotationInteger(minPoolSize, isXmlMinPoolSizeSet, annotation.minPoolSize(), JMSConnectionFactoryProperties.MIN_POOL_SIZE.getAnnotationKey(), -1, null); }
class class_name[name] begin[{] method[merge, return_type[void], modifier[public], parameter[annotation, instanceClass, member]] begin[{] if[binary_operation[member[.member], !=, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=member, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.interfaceName], call[.mergeAnnotationValue, parameter[member[.interfaceName], member[.isXmlInterfaceNameSet], call[annotation.interfaceName, parameter[]], call[JMSConnectionFactoryProperties.INTERFACE_NAME.getAnnotationKey, parameter[]], member[JMSResourceDefinitionConstants.JMS_CONNECTION_FACTORY_INTERFACE]]]] assign[member[.className], call[.mergeAnnotationValue, parameter[member[.className], member[.isXmlClassNameSet], call[annotation.className, parameter[]], call[JMSConnectionFactoryProperties.CLASS_NAME.getAnnotationKey, parameter[]], literal[""]]]] assign[member[.resourceAdapter], call[.mergeAnnotationValue, parameter[member[.resourceAdapter], member[.isXmlResourceAdapterSet], call[annotation.resourceAdapter, parameter[]], call[JMSConnectionFactoryProperties.RESOURCE_ADAPTER.getAnnotationKey, parameter[]], member[JMSResourceDefinitionConstants.DEFAULT_JMS_RESOURCE_ADAPTER]]]] assign[member[.user], call[.mergeAnnotationValue, parameter[member[.user], member[.isXMLUserSet], call[annotation.user, parameter[]], call[JMSConnectionFactoryProperties.USER.getAnnotationKey, parameter[]], literal[""]]]] assign[member[.password], call[.mergeAnnotationValue, parameter[member[.password], member[.isXmlPasswordSet], call[annotation.password, parameter[]], call[JMSConnectionFactoryProperties.PASSWORD.getAnnotationKey, parameter[]], literal[""]]]] assign[member[.clientId], call[.mergeAnnotationValue, parameter[member[.clientId], member[.isXmlClientIdSet], call[annotation.clientId, parameter[]], call[JMSConnectionFactoryProperties.CLIENT_ID.getAnnotationKey, parameter[]], literal[""]]]] assign[member[.properties], call[.mergeAnnotationProperties, parameter[member[.properties], member[.xmlProperties], call[annotation.properties, parameter[]]]]] assign[member[.transactional], call[.mergeAnnotationBoolean, parameter[member[.transactional], member[.isXmlTransactionalSet], call[annotation.transactional, parameter[]], call[JMSConnectionFactoryProperties.TRANSACTIONAL.getAnnotationKey, parameter[]], member[JMSResourceDefinitionConstants.DEFAULT_TRANSACTIONAL_VALUE]]]] assign[member[.description], call[.mergeAnnotationValue, parameter[member[.description], member[.isXmlDescriptionSet], call[annotation.description, parameter[]], call[JMSConnectionFactoryProperties.DESCRIPTION.getAnnotationKey, parameter[]], literal[""]]]] assign[member[.maxPoolSize], call[.mergeAnnotationInteger, parameter[member[.maxPoolSize], member[.isXmlMaxPoolSizeSet], call[annotation.maxPoolSize, parameter[]], call[JMSConnectionFactoryProperties.MAX_POOL_SIZE.getAnnotationKey, parameter[]], literal[1], literal[null]]]] assign[member[.minPoolSize], call[.mergeAnnotationInteger, parameter[member[.minPoolSize], member[.isXmlMinPoolSizeSet], call[annotation.minPoolSize, parameter[]], call[JMSConnectionFactoryProperties.MIN_POOL_SIZE.getAnnotationKey, parameter[]], literal[1], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[merge] operator[SEP] identifier[JMSConnectionFactoryDefinition] identifier[annotation] , identifier[Class] operator[<] operator[?] operator[>] identifier[instanceClass] , identifier[Member] identifier[member] operator[SEP] Keyword[throws] identifier[InjectionException] { Keyword[if] operator[SEP] identifier[member] operator[!=] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[member] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[interfaceName] operator[=] identifier[mergeAnnotationValue] operator[SEP] identifier[interfaceName] , identifier[isXmlInterfaceNameSet] , identifier[annotation] operator[SEP] identifier[interfaceName] operator[SEP] operator[SEP] , identifier[JMSConnectionFactoryProperties] operator[SEP] identifier[INTERFACE_NAME] operator[SEP] identifier[getAnnotationKey] operator[SEP] operator[SEP] , identifier[JMSResourceDefinitionConstants] operator[SEP] identifier[JMS_CONNECTION_FACTORY_INTERFACE] operator[SEP] operator[SEP] identifier[className] operator[=] identifier[mergeAnnotationValue] operator[SEP] identifier[className] , identifier[isXmlClassNameSet] , identifier[annotation] operator[SEP] identifier[className] operator[SEP] operator[SEP] , identifier[JMSConnectionFactoryProperties] operator[SEP] identifier[CLASS_NAME] operator[SEP] identifier[getAnnotationKey] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[resourceAdapter] operator[=] identifier[mergeAnnotationValue] operator[SEP] identifier[resourceAdapter] , identifier[isXmlResourceAdapterSet] , identifier[annotation] operator[SEP] identifier[resourceAdapter] operator[SEP] operator[SEP] , identifier[JMSConnectionFactoryProperties] operator[SEP] identifier[RESOURCE_ADAPTER] operator[SEP] identifier[getAnnotationKey] operator[SEP] operator[SEP] , identifier[JMSResourceDefinitionConstants] operator[SEP] identifier[DEFAULT_JMS_RESOURCE_ADAPTER] operator[SEP] operator[SEP] identifier[user] operator[=] identifier[mergeAnnotationValue] operator[SEP] identifier[user] , identifier[isXMLUserSet] , identifier[annotation] operator[SEP] identifier[user] operator[SEP] operator[SEP] , identifier[JMSConnectionFactoryProperties] operator[SEP] identifier[USER] operator[SEP] identifier[getAnnotationKey] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[password] operator[=] identifier[mergeAnnotationValue] operator[SEP] identifier[password] , identifier[isXmlPasswordSet] , identifier[annotation] operator[SEP] identifier[password] operator[SEP] operator[SEP] , identifier[JMSConnectionFactoryProperties] operator[SEP] identifier[PASSWORD] operator[SEP] identifier[getAnnotationKey] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[clientId] operator[=] identifier[mergeAnnotationValue] operator[SEP] identifier[clientId] , identifier[isXmlClientIdSet] , identifier[annotation] operator[SEP] identifier[clientId] operator[SEP] operator[SEP] , identifier[JMSConnectionFactoryProperties] operator[SEP] identifier[CLIENT_ID] operator[SEP] identifier[getAnnotationKey] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[properties] operator[=] identifier[mergeAnnotationProperties] operator[SEP] identifier[properties] , identifier[xmlProperties] , identifier[annotation] operator[SEP] identifier[properties] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[transactional] operator[=] identifier[mergeAnnotationBoolean] operator[SEP] identifier[transactional] , identifier[isXmlTransactionalSet] , identifier[annotation] operator[SEP] identifier[transactional] operator[SEP] operator[SEP] , identifier[JMSConnectionFactoryProperties] operator[SEP] identifier[TRANSACTIONAL] operator[SEP] identifier[getAnnotationKey] operator[SEP] operator[SEP] , identifier[JMSResourceDefinitionConstants] operator[SEP] identifier[DEFAULT_TRANSACTIONAL_VALUE] operator[SEP] operator[SEP] identifier[description] operator[=] identifier[mergeAnnotationValue] operator[SEP] identifier[description] , identifier[isXmlDescriptionSet] , identifier[annotation] operator[SEP] identifier[description] operator[SEP] operator[SEP] , identifier[JMSConnectionFactoryProperties] operator[SEP] identifier[DESCRIPTION] operator[SEP] identifier[getAnnotationKey] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[maxPoolSize] operator[=] identifier[mergeAnnotationInteger] operator[SEP] identifier[maxPoolSize] , identifier[isXmlMaxPoolSizeSet] , identifier[annotation] operator[SEP] identifier[maxPoolSize] operator[SEP] operator[SEP] , identifier[JMSConnectionFactoryProperties] operator[SEP] identifier[MAX_POOL_SIZE] operator[SEP] identifier[getAnnotationKey] operator[SEP] operator[SEP] , operator[-] Other[1] , Other[null] operator[SEP] operator[SEP] identifier[minPoolSize] operator[=] identifier[mergeAnnotationInteger] operator[SEP] identifier[minPoolSize] , identifier[isXmlMinPoolSizeSet] , identifier[annotation] operator[SEP] identifier[minPoolSize] operator[SEP] operator[SEP] , identifier[JMSConnectionFactoryProperties] operator[SEP] identifier[MIN_POOL_SIZE] operator[SEP] identifier[getAnnotationKey] operator[SEP] operator[SEP] , operator[-] Other[1] , Other[null] operator[SEP] operator[SEP] }
private static InetAddress chooseAddress(String preferred) throws UnknownHostException { Set<InetAddress> addresses = getAddresses(); if (preferred != null && !preferred.isEmpty()) { //Favor preferred address if exists try { InetAddress preferredAddress = InetAddress.getByName(preferred); if (addresses != null && addresses.contains(preferredAddress)) { LOG.info("preferred address is " + preferredAddress.getHostAddress() + " for host " + preferredAddress.getHostName()); return preferredAddress; } } catch (UnknownHostException e) { //noop } for (InetAddress address : addresses) { if (preferred.equals(address.getHostName())) { return address; } } StringBuffer hostNameBuffer = new StringBuffer(); for (InetAddress address : addresses) { if (hostNameBuffer.length() > 0) { hostNameBuffer.append(", "); } hostNameBuffer.append(address.getHostName() + "/" + address.getHostAddress()); } LOG.warn("Could not find network address for preferred '" + preferred + "' when the addresses were: " + hostNameBuffer); } if (addresses.contains(InetAddress.getLocalHost())) { //Then if local host address is not bound to a loop-back interface, use it. return InetAddress.getLocalHost(); } else if (addresses != null && !addresses.isEmpty()) { //else return the first available addrress return addresses.toArray(new InetAddress[addresses.size()])[0]; } else { //else we are forcedt to use the localhost address. return InetAddress.getLocalHost(); } }
class class_name[name] begin[{] method[chooseAddress, return_type[type[InetAddress]], modifier[private static], parameter[preferred]] begin[{] local_variable[type[Set], addresses] if[binary_operation[binary_operation[member[.preferred], !=, literal[null]], &&, call[preferred.isEmpty, parameter[]]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=preferred, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getByName, postfix_operators=[], prefix_operators=[], qualifier=InetAddress, selectors=[], type_arguments=None), name=preferredAddress)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InetAddress, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=addresses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=preferredAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=addresses, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="preferred address is "), operandr=MethodInvocation(arguments=[], member=getHostAddress, postfix_operators=[], prefix_operators=[], qualifier=preferredAddress, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" for host "), operator=+), operandr=MethodInvocation(arguments=[], member=getHostName, postfix_operators=[], prefix_operators=[], qualifier=preferredAddress, selectors=[], type_arguments=None), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=preferredAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnknownHostException']))], finally_block=None, label=None, resources=None) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHostName, postfix_operators=[], prefix_operators=[], qualifier=address, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=preferred, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=address, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=addresses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=address)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InetAddress, sub_type=None))), label=None) local_variable[type[StringBuffer], hostNameBuffer] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=hostNameBuffer, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=hostNameBuffer, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHostName, postfix_operators=[], prefix_operators=[], qualifier=address, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+), operandr=MethodInvocation(arguments=[], member=getHostAddress, postfix_operators=[], prefix_operators=[], qualifier=address, selectors=[], type_arguments=None), operator=+)], member=append, postfix_operators=[], prefix_operators=[], qualifier=hostNameBuffer, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=addresses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=address)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InetAddress, sub_type=None))), label=None) call[LOG.warn, parameter[binary_operation[binary_operation[binary_operation[literal["Could not find network address for preferred '"], +, member[.preferred]], +, literal["' when the addresses were: "]], +, member[.hostNameBuffer]]]] else begin[{] None end[}] if[call[addresses.contains, parameter[call[InetAddress.getLocalHost, parameter[]]]]] begin[{] return[call[InetAddress.getLocalHost, parameter[]]] else begin[{] if[binary_operation[binary_operation[member[.addresses], !=, literal[null]], &&, call[addresses.isEmpty, parameter[]]]] begin[{] return[call[addresses.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=addresses, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InetAddress, sub_type=None))]]] else begin[{] return[call[InetAddress.getLocalHost, parameter[]]] end[}] end[}] end[}] END[}]
Keyword[private] Keyword[static] identifier[InetAddress] identifier[chooseAddress] operator[SEP] identifier[String] identifier[preferred] operator[SEP] Keyword[throws] identifier[UnknownHostException] { identifier[Set] operator[<] identifier[InetAddress] operator[>] identifier[addresses] operator[=] identifier[getAddresses] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[preferred] operator[!=] Other[null] operator[&&] operator[!] identifier[preferred] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[InetAddress] identifier[preferredAddress] operator[=] identifier[InetAddress] operator[SEP] identifier[getByName] operator[SEP] identifier[preferred] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[addresses] operator[!=] Other[null] operator[&&] identifier[addresses] operator[SEP] identifier[contains] operator[SEP] identifier[preferredAddress] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[preferredAddress] operator[SEP] identifier[getHostAddress] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[preferredAddress] operator[SEP] identifier[getHostName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[preferredAddress] operator[SEP] } } Keyword[catch] operator[SEP] identifier[UnknownHostException] identifier[e] operator[SEP] { } Keyword[for] operator[SEP] identifier[InetAddress] identifier[address] operator[:] identifier[addresses] operator[SEP] { Keyword[if] operator[SEP] identifier[preferred] operator[SEP] identifier[equals] operator[SEP] identifier[address] operator[SEP] identifier[getHostName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[address] operator[SEP] } } identifier[StringBuffer] identifier[hostNameBuffer] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[InetAddress] identifier[address] operator[:] identifier[addresses] operator[SEP] { Keyword[if] operator[SEP] identifier[hostNameBuffer] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[hostNameBuffer] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[hostNameBuffer] operator[SEP] identifier[append] operator[SEP] identifier[address] operator[SEP] identifier[getHostName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[address] operator[SEP] identifier[getHostAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[preferred] operator[+] literal[String] operator[+] identifier[hostNameBuffer] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[addresses] operator[SEP] identifier[contains] operator[SEP] identifier[InetAddress] operator[SEP] identifier[getLocalHost] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[InetAddress] operator[SEP] identifier[getLocalHost] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[addresses] operator[!=] Other[null] operator[&&] operator[!] identifier[addresses] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[addresses] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[InetAddress] operator[SEP] identifier[addresses] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[InetAddress] operator[SEP] identifier[getLocalHost] operator[SEP] operator[SEP] operator[SEP] } }
private void init() throws SlickException { try { Texture tex = InternalTextureLoader.get().createTexture(image.getWidth(), image.getHeight(), image.getFilter()); pbuffer = new Pbuffer(screenWidth, screenHeight, new PixelFormat(8, 0, 0), null, null); // Initialise state of the pbuffer context. pbuffer.makeCurrent(); initGL(); image.draw(0,0); GL11.glBindTexture(GL11.GL_TEXTURE_2D, tex.getTextureID()); GL11.glCopyTexImage2D(GL11.GL_TEXTURE_2D, 0, GL11.GL_RGBA, 0, 0, tex.getTextureWidth(), tex.getTextureHeight(), 0); image.setTexture(tex); Display.makeCurrent(); } catch (Exception e) { Log.error(e); throw new SlickException("Failed to create PBuffer for dynamic image. OpenGL driver failure?"); } }
class class_name[name] begin[{] method[init, return_type[void], modifier[private], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=InternalTextureLoader, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=image, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=image, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFilter, postfix_operators=[], prefix_operators=[], qualifier=image, selectors=[], type_arguments=None)], member=createTexture, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=tex)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Texture, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=pbuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=screenWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=screenHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PixelFormat, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Pbuffer, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=makeCurrent, postfix_operators=[], prefix_operators=[], qualifier=pbuffer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=initGL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=draw, postfix_operators=[], prefix_operators=[], qualifier=image, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=GL_TEXTURE_2D, postfix_operators=[], prefix_operators=[], qualifier=GL11, selectors=[]), MethodInvocation(arguments=[], member=getTextureID, postfix_operators=[], prefix_operators=[], qualifier=tex, selectors=[], type_arguments=None)], member=glBindTexture, postfix_operators=[], prefix_operators=[], qualifier=GL11, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=GL_TEXTURE_2D, postfix_operators=[], prefix_operators=[], qualifier=GL11, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=GL_RGBA, postfix_operators=[], prefix_operators=[], qualifier=GL11, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[], member=getTextureWidth, postfix_operators=[], prefix_operators=[], qualifier=tex, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getTextureHeight, postfix_operators=[], prefix_operators=[], qualifier=tex, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=glCopyTexImage2D, postfix_operators=[], prefix_operators=[], qualifier=GL11, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setTexture, postfix_operators=[], prefix_operators=[], qualifier=image, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=makeCurrent, postfix_operators=[], prefix_operators=[], qualifier=Display, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to create PBuffer for dynamic image. OpenGL driver failure?")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SlickException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[init] operator[SEP] operator[SEP] Keyword[throws] identifier[SlickException] { Keyword[try] { identifier[Texture] identifier[tex] operator[=] identifier[InternalTextureLoader] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[createTexture] operator[SEP] identifier[image] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[image] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] , identifier[image] operator[SEP] identifier[getFilter] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pbuffer] operator[=] Keyword[new] identifier[Pbuffer] operator[SEP] identifier[screenWidth] , identifier[screenHeight] , Keyword[new] identifier[PixelFormat] operator[SEP] Other[8] , Other[0] , Other[0] operator[SEP] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[pbuffer] operator[SEP] identifier[makeCurrent] operator[SEP] operator[SEP] operator[SEP] identifier[initGL] operator[SEP] operator[SEP] operator[SEP] identifier[image] operator[SEP] identifier[draw] operator[SEP] Other[0] , Other[0] operator[SEP] operator[SEP] identifier[GL11] operator[SEP] identifier[glBindTexture] operator[SEP] identifier[GL11] operator[SEP] identifier[GL_TEXTURE_2D] , identifier[tex] operator[SEP] identifier[getTextureID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[GL11] operator[SEP] identifier[glCopyTexImage2D] operator[SEP] identifier[GL11] operator[SEP] identifier[GL_TEXTURE_2D] , Other[0] , identifier[GL11] operator[SEP] identifier[GL_RGBA] , Other[0] , Other[0] , identifier[tex] operator[SEP] identifier[getTextureWidth] operator[SEP] operator[SEP] , identifier[tex] operator[SEP] identifier[getTextureHeight] operator[SEP] operator[SEP] , Other[0] operator[SEP] operator[SEP] identifier[image] operator[SEP] identifier[setTexture] operator[SEP] identifier[tex] operator[SEP] operator[SEP] identifier[Display] operator[SEP] identifier[makeCurrent] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[Log] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SlickException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public Script getScriptSig() throws ScriptException { // Transactions that generate new coins don't actually have a script. Instead this // parameter is overloaded to be something totally different. Script script = scriptSig == null ? null : scriptSig.get(); if (script == null) { script = new Script(scriptBytes); scriptSig = new WeakReference<>(script); } return script; }
class class_name[name] begin[{] method[getScriptSig, return_type[type[Script]], modifier[public], parameter[]] begin[{] local_variable[type[Script], script] if[binary_operation[member[.script], ==, literal[null]]] begin[{] assign[member[.script], ClassCreator(arguments=[MemberReference(member=scriptBytes, 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=Script, sub_type=None))] assign[member[.scriptSig], ClassCreator(arguments=[MemberReference(member=script, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=WeakReference, sub_type=None))] else begin[{] None end[}] return[member[.script]] end[}] END[}]
Keyword[public] identifier[Script] identifier[getScriptSig] operator[SEP] operator[SEP] Keyword[throws] identifier[ScriptException] { identifier[Script] identifier[script] operator[=] identifier[scriptSig] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[scriptSig] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[script] operator[==] Other[null] operator[SEP] { identifier[script] operator[=] Keyword[new] identifier[Script] operator[SEP] identifier[scriptBytes] operator[SEP] operator[SEP] identifier[scriptSig] operator[=] Keyword[new] identifier[WeakReference] operator[<] operator[>] operator[SEP] identifier[script] operator[SEP] operator[SEP] } Keyword[return] identifier[script] operator[SEP] }
public static HostAddress fromParts(String host, int port) { if (!isValidPort(port)) { throw new IllegalArgumentException("Port is invalid: " + port); } HostAddress parsedHost = fromString(host); if (parsedHost.hasPort()) { throw new IllegalArgumentException("host contains a port declaration: " + host); } return new HostAddress(parsedHost.host, port); }
class class_name[name] begin[{] method[fromParts, return_type[type[HostAddress]], modifier[public static], parameter[host, port]] begin[{] if[call[.isValidPort, parameter[member[.port]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Port is invalid: "), operandr=MemberReference(member=port, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[HostAddress], parsedHost] if[call[parsedHost.hasPort, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="host contains a port declaration: "), operandr=MemberReference(member=host, 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[}] return[ClassCreator(arguments=[MemberReference(member=host, postfix_operators=[], prefix_operators=[], qualifier=parsedHost, selectors=[]), MemberReference(member=port, 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=HostAddress, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[HostAddress] identifier[fromParts] operator[SEP] identifier[String] identifier[host] , Keyword[int] identifier[port] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isValidPort] operator[SEP] identifier[port] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[port] operator[SEP] operator[SEP] } identifier[HostAddress] identifier[parsedHost] operator[=] identifier[fromString] operator[SEP] identifier[host] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parsedHost] operator[SEP] identifier[hasPort] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[host] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[HostAddress] operator[SEP] identifier[parsedHost] operator[SEP] identifier[host] , identifier[port] operator[SEP] operator[SEP] }
public void exportWorkspaceSystemView(OutputStream out, boolean skipBinary, boolean noRecurse) throws IOException, PathNotFoundException, RepositoryException { checkLive(); LocationFactory factory = new LocationFactory(((NamespaceRegistryImpl)repository.getNamespaceRegistry())); WorkspaceEntry wsConfig = (WorkspaceEntry)container.getComponentInstanceOfType(WorkspaceEntry.class); ValueFactoryImpl valueFactoryImpl = new ValueFactoryImpl(factory, wsConfig, cleanerHolder); try { BaseXmlExporter exporter = new ExportImportFactory().getExportVisitor(XmlMapping.BACKUP, out, skipBinary, noRecurse, getTransientNodesManager(), repository.getNamespaceRegistry(), valueFactoryImpl); ItemData srcItemData = dataManager.getItemData(Constants.ROOT_UUID); if (srcItemData == null) { throw new PathNotFoundException("Root node not found"); } exporter.export((NodeData)srcItemData); } catch (XMLStreamException e) { throw new IOException(e.getLocalizedMessage(), e); } catch (SAXException e) { throw new IOException(e.getLocalizedMessage(), e); } }
class class_name[name] begin[{] method[exportWorkspaceSystemView, return_type[void], modifier[public], parameter[out, skipBinary, noRecurse]] begin[{] call[.checkLive, parameter[]] local_variable[type[LocationFactory], factory] local_variable[type[WorkspaceEntry], wsConfig] local_variable[type[ValueFactoryImpl], valueFactoryImpl] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=BACKUP, postfix_operators=[], prefix_operators=[], qualifier=XmlMapping, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=skipBinary, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=noRecurse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getTransientNodesManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getNamespaceRegistry, postfix_operators=[], prefix_operators=[], qualifier=repository, selectors=[], type_arguments=None), MemberReference(member=valueFactoryImpl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getExportVisitor, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ExportImportFactory, sub_type=None)), name=exporter)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BaseXmlExporter, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ROOT_UUID, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=getItemData, postfix_operators=[], prefix_operators=[], qualifier=dataManager, selectors=[], type_arguments=None), name=srcItemData)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ItemData, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=srcItemData, 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=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Root node not found")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PathNotFoundException, sub_type=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=srcItemData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=NodeData, sub_type=None))], member=export, postfix_operators=[], prefix_operators=[], qualifier=exporter, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), 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=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['XMLStreamException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), 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=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SAXException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[exportWorkspaceSystemView] operator[SEP] identifier[OutputStream] identifier[out] , Keyword[boolean] identifier[skipBinary] , Keyword[boolean] identifier[noRecurse] operator[SEP] Keyword[throws] identifier[IOException] , identifier[PathNotFoundException] , identifier[RepositoryException] { identifier[checkLive] operator[SEP] operator[SEP] operator[SEP] identifier[LocationFactory] identifier[factory] operator[=] Keyword[new] identifier[LocationFactory] operator[SEP] operator[SEP] operator[SEP] identifier[NamespaceRegistryImpl] operator[SEP] identifier[repository] operator[SEP] identifier[getNamespaceRegistry] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[WorkspaceEntry] identifier[wsConfig] operator[=] operator[SEP] identifier[WorkspaceEntry] operator[SEP] identifier[container] operator[SEP] identifier[getComponentInstanceOfType] operator[SEP] identifier[WorkspaceEntry] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[ValueFactoryImpl] identifier[valueFactoryImpl] operator[=] Keyword[new] identifier[ValueFactoryImpl] operator[SEP] identifier[factory] , identifier[wsConfig] , identifier[cleanerHolder] operator[SEP] operator[SEP] Keyword[try] { identifier[BaseXmlExporter] identifier[exporter] operator[=] Keyword[new] identifier[ExportImportFactory] operator[SEP] operator[SEP] operator[SEP] identifier[getExportVisitor] operator[SEP] identifier[XmlMapping] operator[SEP] identifier[BACKUP] , identifier[out] , identifier[skipBinary] , identifier[noRecurse] , identifier[getTransientNodesManager] operator[SEP] operator[SEP] , identifier[repository] operator[SEP] identifier[getNamespaceRegistry] operator[SEP] operator[SEP] , identifier[valueFactoryImpl] operator[SEP] operator[SEP] identifier[ItemData] identifier[srcItemData] operator[=] identifier[dataManager] operator[SEP] identifier[getItemData] operator[SEP] identifier[Constants] operator[SEP] identifier[ROOT_UUID] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[srcItemData] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[PathNotFoundException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[exporter] operator[SEP] identifier[export] operator[SEP] operator[SEP] identifier[NodeData] operator[SEP] identifier[srcItemData] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[XMLStreamException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SAXException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public Long getLong(String name, boolean strict) throws JsonException { JsonElement el = get(name); Long res = null; if (strict && !el.isNumber()) { throw Util.typeMismatch(name, el, "long", true); } if (el.isNumber()) { res = el.asLong(); } if (el.isString()) { res = Util.toLong(el.asString()); } if (res == null) throw Util.typeMismatch(name, el, "long", strict); return res; }
class class_name[name] begin[{] method[getLong, return_type[type[Long]], modifier[public], parameter[name, strict]] begin[{] local_variable[type[JsonElement], el] local_variable[type[Long], res] if[binary_operation[member[.strict], &&, call[el.isNumber, parameter[]]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=el, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="long"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=typeMismatch, postfix_operators=[], prefix_operators=[], qualifier=Util, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] if[call[el.isNumber, parameter[]]] begin[{] assign[member[.res], call[el.asLong, parameter[]]] else begin[{] None end[}] if[call[el.isString, parameter[]]] begin[{] assign[member[.res], call[Util.toLong, parameter[call[el.asString, parameter[]]]]] else begin[{] None end[}] if[binary_operation[member[.res], ==, literal[null]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=el, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="long"), MemberReference(member=strict, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=typeMismatch, postfix_operators=[], prefix_operators=[], qualifier=Util, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] return[member[.res]] end[}] END[}]
Keyword[public] identifier[Long] identifier[getLong] operator[SEP] identifier[String] identifier[name] , Keyword[boolean] identifier[strict] operator[SEP] Keyword[throws] identifier[JsonException] { identifier[JsonElement] identifier[el] operator[=] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[Long] identifier[res] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[strict] operator[&&] operator[!] identifier[el] operator[SEP] identifier[isNumber] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] identifier[Util] operator[SEP] identifier[typeMismatch] operator[SEP] identifier[name] , identifier[el] , literal[String] , literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[el] operator[SEP] identifier[isNumber] operator[SEP] operator[SEP] operator[SEP] { identifier[res] operator[=] identifier[el] operator[SEP] identifier[asLong] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[el] operator[SEP] identifier[isString] operator[SEP] operator[SEP] operator[SEP] { identifier[res] operator[=] identifier[Util] operator[SEP] identifier[toLong] operator[SEP] identifier[el] operator[SEP] identifier[asString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[res] operator[==] Other[null] operator[SEP] Keyword[throw] identifier[Util] operator[SEP] identifier[typeMismatch] operator[SEP] identifier[name] , identifier[el] , literal[String] , identifier[strict] operator[SEP] operator[SEP] Keyword[return] identifier[res] operator[SEP] }
public int fieldChanged(boolean bDisplayOption, int iMoveMode) { if (iMoveMode != DBConstants.SCREEN_MOVE) // This is necessary if an override change the repondsTo. // Also, if just refreshing the record, don't change this if set if ((m_bChangeDataOnRefresh) || ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE) != DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE)) if ((this.getOwner().getRecord().getOpenMode() & DBConstants.OPEN_DONT_UPDATE_LAST_READ) != DBConstants.OPEN_DONT_UPDATE_LAST_READ) // This is a special case where I want a subsequent write to get an error if changed this.setOriginalData(this.getOwner().getData()); return super.fieldChanged(bDisplayOption, iMoveMode); }
class class_name[name] begin[{] method[fieldChanged, return_type[type[int]], modifier[public], parameter[bDisplayOption, iMoveMode]] begin[{] if[binary_operation[member[.iMoveMode], !=, member[DBConstants.SCREEN_MOVE]]] begin[{] if[binary_operation[member[.m_bChangeDataOnRefresh], ||, binary_operation[binary_operation[THIS[call[None.getOwner, parameter[]]call[None.getRecord, parameter[]]call[None.getOpenMode, parameter[]]], &, member[DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE]], !=, member[DBConstants.OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE]]]] begin[{] if[binary_operation[binary_operation[THIS[call[None.getOwner, parameter[]]call[None.getRecord, parameter[]]call[None.getOpenMode, parameter[]]], &, member[DBConstants.OPEN_DONT_UPDATE_LAST_READ]], !=, member[DBConstants.OPEN_DONT_UPDATE_LAST_READ]]] begin[{] THIS[call[None.setOriginalData, parameter[THIS[call[None.getOwner, parameter[]]call[None.getData, parameter[]]]]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] return[SuperMethodInvocation(arguments=[MemberReference(member=bDisplayOption, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iMoveMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fieldChanged, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
Keyword[public] Keyword[int] identifier[fieldChanged] operator[SEP] Keyword[boolean] identifier[bDisplayOption] , Keyword[int] identifier[iMoveMode] operator[SEP] { Keyword[if] operator[SEP] identifier[iMoveMode] operator[!=] identifier[DBConstants] operator[SEP] identifier[SCREEN_MOVE] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[m_bChangeDataOnRefresh] operator[SEP] operator[||] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] identifier[getRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getOpenMode] operator[SEP] operator[SEP] operator[&] identifier[DBConstants] operator[SEP] identifier[OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE] operator[SEP] operator[!=] identifier[DBConstants] operator[SEP] identifier[OPEN_DONT_CHANGE_CURRENT_LOCK_TYPE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] identifier[getRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getOpenMode] operator[SEP] operator[SEP] operator[&] identifier[DBConstants] operator[SEP] identifier[OPEN_DONT_UPDATE_LAST_READ] operator[SEP] operator[!=] identifier[DBConstants] operator[SEP] identifier[OPEN_DONT_UPDATE_LAST_READ] operator[SEP] Keyword[this] operator[SEP] identifier[setOriginalData] operator[SEP] Keyword[this] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[super] operator[SEP] identifier[fieldChanged] operator[SEP] identifier[bDisplayOption] , identifier[iMoveMode] operator[SEP] operator[SEP] }
public IStore createStore(SessionManagerConfig smc, String smid, ServletContext sc, boolean applicationSessionStore , boolean removeAttrOnInvalidate) { IStore store = null; MemoryStoreHelper storeHelper = this.createStoreHelper(sc); SessionStoreService service = this.sessionStoreService; if (service != null) { store = service.createStore(smc, smid, sc, storeHelper, _sap.getAppClassLoader(), applicationSessionStore); } if (store == null) { if(!removeAttrOnInvalidate) store = new MemoryStore(smc, smid, sc, storeHelper, applicationSessionStore); else{ store = new MemoryStore(smc, smid, sc, storeHelper, applicationSessionStore,removeAttrOnInvalidate); } } return store; }
class class_name[name] begin[{] method[createStore, return_type[type[IStore]], modifier[public], parameter[smc, smid, sc, applicationSessionStore, removeAttrOnInvalidate]] begin[{] local_variable[type[IStore], store] local_variable[type[MemoryStoreHelper], storeHelper] local_variable[type[SessionStoreService], service] if[binary_operation[member[.service], !=, literal[null]]] begin[{] assign[member[.store], call[service.createStore, parameter[member[.smc], member[.smid], member[.sc], member[.storeHelper], call[_sap.getAppClassLoader, parameter[]], member[.applicationSessionStore]]]] else begin[{] None end[}] if[binary_operation[member[.store], ==, literal[null]]] begin[{] if[member[.removeAttrOnInvalidate]] begin[{] assign[member[.store], ClassCreator(arguments=[MemberReference(member=smc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=smid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=storeHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=applicationSessionStore, 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=MemoryStore, sub_type=None))] else begin[{] assign[member[.store], ClassCreator(arguments=[MemberReference(member=smc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=smid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=storeHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=applicationSessionStore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=removeAttrOnInvalidate, 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=MemoryStore, sub_type=None))] end[}] else begin[{] None end[}] return[member[.store]] end[}] END[}]
Keyword[public] identifier[IStore] identifier[createStore] operator[SEP] identifier[SessionManagerConfig] identifier[smc] , identifier[String] identifier[smid] , identifier[ServletContext] identifier[sc] , Keyword[boolean] identifier[applicationSessionStore] , Keyword[boolean] identifier[removeAttrOnInvalidate] operator[SEP] { identifier[IStore] identifier[store] operator[=] Other[null] operator[SEP] identifier[MemoryStoreHelper] identifier[storeHelper] operator[=] Keyword[this] operator[SEP] identifier[createStoreHelper] operator[SEP] identifier[sc] operator[SEP] operator[SEP] identifier[SessionStoreService] identifier[service] operator[=] Keyword[this] operator[SEP] identifier[sessionStoreService] operator[SEP] Keyword[if] operator[SEP] identifier[service] operator[!=] Other[null] operator[SEP] { identifier[store] operator[=] identifier[service] operator[SEP] identifier[createStore] operator[SEP] identifier[smc] , identifier[smid] , identifier[sc] , identifier[storeHelper] , identifier[_sap] operator[SEP] identifier[getAppClassLoader] operator[SEP] operator[SEP] , identifier[applicationSessionStore] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[store] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[removeAttrOnInvalidate] operator[SEP] identifier[store] operator[=] Keyword[new] identifier[MemoryStore] operator[SEP] identifier[smc] , identifier[smid] , identifier[sc] , identifier[storeHelper] , identifier[applicationSessionStore] operator[SEP] operator[SEP] Keyword[else] { identifier[store] operator[=] Keyword[new] identifier[MemoryStore] operator[SEP] identifier[smc] , identifier[smid] , identifier[sc] , identifier[storeHelper] , identifier[applicationSessionStore] , identifier[removeAttrOnInvalidate] operator[SEP] operator[SEP] } } Keyword[return] identifier[store] operator[SEP] }
public Matrix4f setOrtho2D(float left, float right, float bottom, float top) { if ((properties & PROPERTY_IDENTITY) == 0) MemUtil.INSTANCE.identity(this); this._m00(2.0f / (right - left)); this._m11(2.0f / (top - bottom)); this._m22(-1.0f); this._m30((right + left) / (left - right)); this._m31((top + bottom) / (bottom - top)); _properties(PROPERTY_AFFINE); return this; }
class class_name[name] begin[{] method[setOrtho2D, return_type[type[Matrix4f]], modifier[public], parameter[left, right, bottom, top]] begin[{] if[binary_operation[binary_operation[member[.properties], &, member[.PROPERTY_IDENTITY]], ==, literal[0]]] begin[{] call[MemUtil.INSTANCE.identity, parameter[THIS[]]] else begin[{] None end[}] THIS[call[None._m00, parameter[binary_operation[literal[2.0f], /, binary_operation[member[.right], -, member[.left]]]]]] THIS[call[None._m11, parameter[binary_operation[literal[2.0f], /, binary_operation[member[.top], -, member[.bottom]]]]]] THIS[call[None._m22, parameter[literal[1.0f]]]] THIS[call[None._m30, parameter[binary_operation[binary_operation[member[.right], +, member[.left]], /, binary_operation[member[.left], -, member[.right]]]]]] THIS[call[None._m31, parameter[binary_operation[binary_operation[member[.top], +, member[.bottom]], /, binary_operation[member[.bottom], -, member[.top]]]]]] call[._properties, parameter[member[.PROPERTY_AFFINE]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Matrix4f] identifier[setOrtho2D] operator[SEP] Keyword[float] identifier[left] , Keyword[float] identifier[right] , Keyword[float] identifier[bottom] , Keyword[float] identifier[top] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[properties] operator[&] identifier[PROPERTY_IDENTITY] operator[SEP] operator[==] Other[0] operator[SEP] identifier[MemUtil] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[identity] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m00] operator[SEP] literal[Float] operator[/] operator[SEP] identifier[right] operator[-] identifier[left] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m11] operator[SEP] literal[Float] operator[/] operator[SEP] identifier[top] operator[-] identifier[bottom] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m22] operator[SEP] operator[-] literal[Float] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m30] operator[SEP] operator[SEP] identifier[right] operator[+] identifier[left] operator[SEP] operator[/] operator[SEP] identifier[left] operator[-] identifier[right] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[_m31] operator[SEP] operator[SEP] identifier[top] operator[+] identifier[bottom] operator[SEP] operator[/] operator[SEP] identifier[bottom] operator[-] identifier[top] operator[SEP] operator[SEP] operator[SEP] identifier[_properties] operator[SEP] identifier[PROPERTY_AFFINE] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static ByteBuffer getByteBufferFromInputStreamAndCloseStream(InputStream is) throws IOException { try { // is.available() may return 0, or 1, or the total number of bytes in the stream, // or some other number. // Do not try to use is.available() == 0 to find the end of the stream! byte[] bytes; int avail = is.available(); if (avail > 32) { // There are more bytes available than just the ICU data header length. // With luck, it is the total number of bytes. bytes = new byte[avail]; } else { bytes = new byte[128]; // empty .res files are even smaller } // Call is.read(...) until one returns a negative value. int length = 0; for(;;) { if (length < bytes.length) { int numRead = is.read(bytes, length, bytes.length - length); if (numRead < 0) { break; // end of stream } length += numRead; } else { // See if we are at the end of the stream before we grow the array. int nextByte = is.read(); if (nextByte < 0) { break; } int capacity = 2 * bytes.length; if (capacity < 128) { capacity = 128; } else if (capacity < 0x4000) { capacity *= 2; // Grow faster until we reach 16kB. } // TODO Java 6 replace new byte[] and arraycopy(): bytes = Arrays.copyOf(bytes, capacity); byte[] newBytes = new byte[capacity]; System.arraycopy(bytes, 0, newBytes, 0, length); bytes = newBytes; bytes[length++] = (byte) nextByte; } } return ByteBuffer.wrap(bytes, 0, length); } finally { is.close(); } }
class class_name[name] begin[{] method[getByteBufferFromInputStreamAndCloseStream, return_type[type[ByteBuffer]], modifier[public static], parameter[is]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=bytes)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=available, postfix_operators=[], prefix_operators=[], qualifier=is, selectors=[], type_arguments=None), name=avail)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=avail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator=>), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=128)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ArrayCreator(dimensions=[MemberReference(member=avail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=length)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=bytes, selectors=[]), operator=<), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=is, selectors=[], type_arguments=None), name=nextByte)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nextByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=bytes, selectors=[]), operator=*), name=capacity)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=capacity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=128), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=capacity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x4000), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=capacity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=*=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=capacity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=128)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberReference(member=capacity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=newBytes)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=newBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=newBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=length, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=MemberReference(member=nextByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=bytes, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=read, postfix_operators=[], prefix_operators=[], qualifier=is, selectors=[], type_arguments=None), name=numRead)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=numRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=numRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=ForControl(condition=None, init=None, update=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=wrap, postfix_operators=[], prefix_operators=[], qualifier=ByteBuffer, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=is, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[ByteBuffer] identifier[getByteBufferFromInputStreamAndCloseStream] operator[SEP] identifier[InputStream] identifier[is] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] Keyword[int] identifier[avail] operator[=] identifier[is] operator[SEP] identifier[available] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[avail] operator[>] Other[32] operator[SEP] { identifier[bytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[avail] operator[SEP] operator[SEP] } Keyword[else] { identifier[bytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[128] operator[SEP] operator[SEP] } Keyword[int] identifier[length] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[length] operator[<] identifier[bytes] operator[SEP] identifier[length] operator[SEP] { Keyword[int] identifier[numRead] operator[=] identifier[is] operator[SEP] identifier[read] operator[SEP] identifier[bytes] , identifier[length] , identifier[bytes] operator[SEP] identifier[length] operator[-] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numRead] operator[<] Other[0] operator[SEP] { Keyword[break] operator[SEP] } identifier[length] operator[+=] identifier[numRead] operator[SEP] } Keyword[else] { Keyword[int] identifier[nextByte] operator[=] identifier[is] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nextByte] operator[<] Other[0] operator[SEP] { Keyword[break] operator[SEP] } Keyword[int] identifier[capacity] operator[=] Other[2] operator[*] identifier[bytes] operator[SEP] identifier[length] operator[SEP] Keyword[if] operator[SEP] identifier[capacity] operator[<] Other[128] operator[SEP] { identifier[capacity] operator[=] Other[128] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[capacity] operator[<] literal[Integer] operator[SEP] { identifier[capacity] operator[*=] Other[2] operator[SEP] } Keyword[byte] operator[SEP] operator[SEP] identifier[newBytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[capacity] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[bytes] , Other[0] , identifier[newBytes] , Other[0] , identifier[length] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[newBytes] operator[SEP] identifier[bytes] operator[SEP] identifier[length] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[nextByte] operator[SEP] } } Keyword[return] identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP] identifier[bytes] , Other[0] , identifier[length] operator[SEP] operator[SEP] } Keyword[finally] { identifier[is] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } }
public String getProperty(String expression) { if (expression == null || expression.length() == 0) { return expression; } for (int i = 0; i < expression.length(); i++) { char c = expression.charAt(i); if (c == Nested) { return expression.substring(0, i); } else if (c == MappedStart || c == IndexedStart) { return expression.substring(0, i); } } return expression; }
class class_name[name] begin[{] method[getProperty, return_type[type[String]], modifier[public], parameter[expression]] begin[{] if[binary_operation[binary_operation[member[.expression], ==, literal[null]], ||, binary_operation[call[expression.length, parameter[]], ==, literal[0]]]] begin[{] return[member[.expression]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=expression, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=Nested, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MappedStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=IndexedStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=expression, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=expression, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=expression, 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[.expression]] end[}] END[}]
Keyword[public] identifier[String] identifier[getProperty] operator[SEP] identifier[String] identifier[expression] operator[SEP] { Keyword[if] operator[SEP] identifier[expression] operator[==] Other[null] operator[||] identifier[expression] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[expression] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[expression] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[expression] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] identifier[Nested] operator[SEP] { Keyword[return] identifier[expression] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[i] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[==] identifier[MappedStart] operator[||] identifier[c] operator[==] identifier[IndexedStart] operator[SEP] { Keyword[return] identifier[expression] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[i] operator[SEP] operator[SEP] } } Keyword[return] identifier[expression] operator[SEP] }
@Deprecated public Blade put(@NonNull String path, @NonNull RouteHandler0 handler) { this.routeMatcher.addRoute(path, handler, HttpMethod.PUT); return this; }
class class_name[name] begin[{] method[put, return_type[type[Blade]], modifier[public], parameter[path, handler]] begin[{] THIS[member[None.routeMatcher]call[None.addRoute, parameter[member[.path], member[.handler], member[HttpMethod.PUT]]]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] identifier[Blade] identifier[put] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[path] , annotation[@] identifier[NonNull] identifier[RouteHandler0] identifier[handler] operator[SEP] { Keyword[this] operator[SEP] identifier[routeMatcher] operator[SEP] identifier[addRoute] operator[SEP] identifier[path] , identifier[handler] , identifier[HttpMethod] operator[SEP] identifier[PUT] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static void runExample( AdManagerServices adManagerServices, AdManagerSession session, long rateCardId, long productPackageItemId) throws RemoteException { // Get the BaseRateService. BaseRateServiceInterface baseRateService = adManagerServices.get(session, BaseRateServiceInterface.class); // Create a base rate for a product package item. ProductPackageItemBaseRate productPackageItemBaseRate = new ProductPackageItemBaseRate(); // Set the rate card ID that the product package item base rate belongs to. productPackageItemBaseRate.setRateCardId(rateCardId); // Set the product package item the base rate will be applied to. productPackageItemBaseRate.setProductPackageItemId(productPackageItemId); // Create a rate worth $2 USD and set that on the product package item base rate. Money rate = new Money(); rate.setCurrencyCode("USD"); rate.setMicroAmount(2000000L); productPackageItemBaseRate.setRate(rate); // Create the product package item base rate on the server. BaseRate[] baseRates = baseRateService.createBaseRates(new BaseRate[] { productPackageItemBaseRate}); for (BaseRate createdBaseRate : baseRates) { System.out.printf("A product package item base rate with ID %d and rate %.4f %s was" + " created.%n", createdBaseRate.getId(), (((ProductPackageItemBaseRate) createdBaseRate).getRate().getMicroAmount() / 1000000f), ((ProductPackageItemBaseRate) createdBaseRate).getRate().getCurrencyCode()); } }
class class_name[name] begin[{] method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session, rateCardId, productPackageItemId]] begin[{] local_variable[type[BaseRateServiceInterface], baseRateService] local_variable[type[ProductPackageItemBaseRate], productPackageItemBaseRate] call[productPackageItemBaseRate.setRateCardId, parameter[member[.rateCardId]]] call[productPackageItemBaseRate.setProductPackageItemId, parameter[member[.productPackageItemId]]] local_variable[type[Money], rate] call[rate.setCurrencyCode, parameter[literal["USD"]]] call[rate.setMicroAmount, parameter[literal[2000000L]]] call[productPackageItemBaseRate.setRate, parameter[member[.rate]]] local_variable[type[BaseRate], baseRates] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="A product package item base rate with ID %d and rate %.4f %s was"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" created.%n"), operator=+), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=createdBaseRate, selectors=[], type_arguments=None), BinaryOperation(operandl=Cast(expression=MemberReference(member=createdBaseRate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ProductPackageItemBaseRate, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000000f), operator=/), Cast(expression=MemberReference(member=createdBaseRate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ProductPackageItemBaseRate, sub_type=None))], member=printf, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=baseRates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=createdBaseRate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BaseRate, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] , Keyword[long] identifier[rateCardId] , Keyword[long] identifier[productPackageItemId] operator[SEP] Keyword[throws] identifier[RemoteException] { identifier[BaseRateServiceInterface] identifier[baseRateService] operator[=] identifier[adManagerServices] operator[SEP] identifier[get] operator[SEP] identifier[session] , identifier[BaseRateServiceInterface] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[ProductPackageItemBaseRate] identifier[productPackageItemBaseRate] operator[=] Keyword[new] identifier[ProductPackageItemBaseRate] operator[SEP] operator[SEP] operator[SEP] identifier[productPackageItemBaseRate] operator[SEP] identifier[setRateCardId] operator[SEP] identifier[rateCardId] operator[SEP] operator[SEP] identifier[productPackageItemBaseRate] operator[SEP] identifier[setProductPackageItemId] operator[SEP] identifier[productPackageItemId] operator[SEP] operator[SEP] identifier[Money] identifier[rate] operator[=] Keyword[new] identifier[Money] operator[SEP] operator[SEP] operator[SEP] identifier[rate] operator[SEP] identifier[setCurrencyCode] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[rate] operator[SEP] identifier[setMicroAmount] operator[SEP] Other[2000000L] operator[SEP] operator[SEP] identifier[productPackageItemBaseRate] operator[SEP] identifier[setRate] operator[SEP] identifier[rate] operator[SEP] operator[SEP] identifier[BaseRate] operator[SEP] operator[SEP] identifier[baseRates] operator[=] identifier[baseRateService] operator[SEP] identifier[createBaseRates] operator[SEP] Keyword[new] identifier[BaseRate] operator[SEP] operator[SEP] { identifier[productPackageItemBaseRate] } operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[BaseRate] identifier[createdBaseRate] operator[:] identifier[baseRates] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[printf] operator[SEP] literal[String] operator[+] literal[String] , identifier[createdBaseRate] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , operator[SEP] operator[SEP] operator[SEP] identifier[ProductPackageItemBaseRate] operator[SEP] identifier[createdBaseRate] operator[SEP] operator[SEP] identifier[getRate] operator[SEP] operator[SEP] operator[SEP] identifier[getMicroAmount] operator[SEP] operator[SEP] operator[/] literal[Float] operator[SEP] , operator[SEP] operator[SEP] identifier[ProductPackageItemBaseRate] operator[SEP] identifier[createdBaseRate] operator[SEP] operator[SEP] identifier[getRate] operator[SEP] operator[SEP] operator[SEP] identifier[getCurrencyCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public ApiSuccessResponse sendMessage(String id, AcceptData1 acceptData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = sendMessageWithHttpInfo(id, acceptData); return resp.getData(); }
class class_name[name] begin[{] method[sendMessage, return_type[type[ApiSuccessResponse]], modifier[public], parameter[id, acceptData]] begin[{] local_variable[type[ApiResponse], resp] return[call[resp.getData, parameter[]]] end[}] END[}]
Keyword[public] identifier[ApiSuccessResponse] identifier[sendMessage] operator[SEP] identifier[String] identifier[id] , identifier[AcceptData1] identifier[acceptData] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ApiResponse] operator[<] identifier[ApiSuccessResponse] operator[>] identifier[resp] operator[=] identifier[sendMessageWithHttpInfo] operator[SEP] identifier[id] , identifier[acceptData] operator[SEP] operator[SEP] Keyword[return] identifier[resp] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] }
@Execute public HtmlResponse createnew(final String dictId) { saveToken(); return asHtml(path_AdminDictStopwords_AdminDictStopwordsEditJsp).useForm(CreateForm.class, op -> { op.setup(form -> { form.initialize(); form.crudMode = CrudMode.CREATE; form.dictId = dictId; }); }); }
class class_name[name] begin[{] method[createnew, return_type[type[HtmlResponse]], modifier[public], parameter[dictId]] begin[{] call[.saveToken, parameter[]] return[call[.asHtml, parameter[member[.path_AdminDictStopwords_AdminDictStopwordsEditJsp]]]] end[}] END[}]
annotation[@] identifier[Execute] Keyword[public] identifier[HtmlResponse] identifier[createnew] operator[SEP] Keyword[final] identifier[String] identifier[dictId] operator[SEP] { identifier[saveToken] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[asHtml] operator[SEP] identifier[path_AdminDictStopwords_AdminDictStopwordsEditJsp] operator[SEP] operator[SEP] identifier[useForm] operator[SEP] identifier[CreateForm] operator[SEP] Keyword[class] , identifier[op] operator[->] { identifier[op] operator[SEP] identifier[setup] operator[SEP] identifier[form] operator[->] { identifier[form] operator[SEP] identifier[initialize] operator[SEP] operator[SEP] operator[SEP] identifier[form] operator[SEP] identifier[crudMode] operator[=] identifier[CrudMode] operator[SEP] identifier[CREATE] operator[SEP] identifier[form] operator[SEP] identifier[dictId] operator[=] identifier[dictId] operator[SEP] } operator[SEP] operator[SEP] } operator[SEP] operator[SEP] }
private static Optional<Object> deserialize(InputStream input) throws IOException { try { BufferedInputStream bis = new BufferedInputStream(input); ObjectInputStream ois = new ObjectInputStream(bis); return Optional.of(ois.readObject()); } catch (ClassNotFoundException ex) { LOG.log(Level.SEVERE, "An error occurred during deserialization an object.", ex); } return Optional.empty(); }
class class_name[name] begin[{] method[deserialize, return_type[type[Optional]], modifier[private static], parameter[input]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedInputStream, sub_type=None)), name=bis)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BufferedInputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=bis, 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=ObjectInputStream, sub_type=None)), name=ois)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ObjectInputStream, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=readObject, postfix_operators=[], prefix_operators=[], qualifier=ois, selectors=[], type_arguments=None)], member=of, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="An error occurred during deserialization an object."), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None) return[call[Optional.empty, parameter[]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Optional] operator[<] identifier[Object] operator[>] identifier[deserialize] operator[SEP] identifier[InputStream] identifier[input] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] { identifier[BufferedInputStream] identifier[bis] operator[=] Keyword[new] identifier[BufferedInputStream] operator[SEP] identifier[input] operator[SEP] operator[SEP] identifier[ObjectInputStream] identifier[ois] operator[=] Keyword[new] identifier[ObjectInputStream] operator[SEP] identifier[bis] operator[SEP] operator[SEP] Keyword[return] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[ois] operator[SEP] identifier[readObject] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[ex] operator[SEP] { identifier[LOG] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , literal[String] , identifier[ex] operator[SEP] operator[SEP] } Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] }
public ProjectFileInner update(String groupName, String serviceName, String projectName, String fileName, ProjectFileInner parameters) { return updateWithServiceResponseAsync(groupName, serviceName, projectName, fileName, parameters).toBlocking().single().body(); }
class class_name[name] begin[{] method[update, return_type[type[ProjectFileInner]], modifier[public], parameter[groupName, serviceName, projectName, fileName, parameters]] begin[{] return[call[.updateWithServiceResponseAsync, parameter[member[.groupName], member[.serviceName], member[.projectName], member[.fileName], member[.parameters]]]] end[}] END[}]
Keyword[public] identifier[ProjectFileInner] identifier[update] operator[SEP] identifier[String] identifier[groupName] , identifier[String] identifier[serviceName] , identifier[String] identifier[projectName] , identifier[String] identifier[fileName] , identifier[ProjectFileInner] identifier[parameters] operator[SEP] { Keyword[return] identifier[updateWithServiceResponseAsync] operator[SEP] identifier[groupName] , identifier[serviceName] , identifier[projectName] , identifier[fileName] , identifier[parameters] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
protected void processSuperMethods() { for (ClassReader cr : targetClassInfo.superClassReaders) { cr.accept(new EmptyClassVisitor() { String declaredClassName; @Override public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) { declaredClassName = name; } @Override public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) { if (name.equals(INIT) || name.equals(CLINIT)) { return null; } MethodSignatureVisitor msign = targetClassInfo.lookupMethodSignatureVisitor(access, name, desc, declaredClassName); if (msign == null) { return null; } return applyProxy(msign); } }, 0); } }
class class_name[name] begin[{] method[processSuperMethods, return_type[void], modifier[protected], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=declaredClassName)], documentation=None, modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=declaredClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], documentation=None, modifiers={'public'}, name=visit, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=version, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=access, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=name, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=signature, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=superName, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=interfaces, type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=INIT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=CLINIT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=access, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=desc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=declaredClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=lookupMethodSignatureVisitor, postfix_operators=[], prefix_operators=[], qualifier=targetClassInfo, selectors=[], type_arguments=None), name=msign)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MethodSignatureVisitor, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=msign, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=msign, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=applyProxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=visitMethod, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=access, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=name, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=desc, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=signature, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=exceptions, type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=MethodVisitor, 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=EmptyClassVisitor, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=accept, postfix_operators=[], prefix_operators=[], qualifier=cr, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=superClassReaders, postfix_operators=[], prefix_operators=[], qualifier=targetClassInfo, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ClassReader, sub_type=None))), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[processSuperMethods] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[ClassReader] identifier[cr] operator[:] identifier[targetClassInfo] operator[SEP] identifier[superClassReaders] operator[SEP] { identifier[cr] operator[SEP] identifier[accept] operator[SEP] Keyword[new] identifier[EmptyClassVisitor] operator[SEP] operator[SEP] { identifier[String] identifier[declaredClassName] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[visit] operator[SEP] Keyword[final] Keyword[int] identifier[version] , Keyword[final] Keyword[int] identifier[access] , Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[signature] , Keyword[final] identifier[String] identifier[superName] , Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[interfaces] operator[SEP] { identifier[declaredClassName] operator[=] identifier[name] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[MethodVisitor] identifier[visitMethod] operator[SEP] Keyword[final] Keyword[int] identifier[access] , Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[desc] , Keyword[final] identifier[String] identifier[signature] , Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[exceptions] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[INIT] operator[SEP] operator[||] identifier[name] operator[SEP] identifier[equals] operator[SEP] identifier[CLINIT] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[MethodSignatureVisitor] identifier[msign] operator[=] identifier[targetClassInfo] operator[SEP] identifier[lookupMethodSignatureVisitor] operator[SEP] identifier[access] , identifier[name] , identifier[desc] , identifier[declaredClassName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[msign] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[applyProxy] operator[SEP] identifier[msign] operator[SEP] operator[SEP] } } , Other[0] operator[SEP] operator[SEP] } }
private static int scriptNameToCode(String name) { try{ int[] codes = UScript.getCode(name); return codes != null ? codes[0] : UScript.INVALID_CODE; }catch( MissingResourceException e){ ///CLOVER:OFF return UScript.INVALID_CODE; ///CLOVER:ON } }
class class_name[name] begin[{] method[scriptNameToCode, return_type[type[int]], modifier[private static], parameter[name]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCode, postfix_operators=[], prefix_operators=[], qualifier=UScript, selectors=[], type_arguments=None), name=codes)], modifiers=set(), type=BasicType(dimensions=[None], name=int)), ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=codes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MemberReference(member=INVALID_CODE, postfix_operators=[], prefix_operators=[], qualifier=UScript, selectors=[]), if_true=MemberReference(member=codes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MemberReference(member=INVALID_CODE, postfix_operators=[], prefix_operators=[], qualifier=UScript, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MissingResourceException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[int] identifier[scriptNameToCode] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[try] { Keyword[int] operator[SEP] operator[SEP] identifier[codes] operator[=] identifier[UScript] operator[SEP] identifier[getCode] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[return] identifier[codes] operator[!=] Other[null] operator[?] identifier[codes] operator[SEP] Other[0] operator[SEP] operator[:] identifier[UScript] operator[SEP] identifier[INVALID_CODE] operator[SEP] } Keyword[catch] operator[SEP] identifier[MissingResourceException] identifier[e] operator[SEP] { Keyword[return] identifier[UScript] operator[SEP] identifier[INVALID_CODE] operator[SEP] } }
@Override public CreateDBClusterEndpointResult createDBClusterEndpoint(CreateDBClusterEndpointRequest request) { request = beforeClientExecution(request); return executeCreateDBClusterEndpoint(request); }
class class_name[name] begin[{] method[createDBClusterEndpoint, return_type[type[CreateDBClusterEndpointResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateDBClusterEndpoint, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CreateDBClusterEndpointResult] identifier[createDBClusterEndpoint] operator[SEP] identifier[CreateDBClusterEndpointRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreateDBClusterEndpoint] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
private static void internalHorizontalBlur( int[] pixels, int[] outRow, int w, int row, int diameter, int[] div) { final int firstInByte = w * row; final int lastInByte = w * (row + 1) - 1; final int radius = diameter >> 1; int a = 0, r = 0, g = 0, b = 0; int pixel; // Iterate over relative position to first pixel of row for (int i = -radius; i < w + radius; i++) { final int ii = bound(firstInByte + i, firstInByte, lastInByte); pixel = pixels[ii]; r += (pixel >> 16) & 0xFF; g += (pixel >> 8) & 0xFF; b += pixel & 0xFF; a += pixel >>> 24; if (i >= radius) { final int outOffset = i - radius; outRow[outOffset] = (div[a] << 24) | (div[r] << 16) | (div[g] << 8) | div[b]; final int j = i - (diameter - 1); final int jj = bound(firstInByte + j, firstInByte, lastInByte); pixel = pixels[jj]; r -= (pixel >> 16) & 0xFF; g -= (pixel >> 8) & 0xFF; b -= pixel & 0xFF; a -= pixel >>> 24; } } }
class class_name[name] begin[{] method[internalHorizontalBlur, return_type[void], modifier[private static], parameter[pixels, outRow, w, row, diameter, div]] begin[{] local_variable[type[int], firstInByte] local_variable[type[int], lastInByte] local_variable[type[int], radius] local_variable[type[int], a] local_variable[type[int], pixel] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=firstInByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=firstInByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastInByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=bound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=ii)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=pixel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=pixels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=ii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pixel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pixel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=pixel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=pixel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=>>>)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=radius, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=radius, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), name=outOffset)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=outRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=outOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=<<), operandr=BinaryOperation(operandl=MemberReference(member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=<<), operator=|), operandr=BinaryOperation(operandl=MemberReference(member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operator=|), operandr=MemberReference(member=div, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=|)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=diameter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=-), name=j)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=firstInByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=firstInByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastInByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=bound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=jj)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=pixel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=pixels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=jj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pixel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pixel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=BinaryOperation(operandl=MemberReference(member=pixel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=BinaryOperation(operandl=MemberReference(member=pixel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=>>>)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=radius, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=radius, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[internalHorizontalBlur] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[pixels] , Keyword[int] operator[SEP] operator[SEP] identifier[outRow] , Keyword[int] identifier[w] , Keyword[int] identifier[row] , Keyword[int] identifier[diameter] , Keyword[int] operator[SEP] operator[SEP] identifier[div] operator[SEP] { Keyword[final] Keyword[int] identifier[firstInByte] operator[=] identifier[w] operator[*] identifier[row] operator[SEP] Keyword[final] Keyword[int] identifier[lastInByte] operator[=] identifier[w] operator[*] operator[SEP] identifier[row] operator[+] Other[1] operator[SEP] operator[-] Other[1] operator[SEP] Keyword[final] Keyword[int] identifier[radius] operator[=] identifier[diameter] operator[>] operator[>] Other[1] operator[SEP] Keyword[int] identifier[a] operator[=] Other[0] , identifier[r] operator[=] Other[0] , identifier[g] operator[=] Other[0] , identifier[b] operator[=] Other[0] operator[SEP] Keyword[int] identifier[pixel] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] operator[-] identifier[radius] operator[SEP] identifier[i] operator[<] identifier[w] operator[+] identifier[radius] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[int] identifier[ii] operator[=] identifier[bound] operator[SEP] identifier[firstInByte] operator[+] identifier[i] , identifier[firstInByte] , identifier[lastInByte] operator[SEP] operator[SEP] identifier[pixel] operator[=] identifier[pixels] operator[SEP] identifier[ii] operator[SEP] operator[SEP] identifier[r] operator[+=] operator[SEP] identifier[pixel] operator[>] operator[>] Other[16] operator[SEP] operator[&] literal[Integer] operator[SEP] identifier[g] operator[+=] operator[SEP] identifier[pixel] operator[>] operator[>] Other[8] operator[SEP] operator[&] literal[Integer] operator[SEP] identifier[b] operator[+=] identifier[pixel] operator[&] literal[Integer] operator[SEP] identifier[a] operator[+=] identifier[pixel] operator[>] operator[>] operator[>] Other[24] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[>=] identifier[radius] operator[SEP] { Keyword[final] Keyword[int] identifier[outOffset] operator[=] identifier[i] operator[-] identifier[radius] operator[SEP] identifier[outRow] operator[SEP] identifier[outOffset] operator[SEP] operator[=] operator[SEP] identifier[div] operator[SEP] identifier[a] operator[SEP] operator[<<] Other[24] operator[SEP] operator[|] operator[SEP] identifier[div] operator[SEP] identifier[r] operator[SEP] operator[<<] Other[16] operator[SEP] operator[|] operator[SEP] identifier[div] operator[SEP] identifier[g] operator[SEP] operator[<<] Other[8] operator[SEP] operator[|] identifier[div] operator[SEP] identifier[b] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[j] operator[=] identifier[i] operator[-] operator[SEP] identifier[diameter] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[jj] operator[=] identifier[bound] operator[SEP] identifier[firstInByte] operator[+] identifier[j] , identifier[firstInByte] , identifier[lastInByte] operator[SEP] operator[SEP] identifier[pixel] operator[=] identifier[pixels] operator[SEP] identifier[jj] operator[SEP] operator[SEP] identifier[r] operator[-=] operator[SEP] identifier[pixel] operator[>] operator[>] Other[16] operator[SEP] operator[&] literal[Integer] operator[SEP] identifier[g] operator[-=] operator[SEP] identifier[pixel] operator[>] operator[>] Other[8] operator[SEP] operator[&] literal[Integer] operator[SEP] identifier[b] operator[-=] identifier[pixel] operator[&] literal[Integer] operator[SEP] identifier[a] operator[-=] identifier[pixel] operator[>] operator[>] operator[>] Other[24] operator[SEP] } } }
public static void close(@CheckForNull OutputStream outputStream) { if (outputStream == null) { return; } try { outputStream.close(); } catch (IOException e) { // Ignore } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public static], parameter[outputStream]] begin[{] if[binary_operation[member[.outputStream], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=outputStream, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[close] operator[SEP] annotation[@] identifier[CheckForNull] identifier[OutputStream] identifier[outputStream] operator[SEP] { Keyword[if] operator[SEP] identifier[outputStream] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } Keyword[try] { identifier[outputStream] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { } }
protected SpdDouble getSpdDouble() { myValue.reset(false); for (int i = 0; i < members.size(); i++) { Object member = members.get(i); if (member == null) continue; if (member instanceof SpdDouble) { myValue.combine((SpdDouble) member); } else { // SpdDoubleAggregate myValue.combine(((SpdDoubleAggregate) member).getSpdDouble()); } } return myValue; }
class class_name[name] begin[{] method[getSpdDouble, return_type[type[SpdDouble]], modifier[protected], parameter[]] begin[{] call[myValue.reset, parameter[literal[false]]] 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=members, selectors=[], type_arguments=None), name=member)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=member, 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=ContinueStatement(goto=None, label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=member, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=SpdDouble, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=member, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SpdDoubleAggregate, sub_type=None))], member=combine, postfix_operators=[], prefix_operators=[], qualifier=myValue, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=member, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SpdDouble, sub_type=None))], member=combine, postfix_operators=[], prefix_operators=[], qualifier=myValue, 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=members, 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[.myValue]] end[}] END[}]
Keyword[protected] identifier[SpdDouble] identifier[getSpdDouble] operator[SEP] operator[SEP] { identifier[myValue] operator[SEP] identifier[reset] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[members] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Object] identifier[member] operator[=] identifier[members] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[member] operator[==] Other[null] operator[SEP] Keyword[continue] operator[SEP] Keyword[if] operator[SEP] identifier[member] Keyword[instanceof] identifier[SpdDouble] operator[SEP] { identifier[myValue] operator[SEP] identifier[combine] operator[SEP] operator[SEP] identifier[SpdDouble] operator[SEP] identifier[member] operator[SEP] operator[SEP] } Keyword[else] { identifier[myValue] operator[SEP] identifier[combine] operator[SEP] operator[SEP] operator[SEP] identifier[SpdDoubleAggregate] operator[SEP] identifier[member] operator[SEP] operator[SEP] identifier[getSpdDouble] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[myValue] operator[SEP] }
public static final String prettyPrint(final String binaryString, final char separator) { String paddedBinaryString = zeroPadString(binaryString); List<String> splitted = Splitter.fixedLength(4).splitToList(paddedBinaryString); return Joiner.on(separator).join(splitted); }
class class_name[name] begin[{] method[prettyPrint, return_type[type[String]], modifier[final public static], parameter[binaryString, separator]] begin[{] local_variable[type[String], paddedBinaryString] local_variable[type[List], splitted] return[call[Joiner.on, parameter[member[.separator]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] identifier[String] identifier[prettyPrint] operator[SEP] Keyword[final] identifier[String] identifier[binaryString] , Keyword[final] Keyword[char] identifier[separator] operator[SEP] { identifier[String] identifier[paddedBinaryString] operator[=] identifier[zeroPadString] operator[SEP] identifier[binaryString] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[splitted] operator[=] identifier[Splitter] operator[SEP] identifier[fixedLength] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[splitToList] operator[SEP] identifier[paddedBinaryString] operator[SEP] operator[SEP] Keyword[return] identifier[Joiner] operator[SEP] identifier[on] operator[SEP] identifier[separator] operator[SEP] operator[SEP] identifier[join] operator[SEP] identifier[splitted] operator[SEP] operator[SEP] }
private void gitSetConfig(final String name, String value) throws MojoFailureException, CommandLineException { if (value == null || value.isEmpty()) { value = "\"\""; } // ignore error exit codes executeGitCommandExitCode("config", name, value); }
class class_name[name] begin[{] method[gitSetConfig, return_type[void], modifier[private], parameter[name, value]] begin[{] if[binary_operation[binary_operation[member[.value], ==, literal[null]], ||, call[value.isEmpty, parameter[]]]] begin[{] assign[member[.value], literal["\"\""]] else begin[{] None end[}] call[.executeGitCommandExitCode, parameter[literal["config"], member[.name], member[.value]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[gitSetConfig] operator[SEP] Keyword[final] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] Keyword[throws] identifier[MojoFailureException] , identifier[CommandLineException] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[||] identifier[value] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[value] operator[=] literal[String] operator[SEP] } identifier[executeGitCommandExitCode] operator[SEP] literal[String] , identifier[name] , identifier[value] operator[SEP] operator[SEP] }
private void setEnvironmentalImpactDetails( RROtherProjectInfo12Document.RROtherProjectInfo12 rrOtherProjectInfo) { EnvironmentalImpact environmentalImpact = EnvironmentalImpact.Factory .newInstance(); setEnvironmentalImpactIndicatorAndExplanation(environmentalImpact); setEnvironmentalExemption(environmentalImpact); rrOtherProjectInfo.setEnvironmentalImpact(environmentalImpact); }
class class_name[name] begin[{] method[setEnvironmentalImpactDetails, return_type[void], modifier[private], parameter[rrOtherProjectInfo]] begin[{] local_variable[type[EnvironmentalImpact], environmentalImpact] call[.setEnvironmentalImpactIndicatorAndExplanation, parameter[member[.environmentalImpact]]] call[.setEnvironmentalExemption, parameter[member[.environmentalImpact]]] call[rrOtherProjectInfo.setEnvironmentalImpact, parameter[member[.environmentalImpact]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setEnvironmentalImpactDetails] operator[SEP] identifier[RROtherProjectInfo12Document] operator[SEP] identifier[RROtherProjectInfo12] identifier[rrOtherProjectInfo] operator[SEP] { identifier[EnvironmentalImpact] identifier[environmentalImpact] operator[=] identifier[EnvironmentalImpact] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[setEnvironmentalImpactIndicatorAndExplanation] operator[SEP] identifier[environmentalImpact] operator[SEP] operator[SEP] identifier[setEnvironmentalExemption] operator[SEP] identifier[environmentalImpact] operator[SEP] operator[SEP] identifier[rrOtherProjectInfo] operator[SEP] identifier[setEnvironmentalImpact] operator[SEP] identifier[environmentalImpact] operator[SEP] operator[SEP] }
private void updateRoutingStrategies(Cluster cluster, List<StoreDefinition> storeDefs) { // acquire write lock writeLock.lock(); try { VectorClock clock = new VectorClock(); if(metadataCache.containsKey(ROUTING_STRATEGY_KEY)) clock = (VectorClock) metadataCache.get(ROUTING_STRATEGY_KEY).getVersion(); logger.info("Updating routing strategy for all stores"); HashMap<String, StoreDefinition> storeDefMap = makeStoreDefinitionMap(storeDefs); HashMap<String, RoutingStrategy> routingStrategyMap = createRoutingStrategyMap(cluster, storeDefMap); this.metadataCache.put(ROUTING_STRATEGY_KEY, new Versioned<Object>(routingStrategyMap, clock.incremented(getNodeId(), System.currentTimeMillis()))); for(String storeName: storeNameTolisteners.keySet()) { RoutingStrategy updatedRoutingStrategy = routingStrategyMap.get(storeName); if(updatedRoutingStrategy != null) { try { for(MetadataStoreListener listener: storeNameTolisteners.get(storeName)) { listener.updateRoutingStrategy(updatedRoutingStrategy); listener.updateStoreDefinition(storeDefMap.get(storeName)); } } catch(Exception e) { if(logger.isEnabledFor(Level.WARN)) logger.warn(e, e); } } } } finally { writeLock.unlock(); } }
class class_name[name] begin[{] method[updateRoutingStrategies, return_type[void], modifier[private], parameter[cluster, storeDefs]] begin[{] call[writeLock.lock, parameter[]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=VectorClock, sub_type=None)), name=clock)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=VectorClock, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=ROUTING_STRATEGY_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=metadataCache, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=clock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=ROUTING_STRATEGY_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=metadataCache, selectors=[MethodInvocation(arguments=[], member=getVersion, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=VectorClock, sub_type=None))), label=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Updating routing strategy for all stores")], member=info, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=storeDefs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=makeStoreDefinitionMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=storeDefMap)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=StoreDefinition, sub_type=None))], dimensions=[], name=HashMap, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=cluster, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=storeDefMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createRoutingStrategyMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=routingStrategyMap)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=RoutingStrategy, sub_type=None))], dimensions=[], name=HashMap, sub_type=None)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=metadataCache, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ROUTING_STRATEGY_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=routingStrategyMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNodeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None)], member=incremented, postfix_operators=[], prefix_operators=[], qualifier=clock, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=Versioned, sub_type=None))], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=storeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=routingStrategyMap, selectors=[], type_arguments=None), name=updatedRoutingStrategy)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RoutingStrategy, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=updatedRoutingStrategy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=updatedRoutingStrategy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateRoutingStrategy, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=storeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=storeDefMap, selectors=[], type_arguments=None)], member=updateStoreDefinition, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=storeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=storeNameTolisteners, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=listener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MetadataStoreListener, sub_type=None))), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=WARN, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[])], member=isEnabledFor, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, 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=keySet, postfix_operators=[], prefix_operators=[], qualifier=storeNameTolisteners, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=storeName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=writeLock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[updateRoutingStrategies] operator[SEP] identifier[Cluster] identifier[cluster] , identifier[List] operator[<] identifier[StoreDefinition] operator[>] identifier[storeDefs] operator[SEP] { identifier[writeLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[VectorClock] identifier[clock] operator[=] Keyword[new] identifier[VectorClock] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[metadataCache] operator[SEP] identifier[containsKey] operator[SEP] identifier[ROUTING_STRATEGY_KEY] operator[SEP] operator[SEP] identifier[clock] operator[=] operator[SEP] identifier[VectorClock] operator[SEP] identifier[metadataCache] operator[SEP] identifier[get] operator[SEP] identifier[ROUTING_STRATEGY_KEY] operator[SEP] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[StoreDefinition] operator[>] identifier[storeDefMap] operator[=] identifier[makeStoreDefinitionMap] operator[SEP] identifier[storeDefs] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[RoutingStrategy] operator[>] identifier[routingStrategyMap] operator[=] identifier[createRoutingStrategyMap] operator[SEP] identifier[cluster] , identifier[storeDefMap] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[metadataCache] operator[SEP] identifier[put] operator[SEP] identifier[ROUTING_STRATEGY_KEY] , Keyword[new] identifier[Versioned] operator[<] identifier[Object] operator[>] operator[SEP] identifier[routingStrategyMap] , identifier[clock] operator[SEP] identifier[incremented] operator[SEP] identifier[getNodeId] operator[SEP] operator[SEP] , identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[storeName] operator[:] identifier[storeNameTolisteners] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[RoutingStrategy] identifier[updatedRoutingStrategy] operator[=] identifier[routingStrategyMap] operator[SEP] identifier[get] operator[SEP] identifier[storeName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[updatedRoutingStrategy] operator[!=] Other[null] operator[SEP] { Keyword[try] { Keyword[for] operator[SEP] identifier[MetadataStoreListener] identifier[listener] operator[:] identifier[storeNameTolisteners] operator[SEP] identifier[get] operator[SEP] identifier[storeName] operator[SEP] operator[SEP] { identifier[listener] operator[SEP] identifier[updateRoutingStrategy] operator[SEP] identifier[updatedRoutingStrategy] operator[SEP] operator[SEP] identifier[listener] operator[SEP] identifier[updateStoreDefinition] operator[SEP] identifier[storeDefMap] operator[SEP] identifier[get] operator[SEP] identifier[storeName] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isEnabledFor] operator[SEP] identifier[Level] operator[SEP] identifier[WARN] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[warn] operator[SEP] identifier[e] , identifier[e] operator[SEP] operator[SEP] } } } } Keyword[finally] { identifier[writeLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
public DaoPageResult<ENTITY> page2(List<Match> matches, DaoPage daoPage) { DaoPageResult<ENTITY> daoPageResult = new DaoPageResult<ENTITY>(); // 结果 List<ENTITY> result = page(matches, daoPage); daoPageResult.setResult(result); // 总数 int totalCount = count(matches); daoPageResult.setTotalCount(totalCount); return daoPageResult; }
class class_name[name] begin[{] method[page2, return_type[type[DaoPageResult]], modifier[public], parameter[matches, daoPage]] begin[{] local_variable[type[DaoPageResult], daoPageResult] local_variable[type[List], result] call[daoPageResult.setResult, parameter[member[.result]]] local_variable[type[int], totalCount] call[daoPageResult.setTotalCount, parameter[member[.totalCount]]] return[member[.daoPageResult]] end[}] END[}]
Keyword[public] identifier[DaoPageResult] operator[<] identifier[ENTITY] operator[>] identifier[page2] operator[SEP] identifier[List] operator[<] identifier[Match] operator[>] identifier[matches] , identifier[DaoPage] identifier[daoPage] operator[SEP] { identifier[DaoPageResult] operator[<] identifier[ENTITY] operator[>] identifier[daoPageResult] operator[=] Keyword[new] identifier[DaoPageResult] operator[<] identifier[ENTITY] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ENTITY] operator[>] identifier[result] operator[=] identifier[page] operator[SEP] identifier[matches] , identifier[daoPage] operator[SEP] operator[SEP] identifier[daoPageResult] operator[SEP] identifier[setResult] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[int] identifier[totalCount] operator[=] identifier[count] operator[SEP] identifier[matches] operator[SEP] operator[SEP] identifier[daoPageResult] operator[SEP] identifier[setTotalCount] operator[SEP] identifier[totalCount] operator[SEP] operator[SEP] Keyword[return] identifier[daoPageResult] operator[SEP] }
public Object getPropertyValue(Property property) { Validate.argumentIsNotNull(property); Object val = properties.get(property.getName()); if (val == null){ return Defaults.defaultValue(property.getGenericType()); } return val; }
class class_name[name] begin[{] method[getPropertyValue, return_type[type[Object]], modifier[public], parameter[property]] begin[{] call[Validate.argumentIsNotNull, parameter[member[.property]]] local_variable[type[Object], val] if[binary_operation[member[.val], ==, literal[null]]] begin[{] return[call[Defaults.defaultValue, parameter[call[property.getGenericType, parameter[]]]]] else begin[{] None end[}] return[member[.val]] end[}] END[}]
Keyword[public] identifier[Object] identifier[getPropertyValue] operator[SEP] identifier[Property] identifier[property] operator[SEP] { identifier[Validate] operator[SEP] identifier[argumentIsNotNull] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[Object] identifier[val] operator[=] identifier[properties] operator[SEP] identifier[get] operator[SEP] identifier[property] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[val] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Defaults] operator[SEP] identifier[defaultValue] operator[SEP] identifier[property] operator[SEP] identifier[getGenericType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[val] operator[SEP] }
public A callbackUri(String callbackUri) { this.headers.add(Pair.of("X-CallbackURI", callbackUri)); return (A)this; }
class class_name[name] begin[{] method[callbackUri, return_type[type[A]], modifier[public], parameter[callbackUri]] begin[{] THIS[member[None.headers]call[None.add, parameter[call[Pair.of, parameter[literal["X-CallbackURI"], member[.callbackUri]]]]]] return[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=A, sub_type=None))] end[}] END[}]
Keyword[public] identifier[A] identifier[callbackUri] operator[SEP] identifier[String] identifier[callbackUri] operator[SEP] { Keyword[this] operator[SEP] identifier[headers] operator[SEP] identifier[add] operator[SEP] identifier[Pair] operator[SEP] identifier[of] operator[SEP] literal[String] , identifier[callbackUri] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[A] operator[SEP] Keyword[this] operator[SEP] }
public View getView(String id, int index){ View viewToReturn = null; Context targetContext = instrumentation.getTargetContext(); String packageName = targetContext.getPackageName(); int viewId = targetContext.getResources().getIdentifier(id, "id", packageName); if(viewId != 0){ viewToReturn = getView(viewId, index, TIMEOUT); } if(viewToReturn == null){ int androidViewId = targetContext.getResources().getIdentifier(id, "id", "android"); if(androidViewId != 0){ viewToReturn = getView(androidViewId, index, TIMEOUT); } } if(viewToReturn != null){ return viewToReturn; } return getView(viewId, index); }
class class_name[name] begin[{] method[getView, return_type[type[View]], modifier[public], parameter[id, index]] begin[{] local_variable[type[View], viewToReturn] local_variable[type[Context], targetContext] local_variable[type[String], packageName] local_variable[type[int], viewId] if[binary_operation[member[.viewId], !=, literal[0]]] begin[{] assign[member[.viewToReturn], call[.getView, parameter[member[.viewId], member[.index], member[.TIMEOUT]]]] else begin[{] None end[}] if[binary_operation[member[.viewToReturn], ==, literal[null]]] begin[{] local_variable[type[int], androidViewId] if[binary_operation[member[.androidViewId], !=, literal[0]]] begin[{] assign[member[.viewToReturn], call[.getView, parameter[member[.androidViewId], member[.index], member[.TIMEOUT]]]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.viewToReturn], !=, literal[null]]] begin[{] return[member[.viewToReturn]] else begin[{] None end[}] return[call[.getView, parameter[member[.viewId], member[.index]]]] end[}] END[}]
Keyword[public] identifier[View] identifier[getView] operator[SEP] identifier[String] identifier[id] , Keyword[int] identifier[index] operator[SEP] { identifier[View] identifier[viewToReturn] operator[=] Other[null] operator[SEP] identifier[Context] identifier[targetContext] operator[=] identifier[instrumentation] operator[SEP] identifier[getTargetContext] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[packageName] operator[=] identifier[targetContext] operator[SEP] identifier[getPackageName] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[viewId] operator[=] identifier[targetContext] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] identifier[getIdentifier] operator[SEP] identifier[id] , literal[String] , identifier[packageName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[viewId] operator[!=] Other[0] operator[SEP] { identifier[viewToReturn] operator[=] identifier[getView] operator[SEP] identifier[viewId] , identifier[index] , identifier[TIMEOUT] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[viewToReturn] operator[==] Other[null] operator[SEP] { Keyword[int] identifier[androidViewId] operator[=] identifier[targetContext] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] identifier[getIdentifier] operator[SEP] identifier[id] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[androidViewId] operator[!=] Other[0] operator[SEP] { identifier[viewToReturn] operator[=] identifier[getView] operator[SEP] identifier[androidViewId] , identifier[index] , identifier[TIMEOUT] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[viewToReturn] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[viewToReturn] operator[SEP] } Keyword[return] identifier[getView] operator[SEP] identifier[viewId] , identifier[index] operator[SEP] operator[SEP] }
public static Object streamIn(byte[] bytes, ClassLoader classLoader, boolean compressed) throws IOException, ClassNotFoundException { return streamIn(new ByteArrayInputStream(bytes), classLoader, compressed); }
class class_name[name] begin[{] method[streamIn, return_type[type[Object]], modifier[public static], parameter[bytes, classLoader, compressed]] begin[{] return[call[.streamIn, parameter[ClassCreator(arguments=[MemberReference(member=bytes, 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=ByteArrayInputStream, sub_type=None)), member[.classLoader], member[.compressed]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[streamIn] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , identifier[ClassLoader] identifier[classLoader] , Keyword[boolean] identifier[compressed] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { Keyword[return] identifier[streamIn] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[bytes] operator[SEP] , identifier[classLoader] , identifier[compressed] operator[SEP] operator[SEP] }
@Override public Object allocateConnection(ManagedConnectionFactory factory, ConnectionRequestInfo requestInfo) throws ResourceException { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) { Tr.entry(this, tc, "allocateConnection"); } if (_pm == null) { if (isTraceOn && tc.isDebugEnabled()) { Tr.debug(this, tc, "This should not happen! pm was null for cf name " + cmConfig.getCfKey()); } String formattedMessage = CommonFunction.getNLSMessage("POOL_MANAGER_NOT_FOUND_J2CA0695", new Object[] { cmConfig.getJNDIName() == null ? cmConfig.getCfKey() : cmConfig.getJNDIName() }); java.lang.IllegalStateException re = new java.lang.IllegalStateException(formattedMessage); Tr.error(tc, "FAILED_MANAGED_CONNECTION_J2CA0020", re); throw re; } UOWCurrent uowCurrent = (UOWCurrent) _pm.connectorSvc.transactionManager; UOWCoordinator uowCoord = uowCurrent == null ? null : uowCurrent.getUOWCoord(); Subject subj = getFinalSubject(requestInfo, factory, this); if (isTraceOn && tc.isDebugEnabled()) { Tr.debug(this, tc, "This CM is " + this.toString()); Tr.debug(this, tc, "Input MCF is " + factory); } Object rVal = null; Object credTokenObj = null; MCWrapper mcWrapper = null; try { // Begin processing to get connection // Perform any security setup that may be needed // before we proceed to get a connection. credTokenObj = securityHelper.beforeGettingConnection(subj, requestInfo); mcWrapper = allocateMCWrapper(factory, requestInfo, subj, uowCoord); involveMCInTran(mcWrapper, uowCoord, this); /* * Get the a Connection from the ManagedConnection to return to our caller. */ int poolState = mcWrapper.getPoolState(); try { mcWrapper.setPoolState(50); rVal = mcWrapper.getConnection(subj, requestInfo); mcWrapper.setPoolState(poolState); if (mcWrapper.do_not_reuse_mcw) { if (isTraceOn && tc.isDebugEnabled()) { Tr.debug(this, tc, "Connection error occurred for this mcw " + mcWrapper + ", mcw will not be reuse"); } mcWrapper.markStale(); ResourceException e = new ResourceException("Resource adatepr called connection error event during getConnection " + "processing and did not throw a resource exception. The reason for " + "this falue may have been logged during the connection error event " + "logging."); throw e; } } catch (ResourceException e) { mcWrapper.setPoolState(poolState); com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.ConnectionManager.allocateConnection", "344", this); Tr.error(tc, "FAILED_CONNECTION_J2CA0021", new Object[] { e, _pm.gConfigProps.cfName }); /* * If the Resource Adapter throws a ResourceException and we are not in a * transaction and there are no other connections open on the ManagedConnection, * return the ManagedConnection to the pool before * rethrowing the exception. The ManagedConnection is probably OK - the exception * may only be a logon failure or similar so the MC shouldn't be 'lost'. * * If we are in a transaction, just throw the exception. Assume we will cleanup during * the aftercompletion call on the tran wrapper. * * for resource adapter that support NOTXWRAPPER, if an error occurs, we can move them from the inuse * pool, to the free pool, assuming the managed connection is good. * This managed connection can be in a transaction (uowCoord != null) but it still should be ok to release it to the free pool * * if resource failover is enabled and we are in current mode 102, since we are now using the alternate * resource adapter, instead of considering this connection ok, lets remove it. When the pool fails back we * do not what to risk having pooled bad connections. */ if (isTraceOn && tc.isDebugEnabled()) { if (uowCoord != null) { Tr.debug(this, tc, "getConnection failed for using uow is " + uowCoord + " tran wrapper id is " + mcWrapper.getTranWrapperId() + " handle count is " + mcWrapper.getHandleCount()); } else { Tr.debug(this, tc, "getConnection failed for using uow is null" + " tran wrapper id is " + mcWrapper.getTranWrapperId() + " handle count is " + mcWrapper.getHandleCount()); } } if (mcWrapper.do_not_reuse_mcw) { if (mcWrapper.getTranWrapperId() == MCWrapper.LOCALTXWRAPPER) { if (!mcWrapper.getLocalTransactionWrapper().isEnlisted() && !mcWrapper.getLocalTransactionWrapper().isRegisteredForSync()) { // We are not enlisted or registered, we need to remove this connection since after completion will not be called. // Null the uowCoord and the following code will remove this connection from the pool. if (isTraceOn && tc.isDebugEnabled()) { Tr.debug(this, tc, "This connection is not registered for sync or enlisted in a transaction"); } uowCoord = null; if (mcWrapper.getHandleCount() == 1) { /* * Since the resource adater call connection error event, they should not have returned * a connection handle. Since we are not enlisted or registered, we can decrement the * handle count and let the following code cleanup and destory this managed connection. */ if (isTraceOn && tc.isDebugEnabled()) { Tr.debug(this, tc, "Decrementing the handle count for clean up and destroying the managed connection."); } mcWrapper.decrementHandleCount(); } } } } if ((uowCoord == null || (mcWrapper.getTranWrapperId() == MCWrapper.NOTXWRAPPER)) && mcWrapper.getHandleCount() == 0) { try { if (isTraceOn && tc.isDebugEnabled()) { Tr.debug(this, tc, "Connection error occurred during getConnection to resource adapter. The managed connection should be good, moving it to free pool."); } mcWrapper.releaseToPoolManager(); } catch (Exception exp) { // don't rethrow, already on exception path com.ibm.ws.ffdc.FFDCFilter.processException(exp, "com.ibm.ejs.j2c.ConnectionManager.allocateConnection", "364", this); Tr.error(tc, "FAILED_CONNECTION_RELEASE_J2CA0022", new Object[] { exp, _pm.gConfigProps.cfName }); } } if (isTraceOn && tc.isEntryEnabled()) { Tr.exit(this, tc, "allocateConnection"); } throw e; } catch (java.lang.Exception e) { mcWrapper.setPoolState(poolState); com.ibm.ws.ffdc.FFDCFilter.processException(e, "com.ibm.ejs.j2c.ConnectionManager.allocateConnection", "372", this); Tr.error(tc, "FAILED_CONNECTION_J2CA0021", new Object[] { e, _pm.gConfigProps.cfName }); /* * If the Resource Adapter throws an Exception and we are not in a * transaction and there are no other connections open on the ManagedConnection, * return the ManagedConnection to the pool before * rethrowing the exception. The ManagedConnection is probably OK - the exception * may only be a logon failure or similar so the MC shouldn't be 'lost'. * * If we are in a transaction, just throw the exception. Assume we will cleanup during * the aftercompletion call on the tran wrapper. * * - for resource adapter that support NOTXWRAPPER, if an error occurs, we can move them from the inuse * pool, to the free pool, assuming the managed connection is good. * This managed connection can be in a transaction (uowCoord != null) but it still should be ok to release it to the free pool */ if (isTraceOn && tc.isDebugEnabled()) { if (uowCoord != null) { Tr.debug(this, tc, "getConnection failed for using uow is " + uowCoord + " tran wrapper id is " + mcWrapper.getTranWrapperId() + " handle count is " + mcWrapper.getHandleCount()); } else { Tr.debug(this, tc, "getConnection failed for using uow is null" + " tran wrapper id is " + mcWrapper.getTranWrapperId() + " handle count is " + mcWrapper.getHandleCount()); } } if ((uowCoord == null || (mcWrapper.getTranWrapperId() == MCWrapper.NOTXWRAPPER)) && mcWrapper.getHandleCount() == 0) { try { if (isTraceOn && tc.isDebugEnabled()) { Tr.debug(this, tc, "Connection error occurred during getConnection to resource adapter. The managed connection should be good, moving it to free pool."); } mcWrapper.releaseToPoolManager(); } catch (Exception exp) { // don't rethrow, already on exception path com.ibm.ws.ffdc.FFDCFilter.processException(exp, "com.ibm.ejs.j2c.ConnectionManager.allocateConnection", "392", this); Tr.error(tc, "FAILED_CONNECTION_RELEASE_J2CA0022", new Object[] { exp, _pm.gConfigProps.cfName }); } } ResourceException re = new ResourceException("allocateConnection: caught Exception"); re.initCause(e); throw re; } if (_pm != null && (!(_pm.gConfigProps.isSmartHandleSupport() && shareable))) { HandleList hl = null; // store the handle list in the MCWrapper mcWrapper.addToHandleList(rVal, hl); } boolean connLeakOrmaxNumThreads = ((isTraceOn && ConnLeakLogic.isDebugEnabled()) || (_pm != null && _pm.maxNumberOfMCsAllowableInThread > 0)); boolean usingTLS = ((isTraceOn && tc.isDebugEnabled()) && (_pm != null && _pm.maxCapacity > 0)); if (connLeakOrmaxNumThreads || usingTLS) { // add thread information to mcWrapper Thread myThread = Thread.currentThread(); mcWrapper.setThreadID(RasHelper.getThreadId()); mcWrapper.setThreadName(myThread.getName()); if (connLeakOrmaxNumThreads) { // add current time and stack information if (mcWrapper.getLastAllocationTime() == 0) mcWrapper.setLastAllocationTime(mcWrapper.getHoldTimeStart()); else mcWrapper.setLastAllocationTime(System.currentTimeMillis()); if (mcWrapper.getInitialRequestStackTrace() == null) { Throwable t = new Throwable(); mcWrapper.setInitialRequestStackTrace(t); } } } } // end try block // NOTE: Only a "finally" clause is implemented. // No catch is done, because prior processing // is already covered by catch clauses in // either Connection Manager or other services // which will record the error and then // percolate up to the finally clause. The // "finally" processing MUST be done to ensure // any thread identity pushed to the OS // thread is removed and the original identity // is restored. finally { if (credTokenObj != null) { securityHelper.afterGettingConnection(subj, requestInfo, credTokenObj); } } if (isTraceOn && tc.isEntryEnabled()) { Tr.exit(this, tc, "allocateConnection", rVal==null?" connection handle is null":Integer.toHexString(rVal.hashCode())); } return rVal; }
class class_name[name] begin[{] method[allocateConnection, return_type[type[Object]], modifier[public], parameter[factory, requestInfo]] begin[{] local_variable[type[boolean], isTraceOn] if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[THIS[], member[.tc], literal["allocateConnection"]]] else begin[{] None end[}] if[binary_operation[member[._pm], ==, literal[null]]] begin[{] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[THIS[], member[.tc], binary_operation[literal["This should not happen! pm was null for cf name "], +, call[cmConfig.getCfKey, parameter[]]]]] else begin[{] None end[}] local_variable[type[String], formattedMessage] local_variable[type[java], re] call[Tr.error, parameter[member[.tc], literal["FAILED_MANAGED_CONNECTION_J2CA0020"], member[.re]]] ThrowStatement(expression=MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] None end[}] local_variable[type[UOWCurrent], uowCurrent] local_variable[type[UOWCoordinator], uowCoord] local_variable[type[Subject], subj] if[binary_operation[member[.isTraceOn], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[THIS[], member[.tc], binary_operation[literal["This CM is "], +, THIS[call[None.toString, parameter[]]]]]] call[Tr.debug, parameter[THIS[], member[.tc], binary_operation[literal["Input MCF is "], +, member[.factory]]]] else begin[{] None end[}] local_variable[type[Object], rVal] local_variable[type[Object], credTokenObj] local_variable[type[MCWrapper], mcWrapper] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=credTokenObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=subj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=requestInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=beforeGettingConnection, postfix_operators=[], prefix_operators=[], qualifier=securityHelper, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mcWrapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=requestInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=subj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=uowCoord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=allocateMCWrapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mcWrapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=uowCoord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=involveMCInTran, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getPoolState, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), name=poolState)], modifiers=set(), type=BasicType(dimensions=[], name=int)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=50)], member=setPoolState, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=rVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=subj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=requestInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getConnection, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=poolState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setPoolState, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=do_not_reuse_mcw, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Connection error occurred for this mcw "), operandr=MemberReference(member=mcWrapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", mcw will not be reuse"), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=markStale, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Resource adatepr called connection error event during getConnection "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="processing and did not throw a resource exception. The reason for "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="this falue may have been logged during the connection error event "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="logging."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ResourceException, sub_type=None)), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ResourceException, sub_type=None)), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=poolState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setPoolState, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ejs.j2c.ConnectionManager.allocateConnection"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="344"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ws.ffdc.FFDCFilter, 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="FAILED_CONNECTION_J2CA0021"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cfName, postfix_operators=[], prefix_operators=[], qualifier=_pm.gConfigProps, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=uowCoord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getConnection failed for using uow is null"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" tran wrapper id is "), operator=+), operandr=MethodInvocation(arguments=[], member=getTranWrapperId, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" handle count is "), operator=+), operandr=MethodInvocation(arguments=[], member=getHandleCount, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], 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=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getConnection failed for using uow is "), operandr=MemberReference(member=uowCoord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" tran wrapper id is "), operator=+), operandr=MethodInvocation(arguments=[], member=getTranWrapperId, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" handle count is "), operator=+), operandr=MethodInvocation(arguments=[], member=getHandleCount, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=MemberReference(member=do_not_reuse_mcw, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTranWrapperId, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operandr=MemberReference(member=LOCALTXWRAPPER, postfix_operators=[], prefix_operators=[], qualifier=MCWrapper, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getLocalTransactionWrapper, postfix_operators=[], prefix_operators=['!'], qualifier=mcWrapper, selectors=[MethodInvocation(arguments=[], member=isEnlisted, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getLocalTransactionWrapper, postfix_operators=[], prefix_operators=['!'], qualifier=mcWrapper, selectors=[MethodInvocation(arguments=[], member=isRegisteredForSync, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="This connection is not registered for sync or enlisted in a transaction")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=uowCoord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHandleCount, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Decrementing the handle count for clean up and destroying the managed connection.")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=decrementHandleCount, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None)]))]))]))])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=uowCoord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTranWrapperId, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operandr=MemberReference(member=NOTXWRAPPER, postfix_operators=[], prefix_operators=[], qualifier=MCWrapper, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHandleCount, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, 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=[TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Connection error occurred during getConnection to resource adapter. The managed connection should be good, moving it to free pool.")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=releaseToPoolManager, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ejs.j2c.ConnectionManager.allocateConnection"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="364"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ws.ffdc.FFDCFilter, 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="FAILED_CONNECTION_RELEASE_J2CA0022"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=exp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cfName, postfix_operators=[], prefix_operators=[], qualifier=_pm.gConfigProps, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exp, types=['Exception']))], finally_block=None, label=None, resources=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isEntryEnabled, 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=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="allocateConnection")], member=exit, postfix_operators=[], prefix_operators=[], qualifier=Tr, 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=['ResourceException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=poolState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setPoolState, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ejs.j2c.ConnectionManager.allocateConnection"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="372"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ws.ffdc.FFDCFilter, 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="FAILED_CONNECTION_J2CA0021"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cfName, postfix_operators=[], prefix_operators=[], qualifier=_pm.gConfigProps, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=uowCoord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getConnection failed for using uow is null"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" tran wrapper id is "), operator=+), operandr=MethodInvocation(arguments=[], member=getTranWrapperId, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" handle count is "), operator=+), operandr=MethodInvocation(arguments=[], member=getHandleCount, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], 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=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getConnection failed for using uow is "), operandr=MemberReference(member=uowCoord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" tran wrapper id is "), operator=+), operandr=MethodInvocation(arguments=[], member=getTranWrapperId, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" handle count is "), operator=+), operandr=MethodInvocation(arguments=[], member=getHandleCount, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=uowCoord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTranWrapperId, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operandr=MemberReference(member=NOTXWRAPPER, postfix_operators=[], prefix_operators=[], qualifier=MCWrapper, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHandleCount, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, 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=[TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Connection error occurred during getConnection to resource adapter. The managed connection should be good, moving it to free pool.")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=releaseToPoolManager, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ejs.j2c.ConnectionManager.allocateConnection"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="392"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ws.ffdc.FFDCFilter, 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="FAILED_CONNECTION_RELEASE_J2CA0022"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=exp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cfName, postfix_operators=[], prefix_operators=[], qualifier=_pm.gConfigProps, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exp, types=['Exception']))], finally_block=None, label=None, resources=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="allocateConnection: caught Exception")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ResourceException, sub_type=None)), name=re)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ResourceException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initCause, postfix_operators=[], prefix_operators=[], qualifier=re, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['java.lang.Exception']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=_pm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isSmartHandleSupport, postfix_operators=[], prefix_operators=[], qualifier=_pm.gConfigProps, selectors=[], type_arguments=None), operandr=MemberReference(member=shareable, 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=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=hl)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HandleList, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=rVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addToHandleList, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=ConnLeakLogic, selectors=[], type_arguments=None), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=_pm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=maxNumberOfMCsAllowableInThread, postfix_operators=[], prefix_operators=[], qualifier=_pm, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), operator=||), name=connLeakOrmaxNumThreads)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=isTraceOn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=_pm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=maxCapacity, postfix_operators=[], prefix_operators=[], qualifier=_pm, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), operator=&&), name=usingTLS)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=connLeakOrmaxNumThreads, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=usingTLS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[], type_arguments=None), name=myThread)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Thread, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getThreadId, postfix_operators=[], prefix_operators=[], qualifier=RasHelper, selectors=[], type_arguments=None)], member=setThreadID, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=myThread, selectors=[], type_arguments=None)], member=setThreadName, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=connLeakOrmaxNumThreads, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getLastAllocationTime, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None)], member=setLastAllocationTime, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHoldTimeStart, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None)], member=setLastAllocationTime, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getInitialRequestStackTrace, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Throwable, sub_type=None)), name=t)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setInitialRequestStackTrace, postfix_operators=[], prefix_operators=[], qualifier=mcWrapper, selectors=[], type_arguments=None), label=None)]))]))]))], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=credTokenObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=subj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=requestInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=credTokenObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=afterGettingConnection, postfix_operators=[], prefix_operators=[], qualifier=securityHelper, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) if[binary_operation[member[.isTraceOn], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[THIS[], member[.tc], literal["allocateConnection"], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=rVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=hashCode, postfix_operators=[], prefix_operators=[], qualifier=rVal, selectors=[], type_arguments=None)], member=toHexString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" connection handle is null"))]] else begin[{] None end[}] return[member[.rVal]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[allocateConnection] operator[SEP] identifier[ManagedConnectionFactory] identifier[factory] , identifier[ConnectionRequestInfo] identifier[requestInfo] operator[SEP] Keyword[throws] identifier[ResourceException] { Keyword[final] Keyword[boolean] identifier[isTraceOn] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[_pm] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[cmConfig] operator[SEP] identifier[getCfKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[formattedMessage] operator[=] identifier[CommonFunction] operator[SEP] identifier[getNLSMessage] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[cmConfig] operator[SEP] identifier[getJNDIName] operator[SEP] operator[SEP] operator[==] Other[null] operator[?] identifier[cmConfig] operator[SEP] identifier[getCfKey] operator[SEP] operator[SEP] operator[:] identifier[cmConfig] operator[SEP] identifier[getJNDIName] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[IllegalStateException] identifier[re] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[IllegalStateException] operator[SEP] identifier[formattedMessage] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[re] operator[SEP] operator[SEP] Keyword[throw] identifier[re] operator[SEP] } identifier[UOWCurrent] identifier[uowCurrent] operator[=] operator[SEP] identifier[UOWCurrent] operator[SEP] identifier[_pm] operator[SEP] identifier[connectorSvc] operator[SEP] identifier[transactionManager] operator[SEP] identifier[UOWCoordinator] identifier[uowCoord] operator[=] identifier[uowCurrent] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[uowCurrent] operator[SEP] identifier[getUOWCoord] operator[SEP] operator[SEP] operator[SEP] identifier[Subject] identifier[subj] operator[=] identifier[getFinalSubject] operator[SEP] identifier[requestInfo] , identifier[factory] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] Keyword[this] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[factory] operator[SEP] operator[SEP] } identifier[Object] identifier[rVal] operator[=] Other[null] operator[SEP] identifier[Object] identifier[credTokenObj] operator[=] Other[null] operator[SEP] identifier[MCWrapper] identifier[mcWrapper] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[credTokenObj] operator[=] identifier[securityHelper] operator[SEP] identifier[beforeGettingConnection] operator[SEP] identifier[subj] , identifier[requestInfo] operator[SEP] operator[SEP] identifier[mcWrapper] operator[=] identifier[allocateMCWrapper] operator[SEP] identifier[factory] , identifier[requestInfo] , identifier[subj] , identifier[uowCoord] operator[SEP] operator[SEP] identifier[involveMCInTran] operator[SEP] identifier[mcWrapper] , identifier[uowCoord] , Keyword[this] operator[SEP] operator[SEP] Keyword[int] identifier[poolState] operator[=] identifier[mcWrapper] operator[SEP] identifier[getPoolState] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[mcWrapper] operator[SEP] identifier[setPoolState] operator[SEP] Other[50] operator[SEP] operator[SEP] identifier[rVal] operator[=] identifier[mcWrapper] operator[SEP] identifier[getConnection] operator[SEP] identifier[subj] , identifier[requestInfo] operator[SEP] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[setPoolState] operator[SEP] identifier[poolState] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[do_not_reuse_mcw] operator[SEP] { Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[mcWrapper] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[mcWrapper] operator[SEP] identifier[markStale] operator[SEP] operator[SEP] operator[SEP] identifier[ResourceException] identifier[e] operator[=] Keyword[new] identifier[ResourceException] operator[SEP] literal[String] operator[+] literal[String] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } } Keyword[catch] operator[SEP] identifier[ResourceException] identifier[e] operator[SEP] { identifier[mcWrapper] operator[SEP] identifier[setPoolState] operator[SEP] identifier[poolState] operator[SEP] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[ffdc] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[e] , identifier[_pm] operator[SEP] identifier[gConfigProps] operator[SEP] identifier[cfName] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[uowCoord] operator[!=] Other[null] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[uowCoord] operator[+] literal[String] operator[+] identifier[mcWrapper] operator[SEP] identifier[getTranWrapperId] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[mcWrapper] operator[SEP] identifier[getHandleCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] literal[String] operator[+] identifier[mcWrapper] operator[SEP] identifier[getTranWrapperId] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[mcWrapper] operator[SEP] identifier[getHandleCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[do_not_reuse_mcw] operator[SEP] { Keyword[if] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[getTranWrapperId] operator[SEP] operator[SEP] operator[==] identifier[MCWrapper] operator[SEP] identifier[LOCALTXWRAPPER] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[mcWrapper] operator[SEP] identifier[getLocalTransactionWrapper] operator[SEP] operator[SEP] operator[SEP] identifier[isEnlisted] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[mcWrapper] operator[SEP] identifier[getLocalTransactionWrapper] operator[SEP] operator[SEP] operator[SEP] identifier[isRegisteredForSync] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] } identifier[uowCoord] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[getHandleCount] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] } identifier[mcWrapper] operator[SEP] identifier[decrementHandleCount] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[if] operator[SEP] operator[SEP] identifier[uowCoord] operator[==] Other[null] operator[||] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[getTranWrapperId] operator[SEP] operator[SEP] operator[==] identifier[MCWrapper] operator[SEP] identifier[NOTXWRAPPER] operator[SEP] operator[SEP] operator[&&] identifier[mcWrapper] operator[SEP] identifier[getHandleCount] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] } identifier[mcWrapper] operator[SEP] identifier[releaseToPoolManager] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[exp] operator[SEP] { identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[ffdc] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[exp] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[exp] , identifier[_pm] operator[SEP] identifier[gConfigProps] operator[SEP] identifier[cfName] } operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[mcWrapper] operator[SEP] identifier[setPoolState] operator[SEP] identifier[poolState] operator[SEP] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[ffdc] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[e] , identifier[_pm] operator[SEP] identifier[gConfigProps] operator[SEP] identifier[cfName] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[uowCoord] operator[!=] Other[null] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[uowCoord] operator[+] literal[String] operator[+] identifier[mcWrapper] operator[SEP] identifier[getTranWrapperId] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[mcWrapper] operator[SEP] identifier[getHandleCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] literal[String] operator[+] identifier[mcWrapper] operator[SEP] identifier[getTranWrapperId] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[mcWrapper] operator[SEP] identifier[getHandleCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[SEP] identifier[uowCoord] operator[==] Other[null] operator[||] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[getTranWrapperId] operator[SEP] operator[SEP] operator[==] identifier[MCWrapper] operator[SEP] identifier[NOTXWRAPPER] operator[SEP] operator[SEP] operator[&&] identifier[mcWrapper] operator[SEP] identifier[getHandleCount] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] } identifier[mcWrapper] operator[SEP] identifier[releaseToPoolManager] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[exp] operator[SEP] { identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[ffdc] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[exp] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[exp] , identifier[_pm] operator[SEP] identifier[gConfigProps] operator[SEP] identifier[cfName] } operator[SEP] operator[SEP] } } identifier[ResourceException] identifier[re] operator[=] Keyword[new] identifier[ResourceException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[re] operator[SEP] identifier[initCause] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[re] operator[SEP] } Keyword[if] operator[SEP] identifier[_pm] operator[!=] Other[null] operator[&&] operator[SEP] operator[!] operator[SEP] identifier[_pm] operator[SEP] identifier[gConfigProps] operator[SEP] identifier[isSmartHandleSupport] operator[SEP] operator[SEP] operator[&&] identifier[shareable] operator[SEP] operator[SEP] operator[SEP] { identifier[HandleList] identifier[hl] operator[=] Other[null] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[addToHandleList] operator[SEP] identifier[rVal] , identifier[hl] operator[SEP] operator[SEP] } Keyword[boolean] identifier[connLeakOrmaxNumThreads] operator[=] operator[SEP] operator[SEP] identifier[isTraceOn] operator[&&] identifier[ConnLeakLogic] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[_pm] operator[!=] Other[null] operator[&&] identifier[_pm] operator[SEP] identifier[maxNumberOfMCsAllowableInThread] operator[>] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[usingTLS] operator[=] operator[SEP] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[_pm] operator[!=] Other[null] operator[&&] identifier[_pm] operator[SEP] identifier[maxCapacity] operator[>] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[connLeakOrmaxNumThreads] operator[||] identifier[usingTLS] operator[SEP] { identifier[Thread] identifier[myThread] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[setThreadID] operator[SEP] identifier[RasHelper] operator[SEP] identifier[getThreadId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[setThreadName] operator[SEP] identifier[myThread] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[connLeakOrmaxNumThreads] operator[SEP] { Keyword[if] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[getLastAllocationTime] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[setLastAllocationTime] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[getHoldTimeStart] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[mcWrapper] operator[SEP] identifier[setLastAllocationTime] operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[getInitialRequestStackTrace] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[Throwable] identifier[t] operator[=] Keyword[new] identifier[Throwable] operator[SEP] operator[SEP] operator[SEP] identifier[mcWrapper] operator[SEP] identifier[setInitialRequestStackTrace] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } } Keyword[finally] { Keyword[if] operator[SEP] identifier[credTokenObj] operator[!=] Other[null] operator[SEP] { identifier[securityHelper] operator[SEP] identifier[afterGettingConnection] operator[SEP] identifier[subj] , identifier[requestInfo] , identifier[credTokenObj] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isTraceOn] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[rVal] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[Integer] operator[SEP] identifier[toHexString] operator[SEP] identifier[rVal] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[rVal] operator[SEP] }
public String createOutputStreamAppender(String name, String pattern, String encoding, Collection<String> loggerNames, String levelStr, boolean recursive, boolean overrideLogLevel) { Level level = getLevel(levelStr); String encodingToUse = StringUtils.isEmpty(encoding) ? "UTF-8" : encoding; PatternLayout layout = PatternLayout.newBuilder() .withPattern(StringUtils.isEmpty(pattern) ? DEFAULT_PATTERN : pattern) .withCharset(Charset.forName(encodingToUse)) .build(); String appenderName = StringUtils.isEmpty(name) ? UUID.randomUUID().toString() : name; AdminToolLog4j2OutputStream baos = new AdminToolLog4j2OutputStream(4096, encodingToUse); outputStreams.put(appenderName, baos); OutputStreamAppender appender = OutputStreamAppender.newBuilder() .setName(appenderName) .setTarget(baos) .setLayout(layout) .setFollow(false) .build(); appender.start(); final LoggerContext ctx = (LoggerContext) LogManager.getContext(false); final Configuration config = ctx.getConfiguration(); config.addAppender(appender); Collection<String> parentLoggerNames = getParentLoggerNames(); Map<String, LoggerConfig> configs = getRecursiveLoggerConfigs(loggerNames, recursive, config); configs.entrySet().forEach(configEntry ->{ configEntry.getValue().addAppender(appender, level, null); if (overrideLogLevel) { baos.addOriginalLevel(configEntry.getKey(), configEntry.getValue().getLevel()); changeLogger(configEntry.getKey(), level, parentLoggerNames.contains(configEntry.getKey())); } }); ctx.updateLoggers(); return appenderName; }
class class_name[name] begin[{] method[createOutputStreamAppender, return_type[type[String]], modifier[public], parameter[name, pattern, encoding, loggerNames, levelStr, recursive, overrideLogLevel]] begin[{] local_variable[type[Level], level] local_variable[type[String], encodingToUse] local_variable[type[PatternLayout], layout] local_variable[type[String], appenderName] local_variable[type[AdminToolLog4j2OutputStream], baos] call[outputStreams.put, parameter[member[.appenderName], member[.baos]]] local_variable[type[OutputStreamAppender], appender] call[appender.start, parameter[]] local_variable[type[LoggerContext], ctx] local_variable[type[Configuration], config] call[config.addAppender, parameter[member[.appender]]] local_variable[type[Collection], parentLoggerNames] local_variable[type[Map], configs] call[configs.entrySet, parameter[]] call[ctx.updateLoggers, parameter[]] return[member[.appenderName]] end[}] END[}]
Keyword[public] identifier[String] identifier[createOutputStreamAppender] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[pattern] , identifier[String] identifier[encoding] , identifier[Collection] operator[<] identifier[String] operator[>] identifier[loggerNames] , identifier[String] identifier[levelStr] , Keyword[boolean] identifier[recursive] , Keyword[boolean] identifier[overrideLogLevel] operator[SEP] { identifier[Level] identifier[level] operator[=] identifier[getLevel] operator[SEP] identifier[levelStr] operator[SEP] operator[SEP] identifier[String] identifier[encodingToUse] operator[=] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[encoding] operator[SEP] operator[?] literal[String] operator[:] identifier[encoding] operator[SEP] identifier[PatternLayout] identifier[layout] operator[=] identifier[PatternLayout] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[withPattern] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[pattern] operator[SEP] operator[?] identifier[DEFAULT_PATTERN] operator[:] identifier[pattern] operator[SEP] operator[SEP] identifier[withCharset] operator[SEP] identifier[Charset] operator[SEP] identifier[forName] operator[SEP] identifier[encodingToUse] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[appenderName] operator[=] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[name] operator[SEP] operator[?] identifier[UUID] operator[SEP] identifier[randomUUID] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[:] identifier[name] operator[SEP] identifier[AdminToolLog4j2OutputStream] identifier[baos] operator[=] Keyword[new] identifier[AdminToolLog4j2OutputStream] operator[SEP] Other[4096] , identifier[encodingToUse] operator[SEP] operator[SEP] identifier[outputStreams] operator[SEP] identifier[put] operator[SEP] identifier[appenderName] , identifier[baos] operator[SEP] operator[SEP] identifier[OutputStreamAppender] identifier[appender] operator[=] identifier[OutputStreamAppender] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setName] operator[SEP] identifier[appenderName] operator[SEP] operator[SEP] identifier[setTarget] operator[SEP] identifier[baos] operator[SEP] operator[SEP] identifier[setLayout] operator[SEP] identifier[layout] operator[SEP] operator[SEP] identifier[setFollow] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[appender] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[LoggerContext] identifier[ctx] operator[=] operator[SEP] identifier[LoggerContext] operator[SEP] identifier[LogManager] operator[SEP] identifier[getContext] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[final] identifier[Configuration] identifier[config] operator[=] identifier[ctx] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[config] operator[SEP] identifier[addAppender] operator[SEP] identifier[appender] operator[SEP] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[parentLoggerNames] operator[=] identifier[getParentLoggerNames] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[LoggerConfig] operator[>] identifier[configs] operator[=] identifier[getRecursiveLoggerConfigs] operator[SEP] identifier[loggerNames] , identifier[recursive] , identifier[config] operator[SEP] operator[SEP] identifier[configs] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[configEntry] operator[->] { identifier[configEntry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[addAppender] operator[SEP] identifier[appender] , identifier[level] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[overrideLogLevel] operator[SEP] { identifier[baos] operator[SEP] identifier[addOriginalLevel] operator[SEP] identifier[configEntry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[configEntry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getLevel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[changeLogger] operator[SEP] identifier[configEntry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[level] , identifier[parentLoggerNames] operator[SEP] identifier[contains] operator[SEP] identifier[configEntry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[ctx] operator[SEP] identifier[updateLoggers] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[appenderName] operator[SEP] }
public static <C extends Compound> List<C> toList(Sequence<C> sequence) { List<C> list = new ArrayList<C>(sequence.getLength()); for (C compound : sequence) { list.add(compound); } return list; }
class class_name[name] begin[{] method[toList, return_type[type[List]], modifier[public static], parameter[sequence]] begin[{] local_variable[type[List], list] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=compound, 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=sequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=compound)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=C, sub_type=None))), label=None) return[member[.list]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[C] Keyword[extends] identifier[Compound] operator[>] identifier[List] operator[<] identifier[C] operator[>] identifier[toList] operator[SEP] identifier[Sequence] operator[<] identifier[C] operator[>] identifier[sequence] operator[SEP] { identifier[List] operator[<] identifier[C] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[C] operator[>] operator[SEP] identifier[sequence] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[C] identifier[compound] operator[:] identifier[sequence] operator[SEP] { identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[compound] operator[SEP] operator[SEP] } Keyword[return] identifier[list] operator[SEP] }
public boolean tryLock(String key, String request) { //get connection Object connection = getConnection(); String result ; if (connection instanceof Jedis){ result = ((Jedis) connection).set(lockPrefix + key, request, SET_IF_NOT_EXIST, SET_WITH_EXPIRE_TIME, 10 * TIME); ((Jedis) connection).close(); }else { result = ((JedisCluster) connection).set(lockPrefix + key, request, SET_IF_NOT_EXIST, SET_WITH_EXPIRE_TIME, 10 * TIME); } if (LOCK_MSG.equals(result)) { return true; } else { return false; } }
class class_name[name] begin[{] method[tryLock, return_type[type[boolean]], modifier[public], parameter[key, request]] begin[{] local_variable[type[Object], connection] local_variable[type[String], result] if[binary_operation[member[.connection], instanceof, type[Jedis]]] begin[{] assign[member[.result], Cast(expression=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Jedis, sub_type=None))] Cast(expression=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Jedis, sub_type=None)) else begin[{] assign[member[.result], Cast(expression=MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JedisCluster, sub_type=None))] end[}] if[call[LOCK_MSG.equals, parameter[member[.result]]]] begin[{] return[literal[true]] else begin[{] return[literal[false]] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[tryLock] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[request] operator[SEP] { identifier[Object] identifier[connection] operator[=] identifier[getConnection] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[result] operator[SEP] Keyword[if] operator[SEP] identifier[connection] Keyword[instanceof] identifier[Jedis] operator[SEP] { identifier[result] operator[=] operator[SEP] operator[SEP] identifier[Jedis] operator[SEP] identifier[connection] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[lockPrefix] operator[+] identifier[key] , identifier[request] , identifier[SET_IF_NOT_EXIST] , identifier[SET_WITH_EXPIRE_TIME] , Other[10] operator[*] identifier[TIME] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Jedis] operator[SEP] identifier[connection] operator[SEP] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[result] operator[=] operator[SEP] operator[SEP] identifier[JedisCluster] operator[SEP] identifier[connection] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[lockPrefix] operator[+] identifier[key] , identifier[request] , identifier[SET_IF_NOT_EXIST] , identifier[SET_WITH_EXPIRE_TIME] , Other[10] operator[*] identifier[TIME] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[LOCK_MSG] operator[SEP] identifier[equals] operator[SEP] identifier[result] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
public static <P> void addListWithIndex(final List<P> list, final P element, final int index) { ArgUtils.notNull(list, "list"); ArgUtils.notMin(index, 0, "index"); final int listSize = list.size(); if(listSize < index) { // 足りない場合は、要素を追加する。 final int lackSize = index - listSize; for(int i=0; i < lackSize; i++) { list.add(null); } list.add(element); } else if(listSize == index) { // 最後の要素に追加する list.add(element); } else { // リストのサイズが足りている場合 list.set(index, element); } }
class class_name[name] begin[{] method[addListWithIndex, return_type[void], modifier[public static], parameter[list, element, index]] begin[{] call[ArgUtils.notNull, parameter[member[.list], literal["list"]]] call[ArgUtils.notMin, parameter[member[.index], literal[0], literal["index"]]] local_variable[type[int], listSize] if[binary_operation[member[.listSize], <, member[.index]]] begin[{] local_variable[type[int], lackSize] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lackSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[list.add, parameter[member[.element]]] else begin[{] if[binary_operation[member[.listSize], ==, member[.index]]] begin[{] call[list.add, parameter[member[.element]]] else begin[{] call[list.set, parameter[member[.index], member[.element]]] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[P] operator[>] Keyword[void] identifier[addListWithIndex] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[P] operator[>] identifier[list] , Keyword[final] identifier[P] identifier[element] , Keyword[final] Keyword[int] identifier[index] operator[SEP] { identifier[ArgUtils] operator[SEP] identifier[notNull] operator[SEP] identifier[list] , literal[String] operator[SEP] operator[SEP] identifier[ArgUtils] operator[SEP] identifier[notMin] operator[SEP] identifier[index] , Other[0] , literal[String] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[listSize] operator[=] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[listSize] operator[<] identifier[index] operator[SEP] { Keyword[final] Keyword[int] identifier[lackSize] operator[=] identifier[index] operator[-] identifier[listSize] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[lackSize] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[list] operator[SEP] identifier[add] operator[SEP] Other[null] operator[SEP] operator[SEP] } identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[element] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[listSize] operator[==] identifier[index] operator[SEP] { identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[element] operator[SEP] operator[SEP] } Keyword[else] { identifier[list] operator[SEP] identifier[set] operator[SEP] identifier[index] , identifier[element] operator[SEP] operator[SEP] } }
public void setOuUsers(List<CmsUser> ouUsers) { m_ouUsers = ouUsers; getJsp().getRequest().getSession().setAttribute(A_CmsOrgUnitUsersList.ORGUNIT_USERS, m_ouUsers); }
class class_name[name] begin[{] method[setOuUsers, return_type[void], modifier[public], parameter[ouUsers]] begin[{] assign[member[.m_ouUsers], member[.ouUsers]] call[.getJsp, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOuUsers] operator[SEP] identifier[List] operator[<] identifier[CmsUser] operator[>] identifier[ouUsers] operator[SEP] { identifier[m_ouUsers] operator[=] identifier[ouUsers] operator[SEP] identifier[getJsp] operator[SEP] operator[SEP] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] identifier[setAttribute] operator[SEP] identifier[A_CmsOrgUnitUsersList] operator[SEP] identifier[ORGUNIT_USERS] , identifier[m_ouUsers] operator[SEP] operator[SEP] }
public final void abortAdd(final PersistentTransaction transaction) throws SevereMessageStoreException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "abortAdd", transaction); long _referredID = getTuple().getReferredID(); super.abortAdd(transaction); if (AbstractItem.NO_ID != _referredID) { MessageStoreImpl msi = getMessageStoreImpl(); ItemLink itemLink = (ItemLink) msi.getMembership(_referredID); if (null != itemLink) { itemLink.rollbackIncrementReferenceCount(transaction); } else { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { SibTr.debug(this, tc, "reference to non-existent item: " + _referredID); } } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "abortAdd"); }
class class_name[name] begin[{] method[abortAdd, return_type[void], modifier[final public], parameter[transaction]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["abortAdd"], member[.transaction]]] else begin[{] None end[}] local_variable[type[long], _referredID] SuperMethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=abortAdd, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) if[binary_operation[member[AbstractItem.NO_ID], !=, member[._referredID]]] begin[{] local_variable[type[MessageStoreImpl], msi] local_variable[type[ItemLink], itemLink] if[binary_operation[literal[null], !=, member[.itemLink]]] begin[{] call[itemLink.rollbackIncrementReferenceCount, parameter[member[.transaction]]] else begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], binary_operation[literal["reference to non-existent item: "], +, member[._referredID]]]] else begin[{] None end[}] end[}] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["abortAdd"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[abortAdd] operator[SEP] Keyword[final] identifier[PersistentTransaction] identifier[transaction] operator[SEP] Keyword[throws] identifier[SevereMessageStoreException] { 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[transaction] operator[SEP] operator[SEP] Keyword[long] identifier[_referredID] operator[=] identifier[getTuple] operator[SEP] operator[SEP] operator[SEP] identifier[getReferredID] operator[SEP] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[abortAdd] operator[SEP] identifier[transaction] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[AbstractItem] operator[SEP] identifier[NO_ID] operator[!=] identifier[_referredID] operator[SEP] { identifier[MessageStoreImpl] identifier[msi] operator[=] identifier[getMessageStoreImpl] operator[SEP] operator[SEP] operator[SEP] identifier[ItemLink] identifier[itemLink] operator[=] operator[SEP] identifier[ItemLink] operator[SEP] identifier[msi] operator[SEP] identifier[getMembership] operator[SEP] identifier[_referredID] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[itemLink] operator[SEP] { identifier[itemLink] operator[SEP] identifier[rollbackIncrementReferenceCount] operator[SEP] identifier[transaction] 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[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[_referredID] 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 boolean checkRequestAmount(WireRequest request) { boolean sufficientBalance = request.getAmount() < MAX_ALLOWABLE_AMOUNT; if (!sufficientBalance) { LOG.warning( String.format("Rejected excessive request of $%d", request.getAmount())); } return sufficientBalance; }
class class_name[name] begin[{] method[checkRequestAmount, return_type[type[boolean]], modifier[private static], parameter[request]] begin[{] local_variable[type[boolean], sufficientBalance] if[member[.sufficientBalance]] begin[{] call[LOG.warning, parameter[call[String.format, parameter[literal["Rejected excessive request of $%d"], call[request.getAmount, parameter[]]]]]] else begin[{] None end[}] return[member[.sufficientBalance]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[checkRequestAmount] operator[SEP] identifier[WireRequest] identifier[request] operator[SEP] { Keyword[boolean] identifier[sufficientBalance] operator[=] identifier[request] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] operator[<] identifier[MAX_ALLOWABLE_AMOUNT] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[sufficientBalance] operator[SEP] { identifier[LOG] operator[SEP] identifier[warning] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[request] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[sufficientBalance] operator[SEP] }
private void clearDeck(CdjStatus update) { if (hotCache.remove(DeckReference.getDeckReference(update.getDeviceNumber(), 0)) != null) { deliverTrackMetadataUpdate(update.getDeviceNumber(), null); } }
class class_name[name] begin[{] method[clearDeck, return_type[void], modifier[private], parameter[update]] begin[{] if[binary_operation[call[hotCache.remove, parameter[call[DeckReference.getDeckReference, parameter[call[update.getDeviceNumber, parameter[]], literal[0]]]]], !=, literal[null]]] begin[{] call[.deliverTrackMetadataUpdate, parameter[call[update.getDeviceNumber, parameter[]], literal[null]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[clearDeck] operator[SEP] identifier[CdjStatus] identifier[update] operator[SEP] { Keyword[if] operator[SEP] identifier[hotCache] operator[SEP] identifier[remove] operator[SEP] identifier[DeckReference] operator[SEP] identifier[getDeckReference] operator[SEP] identifier[update] operator[SEP] identifier[getDeviceNumber] operator[SEP] operator[SEP] , Other[0] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[deliverTrackMetadataUpdate] operator[SEP] identifier[update] operator[SEP] identifier[getDeviceNumber] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] } }
public int drainTo(@NotNull byte[] dest, int destOffset, int maxSize) { int s = maxSize; while (hasRemaining()) { ByteBuf buf = bufs[first]; int remaining = buf.readRemaining(); if (s < remaining) { arraycopy(buf.array(), buf.head(), dest, destOffset, s); buf.moveHead(s); return maxSize; } else { arraycopy(buf.array(), buf.head(), dest, destOffset, remaining); buf.recycle(); first = next(first); s -= remaining; destOffset += remaining; } } return maxSize - s; }
class class_name[name] begin[{] method[drainTo, return_type[type[int]], modifier[public], parameter[dest, destOffset, maxSize]] begin[{] local_variable[type[int], s] while[call[.hasRemaining, parameter[]]] begin[{] local_variable[type[ByteBuf], buf] local_variable[type[int], remaining] if[binary_operation[member[.s], <, member[.remaining]]] begin[{] call[.arraycopy, parameter[call[buf.array, parameter[]], call[buf.head, parameter[]], member[.dest], member[.destOffset], member[.s]]] call[buf.moveHead, parameter[member[.s]]] return[member[.maxSize]] else begin[{] call[.arraycopy, parameter[call[buf.array, parameter[]], call[buf.head, parameter[]], member[.dest], member[.destOffset], member[.remaining]]] call[buf.recycle, parameter[]] assign[member[.first], call[.next, parameter[member[.first]]]] assign[member[.s], member[.remaining]] assign[member[.destOffset], member[.remaining]] end[}] end[}] return[binary_operation[member[.maxSize], -, member[.s]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[drainTo] operator[SEP] annotation[@] identifier[NotNull] Keyword[byte] operator[SEP] operator[SEP] identifier[dest] , Keyword[int] identifier[destOffset] , Keyword[int] identifier[maxSize] operator[SEP] { Keyword[int] identifier[s] operator[=] identifier[maxSize] operator[SEP] Keyword[while] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] { identifier[ByteBuf] identifier[buf] operator[=] identifier[bufs] operator[SEP] identifier[first] operator[SEP] operator[SEP] Keyword[int] identifier[remaining] operator[=] identifier[buf] operator[SEP] identifier[readRemaining] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[<] identifier[remaining] operator[SEP] { identifier[arraycopy] operator[SEP] identifier[buf] operator[SEP] identifier[array] operator[SEP] operator[SEP] , identifier[buf] operator[SEP] identifier[head] operator[SEP] operator[SEP] , identifier[dest] , identifier[destOffset] , identifier[s] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[moveHead] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[return] identifier[maxSize] operator[SEP] } Keyword[else] { identifier[arraycopy] operator[SEP] identifier[buf] operator[SEP] identifier[array] operator[SEP] operator[SEP] , identifier[buf] operator[SEP] identifier[head] operator[SEP] operator[SEP] , identifier[dest] , identifier[destOffset] , identifier[remaining] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[recycle] operator[SEP] operator[SEP] operator[SEP] identifier[first] operator[=] identifier[next] operator[SEP] identifier[first] operator[SEP] operator[SEP] identifier[s] operator[-=] identifier[remaining] operator[SEP] identifier[destOffset] operator[+=] identifier[remaining] operator[SEP] } } Keyword[return] identifier[maxSize] operator[-] identifier[s] operator[SEP] }
public Map<String, BigDecimal> getKrakenBalance() throws IOException { KrakenBalanceResult balanceResult = kraken.balance( exchange.getExchangeSpecification().getApiKey(), signatureCreator, exchange.getNonceFactory()); return checkResult(balanceResult); }
class class_name[name] begin[{] method[getKrakenBalance, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[KrakenBalanceResult], balanceResult] return[call[.checkResult, parameter[member[.balanceResult]]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[BigDecimal] operator[>] identifier[getKrakenBalance] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[KrakenBalanceResult] identifier[balanceResult] operator[=] identifier[kraken] operator[SEP] identifier[balance] operator[SEP] identifier[exchange] operator[SEP] identifier[getExchangeSpecification] operator[SEP] operator[SEP] operator[SEP] identifier[getApiKey] operator[SEP] operator[SEP] , identifier[signatureCreator] , identifier[exchange] operator[SEP] identifier[getNonceFactory] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[checkResult] operator[SEP] identifier[balanceResult] operator[SEP] operator[SEP] }
@Override public void initialize(String keyStoreName, String keyStorePath, String keyStoreType, String keyStoreProvider, String keyStorePassword, String keyAlias) throws AuditSigningException { WsLocationAdmin locationAdmin = locationAdminRef.getService(); if (locationAdmin != null) { serverName = locationAdmin.getServerName(); } signerAlias = keyAlias; signerName = keyStoreName; signerKeyFileLocation = keyStorePath; crypto = new AuditCrypto(); String JCEProvider = null; try { signature = Signature.getInstance(CRYPTO_ALGORITHM); } catch (Exception e) { Tr.error(tc, "security.audit.signing.init.error", new Object[] { e }); throw new AuditSigningException(e.getMessage()); } long begin_time = 0; if (tc.isDebugEnabled()) { Tr.debug(tc, "Initializing audit signer at " + new java.util.Date(System.currentTimeMillis())); } }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[public], parameter[keyStoreName, keyStorePath, keyStoreType, keyStoreProvider, keyStorePassword, keyAlias]] begin[{] local_variable[type[WsLocationAdmin], locationAdmin] if[binary_operation[member[.locationAdmin], !=, literal[null]]] begin[{] assign[member[.serverName], call[locationAdmin.getServerName, parameter[]]] else begin[{] None end[}] assign[member[.signerAlias], member[.keyAlias]] assign[member[.signerName], member[.keyStoreName]] assign[member[.signerKeyFileLocation], member[.keyStorePath]] assign[member[.crypto], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AuditCrypto, sub_type=None))] local_variable[type[String], JCEProvider] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=signature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=CRYPTO_ALGORITHM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=Signature, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="security.audit.signing.init.error"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AuditSigningException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) local_variable[type[long], begin_time] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["Initializing audit signer at "], +, ClassCreator(arguments=[MethodInvocation(arguments=[], member=currentTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))))]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[initialize] operator[SEP] identifier[String] identifier[keyStoreName] , identifier[String] identifier[keyStorePath] , identifier[String] identifier[keyStoreType] , identifier[String] identifier[keyStoreProvider] , identifier[String] identifier[keyStorePassword] , identifier[String] identifier[keyAlias] operator[SEP] Keyword[throws] identifier[AuditSigningException] { identifier[WsLocationAdmin] identifier[locationAdmin] operator[=] identifier[locationAdminRef] operator[SEP] identifier[getService] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[locationAdmin] operator[!=] Other[null] operator[SEP] { identifier[serverName] operator[=] identifier[locationAdmin] operator[SEP] identifier[getServerName] operator[SEP] operator[SEP] operator[SEP] } identifier[signerAlias] operator[=] identifier[keyAlias] operator[SEP] identifier[signerName] operator[=] identifier[keyStoreName] operator[SEP] identifier[signerKeyFileLocation] operator[=] identifier[keyStorePath] operator[SEP] identifier[crypto] operator[=] Keyword[new] identifier[AuditCrypto] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[JCEProvider] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[signature] operator[=] identifier[Signature] operator[SEP] identifier[getInstance] operator[SEP] identifier[CRYPTO_ALGORITHM] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[e] } operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[AuditSigningException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[long] identifier[begin_time] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static LanguageTag parse(String languageTag, ParseStatus sts) { if (sts == null) { sts = new ParseStatus(); } else { sts.reset(); } StringTokenIterator itr; // Check if the tag is grandfathered String[] gfmap = GRANDFATHERED.get(LocaleUtils.toLowerString(languageTag)); if (gfmap != null) { // use preferred mapping itr = new StringTokenIterator(gfmap[1], SEP); } else { itr = new StringTokenIterator(languageTag, SEP); } LanguageTag tag = new LanguageTag(); // langtag must start with either language or privateuse if (tag.parseLanguage(itr, sts)) { tag.parseExtlangs(itr, sts); tag.parseScript(itr, sts); tag.parseRegion(itr, sts); tag.parseVariants(itr, sts); tag.parseExtensions(itr, sts); } tag.parsePrivateuse(itr, sts); if (!itr.isDone() && !sts.isError()) { String s = itr.current(); sts.errorIndex = itr.currentStart(); if (s.length() == 0) { sts.errorMsg = "Empty subtag"; } else { sts.errorMsg = "Invalid subtag: " + s; } } return tag; }
class class_name[name] begin[{] method[parse, return_type[type[LanguageTag]], modifier[public static], parameter[languageTag, sts]] begin[{] if[binary_operation[member[.sts], ==, literal[null]]] begin[{] assign[member[.sts], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseStatus, sub_type=None))] else begin[{] call[sts.reset, parameter[]] end[}] local_variable[type[StringTokenIterator], itr] local_variable[type[String], gfmap] if[binary_operation[member[.gfmap], !=, literal[null]]] begin[{] assign[member[.itr], ClassCreator(arguments=[MemberReference(member=gfmap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), MemberReference(member=SEP, 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=StringTokenIterator, sub_type=None))] else begin[{] assign[member[.itr], ClassCreator(arguments=[MemberReference(member=languageTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SEP, 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=StringTokenIterator, sub_type=None))] end[}] local_variable[type[LanguageTag], tag] if[call[tag.parseLanguage, parameter[member[.itr], member[.sts]]]] begin[{] call[tag.parseExtlangs, parameter[member[.itr], member[.sts]]] call[tag.parseScript, parameter[member[.itr], member[.sts]]] call[tag.parseRegion, parameter[member[.itr], member[.sts]]] call[tag.parseVariants, parameter[member[.itr], member[.sts]]] call[tag.parseExtensions, parameter[member[.itr], member[.sts]]] else begin[{] None end[}] call[tag.parsePrivateuse, parameter[member[.itr], member[.sts]]] if[binary_operation[call[itr.isDone, parameter[]], &&, call[sts.isError, parameter[]]]] begin[{] local_variable[type[String], s] assign[member[sts.errorIndex], call[itr.currentStart, parameter[]]] if[binary_operation[call[s.length, parameter[]], ==, literal[0]]] begin[{] assign[member[sts.errorMsg], literal["Empty subtag"]] else begin[{] assign[member[sts.errorMsg], binary_operation[literal["Invalid subtag: "], +, member[.s]]] end[}] else begin[{] None end[}] return[member[.tag]] end[}] END[}]
Keyword[public] Keyword[static] identifier[LanguageTag] identifier[parse] operator[SEP] identifier[String] identifier[languageTag] , identifier[ParseStatus] identifier[sts] operator[SEP] { Keyword[if] operator[SEP] identifier[sts] operator[==] Other[null] operator[SEP] { identifier[sts] operator[=] Keyword[new] identifier[ParseStatus] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[sts] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] } identifier[StringTokenIterator] identifier[itr] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[gfmap] operator[=] identifier[GRANDFATHERED] operator[SEP] identifier[get] operator[SEP] identifier[LocaleUtils] operator[SEP] identifier[toLowerString] operator[SEP] identifier[languageTag] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[gfmap] operator[!=] Other[null] operator[SEP] { identifier[itr] operator[=] Keyword[new] identifier[StringTokenIterator] operator[SEP] identifier[gfmap] operator[SEP] Other[1] operator[SEP] , identifier[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[itr] operator[=] Keyword[new] identifier[StringTokenIterator] operator[SEP] identifier[languageTag] , identifier[SEP] operator[SEP] operator[SEP] } identifier[LanguageTag] identifier[tag] operator[=] Keyword[new] identifier[LanguageTag] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tag] operator[SEP] identifier[parseLanguage] operator[SEP] identifier[itr] , identifier[sts] operator[SEP] operator[SEP] { identifier[tag] operator[SEP] identifier[parseExtlangs] operator[SEP] identifier[itr] , identifier[sts] operator[SEP] operator[SEP] identifier[tag] operator[SEP] identifier[parseScript] operator[SEP] identifier[itr] , identifier[sts] operator[SEP] operator[SEP] identifier[tag] operator[SEP] identifier[parseRegion] operator[SEP] identifier[itr] , identifier[sts] operator[SEP] operator[SEP] identifier[tag] operator[SEP] identifier[parseVariants] operator[SEP] identifier[itr] , identifier[sts] operator[SEP] operator[SEP] identifier[tag] operator[SEP] identifier[parseExtensions] operator[SEP] identifier[itr] , identifier[sts] operator[SEP] operator[SEP] } identifier[tag] operator[SEP] identifier[parsePrivateuse] operator[SEP] identifier[itr] , identifier[sts] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[itr] operator[SEP] identifier[isDone] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[sts] operator[SEP] identifier[isError] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[s] operator[=] identifier[itr] operator[SEP] identifier[current] operator[SEP] operator[SEP] operator[SEP] identifier[sts] operator[SEP] identifier[errorIndex] operator[=] identifier[itr] operator[SEP] identifier[currentStart] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[sts] operator[SEP] identifier[errorMsg] operator[=] literal[String] operator[SEP] } Keyword[else] { identifier[sts] operator[SEP] identifier[errorMsg] operator[=] literal[String] operator[+] identifier[s] operator[SEP] } } Keyword[return] identifier[tag] operator[SEP] }
@Override public List<CommercePriceEntry> getCommercePriceEntriesByUuidAndCompanyId( String uuid, long companyId) { return commercePriceEntryPersistence.findByUuid_C(uuid, companyId); }
class class_name[name] begin[{] method[getCommercePriceEntriesByUuidAndCompanyId, return_type[type[List]], modifier[public], parameter[uuid, companyId]] begin[{] return[call[commercePriceEntryPersistence.findByUuid_C, parameter[member[.uuid], member[.companyId]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommercePriceEntry] operator[>] identifier[getCommercePriceEntriesByUuidAndCompanyId] operator[SEP] identifier[String] identifier[uuid] , Keyword[long] identifier[companyId] operator[SEP] { Keyword[return] identifier[commercePriceEntryPersistence] operator[SEP] identifier[findByUuid_C] operator[SEP] identifier[uuid] , identifier[companyId] operator[SEP] operator[SEP] }
public java.util.List<? extends com.google.privacy.dlp.v2.FieldIdOrBuilder> getHeadersOrBuilderList() { return headers_; }
class class_name[name] begin[{] method[getHeadersOrBuilderList, return_type[type[java]], modifier[public], parameter[]] begin[{] return[member[.headers_]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[privacy] operator[SEP] identifier[dlp] operator[SEP] identifier[v2] operator[SEP] identifier[FieldIdOrBuilder] operator[>] identifier[getHeadersOrBuilderList] operator[SEP] operator[SEP] { Keyword[return] identifier[headers_] operator[SEP] }
private static String byte2hex(byte[] b) { StringBuilder hs = new StringBuilder(); String stmp; for (int n = 0; b!=null && n < b.length; n++) { stmp = Integer.toHexString(b[n] & 0XFF); if (stmp.length() == 1) hs.append('0'); hs.append(stmp); } return hs.toString().toUpperCase(); }
class class_name[name] begin[{] method[byte2hex, return_type[type[String]], modifier[private static], parameter[b]] begin[{] local_variable[type[StringBuilder], hs] local_variable[type[String], stmp] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=stmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0XFF), operator=&)], member=toHexString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=stmp, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0')], member=append, postfix_operators=[], prefix_operators=[], qualifier=hs, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=hs, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[]), operator=<), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=n, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[hs.toString, parameter[]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[byte2hex] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[b] operator[SEP] { identifier[StringBuilder] identifier[hs] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[stmp] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[n] operator[=] Other[0] operator[SEP] identifier[b] operator[!=] Other[null] operator[&&] identifier[n] operator[<] identifier[b] operator[SEP] identifier[length] operator[SEP] identifier[n] operator[++] operator[SEP] { identifier[stmp] operator[=] identifier[Integer] operator[SEP] identifier[toHexString] operator[SEP] identifier[b] operator[SEP] identifier[n] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[stmp] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] identifier[hs] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[hs] operator[SEP] identifier[append] operator[SEP] identifier[stmp] operator[SEP] operator[SEP] } Keyword[return] identifier[hs] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] }
@Override public java.util.concurrent.Future<ListJobsResult> listJobsAsync(com.amazonaws.handlers.AsyncHandler<ListJobsRequest, ListJobsResult> asyncHandler) { return listJobsAsync(new ListJobsRequest(), asyncHandler); }
class class_name[name] begin[{] method[listJobsAsync, return_type[type[java]], modifier[public], parameter[asyncHandler]] begin[{] return[call[.listJobsAsync, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ListJobsRequest, sub_type=None)), member[.asyncHandler]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[concurrent] operator[SEP] identifier[Future] operator[<] identifier[ListJobsResult] operator[>] identifier[listJobsAsync] operator[SEP] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[handlers] operator[SEP] identifier[AsyncHandler] operator[<] identifier[ListJobsRequest] , identifier[ListJobsResult] operator[>] identifier[asyncHandler] operator[SEP] { Keyword[return] identifier[listJobsAsync] operator[SEP] Keyword[new] identifier[ListJobsRequest] operator[SEP] operator[SEP] , identifier[asyncHandler] operator[SEP] operator[SEP] }
public MemorySegment[] getNextBuffers(int bufferSize) { MemorySegment[] memorySegments = new MemorySegment[bufferSize]; for (int i = 0; i < bufferSize; i++) { MemorySegment nextBuffer = getNextBuffer(); if (nextBuffer == null) { throw new RuntimeException("No enough buffers!"); } memorySegments[i] = nextBuffer; } return memorySegments; }
class class_name[name] begin[{] method[getNextBuffers, return_type[type[MemorySegment]], modifier[public], parameter[bufferSize]] begin[{] local_variable[type[MemorySegment], memorySegments] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getNextBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=nextBuffer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MemorySegment, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nextBuffer, 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=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No enough buffers!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=memorySegments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=nextBuffer, 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=bufferSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.memorySegments]] end[}] END[}]
Keyword[public] identifier[MemorySegment] operator[SEP] operator[SEP] identifier[getNextBuffers] operator[SEP] Keyword[int] identifier[bufferSize] operator[SEP] { identifier[MemorySegment] operator[SEP] operator[SEP] identifier[memorySegments] operator[=] Keyword[new] identifier[MemorySegment] operator[SEP] identifier[bufferSize] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[bufferSize] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[MemorySegment] identifier[nextBuffer] operator[=] identifier[getNextBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nextBuffer] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[memorySegments] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[nextBuffer] operator[SEP] } Keyword[return] identifier[memorySegments] operator[SEP] }
public void marshall(Fleet fleet, ProtocolMarshaller protocolMarshaller) { if (fleet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(fleet.getName(), NAME_BINDING); protocolMarshaller.marshall(fleet.getArn(), ARN_BINDING); protocolMarshaller.marshall(fleet.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(fleet.getLastDeploymentStatus(), LASTDEPLOYMENTSTATUS_BINDING); protocolMarshaller.marshall(fleet.getLastDeploymentJob(), LASTDEPLOYMENTJOB_BINDING); protocolMarshaller.marshall(fleet.getLastDeploymentTime(), LASTDEPLOYMENTTIME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[fleet, protocolMarshaller]] begin[{] if[binary_operation[member[.fleet], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=fleet, selectors=[], type_arguments=None), MemberReference(member=NAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getArn, postfix_operators=[], prefix_operators=[], qualifier=fleet, selectors=[], type_arguments=None), MemberReference(member=ARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCreatedAt, postfix_operators=[], prefix_operators=[], qualifier=fleet, selectors=[], type_arguments=None), MemberReference(member=CREATEDAT_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLastDeploymentStatus, postfix_operators=[], prefix_operators=[], qualifier=fleet, selectors=[], type_arguments=None), MemberReference(member=LASTDEPLOYMENTSTATUS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLastDeploymentJob, postfix_operators=[], prefix_operators=[], qualifier=fleet, selectors=[], type_arguments=None), MemberReference(member=LASTDEPLOYMENTJOB_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLastDeploymentTime, postfix_operators=[], prefix_operators=[], qualifier=fleet, selectors=[], type_arguments=None), MemberReference(member=LASTDEPLOYMENTTIME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Fleet] identifier[fleet] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[fleet] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fleet] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fleet] operator[SEP] identifier[getArn] operator[SEP] operator[SEP] , identifier[ARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fleet] operator[SEP] identifier[getCreatedAt] operator[SEP] operator[SEP] , identifier[CREATEDAT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fleet] operator[SEP] identifier[getLastDeploymentStatus] operator[SEP] operator[SEP] , identifier[LASTDEPLOYMENTSTATUS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fleet] operator[SEP] identifier[getLastDeploymentJob] operator[SEP] operator[SEP] , identifier[LASTDEPLOYMENTJOB_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fleet] operator[SEP] identifier[getLastDeploymentTime] operator[SEP] operator[SEP] , identifier[LASTDEPLOYMENTTIME_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static int findOffsetFromCodePoint(StringBuffer source, int offset32) { char ch; int size = source.length(), result = 0, count = offset32; if (offset32 < 0 || offset32 > size) { throw new StringIndexOutOfBoundsException(offset32); } while (result < size && count > 0) { ch = source.charAt(result); if (isLeadSurrogate(ch) && ((result + 1) < size) && isTrailSurrogate(source.charAt(result + 1))) { result++; } count--; result++; } if (count != 0) { throw new StringIndexOutOfBoundsException(offset32); } return result; }
class class_name[name] begin[{] method[findOffsetFromCodePoint, return_type[type[int]], modifier[public static], parameter[source, offset32]] begin[{] local_variable[type[char], ch] local_variable[type[int], size] if[binary_operation[binary_operation[member[.offset32], <, literal[0]], ||, binary_operation[member[.offset32], >, member[.size]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=offset32, 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=StringIndexOutOfBoundsException, sub_type=None)), label=None) else begin[{] None end[}] while[binary_operation[binary_operation[member[.result], <, member[.size]], &&, binary_operation[member[.count], >, literal[0]]]] begin[{] assign[member[.ch], call[source.charAt, parameter[member[.result]]]] if[binary_operation[binary_operation[call[.isLeadSurrogate, parameter[member[.ch]]], &&, binary_operation[binary_operation[member[.result], +, literal[1]], <, member[.size]]], &&, call[.isTrailSurrogate, parameter[call[source.charAt, parameter[binary_operation[member[.result], +, literal[1]]]]]]]] begin[{] member[.result] else begin[{] None end[}] member[.count] member[.result] end[}] if[binary_operation[member[.count], !=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=offset32, 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=StringIndexOutOfBoundsException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[findOffsetFromCodePoint] operator[SEP] identifier[StringBuffer] identifier[source] , Keyword[int] identifier[offset32] operator[SEP] { Keyword[char] identifier[ch] operator[SEP] Keyword[int] identifier[size] operator[=] identifier[source] operator[SEP] identifier[length] operator[SEP] operator[SEP] , identifier[result] operator[=] Other[0] , identifier[count] operator[=] identifier[offset32] operator[SEP] Keyword[if] operator[SEP] identifier[offset32] operator[<] Other[0] operator[||] identifier[offset32] operator[>] identifier[size] operator[SEP] { Keyword[throw] Keyword[new] identifier[StringIndexOutOfBoundsException] operator[SEP] identifier[offset32] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[result] operator[<] identifier[size] operator[&&] identifier[count] operator[>] Other[0] operator[SEP] { identifier[ch] operator[=] identifier[source] operator[SEP] identifier[charAt] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isLeadSurrogate] operator[SEP] identifier[ch] operator[SEP] operator[&&] operator[SEP] operator[SEP] identifier[result] operator[+] Other[1] operator[SEP] operator[<] identifier[size] operator[SEP] operator[&&] identifier[isTrailSurrogate] operator[SEP] identifier[source] operator[SEP] identifier[charAt] operator[SEP] identifier[result] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[++] operator[SEP] } identifier[count] operator[--] operator[SEP] identifier[result] operator[++] operator[SEP] } Keyword[if] operator[SEP] identifier[count] operator[!=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[StringIndexOutOfBoundsException] operator[SEP] identifier[offset32] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
static MultiLoopsStatistics run(final Object instance, final Method method, final List<?> args, final Method setUpForMethod, final Method tearDownForMethod, final Method setUpForLoop, final Method tearDownForLoop, final int threadNum, final long threadDelay, final int loopNum, final long loopDelay, final int roundNum) { return run(instance, method.getName(), method, args, setUpForMethod, tearDownForMethod, setUpForLoop, tearDownForLoop, threadNum, threadDelay, loopNum, loopDelay, roundNum); }
class class_name[name] begin[{] method[run, return_type[type[MultiLoopsStatistics]], modifier[static], parameter[instance, method, args, setUpForMethod, tearDownForMethod, setUpForLoop, tearDownForLoop, threadNum, threadDelay, loopNum, loopDelay, roundNum]] begin[{] return[call[.run, parameter[member[.instance], call[method.getName, parameter[]], member[.method], member[.args], member[.setUpForMethod], member[.tearDownForMethod], member[.setUpForLoop], member[.tearDownForLoop], member[.threadNum], member[.threadDelay], member[.loopNum], member[.loopDelay], member[.roundNum]]]] end[}] END[}]
Keyword[static] identifier[MultiLoopsStatistics] identifier[run] operator[SEP] Keyword[final] identifier[Object] identifier[instance] , Keyword[final] identifier[Method] identifier[method] , Keyword[final] identifier[List] operator[<] operator[?] operator[>] identifier[args] , Keyword[final] identifier[Method] identifier[setUpForMethod] , Keyword[final] identifier[Method] identifier[tearDownForMethod] , Keyword[final] identifier[Method] identifier[setUpForLoop] , Keyword[final] identifier[Method] identifier[tearDownForLoop] , Keyword[final] Keyword[int] identifier[threadNum] , Keyword[final] Keyword[long] identifier[threadDelay] , Keyword[final] Keyword[int] identifier[loopNum] , Keyword[final] Keyword[long] identifier[loopDelay] , Keyword[final] Keyword[int] identifier[roundNum] operator[SEP] { Keyword[return] identifier[run] operator[SEP] identifier[instance] , identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[method] , identifier[args] , identifier[setUpForMethod] , identifier[tearDownForMethod] , identifier[setUpForLoop] , identifier[tearDownForLoop] , identifier[threadNum] , identifier[threadDelay] , identifier[loopNum] , identifier[loopDelay] , identifier[roundNum] operator[SEP] operator[SEP] }
protected void handleBindException(String userDn, String username, Throwable cause) { if (logger.isDebugEnabled()) { logger.debug("Failed to bind as " + userDn + ": " + cause); } }
class class_name[name] begin[{] method[handleBindException, return_type[void], modifier[protected], parameter[userDn, username, cause]] begin[{] if[call[logger.isDebugEnabled, parameter[]]] begin[{] call[logger.debug, parameter[binary_operation[binary_operation[binary_operation[literal["Failed to bind as "], +, member[.userDn]], +, literal[": "]], +, member[.cause]]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[handleBindException] operator[SEP] identifier[String] identifier[userDn] , identifier[String] identifier[username] , identifier[Throwable] identifier[cause] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[userDn] operator[+] literal[String] operator[+] identifier[cause] operator[SEP] operator[SEP] } }
public static String getBaseName(String className) { int i = className.indexOf("$"); if (i == -1) return className; return className.substring(i + 1); }
class class_name[name] begin[{] method[getBaseName, return_type[type[String]], modifier[public static], parameter[className]] begin[{] local_variable[type[int], i] if[binary_operation[member[.i], ==, literal[1]]] begin[{] return[member[.className]] else begin[{] None end[}] return[call[className.substring, parameter[binary_operation[member[.i], +, literal[1]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getBaseName] operator[SEP] identifier[String] identifier[className] operator[SEP] { Keyword[int] identifier[i] operator[=] identifier[className] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[==] operator[-] Other[1] operator[SEP] Keyword[return] identifier[className] operator[SEP] Keyword[return] identifier[className] operator[SEP] identifier[substring] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] }
@Deprecated protected final boolean enhanceSuperType(List<LightweightTypeReference> superTypes, List<LightweightTypeReference> initiallyRequested, ParameterizedTypeReference result) { CommonSuperTypeFinder typeFinder = newCommonSuperTypeFinder(superTypes.get(0).getOwner()); typeFinder.requestsInProgress = Lists.newArrayList(); typeFinder.requestsInProgress.add(initiallyRequested); return typeFinder.enhanceSuperType(superTypes, result); }
class class_name[name] begin[{] method[enhanceSuperType, return_type[type[boolean]], modifier[final protected], parameter[superTypes, initiallyRequested, result]] begin[{] local_variable[type[CommonSuperTypeFinder], typeFinder] assign[member[typeFinder.requestsInProgress], call[Lists.newArrayList, parameter[]]] call[typeFinder.requestsInProgress.add, parameter[member[.initiallyRequested]]] return[call[typeFinder.enhanceSuperType, parameter[member[.superTypes], member[.result]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[protected] Keyword[final] Keyword[boolean] identifier[enhanceSuperType] operator[SEP] identifier[List] operator[<] identifier[LightweightTypeReference] operator[>] identifier[superTypes] , identifier[List] operator[<] identifier[LightweightTypeReference] operator[>] identifier[initiallyRequested] , identifier[ParameterizedTypeReference] identifier[result] operator[SEP] { identifier[CommonSuperTypeFinder] identifier[typeFinder] operator[=] identifier[newCommonSuperTypeFinder] operator[SEP] identifier[superTypes] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[typeFinder] operator[SEP] identifier[requestsInProgress] operator[=] identifier[Lists] operator[SEP] identifier[newArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[typeFinder] operator[SEP] identifier[requestsInProgress] operator[SEP] identifier[add] operator[SEP] identifier[initiallyRequested] operator[SEP] operator[SEP] Keyword[return] identifier[typeFinder] operator[SEP] identifier[enhanceSuperType] operator[SEP] identifier[superTypes] , identifier[result] operator[SEP] operator[SEP] }
public int defineTemporaryVariable(String name, ClassNode node, boolean store) { BytecodeVariable answer = defineVar(name, node, false, false); temporaryVariables.addFirst(answer); // TRICK: we add at the beginning so when we find for remove or get we always have the last one usedVariables.removeLast(); if (store) controller.getOperandStack().storeVar(answer); return answer.getIndex(); }
class class_name[name] begin[{] method[defineTemporaryVariable, return_type[type[int]], modifier[public], parameter[name, node, store]] begin[{] local_variable[type[BytecodeVariable], answer] call[temporaryVariables.addFirst, parameter[member[.answer]]] call[usedVariables.removeLast, parameter[]] if[member[.store]] begin[{] call[controller.getOperandStack, parameter[]] else begin[{] None end[}] return[call[answer.getIndex, parameter[]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[defineTemporaryVariable] operator[SEP] identifier[String] identifier[name] , identifier[ClassNode] identifier[node] , Keyword[boolean] identifier[store] operator[SEP] { identifier[BytecodeVariable] identifier[answer] operator[=] identifier[defineVar] operator[SEP] identifier[name] , identifier[node] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[temporaryVariables] operator[SEP] identifier[addFirst] operator[SEP] identifier[answer] operator[SEP] operator[SEP] identifier[usedVariables] operator[SEP] identifier[removeLast] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[store] operator[SEP] identifier[controller] operator[SEP] identifier[getOperandStack] operator[SEP] operator[SEP] operator[SEP] identifier[storeVar] operator[SEP] identifier[answer] operator[SEP] operator[SEP] Keyword[return] identifier[answer] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] operator[SEP] }
protected static List<Grammar> getEffectivelyUsedGrammars(final Grammar grammar) { final List<AbstractRule> allRules = GrammarUtil.allRules(grammar); final List<Grammar> map = ListExtensions.<AbstractRule, Grammar>map(allRules, it -> GrammarUtil.getGrammar(it)); final Iterable<Grammar> filter = IterableExtensions.<Grammar>filter(map, it -> Boolean.valueOf(it != grammar)); final Set<Grammar> set = IterableExtensions.<Grammar>toSet(filter); return IterableExtensions.<Grammar>toList(set); }
class class_name[name] begin[{] method[getEffectivelyUsedGrammars, return_type[type[List]], modifier[static protected], parameter[grammar]] begin[{] local_variable[type[List], allRules] local_variable[type[List], map] local_variable[type[Iterable], filter] local_variable[type[Set], set] return[call[.IterableExtensions, parameter[member[.set]]]] end[}] END[}]
Keyword[protected] Keyword[static] identifier[List] operator[<] identifier[Grammar] operator[>] identifier[getEffectivelyUsedGrammars] operator[SEP] Keyword[final] identifier[Grammar] identifier[grammar] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[AbstractRule] operator[>] identifier[allRules] operator[=] identifier[GrammarUtil] operator[SEP] identifier[allRules] operator[SEP] identifier[grammar] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Grammar] operator[>] identifier[map] operator[=] identifier[ListExtensions] operator[SEP] operator[<] identifier[AbstractRule] , identifier[Grammar] operator[>] identifier[map] operator[SEP] identifier[allRules] , identifier[it] operator[->] identifier[GrammarUtil] operator[SEP] identifier[getGrammar] operator[SEP] identifier[it] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[Grammar] operator[>] identifier[filter] operator[=] identifier[IterableExtensions] operator[SEP] operator[<] identifier[Grammar] operator[>] identifier[filter] operator[SEP] identifier[map] , identifier[it] operator[->] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[it] operator[!=] identifier[grammar] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Set] operator[<] identifier[Grammar] operator[>] identifier[set] operator[=] identifier[IterableExtensions] operator[SEP] operator[<] identifier[Grammar] operator[>] identifier[toSet] operator[SEP] identifier[filter] operator[SEP] operator[SEP] Keyword[return] identifier[IterableExtensions] operator[SEP] operator[<] identifier[Grammar] operator[>] identifier[toList] operator[SEP] identifier[set] operator[SEP] operator[SEP] }
static Date parse(String date, String pattern, String... patterns) { Set<String> set = new HashSet<>(); set.add(pattern); if (patterns != null) { addAll(set, patterns); } for (String p : set) { try { return df(p).parse(date); } catch (ParseException ex) { // Skip pattern } } return null; }
class class_name[name] begin[{] method[parse, return_type[type[Date]], modifier[static], parameter[date, pattern, patterns]] begin[{] local_variable[type[Set], set] call[set.add, parameter[member[.pattern]]] if[binary_operation[member[.patterns], !=, literal[null]]] begin[{] call[.addAll, parameter[member[.set], member[.patterns]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=df, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=date, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['ParseException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[static] identifier[Date] identifier[parse] operator[SEP] identifier[String] identifier[date] , identifier[String] identifier[pattern] , identifier[String] operator[...] identifier[patterns] operator[SEP] { identifier[Set] operator[<] identifier[String] operator[>] identifier[set] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[add] operator[SEP] identifier[pattern] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[patterns] operator[!=] Other[null] operator[SEP] { identifier[addAll] operator[SEP] identifier[set] , identifier[patterns] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[p] operator[:] identifier[set] operator[SEP] { Keyword[try] { Keyword[return] identifier[df] operator[SEP] identifier[p] operator[SEP] operator[SEP] identifier[parse] operator[SEP] identifier[date] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ParseException] identifier[ex] operator[SEP] { } } Keyword[return] Other[null] operator[SEP] }
@Override public void notifySubscribers(final List<? extends Subscriber> subscribers, final SyndFeed value, final SubscriptionSummaryCallback callback) { String mimeType = null; if (value.getFeedType().startsWith("rss")) { mimeType = "application/rss+xml"; } else { mimeType = "application/atom+xml"; } final SyndFeedOutput output = new SyndFeedOutput(); final ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { output.output(value, new OutputStreamWriter(baos)); baos.close(); } catch (final IOException ex) { LOG.error("Unable to output the feed", ex); throw new RuntimeException("Unable to output the feed.", ex); } catch (final FeedException ex) { LOG.error("Unable to output the feed", ex); throw new RuntimeException("Unable to output the feed.", ex); } final byte[] payload = baos.toByteArray(); for (final Subscriber s : subscribers) { final Notification not = new Notification(); not.callback = callback; not.lastRun = 0; not.mimeType = mimeType; not.payload = payload; not.retryCount = 0; not.subscriber = s; enqueueNotification(not); } }
class class_name[name] begin[{] method[notifySubscribers, return_type[void], modifier[public], parameter[subscribers, value, callback]] begin[{] local_variable[type[String], mimeType] if[call[value.getFeedType, parameter[]]] begin[{] assign[member[.mimeType], literal["application/rss+xml"]] else begin[{] assign[member[.mimeType], literal["application/atom+xml"]] end[}] local_variable[type[SyndFeedOutput], output] local_variable[type[ByteArrayOutputStream], baos] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=baos, 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=OutputStreamWriter, sub_type=None))], member=output, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=baos, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to output the feed"), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to output the feed."), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to output the feed"), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to output the feed."), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['FeedException']))], finally_block=None, label=None, resources=None) local_variable[type[byte], payload] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Notification, sub_type=None)), name=not)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Notification, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=callback, postfix_operators=[], prefix_operators=[], qualifier=not, selectors=[]), type==, value=MemberReference(member=callback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastRun, postfix_operators=[], prefix_operators=[], qualifier=not, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mimeType, postfix_operators=[], prefix_operators=[], qualifier=not, selectors=[]), type==, value=MemberReference(member=mimeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=payload, postfix_operators=[], prefix_operators=[], qualifier=not, selectors=[]), type==, value=MemberReference(member=payload, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=retryCount, postfix_operators=[], prefix_operators=[], qualifier=not, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=subscriber, postfix_operators=[], prefix_operators=[], qualifier=not, selectors=[]), type==, value=MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=not, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=enqueueNotification, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=subscribers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=s)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Subscriber, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[notifySubscribers] operator[SEP] Keyword[final] identifier[List] operator[<] operator[?] Keyword[extends] identifier[Subscriber] operator[>] identifier[subscribers] , Keyword[final] identifier[SyndFeed] identifier[value] , Keyword[final] identifier[SubscriptionSummaryCallback] identifier[callback] operator[SEP] { identifier[String] identifier[mimeType] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[SEP] identifier[getFeedType] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[mimeType] operator[=] literal[String] operator[SEP] } Keyword[else] { identifier[mimeType] operator[=] literal[String] operator[SEP] } Keyword[final] identifier[SyndFeedOutput] identifier[output] operator[=] Keyword[new] identifier[SyndFeedOutput] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ByteArrayOutputStream] identifier[baos] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[output] operator[SEP] identifier[output] operator[SEP] identifier[value] , Keyword[new] identifier[OutputStreamWriter] operator[SEP] identifier[baos] operator[SEP] operator[SEP] operator[SEP] identifier[baos] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[IOException] identifier[ex] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[ex] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] , identifier[ex] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[FeedException] identifier[ex] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[ex] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] , identifier[ex] operator[SEP] operator[SEP] } Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[payload] operator[=] identifier[baos] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Subscriber] identifier[s] operator[:] identifier[subscribers] operator[SEP] { Keyword[final] identifier[Notification] identifier[not] operator[=] Keyword[new] identifier[Notification] operator[SEP] operator[SEP] operator[SEP] identifier[not] operator[SEP] identifier[callback] operator[=] identifier[callback] operator[SEP] identifier[not] operator[SEP] identifier[lastRun] operator[=] Other[0] operator[SEP] identifier[not] operator[SEP] identifier[mimeType] operator[=] identifier[mimeType] operator[SEP] identifier[not] operator[SEP] identifier[payload] operator[=] identifier[payload] operator[SEP] identifier[not] operator[SEP] identifier[retryCount] operator[=] Other[0] operator[SEP] identifier[not] operator[SEP] identifier[subscriber] operator[=] identifier[s] operator[SEP] identifier[enqueueNotification] operator[SEP] identifier[not] operator[SEP] operator[SEP] } }
static String saveGetLocation(WebDriver driver) { logger.entering(driver); String location = "n/a"; try { if (driver != null) { location = driver.getCurrentUrl(); } } catch (Exception exception) { logger.log(Level.FINER, "Current location couldn't be retrieved by getCurrentUrl(). This can be SAFELY " + "IGNORED if testing a non-web mobile application. Reason: ", exception); } logger.exiting(location); return location; }
class class_name[name] begin[{] method[saveGetLocation, return_type[type[String]], modifier[static], parameter[driver]] begin[{] call[logger.entering, parameter[member[.driver]]] local_variable[type[String], location] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=driver, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=location, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getCurrentUrl, postfix_operators=[], prefix_operators=[], qualifier=driver, selectors=[], type_arguments=None)), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FINER, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Current location couldn't be retrieved by getCurrentUrl(). This can be SAFELY "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="IGNORED if testing a non-web mobile application. Reason: "), operator=+), MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['Exception']))], finally_block=None, label=None, resources=None) call[logger.exiting, parameter[member[.location]]] return[member[.location]] end[}] END[}]
Keyword[static] identifier[String] identifier[saveGetLocation] operator[SEP] identifier[WebDriver] identifier[driver] operator[SEP] { identifier[logger] operator[SEP] identifier[entering] operator[SEP] identifier[driver] operator[SEP] operator[SEP] identifier[String] identifier[location] operator[=] literal[String] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[driver] operator[!=] Other[null] operator[SEP] { identifier[location] operator[=] identifier[driver] operator[SEP] identifier[getCurrentUrl] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[exception] operator[SEP] { identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[FINER] , literal[String] operator[+] literal[String] , identifier[exception] operator[SEP] operator[SEP] } identifier[logger] operator[SEP] identifier[exiting] operator[SEP] identifier[location] operator[SEP] operator[SEP] Keyword[return] identifier[location] operator[SEP] }
public void storeStream(String id, InputStream inputStream, ByteTransferListener listener) throws IOException { Assert.isNotNull(id); Assert.isNotNull(inputStream); CountingInputStream countingInputStream = new CountingInputStream(inputStream); countingInputStream.addByteTransferListener(new ByteTransferListener() { public void handleByteTransfer(ByteTransferEvent event) { bytesWritten += event.getBytesSinceLastEvent(); } }); if (listener != null) { countingInputStream.addByteTransferListener(listener); } store(id, countingInputStream); }
class class_name[name] begin[{] method[storeStream, return_type[void], modifier[public], parameter[id, inputStream, listener]] begin[{] call[Assert.isNotNull, parameter[member[.id]]] call[Assert.isNotNull, parameter[member[.inputStream]]] local_variable[type[CountingInputStream], countingInputStream] call[countingInputStream.addByteTransferListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bytesWritten, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=getBytesSinceLastEvent, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None)), label=None)], documentation=None, modifiers={'public'}, name=handleByteTransfer, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ByteTransferEvent, 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=ByteTransferListener, sub_type=None))]] if[binary_operation[member[.listener], !=, literal[null]]] begin[{] call[countingInputStream.addByteTransferListener, parameter[member[.listener]]] else begin[{] None end[}] call[.store, parameter[member[.id], member[.countingInputStream]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[storeStream] operator[SEP] identifier[String] identifier[id] , identifier[InputStream] identifier[inputStream] , identifier[ByteTransferListener] identifier[listener] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Assert] operator[SEP] identifier[isNotNull] operator[SEP] identifier[id] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[isNotNull] operator[SEP] identifier[inputStream] operator[SEP] operator[SEP] identifier[CountingInputStream] identifier[countingInputStream] operator[=] Keyword[new] identifier[CountingInputStream] operator[SEP] identifier[inputStream] operator[SEP] operator[SEP] identifier[countingInputStream] operator[SEP] identifier[addByteTransferListener] operator[SEP] Keyword[new] identifier[ByteTransferListener] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[handleByteTransfer] operator[SEP] identifier[ByteTransferEvent] identifier[event] operator[SEP] { identifier[bytesWritten] operator[+=] identifier[event] operator[SEP] identifier[getBytesSinceLastEvent] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[listener] operator[!=] Other[null] operator[SEP] { identifier[countingInputStream] operator[SEP] identifier[addByteTransferListener] operator[SEP] identifier[listener] operator[SEP] operator[SEP] } identifier[store] operator[SEP] identifier[id] , identifier[countingInputStream] operator[SEP] operator[SEP] }
public static void drawRightBracket() { Tortoise.setAngle(-90); Tortoise.setX(MakeALogo.XValue + 250); Tortoise.setY(MakeALogo.YValue - 20); Tortoise.turn(180); Tortoise.move(30); TKPLogo.curve3(); Tortoise.move(40); TKPLogo.curve4(); Tortoise.move(10); Tortoise.turn(-90); Tortoise.move(10); Tortoise.turn(-90); Tortoise.move(10); TKPLogo.curve4(); Tortoise.move(40); TKPLogo.curve3(); Tortoise.move(30); Tortoise.turn(-90); Tortoise.move(10); Tortoise.turn(-90); Tortoise.move(15); TKPLogo.curve1(); Tortoise.move(35); TKPLogo.curve2(); Tortoise.turn(180); TKPLogo.curve2(); Tortoise.move(35); TKPLogo.curve1(); Tortoise.move(15); Tortoise.turn(-90); Tortoise.move(11); }
class class_name[name] begin[{] method[drawRightBracket, return_type[void], modifier[public static], parameter[]] begin[{] call[Tortoise.setAngle, parameter[literal[90]]] call[Tortoise.setX, parameter[binary_operation[member[MakeALogo.XValue], +, literal[250]]]] call[Tortoise.setY, parameter[binary_operation[member[MakeALogo.YValue], -, literal[20]]]] call[Tortoise.turn, parameter[literal[180]]] call[Tortoise.move, parameter[literal[30]]] call[TKPLogo.curve3, parameter[]] call[Tortoise.move, parameter[literal[40]]] call[TKPLogo.curve4, parameter[]] call[Tortoise.move, parameter[literal[10]]] call[Tortoise.turn, parameter[literal[90]]] call[Tortoise.move, parameter[literal[10]]] call[Tortoise.turn, parameter[literal[90]]] call[Tortoise.move, parameter[literal[10]]] call[TKPLogo.curve4, parameter[]] call[Tortoise.move, parameter[literal[40]]] call[TKPLogo.curve3, parameter[]] call[Tortoise.move, parameter[literal[30]]] call[Tortoise.turn, parameter[literal[90]]] call[Tortoise.move, parameter[literal[10]]] call[Tortoise.turn, parameter[literal[90]]] call[Tortoise.move, parameter[literal[15]]] call[TKPLogo.curve1, parameter[]] call[Tortoise.move, parameter[literal[35]]] call[TKPLogo.curve2, parameter[]] call[Tortoise.turn, parameter[literal[180]]] call[TKPLogo.curve2, parameter[]] call[Tortoise.move, parameter[literal[35]]] call[TKPLogo.curve1, parameter[]] call[Tortoise.move, parameter[literal[15]]] call[Tortoise.turn, parameter[literal[90]]] call[Tortoise.move, parameter[literal[11]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[drawRightBracket] operator[SEP] operator[SEP] { identifier[Tortoise] operator[SEP] identifier[setAngle] operator[SEP] operator[-] Other[90] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[setX] operator[SEP] identifier[MakeALogo] operator[SEP] identifier[XValue] operator[+] Other[250] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[setY] operator[SEP] identifier[MakeALogo] operator[SEP] identifier[YValue] operator[-] Other[20] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[turn] operator[SEP] Other[180] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[30] operator[SEP] operator[SEP] identifier[TKPLogo] operator[SEP] identifier[curve3] operator[SEP] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[40] operator[SEP] operator[SEP] identifier[TKPLogo] operator[SEP] identifier[curve4] operator[SEP] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[10] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[turn] operator[SEP] operator[-] Other[90] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[10] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[turn] operator[SEP] operator[-] Other[90] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[10] operator[SEP] operator[SEP] identifier[TKPLogo] operator[SEP] identifier[curve4] operator[SEP] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[40] operator[SEP] operator[SEP] identifier[TKPLogo] operator[SEP] identifier[curve3] operator[SEP] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[30] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[turn] operator[SEP] operator[-] Other[90] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[10] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[turn] operator[SEP] operator[-] Other[90] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[15] operator[SEP] operator[SEP] identifier[TKPLogo] operator[SEP] identifier[curve1] operator[SEP] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[35] operator[SEP] operator[SEP] identifier[TKPLogo] operator[SEP] identifier[curve2] operator[SEP] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[turn] operator[SEP] Other[180] operator[SEP] operator[SEP] identifier[TKPLogo] operator[SEP] identifier[curve2] operator[SEP] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[35] operator[SEP] operator[SEP] identifier[TKPLogo] operator[SEP] identifier[curve1] operator[SEP] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[15] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[turn] operator[SEP] operator[-] Other[90] operator[SEP] operator[SEP] identifier[Tortoise] operator[SEP] identifier[move] operator[SEP] Other[11] operator[SEP] operator[SEP] }
public float at (final float x) { if (m_nDataPoints < 2) return Float.NaN; float y = m_aDivDiff[0][0]; float xFactor = 1; // Compute the value of the function. for (int order = 1; order < m_nDataPoints; ++order) { xFactor = xFactor * (x - m_aData[order - 1].getX ()); y = y + xFactor * m_aDivDiff[0][order]; } return y; }
class class_name[name] begin[{] method[at, return_type[type[float]], modifier[public], parameter[x]] begin[{] if[binary_operation[member[.m_nDataPoints], <, literal[2]]] begin[{] return[member[Float.NaN]] else begin[{] None end[}] local_variable[type[float], y] local_variable[type[float], xFactor] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=xFactor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=xFactor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=m_aData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=order, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), MethodInvocation(arguments=[], member=getX, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=-), operator=*)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=xFactor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=m_aDivDiff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), ArraySelector(index=MemberReference(member=order, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=order, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=m_nDataPoints, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=order)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=order, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[member[.y]] end[}] END[}]
Keyword[public] Keyword[float] identifier[at] operator[SEP] Keyword[final] Keyword[float] identifier[x] operator[SEP] { Keyword[if] operator[SEP] identifier[m_nDataPoints] operator[<] Other[2] operator[SEP] Keyword[return] identifier[Float] operator[SEP] identifier[NaN] operator[SEP] Keyword[float] identifier[y] operator[=] identifier[m_aDivDiff] operator[SEP] Other[0] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[float] identifier[xFactor] operator[=] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[order] operator[=] Other[1] operator[SEP] identifier[order] operator[<] identifier[m_nDataPoints] operator[SEP] operator[++] identifier[order] operator[SEP] { identifier[xFactor] operator[=] identifier[xFactor] operator[*] operator[SEP] identifier[x] operator[-] identifier[m_aData] operator[SEP] identifier[order] operator[-] Other[1] operator[SEP] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[y] operator[=] identifier[y] operator[+] identifier[xFactor] operator[*] identifier[m_aDivDiff] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[order] operator[SEP] operator[SEP] } Keyword[return] identifier[y] operator[SEP] }
protected void generateAnonymousClassDefinition(AnonymousClass anonClass, IAppendable it, IExtraLanguageGeneratorContext context) { if (!it.hasName(anonClass) && it instanceof PyAppendable) { final LightweightTypeReference jvmAnonType = getExpectedType(anonClass); final String anonName = it.declareSyntheticVariable(anonClass, jvmAnonType.getSimpleName()); QualifiedName anonQualifiedName = QualifiedName.create( jvmAnonType.getType().getQualifiedName().split(Pattern.quote("."))); //$NON-NLS-1$ anonQualifiedName = anonQualifiedName.skipLast(1); if (anonQualifiedName.isEmpty()) { // The type resolver does not include the enclosing class. assert anonClass.getDeclaringType() == null : "The Xtend API has changed the AnonymousClass definition!"; //$NON-NLS-1$ final XtendTypeDeclaration container = EcoreUtil2.getContainerOfType(anonClass.eContainer(), XtendTypeDeclaration.class); anonQualifiedName = anonQualifiedName.append(this.qualifiedNameProvider.getFullyQualifiedName(container)); } anonQualifiedName = anonQualifiedName.append(anonName); it.openPseudoScope(); final IRootGenerator rootGenerator = context.getRootGenerator(); assert rootGenerator instanceof PyGenerator; final List<JvmTypeReference> types = new ArrayList<>(); for (final JvmTypeReference superType : anonClass.getConstructorCall().getConstructor().getDeclaringType().getSuperTypes()) { if (!Object.class.getCanonicalName().equals(superType.getIdentifier())) { types.add(superType); } } ((PyGenerator) rootGenerator).generateTypeDeclaration( anonQualifiedName.toString(), anonName, false, types, getTypeBuilder().getDocumentation(anonClass), false, anonClass.getMembers(), (PyAppendable) it, context, null); it.closeScope(); } }
class class_name[name] begin[{] method[generateAnonymousClassDefinition, return_type[void], modifier[protected], parameter[anonClass, it, context]] begin[{] if[binary_operation[call[it.hasName, parameter[member[.anonClass]]], &&, binary_operation[member[.it], instanceof, type[PyAppendable]]]] begin[{] local_variable[type[LightweightTypeReference], jvmAnonType] local_variable[type[String], anonName] local_variable[type[QualifiedName], anonQualifiedName] assign[member[.anonQualifiedName], call[anonQualifiedName.skipLast, parameter[literal[1]]]] if[call[anonQualifiedName.isEmpty, parameter[]]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getDeclaringType, postfix_operators=[], prefix_operators=[], qualifier=anonClass, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), label=None, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The Xtend API has changed the AnonymousClass definition!")) local_variable[type[XtendTypeDeclaration], container] assign[member[.anonQualifiedName], call[anonQualifiedName.append, parameter[THIS[member[None.qualifiedNameProvider]call[None.getFullyQualifiedName, parameter[member[.container]]]]]]] else begin[{] None end[}] assign[member[.anonQualifiedName], call[anonQualifiedName.append, parameter[member[.anonName]]]] call[it.openPseudoScope, parameter[]] local_variable[type[IRootGenerator], rootGenerator] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=rootGenerator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=PyGenerator, sub_type=None), operator=instanceof), label=None, value=None) local_variable[type[List], types] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=ClassReference(postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=superType, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=superType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=types, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getConstructorCall, postfix_operators=[], prefix_operators=[], qualifier=anonClass, selectors=[MethodInvocation(arguments=[], member=getConstructor, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getDeclaringType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getSuperTypes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=superType)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JvmTypeReference, sub_type=None))), label=None) Cast(expression=MemberReference(member=rootGenerator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=PyGenerator, sub_type=None)) call[it.closeScope, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[generateAnonymousClassDefinition] operator[SEP] identifier[AnonymousClass] identifier[anonClass] , identifier[IAppendable] identifier[it] , identifier[IExtraLanguageGeneratorContext] identifier[context] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[it] operator[SEP] identifier[hasName] operator[SEP] identifier[anonClass] operator[SEP] operator[&&] identifier[it] Keyword[instanceof] identifier[PyAppendable] operator[SEP] { Keyword[final] identifier[LightweightTypeReference] identifier[jvmAnonType] operator[=] identifier[getExpectedType] operator[SEP] identifier[anonClass] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[anonName] operator[=] identifier[it] operator[SEP] identifier[declareSyntheticVariable] operator[SEP] identifier[anonClass] , identifier[jvmAnonType] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[QualifiedName] identifier[anonQualifiedName] operator[=] identifier[QualifiedName] operator[SEP] identifier[create] operator[SEP] identifier[jvmAnonType] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[getQualifiedName] operator[SEP] operator[SEP] operator[SEP] identifier[split] operator[SEP] identifier[Pattern] operator[SEP] identifier[quote] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[anonQualifiedName] operator[=] identifier[anonQualifiedName] operator[SEP] identifier[skipLast] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[anonQualifiedName] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[assert] identifier[anonClass] operator[SEP] identifier[getDeclaringType] operator[SEP] operator[SEP] operator[==] Other[null] operator[:] literal[String] operator[SEP] Keyword[final] identifier[XtendTypeDeclaration] identifier[container] operator[=] identifier[EcoreUtil2] operator[SEP] identifier[getContainerOfType] operator[SEP] identifier[anonClass] operator[SEP] identifier[eContainer] operator[SEP] operator[SEP] , identifier[XtendTypeDeclaration] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[anonQualifiedName] operator[=] identifier[anonQualifiedName] operator[SEP] identifier[append] operator[SEP] Keyword[this] operator[SEP] identifier[qualifiedNameProvider] operator[SEP] identifier[getFullyQualifiedName] operator[SEP] identifier[container] operator[SEP] operator[SEP] operator[SEP] } identifier[anonQualifiedName] operator[=] identifier[anonQualifiedName] operator[SEP] identifier[append] operator[SEP] identifier[anonName] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[openPseudoScope] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[IRootGenerator] identifier[rootGenerator] operator[=] identifier[context] operator[SEP] identifier[getRootGenerator] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[rootGenerator] Keyword[instanceof] identifier[PyGenerator] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[JvmTypeReference] operator[>] identifier[types] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[JvmTypeReference] identifier[superType] operator[:] identifier[anonClass] operator[SEP] identifier[getConstructorCall] operator[SEP] operator[SEP] operator[SEP] identifier[getConstructor] operator[SEP] operator[SEP] operator[SEP] identifier[getDeclaringType] operator[SEP] operator[SEP] operator[SEP] identifier[getSuperTypes] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[Object] operator[SEP] Keyword[class] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[superType] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[types] operator[SEP] identifier[add] operator[SEP] identifier[superType] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[PyGenerator] operator[SEP] identifier[rootGenerator] operator[SEP] operator[SEP] identifier[generateTypeDeclaration] operator[SEP] identifier[anonQualifiedName] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[anonName] , literal[boolean] , identifier[types] , identifier[getTypeBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[getDocumentation] operator[SEP] identifier[anonClass] operator[SEP] , literal[boolean] , identifier[anonClass] operator[SEP] identifier[getMembers] operator[SEP] operator[SEP] , operator[SEP] identifier[PyAppendable] operator[SEP] identifier[it] , identifier[context] , Other[null] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[closeScope] operator[SEP] operator[SEP] operator[SEP] } }
public static String extractMavenPropertyName(String propName) { Matcher matcher = Pattern.compile(MAVEN_PROPERTY_REGEXP).matcher(propName); if (matcher.matches()) { return matcher.group(1); } else { return null; } }
class class_name[name] begin[{] method[extractMavenPropertyName, return_type[type[String]], modifier[public static], parameter[propName]] begin[{] local_variable[type[Matcher], matcher] if[call[matcher.matches, parameter[]]] begin[{] return[call[matcher.group, parameter[literal[1]]]] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[extractMavenPropertyName] operator[SEP] identifier[String] identifier[propName] operator[SEP] { identifier[Matcher] identifier[matcher] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[MAVEN_PROPERTY_REGEXP] operator[SEP] operator[SEP] identifier[matcher] operator[SEP] identifier[propName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
public void setImageUri(int viewId, @Nullable Uri uri) { ViewHelper.setImageUri(mCacheView, viewId, uri); }
class class_name[name] begin[{] method[setImageUri, return_type[void], modifier[public], parameter[viewId, uri]] begin[{] call[ViewHelper.setImageUri, parameter[member[.mCacheView], member[.viewId], member[.uri]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setImageUri] operator[SEP] Keyword[int] identifier[viewId] , annotation[@] identifier[Nullable] identifier[Uri] identifier[uri] operator[SEP] { identifier[ViewHelper] operator[SEP] identifier[setImageUri] operator[SEP] identifier[mCacheView] , identifier[viewId] , identifier[uri] operator[SEP] operator[SEP] }
public void applyBounds(final Bbox bounds) { org.geomajas.gwt.client.spatial.Bbox bbox = new org.geomajas.gwt.client.spatial.Bbox(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()); mapView.applyBounds(bbox, zoomOption); }
class class_name[name] begin[{] method[applyBounds, return_type[void], modifier[public], parameter[bounds]] begin[{] local_variable[type[org], bbox] call[mapView.applyBounds, parameter[member[.bbox], member[.zoomOption]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[applyBounds] operator[SEP] Keyword[final] identifier[Bbox] identifier[bounds] operator[SEP] { identifier[org] operator[SEP] identifier[geomajas] operator[SEP] identifier[gwt] operator[SEP] identifier[client] operator[SEP] identifier[spatial] operator[SEP] identifier[Bbox] identifier[bbox] operator[=] Keyword[new] identifier[org] operator[SEP] identifier[geomajas] operator[SEP] identifier[gwt] operator[SEP] identifier[client] operator[SEP] identifier[spatial] operator[SEP] identifier[Bbox] operator[SEP] identifier[bounds] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[bounds] operator[SEP] identifier[getY] operator[SEP] operator[SEP] , identifier[bounds] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] , identifier[bounds] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mapView] operator[SEP] identifier[applyBounds] operator[SEP] identifier[bbox] , identifier[zoomOption] operator[SEP] operator[SEP] }
public void setPosition(double x, double y, double z) { this.x = x; this.y = y; this.z = z; }
class class_name[name] begin[{] method[setPosition, return_type[void], modifier[public], parameter[x, y, z]] begin[{] assign[THIS[member[None.x]], member[.x]] assign[THIS[member[None.y]], member[.y]] assign[THIS[member[None.z]], member[.z]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setPosition] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] , Keyword[double] identifier[z] operator[SEP] { Keyword[this] operator[SEP] identifier[x] operator[=] identifier[x] operator[SEP] Keyword[this] operator[SEP] identifier[y] operator[=] identifier[y] operator[SEP] Keyword[this] operator[SEP] identifier[z] operator[=] identifier[z] operator[SEP] }
private final static byte[] getDecodabet(final int options) { if ((options & Base64.URL_SAFE) == Base64.URL_SAFE) { return Base64._URL_SAFE_DECODABET; } else if ((options & Base64.ORDERED) == Base64.ORDERED) { return Base64._ORDERED_DECODABET; } else { return Base64._STANDARD_DECODABET; } }
class class_name[name] begin[{] method[getDecodabet, return_type[type[byte]], modifier[final private static], parameter[options]] begin[{] if[binary_operation[binary_operation[member[.options], &, member[Base64.URL_SAFE]], ==, member[Base64.URL_SAFE]]] begin[{] return[member[Base64._URL_SAFE_DECODABET]] else begin[{] if[binary_operation[binary_operation[member[.options], &, member[Base64.ORDERED]], ==, member[Base64.ORDERED]]] begin[{] return[member[Base64._ORDERED_DECODABET]] else begin[{] return[member[Base64._STANDARD_DECODABET]] end[}] end[}] end[}] END[}]
Keyword[private] Keyword[final] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[getDecodabet] operator[SEP] Keyword[final] Keyword[int] identifier[options] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[options] operator[&] identifier[Base64] operator[SEP] identifier[URL_SAFE] operator[SEP] operator[==] identifier[Base64] operator[SEP] identifier[URL_SAFE] operator[SEP] { Keyword[return] identifier[Base64] operator[SEP] identifier[_URL_SAFE_DECODABET] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[options] operator[&] identifier[Base64] operator[SEP] identifier[ORDERED] operator[SEP] operator[==] identifier[Base64] operator[SEP] identifier[ORDERED] operator[SEP] { Keyword[return] identifier[Base64] operator[SEP] identifier[_ORDERED_DECODABET] operator[SEP] } Keyword[else] { Keyword[return] identifier[Base64] operator[SEP] identifier[_STANDARD_DECODABET] operator[SEP] } }
public void stop() { try { if (server != null) { server.stop(); server.join(); } } catch (Exception e) { LOG.warn("Got exception shutting down proxy", e); } }
class class_name[name] begin[{] method[stop, return_type[void], modifier[public], parameter[]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=server, 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=stop, postfix_operators=[], prefix_operators=[], qualifier=server, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=join, postfix_operators=[], prefix_operators=[], qualifier=server, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Got exception shutting down proxy"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, 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) end[}] END[}]
Keyword[public] Keyword[void] identifier[stop] operator[SEP] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[server] operator[!=] Other[null] operator[SEP] { identifier[server] operator[SEP] identifier[stop] operator[SEP] operator[SEP] operator[SEP] identifier[server] operator[SEP] identifier[join] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }