code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public void provision(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, ILRRequestResource parameters) { provisionWithServiceResponseAsync(vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters).toBlocking().single().body(); }
class class_name[name] begin[{] method[provision, return_type[void], modifier[public], parameter[vaultName, resourceGroupName, fabricName, containerName, protectedItemName, recoveryPointId, parameters]] begin[{] call[.provisionWithServiceResponseAsync, parameter[member[.vaultName], member[.resourceGroupName], member[.fabricName], member[.containerName], member[.protectedItemName], member[.recoveryPointId], member[.parameters]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[provision] operator[SEP] identifier[String] identifier[vaultName] , identifier[String] identifier[resourceGroupName] , identifier[String] identifier[fabricName] , identifier[String] identifier[containerName] , identifier[String] identifier[protectedItemName] , identifier[String] identifier[recoveryPointId] , identifier[ILRRequestResource] identifier[parameters] operator[SEP] { identifier[provisionWithServiceResponseAsync] operator[SEP] identifier[vaultName] , identifier[resourceGroupName] , identifier[fabricName] , identifier[containerName] , identifier[protectedItemName] , identifier[recoveryPointId] , 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] }
public static Class<?> lenientClassForName(String className) throws ClassNotFoundException { try { // TODO: consider whether any control over class loader is really needed here // (forName(className, true, Thread.currentThread().getContextClassLoader())?) return Class.forName(className); } catch (ClassNotFoundException ignored) { // try replacing the last dot with a $, in case that helps // example: tutorial.Tutorial.Benchmark1 becomes tutorial.Tutorial$Benchmark1 // amusingly, the $ character means three different things in this one line alone String newName = className.replaceFirst("\\.([^.]+)$", "\\$$1"); return Class.forName(newName); } }
class class_name[name] begin[{] method[lenientClassForName, return_type[type[Class]], modifier[public static], parameter[className]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\.([^.]+)$"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\$$1")], member=replaceFirst, postfix_operators=[], prefix_operators=[], qualifier=className, selectors=[], type_arguments=None), name=newName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=newName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignored, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[lenientClassForName] operator[SEP] identifier[String] identifier[className] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] { Keyword[try] { Keyword[return] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[className] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[ignored] operator[SEP] { identifier[String] identifier[newName] operator[=] identifier[className] operator[SEP] identifier[replaceFirst] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[newName] operator[SEP] operator[SEP] } }
public static Class getPropertyType(Class<?> beanClass, String property){ Method getter = getGetterMethod(beanClass, property); if(getter==null) return null; else return getter.getReturnType(); }
class class_name[name] begin[{] method[getPropertyType, return_type[type[Class]], modifier[public static], parameter[beanClass, property]] begin[{] local_variable[type[Method], getter] if[binary_operation[member[.getter], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] return[call[getter.getReturnType, parameter[]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[Class] identifier[getPropertyType] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[beanClass] , identifier[String] identifier[property] operator[SEP] { identifier[Method] identifier[getter] operator[=] identifier[getGetterMethod] operator[SEP] identifier[beanClass] , identifier[property] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getter] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[else] Keyword[return] identifier[getter] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("rawtypes") public static String createSign(String key, Map<String, Object> params) { SortedMap<Object, Object> parameters = new TreeMap<Object, Object>(); Set es = params.entrySet(); Iterator it = es.iterator(); while (it.hasNext()) { Map.Entry entry = (Map.Entry) it.next(); String k = (String) entry.getKey(); Object v = entry.getValue(); parameters.put(k, v); } StringBuffer sb = new StringBuffer(); Set es2 = parameters.entrySet();//accsii升序排序 Iterator it2 = es2.iterator(); while (it2.hasNext()) { Map.Entry entry = (Map.Entry) it2.next(); String k = (String) entry.getKey(); Object v = entry.getValue(); if (null != v && !"".equals(v) && !"sign".equals(k) && !"key".equals(k)) { sb.append(k + "=" + v + "&"); } } sb.append("key=" + key); String sign = Lang.md5(sb.toString()).toUpperCase(); return sign; }
class class_name[name] begin[{] method[createSign, return_type[type[String]], modifier[public static], parameter[key, params]] begin[{] local_variable[type[SortedMap], parameters] local_variable[type[Set], es] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[Map], entry] local_variable[type[String], k] local_variable[type[Object], v] call[parameters.put, parameter[member[.k], member[.v]]] end[}] local_variable[type[StringBuffer], sb] local_variable[type[Set], es2] local_variable[type[Iterator], it2] while[call[it2.hasNext, parameter[]]] begin[{] local_variable[type[Map], entry] local_variable[type[String], k] local_variable[type[Object], v] if[binary_operation[binary_operation[binary_operation[binary_operation[literal[null], !=, member[.v]], &&, literal[""]], &&, literal["sign"]], &&, literal["key"]]] begin[{] call[sb.append, parameter[binary_operation[binary_operation[binary_operation[member[.k], +, literal["="]], +, member[.v]], +, literal["&"]]]] else begin[{] None end[}] end[}] call[sb.append, parameter[binary_operation[literal["key="], +, member[.key]]]] local_variable[type[String], sign] return[member[.sign]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[String] identifier[createSign] operator[SEP] identifier[String] identifier[key] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[params] operator[SEP] { identifier[SortedMap] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[parameters] operator[=] Keyword[new] identifier[TreeMap] operator[<] identifier[Object] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Set] identifier[es] operator[=] identifier[params] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] identifier[it] operator[=] identifier[es] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[SEP] identifier[Entry] identifier[entry] operator[=] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[SEP] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[k] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[v] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[put] operator[SEP] identifier[k] , identifier[v] operator[SEP] operator[SEP] } identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[Set] identifier[es2] operator[=] identifier[parameters] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] identifier[it2] operator[=] identifier[es2] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it2] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] operator[SEP] identifier[Entry] identifier[entry] operator[=] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[SEP] identifier[it2] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[k] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[v] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[v] operator[&&] operator[!] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[v] operator[SEP] operator[&&] operator[!] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[k] operator[SEP] operator[&&] operator[!] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[k] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[k] operator[+] literal[String] operator[+] identifier[v] operator[+] literal[String] operator[SEP] operator[SEP] } } identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[+] identifier[key] operator[SEP] operator[SEP] identifier[String] identifier[sign] operator[=] identifier[Lang] operator[SEP] identifier[md5] operator[SEP] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[sign] operator[SEP] }
public static Mirror newInstanceForClassName(String className) throws ClassNotFoundException, InstantiationException, IllegalAccessException { className = className.trim(); Class<?> objClass = Class.forName(className); return new Mirror(ClassPath.newInstance(objClass)); }
class class_name[name] begin[{] method[newInstanceForClassName, return_type[type[Mirror]], modifier[public static], parameter[className]] begin[{] assign[member[.className], call[className.trim, parameter[]]] local_variable[type[Class], objClass] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=objClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=ClassPath, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Mirror, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Mirror] identifier[newInstanceForClassName] operator[SEP] identifier[String] identifier[className] operator[SEP] Keyword[throws] identifier[ClassNotFoundException] , identifier[InstantiationException] , identifier[IllegalAccessException] { identifier[className] operator[=] identifier[className] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[objClass] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[className] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Mirror] operator[SEP] identifier[ClassPath] operator[SEP] identifier[newInstance] operator[SEP] identifier[objClass] operator[SEP] operator[SEP] operator[SEP] }
static Predicate<DateValue> weekIntervalFilter(final int interval, final DayOfWeek weekStart, final DateValue dtStart) { return new Predicate<DateValue>() { private static final long serialVersionUID = 7059994888520369846L; //the latest day with day of week weekStart on or before dtStart DateValue wkStart; { DTBuilder wkStartB = new DTBuilder(dtStart); wkStartB.day -= (7 + TimeUtils.dayOfWeek(dtStart).getCalendarConstant() - weekStart.getCalendarConstant()) % 7; wkStart = wkStartB.toDate(); } public boolean apply(DateValue date) { int daysBetween = TimeUtils.daysBetween(date, wkStart); if (daysBetween < 0) { //date must be before dtStart. Shouldn't occur in practice. daysBetween += (interval * 7 * (1 + daysBetween / (-7 * interval))); } int off = (daysBetween / 7) % interval; return off == 0; } }; }
class class_name[name] begin[{] method[weekIntervalFilter, return_type[type[Predicate]], modifier[static], parameter[interval, weekStart, dtStart]] begin[{] return[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7059994888520369846L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=wkStart)], documentation=None, modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DateValue, sub_type=None)), [LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=dtStart, 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=DTBuilder, sub_type=None)), name=wkStartB)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DTBuilder, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=day, postfix_operators=[], prefix_operators=[], qualifier=wkStartB, selectors=[]), type=-=, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operandr=MethodInvocation(arguments=[MemberReference(member=dtStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=dayOfWeek, postfix_operators=[], prefix_operators=[], qualifier=TimeUtils, selectors=[MethodInvocation(arguments=[], member=getCalendarConstant, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=MethodInvocation(arguments=[], member=getCalendarConstant, postfix_operators=[], prefix_operators=[], qualifier=weekStart, selectors=[], type_arguments=None), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operator=%)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=wkStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toDate, postfix_operators=[], prefix_operators=[], qualifier=wkStartB, selectors=[], type_arguments=None)), label=None)], MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=date, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=wkStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=daysBetween, postfix_operators=[], prefix_operators=[], qualifier=TimeUtils, selectors=[], type_arguments=None), name=daysBetween)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=daysBetween, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=daysBetween, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=interval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operator=*), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=BinaryOperation(operandl=MemberReference(member=daysBetween, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=7), operandr=MemberReference(member=interval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=/), operator=+), operator=*)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=daysBetween, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operator=/), operandr=MemberReference(member=interval, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=%), name=off)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), label=None)], documentation=None, modifiers={'public'}, name=apply, parameters=[FormalParameter(annotations=[], modifiers=set(), name=date, type=ReferenceType(arguments=None, dimensions=[], name=DateValue, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=DateValue, sub_type=None))], dimensions=None, name=Predicate, sub_type=None))] end[}] END[}]
Keyword[static] identifier[Predicate] operator[<] identifier[DateValue] operator[>] identifier[weekIntervalFilter] operator[SEP] Keyword[final] Keyword[int] identifier[interval] , Keyword[final] identifier[DayOfWeek] identifier[weekStart] , Keyword[final] identifier[DateValue] identifier[dtStart] operator[SEP] { Keyword[return] Keyword[new] identifier[Predicate] operator[<] identifier[DateValue] operator[>] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[7059994888520369846L] operator[SEP] identifier[DateValue] identifier[wkStart] operator[SEP] { identifier[DTBuilder] identifier[wkStartB] operator[=] Keyword[new] identifier[DTBuilder] operator[SEP] identifier[dtStart] operator[SEP] operator[SEP] identifier[wkStartB] operator[SEP] identifier[day] operator[-=] operator[SEP] Other[7] operator[+] identifier[TimeUtils] operator[SEP] identifier[dayOfWeek] operator[SEP] identifier[dtStart] operator[SEP] operator[SEP] identifier[getCalendarConstant] operator[SEP] operator[SEP] operator[-] identifier[weekStart] operator[SEP] identifier[getCalendarConstant] operator[SEP] operator[SEP] operator[SEP] operator[%] Other[7] operator[SEP] identifier[wkStart] operator[=] identifier[wkStartB] operator[SEP] identifier[toDate] operator[SEP] operator[SEP] operator[SEP] } Keyword[public] Keyword[boolean] identifier[apply] operator[SEP] identifier[DateValue] identifier[date] operator[SEP] { Keyword[int] identifier[daysBetween] operator[=] identifier[TimeUtils] operator[SEP] identifier[daysBetween] operator[SEP] identifier[date] , identifier[wkStart] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[daysBetween] operator[<] Other[0] operator[SEP] { identifier[daysBetween] operator[+=] operator[SEP] identifier[interval] operator[*] Other[7] operator[*] operator[SEP] Other[1] operator[+] identifier[daysBetween] operator[/] operator[SEP] operator[-] Other[7] operator[*] identifier[interval] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[off] operator[=] operator[SEP] identifier[daysBetween] operator[/] Other[7] operator[SEP] operator[%] identifier[interval] operator[SEP] Keyword[return] identifier[off] operator[==] Other[0] operator[SEP] } } operator[SEP] }
private static RouteDefinition find(Map<RouteDefinition, Method> add, Method method) { if (add == null || add.size() == 0) { return null; } for (RouteDefinition additional : add.keySet()) { Method match = add.get(additional); if (isMatching(method, match)) { return additional; } } return null; }
class class_name[name] begin[{] method[find, return_type[type[RouteDefinition]], modifier[private static], parameter[add, method]] begin[{] if[binary_operation[binary_operation[member[.add], ==, literal[null]], ||, binary_operation[call[add.size, parameter[]], ==, literal[0]]]] begin[{] return[literal[null]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=additional, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=add, selectors=[], type_arguments=None), name=match)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isMatching, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=additional, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=add, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=additional)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RouteDefinition, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] identifier[RouteDefinition] identifier[find] operator[SEP] identifier[Map] operator[<] identifier[RouteDefinition] , identifier[Method] operator[>] identifier[add] , identifier[Method] identifier[method] operator[SEP] { Keyword[if] operator[SEP] identifier[add] operator[==] Other[null] operator[||] identifier[add] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[for] operator[SEP] identifier[RouteDefinition] identifier[additional] operator[:] identifier[add] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[Method] identifier[match] operator[=] identifier[add] operator[SEP] identifier[get] operator[SEP] identifier[additional] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isMatching] operator[SEP] identifier[method] , identifier[match] operator[SEP] operator[SEP] { Keyword[return] identifier[additional] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
@Override protected InputStream getCompilerAsStream() throws IOException { final Vector<InputStream> inputStreams = new Vector<InputStream>(); inputStreams.add(getWebjarLocator().locate(WebjarUriLocator.createUri("jquery.js"))); inputStreams.add(getWebjarLocator().locate(WebjarUriLocator.createUri("handlebars.js"))); inputStreams.add(getWebjarLocator().locate(WebjarUriLocator.createUri("ember.js"))); inputStreams.add(EmberJs.class.getResourceAsStream(DEFAULT_HEADLESS_RHINO_JS)); return new SequenceInputStream(inputStreams.elements()); }
class class_name[name] begin[{] method[getCompilerAsStream, return_type[type[InputStream]], modifier[protected], parameter[]] begin[{] local_variable[type[Vector], inputStreams] call[inputStreams.add, parameter[call[.getWebjarLocator, parameter[]]]] call[inputStreams.add, parameter[call[.getWebjarLocator, parameter[]]]] call[inputStreams.add, parameter[call[.getWebjarLocator, parameter[]]]] call[inputStreams.add, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=DEFAULT_HEADLESS_RHINO_JS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResourceAsStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=EmberJs, sub_type=None))]] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=elements, postfix_operators=[], prefix_operators=[], qualifier=inputStreams, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SequenceInputStream, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[InputStream] identifier[getCompilerAsStream] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[Vector] operator[<] identifier[InputStream] operator[>] identifier[inputStreams] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[InputStream] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[inputStreams] operator[SEP] identifier[add] operator[SEP] identifier[getWebjarLocator] operator[SEP] operator[SEP] operator[SEP] identifier[locate] operator[SEP] identifier[WebjarUriLocator] operator[SEP] identifier[createUri] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[inputStreams] operator[SEP] identifier[add] operator[SEP] identifier[getWebjarLocator] operator[SEP] operator[SEP] operator[SEP] identifier[locate] operator[SEP] identifier[WebjarUriLocator] operator[SEP] identifier[createUri] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[inputStreams] operator[SEP] identifier[add] operator[SEP] identifier[getWebjarLocator] operator[SEP] operator[SEP] operator[SEP] identifier[locate] operator[SEP] identifier[WebjarUriLocator] operator[SEP] identifier[createUri] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[inputStreams] operator[SEP] identifier[add] operator[SEP] identifier[EmberJs] operator[SEP] Keyword[class] operator[SEP] identifier[getResourceAsStream] operator[SEP] identifier[DEFAULT_HEADLESS_RHINO_JS] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[SequenceInputStream] operator[SEP] identifier[inputStreams] operator[SEP] identifier[elements] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(M3u8Settings m3u8Settings, ProtocolMarshaller protocolMarshaller) { if (m3u8Settings == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(m3u8Settings.getAudioFramesPerPes(), AUDIOFRAMESPERPES_BINDING); protocolMarshaller.marshall(m3u8Settings.getAudioPids(), AUDIOPIDS_BINDING); protocolMarshaller.marshall(m3u8Settings.getEcmPid(), ECMPID_BINDING); protocolMarshaller.marshall(m3u8Settings.getPatInterval(), PATINTERVAL_BINDING); protocolMarshaller.marshall(m3u8Settings.getPcrControl(), PCRCONTROL_BINDING); protocolMarshaller.marshall(m3u8Settings.getPcrPeriod(), PCRPERIOD_BINDING); protocolMarshaller.marshall(m3u8Settings.getPcrPid(), PCRPID_BINDING); protocolMarshaller.marshall(m3u8Settings.getPmtInterval(), PMTINTERVAL_BINDING); protocolMarshaller.marshall(m3u8Settings.getPmtPid(), PMTPID_BINDING); protocolMarshaller.marshall(m3u8Settings.getProgramNum(), PROGRAMNUM_BINDING); protocolMarshaller.marshall(m3u8Settings.getScte35Behavior(), SCTE35BEHAVIOR_BINDING); protocolMarshaller.marshall(m3u8Settings.getScte35Pid(), SCTE35PID_BINDING); protocolMarshaller.marshall(m3u8Settings.getTimedMetadataBehavior(), TIMEDMETADATABEHAVIOR_BINDING); protocolMarshaller.marshall(m3u8Settings.getTimedMetadataPid(), TIMEDMETADATAPID_BINDING); protocolMarshaller.marshall(m3u8Settings.getTransportStreamId(), TRANSPORTSTREAMID_BINDING); protocolMarshaller.marshall(m3u8Settings.getVideoPid(), VIDEOPID_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[m3u8Settings, protocolMarshaller]] begin[{] if[binary_operation[member[.m3u8Settings], ==, 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=getAudioFramesPerPes, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=AUDIOFRAMESPERPES_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=getAudioPids, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=AUDIOPIDS_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=getEcmPid, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=ECMPID_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=getPatInterval, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=PATINTERVAL_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=getPcrControl, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=PCRCONTROL_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=getPcrPeriod, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=PCRPERIOD_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=getPcrPid, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=PCRPID_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=getPmtInterval, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=PMTINTERVAL_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=getPmtPid, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=PMTPID_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=getProgramNum, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=PROGRAMNUM_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=getScte35Behavior, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=SCTE35BEHAVIOR_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=getScte35Pid, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=SCTE35PID_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=getTimedMetadataBehavior, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=TIMEDMETADATABEHAVIOR_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=getTimedMetadataPid, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=TIMEDMETADATAPID_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=getTransportStreamId, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=TRANSPORTSTREAMID_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=getVideoPid, postfix_operators=[], prefix_operators=[], qualifier=m3u8Settings, selectors=[], type_arguments=None), MemberReference(member=VIDEOPID_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[M3u8Settings] identifier[m3u8Settings] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[m3u8Settings] 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[m3u8Settings] operator[SEP] identifier[getAudioFramesPerPes] operator[SEP] operator[SEP] , identifier[AUDIOFRAMESPERPES_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getAudioPids] operator[SEP] operator[SEP] , identifier[AUDIOPIDS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getEcmPid] operator[SEP] operator[SEP] , identifier[ECMPID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getPatInterval] operator[SEP] operator[SEP] , identifier[PATINTERVAL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getPcrControl] operator[SEP] operator[SEP] , identifier[PCRCONTROL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getPcrPeriod] operator[SEP] operator[SEP] , identifier[PCRPERIOD_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getPcrPid] operator[SEP] operator[SEP] , identifier[PCRPID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getPmtInterval] operator[SEP] operator[SEP] , identifier[PMTINTERVAL_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getPmtPid] operator[SEP] operator[SEP] , identifier[PMTPID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getProgramNum] operator[SEP] operator[SEP] , identifier[PROGRAMNUM_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getScte35Behavior] operator[SEP] operator[SEP] , identifier[SCTE35BEHAVIOR_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getScte35Pid] operator[SEP] operator[SEP] , identifier[SCTE35PID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getTimedMetadataBehavior] operator[SEP] operator[SEP] , identifier[TIMEDMETADATABEHAVIOR_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getTimedMetadataPid] operator[SEP] operator[SEP] , identifier[TIMEDMETADATAPID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getTransportStreamId] operator[SEP] operator[SEP] , identifier[TRANSPORTSTREAMID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[m3u8Settings] operator[SEP] identifier[getVideoPid] operator[SEP] operator[SEP] , identifier[VIDEOPID_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 String hashPassword(String password, String accountName) { return Hashing.sha256().hashString(password, Charset.forName("UTF-8")).toString(); }
class class_name[name] begin[{] method[hashPassword, return_type[type[String]], modifier[public], parameter[password, accountName]] begin[{] return[call[Hashing.sha256, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[hashPassword] operator[SEP] identifier[String] identifier[password] , identifier[String] identifier[accountName] operator[SEP] { Keyword[return] identifier[Hashing] operator[SEP] identifier[sha256] operator[SEP] operator[SEP] operator[SEP] identifier[hashString] operator[SEP] identifier[password] , identifier[Charset] operator[SEP] identifier[forName] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public Set<SbbEntityID> getSortedSbbAttachmentSet( Set<SbbEntityID> excludeSet) { final Set<SbbEntityID> sbbAttachementSet = cacheData .getSbbEntitiesAttached(); Set<SbbEntityID> result = new HashSet<SbbEntityID>(); for (SbbEntityID sbbEntityId : sbbAttachementSet) { if (!excludeSet.contains(sbbEntityId)) { result.add(sbbEntityId); } } if (result.size() > 1) { result = sleeContainer.getSbbEntityFactory().sortByPriority(result); } return result; }
class class_name[name] begin[{] method[getSortedSbbAttachmentSet, return_type[type[Set]], modifier[public], parameter[excludeSet]] begin[{] local_variable[type[Set], sbbAttachementSet] local_variable[type[Set], result] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=sbbEntityId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=excludeSet, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sbbEntityId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=sbbAttachementSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sbbEntityId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SbbEntityID, sub_type=None))), label=None) if[binary_operation[call[result.size, parameter[]], >, literal[1]]] begin[{] assign[member[.result], call[sleeContainer.getSbbEntityFactory, parameter[]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[SbbEntityID] operator[>] identifier[getSortedSbbAttachmentSet] operator[SEP] identifier[Set] operator[<] identifier[SbbEntityID] operator[>] identifier[excludeSet] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[SbbEntityID] operator[>] identifier[sbbAttachementSet] operator[=] identifier[cacheData] operator[SEP] identifier[getSbbEntitiesAttached] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[SbbEntityID] operator[>] identifier[result] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[SbbEntityID] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[SbbEntityID] identifier[sbbEntityId] operator[:] identifier[sbbAttachementSet] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[excludeSet] operator[SEP] identifier[contains] operator[SEP] identifier[sbbEntityId] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[sbbEntityId] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[result] operator[=] identifier[sleeContainer] operator[SEP] identifier[getSbbEntityFactory] operator[SEP] operator[SEP] operator[SEP] identifier[sortByPriority] operator[SEP] identifier[result] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
private void scanMBeanAttributes(MBeanConfig mBeanConfig, ObjectName mBeanName) { MBeanInfo mBeanInfo; try { mBeanInfo = mBeanServer.getMBeanInfo(mBeanName); MBeanAttributeInfo[] infos = mBeanInfo.getAttributes(); for (int i = 0; i < infos.length; i++) { MBeanAttributeConfig cMBAttr = makeConfigMBeanAttribute( mBeanName, infos[i]); mBeanConfig.addChild(cMBAttr); } } catch (IntrospectionException e) { System.err.println(e.getMessage()); } catch (InstanceNotFoundException e) { System.err.println(e.getMessage()); } catch (ReflectionException e) { System.err.println(e.getMessage()); } }
class class_name[name] begin[{] method[scanMBeanAttributes, return_type[void], modifier[private], parameter[mBeanConfig, mBeanName]] begin[{] local_variable[type[MBeanInfo], mBeanInfo] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=mBeanInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=mBeanName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMBeanInfo, postfix_operators=[], prefix_operators=[], qualifier=mBeanServer, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getAttributes, postfix_operators=[], prefix_operators=[], qualifier=mBeanInfo, selectors=[], type_arguments=None), name=infos)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=MBeanAttributeInfo, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=mBeanName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=infos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=makeConfigMBeanAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=cMBAttr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MBeanAttributeConfig, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cMBAttr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addChild, postfix_operators=[], prefix_operators=[], qualifier=mBeanConfig, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=infos, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IntrospectionException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstanceNotFoundException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ReflectionException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[scanMBeanAttributes] operator[SEP] identifier[MBeanConfig] identifier[mBeanConfig] , identifier[ObjectName] identifier[mBeanName] operator[SEP] { identifier[MBeanInfo] identifier[mBeanInfo] operator[SEP] Keyword[try] { identifier[mBeanInfo] operator[=] identifier[mBeanServer] operator[SEP] identifier[getMBeanInfo] operator[SEP] identifier[mBeanName] operator[SEP] operator[SEP] identifier[MBeanAttributeInfo] operator[SEP] operator[SEP] identifier[infos] operator[=] identifier[mBeanInfo] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[infos] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[MBeanAttributeConfig] identifier[cMBAttr] operator[=] identifier[makeConfigMBeanAttribute] operator[SEP] identifier[mBeanName] , identifier[infos] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[mBeanConfig] operator[SEP] identifier[addChild] operator[SEP] identifier[cMBAttr] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[IntrospectionException] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InstanceNotFoundException] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ReflectionException] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private UserInfoIssueResponse callUserInfoIssue(String accessToken, Map<String, Object> claims) { // Create a request for /api/auth/userinfo/issue API. UserInfoIssueRequest request = new UserInfoIssueRequest() .setToken(accessToken); if (claims != null && claims.size() != 0) { request.setClaims(claims); } try { // Call Authlete's /api/auth/userinfo/issue API. return mApi.userinfoIssue(request); } catch (AuthleteApiException e) { // The API call failed. throw apiFailure("/api/auth/userinfo/issue", e); } }
class class_name[name] begin[{] method[callUserInfoIssue, return_type[type[UserInfoIssueResponse]], modifier[private], parameter[accessToken, claims]] begin[{] local_variable[type[UserInfoIssueRequest], request] if[binary_operation[binary_operation[member[.claims], !=, literal[null]], &&, binary_operation[call[claims.size, parameter[]], !=, literal[0]]]] begin[{] call[request.setClaims, parameter[member[.claims]]] else begin[{] None end[}] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=userinfoIssue, postfix_operators=[], prefix_operators=[], qualifier=mApi, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/api/auth/userinfo/issue"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apiFailure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['AuthleteApiException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] identifier[UserInfoIssueResponse] identifier[callUserInfoIssue] operator[SEP] identifier[String] identifier[accessToken] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[claims] operator[SEP] { identifier[UserInfoIssueRequest] identifier[request] operator[=] Keyword[new] identifier[UserInfoIssueRequest] operator[SEP] operator[SEP] operator[SEP] identifier[setToken] operator[SEP] identifier[accessToken] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[claims] operator[!=] Other[null] operator[&&] identifier[claims] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] { identifier[request] operator[SEP] identifier[setClaims] operator[SEP] identifier[claims] operator[SEP] operator[SEP] } Keyword[try] { Keyword[return] identifier[mApi] operator[SEP] identifier[userinfoIssue] operator[SEP] identifier[request] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[AuthleteApiException] identifier[e] operator[SEP] { Keyword[throw] identifier[apiFailure] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public static double normF(double[][] elements) { double f = 0; for(int i = 0; i < elements.length; i++) { final double[] row = elements[i]; for(int j = 0; j < row.length; j++) { final double v = row[j]; f += v * v; } } // TODO: detect overflow, fall back to slower hypot() return FastMath.sqrt(f); }
class class_name[name] begin[{] method[normF, return_type[type[double]], modifier[public static], parameter[elements]] begin[{] local_variable[type[double], f] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=elements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=row)], modifiers={'final'}, type=BasicType(dimensions=[None], name=double)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=v)], modifiers={'final'}, type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=row, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=elements, 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[call[FastMath.sqrt, parameter[member[.f]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[normF] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[elements] operator[SEP] { Keyword[double] identifier[f] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[elements] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[row] operator[=] identifier[elements] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[row] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[final] Keyword[double] identifier[v] operator[=] identifier[row] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[f] operator[+=] identifier[v] operator[*] identifier[v] operator[SEP] } } Keyword[return] identifier[FastMath] operator[SEP] identifier[sqrt] operator[SEP] identifier[f] operator[SEP] operator[SEP] }
@Api public void setRectangleStyle(ShapeStyle rectangleStyle) { this.rectangleStyle = rectangleStyle; if (targetRectangle != null) { targetRectangle.setStyle(rectangleStyle); render(targetRectangle, RenderGroup.SCREEN, RenderStatus.ALL); } }
class class_name[name] begin[{] method[setRectangleStyle, return_type[void], modifier[public], parameter[rectangleStyle]] begin[{] assign[THIS[member[None.rectangleStyle]], member[.rectangleStyle]] if[binary_operation[member[.targetRectangle], !=, literal[null]]] begin[{] call[targetRectangle.setStyle, parameter[member[.rectangleStyle]]] call[.render, parameter[member[.targetRectangle], member[RenderGroup.SCREEN], member[RenderStatus.ALL]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Api] Keyword[public] Keyword[void] identifier[setRectangleStyle] operator[SEP] identifier[ShapeStyle] identifier[rectangleStyle] operator[SEP] { Keyword[this] operator[SEP] identifier[rectangleStyle] operator[=] identifier[rectangleStyle] operator[SEP] Keyword[if] operator[SEP] identifier[targetRectangle] operator[!=] Other[null] operator[SEP] { identifier[targetRectangle] operator[SEP] identifier[setStyle] operator[SEP] identifier[rectangleStyle] operator[SEP] operator[SEP] identifier[render] operator[SEP] identifier[targetRectangle] , identifier[RenderGroup] operator[SEP] identifier[SCREEN] , identifier[RenderStatus] operator[SEP] identifier[ALL] operator[SEP] operator[SEP] } }
public static void delete(final Collection<File> files) throws IOException { for (final File file : files) { delete(file); } }
class class_name[name] begin[{] method[delete, return_type[void], modifier[public static], parameter[files]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=delete, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[delete] operator[SEP] Keyword[final] identifier[Collection] operator[<] identifier[File] operator[>] identifier[files] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[for] operator[SEP] Keyword[final] identifier[File] identifier[file] operator[:] identifier[files] operator[SEP] { identifier[delete] operator[SEP] identifier[file] operator[SEP] operator[SEP] } }
public void marshall(GetEndpointRequest getEndpointRequest, ProtocolMarshaller protocolMarshaller) { if (getEndpointRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getEndpointRequest.getApplicationId(), APPLICATIONID_BINDING); protocolMarshaller.marshall(getEndpointRequest.getEndpointId(), ENDPOINTID_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[getEndpointRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.getEndpointRequest], ==, 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=getApplicationId, postfix_operators=[], prefix_operators=[], qualifier=getEndpointRequest, selectors=[], type_arguments=None), MemberReference(member=APPLICATIONID_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=getEndpointId, postfix_operators=[], prefix_operators=[], qualifier=getEndpointRequest, selectors=[], type_arguments=None), MemberReference(member=ENDPOINTID_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[GetEndpointRequest] identifier[getEndpointRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[getEndpointRequest] 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[getEndpointRequest] operator[SEP] identifier[getApplicationId] operator[SEP] operator[SEP] , identifier[APPLICATIONID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[getEndpointRequest] operator[SEP] identifier[getEndpointId] operator[SEP] operator[SEP] , identifier[ENDPOINTID_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 String getPhase() { String phase = (String) getStateHelper().eval(PropertyKeys.phase); if (phase != null) { phase = phase.toUpperCase(); } return phase; }
class class_name[name] begin[{] method[getPhase, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], phase] if[binary_operation[member[.phase], !=, literal[null]]] begin[{] assign[member[.phase], call[phase.toUpperCase, parameter[]]] else begin[{] None end[}] return[member[.phase]] end[}] END[}]
Keyword[public] identifier[String] identifier[getPhase] operator[SEP] operator[SEP] { identifier[String] identifier[phase] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[getStateHelper] operator[SEP] operator[SEP] operator[SEP] identifier[eval] operator[SEP] identifier[PropertyKeys] operator[SEP] identifier[phase] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[phase] operator[!=] Other[null] operator[SEP] { identifier[phase] operator[=] identifier[phase] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[phase] operator[SEP] }
public void marshall(AttributeKeyAndValue attributeKeyAndValue, ProtocolMarshaller protocolMarshaller) { if (attributeKeyAndValue == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(attributeKeyAndValue.getKey(), KEY_BINDING); protocolMarshaller.marshall(attributeKeyAndValue.getValue(), VALUE_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[attributeKeyAndValue, protocolMarshaller]] begin[{] if[binary_operation[member[.attributeKeyAndValue], ==, 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=getKey, postfix_operators=[], prefix_operators=[], qualifier=attributeKeyAndValue, selectors=[], type_arguments=None), MemberReference(member=KEY_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=getValue, postfix_operators=[], prefix_operators=[], qualifier=attributeKeyAndValue, selectors=[], type_arguments=None), MemberReference(member=VALUE_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[AttributeKeyAndValue] identifier[attributeKeyAndValue] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[attributeKeyAndValue] 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[attributeKeyAndValue] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[KEY_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[attributeKeyAndValue] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[VALUE_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] } }
void setChild(int index, Node child){ if ((this.splitTest.maxBranches() >= 0) && (index >= this.splitTest.maxBranches())) { throw new IndexOutOfBoundsException(); } this.children.set(index, child); }
class class_name[name] begin[{] method[setChild, return_type[void], modifier[default], parameter[index, child]] begin[{] if[binary_operation[binary_operation[THIS[member[None.splitTest]call[None.maxBranches, parameter[]]], >=, literal[0]], &&, binary_operation[member[.index], >=, THIS[member[None.splitTest]call[None.maxBranches, parameter[]]]]]] 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=IndexOutOfBoundsException, sub_type=None)), label=None) else begin[{] None end[}] THIS[member[None.children]call[None.set, parameter[member[.index], member[.child]]]] end[}] END[}]
Keyword[void] identifier[setChild] operator[SEP] Keyword[int] identifier[index] , identifier[Node] identifier[child] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[splitTest] operator[SEP] identifier[maxBranches] operator[SEP] operator[SEP] operator[>=] Other[0] operator[SEP] operator[&&] operator[SEP] identifier[index] operator[>=] Keyword[this] operator[SEP] identifier[splitTest] operator[SEP] identifier[maxBranches] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IndexOutOfBoundsException] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[children] operator[SEP] identifier[set] operator[SEP] identifier[index] , identifier[child] operator[SEP] operator[SEP] }
public String strLabeling(File file){ List<Sentence> obsvSeqs = dataReader.readFile(file.getPath()); List lblSeqs = labeling(obsvSeqs); String ret = dataWriter.writeString(lblSeqs); return ret; }
class class_name[name] begin[{] method[strLabeling, return_type[type[String]], modifier[public], parameter[file]] begin[{] local_variable[type[List], obsvSeqs] local_variable[type[List], lblSeqs] local_variable[type[String], ret] return[member[.ret]] end[}] END[}]
Keyword[public] identifier[String] identifier[strLabeling] operator[SEP] identifier[File] identifier[file] operator[SEP] { identifier[List] operator[<] identifier[Sentence] operator[>] identifier[obsvSeqs] operator[=] identifier[dataReader] operator[SEP] identifier[readFile] operator[SEP] identifier[file] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] identifier[lblSeqs] operator[=] identifier[labeling] operator[SEP] identifier[obsvSeqs] operator[SEP] operator[SEP] identifier[String] identifier[ret] operator[=] identifier[dataWriter] operator[SEP] identifier[writeString] operator[SEP] identifier[lblSeqs] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
public static void cache(XmlFileModel key, Document document) { String cacheKey = getKey(key); map.put(cacheKey, new CacheDocument(false, document)); }
class class_name[name] begin[{] method[cache, return_type[void], modifier[public static], parameter[key, document]] begin[{] local_variable[type[String], cacheKey] call[map.put, parameter[member[.cacheKey], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=document, 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=CacheDocument, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[cache] operator[SEP] identifier[XmlFileModel] identifier[key] , identifier[Document] identifier[document] operator[SEP] { identifier[String] identifier[cacheKey] operator[=] identifier[getKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[cacheKey] , Keyword[new] identifier[CacheDocument] operator[SEP] literal[boolean] , identifier[document] operator[SEP] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<Page<RoleAssignmentInner>>> listForScopeSinglePageAsync(final String scope, final String filter) { if (scope == null) { throw new IllegalArgumentException("Parameter scope is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listForScope(scope, filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<RoleAssignmentInner>>>>() { @Override public Observable<ServiceResponse<Page<RoleAssignmentInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<RoleAssignmentInner>> result = listForScopeDelegate(response); return Observable.just(new ServiceResponse<Page<RoleAssignmentInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[listForScopeSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[scope, filter]] begin[{] if[binary_operation[member[.scope], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter scope is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.apiVersion, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.apiVersion() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[call[service.listForScope, parameter[member[.scope], member[.filter], THIS[member[None.client]call[None.apiVersion, parameter[]]], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RoleAssignmentInner] operator[>] operator[>] operator[>] identifier[listForScopeSinglePageAsync] operator[SEP] Keyword[final] identifier[String] identifier[scope] , Keyword[final] identifier[String] identifier[filter] operator[SEP] { Keyword[if] operator[SEP] identifier[scope] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[service] operator[SEP] identifier[listForScope] operator[SEP] identifier[scope] , identifier[filter] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RoleAssignmentInner] operator[>] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RoleAssignmentInner] operator[>] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[PageImpl] operator[<] identifier[RoleAssignmentInner] operator[>] operator[>] identifier[result] operator[=] identifier[listForScopeDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] Keyword[new] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[RoleAssignmentInner] operator[>] operator[>] operator[SEP] identifier[result] operator[SEP] identifier[body] operator[SEP] operator[SEP] , identifier[result] operator[SEP] identifier[response] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
private UnicodeSet applyFilter(Filter filter, int src) { // Logically, walk through all Unicode characters, noting the start // and end of each range for which filter.contain(c) is // true. Add each range to a set. // // To improve performance, use an inclusions set which // encodes information about character ranges that are known // to have identical properties. // getInclusions(src) contains exactly the first characters of // same-value ranges for the given properties "source". clear(); int startHasProperty = -1; UnicodeSet inclusions = getInclusions(src); int limitRange = inclusions.getRangeCount(); for (int j=0; j<limitRange; ++j) { // get current range int start = inclusions.getRangeStart(j); int end = inclusions.getRangeEnd(j); // for all the code points in the range, process for (int ch = start; ch <= end; ++ch) { // only add to the unicodeset on inflection points -- // where the hasProperty value changes to false if (filter.contains(ch)) { if (startHasProperty < 0) { startHasProperty = ch; } } else if (startHasProperty >= 0) { add_unchecked(startHasProperty, ch-1); startHasProperty = -1; } } } if (startHasProperty >= 0) { add_unchecked(startHasProperty, 0x10FFFF); } return this; }
class class_name[name] begin[{] method[applyFilter, return_type[type[UnicodeSet]], modifier[private], parameter[filter, src]] begin[{] call[.clear, parameter[]] local_variable[type[int], startHasProperty] local_variable[type[UnicodeSet], inclusions] local_variable[type[int], limitRange] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRangeStart, postfix_operators=[], prefix_operators=[], qualifier=inclusions, selectors=[], type_arguments=None), name=start)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getRangeEnd, postfix_operators=[], prefix_operators=[], qualifier=inclusions, selectors=[], type_arguments=None), name=end)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=startHasProperty, 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=[MemberReference(member=startHasProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=add_unchecked, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startHasProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=startHasProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=startHasProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=ch)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=ch, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=limitRange, 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=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.startHasProperty], >=, literal[0]]] begin[{] call[.add_unchecked, parameter[member[.startHasProperty], literal[0x10FFFF]]] else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[private] identifier[UnicodeSet] identifier[applyFilter] operator[SEP] identifier[Filter] identifier[filter] , Keyword[int] identifier[src] operator[SEP] { identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[startHasProperty] operator[=] operator[-] Other[1] operator[SEP] identifier[UnicodeSet] identifier[inclusions] operator[=] identifier[getInclusions] operator[SEP] identifier[src] operator[SEP] operator[SEP] Keyword[int] identifier[limitRange] operator[=] identifier[inclusions] operator[SEP] identifier[getRangeCount] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[limitRange] operator[SEP] operator[++] identifier[j] operator[SEP] { Keyword[int] identifier[start] operator[=] identifier[inclusions] operator[SEP] identifier[getRangeStart] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[int] identifier[end] operator[=] identifier[inclusions] operator[SEP] identifier[getRangeEnd] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[ch] operator[=] identifier[start] operator[SEP] identifier[ch] operator[<=] identifier[end] operator[SEP] operator[++] identifier[ch] operator[SEP] { Keyword[if] operator[SEP] identifier[filter] operator[SEP] identifier[contains] operator[SEP] identifier[ch] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[startHasProperty] operator[<] Other[0] operator[SEP] { identifier[startHasProperty] operator[=] identifier[ch] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[startHasProperty] operator[>=] Other[0] operator[SEP] { identifier[add_unchecked] operator[SEP] identifier[startHasProperty] , identifier[ch] operator[-] Other[1] operator[SEP] operator[SEP] identifier[startHasProperty] operator[=] operator[-] Other[1] operator[SEP] } } } Keyword[if] operator[SEP] identifier[startHasProperty] operator[>=] Other[0] operator[SEP] { identifier[add_unchecked] operator[SEP] identifier[startHasProperty] , literal[Integer] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static void checkSQLRestriction(DatasourceConnection dc, SQL sql) throws PageException { Array sqlparts = ListUtil.listToArrayRemoveEmpty(SQLUtil.removeLiterals(sql.getSQLString()), " \t" + System.getProperty("line.separator")); // print.ln(List.toStringArray(sqlparts)); DataSource ds = dc.getDatasource(); if (!ds.hasAllow(DataSource.ALLOW_ALTER)) checkSQLRestriction(dc, "alter", sqlparts, sql); if (!ds.hasAllow(DataSource.ALLOW_CREATE)) checkSQLRestriction(dc, "create", sqlparts, sql); if (!ds.hasAllow(DataSource.ALLOW_DELETE)) checkSQLRestriction(dc, "delete", sqlparts, sql); if (!ds.hasAllow(DataSource.ALLOW_DROP)) checkSQLRestriction(dc, "drop", sqlparts, sql); if (!ds.hasAllow(DataSource.ALLOW_GRANT)) checkSQLRestriction(dc, "grant", sqlparts, sql); if (!ds.hasAllow(DataSource.ALLOW_INSERT)) checkSQLRestriction(dc, "insert", sqlparts, sql); if (!ds.hasAllow(DataSource.ALLOW_REVOKE)) checkSQLRestriction(dc, "revoke", sqlparts, sql); if (!ds.hasAllow(DataSource.ALLOW_SELECT)) checkSQLRestriction(dc, "select", sqlparts, sql); if (!ds.hasAllow(DataSource.ALLOW_UPDATE)) checkSQLRestriction(dc, "update", sqlparts, sql); }
class class_name[name] begin[{] method[checkSQLRestriction, return_type[void], modifier[public static], parameter[dc, sql]] begin[{] local_variable[type[Array], sqlparts] local_variable[type[DataSource], ds] if[call[ds.hasAllow, parameter[member[DataSource.ALLOW_ALTER]]]] begin[{] call[.checkSQLRestriction, parameter[member[.dc], literal["alter"], member[.sqlparts], member[.sql]]] else begin[{] None end[}] if[call[ds.hasAllow, parameter[member[DataSource.ALLOW_CREATE]]]] begin[{] call[.checkSQLRestriction, parameter[member[.dc], literal["create"], member[.sqlparts], member[.sql]]] else begin[{] None end[}] if[call[ds.hasAllow, parameter[member[DataSource.ALLOW_DELETE]]]] begin[{] call[.checkSQLRestriction, parameter[member[.dc], literal["delete"], member[.sqlparts], member[.sql]]] else begin[{] None end[}] if[call[ds.hasAllow, parameter[member[DataSource.ALLOW_DROP]]]] begin[{] call[.checkSQLRestriction, parameter[member[.dc], literal["drop"], member[.sqlparts], member[.sql]]] else begin[{] None end[}] if[call[ds.hasAllow, parameter[member[DataSource.ALLOW_GRANT]]]] begin[{] call[.checkSQLRestriction, parameter[member[.dc], literal["grant"], member[.sqlparts], member[.sql]]] else begin[{] None end[}] if[call[ds.hasAllow, parameter[member[DataSource.ALLOW_INSERT]]]] begin[{] call[.checkSQLRestriction, parameter[member[.dc], literal["insert"], member[.sqlparts], member[.sql]]] else begin[{] None end[}] if[call[ds.hasAllow, parameter[member[DataSource.ALLOW_REVOKE]]]] begin[{] call[.checkSQLRestriction, parameter[member[.dc], literal["revoke"], member[.sqlparts], member[.sql]]] else begin[{] None end[}] if[call[ds.hasAllow, parameter[member[DataSource.ALLOW_SELECT]]]] begin[{] call[.checkSQLRestriction, parameter[member[.dc], literal["select"], member[.sqlparts], member[.sql]]] else begin[{] None end[}] if[call[ds.hasAllow, parameter[member[DataSource.ALLOW_UPDATE]]]] begin[{] call[.checkSQLRestriction, parameter[member[.dc], literal["update"], member[.sqlparts], member[.sql]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[checkSQLRestriction] operator[SEP] identifier[DatasourceConnection] identifier[dc] , identifier[SQL] identifier[sql] operator[SEP] Keyword[throws] identifier[PageException] { identifier[Array] identifier[sqlparts] operator[=] identifier[ListUtil] operator[SEP] identifier[listToArrayRemoveEmpty] operator[SEP] identifier[SQLUtil] operator[SEP] identifier[removeLiterals] operator[SEP] identifier[sql] operator[SEP] identifier[getSQLString] operator[SEP] operator[SEP] operator[SEP] , literal[String] operator[+] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[DataSource] identifier[ds] operator[=] identifier[dc] operator[SEP] identifier[getDatasource] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ds] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_ALTER] operator[SEP] operator[SEP] identifier[checkSQLRestriction] operator[SEP] identifier[dc] , literal[String] , identifier[sqlparts] , identifier[sql] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ds] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_CREATE] operator[SEP] operator[SEP] identifier[checkSQLRestriction] operator[SEP] identifier[dc] , literal[String] , identifier[sqlparts] , identifier[sql] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ds] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_DELETE] operator[SEP] operator[SEP] identifier[checkSQLRestriction] operator[SEP] identifier[dc] , literal[String] , identifier[sqlparts] , identifier[sql] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ds] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_DROP] operator[SEP] operator[SEP] identifier[checkSQLRestriction] operator[SEP] identifier[dc] , literal[String] , identifier[sqlparts] , identifier[sql] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ds] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_GRANT] operator[SEP] operator[SEP] identifier[checkSQLRestriction] operator[SEP] identifier[dc] , literal[String] , identifier[sqlparts] , identifier[sql] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ds] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_INSERT] operator[SEP] operator[SEP] identifier[checkSQLRestriction] operator[SEP] identifier[dc] , literal[String] , identifier[sqlparts] , identifier[sql] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ds] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_REVOKE] operator[SEP] operator[SEP] identifier[checkSQLRestriction] operator[SEP] identifier[dc] , literal[String] , identifier[sqlparts] , identifier[sql] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ds] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_SELECT] operator[SEP] operator[SEP] identifier[checkSQLRestriction] operator[SEP] identifier[dc] , literal[String] , identifier[sqlparts] , identifier[sql] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ds] operator[SEP] identifier[hasAllow] operator[SEP] identifier[DataSource] operator[SEP] identifier[ALLOW_UPDATE] operator[SEP] operator[SEP] identifier[checkSQLRestriction] operator[SEP] identifier[dc] , literal[String] , identifier[sqlparts] , identifier[sql] operator[SEP] operator[SEP] }
public static xen_supplemental_pack[] install(nitro_service client, xen_supplemental_pack[] resources) throws Exception { if(resources == null) throw new Exception("Null resource array"); if(resources.length == 1) return ((xen_supplemental_pack[]) resources[0].perform_operation(client, "install")); return ((xen_supplemental_pack[]) perform_operation_bulk_request(client, resources, "install")); }
class class_name[name] begin[{] method[install, return_type[type[xen_supplemental_pack]], modifier[public static], parameter[client, resources]] begin[{] if[binary_operation[member[.resources], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Null resource array")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[resources.length], ==, literal[1]]] begin[{] return[Cast(expression=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MethodInvocation(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="install")], member=perform_operation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[None], name=xen_supplemental_pack, sub_type=None))] else begin[{] None end[}] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="install")], member=perform_operation_bulk_request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[None], name=xen_supplemental_pack, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[xen_supplemental_pack] operator[SEP] operator[SEP] identifier[install] operator[SEP] identifier[nitro_service] identifier[client] , identifier[xen_supplemental_pack] operator[SEP] operator[SEP] identifier[resources] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[resources] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resources] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[xen_supplemental_pack] operator[SEP] operator[SEP] operator[SEP] identifier[resources] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[perform_operation] operator[SEP] identifier[client] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[xen_supplemental_pack] operator[SEP] operator[SEP] operator[SEP] identifier[perform_operation_bulk_request] operator[SEP] identifier[client] , identifier[resources] , literal[String] operator[SEP] operator[SEP] operator[SEP] }
static List<NetworkInterface> getInterfaces() throws SocketException { List<NetworkInterface> all = new ArrayList<NetworkInterface>(); addAllInterfaces(all, Collections.list(NetworkInterface.getNetworkInterfaces())); return all; }
class class_name[name] begin[{] method[getInterfaces, return_type[type[List]], modifier[static], parameter[]] begin[{] local_variable[type[List], all] call[.addAllInterfaces, parameter[member[.all], call[Collections.list, parameter[call[NetworkInterface.getNetworkInterfaces, parameter[]]]]]] return[member[.all]] end[}] END[}]
Keyword[static] identifier[List] operator[<] identifier[NetworkInterface] operator[>] identifier[getInterfaces] operator[SEP] operator[SEP] Keyword[throws] identifier[SocketException] { identifier[List] operator[<] identifier[NetworkInterface] operator[>] identifier[all] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[NetworkInterface] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[addAllInterfaces] operator[SEP] identifier[all] , identifier[Collections] operator[SEP] identifier[list] operator[SEP] identifier[NetworkInterface] operator[SEP] identifier[getNetworkInterfaces] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[all] operator[SEP] }
public static <T> T parseWithException(String in, Class<T> mapTo) throws ParseException { JSONParser p = new JSONParser(DEFAULT_PERMISSIVE_MODE); return p.parse(in, defaultReader.getMapper(mapTo)); }
class class_name[name] begin[{] method[parseWithException, return_type[type[T]], modifier[public static], parameter[in, mapTo]] begin[{] local_variable[type[JSONParser], p] return[call[p.parse, parameter[member[.in], call[defaultReader.getMapper, parameter[member[.mapTo]]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[parseWithException] operator[SEP] identifier[String] identifier[in] , identifier[Class] operator[<] identifier[T] operator[>] identifier[mapTo] operator[SEP] Keyword[throws] identifier[ParseException] { identifier[JSONParser] identifier[p] operator[=] Keyword[new] identifier[JSONParser] operator[SEP] identifier[DEFAULT_PERMISSIVE_MODE] operator[SEP] operator[SEP] Keyword[return] identifier[p] operator[SEP] identifier[parse] operator[SEP] identifier[in] , identifier[defaultReader] operator[SEP] identifier[getMapper] operator[SEP] identifier[mapTo] operator[SEP] operator[SEP] operator[SEP] }
public static Long getLong(Config config, String path, Long def) { if (config.hasPath(path)) { return Long.valueOf(config.getLong(path)); } return def; }
class class_name[name] begin[{] method[getLong, return_type[type[Long]], modifier[public static], parameter[config, path, def]] begin[{] if[call[config.hasPath, parameter[member[.path]]]] begin[{] return[call[Long.valueOf, parameter[call[config.getLong, parameter[member[.path]]]]]] else begin[{] None end[}] return[member[.def]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Long] identifier[getLong] operator[SEP] identifier[Config] identifier[config] , identifier[String] identifier[path] , identifier[Long] identifier[def] operator[SEP] { Keyword[if] operator[SEP] identifier[config] operator[SEP] identifier[hasPath] operator[SEP] identifier[path] operator[SEP] operator[SEP] { Keyword[return] identifier[Long] operator[SEP] identifier[valueOf] operator[SEP] identifier[config] operator[SEP] identifier[getLong] operator[SEP] identifier[path] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[def] operator[SEP] }
private Instance readDenseInstanceSparse() { //Returns a dense instance Instance instance = newDenseInstance(this.instanceInformation.numAttributes()); //System.out.println(this.instanceInformation.numAttributes()); int numAttribute; try { //while (streamTokenizer.ttype != StreamTokenizer.TT_EOF) { streamTokenizer.nextToken(); // Remove the '{' char //For each line while (streamTokenizer.ttype != StreamTokenizer.TT_EOL && streamTokenizer.ttype != StreamTokenizer.TT_EOF) { while (streamTokenizer.ttype != '}') { //For each item //streamTokenizer.nextToken(); //while (streamTokenizer.ttype != '}'){ //System.out.print(streamTokenizer.nval+":"); numAttribute = (int) streamTokenizer.nval; streamTokenizer.nextToken(); if (streamTokenizer.ttype == StreamTokenizer.TT_NUMBER) { //System.out.print(streamTokenizer.nval + " "); this.setValue(instance, numAttribute, streamTokenizer.nval, true); //numAttribute++; } else if (streamTokenizer.sval != null && (streamTokenizer.ttype == StreamTokenizer.TT_WORD || streamTokenizer.ttype == 34)) { //System.out.print(streamTokenizer.sval + "/"+this.instanceInformation.attribute(numAttribute).indexOfValue(streamTokenizer.sval)+" "); if (this.auxAttributes.get(numAttribute).isNumeric()) { this.setValue(instance, numAttribute, Double.valueOf(streamTokenizer.sval).doubleValue(), true); } else { this.setValue(instance, numAttribute, this.instanceInformation.attribute(numAttribute).indexOfValue(streamTokenizer.sval), false); //numAttribute++; } } streamTokenizer.nextToken(); } streamTokenizer.nextToken(); //Remove the '}' char } streamTokenizer.nextToken(); //System.out.println("EOL"); //} } catch (IOException ex) { Logger.getLogger(ArffLoader.class.getName()).log(Level.SEVERE, null, ex); } return instance; }
class class_name[name] begin[{] method[readDenseInstanceSparse, return_type[type[Instance]], modifier[private], parameter[]] begin[{] local_variable[type[Instance], instance] local_variable[type[int], numAttribute] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[], type_arguments=None), label=None), WhileStatement(body=BlockStatement(label=None, statements=[WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=numAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=nval, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[]), type=BasicType(dimensions=[], name=int))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ttype, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[]), operandr=MemberReference(member=TT_NUMBER, postfix_operators=[], prefix_operators=[], qualifier=StreamTokenizer, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=sval, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ttype, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[]), operandr=MemberReference(member=TT_WORD, postfix_operators=[], prefix_operators=[], qualifier=StreamTokenizer, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=ttype, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=34), operator===), operator=||), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=auxAttributes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=numAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=isNumeric, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=numAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=instanceInformation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=numAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=attribute, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=sval, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[])], member=indexOfValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=numAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=sval, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[MethodInvocation(arguments=[], member=doubleValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=numAttribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nval, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=ttype, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='}'), operator=!=), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ttype, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[]), operandr=MemberReference(member=TT_EOL, postfix_operators=[], prefix_operators=[], qualifier=StreamTokenizer, selectors=[]), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=ttype, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[]), operandr=MemberReference(member=TT_EOF, postfix_operators=[], prefix_operators=[], qualifier=StreamTokenizer, selectors=[]), operator=!=), operator=&&), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=streamTokenizer, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ArffLoader, sub_type=None))], member=getLogger, postfix_operators=[], prefix_operators=[], qualifier=Logger, selectors=[MethodInvocation(arguments=[MemberReference(member=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) return[member[.instance]] end[}] END[}]
Keyword[private] identifier[Instance] identifier[readDenseInstanceSparse] operator[SEP] operator[SEP] { identifier[Instance] identifier[instance] operator[=] identifier[newDenseInstance] operator[SEP] Keyword[this] operator[SEP] identifier[instanceInformation] operator[SEP] identifier[numAttributes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[numAttribute] operator[SEP] Keyword[try] { identifier[streamTokenizer] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[streamTokenizer] operator[SEP] identifier[ttype] operator[!=] identifier[StreamTokenizer] operator[SEP] identifier[TT_EOL] operator[&&] identifier[streamTokenizer] operator[SEP] identifier[ttype] operator[!=] identifier[StreamTokenizer] operator[SEP] identifier[TT_EOF] operator[SEP] { Keyword[while] operator[SEP] identifier[streamTokenizer] operator[SEP] identifier[ttype] operator[!=] literal[String] operator[SEP] { identifier[numAttribute] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[streamTokenizer] operator[SEP] identifier[nval] operator[SEP] identifier[streamTokenizer] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[streamTokenizer] operator[SEP] identifier[ttype] operator[==] identifier[StreamTokenizer] operator[SEP] identifier[TT_NUMBER] operator[SEP] { Keyword[this] operator[SEP] identifier[setValue] operator[SEP] identifier[instance] , identifier[numAttribute] , identifier[streamTokenizer] operator[SEP] identifier[nval] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[streamTokenizer] operator[SEP] identifier[sval] operator[!=] Other[null] operator[&&] operator[SEP] identifier[streamTokenizer] operator[SEP] identifier[ttype] operator[==] identifier[StreamTokenizer] operator[SEP] identifier[TT_WORD] operator[||] identifier[streamTokenizer] operator[SEP] identifier[ttype] operator[==] Other[34] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[auxAttributes] operator[SEP] identifier[get] operator[SEP] identifier[numAttribute] operator[SEP] operator[SEP] identifier[isNumeric] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[setValue] operator[SEP] identifier[instance] , identifier[numAttribute] , identifier[Double] operator[SEP] identifier[valueOf] operator[SEP] identifier[streamTokenizer] operator[SEP] identifier[sval] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[setValue] operator[SEP] identifier[instance] , identifier[numAttribute] , Keyword[this] operator[SEP] identifier[instanceInformation] operator[SEP] identifier[attribute] operator[SEP] identifier[numAttribute] operator[SEP] operator[SEP] identifier[indexOfValue] operator[SEP] identifier[streamTokenizer] operator[SEP] identifier[sval] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] } } identifier[streamTokenizer] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] } identifier[streamTokenizer] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] } identifier[streamTokenizer] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ex] operator[SEP] { identifier[Logger] operator[SEP] identifier[getLogger] operator[SEP] identifier[ArffLoader] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , Other[null] , identifier[ex] operator[SEP] operator[SEP] } Keyword[return] identifier[instance] operator[SEP] }
@Override @Pure public int indexOf(Object obj) { if (this.clazz.isInstance(obj)) { return this.grid.indexOf(this.clazz.cast(obj)); } return -1; }
class class_name[name] begin[{] method[indexOf, return_type[type[int]], modifier[public], parameter[obj]] begin[{] if[THIS[member[None.clazz]call[None.isInstance, parameter[member[.obj]]]]] begin[{] return[THIS[member[None.grid]call[None.indexOf, parameter[THIS[member[None.clazz]call[None.cast, parameter[member[.obj]]]]]]]] else begin[{] None end[}] return[literal[1]] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[Pure] Keyword[public] Keyword[int] identifier[indexOf] operator[SEP] identifier[Object] identifier[obj] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[clazz] operator[SEP] identifier[isInstance] operator[SEP] identifier[obj] operator[SEP] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[grid] operator[SEP] identifier[indexOf] operator[SEP] Keyword[this] operator[SEP] identifier[clazz] operator[SEP] identifier[cast] operator[SEP] identifier[obj] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[-] Other[1] operator[SEP] }
@Override public List<Option> getCommandLineOptions() { final List<Option> ret = new LinkedList<Option>(); String help; help = TIME_HELP; ret.add(new Option(SHORT_OPT_TIME, LONG_OPT_TIME, false, help)); help = WARNINGS_AS_ERRORS; ret.add(new Option(null, LONG_OPT_PEDANTIC, false, help)); help = SYSTEM_CONFIG_PATH; Option o = new Option(SHRT_OPT_SYSCFG, LONG_OPT_SYSCFG, true, help); o.setArgName(ARG_SYSCFG); ret.add(o); return ret; }
class class_name[name] begin[{] method[getCommandLineOptions, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], ret] local_variable[type[String], help] assign[member[.help], member[.TIME_HELP]] call[ret.add, parameter[ClassCreator(arguments=[MemberReference(member=SHORT_OPT_TIME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=LONG_OPT_TIME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=help, 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=Option, sub_type=None))]] assign[member[.help], member[.WARNINGS_AS_ERRORS]] call[ret.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=LONG_OPT_PEDANTIC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=help, 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=Option, sub_type=None))]] assign[member[.help], member[.SYSTEM_CONFIG_PATH]] local_variable[type[Option], o] call[o.setArgName, parameter[member[.ARG_SYSCFG]]] call[ret.add, parameter[member[.o]]] return[member[.ret]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Option] operator[>] identifier[getCommandLineOptions] operator[SEP] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[Option] operator[>] identifier[ret] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[Option] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[help] operator[SEP] identifier[help] operator[=] identifier[TIME_HELP] operator[SEP] identifier[ret] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Option] operator[SEP] identifier[SHORT_OPT_TIME] , identifier[LONG_OPT_TIME] , literal[boolean] , identifier[help] operator[SEP] operator[SEP] operator[SEP] identifier[help] operator[=] identifier[WARNINGS_AS_ERRORS] operator[SEP] identifier[ret] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Option] operator[SEP] Other[null] , identifier[LONG_OPT_PEDANTIC] , literal[boolean] , identifier[help] operator[SEP] operator[SEP] operator[SEP] identifier[help] operator[=] identifier[SYSTEM_CONFIG_PATH] operator[SEP] identifier[Option] identifier[o] operator[=] Keyword[new] identifier[Option] operator[SEP] identifier[SHRT_OPT_SYSCFG] , identifier[LONG_OPT_SYSCFG] , literal[boolean] , identifier[help] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[setArgName] operator[SEP] identifier[ARG_SYSCFG] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[add] operator[SEP] identifier[o] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
public GeneratorSetBuilder generator( String functionName, ITestCaseGenerator generator) { generatorSet_.addGenerator( functionName, generator); return this; }
class class_name[name] begin[{] method[generator, return_type[type[GeneratorSetBuilder]], modifier[public], parameter[functionName, generator]] begin[{] call[generatorSet_.addGenerator, parameter[member[.functionName], member[.generator]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[GeneratorSetBuilder] identifier[generator] operator[SEP] identifier[String] identifier[functionName] , identifier[ITestCaseGenerator] identifier[generator] operator[SEP] { identifier[generatorSet_] operator[SEP] identifier[addGenerator] operator[SEP] identifier[functionName] , identifier[generator] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
protected @Nonnull <T> Provider<T> getBeanProvider(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType, @Nullable Qualifier<T> qualifier) { ArgumentUtils.requireNonNull("beanType", beanType); @SuppressWarnings("unchecked") BeanRegistration<T> beanRegistration = singletonObjects.get(new BeanKey(beanType, qualifier)); if (beanRegistration != null) { return new ResolvedProvider<>(beanRegistration.bean); } Optional<BeanDefinition<T>> concreteCandidate = findConcreteCandidate(beanType, qualifier, true, false); if (concreteCandidate.isPresent()) { return new UnresolvedProvider<>(beanType, qualifier, this); } else { throw new NoSuchBeanException(beanType); } }
class class_name[name] begin[{] method[getBeanProvider, return_type[type[Provider]], modifier[protected], parameter[resolutionContext, beanType, qualifier]] begin[{] call[ArgumentUtils.requireNonNull, parameter[literal["beanType"], member[.beanType]]] local_variable[type[BeanRegistration], beanRegistration] if[binary_operation[member[.beanRegistration], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=bean, postfix_operators=[], prefix_operators=[], qualifier=beanRegistration, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ResolvedProvider, sub_type=None))] else begin[{] None end[}] local_variable[type[Optional], concreteCandidate] if[call[concreteCandidate.isPresent, parameter[]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=beanType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=qualifier, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=UnresolvedProvider, sub_type=None))] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=beanType, 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=NoSuchBeanException, sub_type=None)), label=None) end[}] end[}] END[}]
Keyword[protected] annotation[@] identifier[Nonnull] operator[<] identifier[T] operator[>] identifier[Provider] operator[<] identifier[T] operator[>] identifier[getBeanProvider] operator[SEP] annotation[@] identifier[Nullable] identifier[BeanResolutionContext] identifier[resolutionContext] , annotation[@] identifier[Nonnull] identifier[Class] operator[<] identifier[T] operator[>] identifier[beanType] , annotation[@] identifier[Nullable] identifier[Qualifier] operator[<] identifier[T] operator[>] identifier[qualifier] operator[SEP] { identifier[ArgumentUtils] operator[SEP] identifier[requireNonNull] operator[SEP] literal[String] , identifier[beanType] operator[SEP] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[BeanRegistration] operator[<] identifier[T] operator[>] identifier[beanRegistration] operator[=] identifier[singletonObjects] operator[SEP] identifier[get] operator[SEP] Keyword[new] identifier[BeanKey] operator[SEP] identifier[beanType] , identifier[qualifier] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[beanRegistration] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[ResolvedProvider] operator[<] operator[>] operator[SEP] identifier[beanRegistration] operator[SEP] identifier[bean] operator[SEP] operator[SEP] } identifier[Optional] operator[<] identifier[BeanDefinition] operator[<] identifier[T] operator[>] operator[>] identifier[concreteCandidate] operator[=] identifier[findConcreteCandidate] operator[SEP] identifier[beanType] , identifier[qualifier] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[concreteCandidate] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[UnresolvedProvider] operator[<] operator[>] operator[SEP] identifier[beanType] , identifier[qualifier] , Keyword[this] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[NoSuchBeanException] operator[SEP] identifier[beanType] operator[SEP] operator[SEP] } }
protected void refreshFromSystem() { try { // Re-read and re-register all of the namespaces ... SessionCache systemCache = repository.createSystemSession(repository.context(), false); SystemContent system = new SystemContent(systemCache); CachedNode locks = system.locksNode(); MutableCachedNode mutableLocks = null; Set<NodeKey> corruptedLocks = new HashSet<>(); for (ChildReference ref : locks.getChildReferences(systemCache)) { CachedNode node = systemCache.getNode(ref); if (node == null) { if (mutableLocks == null) { mutableLocks = system.mutableLocksNode(); } NodeKey lockKey = ref.getKey(); logger.warn(JcrI18n.lockNotFound, lockKey); mutableLocks.removeChild(systemCache, lockKey); corruptedLocks.add(lockKey); continue; } ModeShapeLock lock = new ModeShapeLock(node, systemCache); locksByNodeKey.put(lock.getLockedNodeKey(), lock); } if (mutableLocks != null) { system.save(); for (Iterator<Map.Entry<NodeKey, ModeShapeLock>> locksIterator = locksByNodeKey.entrySet().iterator(); locksIterator.hasNext();) { NodeKey lockKey = locksIterator.next().getValue().getLockKey(); if (corruptedLocks.contains(lockKey)) { locksIterator.remove(); } } } } catch (Throwable e) { logger.error(e, JcrI18n.errorRefreshingLocks, repository.name()); } }
class class_name[name] begin[{] method[refreshFromSystem, return_type[void], modifier[protected], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=context, postfix_operators=[], prefix_operators=[], qualifier=repository, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=createSystemSession, postfix_operators=[], prefix_operators=[], qualifier=repository, selectors=[], type_arguments=None), name=systemCache)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SessionCache, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=systemCache, 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=SystemContent, sub_type=None)), name=system)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SystemContent, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=locksNode, postfix_operators=[], prefix_operators=[], qualifier=system, selectors=[], type_arguments=None), name=locks)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CachedNode, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=mutableLocks)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MutableCachedNode, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=HashSet, sub_type=None)), name=corruptedLocks)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=NodeKey, sub_type=None))], dimensions=[], name=Set, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNode, postfix_operators=[], prefix_operators=[], qualifier=systemCache, selectors=[], type_arguments=None), name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CachedNode, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=node, 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=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=mutableLocks, 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=mutableLocks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=mutableLocksNode, postfix_operators=[], prefix_operators=[], qualifier=system, selectors=[], type_arguments=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=ref, selectors=[], type_arguments=None), name=lockKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NodeKey, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lockNotFound, postfix_operators=[], prefix_operators=[], qualifier=JcrI18n, selectors=[]), MemberReference(member=lockKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=systemCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lockKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeChild, postfix_operators=[], prefix_operators=[], qualifier=mutableLocks, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lockKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=corruptedLocks, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=systemCache, 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=ModeShapeLock, sub_type=None)), name=lock)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ModeShapeLock, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLockedNodeKey, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), MemberReference(member=lock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=locksByNodeKey, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=systemCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getChildReferences, postfix_operators=[], prefix_operators=[], qualifier=locks, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ref)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ChildReference, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=mutableLocks, 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=save, postfix_operators=[], prefix_operators=[], qualifier=system, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=locksIterator, selectors=[MethodInvocation(arguments=[], member=getValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getLockKey, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=lockKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NodeKey, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=lockKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=corruptedLocks, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=remove, postfix_operators=[], prefix_operators=[], qualifier=locksIterator, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=locksIterator, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=locksByNodeKey, selectors=[MethodInvocation(arguments=[], member=iterator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=locksIterator)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=NodeKey, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ModeShapeLock, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=errorRefreshingLocks, postfix_operators=[], prefix_operators=[], qualifier=JcrI18n, selectors=[]), MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=repository, selectors=[], type_arguments=None)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[refreshFromSystem] operator[SEP] operator[SEP] { Keyword[try] { identifier[SessionCache] identifier[systemCache] operator[=] identifier[repository] operator[SEP] identifier[createSystemSession] operator[SEP] identifier[repository] operator[SEP] identifier[context] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] identifier[SystemContent] identifier[system] operator[=] Keyword[new] identifier[SystemContent] operator[SEP] identifier[systemCache] operator[SEP] operator[SEP] identifier[CachedNode] identifier[locks] operator[=] identifier[system] operator[SEP] identifier[locksNode] operator[SEP] operator[SEP] operator[SEP] identifier[MutableCachedNode] identifier[mutableLocks] operator[=] Other[null] operator[SEP] identifier[Set] operator[<] identifier[NodeKey] operator[>] identifier[corruptedLocks] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ChildReference] identifier[ref] operator[:] identifier[locks] operator[SEP] identifier[getChildReferences] operator[SEP] identifier[systemCache] operator[SEP] operator[SEP] { identifier[CachedNode] identifier[node] operator[=] identifier[systemCache] operator[SEP] identifier[getNode] operator[SEP] identifier[ref] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[node] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[mutableLocks] operator[==] Other[null] operator[SEP] { identifier[mutableLocks] operator[=] identifier[system] operator[SEP] identifier[mutableLocksNode] operator[SEP] operator[SEP] operator[SEP] } identifier[NodeKey] identifier[lockKey] operator[=] identifier[ref] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[warn] operator[SEP] identifier[JcrI18n] operator[SEP] identifier[lockNotFound] , identifier[lockKey] operator[SEP] operator[SEP] identifier[mutableLocks] operator[SEP] identifier[removeChild] operator[SEP] identifier[systemCache] , identifier[lockKey] operator[SEP] operator[SEP] identifier[corruptedLocks] operator[SEP] identifier[add] operator[SEP] identifier[lockKey] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } identifier[ModeShapeLock] identifier[lock] operator[=] Keyword[new] identifier[ModeShapeLock] operator[SEP] identifier[node] , identifier[systemCache] operator[SEP] operator[SEP] identifier[locksByNodeKey] operator[SEP] identifier[put] operator[SEP] identifier[lock] operator[SEP] identifier[getLockedNodeKey] operator[SEP] operator[SEP] , identifier[lock] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[mutableLocks] operator[!=] Other[null] operator[SEP] { identifier[system] operator[SEP] identifier[save] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[NodeKey] , identifier[ModeShapeLock] operator[>] operator[>] identifier[locksIterator] operator[=] identifier[locksByNodeKey] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[locksIterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[NodeKey] identifier[lockKey] operator[=] identifier[locksIterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getLockKey] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[corruptedLocks] operator[SEP] identifier[contains] operator[SEP] identifier[lockKey] operator[SEP] operator[SEP] { identifier[locksIterator] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[e] , identifier[JcrI18n] operator[SEP] identifier[errorRefreshingLocks] , identifier[repository] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private void removeEntryFromAuthCacheForUser(HttpServletRequest req, HttpServletResponse res) { getAuthCacheService(); if (authCacheService == null) { return; } String user = req.getRemoteUser(); if (user == null) { Principal p = req.getUserPrincipal(); if (p != null) user = p.getName(); } if (user != null) { if (collabUtils != null) { String realm = collabUtils.getUserRegistryRealm(securityServiceRef); if (!user.contains(realm + ":")) { user = realm + ":" + user; } } authCacheService.remove(user); } }
class class_name[name] begin[{] method[removeEntryFromAuthCacheForUser, return_type[void], modifier[private], parameter[req, res]] begin[{] call[.getAuthCacheService, parameter[]] if[binary_operation[member[.authCacheService], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[String], user] if[binary_operation[member[.user], ==, literal[null]]] begin[{] local_variable[type[Principal], p] if[binary_operation[member[.p], !=, literal[null]]] begin[{] assign[member[.user], call[p.getName, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.user], !=, literal[null]]] begin[{] if[binary_operation[member[.collabUtils], !=, literal[null]]] begin[{] local_variable[type[String], realm] if[call[user.contains, parameter[binary_operation[member[.realm], +, literal[":"]]]]] begin[{] assign[member[.user], binary_operation[binary_operation[member[.realm], +, literal[":"]], +, member[.user]]] else begin[{] None end[}] else begin[{] None end[}] call[authCacheService.remove, parameter[member[.user]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[removeEntryFromAuthCacheForUser] operator[SEP] identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[res] operator[SEP] { identifier[getAuthCacheService] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[authCacheService] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[String] identifier[user] operator[=] identifier[req] operator[SEP] identifier[getRemoteUser] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[user] operator[==] Other[null] operator[SEP] { identifier[Principal] identifier[p] operator[=] identifier[req] operator[SEP] identifier[getUserPrincipal] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[p] operator[!=] Other[null] operator[SEP] identifier[user] operator[=] identifier[p] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[user] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[collabUtils] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[realm] operator[=] identifier[collabUtils] operator[SEP] identifier[getUserRegistryRealm] operator[SEP] identifier[securityServiceRef] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[user] operator[SEP] identifier[contains] operator[SEP] identifier[realm] operator[+] literal[String] operator[SEP] operator[SEP] { identifier[user] operator[=] identifier[realm] operator[+] literal[String] operator[+] identifier[user] operator[SEP] } } identifier[authCacheService] operator[SEP] identifier[remove] operator[SEP] identifier[user] operator[SEP] operator[SEP] } }
@Override public void reset(final long mNodeKey) { super.reset(mNodeKey); if (mSeq != null) { for (AbsAxis ax : mSeq) { ax.reset(mNodeKey); } } mCurrent = null; mNum = 0; }
class class_name[name] begin[{] method[reset, return_type[void], modifier[public], parameter[mNodeKey]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=mNodeKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reset, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) if[binary_operation[member[.mSeq], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mNodeKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reset, postfix_operators=[], prefix_operators=[], qualifier=ax, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=mSeq, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ax)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AbsAxis, sub_type=None))), label=None) else begin[{] None end[}] assign[member[.mCurrent], literal[null]] assign[member[.mNum], literal[0]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[reset] operator[SEP] Keyword[final] Keyword[long] identifier[mNodeKey] operator[SEP] { Keyword[super] operator[SEP] identifier[reset] operator[SEP] identifier[mNodeKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mSeq] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[AbsAxis] identifier[ax] operator[:] identifier[mSeq] operator[SEP] { identifier[ax] operator[SEP] identifier[reset] operator[SEP] identifier[mNodeKey] operator[SEP] operator[SEP] } } identifier[mCurrent] operator[=] Other[null] operator[SEP] identifier[mNum] operator[=] Other[0] operator[SEP] }
@Override public SetCognitoEventsResult setCognitoEvents(SetCognitoEventsRequest request) { request = beforeClientExecution(request); return executeSetCognitoEvents(request); }
class class_name[name] begin[{] method[setCognitoEvents, return_type[type[SetCognitoEventsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeSetCognitoEvents, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[SetCognitoEventsResult] identifier[setCognitoEvents] operator[SEP] identifier[SetCognitoEventsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeSetCognitoEvents] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public float toFloat(float defaultValue) { try { return Float.parseFloat(sb.toString()); } catch (java.lang.NumberFormatException e) { } return defaultValue; }
class class_name[name] begin[{] method[toFloat, return_type[type[float]], modifier[public], parameter[defaultValue]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None)], member=parseFloat, postfix_operators=[], prefix_operators=[], qualifier=Float, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['java.lang.NumberFormatException']))], finally_block=None, label=None, resources=None) return[member[.defaultValue]] end[}] END[}]
Keyword[public] Keyword[float] identifier[toFloat] operator[SEP] Keyword[float] identifier[defaultValue] operator[SEP] { Keyword[try] { Keyword[return] identifier[Float] operator[SEP] identifier[parseFloat] operator[SEP] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[NumberFormatException] identifier[e] operator[SEP] { } Keyword[return] identifier[defaultValue] operator[SEP] }
public void preInvoke( InterceptorContext context, InterceptorChain chain ) throws InterceptorException { preRequest( ( RequestInterceptorContext ) context, chain ); }
class class_name[name] begin[{] method[preInvoke, return_type[void], modifier[public], parameter[context, chain]] begin[{] call[.preRequest, parameter[Cast(expression=MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RequestInterceptorContext, sub_type=None)), member[.chain]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[preInvoke] operator[SEP] identifier[InterceptorContext] identifier[context] , identifier[InterceptorChain] identifier[chain] operator[SEP] Keyword[throws] identifier[InterceptorException] { identifier[preRequest] operator[SEP] operator[SEP] identifier[RequestInterceptorContext] operator[SEP] identifier[context] , identifier[chain] operator[SEP] operator[SEP] }
@DoesServiceRequest public void upload(final InputStream sourceStream, final long length, final AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext) throws StorageException, IOException, URISyntaxException { if (opContext == null) { opContext = new OperationContext(); } this.getShare().assertNoSnapshot(); options = FileRequestOptions.populateAndApplyDefaults(options, this.fileServiceClient); if (length < 0) { throw new IllegalArgumentException(SR.INVALID_FILE_LENGTH); } if (sourceStream.markSupported()) { // Mark sourceStream for current position. sourceStream.mark(Constants.MAX_MARK_LENGTH); } final FileOutputStream streamRef = this.openWriteNew(length, accessCondition, options, opContext); try { streamRef.write(sourceStream, length); } finally { streamRef.close(); } }
class class_name[name] begin[{] method[upload, return_type[void], modifier[public], parameter[sourceStream, length, accessCondition, options, opContext]] begin[{] if[binary_operation[member[.opContext], ==, literal[null]]] begin[{] assign[member[.opContext], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OperationContext, sub_type=None))] else begin[{] None end[}] THIS[call[None.getShare, parameter[]]call[None.assertNoSnapshot, parameter[]]] assign[member[.options], call[FileRequestOptions.populateAndApplyDefaults, parameter[member[.options], THIS[member[None.fileServiceClient]]]]] if[binary_operation[member[.length], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=INVALID_FILE_LENGTH, postfix_operators=[], prefix_operators=[], qualifier=SR, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[call[sourceStream.markSupported, parameter[]]] begin[{] call[sourceStream.mark, parameter[member[Constants.MAX_MARK_LENGTH]]] else begin[{] None end[}] local_variable[type[FileOutputStream], streamRef] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sourceStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=streamRef, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=streamRef, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[DoesServiceRequest] Keyword[public] Keyword[void] identifier[upload] operator[SEP] Keyword[final] identifier[InputStream] identifier[sourceStream] , Keyword[final] Keyword[long] identifier[length] , Keyword[final] identifier[AccessCondition] identifier[accessCondition] , identifier[FileRequestOptions] identifier[options] , identifier[OperationContext] identifier[opContext] operator[SEP] Keyword[throws] identifier[StorageException] , identifier[IOException] , identifier[URISyntaxException] { Keyword[if] operator[SEP] identifier[opContext] operator[==] Other[null] operator[SEP] { identifier[opContext] operator[=] Keyword[new] identifier[OperationContext] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[getShare] operator[SEP] operator[SEP] operator[SEP] identifier[assertNoSnapshot] operator[SEP] operator[SEP] operator[SEP] identifier[options] operator[=] identifier[FileRequestOptions] operator[SEP] identifier[populateAndApplyDefaults] operator[SEP] identifier[options] , Keyword[this] operator[SEP] identifier[fileServiceClient] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[SR] operator[SEP] identifier[INVALID_FILE_LENGTH] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[sourceStream] operator[SEP] identifier[markSupported] operator[SEP] operator[SEP] operator[SEP] { identifier[sourceStream] operator[SEP] identifier[mark] operator[SEP] identifier[Constants] operator[SEP] identifier[MAX_MARK_LENGTH] operator[SEP] operator[SEP] } Keyword[final] identifier[FileOutputStream] identifier[streamRef] operator[=] Keyword[this] operator[SEP] identifier[openWriteNew] operator[SEP] identifier[length] , identifier[accessCondition] , identifier[options] , identifier[opContext] operator[SEP] operator[SEP] Keyword[try] { identifier[streamRef] operator[SEP] identifier[write] operator[SEP] identifier[sourceStream] , identifier[length] operator[SEP] operator[SEP] } Keyword[finally] { identifier[streamRef] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } }
private SuppressionInfo updateSuppressions(Tree tree, VisitorState state) { SuppressionInfo prevSuppressionInfo = currentSuppressions; if (tree instanceof CompilationUnitTree) { currentSuppressions = currentSuppressions.forCompilationUnit((CompilationUnitTree) tree, state); } else { Symbol sym = ASTHelpers.getDeclaredSymbol(tree); if (sym != null) { currentSuppressions = currentSuppressions.withExtendedSuppressions( sym, state, getCustomSuppressionAnnotations()); } } return prevSuppressionInfo; }
class class_name[name] begin[{] method[updateSuppressions, return_type[type[SuppressionInfo]], modifier[private], parameter[tree, state]] begin[{] local_variable[type[SuppressionInfo], prevSuppressionInfo] if[binary_operation[member[.tree], instanceof, type[CompilationUnitTree]]] begin[{] assign[member[.currentSuppressions], call[currentSuppressions.forCompilationUnit, parameter[Cast(expression=MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CompilationUnitTree, sub_type=None)), member[.state]]]] else begin[{] local_variable[type[Symbol], sym] if[binary_operation[member[.sym], !=, literal[null]]] begin[{] assign[member[.currentSuppressions], call[currentSuppressions.withExtendedSuppressions, parameter[member[.sym], member[.state], call[.getCustomSuppressionAnnotations, parameter[]]]]] else begin[{] None end[}] end[}] return[member[.prevSuppressionInfo]] end[}] END[}]
Keyword[private] identifier[SuppressionInfo] identifier[updateSuppressions] operator[SEP] identifier[Tree] identifier[tree] , identifier[VisitorState] identifier[state] operator[SEP] { identifier[SuppressionInfo] identifier[prevSuppressionInfo] operator[=] identifier[currentSuppressions] operator[SEP] Keyword[if] operator[SEP] identifier[tree] Keyword[instanceof] identifier[CompilationUnitTree] operator[SEP] { identifier[currentSuppressions] operator[=] identifier[currentSuppressions] operator[SEP] identifier[forCompilationUnit] operator[SEP] operator[SEP] identifier[CompilationUnitTree] operator[SEP] identifier[tree] , identifier[state] operator[SEP] operator[SEP] } Keyword[else] { identifier[Symbol] identifier[sym] operator[=] identifier[ASTHelpers] operator[SEP] identifier[getDeclaredSymbol] operator[SEP] identifier[tree] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sym] operator[!=] Other[null] operator[SEP] { identifier[currentSuppressions] operator[=] identifier[currentSuppressions] operator[SEP] identifier[withExtendedSuppressions] operator[SEP] identifier[sym] , identifier[state] , identifier[getCustomSuppressionAnnotations] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[prevSuppressionInfo] operator[SEP] }
@Implementation(minSdk = P) protected static long nativeAssetSeek(long asset_ptr, long offset, int whence) { return ShadowArscAssetManager9.nativeAssetSeek(asset_ptr, offset, whence); }
class class_name[name] begin[{] method[nativeAssetSeek, return_type[type[long]], modifier[static protected], parameter[asset_ptr, offset, whence]] begin[{] return[call[ShadowArscAssetManager9.nativeAssetSeek, parameter[member[.asset_ptr], member[.offset], member[.whence]]]] end[}] END[}]
annotation[@] identifier[Implementation] operator[SEP] identifier[minSdk] operator[=] identifier[P] operator[SEP] Keyword[protected] Keyword[static] Keyword[long] identifier[nativeAssetSeek] operator[SEP] Keyword[long] identifier[asset_ptr] , Keyword[long] identifier[offset] , Keyword[int] identifier[whence] operator[SEP] { Keyword[return] identifier[ShadowArscAssetManager9] operator[SEP] identifier[nativeAssetSeek] operator[SEP] identifier[asset_ptr] , identifier[offset] , identifier[whence] operator[SEP] operator[SEP] }
protected void doWarning (int level, int minutes) { _rebootSoon = (level > -1); int[] warnings = getWarnings(); if (level == warnings.length) { if (checkLocks()) { return; } // that's it! do the reboot log.info("Performing automatic server reboot/shutdown, as scheduled by: " + _initiator); broadcast("m.rebooting_now"); // wait 1 second, then do it new Interval(Interval.RUN_DIRECT) { @Override public void expired () { _server.queueShutdown(); // this posts a LongRunnable } }.schedule(1000); return; } // issue the warning if (_rebootSoon) { notifyObservers(level); broadcast(getRebootMessage("m.reboot_warning", minutes)); } // schedule the next warning final int nextLevel = level + 1; final int nextMinutes = (nextLevel == warnings.length) ? 0 : warnings[nextLevel]; _interval = _omgr.newInterval(new Runnable() { public void run () { doWarning(nextLevel, nextMinutes); } }); _interval.schedule( Math.max(0L, _nextReboot - (nextMinutes * 60L * 1000L) - System.currentTimeMillis())); }
class class_name[name] begin[{] method[doWarning, return_type[void], modifier[protected], parameter[level, minutes]] begin[{] assign[member[._rebootSoon], binary_operation[member[.level], >, literal[1]]] local_variable[type[int], warnings] if[binary_operation[member[.level], ==, member[warnings.length]]] begin[{] if[call[.checkLocks, parameter[]]] begin[{] return[None] else begin[{] None end[}] call[log.info, parameter[binary_operation[literal["Performing automatic server reboot/shutdown, as scheduled by: "], +, member[._initiator]]]] call[.broadcast, parameter[literal["m.rebooting_now"]]] ClassCreator(arguments=[MemberReference(member=RUN_DIRECT, postfix_operators=[], prefix_operators=[], qualifier=Interval, selectors=[])], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[], member=queueShutdown, postfix_operators=[], prefix_operators=[], qualifier=_server, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=expired, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000)], member=schedule, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Interval, sub_type=None)) return[None] else begin[{] None end[}] if[member[._rebootSoon]] begin[{] call[.notifyObservers, parameter[member[.level]]] call[.broadcast, parameter[call[.getRebootMessage, parameter[literal["m.reboot_warning"], member[.minutes]]]]] else begin[{] None end[}] local_variable[type[int], nextLevel] local_variable[type[int], nextMinutes] assign[member[._interval], call[_omgr.newInterval, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=nextLevel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nextMinutes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doWarning, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], 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=Runnable, sub_type=None))]]] call[_interval.schedule, parameter[call[Math.max, parameter[literal[0L], binary_operation[binary_operation[member[._nextReboot], -, binary_operation[binary_operation[member[.nextMinutes], *, literal[60L]], *, literal[1000L]]], -, call[System.currentTimeMillis, parameter[]]]]]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[doWarning] operator[SEP] Keyword[int] identifier[level] , Keyword[int] identifier[minutes] operator[SEP] { identifier[_rebootSoon] operator[=] operator[SEP] identifier[level] operator[>] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[warnings] operator[=] identifier[getWarnings] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[level] operator[==] identifier[warnings] operator[SEP] identifier[length] operator[SEP] { Keyword[if] operator[SEP] identifier[checkLocks] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[_initiator] operator[SEP] operator[SEP] identifier[broadcast] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[new] identifier[Interval] operator[SEP] identifier[Interval] operator[SEP] identifier[RUN_DIRECT] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[expired] operator[SEP] operator[SEP] { identifier[_server] operator[SEP] identifier[queueShutdown] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] identifier[schedule] operator[SEP] Other[1000] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[_rebootSoon] operator[SEP] { identifier[notifyObservers] operator[SEP] identifier[level] operator[SEP] operator[SEP] identifier[broadcast] operator[SEP] identifier[getRebootMessage] operator[SEP] literal[String] , identifier[minutes] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] Keyword[int] identifier[nextLevel] operator[=] identifier[level] operator[+] Other[1] operator[SEP] Keyword[final] Keyword[int] identifier[nextMinutes] operator[=] operator[SEP] identifier[nextLevel] operator[==] identifier[warnings] operator[SEP] identifier[length] operator[SEP] operator[?] Other[0] operator[:] identifier[warnings] operator[SEP] identifier[nextLevel] operator[SEP] operator[SEP] identifier[_interval] operator[=] identifier[_omgr] operator[SEP] identifier[newInterval] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[doWarning] operator[SEP] identifier[nextLevel] , identifier[nextMinutes] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[_interval] operator[SEP] identifier[schedule] operator[SEP] identifier[Math] operator[SEP] identifier[max] operator[SEP] Other[0L] , identifier[_nextReboot] operator[-] operator[SEP] identifier[nextMinutes] operator[*] Other[60L] operator[*] Other[1000L] operator[SEP] operator[-] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static void sortMenu(BaseComponent parent, int startIndex, int endIndex) { List<BaseComponent> items = parent.getChildren(); int bottom = startIndex + 1; for (int i = startIndex; i < endIndex;) { BaseComponent item1 = items.get(i++); BaseComponent item2 = items.get(i); if (item1 instanceof BaseMenuComponent && item2 instanceof BaseMenuComponent && ((BaseMenuComponent) item1) .getLabel().compareToIgnoreCase(((BaseMenuComponent) item2).getLabel()) > 0) { parent.swapChildren(i - 1, i); if (i > bottom) { i -= 2; } } } }
class class_name[name] begin[{] method[sortMenu, return_type[void], modifier[public static], parameter[parent, startIndex, endIndex]] begin[{] local_variable[type[List], items] local_variable[type[int], bottom] 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=items, selectors=[], type_arguments=None), name=item1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BaseComponent, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=items, selectors=[], type_arguments=None), name=item2)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BaseComponent, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=item1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=BaseMenuComponent, sub_type=None), operator=instanceof), operandr=BinaryOperation(operandl=MemberReference(member=item2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=BaseMenuComponent, sub_type=None), operator=instanceof), operator=&&), operandr=BinaryOperation(operandl=Cast(expression=MemberReference(member=item1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BaseMenuComponent, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=swapChildren, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bottom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=endIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=startIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=None), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[sortMenu] operator[SEP] identifier[BaseComponent] identifier[parent] , Keyword[int] identifier[startIndex] , Keyword[int] identifier[endIndex] operator[SEP] { identifier[List] operator[<] identifier[BaseComponent] operator[>] identifier[items] operator[=] identifier[parent] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[bottom] operator[=] identifier[startIndex] operator[+] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[startIndex] operator[SEP] identifier[i] operator[<] identifier[endIndex] operator[SEP] operator[SEP] { identifier[BaseComponent] identifier[item1] operator[=] identifier[items] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[++] operator[SEP] operator[SEP] identifier[BaseComponent] identifier[item2] operator[=] identifier[items] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[item1] Keyword[instanceof] identifier[BaseMenuComponent] operator[&&] identifier[item2] Keyword[instanceof] identifier[BaseMenuComponent] operator[&&] operator[SEP] operator[SEP] identifier[BaseMenuComponent] operator[SEP] identifier[item1] operator[SEP] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[SEP] identifier[compareToIgnoreCase] operator[SEP] operator[SEP] operator[SEP] identifier[BaseMenuComponent] operator[SEP] identifier[item2] operator[SEP] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[parent] operator[SEP] identifier[swapChildren] operator[SEP] identifier[i] operator[-] Other[1] , identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[>] identifier[bottom] operator[SEP] { identifier[i] operator[-=] Other[2] operator[SEP] } } } }
protected Object[] extractHeaderNamesAndValues(String headersMap, String rowDelimiter, String columnDelimiter) throws Exception { String[] rows = headersMap.split(Pattern.quote(rowDelimiter)); ArrayList<String> headerNames = new ArrayList<>(); ArrayList<String> headerValues = new ArrayList<>(); for (int i = 0; i < rows.length; i++) { if (isEmpty(rows[i])) { continue; } else { if (validateRow(rows[i], columnDelimiter, i)) { String[] headerNameAndValue = rows[i].split(Pattern.quote(columnDelimiter)); headerNames.add(i, headerNameAndValue[0].trim()); headerValues.add(i, headerNameAndValue[1].trim()); } } } return new Object[]{headerNames, headerValues}; }
class class_name[name] begin[{] method[extractHeaderNamesAndValues, return_type[type[Object]], modifier[protected], parameter[headersMap, rowDelimiter, columnDelimiter]] begin[{] local_variable[type[String], rows] local_variable[type[ArrayList], headerNames] local_variable[type[ArrayList], headerValues] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=columnDelimiter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validateRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=columnDelimiter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=quote, postfix_operators=[], prefix_operators=[], qualifier=Pattern, selectors=[], type_arguments=None)], member=split, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=headerNameAndValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=headerNameAndValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=add, postfix_operators=[], prefix_operators=[], qualifier=headerNames, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=headerNameAndValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=add, postfix_operators=[], prefix_operators=[], qualifier=headerValues, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=rows, 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[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=headerNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=headerValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[Object] operator[SEP] operator[SEP] identifier[extractHeaderNamesAndValues] operator[SEP] identifier[String] identifier[headersMap] , identifier[String] identifier[rowDelimiter] , identifier[String] identifier[columnDelimiter] operator[SEP] Keyword[throws] identifier[Exception] { identifier[String] operator[SEP] operator[SEP] identifier[rows] operator[=] identifier[headersMap] operator[SEP] identifier[split] operator[SEP] identifier[Pattern] operator[SEP] identifier[quote] operator[SEP] identifier[rowDelimiter] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[headerNames] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[headerValues] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[rows] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] identifier[rows] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[validateRow] operator[SEP] identifier[rows] operator[SEP] identifier[i] operator[SEP] , identifier[columnDelimiter] , identifier[i] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[headerNameAndValue] operator[=] identifier[rows] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[split] operator[SEP] identifier[Pattern] operator[SEP] identifier[quote] operator[SEP] identifier[columnDelimiter] operator[SEP] operator[SEP] operator[SEP] identifier[headerNames] operator[SEP] identifier[add] operator[SEP] identifier[i] , identifier[headerNameAndValue] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[headerValues] operator[SEP] identifier[add] operator[SEP] identifier[i] , identifier[headerNameAndValue] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[headerNames] , identifier[headerValues] } operator[SEP] }
protected final PrcSubaccountLineCreate<RS> createPutPrcSubaccountLineCreate( final Map<String, Object> pAddParam) throws Exception { PrcSubaccountLineCreate<RS> proc = new PrcSubaccountLineCreate<RS>(); @SuppressWarnings("unchecked") IEntityProcessor<SubaccountLine, Long> procDlg = (IEntityProcessor<SubaccountLine, Long>) this.fctBnEntitiesProcessors .lazyGet(pAddParam, PrcEntityCreate.class.getSimpleName()); proc.setPrcAccEntityCreate(procDlg); proc.setSrvTypeCode(getSrvTypeCode()); proc.setSrvOrm(getSrvOrm()); //assigning fully initialized object: this.processorsMap .put(PrcSubaccountLineCreate.class.getSimpleName(), proc); return proc; }
class class_name[name] begin[{] method[createPutPrcSubaccountLineCreate, return_type[type[PrcSubaccountLineCreate]], modifier[final protected], parameter[pAddParam]] begin[{] local_variable[type[PrcSubaccountLineCreate], proc] local_variable[type[IEntityProcessor], procDlg] call[proc.setPrcAccEntityCreate, parameter[member[.procDlg]]] call[proc.setSrvTypeCode, parameter[call[.getSrvTypeCode, parameter[]]]] call[proc.setSrvOrm, parameter[call[.getSrvOrm, parameter[]]]] THIS[member[None.processorsMap]call[None.put, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=PrcSubaccountLineCreate, sub_type=None)), member[.proc]]]] return[member[.proc]] end[}] END[}]
Keyword[protected] Keyword[final] identifier[PrcSubaccountLineCreate] operator[<] identifier[RS] operator[>] identifier[createPutPrcSubaccountLineCreate] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] operator[SEP] Keyword[throws] identifier[Exception] { identifier[PrcSubaccountLineCreate] operator[<] identifier[RS] operator[>] identifier[proc] operator[=] Keyword[new] identifier[PrcSubaccountLineCreate] operator[<] identifier[RS] operator[>] operator[SEP] operator[SEP] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[IEntityProcessor] operator[<] identifier[SubaccountLine] , identifier[Long] operator[>] identifier[procDlg] operator[=] operator[SEP] identifier[IEntityProcessor] operator[<] identifier[SubaccountLine] , identifier[Long] operator[>] operator[SEP] Keyword[this] operator[SEP] identifier[fctBnEntitiesProcessors] operator[SEP] identifier[lazyGet] operator[SEP] identifier[pAddParam] , identifier[PrcEntityCreate] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[proc] operator[SEP] identifier[setPrcAccEntityCreate] operator[SEP] identifier[procDlg] operator[SEP] operator[SEP] identifier[proc] operator[SEP] identifier[setSrvTypeCode] operator[SEP] identifier[getSrvTypeCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[proc] operator[SEP] identifier[setSrvOrm] operator[SEP] identifier[getSrvOrm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[processorsMap] operator[SEP] identifier[put] operator[SEP] identifier[PrcSubaccountLineCreate] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] , identifier[proc] operator[SEP] operator[SEP] Keyword[return] identifier[proc] operator[SEP] }
public static int randInt(int min, int max) { // NOTE: Usually this should be a field rather than a method // variable so that it is not re-seeded every call. Random rand = new Random(); // nextInt is normally exclusive of the top value, // so add 1 to make it inclusive int randomNum = rand.nextInt((max - min) + 1) + min; return randomNum; }
class class_name[name] begin[{] method[randInt, return_type[type[int]], modifier[public static], parameter[min, max]] begin[{] local_variable[type[Random], rand] local_variable[type[int], randomNum] return[member[.randomNum]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[randInt] operator[SEP] Keyword[int] identifier[min] , Keyword[int] identifier[max] operator[SEP] { identifier[Random] identifier[rand] operator[=] Keyword[new] identifier[Random] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[randomNum] operator[=] identifier[rand] operator[SEP] identifier[nextInt] operator[SEP] operator[SEP] identifier[max] operator[-] identifier[min] operator[SEP] operator[+] Other[1] operator[SEP] operator[+] identifier[min] operator[SEP] Keyword[return] identifier[randomNum] operator[SEP] }
@Override public List<CPDisplayLayout> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
class class_name[name] begin[{] method[findAll, return_type[type[List]], modifier[public], parameter[]] begin[{] return[call[.findAll, parameter[member[QueryUtil.ALL_POS], member[QueryUtil.ALL_POS], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CPDisplayLayout] operator[>] identifier[findAll] operator[SEP] operator[SEP] { Keyword[return] identifier[findAll] operator[SEP] identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , identifier[QueryUtil] operator[SEP] identifier[ALL_POS] , Other[null] operator[SEP] operator[SEP] }
public final int compareTo(String string) { return getID().length() >= string.length() ? getID().compareToIgnoreCase(string) : getID().compareToIgnoreCase( string.substring(0, getID().length())); }
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[final public], parameter[string]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None), operator=>=), if_false=MethodInvocation(arguments=[], member=getID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[], member=getID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=string, selectors=[], type_arguments=None)], member=compareToIgnoreCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_true=MethodInvocation(arguments=[], member=getID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compareToIgnoreCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[final] Keyword[int] identifier[compareTo] operator[SEP] identifier[String] identifier[string] operator[SEP] { Keyword[return] identifier[getID] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>=] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[?] identifier[getID] operator[SEP] operator[SEP] operator[SEP] identifier[compareToIgnoreCase] operator[SEP] identifier[string] operator[SEP] operator[:] identifier[getID] operator[SEP] operator[SEP] operator[SEP] identifier[compareToIgnoreCase] operator[SEP] identifier[string] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[getID] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static boolean isValidName(String name) { return name != null && name.length() > 1 && name.charAt(0) == CommonDefs.ALIAS_FIRST_CHAR && Utils.allAlphaNumUnderscore(name.substring(1)); }
class class_name[name] begin[{] method[isValidName, return_type[type[boolean]], modifier[public static], parameter[name]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[member[.name], !=, literal[null]], &&, binary_operation[call[name.length, parameter[]], >, literal[1]]], &&, binary_operation[call[name.charAt, parameter[literal[0]]], ==, member[CommonDefs.ALIAS_FIRST_CHAR]]], &&, call[Utils.allAlphaNumUnderscore, parameter[call[name.substring, parameter[literal[1]]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isValidName] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[name] operator[!=] Other[null] operator[&&] identifier[name] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[1] operator[&&] identifier[name] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] identifier[CommonDefs] operator[SEP] identifier[ALIAS_FIRST_CHAR] operator[&&] identifier[Utils] operator[SEP] identifier[allAlphaNumUnderscore] operator[SEP] identifier[name] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] }
public int setString(String strField, boolean bDisplayOption, int iMoveMode) // init this field override for other value { int iFieldLength = 0; Object objTempBinary = null; if (strField != null) { iFieldLength = strField.length(); int iMaxLength = this.getMaxLength(); if ((iFieldLength > iMaxLength) || (iFieldLength > 40)) iFieldLength = iMaxLength; try { objTempBinary = this.stringToBinary(strField); } catch (Exception ex) { String strError = ex.getMessage(); if (strError == null) strError = ex.getClass().getName(); Task task = null; if (this.getRecord() != null) if (this.getRecord().getRecordOwner() != null) task = this.getRecord().getRecordOwner().getTask(); //if (task == null) // task = BaseApplet.getSharedInstance(); if (task == null) return DBConstants.ERROR_RETURN; return task.setLastError(strError); } } return this.setData(objTempBinary, bDisplayOption, iMoveMode); }
class class_name[name] begin[{] method[setString, return_type[type[int]], modifier[public], parameter[strField, bDisplayOption, iMoveMode]] begin[{] local_variable[type[int], iFieldLength] local_variable[type[Object], objTempBinary] if[binary_operation[member[.strField], !=, literal[null]]] begin[{] assign[member[.iFieldLength], call[strField.length, parameter[]]] local_variable[type[int], iMaxLength] if[binary_operation[binary_operation[member[.iFieldLength], >, member[.iMaxLength]], ||, binary_operation[member[.iFieldLength], >, literal[40]]]] begin[{] assign[member[.iFieldLength], member[.iMaxLength]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=objTempBinary, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=strField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=stringToBinary, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), name=strError)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=strError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=strError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=task)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Task, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getRecord, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=IfStatement(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getRecord, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getRecordOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getRecord, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getRecordOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getTask, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None))), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=task, 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=MemberReference(member=ERROR_RETURN, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[]), label=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=strError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setLastError, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[THIS[call[None.setData, parameter[member[.objTempBinary], member[.bDisplayOption], member[.iMoveMode]]]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[setString] operator[SEP] identifier[String] identifier[strField] , Keyword[boolean] identifier[bDisplayOption] , Keyword[int] identifier[iMoveMode] operator[SEP] { Keyword[int] identifier[iFieldLength] operator[=] Other[0] operator[SEP] identifier[Object] identifier[objTempBinary] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[strField] operator[!=] Other[null] operator[SEP] { identifier[iFieldLength] operator[=] identifier[strField] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[iMaxLength] operator[=] Keyword[this] operator[SEP] identifier[getMaxLength] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[iFieldLength] operator[>] identifier[iMaxLength] operator[SEP] operator[||] operator[SEP] identifier[iFieldLength] operator[>] Other[40] operator[SEP] operator[SEP] identifier[iFieldLength] operator[=] identifier[iMaxLength] operator[SEP] Keyword[try] { identifier[objTempBinary] operator[=] Keyword[this] operator[SEP] identifier[stringToBinary] operator[SEP] identifier[strField] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[String] identifier[strError] operator[=] identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[strError] operator[==] Other[null] operator[SEP] identifier[strError] operator[=] identifier[ex] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[Task] identifier[task] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getRecordOwner] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] identifier[task] operator[=] Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getRecordOwner] operator[SEP] operator[SEP] operator[SEP] identifier[getTask] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[task] operator[==] Other[null] operator[SEP] Keyword[return] identifier[DBConstants] operator[SEP] identifier[ERROR_RETURN] operator[SEP] Keyword[return] identifier[task] operator[SEP] identifier[setLastError] operator[SEP] identifier[strError] operator[SEP] operator[SEP] } } Keyword[return] Keyword[this] operator[SEP] identifier[setData] operator[SEP] identifier[objTempBinary] , identifier[bDisplayOption] , identifier[iMoveMode] operator[SEP] operator[SEP] }
public static <S extends Enum<S>> S getSystemPropertyAsEnum(Class<S> type, String name) { return getSystemPropertyAsEnum(type, name, null); }
class class_name[name] begin[{] method[getSystemPropertyAsEnum, return_type[type[S]], modifier[public static], parameter[type, name]] begin[{] return[call[.getSystemPropertyAsEnum, parameter[member[.type], member[.name], literal[null]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[S] Keyword[extends] identifier[Enum] operator[<] identifier[S] operator[>] operator[>] identifier[S] identifier[getSystemPropertyAsEnum] operator[SEP] identifier[Class] operator[<] identifier[S] operator[>] identifier[type] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[getSystemPropertyAsEnum] operator[SEP] identifier[type] , identifier[name] , Other[null] operator[SEP] operator[SEP] }
public static FastCharArrayWriter copy(final InputStream input, final String encoding, final int count) throws IOException { try (FastCharArrayWriter output = createFastCharArrayWriter()) { copy(input, output, encoding, count); return output; } }
class class_name[name] begin[{] method[copy, return_type[type[FastCharArrayWriter]], modifier[public static], parameter[input, encoding, count]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=encoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=output, type=ReferenceType(arguments=None, dimensions=[], name=FastCharArrayWriter, sub_type=None), value=MethodInvocation(arguments=[], member=createFastCharArrayWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))]) end[}] END[}]
Keyword[public] Keyword[static] identifier[FastCharArrayWriter] identifier[copy] operator[SEP] Keyword[final] identifier[InputStream] identifier[input] , Keyword[final] identifier[String] identifier[encoding] , Keyword[final] Keyword[int] identifier[count] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] operator[SEP] identifier[FastCharArrayWriter] identifier[output] operator[=] identifier[createFastCharArrayWriter] operator[SEP] operator[SEP] operator[SEP] { identifier[copy] operator[SEP] identifier[input] , identifier[output] , identifier[encoding] , identifier[count] operator[SEP] operator[SEP] Keyword[return] identifier[output] operator[SEP] } }
public static Expression decodeJson(JsonObject json) { char[] encoded = JsonStringEncoder.getInstance().quoteAsString(json.toString()); return x("DECODE_JSON(\"" + new String(encoded) + "\")"); }
class class_name[name] begin[{] method[decodeJson, return_type[type[Expression]], modifier[public static], parameter[json]] begin[{] local_variable[type[char], encoded] return[call[.x, parameter[binary_operation[binary_operation[literal["DECODE_JSON(\""], +, ClassCreator(arguments=[MemberReference(member=encoded, 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=String, sub_type=None))], +, literal["\")"]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Expression] identifier[decodeJson] operator[SEP] identifier[JsonObject] identifier[json] operator[SEP] { Keyword[char] operator[SEP] operator[SEP] identifier[encoded] operator[=] identifier[JsonStringEncoder] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[quoteAsString] operator[SEP] identifier[json] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[x] operator[SEP] literal[String] operator[+] Keyword[new] identifier[String] operator[SEP] identifier[encoded] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] }
private void ensureElementFormatter(CmsResource resource, HttpServletRequest req) { CmsJspStandardContextBean contextBean = CmsJspStandardContextBean.getInstance(req); CmsContainerElementBean element = contextBean.getElement(); if (!resource.getStructureId().equals(element.getFormatterId())) { element.setFormatterId(resource.getStructureId()); } }
class class_name[name] begin[{] method[ensureElementFormatter, return_type[void], modifier[private], parameter[resource, req]] begin[{] local_variable[type[CmsJspStandardContextBean], contextBean] local_variable[type[CmsContainerElementBean], element] if[call[resource.getStructureId, parameter[]]] begin[{] call[element.setFormatterId, parameter[call[resource.getStructureId, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[ensureElementFormatter] operator[SEP] identifier[CmsResource] identifier[resource] , identifier[HttpServletRequest] identifier[req] operator[SEP] { identifier[CmsJspStandardContextBean] identifier[contextBean] operator[=] identifier[CmsJspStandardContextBean] operator[SEP] identifier[getInstance] operator[SEP] identifier[req] operator[SEP] operator[SEP] identifier[CmsContainerElementBean] identifier[element] operator[=] identifier[contextBean] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[resource] operator[SEP] identifier[getStructureId] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[element] operator[SEP] identifier[getFormatterId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[element] operator[SEP] identifier[setFormatterId] operator[SEP] identifier[resource] operator[SEP] identifier[getStructureId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
static boolean makeDirectories(final File dirToMake) { try { Boolean result = getInstance().doPrivileged( new PrivilegedAction<Boolean>() { public Boolean run() { return Boolean.valueOf(dirToMake.mkdirs()); } } ); return result.booleanValue(); } catch (SecurityException se) { // TODO: Add logging here but be careful since this code is used in logging logic itself // and may result in an indefinite loop. return false; } }
class class_name[name] begin[{] method[makeDirectories, return_type[type[boolean]], modifier[static], parameter[dirToMake]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=mkdirs, postfix_operators=[], prefix_operators=[], qualifier=dirToMake, selectors=[], type_arguments=None)], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=None, name=PrivilegedAction, sub_type=None))], member=doPrivileged, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[], member=booleanValue, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=se, types=['SecurityException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[static] Keyword[boolean] identifier[makeDirectories] operator[SEP] Keyword[final] identifier[File] identifier[dirToMake] operator[SEP] { Keyword[try] { identifier[Boolean] identifier[result] operator[=] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[doPrivileged] operator[SEP] Keyword[new] identifier[PrivilegedAction] operator[<] identifier[Boolean] operator[>] operator[SEP] operator[SEP] { Keyword[public] identifier[Boolean] identifier[run] operator[SEP] operator[SEP] { Keyword[return] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[dirToMake] operator[SEP] identifier[mkdirs] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SecurityException] identifier[se] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } }
@Exported public YesNoMaybe supportsDynamicLoad() { String v = manifest.getMainAttributes().getValue("Support-Dynamic-Loading"); if (v==null) return YesNoMaybe.MAYBE; return Boolean.parseBoolean(v) ? YesNoMaybe.YES : YesNoMaybe.NO; }
class class_name[name] begin[{] method[supportsDynamicLoad, return_type[type[YesNoMaybe]], modifier[public], parameter[]] begin[{] local_variable[type[String], v] if[binary_operation[member[.v], ==, literal[null]]] begin[{] return[member[YesNoMaybe.MAYBE]] else begin[{] None end[}] return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseBoolean, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None), if_false=MemberReference(member=NO, postfix_operators=[], prefix_operators=[], qualifier=YesNoMaybe, selectors=[]), if_true=MemberReference(member=YES, postfix_operators=[], prefix_operators=[], qualifier=YesNoMaybe, selectors=[]))] end[}] END[}]
annotation[@] identifier[Exported] Keyword[public] identifier[YesNoMaybe] identifier[supportsDynamicLoad] operator[SEP] operator[SEP] { identifier[String] identifier[v] operator[=] identifier[manifest] operator[SEP] identifier[getMainAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[v] operator[==] Other[null] operator[SEP] Keyword[return] identifier[YesNoMaybe] operator[SEP] identifier[MAYBE] operator[SEP] Keyword[return] identifier[Boolean] operator[SEP] identifier[parseBoolean] operator[SEP] identifier[v] operator[SEP] operator[?] identifier[YesNoMaybe] operator[SEP] identifier[YES] operator[:] identifier[YesNoMaybe] operator[SEP] identifier[NO] operator[SEP] }
@Override public boolean enableImmediateResponseRead() { if (headersSent()) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Request hdrs already sent, too late for immediate read"); } return false; } if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Immediate response read requested: " + getVC()); } this.bImmediateRead = true; return true; }
class class_name[name] begin[{] method[enableImmediateResponseRead, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[call[.headersSent, parameter[]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], literal["Request hdrs already sent, too late for immediate read"]]] else begin[{] None end[}] return[literal[false]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["Immediate response read requested: "], +, call[.getVC, parameter[]]]]] else begin[{] None end[}] assign[THIS[member[None.bImmediateRead]], literal[true]] return[literal[true]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[enableImmediateResponseRead] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[headersSent] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[getVC] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[bImmediateRead] operator[=] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public void setAdditionalInfoVisible(boolean visible) { if (m_openClose == null) { return; } if (visible) { addStyleName(CmsListItemWidget.OPENCLASS); m_openClose.setDown(true); OpenEvent.fire(this, this); } else { removeStyleName(CmsListItemWidget.OPENCLASS); m_openClose.setDown(false); CloseEvent.fire(this, this); } CmsDomUtil.resizeAncestor(getParent()); }
class class_name[name] begin[{] method[setAdditionalInfoVisible, return_type[void], modifier[public], parameter[visible]] begin[{] if[binary_operation[member[.m_openClose], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] if[member[.visible]] begin[{] call[.addStyleName, parameter[member[CmsListItemWidget.OPENCLASS]]] call[m_openClose.setDown, parameter[literal[true]]] call[OpenEvent.fire, parameter[THIS[], THIS[]]] else begin[{] call[.removeStyleName, parameter[member[CmsListItemWidget.OPENCLASS]]] call[m_openClose.setDown, parameter[literal[false]]] call[CloseEvent.fire, parameter[THIS[], THIS[]]] end[}] call[CmsDomUtil.resizeAncestor, parameter[call[.getParent, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAdditionalInfoVisible] operator[SEP] Keyword[boolean] identifier[visible] operator[SEP] { Keyword[if] operator[SEP] identifier[m_openClose] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[visible] operator[SEP] { identifier[addStyleName] operator[SEP] identifier[CmsListItemWidget] operator[SEP] identifier[OPENCLASS] operator[SEP] operator[SEP] identifier[m_openClose] operator[SEP] identifier[setDown] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[OpenEvent] operator[SEP] identifier[fire] operator[SEP] Keyword[this] , Keyword[this] operator[SEP] operator[SEP] } Keyword[else] { identifier[removeStyleName] operator[SEP] identifier[CmsListItemWidget] operator[SEP] identifier[OPENCLASS] operator[SEP] operator[SEP] identifier[m_openClose] operator[SEP] identifier[setDown] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[CloseEvent] operator[SEP] identifier[fire] operator[SEP] Keyword[this] , Keyword[this] operator[SEP] operator[SEP] } identifier[CmsDomUtil] operator[SEP] identifier[resizeAncestor] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public String submitExtra (String name, String text, String extra) { return fixedInput("submit", name, text, extra); }
class class_name[name] begin[{] method[submitExtra, return_type[type[String]], modifier[public], parameter[name, text, extra]] begin[{] return[call[.fixedInput, parameter[literal["submit"], member[.name], member[.text], member[.extra]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[submitExtra] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[text] , identifier[String] identifier[extra] operator[SEP] { Keyword[return] identifier[fixedInput] operator[SEP] literal[String] , identifier[name] , identifier[text] , identifier[extra] operator[SEP] operator[SEP] }
protected String sha1( File file ) { try { if (contentBasedSha1()) { byte[] hash = SecureHash.getHash(SecureHash.Algorithm.SHA_1, file); return StringUtil.getHexString(hash); } return SecureHash.sha1(createUrlForFile(file).toString()); } catch (Exception e) { throw new ConnectorException(e); } }
class class_name[name] begin[{] method[sha1, return_type[type[String]], modifier[protected], parameter[file]] begin[{] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[], member=contentBasedSha1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=SHA_1, postfix_operators=[], prefix_operators=[], qualifier=SecureHash.Algorithm, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getHash, postfix_operators=[], prefix_operators=[], qualifier=SecureHash, selectors=[], type_arguments=None), name=hash)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=hash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getHexString, postfix_operators=[], prefix_operators=[], qualifier=StringUtil, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createUrlForFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=sha1, postfix_operators=[], prefix_operators=[], qualifier=SecureHash, 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=ConnectorException, 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[protected] identifier[String] identifier[sha1] operator[SEP] identifier[File] identifier[file] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[contentBasedSha1] operator[SEP] operator[SEP] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[hash] operator[=] identifier[SecureHash] operator[SEP] identifier[getHash] operator[SEP] identifier[SecureHash] operator[SEP] identifier[Algorithm] operator[SEP] identifier[SHA_1] , identifier[file] operator[SEP] operator[SEP] Keyword[return] identifier[StringUtil] operator[SEP] identifier[getHexString] operator[SEP] identifier[hash] operator[SEP] operator[SEP] } Keyword[return] identifier[SecureHash] operator[SEP] identifier[sha1] operator[SEP] identifier[createUrlForFile] operator[SEP] identifier[file] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ConnectorException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public Corners getImageCorners( int width , int height , Corners corners ) { if( corners == null ) corners = new Corners(); int w = width; int h = height; tranCurrToWorld.compute(0,0,work); corners.p0.set(work.x, work.y); tranCurrToWorld.compute(w,0,work); corners.p1.set(work.x, work.y); tranCurrToWorld.compute(w,h,work); corners.p2.set(work.x, work.y); tranCurrToWorld.compute(0,h,work); corners.p3.set(work.x, work.y); return corners; }
class class_name[name] begin[{] method[getImageCorners, return_type[type[Corners]], modifier[public], parameter[width, height, corners]] begin[{] if[binary_operation[member[.corners], ==, literal[null]]] begin[{] assign[member[.corners], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Corners, sub_type=None))] else begin[{] None end[}] local_variable[type[int], w] local_variable[type[int], h] call[tranCurrToWorld.compute, parameter[literal[0], literal[0], member[.work]]] call[corners.p0.set, parameter[member[work.x], member[work.y]]] call[tranCurrToWorld.compute, parameter[member[.w], literal[0], member[.work]]] call[corners.p1.set, parameter[member[work.x], member[work.y]]] call[tranCurrToWorld.compute, parameter[member[.w], member[.h], member[.work]]] call[corners.p2.set, parameter[member[work.x], member[work.y]]] call[tranCurrToWorld.compute, parameter[literal[0], member[.h], member[.work]]] call[corners.p3.set, parameter[member[work.x], member[work.y]]] return[member[.corners]] end[}] END[}]
Keyword[public] identifier[Corners] identifier[getImageCorners] operator[SEP] Keyword[int] identifier[width] , Keyword[int] identifier[height] , identifier[Corners] identifier[corners] operator[SEP] { Keyword[if] operator[SEP] identifier[corners] operator[==] Other[null] operator[SEP] identifier[corners] operator[=] Keyword[new] identifier[Corners] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[w] operator[=] identifier[width] operator[SEP] Keyword[int] identifier[h] operator[=] identifier[height] operator[SEP] identifier[tranCurrToWorld] operator[SEP] identifier[compute] operator[SEP] Other[0] , Other[0] , identifier[work] operator[SEP] operator[SEP] identifier[corners] operator[SEP] identifier[p0] operator[SEP] identifier[set] operator[SEP] identifier[work] operator[SEP] identifier[x] , identifier[work] operator[SEP] identifier[y] operator[SEP] operator[SEP] identifier[tranCurrToWorld] operator[SEP] identifier[compute] operator[SEP] identifier[w] , Other[0] , identifier[work] operator[SEP] operator[SEP] identifier[corners] operator[SEP] identifier[p1] operator[SEP] identifier[set] operator[SEP] identifier[work] operator[SEP] identifier[x] , identifier[work] operator[SEP] identifier[y] operator[SEP] operator[SEP] identifier[tranCurrToWorld] operator[SEP] identifier[compute] operator[SEP] identifier[w] , identifier[h] , identifier[work] operator[SEP] operator[SEP] identifier[corners] operator[SEP] identifier[p2] operator[SEP] identifier[set] operator[SEP] identifier[work] operator[SEP] identifier[x] , identifier[work] operator[SEP] identifier[y] operator[SEP] operator[SEP] identifier[tranCurrToWorld] operator[SEP] identifier[compute] operator[SEP] Other[0] , identifier[h] , identifier[work] operator[SEP] operator[SEP] identifier[corners] operator[SEP] identifier[p3] operator[SEP] identifier[set] operator[SEP] identifier[work] operator[SEP] identifier[x] , identifier[work] operator[SEP] identifier[y] operator[SEP] operator[SEP] Keyword[return] identifier[corners] operator[SEP] }
private static void par_ief(CompList<?> t, int numproc) throws Exception { if (numproc < 1) { throw new IllegalArgumentException("numproc"); } final CountDownLatch latch = new CountDownLatch(t.list().size()); // final ExecutorService e = Executors.newFixedThreadPool(numproc); for (final Compound c : t) { e.submit(new Runnable() { @Override public void run() { try { ComponentAccess.callAnnotated(c, Initialize.class, true); c.execute(); ComponentAccess.callAnnotated(c, Finalize.class, true); } catch (Throwable E) { e.shutdownNow(); } latch.countDown(); } }); } latch.await(); // e.shutdown(); }
class class_name[name] begin[{] method[par_ief, return_type[void], modifier[private static], parameter[t, numproc]] begin[{] if[binary_operation[member[.numproc], <, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="numproc")], 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[CountDownLatch], latch] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Initialize, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=callAnnotated, postfix_operators=[], prefix_operators=[], qualifier=ComponentAccess, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=execute, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Finalize, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=callAnnotated, postfix_operators=[], prefix_operators=[], qualifier=ComponentAccess, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=shutdownNow, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=E, types=['Throwable']))], finally_block=None, label=None, resources=None), StatementExpression(expression=MethodInvocation(arguments=[], member=countDown, postfix_operators=[], prefix_operators=[], qualifier=latch, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], 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=Runnable, sub_type=None))], member=submit, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Compound, sub_type=None))), label=None) call[latch.await, parameter[]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[par_ief] operator[SEP] identifier[CompList] operator[<] operator[?] operator[>] identifier[t] , Keyword[int] identifier[numproc] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[numproc] operator[<] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[final] identifier[CountDownLatch] identifier[latch] operator[=] Keyword[new] identifier[CountDownLatch] operator[SEP] identifier[t] operator[SEP] identifier[list] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Compound] identifier[c] operator[:] identifier[t] operator[SEP] { identifier[e] operator[SEP] identifier[submit] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[try] { identifier[ComponentAccess] operator[SEP] identifier[callAnnotated] operator[SEP] identifier[c] , identifier[Initialize] operator[SEP] Keyword[class] , literal[boolean] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] identifier[ComponentAccess] operator[SEP] identifier[callAnnotated] operator[SEP] identifier[c] , identifier[Finalize] operator[SEP] Keyword[class] , literal[boolean] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[E] operator[SEP] { identifier[e] operator[SEP] identifier[shutdownNow] operator[SEP] operator[SEP] operator[SEP] } identifier[latch] operator[SEP] identifier[countDown] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } identifier[latch] operator[SEP] identifier[await] operator[SEP] operator[SEP] operator[SEP] }
private <O> void setValue(Map<String, O> nameValueMap, String name, O value) { checkForNull(name, value); nameValueMap.put(name, value); }
class class_name[name] begin[{] method[setValue, return_type[void], modifier[private], parameter[nameValueMap, name, value]] begin[{] call[.checkForNull, parameter[member[.name], member[.value]]] call[nameValueMap.put, parameter[member[.name], member[.value]]] end[}] END[}]
Keyword[private] operator[<] identifier[O] operator[>] Keyword[void] identifier[setValue] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[O] operator[>] identifier[nameValueMap] , identifier[String] identifier[name] , identifier[O] identifier[value] operator[SEP] { identifier[checkForNull] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] identifier[nameValueMap] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] }
public static double choose(int n, int k) { if (n < 0 || k < 0) { throw new IllegalArgumentException(String.format("Invalid n = %d, k = %d", n, k)); } if (n < k) { return 0.0; } return Math.floor(0.5 + Math.exp(logChoose(n, k))); }
class class_name[name] begin[{] method[choose, return_type[type[double]], modifier[public static], parameter[n, k]] begin[{] if[binary_operation[binary_operation[member[.n], <, literal[0]], ||, binary_operation[member[.k], <, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid n = %d, k = %d"), MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.n], <, member[.k]]] begin[{] return[literal[0.0]] else begin[{] None end[}] return[call[Math.floor, parameter[binary_operation[literal[0.5], +, call[Math.exp, parameter[call[.logChoose, parameter[member[.n], member[.k]]]]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[choose] operator[SEP] Keyword[int] identifier[n] , Keyword[int] identifier[k] operator[SEP] { Keyword[if] operator[SEP] identifier[n] operator[<] Other[0] operator[||] identifier[k] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[n] , identifier[k] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[n] operator[<] identifier[k] operator[SEP] { Keyword[return] literal[Float] operator[SEP] } Keyword[return] identifier[Math] operator[SEP] identifier[floor] operator[SEP] literal[Float] operator[+] identifier[Math] operator[SEP] identifier[exp] operator[SEP] identifier[logChoose] operator[SEP] identifier[n] , identifier[k] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(CreateHttpNamespaceRequest createHttpNamespaceRequest, ProtocolMarshaller protocolMarshaller) { if (createHttpNamespaceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createHttpNamespaceRequest.getName(), NAME_BINDING); protocolMarshaller.marshall(createHttpNamespaceRequest.getCreatorRequestId(), CREATORREQUESTID_BINDING); protocolMarshaller.marshall(createHttpNamespaceRequest.getDescription(), DESCRIPTION_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[createHttpNamespaceRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.createHttpNamespaceRequest], ==, 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=createHttpNamespaceRequest, 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=getCreatorRequestId, postfix_operators=[], prefix_operators=[], qualifier=createHttpNamespaceRequest, selectors=[], type_arguments=None), MemberReference(member=CREATORREQUESTID_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=getDescription, postfix_operators=[], prefix_operators=[], qualifier=createHttpNamespaceRequest, selectors=[], type_arguments=None), MemberReference(member=DESCRIPTION_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[CreateHttpNamespaceRequest] identifier[createHttpNamespaceRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[createHttpNamespaceRequest] 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[createHttpNamespaceRequest] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createHttpNamespaceRequest] operator[SEP] identifier[getCreatorRequestId] operator[SEP] operator[SEP] , identifier[CREATORREQUESTID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createHttpNamespaceRequest] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] , identifier[DESCRIPTION_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 void setResourceAdaptorContext(ResourceAdaptorContext raContext) { this.resourceAdaptorContext = raContext; tracer = raContext.getTracer(HttpServletResourceAdaptor.class.getSimpleName()); eventIdCache = new EventIDCache(raContext.getTracer(EventIDCache.class.getSimpleName())); eventIDFilter = new EventIDFilter(); sleeEndpoint = raContext.getSleeEndpoint(); eventLookup = raContext.getEventLookupFacility(); requestLock = new RequestLock(); httpRaSbbinterface = new HttpServletRaSbbInterfaceImpl(this); }
class class_name[name] begin[{] method[setResourceAdaptorContext, return_type[void], modifier[public], parameter[raContext]] begin[{] assign[THIS[member[None.resourceAdaptorContext]], member[.raContext]] assign[member[.tracer], call[raContext.getTracer, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=HttpServletResourceAdaptor, sub_type=None))]]] assign[member[.eventIdCache], ClassCreator(arguments=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=EventIDCache, sub_type=None))], member=getTracer, postfix_operators=[], prefix_operators=[], qualifier=raContext, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EventIDCache, sub_type=None))] assign[member[.eventIDFilter], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EventIDFilter, sub_type=None))] assign[member[.sleeEndpoint], call[raContext.getSleeEndpoint, parameter[]]] assign[member[.eventLookup], call[raContext.getEventLookupFacility, parameter[]]] assign[member[.requestLock], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RequestLock, sub_type=None))] assign[member[.httpRaSbbinterface], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HttpServletRaSbbInterfaceImpl, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setResourceAdaptorContext] operator[SEP] identifier[ResourceAdaptorContext] identifier[raContext] operator[SEP] { Keyword[this] operator[SEP] identifier[resourceAdaptorContext] operator[=] identifier[raContext] operator[SEP] identifier[tracer] operator[=] identifier[raContext] operator[SEP] identifier[getTracer] operator[SEP] identifier[HttpServletResourceAdaptor] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[eventIdCache] operator[=] Keyword[new] identifier[EventIDCache] operator[SEP] identifier[raContext] operator[SEP] identifier[getTracer] operator[SEP] identifier[EventIDCache] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[eventIDFilter] operator[=] Keyword[new] identifier[EventIDFilter] operator[SEP] operator[SEP] operator[SEP] identifier[sleeEndpoint] operator[=] identifier[raContext] operator[SEP] identifier[getSleeEndpoint] operator[SEP] operator[SEP] operator[SEP] identifier[eventLookup] operator[=] identifier[raContext] operator[SEP] identifier[getEventLookupFacility] operator[SEP] operator[SEP] operator[SEP] identifier[requestLock] operator[=] Keyword[new] identifier[RequestLock] operator[SEP] operator[SEP] operator[SEP] identifier[httpRaSbbinterface] operator[=] Keyword[new] identifier[HttpServletRaSbbInterfaceImpl] operator[SEP] Keyword[this] operator[SEP] operator[SEP] }
public String[][] getPopupMap() { String string[][] = { {DBParams.MENU, "menu"}, {DBParams.SCREEN, "screen"}, {DBParams.RECORD, "record"}, {DBParams.LINK, "link"}, {MenuConstants.GRID, "grid"}, {MenuConstants.FORM, "form"}, {MenuConstants.MENUREC, "menu record"}, {DBParams.XML, "xml"}, {DBParams.MAIL, "mail"}, {DBParams.APPLET, "applet"}, }; return string; }
class class_name[name] begin[{] method[getPopupMap, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], string] return[member[.string]] end[}] END[}]
Keyword[public] identifier[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getPopupMap] operator[SEP] operator[SEP] { identifier[String] identifier[string] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[=] { { identifier[DBParams] operator[SEP] identifier[MENU] , literal[String] } , { identifier[DBParams] operator[SEP] identifier[SCREEN] , literal[String] } , { identifier[DBParams] operator[SEP] identifier[RECORD] , literal[String] } , { identifier[DBParams] operator[SEP] identifier[LINK] , literal[String] } , { identifier[MenuConstants] operator[SEP] identifier[GRID] , literal[String] } , { identifier[MenuConstants] operator[SEP] identifier[FORM] , literal[String] } , { identifier[MenuConstants] operator[SEP] identifier[MENUREC] , literal[String] } , { identifier[DBParams] operator[SEP] identifier[XML] , literal[String] } , { identifier[DBParams] operator[SEP] identifier[MAIL] , literal[String] } , { identifier[DBParams] operator[SEP] identifier[APPLET] , literal[String] } , } operator[SEP] Keyword[return] identifier[string] operator[SEP] }
public ResultMap getResultMap(Configuration configuration) { if (this.resultMap != null) { return this.resultMap; } if (entityClassColumns == null || entityClassColumns.size() == 0) { return null; } List<ResultMapping> resultMappings = new ArrayList<ResultMapping>(); for (EntityColumn entityColumn : entityClassColumns) { String column = entityColumn.getColumn(); //去掉可能存在的分隔符 Matcher matcher = DELIMITER.matcher(column); if(matcher.find()){ column = matcher.group(1); } ResultMapping.Builder builder = new ResultMapping.Builder(configuration, entityColumn.getProperty(), column, entityColumn.getJavaType()); if (entityColumn.getJdbcType() != null) { builder.jdbcType(entityColumn.getJdbcType()); } if (entityColumn.getTypeHandler() != null) { try { builder.typeHandler(getInstance(entityColumn.getJavaType(),entityColumn.getTypeHandler())); } catch (Exception e) { throw new MapperException(e); } } List<ResultFlag> flags = new ArrayList<ResultFlag>(); if (entityColumn.isId()) { flags.add(ResultFlag.ID); } builder.flags(flags); resultMappings.add(builder.build()); } ResultMap.Builder builder = new ResultMap.Builder(configuration, "BaseMapperResultMap", this.entityClass, resultMappings, true); this.resultMap = builder.build(); return this.resultMap; }
class class_name[name] begin[{] method[getResultMap, return_type[type[ResultMap]], modifier[public], parameter[configuration]] begin[{] if[binary_operation[THIS[member[None.resultMap]], !=, literal[null]]] begin[{] return[THIS[member[None.resultMap]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.entityClassColumns], ==, literal[null]], ||, binary_operation[call[entityClassColumns.size, parameter[]], ==, literal[0]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[List], resultMappings] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getColumn, postfix_operators=[], prefix_operators=[], qualifier=entityColumn, selectors=[], type_arguments=None), name=column)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=DELIMITER, selectors=[], type_arguments=None), name=matcher)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Matcher, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=find, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=configuration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=entityColumn, selectors=[], type_arguments=None), MemberReference(member=column, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getJavaType, postfix_operators=[], prefix_operators=[], qualifier=entityColumn, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ResultMapping, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))), name=builder)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ResultMapping, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getJdbcType, postfix_operators=[], prefix_operators=[], qualifier=entityColumn, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJdbcType, postfix_operators=[], prefix_operators=[], qualifier=entityColumn, selectors=[], type_arguments=None)], member=jdbcType, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTypeHandler, postfix_operators=[], prefix_operators=[], qualifier=entityColumn, 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=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJavaType, postfix_operators=[], prefix_operators=[], qualifier=entityColumn, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getTypeHandler, postfix_operators=[], prefix_operators=[], qualifier=entityColumn, selectors=[], type_arguments=None)], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=typeHandler, postfix_operators=[], prefix_operators=[], qualifier=builder, 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=MapperException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ResultFlag, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=flags)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ResultFlag, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isId, postfix_operators=[], prefix_operators=[], qualifier=entityColumn, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ID, postfix_operators=[], prefix_operators=[], qualifier=ResultFlag, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=flags, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=flags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=flags, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=build, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=resultMappings, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=entityClassColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entityColumn)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EntityColumn, sub_type=None))), label=None) local_variable[type[ResultMap], builder] assign[THIS[member[None.resultMap]], call[builder.build, parameter[]]] return[THIS[member[None.resultMap]]] end[}] END[}]
Keyword[public] identifier[ResultMap] identifier[getResultMap] operator[SEP] identifier[Configuration] identifier[configuration] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resultMap] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[resultMap] operator[SEP] } Keyword[if] operator[SEP] identifier[entityClassColumns] operator[==] Other[null] operator[||] identifier[entityClassColumns] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[List] operator[<] identifier[ResultMapping] operator[>] identifier[resultMappings] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[ResultMapping] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[EntityColumn] identifier[entityColumn] operator[:] identifier[entityClassColumns] operator[SEP] { identifier[String] identifier[column] operator[=] identifier[entityColumn] operator[SEP] identifier[getColumn] operator[SEP] operator[SEP] operator[SEP] identifier[Matcher] identifier[matcher] operator[=] identifier[DELIMITER] operator[SEP] identifier[matcher] operator[SEP] identifier[column] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[column] operator[=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] operator[SEP] } identifier[ResultMapping] operator[SEP] identifier[Builder] identifier[builder] operator[=] Keyword[new] identifier[ResultMapping] operator[SEP] identifier[Builder] operator[SEP] identifier[configuration] , identifier[entityColumn] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] , identifier[column] , identifier[entityColumn] operator[SEP] identifier[getJavaType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entityColumn] operator[SEP] identifier[getJdbcType] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[builder] operator[SEP] identifier[jdbcType] operator[SEP] identifier[entityColumn] operator[SEP] identifier[getJdbcType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[entityColumn] operator[SEP] identifier[getTypeHandler] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[builder] operator[SEP] identifier[typeHandler] operator[SEP] identifier[getInstance] operator[SEP] identifier[entityColumn] operator[SEP] identifier[getJavaType] operator[SEP] operator[SEP] , identifier[entityColumn] operator[SEP] identifier[getTypeHandler] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MapperException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } identifier[List] operator[<] identifier[ResultFlag] operator[>] identifier[flags] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[ResultFlag] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entityColumn] operator[SEP] identifier[isId] operator[SEP] operator[SEP] operator[SEP] { identifier[flags] operator[SEP] identifier[add] operator[SEP] identifier[ResultFlag] operator[SEP] identifier[ID] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[flags] operator[SEP] identifier[flags] operator[SEP] operator[SEP] identifier[resultMappings] operator[SEP] identifier[add] operator[SEP] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[ResultMap] operator[SEP] identifier[Builder] identifier[builder] operator[=] Keyword[new] identifier[ResultMap] operator[SEP] identifier[Builder] operator[SEP] identifier[configuration] , literal[String] , Keyword[this] operator[SEP] identifier[entityClass] , identifier[resultMappings] , literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[resultMap] operator[=] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[resultMap] operator[SEP] }
protected void onValidMarkup(AppendingStringBuffer responseBuffer, ValidationReport report) { IRequestablePage responsePage = getResponsePage(); DocType doctype = getDocType(responseBuffer); log.info("Markup for {} is valid {}", responsePage != null ? responsePage.getClass().getName() : "<unable to determine page class>", doctype.name()); String head = report.getHeadMarkup(); String body = report.getBodyMarkup(); int indexOfHeadClose = responseBuffer.lastIndexOf("</head>"); responseBuffer.insert(indexOfHeadClose, head); int indexOfBodyClose = responseBuffer.lastIndexOf("</body>"); responseBuffer.insert(indexOfBodyClose, body); }
class class_name[name] begin[{] method[onValidMarkup, return_type[void], modifier[protected], parameter[responseBuffer, report]] begin[{] local_variable[type[IRequestablePage], responsePage] local_variable[type[DocType], doctype] call[log.info, parameter[literal["Markup for {} is valid {}"], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=responsePage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<unable to determine page class>"), if_true=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=responsePage, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), call[doctype.name, parameter[]]]] local_variable[type[String], head] local_variable[type[String], body] local_variable[type[int], indexOfHeadClose] call[responseBuffer.insert, parameter[member[.indexOfHeadClose], member[.head]]] local_variable[type[int], indexOfBodyClose] call[responseBuffer.insert, parameter[member[.indexOfBodyClose], member[.body]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[onValidMarkup] operator[SEP] identifier[AppendingStringBuffer] identifier[responseBuffer] , identifier[ValidationReport] identifier[report] operator[SEP] { identifier[IRequestablePage] identifier[responsePage] operator[=] identifier[getResponsePage] operator[SEP] operator[SEP] operator[SEP] identifier[DocType] identifier[doctype] operator[=] identifier[getDocType] operator[SEP] identifier[responseBuffer] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[responsePage] operator[!=] Other[null] operator[?] identifier[responsePage] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[:] literal[String] , identifier[doctype] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[head] operator[=] identifier[report] operator[SEP] identifier[getHeadMarkup] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[body] operator[=] identifier[report] operator[SEP] identifier[getBodyMarkup] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[indexOfHeadClose] operator[=] identifier[responseBuffer] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[responseBuffer] operator[SEP] identifier[insert] operator[SEP] identifier[indexOfHeadClose] , identifier[head] operator[SEP] operator[SEP] Keyword[int] identifier[indexOfBodyClose] operator[=] identifier[responseBuffer] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[responseBuffer] operator[SEP] identifier[insert] operator[SEP] identifier[indexOfBodyClose] , identifier[body] operator[SEP] operator[SEP] }
public void addTangoUserListener(ITangoUserListener listener, String attrName, String[] filters) throws DevFailed { addTangoUserListener(listener, attrName, filters, false); }
class class_name[name] begin[{] method[addTangoUserListener, return_type[void], modifier[public], parameter[listener, attrName, filters]] begin[{] call[.addTangoUserListener, parameter[member[.listener], member[.attrName], member[.filters], literal[false]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addTangoUserListener] operator[SEP] identifier[ITangoUserListener] identifier[listener] , identifier[String] identifier[attrName] , identifier[String] operator[SEP] operator[SEP] identifier[filters] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[addTangoUserListener] operator[SEP] identifier[listener] , identifier[attrName] , identifier[filters] , literal[boolean] operator[SEP] operator[SEP] }
public final Script compileString(String source, String sourceName, int lineno, Object securityDomain) { if (lineno < 0) { // For compatibility IllegalArgumentException can not be thrown here lineno = 0; } return compileString(source, null, null, sourceName, lineno, securityDomain); }
class class_name[name] begin[{] method[compileString, return_type[type[Script]], modifier[final public], parameter[source, sourceName, lineno, securityDomain]] begin[{] if[binary_operation[member[.lineno], <, literal[0]]] begin[{] assign[member[.lineno], literal[0]] else begin[{] None end[}] return[call[.compileString, parameter[member[.source], literal[null], literal[null], member[.sourceName], member[.lineno], member[.securityDomain]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Script] identifier[compileString] operator[SEP] identifier[String] identifier[source] , identifier[String] identifier[sourceName] , Keyword[int] identifier[lineno] , identifier[Object] identifier[securityDomain] operator[SEP] { Keyword[if] operator[SEP] identifier[lineno] operator[<] Other[0] operator[SEP] { identifier[lineno] operator[=] Other[0] operator[SEP] } Keyword[return] identifier[compileString] operator[SEP] identifier[source] , Other[null] , Other[null] , identifier[sourceName] , identifier[lineno] , identifier[securityDomain] operator[SEP] operator[SEP] }
public void addInvitationListener(WorkgroupInvitationListener invitationListener) { synchronized (invitationListeners) { if (!invitationListeners.contains(invitationListener)) { invitationListeners.add(invitationListener); } } }
class class_name[name] begin[{] method[addInvitationListener, return_type[void], modifier[public], parameter[invitationListener]] begin[{] SYNCHRONIZED[member[.invitationListeners]] BEGIN[{] if[call[invitationListeners.contains, parameter[member[.invitationListener]]]] begin[{] call[invitationListeners.add, parameter[member[.invitationListener]]] else begin[{] None end[}] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addInvitationListener] operator[SEP] identifier[WorkgroupInvitationListener] identifier[invitationListener] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[invitationListeners] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[invitationListeners] operator[SEP] identifier[contains] operator[SEP] identifier[invitationListener] operator[SEP] operator[SEP] { identifier[invitationListeners] operator[SEP] identifier[add] operator[SEP] identifier[invitationListener] operator[SEP] operator[SEP] } } }
public static <T> Id<T> newId(final TypeToken<T> type, final Annotation annotation) { return (Id<T>) Ids.newId(type.getType(), annotation); }
class class_name[name] begin[{] method[newId, return_type[type[Id]], modifier[public static], parameter[type, annotation]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), MemberReference(member=annotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newId, postfix_operators=[], prefix_operators=[], qualifier=Ids, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Id, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Id] operator[<] identifier[T] operator[>] identifier[newId] operator[SEP] Keyword[final] identifier[TypeToken] operator[<] identifier[T] operator[>] identifier[type] , Keyword[final] identifier[Annotation] identifier[annotation] operator[SEP] { Keyword[return] operator[SEP] identifier[Id] operator[<] identifier[T] operator[>] operator[SEP] identifier[Ids] operator[SEP] identifier[newId] operator[SEP] identifier[type] operator[SEP] identifier[getType] operator[SEP] operator[SEP] , identifier[annotation] operator[SEP] operator[SEP] }
public void animate(float animationTime, Matrix4f mat) { mRotInterpolator.animate(animationTime, mRotKey); mPosInterpolator.animate(animationTime, mPosKey); mSclInterpolator.animate(animationTime, mScaleKey); mat.translationRotateScale(mPosKey[0], mPosKey[1], mPosKey[2], mRotKey[0], mRotKey[1], mRotKey[2], mRotKey[3], mScaleKey[0], mScaleKey[1], mScaleKey[2]); }
class class_name[name] begin[{] method[animate, return_type[void], modifier[public], parameter[animationTime, mat]] begin[{] call[mRotInterpolator.animate, parameter[member[.animationTime], member[.mRotKey]]] call[mPosInterpolator.animate, parameter[member[.animationTime], member[.mPosKey]]] call[mSclInterpolator.animate, parameter[member[.animationTime], member[.mScaleKey]]] call[mat.translationRotateScale, parameter[member[.mPosKey], member[.mPosKey], member[.mPosKey], member[.mRotKey], member[.mRotKey], member[.mRotKey], member[.mRotKey], member[.mScaleKey], member[.mScaleKey], member[.mScaleKey]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[animate] operator[SEP] Keyword[float] identifier[animationTime] , identifier[Matrix4f] identifier[mat] operator[SEP] { identifier[mRotInterpolator] operator[SEP] identifier[animate] operator[SEP] identifier[animationTime] , identifier[mRotKey] operator[SEP] operator[SEP] identifier[mPosInterpolator] operator[SEP] identifier[animate] operator[SEP] identifier[animationTime] , identifier[mPosKey] operator[SEP] operator[SEP] identifier[mSclInterpolator] operator[SEP] identifier[animate] operator[SEP] identifier[animationTime] , identifier[mScaleKey] operator[SEP] operator[SEP] identifier[mat] operator[SEP] identifier[translationRotateScale] operator[SEP] identifier[mPosKey] operator[SEP] Other[0] operator[SEP] , identifier[mPosKey] operator[SEP] Other[1] operator[SEP] , identifier[mPosKey] operator[SEP] Other[2] operator[SEP] , identifier[mRotKey] operator[SEP] Other[0] operator[SEP] , identifier[mRotKey] operator[SEP] Other[1] operator[SEP] , identifier[mRotKey] operator[SEP] Other[2] operator[SEP] , identifier[mRotKey] operator[SEP] Other[3] operator[SEP] , identifier[mScaleKey] operator[SEP] Other[0] operator[SEP] , identifier[mScaleKey] operator[SEP] Other[1] operator[SEP] , identifier[mScaleKey] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] }
public PoolGetHeaders withLastModified(DateTime lastModified) { if (lastModified == null) { this.lastModified = null; } else { this.lastModified = new DateTimeRfc1123(lastModified); } return this; }
class class_name[name] begin[{] method[withLastModified, return_type[type[PoolGetHeaders]], modifier[public], parameter[lastModified]] begin[{] if[binary_operation[member[.lastModified], ==, literal[null]]] begin[{] assign[THIS[member[None.lastModified]], literal[null]] else begin[{] assign[THIS[member[None.lastModified]], ClassCreator(arguments=[MemberReference(member=lastModified, 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=DateTimeRfc1123, sub_type=None))] end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[PoolGetHeaders] identifier[withLastModified] operator[SEP] identifier[DateTime] identifier[lastModified] operator[SEP] { Keyword[if] operator[SEP] identifier[lastModified] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[lastModified] operator[=] Other[null] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[lastModified] operator[=] Keyword[new] identifier[DateTimeRfc1123] operator[SEP] identifier[lastModified] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static Date getDate(Map<String, Object> map, String key, String dateTimeFormat) { Object obj = map.get(key); return obj instanceof Number ? new Date(((Number) obj).longValue()) : (obj instanceof String ? DateFormatUtils.fromString(obj.toString(), dateTimeFormat) : (obj instanceof Date ? (Date) obj : null)); }
class class_name[name] begin[{] method[getDate, return_type[type[Date]], modifier[public static], parameter[map, key, dateTimeFormat]] begin[{] local_variable[type[Object], obj] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None), operator=instanceof), if_false=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), operator=instanceof), if_false=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None), operator=instanceof), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None))), if_true=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=obj, selectors=[], type_arguments=None), MemberReference(member=dateTimeFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromString, postfix_operators=[], prefix_operators=[], qualifier=DateFormatUtils, selectors=[], type_arguments=None)), if_true=ClassCreator(arguments=[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None)))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Date] identifier[getDate] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[map] , identifier[String] identifier[key] , identifier[String] identifier[dateTimeFormat] operator[SEP] { identifier[Object] identifier[obj] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[return] identifier[obj] Keyword[instanceof] identifier[Number] operator[?] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] operator[:] operator[SEP] identifier[obj] Keyword[instanceof] identifier[String] operator[?] identifier[DateFormatUtils] operator[SEP] identifier[fromString] operator[SEP] identifier[obj] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[dateTimeFormat] operator[SEP] operator[:] operator[SEP] identifier[obj] Keyword[instanceof] identifier[Date] operator[?] operator[SEP] identifier[Date] operator[SEP] identifier[obj] operator[:] Other[null] operator[SEP] operator[SEP] operator[SEP] }
private void processFunction(final Expression expression, final FunctionDescriptor od, RulesTextProvider textProvider) throws ParserException { log.debug("processFunction"); if (!exact("(",textProvider)) throw new ParserException("Expected ')' after '"+od.getName()+"': ",textProvider); Class<?> args[] = od.getParameterTypes(); for (int arg=1;arg <= args.length;arg++) { if (args[arg-1].equals(Expression.class)) { Expression e = processExpression(textProvider); expression.expression(e); } if (args[arg-1].equals(List.class)) { if (!xpath(textProvider)) throw new ParserException("expected list operand: ",textProvider); // operand string found String operand = textProvider.getLastToken(); if (!textProvider.findOperandInScope(operand)) { throw new ParserException("Could not locate "+operand+" in scope",textProvider); } expression.list(textProvider.getLastToken(),textProvider.getLastResolvedField()); } else { Expression e = processExpression(textProvider); expression.expression(e); } if (arg < args.length) { // ensure arguments are separated by a comma exactOrError(",",textProvider); } } exactOrError(")",textProvider); expression.function(od); }
class class_name[name] begin[{] method[processFunction, return_type[void], modifier[private], parameter[expression, od, textProvider]] begin[{] call[log.debug, parameter[literal["processFunction"]]] if[call[.exact, parameter[literal["("], member[.textProvider]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected ')' after '"), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=od, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="': "), operator=+), MemberReference(member=textProvider, 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=ParserException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Class], args] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Expression, sub_type=None))], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=textProvider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=expression, postfix_operators=[], prefix_operators=[], qualifier=expression, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=List, sub_type=None))], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=textProvider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=expression, postfix_operators=[], prefix_operators=[], qualifier=expression, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=textProvider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=xpath, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="expected list operand: "), MemberReference(member=textProvider, 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=ParserException, sub_type=None)), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getLastToken, postfix_operators=[], prefix_operators=[], qualifier=textProvider, selectors=[], type_arguments=None), name=operand)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=operand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findOperandInScope, postfix_operators=[], prefix_operators=['!'], qualifier=textProvider, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not locate "), operandr=MemberReference(member=operand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in scope"), operator=+), MemberReference(member=textProvider, 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=ParserException, sub_type=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLastToken, postfix_operators=[], prefix_operators=[], qualifier=textProvider, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getLastResolvedField, postfix_operators=[], prefix_operators=[], qualifier=textProvider, selectors=[], type_arguments=None)], member=list, postfix_operators=[], prefix_operators=[], qualifier=expression, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[]), 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=","), MemberReference(member=textProvider, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exactOrError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=arg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=arg)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=arg, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[.exactOrError, parameter[literal[")"], member[.textProvider]]] call[expression.function, parameter[member[.od]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[processFunction] operator[SEP] Keyword[final] identifier[Expression] identifier[expression] , Keyword[final] identifier[FunctionDescriptor] identifier[od] , identifier[RulesTextProvider] identifier[textProvider] operator[SEP] Keyword[throws] identifier[ParserException] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[exact] operator[SEP] literal[String] , identifier[textProvider] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ParserException] operator[SEP] literal[String] operator[+] identifier[od] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[textProvider] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[args] operator[SEP] operator[SEP] operator[=] identifier[od] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[arg] operator[=] Other[1] operator[SEP] identifier[arg] operator[<=] identifier[args] operator[SEP] identifier[length] operator[SEP] identifier[arg] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[arg] operator[-] Other[1] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Expression] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { identifier[Expression] identifier[e] operator[=] identifier[processExpression] operator[SEP] identifier[textProvider] operator[SEP] operator[SEP] identifier[expression] operator[SEP] identifier[expression] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[arg] operator[-] Other[1] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[List] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[xpath] operator[SEP] identifier[textProvider] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ParserException] operator[SEP] literal[String] , identifier[textProvider] operator[SEP] operator[SEP] identifier[String] identifier[operand] operator[=] identifier[textProvider] operator[SEP] identifier[getLastToken] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[textProvider] operator[SEP] identifier[findOperandInScope] operator[SEP] identifier[operand] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ParserException] operator[SEP] literal[String] operator[+] identifier[operand] operator[+] literal[String] , identifier[textProvider] operator[SEP] operator[SEP] } identifier[expression] operator[SEP] identifier[list] operator[SEP] identifier[textProvider] operator[SEP] identifier[getLastToken] operator[SEP] operator[SEP] , identifier[textProvider] operator[SEP] identifier[getLastResolvedField] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[Expression] identifier[e] operator[=] identifier[processExpression] operator[SEP] identifier[textProvider] operator[SEP] operator[SEP] identifier[expression] operator[SEP] identifier[expression] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[arg] operator[<] identifier[args] operator[SEP] identifier[length] operator[SEP] { identifier[exactOrError] operator[SEP] literal[String] , identifier[textProvider] operator[SEP] operator[SEP] } } identifier[exactOrError] operator[SEP] literal[String] , identifier[textProvider] operator[SEP] operator[SEP] identifier[expression] operator[SEP] identifier[function] operator[SEP] identifier[od] operator[SEP] operator[SEP] }
public static void logCSV(String csvData, final Logger log) { log.info(""); log.info("**** Here we go with CSV:"); log.info(""); log.info(csvData); log.info(""); log.info("**** End of CSV data. Have a nice day!"); log.info(""); LogHelper.moo(log); }
class class_name[name] begin[{] method[logCSV, return_type[void], modifier[public static], parameter[csvData, log]] begin[{] call[log.info, parameter[literal[""]]] call[log.info, parameter[literal["**** Here we go with CSV:"]]] call[log.info, parameter[literal[""]]] call[log.info, parameter[member[.csvData]]] call[log.info, parameter[literal[""]]] call[log.info, parameter[literal["**** End of CSV data. Have a nice day!"]]] call[log.info, parameter[literal[""]]] call[LogHelper.moo, parameter[member[.log]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[logCSV] operator[SEP] identifier[String] identifier[csvData] , Keyword[final] identifier[Logger] identifier[log] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] identifier[csvData] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[LogHelper] operator[SEP] identifier[moo] operator[SEP] identifier[log] operator[SEP] operator[SEP] }
@Override public final void handleRequest(InputStream input, OutputStream output, Context context) throws IOException { byte[] inputBytes = IOUtils.toByteArray(input); for (AlexaSkill skill : skills) { SkillResponse response = skill.execute(new BaseSkillRequest(inputBytes), context); if (response != null) { if (response.isPresent()) { response.writeTo(output); } return; } } throw new AskSdkException("Could not find a skill to handle the incoming request"); }
class class_name[name] begin[{] method[handleRequest, return_type[void], modifier[final public], parameter[input, output, context]] begin[{] local_variable[type[byte], inputBytes] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=inputBytes, 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=BaseSkillRequest, sub_type=None)), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execute, postfix_operators=[], prefix_operators=[], qualifier=skill, selectors=[], type_arguments=None), name=response)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SkillResponse, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=response, 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=[IfStatement(condition=MethodInvocation(arguments=[], member=isPresent, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeTo, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=skills, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=skill)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AlexaSkill, sub_type=None))), label=None) ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not find a skill to handle the incoming request")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AskSdkException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[handleRequest] operator[SEP] identifier[InputStream] identifier[input] , identifier[OutputStream] identifier[output] , identifier[Context] identifier[context] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[inputBytes] operator[=] identifier[IOUtils] operator[SEP] identifier[toByteArray] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[AlexaSkill] identifier[skill] operator[:] identifier[skills] operator[SEP] { identifier[SkillResponse] identifier[response] operator[=] identifier[skill] operator[SEP] identifier[execute] operator[SEP] Keyword[new] identifier[BaseSkillRequest] operator[SEP] identifier[inputBytes] operator[SEP] , identifier[context] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[response] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[response] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { identifier[response] operator[SEP] identifier[writeTo] operator[SEP] identifier[output] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } } Keyword[throw] Keyword[new] identifier[AskSdkException] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public byte[] allocInputBuffer(int minSize) { byte[] buf = inputBuffer; if (buf == null || buf.length < minSize) { buf = new byte[Math.max(minSize, MIN_OUTPUT_BUFFER)]; } else { inputBuffer = null; } return buf; }
class class_name[name] begin[{] method[allocInputBuffer, return_type[type[byte]], modifier[public], parameter[minSize]] begin[{] local_variable[type[byte], buf] if[binary_operation[binary_operation[member[.buf], ==, literal[null]], ||, binary_operation[member[buf.length], <, member[.minSize]]]] begin[{] assign[member[.buf], ArrayCreator(dimensions=[MethodInvocation(arguments=[MemberReference(member=minSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MIN_OUTPUT_BUFFER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] else begin[{] assign[member[.inputBuffer], literal[null]] end[}] return[member[.buf]] end[}] END[}]
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[allocInputBuffer] operator[SEP] Keyword[int] identifier[minSize] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[buf] operator[=] identifier[inputBuffer] operator[SEP] Keyword[if] operator[SEP] identifier[buf] operator[==] Other[null] operator[||] identifier[buf] operator[SEP] identifier[length] operator[<] identifier[minSize] operator[SEP] { identifier[buf] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[minSize] , identifier[MIN_OUTPUT_BUFFER] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[inputBuffer] operator[=] Other[null] operator[SEP] } Keyword[return] identifier[buf] operator[SEP] }
public static boolean isPhoenixProcess(Context context) { int currentPid = Process.myPid(); ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); List<ActivityManager.RunningAppProcessInfo> runningProcesses = manager.getRunningAppProcesses(); if (runningProcesses != null) { for (ActivityManager.RunningAppProcessInfo processInfo : runningProcesses) { if (processInfo.pid == currentPid && processInfo.processName.endsWith(":phoenix")) { return true; } } } return false; }
class class_name[name] begin[{] method[isPhoenixProcess, return_type[type[boolean]], modifier[public static], parameter[context]] begin[{] local_variable[type[int], currentPid] local_variable[type[ActivityManager], manager] local_variable[type[List], runningProcesses] if[binary_operation[member[.runningProcesses], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pid, postfix_operators=[], prefix_operators=[], qualifier=processInfo, selectors=[]), operandr=MemberReference(member=currentPid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=":phoenix")], member=endsWith, postfix_operators=[], prefix_operators=[], qualifier=processInfo.processName, 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=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=runningProcesses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=processInfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ActivityManager, sub_type=ReferenceType(arguments=None, dimensions=None, name=RunningAppProcessInfo, sub_type=None)))), label=None) else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isPhoenixProcess] operator[SEP] identifier[Context] identifier[context] operator[SEP] { Keyword[int] identifier[currentPid] operator[=] identifier[Process] operator[SEP] identifier[myPid] operator[SEP] operator[SEP] operator[SEP] identifier[ActivityManager] identifier[manager] operator[=] operator[SEP] identifier[ActivityManager] operator[SEP] identifier[context] operator[SEP] identifier[getSystemService] operator[SEP] identifier[Context] operator[SEP] identifier[ACTIVITY_SERVICE] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[ActivityManager] operator[SEP] identifier[RunningAppProcessInfo] operator[>] identifier[runningProcesses] operator[=] identifier[manager] operator[SEP] identifier[getRunningAppProcesses] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[runningProcesses] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[ActivityManager] operator[SEP] identifier[RunningAppProcessInfo] identifier[processInfo] operator[:] identifier[runningProcesses] operator[SEP] { Keyword[if] operator[SEP] identifier[processInfo] operator[SEP] identifier[pid] operator[==] identifier[currentPid] operator[&&] identifier[processInfo] operator[SEP] identifier[processName] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } } Keyword[return] literal[boolean] operator[SEP] }
private ExtractionInfo extractMultilineComment( JsDocToken token, WhitespaceOption option, boolean isMarker, boolean includeAnnotations) { StringBuilder builder = new StringBuilder(); int startLineno = -1; int startCharno = -1; if (isMarker) { stream.update(); startLineno = stream.getLineno(); startCharno = stream.getCharno() + 1; String line = getRemainingJSDocLine(); if (option != WhitespaceOption.PRESERVE) { line = line.trim(); } builder.append(line); state = State.SEARCHING_ANNOTATION; token = next(); } boolean ignoreStar = false; // Track the start of the line to count whitespace that // the tokenizer skipped. Because this case is rare, it's easier // to do this here than in the tokenizer. int lineStartChar = -1; do { switch (token) { case STAR: if (ignoreStar) { // Mark the position after the star as the new start of the line. lineStartChar = stream.getCharno() + 1; ignoreStar = false; } else { // The star is part of the comment. padLine(builder, lineStartChar, option); lineStartChar = -1; builder.append('*'); } token = next(); while (token == JsDocToken.STAR) { if (lineStartChar != -1) { padLine(builder, lineStartChar, option); lineStartChar = -1; } builder.append('*'); token = next(); } continue; case EOL: if (option != WhitespaceOption.SINGLE_LINE) { builder.append('\n'); } ignoreStar = true; lineStartChar = 0; token = next(); continue; default: ignoreStar = false; state = State.SEARCHING_ANNOTATION; boolean isEOC = token == JsDocToken.EOC; if (!isEOC) { padLine(builder, lineStartChar, option); lineStartChar = -1; } if (token == JsDocToken.EOC || token == JsDocToken.EOF || // When we're capturing a license block, annotations // in the block are OK. (token == JsDocToken.ANNOTATION && !includeAnnotations)) { String multilineText = builder.toString(); if (option != WhitespaceOption.PRESERVE) { multilineText = multilineText.trim(); } if (isMarker && !multilineText.isEmpty()) { int endLineno = stream.getLineno(); int endCharno = stream.getCharno(); jsdocBuilder.markText(multilineText, startLineno, startCharno, endLineno, endCharno); } return new ExtractionInfo(multilineText, token); } builder.append(toString(token)); String line = getRemainingJSDocLine(); if (option != WhitespaceOption.PRESERVE) { line = trimEnd(line); } builder.append(line); token = next(); } } while (true); }
class class_name[name] begin[{] method[extractMultilineComment, return_type[type[ExtractionInfo]], modifier[private], parameter[token, option, isMarker, includeAnnotations]] begin[{] local_variable[type[StringBuilder], builder] local_variable[type[int], startLineno] local_variable[type[int], startCharno] if[member[.isMarker]] begin[{] call[stream.update, parameter[]] assign[member[.startLineno], call[stream.getLineno, parameter[]]] assign[member[.startCharno], binary_operation[call[stream.getCharno, parameter[]], +, literal[1]]] local_variable[type[String], line] if[binary_operation[member[.option], !=, member[WhitespaceOption.PRESERVE]]] begin[{] assign[member[.line], call[line.trim, parameter[]]] else begin[{] None end[}] call[builder.append, parameter[member[.line]]] assign[member[.state], member[State.SEARCHING_ANNOTATION]] assign[member[.token], call[.next, parameter[]]] else begin[{] None end[}] local_variable[type[boolean], ignoreStar] local_variable[type[int], lineStartChar] do[literal[true]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['STAR'], statements=[IfStatement(condition=MemberReference(member=ignoreStar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lineStartChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=option, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=padLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lineStartChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='*')], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lineStartChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCharno, postfix_operators=[], prefix_operators=[], qualifier=stream, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ignoreStar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), WhileStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lineStartChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lineStartChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=option, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=padLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lineStartChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='*')], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=STAR, postfix_operators=[], prefix_operators=[], qualifier=JsDocToken, selectors=[]), operator===), label=None), ContinueStatement(goto=None, label=None)]), SwitchStatementCase(case=['EOL'], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=option, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SINGLE_LINE, postfix_operators=[], prefix_operators=[], qualifier=WhitespaceOption, selectors=[]), 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='\n')], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ignoreStar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lineStartChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), ContinueStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ignoreStar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=SEARCHING_ANNOTATION, postfix_operators=[], prefix_operators=[], qualifier=State, selectors=[])), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=EOC, postfix_operators=[], prefix_operators=[], qualifier=JsDocToken, selectors=[]), operator===), name=isEOC)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=isEOC, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lineStartChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=option, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=padLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lineStartChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=EOC, postfix_operators=[], prefix_operators=[], qualifier=JsDocToken, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=JsDocToken, selectors=[]), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ANNOTATION, postfix_operators=[], prefix_operators=[], qualifier=JsDocToken, selectors=[]), operator===), operandr=MemberReference(member=includeAnnotations, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), name=multilineText)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=option, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PRESERVE, postfix_operators=[], prefix_operators=[], qualifier=WhitespaceOption, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=multilineText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=trim, postfix_operators=[], prefix_operators=[], qualifier=multilineText, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isMarker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=multilineText, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getLineno, postfix_operators=[], prefix_operators=[], qualifier=stream, selectors=[], type_arguments=None), name=endLineno)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getCharno, postfix_operators=[], prefix_operators=[], qualifier=stream, selectors=[], type_arguments=None), name=endCharno)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=multilineText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startLineno, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=startCharno, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endLineno, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endCharno, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=markText, postfix_operators=[], prefix_operators=[], qualifier=jsdocBuilder, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=multilineText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=token, 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=ExtractionInfo, sub_type=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRemainingJSDocLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=line)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=option, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PRESERVE, postfix_operators=[], prefix_operators=[], qualifier=WhitespaceOption, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=trimEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])], expression=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] end[}] END[}]
Keyword[private] identifier[ExtractionInfo] identifier[extractMultilineComment] operator[SEP] identifier[JsDocToken] identifier[token] , identifier[WhitespaceOption] identifier[option] , Keyword[boolean] identifier[isMarker] , Keyword[boolean] identifier[includeAnnotations] operator[SEP] { identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[startLineno] operator[=] operator[-] Other[1] operator[SEP] Keyword[int] identifier[startCharno] operator[=] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[isMarker] operator[SEP] { identifier[stream] operator[SEP] identifier[update] operator[SEP] operator[SEP] operator[SEP] identifier[startLineno] operator[=] identifier[stream] operator[SEP] identifier[getLineno] operator[SEP] operator[SEP] operator[SEP] identifier[startCharno] operator[=] identifier[stream] operator[SEP] identifier[getCharno] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] identifier[String] identifier[line] operator[=] identifier[getRemainingJSDocLine] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[option] operator[!=] identifier[WhitespaceOption] operator[SEP] identifier[PRESERVE] operator[SEP] { identifier[line] operator[=] identifier[line] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[line] operator[SEP] operator[SEP] identifier[state] operator[=] identifier[State] operator[SEP] identifier[SEARCHING_ANNOTATION] operator[SEP] identifier[token] operator[=] identifier[next] operator[SEP] operator[SEP] operator[SEP] } Keyword[boolean] identifier[ignoreStar] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[lineStartChar] operator[=] operator[-] Other[1] operator[SEP] Keyword[do] { Keyword[switch] operator[SEP] identifier[token] operator[SEP] { Keyword[case] identifier[STAR] operator[:] Keyword[if] operator[SEP] identifier[ignoreStar] operator[SEP] { identifier[lineStartChar] operator[=] identifier[stream] operator[SEP] identifier[getCharno] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] identifier[ignoreStar] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[padLine] operator[SEP] identifier[builder] , identifier[lineStartChar] , identifier[option] operator[SEP] operator[SEP] identifier[lineStartChar] operator[=] operator[-] Other[1] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[token] operator[=] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[token] operator[==] identifier[JsDocToken] operator[SEP] identifier[STAR] operator[SEP] { Keyword[if] operator[SEP] identifier[lineStartChar] operator[!=] operator[-] Other[1] operator[SEP] { identifier[padLine] operator[SEP] identifier[builder] , identifier[lineStartChar] , identifier[option] operator[SEP] operator[SEP] identifier[lineStartChar] operator[=] operator[-] Other[1] operator[SEP] } identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[token] operator[=] identifier[next] operator[SEP] operator[SEP] operator[SEP] } Keyword[continue] operator[SEP] Keyword[case] identifier[EOL] operator[:] Keyword[if] operator[SEP] identifier[option] operator[!=] identifier[WhitespaceOption] operator[SEP] identifier[SINGLE_LINE] operator[SEP] { identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[ignoreStar] operator[=] literal[boolean] operator[SEP] identifier[lineStartChar] operator[=] Other[0] operator[SEP] identifier[token] operator[=] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] Keyword[default] operator[:] identifier[ignoreStar] operator[=] literal[boolean] operator[SEP] identifier[state] operator[=] identifier[State] operator[SEP] identifier[SEARCHING_ANNOTATION] operator[SEP] Keyword[boolean] identifier[isEOC] operator[=] identifier[token] operator[==] identifier[JsDocToken] operator[SEP] identifier[EOC] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isEOC] operator[SEP] { identifier[padLine] operator[SEP] identifier[builder] , identifier[lineStartChar] , identifier[option] operator[SEP] operator[SEP] identifier[lineStartChar] operator[=] operator[-] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[token] operator[==] identifier[JsDocToken] operator[SEP] identifier[EOC] operator[||] identifier[token] operator[==] identifier[JsDocToken] operator[SEP] identifier[EOF] operator[||] operator[SEP] identifier[token] operator[==] identifier[JsDocToken] operator[SEP] identifier[ANNOTATION] operator[&&] operator[!] identifier[includeAnnotations] operator[SEP] operator[SEP] { identifier[String] identifier[multilineText] operator[=] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[option] operator[!=] identifier[WhitespaceOption] operator[SEP] identifier[PRESERVE] operator[SEP] { identifier[multilineText] operator[=] identifier[multilineText] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[isMarker] operator[&&] operator[!] identifier[multilineText] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[endLineno] operator[=] identifier[stream] operator[SEP] identifier[getLineno] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[endCharno] operator[=] identifier[stream] operator[SEP] identifier[getCharno] operator[SEP] operator[SEP] operator[SEP] identifier[jsdocBuilder] operator[SEP] identifier[markText] operator[SEP] identifier[multilineText] , identifier[startLineno] , identifier[startCharno] , identifier[endLineno] , identifier[endCharno] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[ExtractionInfo] operator[SEP] identifier[multilineText] , identifier[token] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[toString] operator[SEP] identifier[token] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[line] operator[=] identifier[getRemainingJSDocLine] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[option] operator[!=] identifier[WhitespaceOption] operator[SEP] identifier[PRESERVE] operator[SEP] { identifier[line] operator[=] identifier[trimEnd] operator[SEP] identifier[line] operator[SEP] operator[SEP] } identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[line] operator[SEP] operator[SEP] identifier[token] operator[=] identifier[next] operator[SEP] operator[SEP] operator[SEP] } } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] }
@Override protected boolean canHighlight(final Component component, final ComponentAdapter adapter) { return component instanceof IconAware || component instanceof JLabel; }
class class_name[name] begin[{] method[canHighlight, return_type[type[boolean]], modifier[protected], parameter[component, adapter]] begin[{] return[binary_operation[binary_operation[member[.component], instanceof, type[IconAware]], ||, binary_operation[member[.component], instanceof, type[JLabel]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[boolean] identifier[canHighlight] operator[SEP] Keyword[final] identifier[Component] identifier[component] , Keyword[final] identifier[ComponentAdapter] identifier[adapter] operator[SEP] { Keyword[return] identifier[component] Keyword[instanceof] identifier[IconAware] operator[||] identifier[component] Keyword[instanceof] identifier[JLabel] operator[SEP] }
public static int decodeInteger(ByteBuffer buf) { DerId id = DerId.decode(buf); if (!id.matches(DerId.TagClass.UNIVERSAL, DerId.EncodingType.PRIMITIVE, ASN1_INTEGER_TAG_NUM)) { throw new IllegalArgumentException("Expected INTEGER identifier, received " + id); } int len = DerUtils.decodeLength(buf); if (buf.remaining() < len) { throw new IllegalArgumentException("Insufficient content for INTEGER"); } int value = 0; for (int i = 0; i < len; i++) { value = (value << 8) + (0xff & buf.get()); } return value; }
class class_name[name] begin[{] method[decodeInteger, return_type[type[int]], modifier[public static], parameter[buf]] begin[{] local_variable[type[DerId], id] if[call[id.matches, parameter[member[DerId.TagClass.UNIVERSAL], member[DerId.EncodingType.PRIMITIVE], member[.ASN1_INTEGER_TAG_NUM]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected INTEGER identifier, received "), operandr=MemberReference(member=id, 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[int], len] if[binary_operation[call[buf.remaining, parameter[]], <, member[.len]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Insufficient content for INTEGER")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], value] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operandr=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=buf, selectors=[], type_arguments=None), operator=&), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, 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[.value]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[decodeInteger] operator[SEP] identifier[ByteBuffer] identifier[buf] operator[SEP] { identifier[DerId] identifier[id] operator[=] identifier[DerId] operator[SEP] identifier[decode] operator[SEP] identifier[buf] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[id] operator[SEP] identifier[matches] operator[SEP] identifier[DerId] operator[SEP] identifier[TagClass] operator[SEP] identifier[UNIVERSAL] , identifier[DerId] operator[SEP] identifier[EncodingType] operator[SEP] identifier[PRIMITIVE] , identifier[ASN1_INTEGER_TAG_NUM] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[id] operator[SEP] operator[SEP] } Keyword[int] identifier[len] operator[=] identifier[DerUtils] operator[SEP] identifier[decodeLength] operator[SEP] identifier[buf] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[buf] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[<] identifier[len] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[value] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[value] operator[=] operator[SEP] identifier[value] operator[<<] Other[8] operator[SEP] operator[+] operator[SEP] literal[Integer] operator[&] identifier[buf] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[value] operator[SEP] }
public CreateDomainResponse createDomain(CreateDomainRequest request) { checkNotNull(request, "The parameter request should NOT be null."); InternalRequest internalRequest = createRequest(request, HttpMethodName.PUT, DOMAIN, request.getDomain()); this.attachRequestToBody(request, internalRequest); return invokeHttpClient(internalRequest, CreateDomainResponse.class); }
class class_name[name] begin[{] method[createDomain, return_type[type[CreateDomainResponse]], modifier[public], parameter[request]] begin[{] call[.checkNotNull, parameter[member[.request], literal["The parameter request should NOT be null."]]] local_variable[type[InternalRequest], internalRequest] THIS[call[None.attachRequestToBody, parameter[member[.request], member[.internalRequest]]]] return[call[.invokeHttpClient, parameter[member[.internalRequest], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CreateDomainResponse, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[CreateDomainResponse] identifier[createDomain] operator[SEP] identifier[CreateDomainRequest] identifier[request] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[request] , literal[String] operator[SEP] operator[SEP] identifier[InternalRequest] identifier[internalRequest] operator[=] identifier[createRequest] operator[SEP] identifier[request] , identifier[HttpMethodName] operator[SEP] identifier[PUT] , identifier[DOMAIN] , identifier[request] operator[SEP] identifier[getDomain] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[attachRequestToBody] operator[SEP] identifier[request] , identifier[internalRequest] operator[SEP] operator[SEP] Keyword[return] identifier[invokeHttpClient] operator[SEP] identifier[internalRequest] , identifier[CreateDomainResponse] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public String getPageSql(String sql, Page<?> page) { StringBuffer pageSql = new StringBuffer(sql.length() + 100); pageSql.append(getPageBefore(sql, page)); pageSql.append(sql); pageSql.append(getPageAfter(sql, page)); return pageSql.toString(); }
class class_name[name] begin[{] method[getPageSql, return_type[type[String]], modifier[public], parameter[sql, page]] begin[{] local_variable[type[StringBuffer], pageSql] call[pageSql.append, parameter[call[.getPageBefore, parameter[member[.sql], member[.page]]]]] call[pageSql.append, parameter[member[.sql]]] call[pageSql.append, parameter[call[.getPageAfter, parameter[member[.sql], member[.page]]]]] return[call[pageSql.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getPageSql] operator[SEP] identifier[String] identifier[sql] , identifier[Page] operator[<] operator[?] operator[>] identifier[page] operator[SEP] { identifier[StringBuffer] identifier[pageSql] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] identifier[sql] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] Other[100] operator[SEP] operator[SEP] identifier[pageSql] operator[SEP] identifier[append] operator[SEP] identifier[getPageBefore] operator[SEP] identifier[sql] , identifier[page] operator[SEP] operator[SEP] operator[SEP] identifier[pageSql] operator[SEP] identifier[append] operator[SEP] identifier[sql] operator[SEP] operator[SEP] identifier[pageSql] operator[SEP] identifier[append] operator[SEP] identifier[getPageAfter] operator[SEP] identifier[sql] , identifier[page] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[pageSql] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static <T> T executeGroovyScript(final GroovyObject groovyObject, final Object[] args, final Class<T> clazz, final boolean failOnError) { return executeGroovyScript(groovyObject, "run", args, clazz, failOnError); }
class class_name[name] begin[{] method[executeGroovyScript, return_type[type[T]], modifier[public static], parameter[groovyObject, args, clazz, failOnError]] begin[{] return[call[.executeGroovyScript, parameter[member[.groovyObject], literal["run"], member[.args], member[.clazz], member[.failOnError]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[executeGroovyScript] operator[SEP] Keyword[final] identifier[GroovyObject] identifier[groovyObject] , Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[args] , Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , Keyword[final] Keyword[boolean] identifier[failOnError] operator[SEP] { Keyword[return] identifier[executeGroovyScript] operator[SEP] identifier[groovyObject] , literal[String] , identifier[args] , identifier[clazz] , identifier[failOnError] operator[SEP] operator[SEP] }
public void setState(int newState) throws SystemException { if (tc.isEntryEnabled()) Tr.entry(tc, "setState", "from " + stateToString(_state) + " to " + stateToString(newState)); final int oldState = _state; // Check that the state change is valid if (validStateChange[_state][newState]) { // Change state. This is the point at which some log records may be written _state = newState; // // Unconditional add of state information to // log for various states. // if ((newState == STATE_COMMITTING) || (newState == STATE_LAST_PARTICIPANT) || (_tran.isSubordinate() && (newState == STATE_PREPARED || newState == STATE_HEURISTIC_ON_COMMIT || newState == STATE_HEURISTIC_ON_ROLLBACK ) )) { byteData[0] = (byte) _state; // For a recovered transaction (peer or local), _logSection is always populated by the reconstruct call. As // a result we don't need to worry here about which log (ie a peer or a local) to use. if (_logSection != null) { try { _logSection.addData(byteData); if (tc.isDebugEnabled()) Tr.debug(tc, "State logged ok"); } catch (Exception e) { FFDCFilter.processException(e, "com.ibm.tx.jta.impl.TransactionState.setState", "416", this); if (tc.isEventEnabled()) Tr.event(tc, "addData failed during setState!"); } } else if (!_loggingFailed) // First time through only - trap any failed attempts { try { _tranLog = _tran.getLog(); if (_tranLog != null) { if (tc.isDebugEnabled()) Tr.debug(tc, "Create sections in the Log for Recovery Coordinator"); // PK84994 // Create sections in the Log for Recovery coordinator // PK84994 if (_tran.isRAImport()) { // We were imported from an RA // Write the recoveryId of the partner log entry for this provider to the tran log // and the imported JCA Xid final JCARecoveryData jcard = _tran.getJCARecoveryData(); if (tc.isEventEnabled()) Tr.event(tc, "TX is imported from provider: " + jcard.getWrapper().getProviderId()); jcard.logRecoveryEntry(); final RecoverableUnitSection raSection = _tranLog.createSection(TransactionImpl.RESOURCE_ADAPTER_SECTION, true); final byte[] longBytes = Util.longToBytes(jcard.getRecoveryId()); // @249308A final byte[] xidBytes = ((XidImpl) _tran.getJCAXid()).toBytes(); // @249308A final byte[] logBytes = new byte[xidBytes.length + longBytes.length]; // @249308A System.arraycopy(longBytes, 0, logBytes, 0, longBytes.length); // @249308A System.arraycopy(xidBytes, 0, logBytes, longBytes.length, xidBytes.length); // @249308A raSection.addData(logBytes); // @249308C } else if (_tran.isSubordinate()) { logSupOrRecCoord(); } else if (tc.isEventEnabled()) { Tr.event(tc, "Superior transaction."); } // PK84994 starts here if (tc.isDebugEnabled()) Tr.debug(tc, "Create sections in the Log for XID and TransactionState"); // Create sections in the Log for XID and TransactionState RecoverableUnitSection gtidSection = _tranLog.createSection(TransactionImpl.GLOBALID_SECTION, true); gtidSection.addData(_tran.getXidImpl().toBytes()); _logSection = _tranLog.createSection(TransactionImpl.TRAN_STATE_SECTION, true); _logSection.addData(byteData); // PK84994 ends here } } catch (Exception e) { FFDCFilter.processException(e, "com.ibm.tx.jta.impl.TransactionState.setState", "408", this); if (tc.isEntryEnabled()) Tr.exit(tc, "setState : CreateSection failed", e); _logSection = null; // Reset this so we do not write a rollback to the log _loggingFailed = true; // Force no further subordinate logging throw new SystemException(e.toString()); } } } // Defect 1441 // // Do we need to write to the log? Have // we written any data to our section? // if (_logSection != null) { // // Conditional add of state data to the log. // this only happens if a RecoverableUnitSection // has been created previously. This stops 1PC // transactions from having any state written to // the log. // if (newState == STATE_COMMITTED || newState == STATE_ROLLED_BACK || newState == STATE_ROLLING_BACK || (_tran.isSubordinate() && newState == STATE_HEURISTIC_ON_ROLLBACK)) { byteData[0] = (byte) _state; try { _logSection.addData(byteData); } catch (Exception e) { FFDCFilter.processException(e, "com.ibm.tx.jta.impl.TransactionState.setState", "500", this); if (tc.isEventEnabled()) Tr.event(tc, "addData failed during setState!"); } } try { switch (newState) { case STATE_PREPARED: // // Subordinate transactions need to force a // write before returning vote to root tran. // if (_tran.isSubordinate()) { _tranLog.forceSections(); } break; case STATE_COMMITTING: case STATE_ROLLING_BACK: // // If we are a root or RA transaction then we need // to force logging once our completion direction // has been chosen. Normally subordinates simply do an // unforced write, but we always force since we reply // early on commit and if a resource has failed and we // crash, the superior may have already forgotten everything. // _tranLog.forceSections(); break; case STATE_HEURISTIC_ON_COMMIT: case STATE_HEURISTIC_ON_ROLLBACK: // Always force heuristic and we only do it on a subordinate... if (_tran.isSubordinate()) { // Need to force sections here for the case where // we get a heuristic on prepare _tranLog.forceSections(); } break; case STATE_COMMITTED: case STATE_ROLLED_BACK: // // Transaction has finished completion so write // a non-forced log update. // // We only need to update the state to the log // No need to log as we will be logging a removeRecoverableUnit anyway // _logSection.write(); break; case STATE_LAST_PARTICIPANT: // All 2PC resources have been prepared and we // are waiting on the outcome of the 1PC last // participant before confirming our completion // direction. _tranLog.forceSections(); break; } } catch (Exception e) { FFDCFilter.processException(e, "com.ibm.tx.jta.impl.TransactionState.setState", "505", this); if (_partnerLogTable != null) FFDCFilter.processException(e, "com.ibm.ws.Transaction.JTA.TransactionState.setState", "506", _partnerLogTable); if (e instanceof LogFullException) Tr.error(tc, "WTRN0083_LOG_FULL_ERROR", _tran.getTranName()); else Tr.error(tc, "WTRN0066_LOG_WRITE_ERROR", e); // If this is the first log write and it fails, then stop further logging if (oldState == STATE_PREPARING) { _logSection = null; // Reset this so we do not write a rollback to the log _loggingFailed = true; // Force no further subordinate logging _state = oldState; // Reset state so we can rollback } if (tc.isEntryEnabled()) Tr.exit(tc, "setState: Error writing log record", e); throw new SystemException(e.toString()); } } } else { if (tc.isDebugEnabled()) Tr.debug(tc, "TransactionState change FAILED from: " + stateToString(_state) + ", to: " + stateToString(newState)); if (tc.isEntryEnabled()) Tr.exit(tc, "setState"); throw new SystemException(); } if (tc.isEntryEnabled()) Tr.exit(tc, "setState"); }
class class_name[name] begin[{] method[setState, return_type[void], modifier[public], parameter[newState]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["setState"], binary_operation[binary_operation[binary_operation[literal["from "], +, call[.stateToString, parameter[member[._state]]]], +, literal[" to "]], +, call[.stateToString, parameter[member[.newState]]]]]] else begin[{] None end[}] local_variable[type[int], oldState] if[member[.validStateChange]] begin[{] assign[member[._state], member[.newState]] if[binary_operation[binary_operation[binary_operation[member[.newState], ==, member[.STATE_COMMITTING]], ||, binary_operation[member[.newState], ==, member[.STATE_LAST_PARTICIPANT]]], ||, binary_operation[call[_tran.isSubordinate, parameter[]], &&, binary_operation[binary_operation[binary_operation[member[.newState], ==, member[.STATE_PREPARED]], ||, binary_operation[member[.newState], ==, member[.STATE_HEURISTIC_ON_COMMIT]]], ||, binary_operation[member[.newState], ==, member[.STATE_HEURISTIC_ON_ROLLBACK]]]]]] begin[{] assign[member[.byteData], Cast(expression=MemberReference(member=_state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] if[binary_operation[member[._logSection], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=byteData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addData, postfix_operators=[], prefix_operators=[], qualifier=_logSection, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="State logged ok")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.tx.jta.impl.TransactionState.setState"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="416"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="addData failed during setState!")], member=event, postfix_operators=[], prefix_operators=[], qualifier=Tr, 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) else begin[{] if[member[._loggingFailed]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_tranLog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getLog, postfix_operators=[], prefix_operators=[], qualifier=_tran, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=_tranLog, 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=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Create sections in the Log for Recovery Coordinator")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isRAImport, postfix_operators=[], prefix_operators=[], qualifier=_tran, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=isSubordinate, postfix_operators=[], prefix_operators=[], qualifier=_tran, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Superior transaction.")], member=event, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=logSupOrRecCoord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getJCARecoveryData, postfix_operators=[], prefix_operators=[], qualifier=_tran, selectors=[], type_arguments=None), name=jcard)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=JCARecoveryData, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TX is imported from provider: "), operandr=MethodInvocation(arguments=[], member=getWrapper, postfix_operators=[], prefix_operators=[], qualifier=jcard, selectors=[MethodInvocation(arguments=[], member=getProviderId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=event, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=logRecoveryEntry, postfix_operators=[], prefix_operators=[], qualifier=jcard, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=RESOURCE_ADAPTER_SECTION, postfix_operators=[], prefix_operators=[], qualifier=TransactionImpl, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=createSection, postfix_operators=[], prefix_operators=[], qualifier=_tranLog, selectors=[], type_arguments=None), name=raSection)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=RecoverableUnitSection, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRecoveryId, postfix_operators=[], prefix_operators=[], qualifier=jcard, selectors=[], type_arguments=None)], member=longToBytes, postfix_operators=[], prefix_operators=[], qualifier=Util, selectors=[], type_arguments=None), name=longBytes)], modifiers={'final'}, type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getJCAXid, postfix_operators=[], prefix_operators=[], qualifier=_tran, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=XidImpl, sub_type=None)), name=xidBytes)], modifiers={'final'}, type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=xidBytes, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=longBytes, selectors=[]), operator=+)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=logBytes)], modifiers={'final'}, type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=longBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=logBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=longBytes, selectors=[])], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=xidBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=logBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=longBytes, selectors=[]), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=xidBytes, selectors=[])], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=logBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addData, postfix_operators=[], prefix_operators=[], qualifier=raSection, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Create sections in the Log for XID and TransactionState")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=GLOBALID_SECTION, postfix_operators=[], prefix_operators=[], qualifier=TransactionImpl, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=createSection, postfix_operators=[], prefix_operators=[], qualifier=_tranLog, selectors=[], type_arguments=None), name=gtidSection)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RecoverableUnitSection, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXidImpl, postfix_operators=[], prefix_operators=[], qualifier=_tran, selectors=[MethodInvocation(arguments=[], member=toBytes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=addData, postfix_operators=[], prefix_operators=[], qualifier=gtidSection, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_logSection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=TRAN_STATE_SECTION, postfix_operators=[], prefix_operators=[], qualifier=TransactionImpl, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=createSection, postfix_operators=[], prefix_operators=[], qualifier=_tranLog, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=byteData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addData, postfix_operators=[], prefix_operators=[], qualifier=_logSection, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.tx.jta.impl.TransactionState.setState"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="408"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isEntryEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="setState : CreateSection failed"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exit, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_logSection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_loggingFailed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, 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=SystemException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] else begin[{] None end[}] if[binary_operation[member[._logSection], !=, literal[null]]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.newState], ==, member[.STATE_COMMITTED]], ||, binary_operation[member[.newState], ==, member[.STATE_ROLLED_BACK]]], ||, binary_operation[member[.newState], ==, member[.STATE_ROLLING_BACK]]], ||, binary_operation[call[_tran.isSubordinate, parameter[]], &&, binary_operation[member[.newState], ==, member[.STATE_HEURISTIC_ON_ROLLBACK]]]]] begin[{] assign[member[.byteData], Cast(expression=MemberReference(member=_state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=byteData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addData, postfix_operators=[], prefix_operators=[], qualifier=_logSection, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.tx.jta.impl.TransactionState.setState"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="500"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=isEventEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="addData failed during setState!")], member=event, postfix_operators=[], prefix_operators=[], qualifier=Tr, 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) else begin[{] None end[}] TryStatement(block=[SwitchStatement(cases=[SwitchStatementCase(case=['STATE_PREPARED'], statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isSubordinate, postfix_operators=[], prefix_operators=[], qualifier=_tran, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=forceSections, postfix_operators=[], prefix_operators=[], qualifier=_tranLog, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['STATE_COMMITTING', 'STATE_ROLLING_BACK'], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=forceSections, postfix_operators=[], prefix_operators=[], qualifier=_tranLog, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['STATE_HEURISTIC_ON_COMMIT', 'STATE_HEURISTIC_ON_ROLLBACK'], statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isSubordinate, postfix_operators=[], prefix_operators=[], qualifier=_tran, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=forceSections, postfix_operators=[], prefix_operators=[], qualifier=_tranLog, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['STATE_COMMITTED', 'STATE_ROLLED_BACK'], statements=[BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['STATE_LAST_PARTICIPANT'], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=forceSections, postfix_operators=[], prefix_operators=[], qualifier=_tranLog, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=newState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.tx.jta.impl.TransactionState.setState"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="505"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=_partnerLogTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.Transaction.JTA.TransactionState.setState"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="506"), MemberReference(member=_partnerLogTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=LogFullException, sub_type=None), operator=instanceof), else_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WTRN0066_LOG_WRITE_ERROR"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None), label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="WTRN0083_LOG_FULL_ERROR"), MethodInvocation(arguments=[], member=getTranName, postfix_operators=[], prefix_operators=[], qualifier=_tran, selectors=[], type_arguments=None)], member=error, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=oldState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=STATE_PREPARING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_logSection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_loggingFailed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_state, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=oldState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isEntryEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="setState: Error writing log record"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exit, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, 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=SystemException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] if[call[tc.isDebugEnabled, parameter[]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[binary_operation[literal["TransactionState change FAILED from: "], +, call[.stateToString, parameter[member[._state]]]], +, literal[", to: "]], +, call[.stateToString, parameter[member[.newState]]]]]] else begin[{] None end[}] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["setState"]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SystemException, sub_type=None)), label=None) end[}] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["setState"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setState] operator[SEP] Keyword[int] identifier[newState] operator[SEP] Keyword[throws] identifier[SystemException] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , literal[String] operator[+] identifier[stateToString] operator[SEP] identifier[_state] operator[SEP] operator[+] literal[String] operator[+] identifier[stateToString] operator[SEP] identifier[newState] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[oldState] operator[=] identifier[_state] operator[SEP] Keyword[if] operator[SEP] identifier[validStateChange] operator[SEP] identifier[_state] operator[SEP] operator[SEP] identifier[newState] operator[SEP] operator[SEP] { identifier[_state] operator[=] identifier[newState] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[newState] operator[==] identifier[STATE_COMMITTING] operator[SEP] operator[||] operator[SEP] identifier[newState] operator[==] identifier[STATE_LAST_PARTICIPANT] operator[SEP] operator[||] operator[SEP] identifier[_tran] operator[SEP] identifier[isSubordinate] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[newState] operator[==] identifier[STATE_PREPARED] operator[||] identifier[newState] operator[==] identifier[STATE_HEURISTIC_ON_COMMIT] operator[||] identifier[newState] operator[==] identifier[STATE_HEURISTIC_ON_ROLLBACK] operator[SEP] operator[SEP] operator[SEP] { identifier[byteData] operator[SEP] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[_state] operator[SEP] Keyword[if] operator[SEP] identifier[_logSection] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[_logSection] operator[SEP] identifier[addData] operator[SEP] identifier[byteData] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[event] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[_loggingFailed] operator[SEP] { Keyword[try] { identifier[_tranLog] operator[=] identifier[_tran] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_tranLog] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_tran] operator[SEP] identifier[isRAImport] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[JCARecoveryData] identifier[jcard] operator[=] identifier[_tran] operator[SEP] identifier[getJCARecoveryData] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[event] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[jcard] operator[SEP] identifier[getWrapper] operator[SEP] operator[SEP] operator[SEP] identifier[getProviderId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jcard] operator[SEP] identifier[logRecoveryEntry] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[RecoverableUnitSection] identifier[raSection] operator[=] identifier[_tranLog] operator[SEP] identifier[createSection] operator[SEP] identifier[TransactionImpl] operator[SEP] identifier[RESOURCE_ADAPTER_SECTION] , literal[boolean] operator[SEP] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[longBytes] operator[=] identifier[Util] operator[SEP] identifier[longToBytes] operator[SEP] identifier[jcard] operator[SEP] identifier[getRecoveryId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[xidBytes] operator[=] operator[SEP] operator[SEP] identifier[XidImpl] operator[SEP] identifier[_tran] operator[SEP] identifier[getJCAXid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toBytes] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[logBytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[xidBytes] operator[SEP] identifier[length] operator[+] identifier[longBytes] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[longBytes] , Other[0] , identifier[logBytes] , Other[0] , identifier[longBytes] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[xidBytes] , Other[0] , identifier[logBytes] , identifier[longBytes] operator[SEP] identifier[length] , identifier[xidBytes] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[raSection] operator[SEP] identifier[addData] operator[SEP] identifier[logBytes] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[_tran] operator[SEP] identifier[isSubordinate] operator[SEP] operator[SEP] operator[SEP] { identifier[logSupOrRecCoord] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[event] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[RecoverableUnitSection] identifier[gtidSection] operator[=] identifier[_tranLog] operator[SEP] identifier[createSection] operator[SEP] identifier[TransactionImpl] operator[SEP] identifier[GLOBALID_SECTION] , literal[boolean] operator[SEP] operator[SEP] identifier[gtidSection] operator[SEP] identifier[addData] operator[SEP] identifier[_tran] operator[SEP] identifier[getXidImpl] operator[SEP] operator[SEP] operator[SEP] identifier[toBytes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[_logSection] operator[=] identifier[_tranLog] operator[SEP] identifier[createSection] operator[SEP] identifier[TransactionImpl] operator[SEP] identifier[TRAN_STATE_SECTION] , literal[boolean] operator[SEP] operator[SEP] identifier[_logSection] operator[SEP] identifier[addData] operator[SEP] identifier[byteData] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] identifier[_logSection] operator[=] Other[null] operator[SEP] identifier[_loggingFailed] operator[=] literal[boolean] operator[SEP] Keyword[throw] Keyword[new] identifier[SystemException] operator[SEP] identifier[e] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[_logSection] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[newState] operator[==] identifier[STATE_COMMITTED] operator[||] identifier[newState] operator[==] identifier[STATE_ROLLED_BACK] operator[||] identifier[newState] operator[==] identifier[STATE_ROLLING_BACK] operator[||] operator[SEP] identifier[_tran] operator[SEP] identifier[isSubordinate] operator[SEP] operator[SEP] operator[&&] identifier[newState] operator[==] identifier[STATE_HEURISTIC_ON_ROLLBACK] operator[SEP] operator[SEP] { identifier[byteData] operator[SEP] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[_state] operator[SEP] Keyword[try] { identifier[_logSection] operator[SEP] identifier[addData] operator[SEP] identifier[byteData] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[event] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } } Keyword[try] { Keyword[switch] operator[SEP] identifier[newState] operator[SEP] { Keyword[case] identifier[STATE_PREPARED] operator[:] Keyword[if] operator[SEP] identifier[_tran] operator[SEP] identifier[isSubordinate] operator[SEP] operator[SEP] operator[SEP] { identifier[_tranLog] operator[SEP] identifier[forceSections] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[STATE_COMMITTING] operator[:] Keyword[case] identifier[STATE_ROLLING_BACK] operator[:] identifier[_tranLog] operator[SEP] identifier[forceSections] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[STATE_HEURISTIC_ON_COMMIT] operator[:] Keyword[case] identifier[STATE_HEURISTIC_ON_ROLLBACK] operator[:] Keyword[if] operator[SEP] identifier[_tran] operator[SEP] identifier[isSubordinate] operator[SEP] operator[SEP] operator[SEP] { identifier[_tranLog] operator[SEP] identifier[forceSections] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[STATE_COMMITTED] operator[:] Keyword[case] identifier[STATE_ROLLED_BACK] operator[:] Keyword[break] operator[SEP] Keyword[case] identifier[STATE_LAST_PARTICIPANT] operator[:] identifier[_tranLog] operator[SEP] identifier[forceSections] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_partnerLogTable] operator[!=] Other[null] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , identifier[_partnerLogTable] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] Keyword[instanceof] identifier[LogFullException] operator[SEP] identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[_tran] operator[SEP] identifier[getTranName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[oldState] operator[==] identifier[STATE_PREPARING] operator[SEP] { identifier[_logSection] operator[=] Other[null] operator[SEP] identifier[_loggingFailed] operator[=] literal[boolean] operator[SEP] identifier[_state] operator[=] identifier[oldState] operator[SEP] } Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SystemException] operator[SEP] identifier[e] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { 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[+] identifier[stateToString] operator[SEP] identifier[_state] operator[SEP] operator[+] literal[String] operator[+] identifier[stateToString] operator[SEP] identifier[newState] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SystemException] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public boolean hasParents(final Class<?> group) { final Set<Class<?>> possibleParents = getParentsOfGroup(group); return possibleParents != null && !possibleParents.isEmpty(); }
class class_name[name] begin[{] method[hasParents, return_type[type[boolean]], modifier[public], parameter[group]] begin[{] local_variable[type[Set], possibleParents] return[binary_operation[binary_operation[member[.possibleParents], !=, literal[null]], &&, call[possibleParents.isEmpty, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[hasParents] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[group] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[possibleParents] operator[=] identifier[getParentsOfGroup] operator[SEP] identifier[group] operator[SEP] operator[SEP] Keyword[return] identifier[possibleParents] operator[!=] Other[null] operator[&&] operator[!] identifier[possibleParents] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] }
private void stopSpinning() { if (pool.spinningCount.decrementAndGet() == 0) for (SEPExecutor executor : pool.executors) executor.maybeSchedule(); prevStopCheck = soleSpinnerSpinTime = 0; }
class class_name[name] begin[{] method[stopSpinning, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[call[pool.spinningCount.decrementAndGet, parameter[]], ==, literal[0]]] begin[{] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[], member=maybeSchedule, postfix_operators=[], prefix_operators=[], qualifier=executor, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MemberReference(member=executors, postfix_operators=[], prefix_operators=[], qualifier=pool, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=executor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SEPExecutor, sub_type=None))), label=None) else begin[{] None end[}] assign[member[.prevStopCheck], assign[member[.soleSpinnerSpinTime], literal[0]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[stopSpinning] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[pool] operator[SEP] identifier[spinningCount] operator[SEP] identifier[decrementAndGet] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[SEPExecutor] identifier[executor] operator[:] identifier[pool] operator[SEP] identifier[executors] operator[SEP] identifier[executor] operator[SEP] identifier[maybeSchedule] operator[SEP] operator[SEP] operator[SEP] identifier[prevStopCheck] operator[=] identifier[soleSpinnerSpinTime] operator[=] Other[0] operator[SEP] }
public void commit(Xid xid, boolean onePhase) throws XAException { String command = "XA COMMIT " + xidToString(xid); if (onePhase) { command += " ONE PHASE"; } execute(command); }
class class_name[name] begin[{] method[commit, return_type[void], modifier[public], parameter[xid, onePhase]] begin[{] local_variable[type[String], command] if[member[.onePhase]] begin[{] assign[member[.command], literal[" ONE PHASE"]] else begin[{] None end[}] call[.execute, parameter[member[.command]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[commit] operator[SEP] identifier[Xid] identifier[xid] , Keyword[boolean] identifier[onePhase] operator[SEP] Keyword[throws] identifier[XAException] { identifier[String] identifier[command] operator[=] literal[String] operator[+] identifier[xidToString] operator[SEP] identifier[xid] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[onePhase] operator[SEP] { identifier[command] operator[+=] literal[String] operator[SEP] } identifier[execute] operator[SEP] identifier[command] operator[SEP] operator[SEP] }
public void overrideSetting(String name, double value) { overrides.put(name, Double.toString(value)); }
class class_name[name] begin[{] method[overrideSetting, return_type[void], modifier[public], parameter[name, value]] begin[{] call[overrides.put, parameter[member[.name], call[Double.toString, parameter[member[.value]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[overrideSetting] operator[SEP] identifier[String] identifier[name] , Keyword[double] identifier[value] operator[SEP] { identifier[overrides] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[Double] operator[SEP] identifier[toString] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] }
public void clearRequestSettings(int pathId, String clientUUID) throws Exception { this.setRequestEnabled(pathId, false, clientUUID); OverrideService.getInstance().disableAllOverrides(pathId, clientUUID, Constants.OVERRIDE_TYPE_REQUEST); EditService.getInstance().updateRepeatNumber(Constants.OVERRIDE_TYPE_REQUEST, pathId, clientUUID); }
class class_name[name] begin[{] method[clearRequestSettings, return_type[void], modifier[public], parameter[pathId, clientUUID]] begin[{] THIS[call[None.setRequestEnabled, parameter[member[.pathId], literal[false], member[.clientUUID]]]] call[OverrideService.getInstance, parameter[]] call[EditService.getInstance, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[clearRequestSettings] operator[SEP] Keyword[int] identifier[pathId] , identifier[String] identifier[clientUUID] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[this] operator[SEP] identifier[setRequestEnabled] operator[SEP] identifier[pathId] , literal[boolean] , identifier[clientUUID] operator[SEP] operator[SEP] identifier[OverrideService] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[disableAllOverrides] operator[SEP] identifier[pathId] , identifier[clientUUID] , identifier[Constants] operator[SEP] identifier[OVERRIDE_TYPE_REQUEST] operator[SEP] operator[SEP] identifier[EditService] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[updateRepeatNumber] operator[SEP] identifier[Constants] operator[SEP] identifier[OVERRIDE_TYPE_REQUEST] , identifier[pathId] , identifier[clientUUID] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") @Override public EList<IfcVirtualGridIntersection> getHasIntersections() { return (EList<IfcVirtualGridIntersection>) eGet(Ifc4Package.Literals.IFC_GRID_AXIS__HAS_INTERSECTIONS, true); }
class class_name[name] begin[{] method[getHasIntersections, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_GRID_AXIS__HAS_INTERSECTIONS, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package.Literals, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=eGet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IfcVirtualGridIntersection, sub_type=None))], dimensions=[], name=EList, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[IfcVirtualGridIntersection] operator[>] identifier[getHasIntersections] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] operator[<] identifier[IfcVirtualGridIntersection] operator[>] operator[SEP] identifier[eGet] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[Literals] operator[SEP] identifier[IFC_GRID_AXIS__HAS_INTERSECTIONS] , literal[boolean] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<ImageList>> getDetailsWithServiceResponseAsync(String listId) { if (this.client.baseUrl() == null) { throw new IllegalArgumentException("Parameter this.client.baseUrl() is required and cannot be null."); } if (listId == null) { throw new IllegalArgumentException("Parameter listId is required and cannot be null."); } String parameterizedHost = Joiner.on(", ").join("{baseUrl}", this.client.baseUrl()); return service.getDetails(listId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<ImageList>>>() { @Override public Observable<ServiceResponse<ImageList>> call(Response<ResponseBody> response) { try { ServiceResponse<ImageList> clientResponse = getDetailsDelegate(response); return Observable.just(clientResponse); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[getDetailsWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[listId]] begin[{] if[binary_operation[THIS[member[None.client]call[None.baseUrl, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.baseUrl() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.listId], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter listId is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], parameterizedHost] return[call[service.getDetails, parameter[member[.listId], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], member[.parameterizedHost], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[ImageList] operator[>] operator[>] identifier[getDetailsWithServiceResponseAsync] operator[SEP] identifier[String] identifier[listId] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[baseUrl] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[listId] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[parameterizedHost] operator[=] identifier[Joiner] operator[SEP] identifier[on] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[join] operator[SEP] literal[String] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[baseUrl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[service] operator[SEP] identifier[getDetails] operator[SEP] identifier[listId] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , identifier[parameterizedHost] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[ImageList] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[ImageList] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[ImageList] operator[>] identifier[clientResponse] operator[=] identifier[getDetailsDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] identifier[clientResponse] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
private MetricsAggregationBuilder getMetricsAggregation(Expression expression, EntityMetadata entityMetadata) { AggregateFunction function = (AggregateFunction) expression; MetamodelImpl metaModel = (MetamodelImpl) kunderaMetadata.getApplicationMetadata().getMetamodel( entityMetadata.getPersistenceUnit()); String jPAColumnName = KunderaCoreUtils.getJPAColumnName(function.toParsedText(), entityMetadata, metaModel); MetricsAggregationBuilder aggregationBuilder = null; switch (function.getIdentifier()) { case Expression.MIN: aggregationBuilder = AggregationBuilders.min(function.toParsedText()).field(jPAColumnName); break; case Expression.MAX: aggregationBuilder = AggregationBuilders.max(function.toParsedText()).field(jPAColumnName); break; case Expression.SUM: aggregationBuilder = AggregationBuilders.sum(function.toParsedText()).field(jPAColumnName); break; case Expression.AVG: aggregationBuilder = AggregationBuilders.avg(function.toParsedText()).field(jPAColumnName); break; case Expression.COUNT: aggregationBuilder = AggregationBuilders.count(function.toParsedText()).field(jPAColumnName); break; } return aggregationBuilder; }
class class_name[name] begin[{] method[getMetricsAggregation, return_type[type[MetricsAggregationBuilder]], modifier[private], parameter[expression, entityMetadata]] begin[{] local_variable[type[AggregateFunction], function] local_variable[type[MetamodelImpl], metaModel] local_variable[type[String], jPAColumnName] local_variable[type[MetricsAggregationBuilder], aggregationBuilder] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=MIN, postfix_operators=[], prefix_operators=[], qualifier=Expression, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=aggregationBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toParsedText, postfix_operators=[], prefix_operators=[], qualifier=function, selectors=[], type_arguments=None)], member=min, postfix_operators=[], prefix_operators=[], qualifier=AggregationBuilders, selectors=[MethodInvocation(arguments=[MemberReference(member=jPAColumnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=field, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=MAX, postfix_operators=[], prefix_operators=[], qualifier=Expression, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=aggregationBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toParsedText, postfix_operators=[], prefix_operators=[], qualifier=function, selectors=[], type_arguments=None)], member=max, postfix_operators=[], prefix_operators=[], qualifier=AggregationBuilders, selectors=[MethodInvocation(arguments=[MemberReference(member=jPAColumnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=field, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SUM, postfix_operators=[], prefix_operators=[], qualifier=Expression, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=aggregationBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toParsedText, postfix_operators=[], prefix_operators=[], qualifier=function, selectors=[], type_arguments=None)], member=sum, postfix_operators=[], prefix_operators=[], qualifier=AggregationBuilders, selectors=[MethodInvocation(arguments=[MemberReference(member=jPAColumnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=field, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=AVG, postfix_operators=[], prefix_operators=[], qualifier=Expression, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=aggregationBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toParsedText, postfix_operators=[], prefix_operators=[], qualifier=function, selectors=[], type_arguments=None)], member=avg, postfix_operators=[], prefix_operators=[], qualifier=AggregationBuilders, selectors=[MethodInvocation(arguments=[MemberReference(member=jPAColumnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=field, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=COUNT, postfix_operators=[], prefix_operators=[], qualifier=Expression, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=aggregationBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toParsedText, postfix_operators=[], prefix_operators=[], qualifier=function, selectors=[], type_arguments=None)], member=count, postfix_operators=[], prefix_operators=[], qualifier=AggregationBuilders, selectors=[MethodInvocation(arguments=[MemberReference(member=jPAColumnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=field, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=function, selectors=[], type_arguments=None), label=None) return[member[.aggregationBuilder]] end[}] END[}]
Keyword[private] identifier[MetricsAggregationBuilder] identifier[getMetricsAggregation] operator[SEP] identifier[Expression] identifier[expression] , identifier[EntityMetadata] identifier[entityMetadata] operator[SEP] { identifier[AggregateFunction] identifier[function] operator[=] operator[SEP] identifier[AggregateFunction] operator[SEP] identifier[expression] operator[SEP] identifier[MetamodelImpl] identifier[metaModel] operator[=] operator[SEP] identifier[MetamodelImpl] operator[SEP] identifier[kunderaMetadata] operator[SEP] identifier[getApplicationMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getMetamodel] operator[SEP] identifier[entityMetadata] operator[SEP] identifier[getPersistenceUnit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[jPAColumnName] operator[=] identifier[KunderaCoreUtils] operator[SEP] identifier[getJPAColumnName] operator[SEP] identifier[function] operator[SEP] identifier[toParsedText] operator[SEP] operator[SEP] , identifier[entityMetadata] , identifier[metaModel] operator[SEP] operator[SEP] identifier[MetricsAggregationBuilder] identifier[aggregationBuilder] operator[=] Other[null] operator[SEP] Keyword[switch] operator[SEP] identifier[function] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[Expression] operator[SEP] identifier[MIN] operator[:] identifier[aggregationBuilder] operator[=] identifier[AggregationBuilders] operator[SEP] identifier[min] operator[SEP] identifier[function] operator[SEP] identifier[toParsedText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[jPAColumnName] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Expression] operator[SEP] identifier[MAX] operator[:] identifier[aggregationBuilder] operator[=] identifier[AggregationBuilders] operator[SEP] identifier[max] operator[SEP] identifier[function] operator[SEP] identifier[toParsedText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[jPAColumnName] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Expression] operator[SEP] identifier[SUM] operator[:] identifier[aggregationBuilder] operator[=] identifier[AggregationBuilders] operator[SEP] identifier[sum] operator[SEP] identifier[function] operator[SEP] identifier[toParsedText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[jPAColumnName] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Expression] operator[SEP] identifier[AVG] operator[:] identifier[aggregationBuilder] operator[=] identifier[AggregationBuilders] operator[SEP] identifier[avg] operator[SEP] identifier[function] operator[SEP] identifier[toParsedText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[jPAColumnName] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Expression] operator[SEP] identifier[COUNT] operator[:] identifier[aggregationBuilder] operator[=] identifier[AggregationBuilders] operator[SEP] identifier[count] operator[SEP] identifier[function] operator[SEP] identifier[toParsedText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[jPAColumnName] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[return] identifier[aggregationBuilder] operator[SEP] }
private DNode findFrontendNode() { DNode frontend = getNode(requirements.getFrontend()); if (frontend == DNode.NOT_FOUND) { frontend = searchFrontendNode(); if (frontend == DNode.NOT_FOUND) { frontend = calculateSourceNode(); } } return frontend; }
class class_name[name] begin[{] method[findFrontendNode, return_type[type[DNode]], modifier[private], parameter[]] begin[{] local_variable[type[DNode], frontend] if[binary_operation[member[.frontend], ==, member[DNode.NOT_FOUND]]] begin[{] assign[member[.frontend], call[.searchFrontendNode, parameter[]]] if[binary_operation[member[.frontend], ==, member[DNode.NOT_FOUND]]] begin[{] assign[member[.frontend], call[.calculateSourceNode, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.frontend]] end[}] END[}]
Keyword[private] identifier[DNode] identifier[findFrontendNode] operator[SEP] operator[SEP] { identifier[DNode] identifier[frontend] operator[=] identifier[getNode] operator[SEP] identifier[requirements] operator[SEP] identifier[getFrontend] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[frontend] operator[==] identifier[DNode] operator[SEP] identifier[NOT_FOUND] operator[SEP] { identifier[frontend] operator[=] identifier[searchFrontendNode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[frontend] operator[==] identifier[DNode] operator[SEP] identifier[NOT_FOUND] operator[SEP] { identifier[frontend] operator[=] identifier[calculateSourceNode] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[frontend] operator[SEP] }
public static boolean contains(ByteBuffer buf, int position, final short i) { final int x = toIntUnsigned(i); return (buf.getLong(x / 64 * 8 + position) & (1L << x)) != 0; }
class class_name[name] begin[{] method[contains, return_type[type[boolean]], modifier[public static], parameter[buf, position, i]] begin[{] local_variable[type[int], x] return[binary_operation[binary_operation[call[buf.getLong, parameter[binary_operation[binary_operation[binary_operation[member[.x], /, literal[64]], *, literal[8]], +, member[.position]]]], &, binary_operation[literal[1L], <<, member[.x]]], !=, literal[0]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[contains] operator[SEP] identifier[ByteBuffer] identifier[buf] , Keyword[int] identifier[position] , Keyword[final] Keyword[short] identifier[i] operator[SEP] { Keyword[final] Keyword[int] identifier[x] operator[=] identifier[toIntUnsigned] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[buf] operator[SEP] identifier[getLong] operator[SEP] identifier[x] operator[/] Other[64] operator[*] Other[8] operator[+] identifier[position] operator[SEP] operator[&] operator[SEP] Other[1L] operator[<<] identifier[x] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] }