code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Override public void write (int b) throws IOException { out.write(b); md5.Update((byte) b); }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[b]] begin[{] call[out.write, parameter[member[.b]]] call[md5.Update, parameter[Cast(expression=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[int] identifier[b] operator[SEP] Keyword[throws] identifier[IOException] { identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[md5] operator[SEP] identifier[Update] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] identifier[b] operator[SEP] operator[SEP] }
public static String format36time(long time) { String time36 = Long.toString(time, 36); return time36.length() < 9 ? ("0" + time36) : time36; }
class class_name[name] begin[{] method[format36time, return_type[type[String]], modifier[public static], parameter[time]] begin[{] local_variable[type[String], time36] return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=time36, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9), operator=<), if_false=MemberReference(member=time36, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0"), operandr=MemberReference(member=time36, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[format36time] operator[SEP] Keyword[long] identifier[time] operator[SEP] { identifier[String] identifier[time36] operator[=] identifier[Long] operator[SEP] identifier[toString] operator[SEP] identifier[time] , Other[36] operator[SEP] operator[SEP] Keyword[return] identifier[time36] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] Other[9] operator[?] operator[SEP] literal[String] operator[+] identifier[time36] operator[SEP] operator[:] identifier[time36] operator[SEP] }
public static void checkProxyPackageAccess(Class<?> clazz) { SecurityManager s = System.getSecurityManager(); if (s != null) { // check proxy interfaces if the given class is a proxy class if (Proxy.isProxyClass(clazz)) { for (Class<?> intf : clazz.getInterfaces()) { checkPackageAccess(intf); } } } }
class class_name[name] begin[{] method[checkProxyPackageAccess, return_type[void], modifier[public static], parameter[clazz]] begin[{] local_variable[type[SecurityManager], s] if[binary_operation[member[.s], !=, literal[null]]] begin[{] if[call[Proxy.isProxyClass, parameter[member[.clazz]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=intf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkPackageAccess, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getInterfaces, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=intf)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None) else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[checkProxyPackageAccess] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] { identifier[SecurityManager] identifier[s] operator[=] identifier[System] operator[SEP] identifier[getSecurityManager] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[Proxy] operator[SEP] identifier[isProxyClass] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[intf] operator[:] identifier[clazz] operator[SEP] identifier[getInterfaces] operator[SEP] operator[SEP] operator[SEP] { identifier[checkPackageAccess] operator[SEP] identifier[intf] operator[SEP] operator[SEP] } } } }
public @NotNull ListAssert contains(@Nullable Object o, @NotNull Index index) { checkNotNull(index); isNotNull().isNotEmpty(); int indexValue = index.value(); int listSize = actualGroupSize(); if (indexValue < 0 || indexValue >= listSize) { failIndexOutOfBounds(indexValue); } Object actualElement = actual.get(indexValue); if (!areEqual(actualElement, o)) { failElementNotFound(o, actualElement, indexValue); } return this; }
class class_name[name] begin[{] method[contains, return_type[type[ListAssert]], modifier[public], parameter[o, index]] begin[{] call[.checkNotNull, parameter[member[.index]]] call[.isNotNull, parameter[]] local_variable[type[int], indexValue] local_variable[type[int], listSize] if[binary_operation[binary_operation[member[.indexValue], <, literal[0]], ||, binary_operation[member[.indexValue], >=, member[.listSize]]]] begin[{] call[.failIndexOutOfBounds, parameter[member[.indexValue]]] else begin[{] None end[}] local_variable[type[Object], actualElement] if[call[.areEqual, parameter[member[.actualElement], member[.o]]]] begin[{] call[.failElementNotFound, parameter[member[.o], member[.actualElement], member[.indexValue]]] else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] annotation[@] identifier[NotNull] identifier[ListAssert] identifier[contains] operator[SEP] annotation[@] identifier[Nullable] identifier[Object] identifier[o] , annotation[@] identifier[NotNull] identifier[Index] identifier[index] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[index] operator[SEP] operator[SEP] identifier[isNotNull] operator[SEP] operator[SEP] operator[SEP] identifier[isNotEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[indexValue] operator[=] identifier[index] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[listSize] operator[=] identifier[actualGroupSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[indexValue] operator[<] Other[0] operator[||] identifier[indexValue] operator[>=] identifier[listSize] operator[SEP] { identifier[failIndexOutOfBounds] operator[SEP] identifier[indexValue] operator[SEP] operator[SEP] } identifier[Object] identifier[actualElement] operator[=] identifier[actual] operator[SEP] identifier[get] operator[SEP] identifier[indexValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[areEqual] operator[SEP] identifier[actualElement] , identifier[o] operator[SEP] operator[SEP] { identifier[failElementNotFound] operator[SEP] identifier[o] , identifier[actualElement] , identifier[indexValue] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
@SuppressWarnings({"rawtypes", "unchecked"}) public static Kryo getKryo(Map conf) { IKryoFactory kryoFactory = (IKryoFactory) Utils.newInstance((String) conf.get(Config.TOPOLOGY_KRYO_FACTORY)); Kryo k = kryoFactory.getKryo(conf); k.register(byte[].class); k.register(ListDelegate.class); k.register(ArrayList.class, new ArrayListSerializer()); k.register(HashMap.class, new HashMapSerializer()); k.register(HashSet.class, new HashSetSerializer()); k.register(BigInteger.class, new BigIntegerSerializer()); // k.register(TransactionAttempt.class); k.register(Values.class); // k.register(backtype.storm.metric.api.IMetricsConsumer.DataPoint.class); // k.register(backtype.storm.metric.api.IMetricsConsumer.TaskInfo.class); /* try { JavaBridge.registerPrimitives(k); JavaBridge.registerCollections(k); } catch(Exception e) { throw new RuntimeException(e); } */ Map<String, String> registrations = normalizeKryoRegister(conf); kryoFactory.preRegister(k, conf); boolean skipMissing = (Boolean) conf.get(Config.TOPOLOGY_SKIP_MISSING_KRYO_REGISTRATIONS); for (String klassName : registrations.keySet()) { String serializerClassName = registrations.get(klassName); try { Class klass = Class.forName(klassName); Class serializerClass = null; if (serializerClassName != null) { serializerClass = Class.forName(serializerClassName); } LOG.info("Doing kryo.register for class " + klass); if (serializerClass == null) { k.register(klass); } else { k.register(klass, resolveSerializerInstance(k, klass, serializerClass)); } } catch (ClassNotFoundException e) { if (skipMissing) { LOG.info("Could not find serialization or class for " + serializerClassName + ". Skipping registration..."); } else { throw new RuntimeException(e); } } } kryoFactory.postRegister(k, conf); if (conf.get(Config.TOPOLOGY_KRYO_DECORATORS) != null) { for (String klassName : (List<String>) conf.get(Config.TOPOLOGY_KRYO_DECORATORS)) { try { Class klass = Class.forName(klassName); IKryoDecorator decorator = (IKryoDecorator) klass.newInstance(); decorator.decorate(k); } catch (ClassNotFoundException e) { if (skipMissing) { LOG.info("Could not find kryo decorator named " + klassName + ". Skipping registration..."); } else { throw new RuntimeException(e); } } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } } kryoFactory.postDecorate(k, conf); return k; }
class class_name[name] begin[{] method[getKryo, return_type[type[Kryo]], modifier[public static], parameter[conf]] begin[{] local_variable[type[IKryoFactory], kryoFactory] local_variable[type[Kryo], k] call[k.register, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[None], name=byte))]] call[k.register, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ListDelegate, sub_type=None))]] call[k.register, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArrayList, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArrayListSerializer, sub_type=None))]] call[k.register, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HashMap, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HashMapSerializer, sub_type=None))]] call[k.register, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HashSet, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HashSetSerializer, sub_type=None))]] call[k.register, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigInteger, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigIntegerSerializer, sub_type=None))]] call[k.register, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Values, sub_type=None))]] local_variable[type[Map], registrations] call[kryoFactory.preRegister, parameter[member[.k], member[.conf]]] local_variable[type[boolean], skipMissing] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=klassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=registrations, selectors=[], type_arguments=None), name=serializerClassName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=klassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=klass)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=serializerClass)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serializerClassName, 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=serializerClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=serializerClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Doing kryo.register for class "), operandr=MemberReference(member=klass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=serializerClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=klass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=klass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=serializerClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveSerializerInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=register, postfix_operators=[], prefix_operators=[], qualifier=k, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=klass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=register, postfix_operators=[], prefix_operators=[], qualifier=k, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[IfStatement(condition=MemberReference(member=skipMissing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not find serialization or class for "), operandr=MemberReference(member=serializerClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". Skipping registration..."), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=registrations, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=klassName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[kryoFactory.postRegister, parameter[member[.k], member[.conf]]] if[binary_operation[call[conf.get, parameter[member[Config.TOPOLOGY_KRYO_DECORATORS]]], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=klassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=klass)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=klass, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=IKryoDecorator, sub_type=None)), name=decorator)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IKryoDecorator, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decorate, postfix_operators=[], prefix_operators=[], qualifier=decorator, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MemberReference(member=skipMissing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not find kryo decorator named "), operandr=MemberReference(member=klassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". Skipping registration..."), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstantiationException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=Cast(expression=MethodInvocation(arguments=[MemberReference(member=TOPOLOGY_KRYO_DECORATORS, postfix_operators=[], prefix_operators=[], qualifier=Config, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=conf, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=klassName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] call[kryoFactory.postDecorate, parameter[member[.k], member[.conf]]] return[member[.k]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[public] Keyword[static] identifier[Kryo] identifier[getKryo] operator[SEP] identifier[Map] identifier[conf] operator[SEP] { identifier[IKryoFactory] identifier[kryoFactory] operator[=] operator[SEP] identifier[IKryoFactory] operator[SEP] identifier[Utils] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[conf] operator[SEP] identifier[get] operator[SEP] identifier[Config] operator[SEP] identifier[TOPOLOGY_KRYO_FACTORY] operator[SEP] operator[SEP] operator[SEP] identifier[Kryo] identifier[k] operator[=] identifier[kryoFactory] operator[SEP] identifier[getKryo] operator[SEP] identifier[conf] operator[SEP] operator[SEP] identifier[k] operator[SEP] identifier[register] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[k] operator[SEP] identifier[register] operator[SEP] identifier[ListDelegate] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[k] operator[SEP] identifier[register] operator[SEP] identifier[ArrayList] operator[SEP] Keyword[class] , Keyword[new] identifier[ArrayListSerializer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[k] operator[SEP] identifier[register] operator[SEP] identifier[HashMap] operator[SEP] Keyword[class] , Keyword[new] identifier[HashMapSerializer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[k] operator[SEP] identifier[register] operator[SEP] identifier[HashSet] operator[SEP] Keyword[class] , Keyword[new] identifier[HashSetSerializer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[k] operator[SEP] identifier[register] operator[SEP] identifier[BigInteger] operator[SEP] Keyword[class] , Keyword[new] identifier[BigIntegerSerializer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[k] operator[SEP] identifier[register] operator[SEP] identifier[Values] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[registrations] operator[=] identifier[normalizeKryoRegister] operator[SEP] identifier[conf] operator[SEP] operator[SEP] identifier[kryoFactory] operator[SEP] identifier[preRegister] operator[SEP] identifier[k] , identifier[conf] operator[SEP] operator[SEP] Keyword[boolean] identifier[skipMissing] operator[=] operator[SEP] identifier[Boolean] operator[SEP] identifier[conf] operator[SEP] identifier[get] operator[SEP] identifier[Config] operator[SEP] identifier[TOPOLOGY_SKIP_MISSING_KRYO_REGISTRATIONS] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[klassName] operator[:] identifier[registrations] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[serializerClassName] operator[=] identifier[registrations] operator[SEP] identifier[get] operator[SEP] identifier[klassName] operator[SEP] operator[SEP] Keyword[try] { identifier[Class] identifier[klass] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[klassName] operator[SEP] operator[SEP] identifier[Class] identifier[serializerClass] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[serializerClassName] operator[!=] Other[null] operator[SEP] { identifier[serializerClass] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[serializerClassName] operator[SEP] operator[SEP] } identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[klass] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serializerClass] operator[==] Other[null] operator[SEP] { identifier[k] operator[SEP] identifier[register] operator[SEP] identifier[klass] operator[SEP] operator[SEP] } Keyword[else] { identifier[k] operator[SEP] identifier[register] operator[SEP] identifier[klass] , identifier[resolveSerializerInstance] operator[SEP] identifier[k] , identifier[klass] , identifier[serializerClass] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[skipMissing] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[serializerClassName] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } } identifier[kryoFactory] operator[SEP] identifier[postRegister] operator[SEP] identifier[k] , identifier[conf] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[conf] operator[SEP] identifier[get] operator[SEP] identifier[Config] operator[SEP] identifier[TOPOLOGY_KRYO_DECORATORS] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[klassName] operator[:] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] operator[SEP] identifier[conf] operator[SEP] identifier[get] operator[SEP] identifier[Config] operator[SEP] identifier[TOPOLOGY_KRYO_DECORATORS] operator[SEP] operator[SEP] { Keyword[try] { identifier[Class] identifier[klass] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[klassName] operator[SEP] operator[SEP] identifier[IKryoDecorator] identifier[decorator] operator[=] operator[SEP] identifier[IKryoDecorator] operator[SEP] identifier[klass] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[decorator] operator[SEP] identifier[decorate] operator[SEP] identifier[k] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[skipMissing] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[klassName] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[InstantiationException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } } identifier[kryoFactory] operator[SEP] identifier[postDecorate] operator[SEP] identifier[k] , identifier[conf] operator[SEP] operator[SEP] Keyword[return] identifier[k] operator[SEP] }
public static boolean isNetworkUri(@Nullable Uri uri) { final String scheme = getSchemeOrNull(uri); return HTTPS_SCHEME.equals(scheme) || HTTP_SCHEME.equals(scheme); }
class class_name[name] begin[{] method[isNetworkUri, return_type[type[boolean]], modifier[public static], parameter[uri]] begin[{] local_variable[type[String], scheme] return[binary_operation[call[HTTPS_SCHEME.equals, parameter[member[.scheme]]], ||, call[HTTP_SCHEME.equals, parameter[member[.scheme]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isNetworkUri] operator[SEP] annotation[@] identifier[Nullable] identifier[Uri] identifier[uri] operator[SEP] { Keyword[final] identifier[String] identifier[scheme] operator[=] identifier[getSchemeOrNull] operator[SEP] identifier[uri] operator[SEP] operator[SEP] Keyword[return] identifier[HTTPS_SCHEME] operator[SEP] identifier[equals] operator[SEP] identifier[scheme] operator[SEP] operator[||] identifier[HTTP_SCHEME] operator[SEP] identifier[equals] operator[SEP] identifier[scheme] operator[SEP] operator[SEP] }
public JcNumber exp() { JcNumber ret = new JcNumber(null, this.argument, new FunctionInstance(FUNCTION.Math.EXP, 1)); QueryRecorder.recordInvocationConditional(this, "exp", ret); return ret; }
class class_name[name] begin[{] method[exp, return_type[type[JcNumber]], modifier[public], parameter[]] begin[{] local_variable[type[JcNumber], ret] call[QueryRecorder.recordInvocationConditional, parameter[THIS[], literal["exp"], member[.ret]]] return[member[.ret]] end[}] END[}]
Keyword[public] identifier[JcNumber] identifier[exp] operator[SEP] operator[SEP] { identifier[JcNumber] identifier[ret] operator[=] Keyword[new] identifier[JcNumber] operator[SEP] Other[null] , Keyword[this] operator[SEP] identifier[argument] , Keyword[new] identifier[FunctionInstance] operator[SEP] identifier[FUNCTION] operator[SEP] identifier[Math] operator[SEP] identifier[EXP] , Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[QueryRecorder] operator[SEP] identifier[recordInvocationConditional] operator[SEP] Keyword[this] , literal[String] , identifier[ret] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
public Map<String,Object> getProperties() { Map<String,Object> properties = new Hashtable<String,Object>(); ParamDispatcher params = this; for (Enumeration<String> e = params.keys() ; e.hasMoreElements() ;) { String strKey = e.nextElement(); String strValue = params.get(strKey).toString(); properties.put(strKey, strValue); } return properties; }
class class_name[name] begin[{] method[getProperties, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[Map], properties] local_variable[type[ParamDispatcher], params] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nextElement, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), name=strKey)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=strKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=strValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=strKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=strValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasMoreElements, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=keys, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[], type_arguments=None), name=e)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Enumeration, sub_type=None)), update=None), label=None) return[member[.properties]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getProperties] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[properties] operator[=] Keyword[new] identifier[Hashtable] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ParamDispatcher] identifier[params] operator[=] Keyword[this] operator[SEP] Keyword[for] operator[SEP] identifier[Enumeration] operator[<] identifier[String] operator[>] identifier[e] operator[=] identifier[params] operator[SEP] identifier[keys] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[strKey] operator[=] identifier[e] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[strValue] operator[=] identifier[params] operator[SEP] identifier[get] operator[SEP] identifier[strKey] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[strKey] , identifier[strValue] operator[SEP] operator[SEP] } Keyword[return] identifier[properties] operator[SEP] }
@DoesServiceRequest public Iterable<ListFileItem> listFilesAndDirectories(FileRequestOptions options, OperationContext opContext) { return listFilesAndDirectories(null /* prefix */, options, opContext); }
class class_name[name] begin[{] method[listFilesAndDirectories, return_type[type[Iterable]], modifier[public], parameter[options, opContext]] begin[{] return[call[.listFilesAndDirectories, parameter[literal[null], member[.options], member[.opContext]]]] end[}] END[}]
annotation[@] identifier[DoesServiceRequest] Keyword[public] identifier[Iterable] operator[<] identifier[ListFileItem] operator[>] identifier[listFilesAndDirectories] operator[SEP] identifier[FileRequestOptions] identifier[options] , identifier[OperationContext] identifier[opContext] operator[SEP] { Keyword[return] identifier[listFilesAndDirectories] operator[SEP] Other[null] , identifier[options] , identifier[opContext] operator[SEP] operator[SEP] }
public static String generateRandomPassword(final CharacterTypes characterTypes, final int length) { final StringBuffer buffer = new StringBuffer(); String characters = ""; switch (characterTypes) { case ALPHA: characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; break; case ALPHANUMERIC: characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; break; case ALPHANUMERICSYMBOL: characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()"; break; case NUMERIC: characters = "1234567890"; break; } final int charactersLength = characters.length(); final SecureRandom rnd = new SecureRandom(); for (int i = 0; i < length; i++) { final double index = rnd.nextInt(charactersLength); buffer.append(characters.charAt((int) index)); } return buffer.toString(); }
class class_name[name] begin[{] method[generateRandomPassword, return_type[type[String]], modifier[public static], parameter[characterTypes, length]] begin[{] local_variable[type[StringBuffer], buffer] local_variable[type[String], characters] SwitchStatement(cases=[SwitchStatementCase(case=['ALPHA'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=characters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['ALPHANUMERIC'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=characters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['ALPHANUMERICSYMBOL'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=characters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()")), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NUMERIC'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=characters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1234567890")), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=characterTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) local_variable[type[int], charactersLength] local_variable[type[SecureRandom], rnd] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=charactersLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=nextInt, postfix_operators=[], prefix_operators=[], qualifier=rnd, selectors=[], type_arguments=None), name=index)], modifiers={'final'}, type=BasicType(dimensions=[], name=double)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=characters, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=buffer, 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=, 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[buffer.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[generateRandomPassword] operator[SEP] Keyword[final] identifier[CharacterTypes] identifier[characterTypes] , Keyword[final] Keyword[int] identifier[length] operator[SEP] { Keyword[final] identifier[StringBuffer] identifier[buffer] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[characters] operator[=] literal[String] operator[SEP] Keyword[switch] operator[SEP] identifier[characterTypes] operator[SEP] { Keyword[case] identifier[ALPHA] operator[:] identifier[characters] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[ALPHANUMERIC] operator[:] identifier[characters] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[ALPHANUMERICSYMBOL] operator[:] identifier[characters] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[NUMERIC] operator[:] identifier[characters] operator[=] literal[String] operator[SEP] Keyword[break] operator[SEP] } Keyword[final] Keyword[int] identifier[charactersLength] operator[=] identifier[characters] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[SecureRandom] identifier[rnd] operator[=] Keyword[new] identifier[SecureRandom] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[double] identifier[index] operator[=] identifier[rnd] operator[SEP] identifier[nextInt] operator[SEP] identifier[charactersLength] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[append] operator[SEP] identifier[characters] operator[SEP] identifier[charAt] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[buffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void monitorEnter(Local<?> monitor) { addInstruction(new ThrowingInsn(Rops.MONITOR_ENTER, sourcePosition, RegisterSpecList.make(monitor.spec()), catches)); }
class class_name[name] begin[{] method[monitorEnter, return_type[void], modifier[public], parameter[monitor]] begin[{] call[.addInstruction, parameter[ClassCreator(arguments=[MemberReference(member=MONITOR_ENTER, postfix_operators=[], prefix_operators=[], qualifier=Rops, selectors=[]), MemberReference(member=sourcePosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=spec, postfix_operators=[], prefix_operators=[], qualifier=monitor, selectors=[], type_arguments=None)], member=make, postfix_operators=[], prefix_operators=[], qualifier=RegisterSpecList, selectors=[], type_arguments=None), MemberReference(member=catches, 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=ThrowingInsn, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[monitorEnter] operator[SEP] identifier[Local] operator[<] operator[?] operator[>] identifier[monitor] operator[SEP] { identifier[addInstruction] operator[SEP] Keyword[new] identifier[ThrowingInsn] operator[SEP] identifier[Rops] operator[SEP] identifier[MONITOR_ENTER] , identifier[sourcePosition] , identifier[RegisterSpecList] operator[SEP] identifier[make] operator[SEP] identifier[monitor] operator[SEP] identifier[spec] operator[SEP] operator[SEP] operator[SEP] , identifier[catches] operator[SEP] operator[SEP] operator[SEP] }
public TrmClientAttachRequest createNewTrmClientAttachRequest() throws MessageCreateFailedException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createNewTrmClientAttachRequest"); TrmClientAttachRequest msg = null; try { msg = new TrmClientAttachRequestImpl(); } catch (MessageDecodeFailedException e) { /* No need to FFDC this as JsMsgObject will already have done so */ // No FFDC code needed throw new MessageCreateFailedException(e); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createNewTrmClientAttachRequest"); return msg; }
class class_name[name] begin[{] method[createNewTrmClientAttachRequest, return_type[type[TrmClientAttachRequest]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["createNewTrmClientAttachRequest"]]] else begin[{] None end[}] local_variable[type[TrmClientAttachRequest], msg] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TrmClientAttachRequestImpl, sub_type=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=MessageCreateFailedException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MessageDecodeFailedException']))], finally_block=None, label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["createNewTrmClientAttachRequest"]]] else begin[{] None end[}] return[member[.msg]] end[}] END[}]
Keyword[public] identifier[TrmClientAttachRequest] identifier[createNewTrmClientAttachRequest] operator[SEP] operator[SEP] Keyword[throws] identifier[MessageCreateFailedException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[TrmClientAttachRequest] identifier[msg] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[msg] operator[=] Keyword[new] identifier[TrmClientAttachRequestImpl] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MessageDecodeFailedException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[MessageCreateFailedException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[msg] operator[SEP] }
public List<I_CmsWorkplaceAppConfiguration> getDefaultQuickLaunchConfigurations() { if (m_standardQuickLaunchApps == null) { m_standardQuickLaunchApps = Collections.unmodifiableList(getAppConfigurations(STANDARD_APPS)); } return m_standardQuickLaunchApps; }
class class_name[name] begin[{] method[getDefaultQuickLaunchConfigurations, return_type[type[List]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.m_standardQuickLaunchApps], ==, literal[null]]] begin[{] assign[member[.m_standardQuickLaunchApps], call[Collections.unmodifiableList, parameter[call[.getAppConfigurations, parameter[member[.STANDARD_APPS]]]]]] else begin[{] None end[}] return[member[.m_standardQuickLaunchApps]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[I_CmsWorkplaceAppConfiguration] operator[>] identifier[getDefaultQuickLaunchConfigurations] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m_standardQuickLaunchApps] operator[==] Other[null] operator[SEP] { identifier[m_standardQuickLaunchApps] operator[=] identifier[Collections] operator[SEP] identifier[unmodifiableList] operator[SEP] identifier[getAppConfigurations] operator[SEP] identifier[STANDARD_APPS] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[m_standardQuickLaunchApps] operator[SEP] }
public void clear() { synchronized (extensions) { // we synchronize just to guard unnamedMerged transformerRegistry = TransformerRegistry.Factory.create(); extensions.clear(); reverseMap.clear(); subsystemsInfo.clear(); } }
class class_name[name] begin[{] method[clear, return_type[void], modifier[public], parameter[]] begin[{] SYNCHRONIZED[member[.extensions]] BEGIN[{] assign[member[.transformerRegistry], call[TransformerRegistry.Factory.create, parameter[]]] call[extensions.clear, parameter[]] call[reverseMap.clear, parameter[]] call[subsystemsInfo.clear, parameter[]] END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[clear] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[extensions] operator[SEP] { identifier[transformerRegistry] operator[=] identifier[TransformerRegistry] operator[SEP] identifier[Factory] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] identifier[extensions] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[reverseMap] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[subsystemsInfo] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } }
public void log(String message, Level level) { log(null, null, message, level); }
class class_name[name] begin[{] method[log, return_type[void], modifier[public], parameter[message, level]] begin[{] call[.log, parameter[literal[null], literal[null], member[.message], member[.level]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[log] operator[SEP] identifier[String] identifier[message] , identifier[Level] identifier[level] operator[SEP] { identifier[log] operator[SEP] Other[null] , Other[null] , identifier[message] , identifier[level] operator[SEP] operator[SEP] }
public static int getTransparency(Transparency transparency) { Check.notNull(transparency); final int value; if (Transparency.OPAQUE == transparency) { value = java.awt.Transparency.OPAQUE; } else if (Transparency.BITMASK == transparency) { value = java.awt.Transparency.BITMASK; } else if (Transparency.TRANSLUCENT == transparency) { value = java.awt.Transparency.TRANSLUCENT; } else { throw new LionEngineException(transparency); } return value; }
class class_name[name] begin[{] method[getTransparency, return_type[type[int]], modifier[public static], parameter[transparency]] begin[{] call[Check.notNull, parameter[member[.transparency]]] local_variable[type[int], value] if[binary_operation[member[Transparency.OPAQUE], ==, member[.transparency]]] begin[{] assign[member[.value], member[java.awt.Transparency.OPAQUE]] else begin[{] if[binary_operation[member[Transparency.BITMASK], ==, member[.transparency]]] begin[{] assign[member[.value], member[java.awt.Transparency.BITMASK]] else begin[{] if[binary_operation[member[Transparency.TRANSLUCENT], ==, member[.transparency]]] begin[{] assign[member[.value], member[java.awt.Transparency.TRANSLUCENT]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=transparency, 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=LionEngineException, sub_type=None)), label=None) end[}] end[}] end[}] return[member[.value]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[getTransparency] operator[SEP] identifier[Transparency] identifier[transparency] operator[SEP] { identifier[Check] operator[SEP] identifier[notNull] operator[SEP] identifier[transparency] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[Transparency] operator[SEP] identifier[OPAQUE] operator[==] identifier[transparency] operator[SEP] { identifier[value] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Transparency] operator[SEP] identifier[OPAQUE] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Transparency] operator[SEP] identifier[BITMASK] operator[==] identifier[transparency] operator[SEP] { identifier[value] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Transparency] operator[SEP] identifier[BITMASK] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Transparency] operator[SEP] identifier[TRANSLUCENT] operator[==] identifier[transparency] operator[SEP] { identifier[value] operator[=] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Transparency] operator[SEP] identifier[TRANSLUCENT] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[LionEngineException] operator[SEP] identifier[transparency] operator[SEP] operator[SEP] } Keyword[return] identifier[value] operator[SEP] }
@Override public void actionPerformed(ActionEvent e) { String cmd = e.getActionCommand(); String plaf_name = null; if (cmd.equals("Metal")) { plaf_name = "javax.swing.plaf.metal.MetalLookAndFeel"; } else if (cmd.equals("Windows")) { plaf_name = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel"; } else if (cmd.equals("Motif")) { plaf_name = "com.sun.java.swing.plaf.motif.MotifLookAndFeel"; } else { Object source = e.getSource(); if (source == breakOnExceptions) { debugGui.dim.setBreakOnExceptions(breakOnExceptions.isSelected()); } else if (source == breakOnEnter) { debugGui.dim.setBreakOnEnter(breakOnEnter.isSelected()); } else if (source == breakOnReturn) { debugGui.dim.setBreakOnReturn(breakOnReturn.isSelected()); } else { debugGui.actionPerformed(e); } return; } try { UIManager.setLookAndFeel(plaf_name); SwingUtilities.updateComponentTreeUI(debugGui); SwingUtilities.updateComponentTreeUI(debugGui.dlg); } catch (Exception ignored) { //ignored.printStackTrace(); } }
class class_name[name] begin[{] method[actionPerformed, return_type[void], modifier[public], parameter[e]] begin[{] local_variable[type[String], cmd] local_variable[type[String], plaf_name] if[call[cmd.equals, parameter[literal["Metal"]]]] begin[{] assign[member[.plaf_name], literal["javax.swing.plaf.metal.MetalLookAndFeel"]] else begin[{] if[call[cmd.equals, parameter[literal["Windows"]]]] begin[{] assign[member[.plaf_name], literal["com.sun.java.swing.plaf.windows.WindowsLookAndFeel"]] else begin[{] if[call[cmd.equals, parameter[literal["Motif"]]]] begin[{] assign[member[.plaf_name], literal["com.sun.java.swing.plaf.motif.MotifLookAndFeel"]] else begin[{] local_variable[type[Object], source] if[binary_operation[member[.source], ==, member[.breakOnExceptions]]] begin[{] call[debugGui.dim.setBreakOnExceptions, parameter[call[breakOnExceptions.isSelected, parameter[]]]] else begin[{] if[binary_operation[member[.source], ==, member[.breakOnEnter]]] begin[{] call[debugGui.dim.setBreakOnEnter, parameter[call[breakOnEnter.isSelected, parameter[]]]] else begin[{] if[binary_operation[member[.source], ==, member[.breakOnReturn]]] begin[{] call[debugGui.dim.setBreakOnReturn, parameter[call[breakOnReturn.isSelected, parameter[]]]] else begin[{] call[debugGui.actionPerformed, parameter[member[.e]]] end[}] end[}] end[}] return[None] end[}] end[}] end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=plaf_name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setLookAndFeel, postfix_operators=[], prefix_operators=[], qualifier=UIManager, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=debugGui, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateComponentTreeUI, postfix_operators=[], prefix_operators=[], qualifier=SwingUtilities, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dlg, postfix_operators=[], prefix_operators=[], qualifier=debugGui, selectors=[])], member=updateComponentTreeUI, postfix_operators=[], prefix_operators=[], qualifier=SwingUtilities, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignored, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[ActionEvent] identifier[e] operator[SEP] { identifier[String] identifier[cmd] operator[=] identifier[e] operator[SEP] identifier[getActionCommand] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[plaf_name] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[cmd] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[plaf_name] operator[=] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cmd] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[plaf_name] operator[=] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cmd] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[plaf_name] operator[=] literal[String] operator[SEP] } Keyword[else] { identifier[Object] identifier[source] operator[=] identifier[e] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[source] operator[==] identifier[breakOnExceptions] operator[SEP] { identifier[debugGui] operator[SEP] identifier[dim] operator[SEP] identifier[setBreakOnExceptions] operator[SEP] identifier[breakOnExceptions] operator[SEP] identifier[isSelected] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[source] operator[==] identifier[breakOnEnter] operator[SEP] { identifier[debugGui] operator[SEP] identifier[dim] operator[SEP] identifier[setBreakOnEnter] operator[SEP] identifier[breakOnEnter] operator[SEP] identifier[isSelected] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[source] operator[==] identifier[breakOnReturn] operator[SEP] { identifier[debugGui] operator[SEP] identifier[dim] operator[SEP] identifier[setBreakOnReturn] operator[SEP] identifier[breakOnReturn] operator[SEP] identifier[isSelected] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[debugGui] operator[SEP] identifier[actionPerformed] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } Keyword[try] { identifier[UIManager] operator[SEP] identifier[setLookAndFeel] operator[SEP] identifier[plaf_name] operator[SEP] operator[SEP] identifier[SwingUtilities] operator[SEP] identifier[updateComponentTreeUI] operator[SEP] identifier[debugGui] operator[SEP] operator[SEP] identifier[SwingUtilities] operator[SEP] identifier[updateComponentTreeUI] operator[SEP] identifier[debugGui] operator[SEP] identifier[dlg] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ignored] operator[SEP] { } }
public ArrayList<JTSFeature> getFeatures(String id, double minX, double minY, double maxX, double maxY, List<Param> optionalParams) throws Exception { DescribeService describeService = getDescribeServiceByID(id); return getFeatures(id, optionalParams, describeService, minX, minY, maxX, maxY, 0, 0); }
class class_name[name] begin[{] method[getFeatures, return_type[type[ArrayList]], modifier[public], parameter[id, minX, minY, maxX, maxY, optionalParams]] begin[{] local_variable[type[DescribeService], describeService] return[call[.getFeatures, parameter[member[.id], member[.optionalParams], member[.describeService], member[.minX], member[.minY], member[.maxX], member[.maxY], literal[0], literal[0]]]] end[}] END[}]
Keyword[public] identifier[ArrayList] operator[<] identifier[JTSFeature] operator[>] identifier[getFeatures] operator[SEP] identifier[String] identifier[id] , Keyword[double] identifier[minX] , Keyword[double] identifier[minY] , Keyword[double] identifier[maxX] , Keyword[double] identifier[maxY] , identifier[List] operator[<] identifier[Param] operator[>] identifier[optionalParams] operator[SEP] Keyword[throws] identifier[Exception] { identifier[DescribeService] identifier[describeService] operator[=] identifier[getDescribeServiceByID] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[return] identifier[getFeatures] operator[SEP] identifier[id] , identifier[optionalParams] , identifier[describeService] , identifier[minX] , identifier[minY] , identifier[maxX] , identifier[maxY] , Other[0] , Other[0] operator[SEP] operator[SEP] }
private void gatherEvidence(Dependency dependency, final String name, String contents) { final Matcher matcher = AC_INIT_PATTERN.matcher(contents); if (matcher.find()) { dependency.addEvidence(EvidenceType.PRODUCT, name, "Package", matcher.group(1), Confidence.HIGHEST); dependency.addEvidence(EvidenceType.VERSION, name, "Package Version", matcher.group(2), Confidence.HIGHEST); if (null != matcher.group(3)) { dependency.addEvidence(EvidenceType.VENDOR, name, "Bug report address", matcher.group(4), Confidence.HIGH); } if (null != matcher.group(5)) { dependency.addEvidence(EvidenceType.PRODUCT, name, "Tarname", matcher.group(6), Confidence.HIGH); } if (null != matcher.group(7)) { final String url = matcher.group(8); if (UrlStringUtils.isUrl(url)) { dependency.addEvidence(EvidenceType.VENDOR, name, "URL", url, Confidence.HIGH); } } } }
class class_name[name] begin[{] method[gatherEvidence, return_type[void], modifier[private], parameter[dependency, name, contents]] begin[{] local_variable[type[Matcher], matcher] if[call[matcher.find, parameter[]]] begin[{] call[dependency.addEvidence, parameter[member[EvidenceType.PRODUCT], member[.name], literal["Package"], call[matcher.group, parameter[literal[1]]], member[Confidence.HIGHEST]]] call[dependency.addEvidence, parameter[member[EvidenceType.VERSION], member[.name], literal["Package Version"], call[matcher.group, parameter[literal[2]]], member[Confidence.HIGHEST]]] if[binary_operation[literal[null], !=, call[matcher.group, parameter[literal[3]]]]] begin[{] call[dependency.addEvidence, parameter[member[EvidenceType.VENDOR], member[.name], literal["Bug report address"], call[matcher.group, parameter[literal[4]]], member[Confidence.HIGH]]] else begin[{] None end[}] if[binary_operation[literal[null], !=, call[matcher.group, parameter[literal[5]]]]] begin[{] call[dependency.addEvidence, parameter[member[EvidenceType.PRODUCT], member[.name], literal["Tarname"], call[matcher.group, parameter[literal[6]]], member[Confidence.HIGH]]] else begin[{] None end[}] if[binary_operation[literal[null], !=, call[matcher.group, parameter[literal[7]]]]] begin[{] local_variable[type[String], url] if[call[UrlStringUtils.isUrl, parameter[member[.url]]]] begin[{] call[dependency.addEvidence, parameter[member[EvidenceType.VENDOR], member[.name], literal["URL"], member[.url], member[Confidence.HIGH]]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[gatherEvidence] operator[SEP] identifier[Dependency] identifier[dependency] , Keyword[final] identifier[String] identifier[name] , identifier[String] identifier[contents] operator[SEP] { Keyword[final] identifier[Matcher] identifier[matcher] operator[=] identifier[AC_INIT_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[contents] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[dependency] operator[SEP] identifier[addEvidence] operator[SEP] identifier[EvidenceType] operator[SEP] identifier[PRODUCT] , identifier[name] , literal[String] , identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] , identifier[Confidence] operator[SEP] identifier[HIGHEST] operator[SEP] operator[SEP] identifier[dependency] operator[SEP] identifier[addEvidence] operator[SEP] identifier[EvidenceType] operator[SEP] identifier[VERSION] , identifier[name] , literal[String] , identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[2] operator[SEP] , identifier[Confidence] operator[SEP] identifier[HIGHEST] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[3] operator[SEP] operator[SEP] { identifier[dependency] operator[SEP] identifier[addEvidence] operator[SEP] identifier[EvidenceType] operator[SEP] identifier[VENDOR] , identifier[name] , literal[String] , identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[4] operator[SEP] , identifier[Confidence] operator[SEP] identifier[HIGH] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[!=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[5] operator[SEP] operator[SEP] { identifier[dependency] operator[SEP] identifier[addEvidence] operator[SEP] identifier[EvidenceType] operator[SEP] identifier[PRODUCT] , identifier[name] , literal[String] , identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[6] operator[SEP] , identifier[Confidence] operator[SEP] identifier[HIGH] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[!=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[7] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[url] operator[=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[8] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[UrlStringUtils] operator[SEP] identifier[isUrl] operator[SEP] identifier[url] operator[SEP] operator[SEP] { identifier[dependency] operator[SEP] identifier[addEvidence] operator[SEP] identifier[EvidenceType] operator[SEP] identifier[VENDOR] , identifier[name] , literal[String] , identifier[url] , identifier[Confidence] operator[SEP] identifier[HIGH] operator[SEP] operator[SEP] } } } }
public static void write(InputStream in, OutputStream out) throws IOException { byte[] b = new byte[4096]; for (int n; (n = in.read(b)) != -1;) { out.write(b, 0, n); } in.close(); out.close(); }
class class_name[name] begin[{] method[write, return_type[void], modifier[public static], parameter[in, out]] begin[{] local_variable[type[byte], b] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=None), label=None) call[in.close, parameter[]] call[out.close, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[write] operator[SEP] identifier[InputStream] identifier[in] , identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[b] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[4096] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[n] operator[SEP] operator[SEP] identifier[n] operator[=] identifier[in] operator[SEP] identifier[read] operator[SEP] identifier[b] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[b] , Other[0] , identifier[n] operator[SEP] operator[SEP] } identifier[in] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] }
public void setLeftOperand(XExpression newLeftOperand) { if (newLeftOperand != leftOperand) { NotificationChain msgs = null; if (leftOperand != null) msgs = ((InternalEObject)leftOperand).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - XbasePackage.XBINARY_OPERATION__LEFT_OPERAND, null, msgs); if (newLeftOperand != null) msgs = ((InternalEObject)newLeftOperand).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - XbasePackage.XBINARY_OPERATION__LEFT_OPERAND, null, msgs); msgs = basicSetLeftOperand(newLeftOperand, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XbasePackage.XBINARY_OPERATION__LEFT_OPERAND, newLeftOperand, newLeftOperand)); }
class class_name[name] begin[{] method[setLeftOperand, return_type[void], modifier[public], parameter[newLeftOperand]] begin[{] if[binary_operation[member[.newLeftOperand], !=, member[.leftOperand]]] begin[{] local_variable[type[NotificationChain], msgs] if[binary_operation[member[.leftOperand], !=, literal[null]]] begin[{] assign[member[.msgs], Cast(expression=MemberReference(member=leftOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InternalEObject, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.newLeftOperand], !=, literal[null]]] begin[{] assign[member[.msgs], Cast(expression=MemberReference(member=newLeftOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InternalEObject, sub_type=None))] else begin[{] None end[}] assign[member[.msgs], call[.basicSetLeftOperand, parameter[member[.newLeftOperand], member[.msgs]]]] if[binary_operation[member[.msgs], !=, literal[null]]] begin[{] call[msgs.dispatch, parameter[]] else begin[{] None end[}] else begin[{] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=XBINARY_OPERATION__LEFT_OPERAND, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selectors=[]), MemberReference(member=newLeftOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newLeftOperand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setLeftOperand] operator[SEP] identifier[XExpression] identifier[newLeftOperand] operator[SEP] { Keyword[if] operator[SEP] identifier[newLeftOperand] operator[!=] identifier[leftOperand] operator[SEP] { identifier[NotificationChain] identifier[msgs] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[leftOperand] operator[!=] Other[null] operator[SEP] identifier[msgs] operator[=] operator[SEP] operator[SEP] identifier[InternalEObject] operator[SEP] identifier[leftOperand] operator[SEP] operator[SEP] identifier[eInverseRemove] operator[SEP] Keyword[this] , identifier[EOPPOSITE_FEATURE_BASE] operator[-] identifier[XbasePackage] operator[SEP] identifier[XBINARY_OPERATION__LEFT_OPERAND] , Other[null] , identifier[msgs] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newLeftOperand] operator[!=] Other[null] operator[SEP] identifier[msgs] operator[=] operator[SEP] operator[SEP] identifier[InternalEObject] operator[SEP] identifier[newLeftOperand] operator[SEP] operator[SEP] identifier[eInverseAdd] operator[SEP] Keyword[this] , identifier[EOPPOSITE_FEATURE_BASE] operator[-] identifier[XbasePackage] operator[SEP] identifier[XBINARY_OPERATION__LEFT_OPERAND] , Other[null] , identifier[msgs] operator[SEP] operator[SEP] identifier[msgs] operator[=] identifier[basicSetLeftOperand] operator[SEP] identifier[newLeftOperand] , identifier[msgs] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[msgs] operator[!=] Other[null] operator[SEP] identifier[msgs] operator[SEP] identifier[dispatch] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[XbasePackage] operator[SEP] identifier[XBINARY_OPERATION__LEFT_OPERAND] , identifier[newLeftOperand] , identifier[newLeftOperand] operator[SEP] operator[SEP] operator[SEP] }
public static Class<?> getPropertyType(Class<?> clazz, String propertyName) { if (clazz == null || !StringUtils.hasText(propertyName)) { return null; } try { PropertyDescriptor desc=BeanUtils.getPropertyDescriptor(clazz, propertyName); if (desc != null) { return desc.getPropertyType(); } return null; } catch (Exception e) { // if there are any errors in instantiating just return null for the moment return null; } }
class class_name[name] begin[{] method[getPropertyType, return_type[type[Class]], modifier[public static], parameter[clazz, propertyName]] begin[{] if[binary_operation[binary_operation[member[.clazz], ==, literal[null]], ||, call[StringUtils.hasText, parameter[member[.propertyName]]]]] begin[{] return[literal[null]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getPropertyDescriptor, postfix_operators=[], prefix_operators=[], qualifier=BeanUtils, selectors=[], type_arguments=None), name=desc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PropertyDescriptor, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=desc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getPropertyType, postfix_operators=[], prefix_operators=[], qualifier=desc, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), 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[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getPropertyType] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[propertyName] operator[SEP] { Keyword[if] operator[SEP] identifier[clazz] operator[==] Other[null] operator[||] operator[!] identifier[StringUtils] operator[SEP] identifier[hasText] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[try] { identifier[PropertyDescriptor] identifier[desc] operator[=] identifier[BeanUtils] operator[SEP] identifier[getPropertyDescriptor] operator[SEP] identifier[clazz] , identifier[propertyName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[desc] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[desc] operator[SEP] identifier[getPropertyType] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] Other[null] operator[SEP] } }
public void parseBatchResult(ClientResponse response) throws IOException, ServiceException { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); InputStream inputStream = response.getEntityInputStream(); ReaderWriter.writeTo(inputStream, byteArrayOutputStream); response.setEntityInputStream(new ByteArrayInputStream( byteArrayOutputStream.toByteArray())); JobInfo jobInfo; List<DataSource> parts = parseParts(response.getEntityInputStream(), response.getHeaders().getFirst("Content-Type")); if (parts.size() == 0 || parts.size() > entityBatchOperations.size()) { throw new UniformInterfaceException(String.format( "Batch response from server does not contain the correct amount " + "of parts (expecting %d, received %d instead)", parts.size(), entityBatchOperations.size()), response); } for (int i = 0; i < parts.size(); i++) { DataSource ds = parts.get(i); EntityBatchOperation entityBatchOperation = entityBatchOperations .get(i); StatusLine status = StatusLine.create(ds); InternetHeaders headers = parseHeaders(ds); InputStream content = parseEntity(ds); if (status.getStatus() >= HTTP_ERROR) { InBoundHeaders inBoundHeaders = new InBoundHeaders(); @SuppressWarnings("unchecked") Enumeration<Header> e = headers.getAllHeaders(); while (e.hasMoreElements()) { Header header = e.nextElement(); inBoundHeaders.putSingle(header.getName(), header.getValue()); } ClientResponse clientResponse = new ClientResponse( status.getStatus(), inBoundHeaders, content, null); UniformInterfaceException uniformInterfaceException = new UniformInterfaceException( clientResponse); throw uniformInterfaceException; } else if (entityBatchOperation instanceof Job.CreateBatchOperation) { try { jobInfo = oDataAtomUnmarshaller.unmarshalEntry(content, JobInfo.class); Job.CreateBatchOperation jobCreateBatchOperation = (Job.CreateBatchOperation) entityBatchOperation; jobCreateBatchOperation.setJobInfo(jobInfo); } catch (JAXBException e) { throw new ServiceException(e); } } else if (entityBatchOperation instanceof Task.CreateBatchOperation) { try { oDataAtomUnmarshaller.unmarshalEntry(content, TaskInfo.class); } catch (JAXBException e) { throw new ServiceException(e); } } } }
class class_name[name] begin[{] method[parseBatchResult, return_type[void], modifier[public], parameter[response]] begin[{] local_variable[type[ByteArrayOutputStream], byteArrayOutputStream] local_variable[type[InputStream], inputStream] call[ReaderWriter.writeTo, parameter[member[.inputStream], member[.byteArrayOutputStream]]] call[response.setEntityInputStream, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=byteArrayOutputStream, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None))]] local_variable[type[JobInfo], jobInfo] local_variable[type[List], parts] if[binary_operation[binary_operation[call[parts.size, parameter[]], ==, literal[0]], ||, binary_operation[call[parts.size, parameter[]], >, call[entityBatchOperations.size, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Batch response from server does not contain the correct amount "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="of parts (expecting %d, received %d instead)"), operator=+), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=entityBatchOperations, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), MemberReference(member=response, 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=UniformInterfaceException, sub_type=None)), label=None) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None), name=ds)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DataSource, 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=entityBatchOperations, selectors=[], type_arguments=None), name=entityBatchOperation)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EntityBatchOperation, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=StatusLine, selectors=[], type_arguments=None), name=status)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StatusLine, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseHeaders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=headers)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InternetHeaders, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseEntity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=content)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), operandr=MemberReference(member=HTTP_ERROR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=entityBatchOperation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Job, sub_type=ReferenceType(arguments=None, dimensions=None, name=CreateBatchOperation, sub_type=None)), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=entityBatchOperation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Task, sub_type=ReferenceType(arguments=None, dimensions=None, name=CreateBatchOperation, sub_type=None)), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TaskInfo, sub_type=None))], member=unmarshalEntry, postfix_operators=[], prefix_operators=[], qualifier=oDataAtomUnmarshaller, 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=ServiceException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JAXBException']))], finally_block=None, label=None, resources=None)])), label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jobInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JobInfo, sub_type=None))], member=unmarshalEntry, postfix_operators=[], prefix_operators=[], qualifier=oDataAtomUnmarshaller, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=entityBatchOperation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Job, sub_type=ReferenceType(arguments=None, dimensions=None, name=CreateBatchOperation, sub_type=None))), name=jobCreateBatchOperation)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Job, sub_type=ReferenceType(arguments=None, dimensions=None, name=CreateBatchOperation, sub_type=None))), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=jobInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setJobInfo, postfix_operators=[], prefix_operators=[], qualifier=jobCreateBatchOperation, 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=ServiceException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JAXBException']))], finally_block=None, label=None, resources=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InBoundHeaders, sub_type=None)), name=inBoundHeaders)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InBoundHeaders, sub_type=None)), LocalVariableDeclaration(annotations=[Annotation(element=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unchecked"), name=SuppressWarnings)], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getAllHeaders, postfix_operators=[], prefix_operators=[], qualifier=headers, selectors=[], type_arguments=None), name=e)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Header, sub_type=None))], dimensions=[], name=Enumeration, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=nextElement, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), name=header)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Header, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[], type_arguments=None)], member=putSingle, postfix_operators=[], prefix_operators=[], qualifier=inBoundHeaders, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=hasMoreElements, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), MemberReference(member=inBoundHeaders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClientResponse, sub_type=None)), name=clientResponse)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ClientResponse, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=clientResponse, 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=UniformInterfaceException, sub_type=None)), name=uniformInterfaceException)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=UniformInterfaceException, sub_type=None)), ThrowStatement(expression=MemberReference(member=uniformInterfaceException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[parseBatchResult] operator[SEP] identifier[ClientResponse] identifier[response] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServiceException] { identifier[ByteArrayOutputStream] identifier[byteArrayOutputStream] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[InputStream] identifier[inputStream] operator[=] identifier[response] operator[SEP] identifier[getEntityInputStream] operator[SEP] operator[SEP] operator[SEP] identifier[ReaderWriter] operator[SEP] identifier[writeTo] operator[SEP] identifier[inputStream] , identifier[byteArrayOutputStream] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setEntityInputStream] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[byteArrayOutputStream] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[JobInfo] identifier[jobInfo] operator[SEP] identifier[List] operator[<] identifier[DataSource] operator[>] identifier[parts] operator[=] identifier[parseParts] operator[SEP] identifier[response] operator[SEP] identifier[getEntityInputStream] operator[SEP] operator[SEP] , identifier[response] operator[SEP] identifier[getHeaders] operator[SEP] operator[SEP] operator[SEP] identifier[getFirst] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parts] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[||] identifier[parts] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[entityBatchOperations] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[UniformInterfaceException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] operator[+] literal[String] , identifier[parts] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[entityBatchOperations] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] , identifier[response] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[parts] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[DataSource] identifier[ds] operator[=] identifier[parts] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[EntityBatchOperation] identifier[entityBatchOperation] operator[=] identifier[entityBatchOperations] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[StatusLine] identifier[status] operator[=] identifier[StatusLine] operator[SEP] identifier[create] operator[SEP] identifier[ds] operator[SEP] operator[SEP] identifier[InternetHeaders] identifier[headers] operator[=] identifier[parseHeaders] operator[SEP] identifier[ds] operator[SEP] operator[SEP] identifier[InputStream] identifier[content] operator[=] identifier[parseEntity] operator[SEP] identifier[ds] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[status] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[>=] identifier[HTTP_ERROR] operator[SEP] { identifier[InBoundHeaders] identifier[inBoundHeaders] operator[=] Keyword[new] identifier[InBoundHeaders] operator[SEP] operator[SEP] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Enumeration] operator[<] identifier[Header] operator[>] identifier[e] operator[=] identifier[headers] operator[SEP] identifier[getAllHeaders] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[e] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[Header] identifier[header] operator[=] identifier[e] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] identifier[inBoundHeaders] operator[SEP] identifier[putSingle] operator[SEP] identifier[header] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[header] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[ClientResponse] identifier[clientResponse] operator[=] Keyword[new] identifier[ClientResponse] operator[SEP] identifier[status] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] , identifier[inBoundHeaders] , identifier[content] , Other[null] operator[SEP] operator[SEP] identifier[UniformInterfaceException] identifier[uniformInterfaceException] operator[=] Keyword[new] identifier[UniformInterfaceException] operator[SEP] identifier[clientResponse] operator[SEP] operator[SEP] Keyword[throw] identifier[uniformInterfaceException] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[entityBatchOperation] Keyword[instanceof] identifier[Job] operator[SEP] identifier[CreateBatchOperation] operator[SEP] { Keyword[try] { identifier[jobInfo] operator[=] identifier[oDataAtomUnmarshaller] operator[SEP] identifier[unmarshalEntry] operator[SEP] identifier[content] , identifier[JobInfo] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[Job] operator[SEP] identifier[CreateBatchOperation] identifier[jobCreateBatchOperation] operator[=] operator[SEP] identifier[Job] operator[SEP] identifier[CreateBatchOperation] operator[SEP] identifier[entityBatchOperation] operator[SEP] identifier[jobCreateBatchOperation] operator[SEP] identifier[setJobInfo] operator[SEP] identifier[jobInfo] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JAXBException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServiceException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[entityBatchOperation] Keyword[instanceof] identifier[Task] operator[SEP] identifier[CreateBatchOperation] operator[SEP] { Keyword[try] { identifier[oDataAtomUnmarshaller] operator[SEP] identifier[unmarshalEntry] operator[SEP] identifier[content] , identifier[TaskInfo] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JAXBException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServiceException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } } }
public void setUserDomainSegment(com.google.api.ads.admanager.axis.v201808.UserDomainTargeting userDomainSegment) { this.userDomainSegment = userDomainSegment; }
class class_name[name] begin[{] method[setUserDomainSegment, return_type[void], modifier[public], parameter[userDomainSegment]] begin[{] assign[THIS[member[None.userDomainSegment]], member[.userDomainSegment]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setUserDomainSegment] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201808] operator[SEP] identifier[UserDomainTargeting] identifier[userDomainSegment] operator[SEP] { Keyword[this] operator[SEP] identifier[userDomainSegment] operator[=] identifier[userDomainSegment] operator[SEP] }
private void parseProperties( final ITransaction transaction, final WebdavRequest req, final XMLWriter generatedXML, final String path, final int type, final List<String> propertiesVector, final String mimeType ) throws WebdavException { StoredObject so = _store.getStoredObject( transaction, path ); final boolean isFolder = so.isFolder(); final String creationdate = CREATION_DATE_FORMAT.format( so.getCreationDate() ); final String lastModified = LAST_MODIFIED_DATE_FORMAT.format( so.getLastModified() ); final String resourceLength = String.valueOf( so.getResourceLength() ); // ResourceInfo resourceInfo = new ResourceInfo(path, resources); generatedXML.writeElement( "DAV::response", XMLWriter.OPENING ); String status = new String( "HTTP/1.1 " + SC_OK + " " + SC_OK.message() ); // Generating href element generatedXML.writeElement( "DAV::href", XMLWriter.OPENING ); String href = req.getContextPath(); final String servletPath = req.getServicePath(); if ( servletPath != null ) { if ( ( href.endsWith( "/" ) ) && ( servletPath.startsWith( "/" ) ) ) { href += servletPath.substring( 1 ); } else { href += servletPath; } } if ( ( href.endsWith( "/" ) ) && ( path.startsWith( "/" ) ) ) { href += path.substring( 1 ); } else { href += path; } if ( ( isFolder ) && ( !href.endsWith( "/" ) ) ) { href += "/"; } generatedXML.writeText( rewriteUrl( href ) ); generatedXML.writeElement( "DAV::href", XMLWriter.CLOSING ); String resourceName = path; final int lastSlash = path.lastIndexOf( '/' ); if ( lastSlash != -1 ) { resourceName = resourceName.substring( lastSlash + 1 ); } switch ( type ) { case FIND_ALL_PROP: generatedXML.writeElement( "DAV::propstat", XMLWriter.OPENING ); generatedXML.writeElement( "DAV::prop", XMLWriter.OPENING ); generatedXML.writeProperty( "DAV::creationdate", creationdate ); generatedXML.writeElement( "DAV::displayname", XMLWriter.OPENING ); generatedXML.writeData( resourceName ); generatedXML.writeElement( "DAV::displayname", XMLWriter.CLOSING ); if ( !isFolder ) { generatedXML.writeProperty( "DAV::getlastmodified", lastModified ); generatedXML.writeProperty( "DAV::getcontentlength", resourceLength ); final String contentType = mimeType; if ( contentType != null ) { generatedXML.writeProperty( "DAV::getcontenttype", contentType ); } generatedXML.writeProperty( "DAV::getetag", getETag( so ) ); generatedXML.writeElement( "DAV::resourcetype", XMLWriter.NO_CONTENT ); } else { generatedXML.writeElement( "DAV::resourcetype", XMLWriter.OPENING ); generatedXML.writeElement( "DAV::collection", XMLWriter.NO_CONTENT ); generatedXML.writeElement( "DAV::resourcetype", XMLWriter.CLOSING ); } writeSupportedLockElements( transaction, generatedXML, path ); writeLockDiscoveryElements( transaction, generatedXML, path ); generatedXML.writeProperty( "DAV::source", "" ); generatedXML.writeElement( "DAV::prop", XMLWriter.CLOSING ); generatedXML.writeElement( "DAV::status", XMLWriter.OPENING ); generatedXML.writeText( status ); generatedXML.writeElement( "DAV::status", XMLWriter.CLOSING ); generatedXML.writeElement( "DAV::propstat", XMLWriter.CLOSING ); break; case FIND_PROPERTY_NAMES: generatedXML.writeElement( "DAV::propstat", XMLWriter.OPENING ); generatedXML.writeElement( "DAV::prop", XMLWriter.OPENING ); generatedXML.writeElement( "DAV::creationdate", XMLWriter.NO_CONTENT ); generatedXML.writeElement( "DAV::displayname", XMLWriter.NO_CONTENT ); if ( !isFolder ) { generatedXML.writeElement( "DAV::getcontentlanguage", XMLWriter.NO_CONTENT ); generatedXML.writeElement( "DAV::getcontentlength", XMLWriter.NO_CONTENT ); generatedXML.writeElement( "DAV::getcontenttype", XMLWriter.NO_CONTENT ); generatedXML.writeElement( "DAV::getetag", XMLWriter.NO_CONTENT ); generatedXML.writeElement( "DAV::getlastmodified", XMLWriter.NO_CONTENT ); } generatedXML.writeElement( "DAV::resourcetype", XMLWriter.NO_CONTENT ); generatedXML.writeElement( "DAV::supportedlock", XMLWriter.NO_CONTENT ); generatedXML.writeElement( "DAV::source", XMLWriter.NO_CONTENT ); generatedXML.writeElement( "DAV::prop", XMLWriter.CLOSING ); generatedXML.writeElement( "DAV::status", XMLWriter.OPENING ); generatedXML.writeText( status ); generatedXML.writeElement( "DAV::status", XMLWriter.CLOSING ); generatedXML.writeElement( "DAV::propstat", XMLWriter.CLOSING ); break; case FIND_BY_PROPERTY: final List<String> propertiesNotFound = new ArrayList<String>(); // Parse the list of properties generatedXML.writeElement( "DAV::propstat", XMLWriter.OPENING ); generatedXML.writeElement( "DAV::prop", XMLWriter.OPENING ); final Iterator<String> properties = propertiesVector.iterator(); while ( properties.hasNext() ) { final String property = properties.next(); if ( property.equals( "DAV::creationdate" ) ) { generatedXML.writeProperty( "DAV::creationdate", creationdate ); } else if ( property.equals( "DAV::displayname" ) ) { generatedXML.writeElement( "DAV::displayname", XMLWriter.OPENING ); generatedXML.writeData( resourceName ); generatedXML.writeElement( "DAV::displayname", XMLWriter.CLOSING ); } else if ( property.equals( "DAV::getcontentlanguage" ) ) { if ( isFolder ) { propertiesNotFound.add( property ); } else { generatedXML.writeElement( "DAV::getcontentlanguage", XMLWriter.NO_CONTENT ); } } else if ( property.equals( "DAV::getcontentlength" ) ) { if ( isFolder ) { propertiesNotFound.add( property ); } else { generatedXML.writeProperty( "DAV::getcontentlength", resourceLength ); } } else if ( property.equals( "DAV::getcontenttype" ) ) { if ( isFolder ) { propertiesNotFound.add( property ); } else { generatedXML.writeProperty( "DAV::getcontenttype", mimeType ); } } else if ( property.equals( "DAV::getetag" ) ) { if ( isFolder || so.isNullResource() ) { propertiesNotFound.add( property ); } else { generatedXML.writeProperty( "DAV::getetag", getETag( so ) ); } } else if ( property.equals( "DAV::getlastmodified" ) ) { if ( isFolder ) { propertiesNotFound.add( property ); } else { generatedXML.writeProperty( "DAV::getlastmodified", lastModified ); } } else if ( property.equals( "DAV::resourcetype" ) ) { if ( isFolder ) { generatedXML.writeElement( "DAV::resourcetype", XMLWriter.OPENING ); generatedXML.writeElement( "DAV::collection", XMLWriter.NO_CONTENT ); generatedXML.writeElement( "DAV::resourcetype", XMLWriter.CLOSING ); } else { generatedXML.writeElement( "DAV::resourcetype", XMLWriter.NO_CONTENT ); } } else if ( property.equals( "DAV::source" ) ) { generatedXML.writeProperty( "DAV::source", "" ); } else if ( property.equals( "DAV::supportedlock" ) ) { writeSupportedLockElements( transaction, generatedXML, path ); } else if ( property.equals( "DAV::lockdiscovery" ) ) { writeLockDiscoveryElements( transaction, generatedXML, path ); } else { propertiesNotFound.add( property ); } } generatedXML.writeElement( "DAV::prop", XMLWriter.CLOSING ); generatedXML.writeElement( "DAV::status", XMLWriter.OPENING ); generatedXML.writeText( status ); generatedXML.writeElement( "DAV::status", XMLWriter.CLOSING ); generatedXML.writeElement( "DAV::propstat", XMLWriter.CLOSING ); final Iterator<String> propertiesNotFoundList = propertiesNotFound.iterator(); if ( propertiesNotFoundList.hasNext() ) { status = new String( "HTTP/1.1 " + SC_NOT_FOUND + " " + SC_NOT_FOUND.message() ); generatedXML.writeElement( "DAV::propstat", XMLWriter.OPENING ); generatedXML.writeElement( "DAV::prop", XMLWriter.OPENING ); while ( propertiesNotFoundList.hasNext() ) { generatedXML.writeElement( propertiesNotFoundList.next(), XMLWriter.NO_CONTENT ); } generatedXML.writeElement( "DAV::prop", XMLWriter.CLOSING ); generatedXML.writeElement( "DAV::status", XMLWriter.OPENING ); generatedXML.writeText( status ); generatedXML.writeElement( "DAV::status", XMLWriter.CLOSING ); generatedXML.writeElement( "DAV::propstat", XMLWriter.CLOSING ); } break; } generatedXML.writeElement( "DAV::response", XMLWriter.CLOSING ); so = null; }
class class_name[name] begin[{] method[parseProperties, return_type[void], modifier[private], parameter[transaction, req, generatedXML, path, type, propertiesVector, mimeType]] begin[{] local_variable[type[StoredObject], so] local_variable[type[boolean], isFolder] local_variable[type[String], creationdate] local_variable[type[String], lastModified] local_variable[type[String], resourceLength] call[generatedXML.writeElement, parameter[literal["DAV::response"], member[XMLWriter.OPENING]]] local_variable[type[String], status] call[generatedXML.writeElement, parameter[literal["DAV::href"], member[XMLWriter.OPENING]]] local_variable[type[String], href] local_variable[type[String], servletPath] if[binary_operation[member[.servletPath], !=, literal[null]]] begin[{] if[binary_operation[call[href.endsWith, parameter[literal["/"]]], &&, call[servletPath.startsWith, parameter[literal["/"]]]]] begin[{] assign[member[.href], call[servletPath.substring, parameter[literal[1]]]] else begin[{] assign[member[.href], member[.servletPath]] end[}] else begin[{] None end[}] if[binary_operation[call[href.endsWith, parameter[literal["/"]]], &&, call[path.startsWith, parameter[literal["/"]]]]] begin[{] assign[member[.href], call[path.substring, parameter[literal[1]]]] else begin[{] assign[member[.href], member[.path]] end[}] if[binary_operation[member[.isFolder], &&, call[href.endsWith, parameter[literal["/"]]]]] begin[{] assign[member[.href], literal["/"]] else begin[{] None end[}] call[generatedXML.writeText, parameter[call[.rewriteUrl, parameter[member[.href]]]]] call[generatedXML.writeElement, parameter[literal["DAV::href"], member[XMLWriter.CLOSING]]] local_variable[type[String], resourceName] local_variable[type[int], lastSlash] if[binary_operation[member[.lastSlash], !=, literal[1]]] begin[{] assign[member[.resourceName], call[resourceName.substring, parameter[binary_operation[member[.lastSlash], +, literal[1]]]]] else begin[{] None end[}] SwitchStatement(cases=[SwitchStatementCase(case=['FIND_ALL_PROP'], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::propstat"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::prop"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::creationdate"), MemberReference(member=creationdate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::displayname"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resourceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeData, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::displayname"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=isFolder, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::resourcetype"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::collection"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::resourcetype"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getlastmodified"), MemberReference(member=lastModified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getcontentlength"), MemberReference(member=resourceLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=mimeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=contentType)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=contentType, 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=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getcontenttype"), MemberReference(member=contentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getetag"), MethodInvocation(arguments=[MemberReference(member=so, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getETag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::resourcetype"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=generatedXML, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeSupportedLockElements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=generatedXML, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeLockDiscoveryElements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::source"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::prop"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::status"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeText, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::status"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::propstat"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['FIND_PROPERTY_NAMES'], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::propstat"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::prop"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::creationdate"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::displayname"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=isFolder, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getcontentlanguage"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getcontentlength"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getcontenttype"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getetag"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getlastmodified"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::resourcetype"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::supportedlock"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::source"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::prop"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::status"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeText, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::status"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::propstat"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['FIND_BY_PROPERTY'], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=propertiesNotFound)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::propstat"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::prop"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=propertiesVector, selectors=[], type_arguments=None), name=properties)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), name=property)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::creationdate")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::displayname")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getcontentlanguage")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getcontentlength")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getcontenttype")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getetag")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getlastmodified")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::resourcetype")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::source")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::supportedlock")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::lockdiscovery")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=propertiesNotFound, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=generatedXML, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeLockDiscoveryElements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=generatedXML, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeSupportedLockElements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::source"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=isFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::resourcetype"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::resourcetype"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::collection"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::resourcetype"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=isFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getlastmodified"), MemberReference(member=lastModified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=propertiesNotFound, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isNullResource, postfix_operators=[], prefix_operators=[], qualifier=so, selectors=[], type_arguments=None), operator=||), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getetag"), MethodInvocation(arguments=[MemberReference(member=so, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getETag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=propertiesNotFound, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=isFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getcontenttype"), MemberReference(member=mimeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=propertiesNotFound, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=isFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getcontentlength"), MemberReference(member=resourceLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=propertiesNotFound, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=isFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::getcontentlanguage"), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=propertiesNotFound, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::displayname"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resourceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeData, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::displayname"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::creationdate"), MemberReference(member=creationdate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeProperty, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)]))]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::prop"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::status"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeText, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::status"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::propstat"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=propertiesNotFound, selectors=[], type_arguments=None), name=propertiesNotFoundList)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=propertiesNotFoundList, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="HTTP/1.1 "), operandr=MemberReference(member=SC_NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+), operandr=MethodInvocation(arguments=[], member=message, postfix_operators=[], prefix_operators=[], qualifier=SC_NOT_FOUND, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::propstat"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::prop"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=propertiesNotFoundList, selectors=[], type_arguments=None), MemberReference(member=NO_CONTENT, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=propertiesNotFoundList, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::prop"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::status"), MemberReference(member=OPENING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeText, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::status"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DAV::propstat"), MemberReference(member=CLOSING, postfix_operators=[], prefix_operators=[], qualifier=XMLWriter, selectors=[])], member=writeElement, postfix_operators=[], prefix_operators=[], qualifier=generatedXML, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) call[generatedXML.writeElement, parameter[literal["DAV::response"], member[XMLWriter.CLOSING]]] assign[member[.so], literal[null]] end[}] END[}]
Keyword[private] Keyword[void] identifier[parseProperties] operator[SEP] Keyword[final] identifier[ITransaction] identifier[transaction] , Keyword[final] identifier[WebdavRequest] identifier[req] , Keyword[final] identifier[XMLWriter] identifier[generatedXML] , Keyword[final] identifier[String] identifier[path] , Keyword[final] Keyword[int] identifier[type] , Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[propertiesVector] , Keyword[final] identifier[String] identifier[mimeType] operator[SEP] Keyword[throws] identifier[WebdavException] { identifier[StoredObject] identifier[so] operator[=] identifier[_store] operator[SEP] identifier[getStoredObject] operator[SEP] identifier[transaction] , identifier[path] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[isFolder] operator[=] identifier[so] operator[SEP] identifier[isFolder] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[creationdate] operator[=] identifier[CREATION_DATE_FORMAT] operator[SEP] identifier[format] operator[SEP] identifier[so] operator[SEP] identifier[getCreationDate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[lastModified] operator[=] identifier[LAST_MODIFIED_DATE_FORMAT] operator[SEP] identifier[format] operator[SEP] identifier[so] operator[SEP] identifier[getLastModified] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[resourceLength] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[so] operator[SEP] identifier[getResourceLength] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[String] identifier[status] operator[=] Keyword[new] identifier[String] operator[SEP] literal[String] operator[+] identifier[SC_OK] operator[+] literal[String] operator[+] identifier[SC_OK] operator[SEP] identifier[message] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[String] identifier[href] operator[=] identifier[req] operator[SEP] identifier[getContextPath] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[servletPath] operator[=] identifier[req] operator[SEP] identifier[getServicePath] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[servletPath] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[href] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[servletPath] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[href] operator[+=] identifier[servletPath] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[href] operator[+=] identifier[servletPath] operator[SEP] } } Keyword[if] operator[SEP] operator[SEP] identifier[href] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[path] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[href] operator[+=] identifier[path] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[href] operator[+=] identifier[path] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[isFolder] operator[SEP] operator[&&] operator[SEP] operator[!] identifier[href] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[href] operator[+=] literal[String] operator[SEP] } identifier[generatedXML] operator[SEP] identifier[writeText] operator[SEP] identifier[rewriteUrl] operator[SEP] identifier[href] operator[SEP] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] identifier[String] identifier[resourceName] operator[=] identifier[path] operator[SEP] Keyword[final] Keyword[int] identifier[lastSlash] operator[=] identifier[path] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lastSlash] operator[!=] operator[-] Other[1] operator[SEP] { identifier[resourceName] operator[=] identifier[resourceName] operator[SEP] identifier[substring] operator[SEP] identifier[lastSlash] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[switch] operator[SEP] identifier[type] operator[SEP] { Keyword[case] identifier[FIND_ALL_PROP] operator[:] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , identifier[creationdate] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeData] operator[SEP] identifier[resourceName] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isFolder] operator[SEP] { identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , identifier[lastModified] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , identifier[resourceLength] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[contentType] operator[=] identifier[mimeType] operator[SEP] Keyword[if] operator[SEP] identifier[contentType] operator[!=] Other[null] operator[SEP] { identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , identifier[contentType] operator[SEP] operator[SEP] } identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , identifier[getETag] operator[SEP] identifier[so] operator[SEP] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] } Keyword[else] { identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] } identifier[writeSupportedLockElements] operator[SEP] identifier[transaction] , identifier[generatedXML] , identifier[path] operator[SEP] operator[SEP] identifier[writeLockDiscoveryElements] operator[SEP] identifier[transaction] , identifier[generatedXML] , identifier[path] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeText] operator[SEP] identifier[status] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[FIND_PROPERTY_NAMES] operator[:] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isFolder] operator[SEP] { identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] } identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeText] operator[SEP] identifier[status] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[FIND_BY_PROPERTY] operator[:] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[propertiesNotFound] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] Keyword[final] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[properties] operator[=] identifier[propertiesVector] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[properties] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[property] operator[=] identifier[properties] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[property] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , identifier[creationdate] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[property] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeData] operator[SEP] identifier[resourceName] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[property] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isFolder] operator[SEP] { identifier[propertiesNotFound] operator[SEP] identifier[add] operator[SEP] identifier[property] operator[SEP] operator[SEP] } Keyword[else] { identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[property] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isFolder] operator[SEP] { identifier[propertiesNotFound] operator[SEP] identifier[add] operator[SEP] identifier[property] operator[SEP] operator[SEP] } Keyword[else] { identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , identifier[resourceLength] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[property] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isFolder] operator[SEP] { identifier[propertiesNotFound] operator[SEP] identifier[add] operator[SEP] identifier[property] operator[SEP] operator[SEP] } Keyword[else] { identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , identifier[mimeType] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[property] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isFolder] operator[||] identifier[so] operator[SEP] identifier[isNullResource] operator[SEP] operator[SEP] operator[SEP] { identifier[propertiesNotFound] operator[SEP] identifier[add] operator[SEP] identifier[property] operator[SEP] operator[SEP] } Keyword[else] { identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , identifier[getETag] operator[SEP] identifier[so] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[property] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isFolder] operator[SEP] { identifier[propertiesNotFound] operator[SEP] identifier[add] operator[SEP] identifier[property] operator[SEP] operator[SEP] } Keyword[else] { identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , identifier[lastModified] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[property] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isFolder] operator[SEP] { identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] } Keyword[else] { identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[property] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[generatedXML] operator[SEP] identifier[writeProperty] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[property] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[writeSupportedLockElements] operator[SEP] identifier[transaction] , identifier[generatedXML] , identifier[path] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[property] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[writeLockDiscoveryElements] operator[SEP] identifier[transaction] , identifier[generatedXML] , identifier[path] operator[SEP] operator[SEP] } Keyword[else] { identifier[propertiesNotFound] operator[SEP] identifier[add] operator[SEP] identifier[property] operator[SEP] operator[SEP] } } identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeText] operator[SEP] identifier[status] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] Keyword[final] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[propertiesNotFoundList] operator[=] identifier[propertiesNotFound] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[propertiesNotFoundList] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[status] operator[=] Keyword[new] identifier[String] operator[SEP] literal[String] operator[+] identifier[SC_NOT_FOUND] operator[+] literal[String] operator[+] identifier[SC_NOT_FOUND] operator[SEP] identifier[message] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[propertiesNotFoundList] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] identifier[propertiesNotFoundList] operator[SEP] identifier[next] operator[SEP] operator[SEP] , identifier[XMLWriter] operator[SEP] identifier[NO_CONTENT] operator[SEP] operator[SEP] } identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[OPENING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeText] operator[SEP] identifier[status] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } identifier[generatedXML] operator[SEP] identifier[writeElement] operator[SEP] literal[String] , identifier[XMLWriter] operator[SEP] identifier[CLOSING] operator[SEP] operator[SEP] identifier[so] operator[=] Other[null] operator[SEP] }
protected String newAlgorithm() { if (getModel().getAlgorithm() == null) { return SunJCEAlgorithm.PBEWithMD5AndDES.getAlgorithm(); } return getModel().getAlgorithm().getAlgorithm(); }
class class_name[name] begin[{] method[newAlgorithm, return_type[type[String]], modifier[protected], parameter[]] begin[{] if[binary_operation[call[.getModel, parameter[]], ==, literal[null]]] begin[{] return[call[SunJCEAlgorithm.PBEWithMD5AndDES.getAlgorithm, parameter[]]] else begin[{] None end[}] return[call[.getModel, parameter[]]] end[}] END[}]
Keyword[protected] identifier[String] identifier[newAlgorithm] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[getModel] operator[SEP] operator[SEP] operator[SEP] identifier[getAlgorithm] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[SunJCEAlgorithm] operator[SEP] identifier[PBEWithMD5AndDES] operator[SEP] identifier[getAlgorithm] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[getModel] operator[SEP] operator[SEP] operator[SEP] identifier[getAlgorithm] operator[SEP] operator[SEP] operator[SEP] identifier[getAlgorithm] operator[SEP] operator[SEP] operator[SEP] }
private static boolean hasSync(Screen screen) { final Config config = screen.getConfig(); final Resolution output = config.getOutput(); return config.isWindowed() && output.getRate() > 0; }
class class_name[name] begin[{] method[hasSync, return_type[type[boolean]], modifier[private static], parameter[screen]] begin[{] local_variable[type[Config], config] local_variable[type[Resolution], output] return[binary_operation[call[config.isWindowed, parameter[]], &&, binary_operation[call[output.getRate, parameter[]], >, literal[0]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[hasSync] operator[SEP] identifier[Screen] identifier[screen] operator[SEP] { Keyword[final] identifier[Config] identifier[config] operator[=] identifier[screen] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Resolution] identifier[output] operator[=] identifier[config] operator[SEP] identifier[getOutput] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[config] operator[SEP] identifier[isWindowed] operator[SEP] operator[SEP] operator[&&] identifier[output] operator[SEP] identifier[getRate] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] }
private boolean sameAction(String first) { StringBuilder firstSb = new StringBuilder(Strings.substringBefore(first, ".")); if (-1 == firstSb.lastIndexOf("!")) { firstSb.append("!index"); } return firstSb.toString().equals(uri); }
class class_name[name] begin[{] method[sameAction, return_type[type[boolean]], modifier[private], parameter[first]] begin[{] local_variable[type[StringBuilder], firstSb] if[binary_operation[literal[1], ==, call[firstSb.lastIndexOf, parameter[literal["!"]]]]] begin[{] call[firstSb.append, parameter[literal["!index"]]] else begin[{] None end[}] return[call[firstSb.toString, parameter[]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[sameAction] operator[SEP] identifier[String] identifier[first] operator[SEP] { identifier[StringBuilder] identifier[firstSb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[Strings] operator[SEP] identifier[substringBefore] operator[SEP] identifier[first] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[-] Other[1] operator[==] identifier[firstSb] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[firstSb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[firstSb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[uri] operator[SEP] operator[SEP] }
@Override public List<CPDefinitionLocalization> 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[CPDefinitionLocalization] 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 static <T, R> Observable<List<R>> batchToStream(final List<T> elements, final int batchSize, final FutureSuccessHandler<T, R> producer) { return Observable.create(subscriber -> batchToStream(elements, batchSize, 0, subscriber, producer)); }
class class_name[name] begin[{] method[batchToStream, return_type[type[Observable]], modifier[public static], parameter[elements, batchSize, producer]] begin[{] return[call[Observable.create, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=elements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=batchSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=subscriber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=producer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=batchToStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), parameters=[MemberReference(member=subscriber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[R] operator[>] identifier[Observable] operator[<] identifier[List] operator[<] identifier[R] operator[>] operator[>] identifier[batchToStream] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[T] operator[>] identifier[elements] , Keyword[final] Keyword[int] identifier[batchSize] , Keyword[final] identifier[FutureSuccessHandler] operator[<] identifier[T] , identifier[R] operator[>] identifier[producer] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[create] operator[SEP] identifier[subscriber] operator[->] identifier[batchToStream] operator[SEP] identifier[elements] , identifier[batchSize] , Other[0] , identifier[subscriber] , identifier[producer] operator[SEP] operator[SEP] operator[SEP] }
public static Date min(Date d1, Date d2) { Date result; if (d1 == null) { result = d2; } else if (d2 == null) { result = d1; } else { result = (d1.compareTo(d2) < 0) ? d1 : d2; } return result; }
class class_name[name] begin[{] method[min, return_type[type[Date]], modifier[public static], parameter[d1, d2]] begin[{] local_variable[type[Date], result] if[binary_operation[member[.d1], ==, literal[null]]] begin[{] assign[member[.result], member[.d2]] else begin[{] if[binary_operation[member[.d2], ==, literal[null]]] begin[{] assign[member[.result], member[.d1]] else begin[{] assign[member[.result], TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=d2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compareTo, postfix_operators=[], prefix_operators=[], qualifier=d1, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=MemberReference(member=d2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=d1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Date] identifier[min] operator[SEP] identifier[Date] identifier[d1] , identifier[Date] identifier[d2] operator[SEP] { identifier[Date] identifier[result] operator[SEP] Keyword[if] operator[SEP] identifier[d1] operator[==] Other[null] operator[SEP] { identifier[result] operator[=] identifier[d2] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[d2] operator[==] Other[null] operator[SEP] { identifier[result] operator[=] identifier[d1] operator[SEP] } Keyword[else] { identifier[result] operator[=] operator[SEP] identifier[d1] operator[SEP] identifier[compareTo] operator[SEP] identifier[d2] operator[SEP] operator[<] Other[0] operator[SEP] operator[?] identifier[d1] operator[:] identifier[d2] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public void mTokens() throws RecognitionException { // org/javaruntype/type/parser/Type.g:1:8: ( ARRAY | UNKNOWN | BEGINTYPEPARAM | ENDTYPEPARAM | COMMA | EXTENDS | SUPER | EXT | SUP | CLASSNAME | WS ) int alt3=11; alt3 = dfa3.predict(input); switch (alt3) { case 1 : // org/javaruntype/type/parser/Type.g:1:10: ARRAY { mARRAY(); } break; case 2 : // org/javaruntype/type/parser/Type.g:1:16: UNKNOWN { mUNKNOWN(); } break; case 3 : // org/javaruntype/type/parser/Type.g:1:24: BEGINTYPEPARAM { mBEGINTYPEPARAM(); } break; case 4 : // org/javaruntype/type/parser/Type.g:1:39: ENDTYPEPARAM { mENDTYPEPARAM(); } break; case 5 : // org/javaruntype/type/parser/Type.g:1:52: COMMA { mCOMMA(); } break; case 6 : // org/javaruntype/type/parser/Type.g:1:58: EXTENDS { mEXTENDS(); } break; case 7 : // org/javaruntype/type/parser/Type.g:1:66: SUPER { mSUPER(); } break; case 8 : // org/javaruntype/type/parser/Type.g:1:72: EXT { mEXT(); } break; case 9 : // org/javaruntype/type/parser/Type.g:1:76: SUP { mSUP(); } break; case 10 : // org/javaruntype/type/parser/Type.g:1:80: CLASSNAME { mCLASSNAME(); } break; case 11 : // org/javaruntype/type/parser/Type.g:1:90: WS { mWS(); } break; } }
class class_name[name] begin[{] method[mTokens, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[int], alt3] assign[member[.alt3], call[dfa3.predict, parameter[member[.input]]]] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mARRAY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mUNKNOWN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mBEGINTYPEPARAM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mENDTYPEPARAM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mCOMMA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mEXTENDS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mSUPER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mEXT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mSUP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mCLASSNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=11)], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=mWS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[mTokens] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[int] identifier[alt3] operator[=] Other[11] operator[SEP] identifier[alt3] operator[=] identifier[dfa3] operator[SEP] identifier[predict] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[alt3] operator[SEP] { Keyword[case] Other[1] operator[:] { identifier[mARRAY] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] { identifier[mUNKNOWN] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[3] operator[:] { identifier[mBEGINTYPEPARAM] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[4] operator[:] { identifier[mENDTYPEPARAM] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[5] operator[:] { identifier[mCOMMA] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[6] operator[:] { identifier[mEXTENDS] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[7] operator[:] { identifier[mSUPER] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[8] operator[:] { identifier[mEXT] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[9] operator[:] { identifier[mSUP] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[10] operator[:] { identifier[mCLASSNAME] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] Other[11] operator[:] { identifier[mWS] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } }
public boolean renew(final String appName, final String id, final boolean isReplication) { if (super.renew(appName, id, isReplication)) { replicateToPeers(Action.Heartbeat, appName, id, null, null, isReplication); return true; } return false; }
class class_name[name] begin[{] method[renew, return_type[type[boolean]], modifier[public], parameter[appName, id, isReplication]] begin[{] if[SuperMethodInvocation(arguments=[MemberReference(member=appName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=isReplication, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=renew, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] begin[{] call[.replicateToPeers, parameter[member[Action.Heartbeat], member[.appName], member[.id], literal[null], literal[null], member[.isReplication]]] return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[renew] operator[SEP] Keyword[final] identifier[String] identifier[appName] , Keyword[final] identifier[String] identifier[id] , Keyword[final] Keyword[boolean] identifier[isReplication] operator[SEP] { Keyword[if] operator[SEP] Keyword[super] operator[SEP] identifier[renew] operator[SEP] identifier[appName] , identifier[id] , identifier[isReplication] operator[SEP] operator[SEP] { identifier[replicateToPeers] operator[SEP] identifier[Action] operator[SEP] identifier[Heartbeat] , identifier[appName] , identifier[id] , Other[null] , Other[null] , identifier[isReplication] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static void initCredentials(Job job) { Configuration configuration = job.getConfiguration(); Settings settings = HadoopSettingsManager.loadFrom(configuration); InitializationUtils.setUserProviderIfNotSet(settings, HadoopUserProvider.class, LOG); UserProvider userProvider = UserProvider.create(settings); if (userProvider.isEsKerberosEnabled()) { User user = userProvider.getUser(); ClusterInfo clusterInfo = settings.getClusterInfoOrNull(); RestClient bootstrap = new RestClient(settings); try { // first get ES main action info if it's missing if (clusterInfo == null) { clusterInfo = bootstrap.mainInfo(); } // Add the token to the job TokenUtil.addTokenForJob(bootstrap, clusterInfo.getClusterName(), user, job); } catch (EsHadoopException ex) { throw new EsHadoopIllegalArgumentException(String.format("Cannot detect ES version - " + "typically this happens if the network/Elasticsearch cluster is not accessible or when targeting " + "a WAN/Cloud instance without the proper setting '%s'", ConfigurationOptions.ES_NODES_WAN_ONLY), ex); } finally { bootstrap.close(); } } else { if (LOG.isDebugEnabled()) { LOG.debug("Ignoring Elasticsearch credentials since Kerberos Auth is not enabled."); } } }
class class_name[name] begin[{] method[initCredentials, return_type[void], modifier[public static], parameter[job]] begin[{] local_variable[type[Configuration], configuration] local_variable[type[Settings], settings] call[InitializationUtils.setUserProviderIfNotSet, parameter[member[.settings], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HadoopUserProvider, sub_type=None)), member[.LOG]]] local_variable[type[UserProvider], userProvider] if[call[userProvider.isEsKerberosEnabled, parameter[]]] begin[{] local_variable[type[User], user] local_variable[type[ClusterInfo], clusterInfo] local_variable[type[RestClient], bootstrap] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=clusterInfo, 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=clusterInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=mainInfo, postfix_operators=[], prefix_operators=[], qualifier=bootstrap, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bootstrap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getClusterName, postfix_operators=[], prefix_operators=[], qualifier=clusterInfo, selectors=[], type_arguments=None), MemberReference(member=user, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=job, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addTokenForJob, postfix_operators=[], prefix_operators=[], qualifier=TokenUtil, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot detect ES version - "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="typically this happens if the network/Elasticsearch cluster is not accessible or when targeting "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="a WAN/Cloud instance without the proper setting '%s'"), operator=+), MemberReference(member=ES_NODES_WAN_ONLY, postfix_operators=[], prefix_operators=[], qualifier=ConfigurationOptions, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EsHadoopIllegalArgumentException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['EsHadoopException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=bootstrap, selectors=[], type_arguments=None), label=None)], label=None, resources=None) else begin[{] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[literal["Ignoring Elasticsearch credentials since Kerberos Auth is not enabled."]]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[initCredentials] operator[SEP] identifier[Job] identifier[job] operator[SEP] { identifier[Configuration] identifier[configuration] operator[=] identifier[job] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[Settings] identifier[settings] operator[=] identifier[HadoopSettingsManager] operator[SEP] identifier[loadFrom] operator[SEP] identifier[configuration] operator[SEP] operator[SEP] identifier[InitializationUtils] operator[SEP] identifier[setUserProviderIfNotSet] operator[SEP] identifier[settings] , identifier[HadoopUserProvider] operator[SEP] Keyword[class] , identifier[LOG] operator[SEP] operator[SEP] identifier[UserProvider] identifier[userProvider] operator[=] identifier[UserProvider] operator[SEP] identifier[create] operator[SEP] identifier[settings] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[userProvider] operator[SEP] identifier[isEsKerberosEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[User] identifier[user] operator[=] identifier[userProvider] operator[SEP] identifier[getUser] operator[SEP] operator[SEP] operator[SEP] identifier[ClusterInfo] identifier[clusterInfo] operator[=] identifier[settings] operator[SEP] identifier[getClusterInfoOrNull] operator[SEP] operator[SEP] operator[SEP] identifier[RestClient] identifier[bootstrap] operator[=] Keyword[new] identifier[RestClient] operator[SEP] identifier[settings] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[clusterInfo] operator[==] Other[null] operator[SEP] { identifier[clusterInfo] operator[=] identifier[bootstrap] operator[SEP] identifier[mainInfo] operator[SEP] operator[SEP] operator[SEP] } identifier[TokenUtil] operator[SEP] identifier[addTokenForJob] operator[SEP] identifier[bootstrap] , identifier[clusterInfo] operator[SEP] identifier[getClusterName] operator[SEP] operator[SEP] , identifier[user] , identifier[job] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[EsHadoopException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[EsHadoopIllegalArgumentException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] operator[+] literal[String] operator[+] literal[String] , identifier[ConfigurationOptions] operator[SEP] identifier[ES_NODES_WAN_ONLY] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } Keyword[finally] { identifier[bootstrap] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] } } }
@Override public <T> T getUtility(AdWordsSession session, Class<T> utilityClass) { T originalUtilityObject = adWordsServices.getUtility(session, utilityClass); return getProxyObject(originalUtilityObject, session, utilityClass, true); }
class class_name[name] begin[{] method[getUtility, return_type[type[T]], modifier[public], parameter[session, utilityClass]] begin[{] local_variable[type[T], originalUtilityObject] return[call[.getProxyObject, parameter[member[.originalUtilityObject], member[.session], member[.utilityClass], literal[true]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[getUtility] operator[SEP] identifier[AdWordsSession] identifier[session] , identifier[Class] operator[<] identifier[T] operator[>] identifier[utilityClass] operator[SEP] { identifier[T] identifier[originalUtilityObject] operator[=] identifier[adWordsServices] operator[SEP] identifier[getUtility] operator[SEP] identifier[session] , identifier[utilityClass] operator[SEP] operator[SEP] Keyword[return] identifier[getProxyObject] operator[SEP] identifier[originalUtilityObject] , identifier[session] , identifier[utilityClass] , literal[boolean] operator[SEP] operator[SEP] }
private boolean canAlterRelation(Collection<String> identifiers) throws GuacamoleException { // System administrators may alter any relations if (getCurrentUser().getUser().isAdministrator()) return true; // Non-admin users require UPDATE permission on the parent object ... if (!getParentObjectEffectivePermissionSet().hasPermission( ObjectPermission.Type.UPDATE, parent.getIdentifier())) return false; // ... as well as UPDATE permission on all child objects being changed Collection<String> accessibleIdentifiers = getChildObjectEffectivePermissionSet().getAccessibleObjects( Collections.singleton(ObjectPermission.Type.UPDATE), identifiers); return accessibleIdentifiers.size() == identifiers.size(); }
class class_name[name] begin[{] method[canAlterRelation, return_type[type[boolean]], modifier[private], parameter[identifiers]] begin[{] if[call[.getCurrentUser, parameter[]]] begin[{] return[literal[true]] else begin[{] None end[}] if[call[.getParentObjectEffectivePermissionSet, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[Collection], accessibleIdentifiers] return[binary_operation[call[accessibleIdentifiers.size, parameter[]], ==, call[identifiers.size, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[canAlterRelation] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[identifiers] operator[SEP] Keyword[throws] identifier[GuacamoleException] { Keyword[if] operator[SEP] identifier[getCurrentUser] operator[SEP] operator[SEP] operator[SEP] identifier[getUser] operator[SEP] operator[SEP] operator[SEP] identifier[isAdministrator] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[getParentObjectEffectivePermissionSet] operator[SEP] operator[SEP] operator[SEP] identifier[hasPermission] operator[SEP] identifier[ObjectPermission] operator[SEP] identifier[Type] operator[SEP] identifier[UPDATE] , identifier[parent] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[Collection] operator[<] identifier[String] operator[>] identifier[accessibleIdentifiers] operator[=] identifier[getChildObjectEffectivePermissionSet] operator[SEP] operator[SEP] operator[SEP] identifier[getAccessibleObjects] operator[SEP] identifier[Collections] operator[SEP] identifier[singleton] operator[SEP] identifier[ObjectPermission] operator[SEP] identifier[Type] operator[SEP] identifier[UPDATE] operator[SEP] , identifier[identifiers] operator[SEP] operator[SEP] Keyword[return] identifier[accessibleIdentifiers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] identifier[identifiers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] }
public Tag[] inlineTags() { if (inlineTags == null) { inlineTags = Comment.getInlineTags(holder, text); } return inlineTags; }
class class_name[name] begin[{] method[inlineTags, return_type[type[Tag]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.inlineTags], ==, literal[null]]] begin[{] assign[member[.inlineTags], call[Comment.getInlineTags, parameter[member[.holder], member[.text]]]] else begin[{] None end[}] return[member[.inlineTags]] end[}] END[}]
Keyword[public] identifier[Tag] operator[SEP] operator[SEP] identifier[inlineTags] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[inlineTags] operator[==] Other[null] operator[SEP] { identifier[inlineTags] operator[=] identifier[Comment] operator[SEP] identifier[getInlineTags] operator[SEP] identifier[holder] , identifier[text] operator[SEP] operator[SEP] } Keyword[return] identifier[inlineTags] operator[SEP] }
public static GrayU8 edge4(GrayU8 input, GrayU8 output, boolean outsideZero ) { output = InputSanityCheck.checkDeclare(input, output); if( BoofConcurrency.USE_CONCURRENT ) { ImplBinaryInnerOps_MT.edge4(input, output); } else { ImplBinaryInnerOps.edge4(input, output); } ImplBinaryBorderOps.edge4(input, output, outsideZero); return output; }
class class_name[name] begin[{] method[edge4, return_type[type[GrayU8]], modifier[public static], parameter[input, output, outsideZero]] begin[{] assign[member[.output], call[InputSanityCheck.checkDeclare, parameter[member[.input], member[.output]]]] if[member[BoofConcurrency.USE_CONCURRENT]] begin[{] call[ImplBinaryInnerOps_MT.edge4, parameter[member[.input], member[.output]]] else begin[{] call[ImplBinaryInnerOps.edge4, parameter[member[.input], member[.output]]] end[}] call[ImplBinaryBorderOps.edge4, parameter[member[.input], member[.output], member[.outsideZero]]] return[member[.output]] end[}] END[}]
Keyword[public] Keyword[static] identifier[GrayU8] identifier[edge4] operator[SEP] identifier[GrayU8] identifier[input] , identifier[GrayU8] identifier[output] , Keyword[boolean] identifier[outsideZero] operator[SEP] { identifier[output] operator[=] identifier[InputSanityCheck] operator[SEP] identifier[checkDeclare] operator[SEP] identifier[input] , identifier[output] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[BoofConcurrency] operator[SEP] identifier[USE_CONCURRENT] operator[SEP] { identifier[ImplBinaryInnerOps_MT] operator[SEP] identifier[edge4] operator[SEP] identifier[input] , identifier[output] operator[SEP] operator[SEP] } Keyword[else] { identifier[ImplBinaryInnerOps] operator[SEP] identifier[edge4] operator[SEP] identifier[input] , identifier[output] operator[SEP] operator[SEP] } identifier[ImplBinaryBorderOps] operator[SEP] identifier[edge4] operator[SEP] identifier[input] , identifier[output] , identifier[outsideZero] operator[SEP] operator[SEP] Keyword[return] identifier[output] operator[SEP] }
public static <P extends ParaObject> P fromJSON(String json) { if (StringUtils.isBlank(json)) { return null; } try { Map<String, Object> map = getJsonReader(Map.class).readValue(json); return setAnnotatedFields(map); } catch (Exception e) { logger.error(null, e); } return null; }
class class_name[name] begin[{] method[fromJSON, return_type[type[P]], modifier[public static], parameter[json]] begin[{] if[call[StringUtils.isBlank, parameter[member[.json]]]] begin[{] return[literal[null]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Map, sub_type=None))], member=getJsonReader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=json, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=map)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAnnotatedFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], 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=['Exception']))], finally_block=None, label=None, resources=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[P] Keyword[extends] identifier[ParaObject] operator[>] identifier[P] identifier[fromJSON] operator[SEP] identifier[String] identifier[json] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[json] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[try] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[map] operator[=] identifier[getJsonReader] operator[SEP] identifier[Map] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[readValue] operator[SEP] identifier[json] operator[SEP] operator[SEP] Keyword[return] identifier[setAnnotatedFields] operator[SEP] identifier[map] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] Other[null] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
@Benchmark @OperationsPerInvocation(20) public void benchmarkByteBuddy(Blackhole blackHole) { blackHole.consume(byteBuddyInstance.method(booleanValue)); blackHole.consume(byteBuddyInstance.method(byteValue)); blackHole.consume(byteBuddyInstance.method(shortValue)); blackHole.consume(byteBuddyInstance.method(intValue)); blackHole.consume(byteBuddyInstance.method(charValue)); blackHole.consume(byteBuddyInstance.method(intValue)); blackHole.consume(byteBuddyInstance.method(longValue)); blackHole.consume(byteBuddyInstance.method(floatValue)); blackHole.consume(byteBuddyInstance.method(doubleValue)); blackHole.consume(byteBuddyInstance.method(stringValue)); blackHole.consume(byteBuddyInstance.method(booleanValue, booleanValue, booleanValue)); blackHole.consume(byteBuddyInstance.method(byteValue, byteValue, byteValue)); blackHole.consume(byteBuddyInstance.method(shortValue, shortValue, shortValue)); blackHole.consume(byteBuddyInstance.method(intValue, intValue, intValue)); blackHole.consume(byteBuddyInstance.method(charValue, charValue, charValue)); blackHole.consume(byteBuddyInstance.method(intValue, intValue, intValue)); blackHole.consume(byteBuddyInstance.method(longValue, longValue, longValue)); blackHole.consume(byteBuddyInstance.method(floatValue, floatValue, floatValue)); blackHole.consume(byteBuddyInstance.method(doubleValue, doubleValue, doubleValue)); blackHole.consume(byteBuddyInstance.method(stringValue, stringValue, stringValue)); }
class class_name[name] begin[{] method[benchmarkByteBuddy, return_type[void], modifier[public], parameter[blackHole]] begin[{] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.booleanValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.byteValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.shortValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.intValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.charValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.intValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.longValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.floatValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.doubleValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.stringValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.booleanValue], member[.booleanValue], member[.booleanValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.byteValue], member[.byteValue], member[.byteValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.shortValue], member[.shortValue], member[.shortValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.intValue], member[.intValue], member[.intValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.charValue], member[.charValue], member[.charValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.intValue], member[.intValue], member[.intValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.longValue], member[.longValue], member[.longValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.floatValue], member[.floatValue], member[.floatValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.doubleValue], member[.doubleValue], member[.doubleValue]]]]] call[blackHole.consume, parameter[call[byteBuddyInstance.method, parameter[member[.stringValue], member[.stringValue], member[.stringValue]]]]] end[}] END[}]
annotation[@] identifier[Benchmark] annotation[@] identifier[OperationsPerInvocation] operator[SEP] Other[20] operator[SEP] Keyword[public] Keyword[void] identifier[benchmarkByteBuddy] operator[SEP] identifier[Blackhole] identifier[blackHole] operator[SEP] { identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[byteValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[shortValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[charValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[floatValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[stringValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[booleanValue] , identifier[booleanValue] , identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[byteValue] , identifier[byteValue] , identifier[byteValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[shortValue] , identifier[shortValue] , identifier[shortValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[intValue] , identifier[intValue] , identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[charValue] , identifier[charValue] , identifier[charValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[intValue] , identifier[intValue] , identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[longValue] , identifier[longValue] , identifier[longValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[floatValue] , identifier[floatValue] , identifier[floatValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[doubleValue] , identifier[doubleValue] , identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[blackHole] operator[SEP] identifier[consume] operator[SEP] identifier[byteBuddyInstance] operator[SEP] identifier[method] operator[SEP] identifier[stringValue] , identifier[stringValue] , identifier[stringValue] operator[SEP] operator[SEP] operator[SEP] }
public Acl getDefaultBucketAcl(String bucketName) { // [START getDefaultBucketAcl] Acl acl = storage.getDefaultAcl(bucketName, User.ofAllAuthenticatedUsers()); // [END getDefaultBucketAcl] return acl; }
class class_name[name] begin[{] method[getDefaultBucketAcl, return_type[type[Acl]], modifier[public], parameter[bucketName]] begin[{] local_variable[type[Acl], acl] return[member[.acl]] end[}] END[}]
Keyword[public] identifier[Acl] identifier[getDefaultBucketAcl] operator[SEP] identifier[String] identifier[bucketName] operator[SEP] { identifier[Acl] identifier[acl] operator[=] identifier[storage] operator[SEP] identifier[getDefaultAcl] operator[SEP] identifier[bucketName] , identifier[User] operator[SEP] identifier[ofAllAuthenticatedUsers] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[acl] operator[SEP] }
public void analyze() { for (String key : importSource.getKeys()) { Change change = createChange(key); setConflictAttributes(change); if (change.getType() != Change.TYPE_NO_CHANGE) { if (change.isConflicting()) { conflictingChanges.add(change); } else { nonConflictingChanges.add(change); } } } }
class class_name[name] begin[{] method[analyze, return_type[void], modifier[public], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createChange, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=change)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Change, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=change, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setConflictAttributes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=change, selectors=[], type_arguments=None), operandr=MemberReference(member=TYPE_NO_CHANGE, postfix_operators=[], prefix_operators=[], qualifier=Change, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isConflicting, postfix_operators=[], prefix_operators=[], qualifier=change, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=change, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=nonConflictingChanges, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=change, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=conflictingChanges, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getKeys, postfix_operators=[], prefix_operators=[], qualifier=importSource, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[analyze] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[importSource] operator[SEP] identifier[getKeys] operator[SEP] operator[SEP] operator[SEP] { identifier[Change] identifier[change] operator[=] identifier[createChange] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[setConflictAttributes] operator[SEP] identifier[change] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[change] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[!=] identifier[Change] operator[SEP] identifier[TYPE_NO_CHANGE] operator[SEP] { Keyword[if] operator[SEP] identifier[change] operator[SEP] identifier[isConflicting] operator[SEP] operator[SEP] operator[SEP] { identifier[conflictingChanges] operator[SEP] identifier[add] operator[SEP] identifier[change] operator[SEP] operator[SEP] } Keyword[else] { identifier[nonConflictingChanges] operator[SEP] identifier[add] operator[SEP] identifier[change] operator[SEP] operator[SEP] } } } }
@Override public void deploy(InputStream inputStream) throws IOException { final List<? extends HasMetadata> entities = deploy("application", inputStream); if (this.applicationName == null) { Optional<String> deploymentConfig = entities.stream() .filter(hm -> hm instanceof DeploymentConfig) .map(hm -> (DeploymentConfig) hm) .map(dc -> dc.getMetadata().getName()).findFirst(); deploymentConfig.ifPresent(name -> this.applicationName = name); } }
class class_name[name] begin[{] method[deploy, return_type[void], modifier[public], parameter[inputStream]] begin[{] local_variable[type[List], entities] if[binary_operation[THIS[member[None.applicationName]], ==, literal[null]]] begin[{] local_variable[type[Optional], deploymentConfig] call[deploymentConfig.ifPresent, parameter[LambdaExpression(body=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=applicationName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), parameters=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[deploy] operator[SEP] identifier[InputStream] identifier[inputStream] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[List] operator[<] operator[?] Keyword[extends] identifier[HasMetadata] operator[>] identifier[entities] operator[=] identifier[deploy] operator[SEP] literal[String] , identifier[inputStream] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[applicationName] operator[==] Other[null] operator[SEP] { identifier[Optional] operator[<] identifier[String] operator[>] identifier[deploymentConfig] operator[=] identifier[entities] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[hm] operator[->] identifier[hm] Keyword[instanceof] identifier[DeploymentConfig] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[hm] operator[->] operator[SEP] identifier[DeploymentConfig] operator[SEP] identifier[hm] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[dc] operator[->] identifier[dc] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[findFirst] operator[SEP] operator[SEP] operator[SEP] identifier[deploymentConfig] operator[SEP] identifier[ifPresent] operator[SEP] identifier[name] operator[->] Keyword[this] operator[SEP] identifier[applicationName] operator[=] identifier[name] operator[SEP] operator[SEP] } }
protected HttpServletResponse getCurrentResponse() { final HttpServletResponse response = httpService.getCurrentResponse(); if (response == null) { throw new IllegalStateException("No HttpServletResponse bound to current thread"); } return response; }
class class_name[name] begin[{] method[getCurrentResponse, return_type[type[HttpServletResponse]], modifier[protected], parameter[]] begin[{] local_variable[type[HttpServletResponse], response] if[binary_operation[member[.response], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No HttpServletResponse bound to current thread")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.response]] end[}] END[}]
Keyword[protected] identifier[HttpServletResponse] identifier[getCurrentResponse] operator[SEP] operator[SEP] { Keyword[final] identifier[HttpServletResponse] identifier[response] operator[=] identifier[httpService] operator[SEP] identifier[getCurrentResponse] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[response] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[response] operator[SEP] }
@Override public boolean ready () throws IOException { _ensureOpen (); /* * If newline needs to be skipped and the next char to be read is a newline * character, then just skip it right away. */ if (m_bSkipLF) { /* * Note that in.ready() will return true if and only if the next read on * the stream will not block. */ if (m_nNextCharIndex >= m_nChars && m_aReader.ready ()) _fill (); if (m_nNextCharIndex < m_nChars) { if (m_aBuf[m_nNextCharIndex] == '\n') m_nNextCharIndex++; m_bSkipLF = false; } } return m_nNextCharIndex < m_nChars || m_aReader.ready (); }
class class_name[name] begin[{] method[ready, return_type[type[boolean]], modifier[public], parameter[]] begin[{] call[._ensureOpen, parameter[]] if[member[.m_bSkipLF]] begin[{] if[binary_operation[binary_operation[member[.m_nNextCharIndex], >=, member[.m_nChars]], &&, call[m_aReader.ready, parameter[]]]] begin[{] call[._fill, parameter[]] else begin[{] None end[}] if[binary_operation[member[.m_nNextCharIndex], <, member[.m_nChars]]] begin[{] if[binary_operation[member[.m_aBuf], ==, literal['\n']]] begin[{] member[.m_nNextCharIndex] else begin[{] None end[}] assign[member[.m_bSkipLF], literal[false]] else begin[{] None end[}] else begin[{] None end[}] return[binary_operation[binary_operation[member[.m_nNextCharIndex], <, member[.m_nChars]], ||, call[m_aReader.ready, parameter[]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[ready] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[_ensureOpen] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_bSkipLF] operator[SEP] { Keyword[if] operator[SEP] identifier[m_nNextCharIndex] operator[>=] identifier[m_nChars] operator[&&] identifier[m_aReader] operator[SEP] identifier[ready] operator[SEP] operator[SEP] operator[SEP] identifier[_fill] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_nNextCharIndex] operator[<] identifier[m_nChars] operator[SEP] { Keyword[if] operator[SEP] identifier[m_aBuf] operator[SEP] identifier[m_nNextCharIndex] operator[SEP] operator[==] literal[String] operator[SEP] identifier[m_nNextCharIndex] operator[++] operator[SEP] identifier[m_bSkipLF] operator[=] literal[boolean] operator[SEP] } } Keyword[return] identifier[m_nNextCharIndex] operator[<] identifier[m_nChars] operator[||] identifier[m_aReader] operator[SEP] identifier[ready] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings({"unchecked"}) public OutputCollector getCollector(String namedOutput, Reporter reporter) throws IOException { return getCollector(namedOutput, null, reporter); }
class class_name[name] begin[{] method[getCollector, return_type[type[OutputCollector]], modifier[public], parameter[namedOutput, reporter]] begin[{] return[call[.getCollector, parameter[member[.namedOutput], literal[null], member[.reporter]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] } operator[SEP] Keyword[public] identifier[OutputCollector] identifier[getCollector] operator[SEP] identifier[String] identifier[namedOutput] , identifier[Reporter] identifier[reporter] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[getCollector] operator[SEP] identifier[namedOutput] , Other[null] , identifier[reporter] operator[SEP] operator[SEP] }
public static final <T extends Calendar> Function<T, LocalTime> calendarToLocalTime(Chronology chronology) { return new CalendarToLocalTime<T>(chronology); }
class class_name[name] begin[{] method[calendarToLocalTime, return_type[type[Function]], modifier[final public static], parameter[chronology]] begin[{] return[ClassCreator(arguments=[MemberReference(member=chronology, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=CalendarToLocalTime, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] operator[<] identifier[T] Keyword[extends] identifier[Calendar] operator[>] identifier[Function] operator[<] identifier[T] , identifier[LocalTime] operator[>] identifier[calendarToLocalTime] operator[SEP] identifier[Chronology] identifier[chronology] operator[SEP] { Keyword[return] Keyword[new] identifier[CalendarToLocalTime] operator[<] identifier[T] operator[>] operator[SEP] identifier[chronology] operator[SEP] operator[SEP] }
public String getDigitPattern() { String pattern = Optional.fromNullable(getParameter(SignalParameters.DIGIT_PATTERN.symbol())).or(""); if (!pattern.isEmpty()) { // Replace pattern to comply with MEGACO digitMap pattern = pattern.replace(".", "*").replace("x", "\\d"); } return pattern; }
class class_name[name] begin[{] method[getDigitPattern, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], pattern] if[call[pattern.isEmpty, parameter[]]] begin[{] assign[member[.pattern], call[pattern.replace, parameter[literal["."], literal["*"]]]] else begin[{] None end[}] return[member[.pattern]] end[}] END[}]
Keyword[public] identifier[String] identifier[getDigitPattern] operator[SEP] operator[SEP] { identifier[String] identifier[pattern] operator[=] identifier[Optional] operator[SEP] identifier[fromNullable] operator[SEP] identifier[getParameter] operator[SEP] identifier[SignalParameters] operator[SEP] identifier[DIGIT_PATTERN] operator[SEP] identifier[symbol] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[or] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[pattern] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[pattern] operator[=] identifier[pattern] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[pattern] operator[SEP] }
public static void showToolbar( final CmsToolbar toolbar, final boolean show, final CmsStyleVariable toolbarVisibility) { if (show) { toolbarVisibility.setValue(null); } else { toolbarVisibility.setValue(I_CmsLayoutBundle.INSTANCE.toolbarCss().toolbarHide()); } }
class class_name[name] begin[{] method[showToolbar, return_type[void], modifier[public static], parameter[toolbar, show, toolbarVisibility]] begin[{] if[member[.show]] begin[{] call[toolbarVisibility.setValue, parameter[literal[null]]] else begin[{] call[toolbarVisibility.setValue, parameter[call[I_CmsLayoutBundle.INSTANCE.toolbarCss, parameter[]]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[showToolbar] operator[SEP] Keyword[final] identifier[CmsToolbar] identifier[toolbar] , Keyword[final] Keyword[boolean] identifier[show] , Keyword[final] identifier[CmsStyleVariable] identifier[toolbarVisibility] operator[SEP] { Keyword[if] operator[SEP] identifier[show] operator[SEP] { identifier[toolbarVisibility] operator[SEP] identifier[setValue] operator[SEP] Other[null] operator[SEP] operator[SEP] } Keyword[else] { identifier[toolbarVisibility] operator[SEP] identifier[setValue] operator[SEP] identifier[I_CmsLayoutBundle] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[toolbarCss] operator[SEP] operator[SEP] operator[SEP] identifier[toolbarHide] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
protected boolean generateSarlMembers(List<? extends XtendMember> members, ExtraLanguageAppendable it, IExtraLanguageGeneratorContext context) { for (final XtendMember member : members) { if (!(member instanceof SarlConstructor)) { if (context.getCancelIndicator().isCanceled()) { return false; } generate(member, it, context); } } return true; }
class class_name[name] begin[{] method[generateSarlMembers, return_type[type[boolean]], modifier[protected], parameter[members, it, context]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=member, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=SarlConstructor, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getCancelIndicator, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[MethodInvocation(arguments=[], member=isCanceled, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=member, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=it, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=members, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=member)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=XtendMember, sub_type=None))), label=None) return[literal[true]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[generateSarlMembers] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[XtendMember] operator[>] identifier[members] , identifier[ExtraLanguageAppendable] identifier[it] , identifier[IExtraLanguageGeneratorContext] identifier[context] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[XtendMember] identifier[member] operator[:] identifier[members] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[member] Keyword[instanceof] identifier[SarlConstructor] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[context] operator[SEP] identifier[getCancelIndicator] operator[SEP] operator[SEP] operator[SEP] identifier[isCanceled] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[generate] operator[SEP] identifier[member] , identifier[it] , identifier[context] operator[SEP] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public boolean explicitlySupportsMimeType (@Nullable final IMimeType aMimeType) { if (aMimeType == null) return false; final QValue aQuality = m_aMap.get (aMimeType); return aQuality != null && aQuality.isAboveMinimumQuality (); }
class class_name[name] begin[{] method[explicitlySupportsMimeType, return_type[type[boolean]], modifier[public], parameter[aMimeType]] begin[{] if[binary_operation[member[.aMimeType], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[QValue], aQuality] return[binary_operation[binary_operation[member[.aQuality], !=, literal[null]], &&, call[aQuality.isAboveMinimumQuality, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[explicitlySupportsMimeType] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[IMimeType] identifier[aMimeType] operator[SEP] { Keyword[if] operator[SEP] identifier[aMimeType] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[final] identifier[QValue] identifier[aQuality] operator[=] identifier[m_aMap] operator[SEP] identifier[get] operator[SEP] identifier[aMimeType] operator[SEP] operator[SEP] Keyword[return] identifier[aQuality] operator[!=] Other[null] operator[&&] identifier[aQuality] operator[SEP] identifier[isAboveMinimumQuality] operator[SEP] operator[SEP] operator[SEP] }
@Deprecated public Blade get(@NonNull String path, @NonNull RouteHandler0 handler) { this.routeMatcher.addRoute(path, handler, HttpMethod.GET); return this; }
class class_name[name] begin[{] method[get, return_type[type[Blade]], modifier[public], parameter[path, handler]] begin[{] THIS[member[None.routeMatcher]call[None.addRoute, parameter[member[.path], member[.handler], member[HttpMethod.GET]]]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] identifier[Blade] identifier[get] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[path] , annotation[@] identifier[NonNull] identifier[RouteHandler0] identifier[handler] operator[SEP] { Keyword[this] operator[SEP] identifier[routeMatcher] operator[SEP] identifier[addRoute] operator[SEP] identifier[path] , identifier[handler] , identifier[HttpMethod] operator[SEP] identifier[GET] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static <T extends JsonBuilder> T create(Class<T> clz, String payload) { T ret = create(clz); ret.load(payload); return ret; }
class class_name[name] begin[{] method[create, return_type[type[T]], modifier[public static], parameter[clz, payload]] begin[{] local_variable[type[T], ret] call[ret.load, parameter[member[.payload]]] return[member[.ret]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[JsonBuilder] operator[>] identifier[T] identifier[create] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clz] , identifier[String] identifier[payload] operator[SEP] { identifier[T] identifier[ret] operator[=] identifier[create] operator[SEP] identifier[clz] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[load] operator[SEP] identifier[payload] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
public static Set<BioPAXElement> runNeighborhood( Set<BioPAXElement> sourceSet, Model model, int limit, Direction direction, Filter... filters) { Graph graph; if (model.getLevel() == BioPAXLevel.L3) { if (direction == Direction.UNDIRECTED) { graph = new GraphL3Undirected(model, filters); direction = Direction.BOTHSTREAM; } else { graph = new GraphL3(model, filters); } } else return Collections.emptySet(); Set<Node> source = prepareSingleNodeSet(sourceSet, graph); if (sourceSet.isEmpty()) return Collections.emptySet(); NeighborhoodQuery query = new NeighborhoodQuery(source, direction, limit); Set<GraphObject> resultWrappers = query.run(); return convertQueryResult(resultWrappers, graph, true); }
class class_name[name] begin[{] method[runNeighborhood, return_type[type[Set]], modifier[public static], parameter[sourceSet, model, limit, direction, filters]] begin[{] local_variable[type[Graph], graph] if[binary_operation[call[model.getLevel, parameter[]], ==, member[BioPAXLevel.L3]]] begin[{] if[binary_operation[member[.direction], ==, member[Direction.UNDIRECTED]]] begin[{] assign[member[.graph], ClassCreator(arguments=[MemberReference(member=model, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GraphL3Undirected, sub_type=None))] assign[member[.direction], member[Direction.BOTHSTREAM]] else begin[{] assign[member[.graph], ClassCreator(arguments=[MemberReference(member=model, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GraphL3, sub_type=None))] end[}] else begin[{] return[call[Collections.emptySet, parameter[]]] end[}] local_variable[type[Set], source] if[call[sourceSet.isEmpty, parameter[]]] begin[{] return[call[Collections.emptySet, parameter[]]] else begin[{] None end[}] local_variable[type[NeighborhoodQuery], query] local_variable[type[Set], resultWrappers] return[call[.convertQueryResult, parameter[member[.resultWrappers], member[.graph], literal[true]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[BioPAXElement] operator[>] identifier[runNeighborhood] operator[SEP] identifier[Set] operator[<] identifier[BioPAXElement] operator[>] identifier[sourceSet] , identifier[Model] identifier[model] , Keyword[int] identifier[limit] , identifier[Direction] identifier[direction] , identifier[Filter] operator[...] identifier[filters] operator[SEP] { identifier[Graph] identifier[graph] operator[SEP] Keyword[if] operator[SEP] identifier[model] operator[SEP] identifier[getLevel] operator[SEP] operator[SEP] operator[==] identifier[BioPAXLevel] operator[SEP] identifier[L3] operator[SEP] { Keyword[if] operator[SEP] identifier[direction] operator[==] identifier[Direction] operator[SEP] identifier[UNDIRECTED] operator[SEP] { identifier[graph] operator[=] Keyword[new] identifier[GraphL3Undirected] operator[SEP] identifier[model] , identifier[filters] operator[SEP] operator[SEP] identifier[direction] operator[=] identifier[Direction] operator[SEP] identifier[BOTHSTREAM] operator[SEP] } Keyword[else] { identifier[graph] operator[=] Keyword[new] identifier[GraphL3] operator[SEP] identifier[model] , identifier[filters] operator[SEP] operator[SEP] } } Keyword[else] Keyword[return] identifier[Collections] operator[SEP] identifier[emptySet] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Node] operator[>] identifier[source] operator[=] identifier[prepareSingleNodeSet] operator[SEP] identifier[sourceSet] , identifier[graph] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sourceSet] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Collections] operator[SEP] identifier[emptySet] operator[SEP] operator[SEP] operator[SEP] identifier[NeighborhoodQuery] identifier[query] operator[=] Keyword[new] identifier[NeighborhoodQuery] operator[SEP] identifier[source] , identifier[direction] , identifier[limit] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[GraphObject] operator[>] identifier[resultWrappers] operator[=] identifier[query] operator[SEP] identifier[run] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[convertQueryResult] operator[SEP] identifier[resultWrappers] , identifier[graph] , literal[boolean] operator[SEP] operator[SEP] }
public static final ConfirmOptions newOptions(final String message) { ConfirmOptions options = JavaScriptObject.createObject().cast(); options.setMessage(message); options.setCallback(ConfirmCallback.DEFAULT_CONFIRM_CALLBACK); return options; }
class class_name[name] begin[{] method[newOptions, return_type[type[ConfirmOptions]], modifier[final public static], parameter[message]] begin[{] local_variable[type[ConfirmOptions], options] call[options.setMessage, parameter[member[.message]]] call[options.setCallback, parameter[member[ConfirmCallback.DEFAULT_CONFIRM_CALLBACK]]] return[member[.options]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] identifier[ConfirmOptions] identifier[newOptions] operator[SEP] Keyword[final] identifier[String] identifier[message] operator[SEP] { identifier[ConfirmOptions] identifier[options] operator[=] identifier[JavaScriptObject] operator[SEP] identifier[createObject] operator[SEP] operator[SEP] operator[SEP] identifier[cast] operator[SEP] operator[SEP] operator[SEP] identifier[options] operator[SEP] identifier[setMessage] operator[SEP] identifier[message] operator[SEP] operator[SEP] identifier[options] operator[SEP] identifier[setCallback] operator[SEP] identifier[ConfirmCallback] operator[SEP] identifier[DEFAULT_CONFIRM_CALLBACK] operator[SEP] operator[SEP] Keyword[return] identifier[options] operator[SEP] }
public AddTags addTags(String photoId, List<String> tags) throws JinxException { JinxUtils.validateParams(photoId, tags); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.photos.addTags"); params.put("photo_id", photoId); StringBuilder sb = new StringBuilder(); for (String tag : tags) { if (tag.contains(" ")) { sb.append('"').append(tag).append('"'); } else { sb.append(tag); } sb.append(' '); } sb.deleteCharAt(sb.length() - 1); params.put("tags", sb.toString()); return this.jinx.flickrPost(params, AddTags.class); }
class class_name[name] begin[{] method[addTags, return_type[type[AddTags]], modifier[public], parameter[photoId, tags]] begin[{] call[JinxUtils.validateParams, parameter[member[.photoId], member[.tags]]] local_variable[type[Map], params] call[params.put, parameter[literal["method"], literal["flickr.photos.addTags"]]] call[params.put, parameter[literal["photo_id"], member[.photoId]]] local_variable[type[StringBuilder], sb] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" ")], member=contains, postfix_operators=[], prefix_operators=[], qualifier=tag, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='"')], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='"')], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' ')], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=tags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tag)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[sb.deleteCharAt, parameter[binary_operation[call[sb.length, parameter[]], -, literal[1]]]] call[params.put, parameter[literal["tags"], call[sb.toString, parameter[]]]] return[THIS[member[None.jinx]call[None.flickrPost, parameter[member[.params], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AddTags, sub_type=None))]]]] end[}] END[}]
Keyword[public] identifier[AddTags] identifier[addTags] operator[SEP] identifier[String] identifier[photoId] , identifier[List] operator[<] identifier[String] operator[>] identifier[tags] operator[SEP] Keyword[throws] identifier[JinxException] { identifier[JinxUtils] operator[SEP] identifier[validateParams] operator[SEP] identifier[photoId] , identifier[tags] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[=] Keyword[new] identifier[TreeMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[photoId] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[tag] operator[:] identifier[tags] operator[SEP] { Keyword[if] operator[SEP] identifier[tag] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[tag] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[tag] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[deleteCharAt] operator[SEP] identifier[sb] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[jinx] operator[SEP] identifier[flickrPost] operator[SEP] identifier[params] , identifier[AddTags] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public static String getFileExtension(final String path) { if (path == null) { return null; } int extIndex = path.lastIndexOf('.'); if (extIndex == -1) { return null; } int folderIndex = getFileSeparatorIndex(path); if (folderIndex > extIndex) { return null; } return path.substring(extIndex + 1); }
class class_name[name] begin[{] method[getFileExtension, return_type[type[String]], modifier[public static], parameter[path]] begin[{] if[binary_operation[member[.path], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[int], extIndex] if[binary_operation[member[.extIndex], ==, literal[1]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[int], folderIndex] if[binary_operation[member[.folderIndex], >, member[.extIndex]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[path.substring, parameter[binary_operation[member[.extIndex], +, literal[1]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getFileExtension] operator[SEP] Keyword[final] identifier[String] identifier[path] operator[SEP] { Keyword[if] operator[SEP] identifier[path] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[int] identifier[extIndex] operator[=] identifier[path] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[extIndex] operator[==] operator[-] Other[1] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[int] identifier[folderIndex] operator[=] identifier[getFileSeparatorIndex] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[folderIndex] operator[>] identifier[extIndex] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[path] operator[SEP] identifier[substring] operator[SEP] identifier[extIndex] operator[+] Other[1] operator[SEP] operator[SEP] }
protected Key valueToKey(Value value) { if (value instanceof Resource) { return pFactory.newKey(convertResourceToQualifiedName((Resource) value), name.PROV_QUALIFIED_NAME); } else if (value instanceof Literal) { Literal lit=(Literal) value; QualifiedName type; QualifiedName xsdtype; if (lit.getDatatype()!=null) { xsdtype= convertURIToQualifiedName(lit.getDatatype()); } else { xsdtype=name.PROV_LANG_STRING; } Object o=decodeLiteral(lit); if (o instanceof QualifiedName) { return pFactory.newKey(o, name.PROV_QUALIFIED_NAME); } // Was old code, relying on converter //return pFactory.newKey(o, this.valueConverter.getXsdType(o)); return pFactory.newKey(o, xsdtype); } else if (value instanceof URI) { URI uri = (URI) (value); return pFactory.newKey(uri.toString(), name.PROV_QUALIFIED_NAME); } else if (value instanceof BNode) { return pFactory.newKey(bnodeToQualifiedName((BNode)value), name.PROV_QUALIFIED_NAME); } else { return null; } }
class class_name[name] begin[{] method[valueToKey, return_type[type[Key]], modifier[protected], parameter[value]] begin[{] if[binary_operation[member[.value], instanceof, type[Resource]]] begin[{] return[call[pFactory.newKey, parameter[call[.convertResourceToQualifiedName, parameter[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Resource, sub_type=None))]], member[name.PROV_QUALIFIED_NAME]]]] else begin[{] if[binary_operation[member[.value], instanceof, type[Literal]]] begin[{] local_variable[type[Literal], lit] local_variable[type[QualifiedName], type] local_variable[type[QualifiedName], xsdtype] if[binary_operation[call[lit.getDatatype, parameter[]], !=, literal[null]]] begin[{] assign[member[.xsdtype], call[.convertURIToQualifiedName, parameter[call[lit.getDatatype, parameter[]]]]] else begin[{] assign[member[.xsdtype], member[name.PROV_LANG_STRING]] end[}] local_variable[type[Object], o] if[binary_operation[member[.o], instanceof, type[QualifiedName]]] begin[{] return[call[pFactory.newKey, parameter[member[.o], member[name.PROV_QUALIFIED_NAME]]]] else begin[{] None end[}] return[call[pFactory.newKey, parameter[member[.o], member[.xsdtype]]]] else begin[{] if[binary_operation[member[.value], instanceof, type[URI]]] begin[{] local_variable[type[URI], uri] return[call[pFactory.newKey, parameter[call[uri.toString, parameter[]], member[name.PROV_QUALIFIED_NAME]]]] else begin[{] if[binary_operation[member[.value], instanceof, type[BNode]]] begin[{] return[call[pFactory.newKey, parameter[call[.bnodeToQualifiedName, parameter[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BNode, sub_type=None))]], member[name.PROV_QUALIFIED_NAME]]]] else begin[{] return[literal[null]] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[protected] identifier[Key] identifier[valueToKey] operator[SEP] identifier[Value] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Resource] operator[SEP] { Keyword[return] identifier[pFactory] operator[SEP] identifier[newKey] operator[SEP] identifier[convertResourceToQualifiedName] operator[SEP] operator[SEP] identifier[Resource] operator[SEP] identifier[value] operator[SEP] , identifier[name] operator[SEP] identifier[PROV_QUALIFIED_NAME] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Literal] operator[SEP] { identifier[Literal] identifier[lit] operator[=] operator[SEP] identifier[Literal] operator[SEP] identifier[value] operator[SEP] identifier[QualifiedName] identifier[type] operator[SEP] identifier[QualifiedName] identifier[xsdtype] operator[SEP] Keyword[if] operator[SEP] identifier[lit] operator[SEP] identifier[getDatatype] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[xsdtype] operator[=] identifier[convertURIToQualifiedName] operator[SEP] identifier[lit] operator[SEP] identifier[getDatatype] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[xsdtype] operator[=] identifier[name] operator[SEP] identifier[PROV_LANG_STRING] operator[SEP] } identifier[Object] identifier[o] operator[=] identifier[decodeLiteral] operator[SEP] identifier[lit] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[QualifiedName] operator[SEP] { Keyword[return] identifier[pFactory] operator[SEP] identifier[newKey] operator[SEP] identifier[o] , identifier[name] operator[SEP] identifier[PROV_QUALIFIED_NAME] operator[SEP] operator[SEP] } Keyword[return] identifier[pFactory] operator[SEP] identifier[newKey] operator[SEP] identifier[o] , identifier[xsdtype] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[URI] operator[SEP] { identifier[URI] identifier[uri] operator[=] operator[SEP] identifier[URI] operator[SEP] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[return] identifier[pFactory] operator[SEP] identifier[newKey] operator[SEP] identifier[uri] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[name] operator[SEP] identifier[PROV_QUALIFIED_NAME] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[BNode] operator[SEP] { Keyword[return] identifier[pFactory] operator[SEP] identifier[newKey] operator[SEP] identifier[bnodeToQualifiedName] operator[SEP] operator[SEP] identifier[BNode] operator[SEP] identifier[value] operator[SEP] , identifier[name] operator[SEP] identifier[PROV_QUALIFIED_NAME] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
public int getActiveQuickWindowId() { Response response = executeMessage(DesktopWindowManagerMessage.GET_ACTIVE_WINDOW, null); DesktopWindowID.Builder builder = DesktopWindowID.newBuilder(); buildPayload(response, builder); activeWindowId = builder.build().getWindowID(); return activeWindowId; }
class class_name[name] begin[{] method[getActiveQuickWindowId, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[Response], response] local_variable[type[DesktopWindowID], builder] call[.buildPayload, parameter[member[.response], member[.builder]]] assign[member[.activeWindowId], call[builder.build, parameter[]]] return[member[.activeWindowId]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getActiveQuickWindowId] operator[SEP] operator[SEP] { identifier[Response] identifier[response] operator[=] identifier[executeMessage] operator[SEP] identifier[DesktopWindowManagerMessage] operator[SEP] identifier[GET_ACTIVE_WINDOW] , Other[null] operator[SEP] operator[SEP] identifier[DesktopWindowID] operator[SEP] identifier[Builder] identifier[builder] operator[=] identifier[DesktopWindowID] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[buildPayload] operator[SEP] identifier[response] , identifier[builder] operator[SEP] operator[SEP] identifier[activeWindowId] operator[=] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[getWindowID] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[activeWindowId] operator[SEP] }
public void updateRow(int i, double c, Vec b) { if(b.length() != this.cols()) throw new ArithmeticException("vector is not of the same column length"); if (b.isSparse()) for (IndexValue iv : b) this.increment(i, iv.getIndex(), c * iv.getValue()); else for (int j = 0; j < b.length(); j++) this.increment(i, j, c * b.get(j)); }
class class_name[name] begin[{] method[updateRow, return_type[void], modifier[public], parameter[i, c, b]] begin[{] if[binary_operation[call[b.length, parameter[]], !=, THIS[call[None.cols, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="vector is not of the same column length")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArithmeticException, sub_type=None)), label=None) else begin[{] None end[}] if[call[b.isSparse, parameter[]]] begin[{] ForStatement(body=StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getIndex, postfix_operators=[], prefix_operators=[], qualifier=iv, selectors=[], type_arguments=None), BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=iv, selectors=[], type_arguments=None), operator=*)], member=increment, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), control=EnhancedForControl(iterable=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=iv)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IndexValue, sub_type=None))), label=None) else begin[{] ForStatement(body=StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), operator=*)], member=increment, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), 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) end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[updateRow] operator[SEP] Keyword[int] identifier[i] , Keyword[double] identifier[c] , identifier[Vec] identifier[b] operator[SEP] { Keyword[if] operator[SEP] identifier[b] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[!=] Keyword[this] operator[SEP] identifier[cols] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ArithmeticException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[b] operator[SEP] identifier[isSparse] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[IndexValue] identifier[iv] operator[:] identifier[b] operator[SEP] Keyword[this] operator[SEP] identifier[increment] operator[SEP] identifier[i] , identifier[iv] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] , identifier[c] operator[*] identifier[iv] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[b] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[++] operator[SEP] Keyword[this] operator[SEP] identifier[increment] operator[SEP] identifier[i] , identifier[j] , identifier[c] operator[*] identifier[b] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] operator[SEP] operator[SEP] }
public static RepositorySetup forUri(String uri) { MongoClientURI clientUri = new MongoClientURI(uri); @Nullable String databaseName = clientUri.getDatabase(); checkArgument(databaseName != null, "URI should contain database path segment"); return builder() .database(newMongoClient(clientUri).getDatabase(databaseName)) .executor(newExecutor()) .gson(createGson()) .build(); }
class class_name[name] begin[{] method[forUri, return_type[type[RepositorySetup]], modifier[public static], parameter[uri]] begin[{] local_variable[type[MongoClientURI], clientUri] local_variable[type[String], databaseName] call[.checkArgument, parameter[binary_operation[member[.databaseName], !=, literal[null]], literal["URI should contain database path segment"]]] return[call[.builder, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[RepositorySetup] identifier[forUri] operator[SEP] identifier[String] identifier[uri] operator[SEP] { identifier[MongoClientURI] identifier[clientUri] operator[=] Keyword[new] identifier[MongoClientURI] operator[SEP] identifier[uri] operator[SEP] operator[SEP] annotation[@] identifier[Nullable] identifier[String] identifier[databaseName] operator[=] identifier[clientUri] operator[SEP] identifier[getDatabase] operator[SEP] operator[SEP] operator[SEP] identifier[checkArgument] operator[SEP] identifier[databaseName] operator[!=] Other[null] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[database] operator[SEP] identifier[newMongoClient] operator[SEP] identifier[clientUri] operator[SEP] operator[SEP] identifier[getDatabase] operator[SEP] identifier[databaseName] operator[SEP] operator[SEP] operator[SEP] identifier[executor] operator[SEP] identifier[newExecutor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[gson] operator[SEP] identifier[createGson] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public static BooleanPath booleanPath(Path<?> parent, String property) { return new BooleanPath(PathMetadataFactory.forProperty(parent, property)); }
class class_name[name] begin[{] method[booleanPath, return_type[type[BooleanPath]], modifier[public static], parameter[parent, property]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forProperty, postfix_operators=[], prefix_operators=[], qualifier=PathMetadataFactory, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BooleanPath, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[BooleanPath] identifier[booleanPath] operator[SEP] identifier[Path] operator[<] operator[?] operator[>] identifier[parent] , identifier[String] identifier[property] operator[SEP] { Keyword[return] Keyword[new] identifier[BooleanPath] operator[SEP] identifier[PathMetadataFactory] operator[SEP] identifier[forProperty] operator[SEP] identifier[parent] , identifier[property] operator[SEP] operator[SEP] operator[SEP] }
@Deprecated public KeyStore loadPKCS12File(String pathToP12, String password) throws CertificateException, IOException { try (InputStream keystoreInputStream = CertUtils.toInputStream(pathToP12)) { return loadPKCS12File(keystoreInputStream, password); } }
class class_name[name] begin[{] method[loadPKCS12File, return_type[type[KeyStore]], modifier[public], parameter[pathToP12, password]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=keystoreInputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=password, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadPKCS12File, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=keystoreInputStream, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[MemberReference(member=pathToP12, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toInputStream, postfix_operators=[], prefix_operators=[], qualifier=CertUtils, selectors=[], type_arguments=None))]) end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] identifier[KeyStore] identifier[loadPKCS12File] operator[SEP] identifier[String] identifier[pathToP12] , identifier[String] identifier[password] operator[SEP] Keyword[throws] identifier[CertificateException] , identifier[IOException] { Keyword[try] operator[SEP] identifier[InputStream] identifier[keystoreInputStream] operator[=] identifier[CertUtils] operator[SEP] identifier[toInputStream] operator[SEP] identifier[pathToP12] operator[SEP] operator[SEP] { Keyword[return] identifier[loadPKCS12File] operator[SEP] identifier[keystoreInputStream] , identifier[password] operator[SEP] operator[SEP] } }
public static TransTypes instance(Context context) { TransTypes instance = context.get(transTypesKey); if (instance == null) instance = new TransTypes(context); return instance; }
class class_name[name] begin[{] method[instance, return_type[type[TransTypes]], modifier[public static], parameter[context]] begin[{] local_variable[type[TransTypes], instance] if[binary_operation[member[.instance], ==, literal[null]]] begin[{] assign[member[.instance], ClassCreator(arguments=[MemberReference(member=context, 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=TransTypes, sub_type=None))] else begin[{] None end[}] return[member[.instance]] end[}] END[}]
Keyword[public] Keyword[static] identifier[TransTypes] identifier[instance] operator[SEP] identifier[Context] identifier[context] operator[SEP] { identifier[TransTypes] identifier[instance] operator[=] identifier[context] operator[SEP] identifier[get] operator[SEP] identifier[transTypesKey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[instance] operator[==] Other[null] operator[SEP] identifier[instance] operator[=] Keyword[new] identifier[TransTypes] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[return] identifier[instance] operator[SEP] }
public static int cusparseScsr2gebsr_bufferSize( cusparseHandle handle, int dirA, int m, int n, cusparseMatDescr descrA, Pointer csrSortedValA, Pointer csrSortedRowPtrA, Pointer csrSortedColIndA, int rowBlockDim, int colBlockDim, int[] pBufferSizeInBytes) { return checkResult(cusparseScsr2gebsr_bufferSizeNative(handle, dirA, m, n, descrA, csrSortedValA, csrSortedRowPtrA, csrSortedColIndA, rowBlockDim, colBlockDim, pBufferSizeInBytes)); }
class class_name[name] begin[{] method[cusparseScsr2gebsr_bufferSize, return_type[type[int]], modifier[public static], parameter[handle, dirA, m, n, descrA, csrSortedValA, csrSortedRowPtrA, csrSortedColIndA, rowBlockDim, colBlockDim, pBufferSizeInBytes]] begin[{] return[call[.checkResult, parameter[call[.cusparseScsr2gebsr_bufferSizeNative, parameter[member[.handle], member[.dirA], member[.m], member[.n], member[.descrA], member[.csrSortedValA], member[.csrSortedRowPtrA], member[.csrSortedColIndA], member[.rowBlockDim], member[.colBlockDim], member[.pBufferSizeInBytes]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[cusparseScsr2gebsr_bufferSize] operator[SEP] identifier[cusparseHandle] identifier[handle] , Keyword[int] identifier[dirA] , Keyword[int] identifier[m] , Keyword[int] identifier[n] , identifier[cusparseMatDescr] identifier[descrA] , identifier[Pointer] identifier[csrSortedValA] , identifier[Pointer] identifier[csrSortedRowPtrA] , identifier[Pointer] identifier[csrSortedColIndA] , Keyword[int] identifier[rowBlockDim] , Keyword[int] identifier[colBlockDim] , Keyword[int] operator[SEP] operator[SEP] identifier[pBufferSizeInBytes] operator[SEP] { Keyword[return] identifier[checkResult] operator[SEP] identifier[cusparseScsr2gebsr_bufferSizeNative] operator[SEP] identifier[handle] , identifier[dirA] , identifier[m] , identifier[n] , identifier[descrA] , identifier[csrSortedValA] , identifier[csrSortedRowPtrA] , identifier[csrSortedColIndA] , identifier[rowBlockDim] , identifier[colBlockDim] , identifier[pBufferSizeInBytes] operator[SEP] operator[SEP] operator[SEP] }
private static String translateFormat(String formatString, Map<String, String> mapping, String escapeStart, String escapeEnd, String targetEscapeStart, String targetEscapeEnd) { int beginIndex = 0; int i = 0; char lastChar = 0; char currentChar = 0; String resultString = ""; char esc1 = escapeStart.charAt(0); char esc2 = escapeEnd.charAt(0); for (; i < formatString.length(); i++) { currentChar = formatString.charAt(i); if (i > 0 && lastChar != currentChar) { resultString += mapSubformat(formatString, mapping, beginIndex, i, escapeStart, escapeEnd, targetEscapeStart, targetEscapeEnd); beginIndex = i; } lastChar = currentChar; if (currentChar == esc1) { i++; while (i< formatString.length() && formatString.charAt(i) != esc2) { i++; } resultString += targetEscapeStart; resultString += formatString.substring(beginIndex+1, i); resultString += targetEscapeEnd; i++; if (i < formatString.length()) { lastChar = formatString.charAt(i); } beginIndex = i; } } if (beginIndex < formatString.length() && i <= formatString.length()) { return resultString + mapSubformat(formatString, mapping, beginIndex, i, escapeStart, escapeEnd, targetEscapeStart, targetEscapeEnd); } else { return resultString; } }
class class_name[name] begin[{] method[translateFormat, return_type[type[String]], modifier[private static], parameter[formatString, mapping, escapeStart, escapeEnd, targetEscapeStart, targetEscapeEnd]] begin[{] local_variable[type[int], beginIndex] local_variable[type[int], i] local_variable[type[char], lastChar] local_variable[type[char], currentChar] local_variable[type[String], resultString] local_variable[type[char], esc1] local_variable[type[char], esc2] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=formatString, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=lastChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=currentChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=resultString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=formatString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mapping, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=beginIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=escapeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=escapeEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetEscapeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetEscapeEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=mapSubformat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=beginIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=currentChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=currentChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=esc1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=formatString, selectors=[], type_arguments=None), operator=<), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=formatString, selectors=[], type_arguments=None), operandr=MemberReference(member=esc2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=resultString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=targetEscapeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=resultString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=beginIndex, 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=substring, postfix_operators=[], prefix_operators=[], qualifier=formatString, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=resultString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=targetEscapeEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=formatString, selectors=[], type_arguments=None), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=formatString, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=beginIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=formatString, selectors=[], type_arguments=None), operator=<), init=None, update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[binary_operation[member[.beginIndex], <, call[formatString.length, parameter[]]], &&, binary_operation[member[.i], <=, call[formatString.length, parameter[]]]]] begin[{] return[binary_operation[member[.resultString], +, call[.mapSubformat, parameter[member[.formatString], member[.mapping], member[.beginIndex], member[.i], member[.escapeStart], member[.escapeEnd], member[.targetEscapeStart], member[.targetEscapeEnd]]]]] else begin[{] return[member[.resultString]] end[}] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[translateFormat] operator[SEP] identifier[String] identifier[formatString] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[mapping] , identifier[String] identifier[escapeStart] , identifier[String] identifier[escapeEnd] , identifier[String] identifier[targetEscapeStart] , identifier[String] identifier[targetEscapeEnd] operator[SEP] { Keyword[int] identifier[beginIndex] operator[=] Other[0] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[char] identifier[lastChar] operator[=] Other[0] operator[SEP] Keyword[char] identifier[currentChar] operator[=] Other[0] operator[SEP] identifier[String] identifier[resultString] operator[=] literal[String] operator[SEP] Keyword[char] identifier[esc1] operator[=] identifier[escapeStart] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[char] identifier[esc2] operator[=] identifier[escapeEnd] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[formatString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[currentChar] operator[=] identifier[formatString] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[>] Other[0] operator[&&] identifier[lastChar] operator[!=] identifier[currentChar] operator[SEP] { identifier[resultString] operator[+=] identifier[mapSubformat] operator[SEP] identifier[formatString] , identifier[mapping] , identifier[beginIndex] , identifier[i] , identifier[escapeStart] , identifier[escapeEnd] , identifier[targetEscapeStart] , identifier[targetEscapeEnd] operator[SEP] operator[SEP] identifier[beginIndex] operator[=] identifier[i] operator[SEP] } identifier[lastChar] operator[=] identifier[currentChar] operator[SEP] Keyword[if] operator[SEP] identifier[currentChar] operator[==] identifier[esc1] operator[SEP] { identifier[i] operator[++] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[<] identifier[formatString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[&&] identifier[formatString] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[!=] identifier[esc2] operator[SEP] { identifier[i] operator[++] operator[SEP] } identifier[resultString] operator[+=] identifier[targetEscapeStart] operator[SEP] identifier[resultString] operator[+=] identifier[formatString] operator[SEP] identifier[substring] operator[SEP] identifier[beginIndex] operator[+] Other[1] , identifier[i] operator[SEP] operator[SEP] identifier[resultString] operator[+=] identifier[targetEscapeEnd] operator[SEP] identifier[i] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[<] identifier[formatString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[lastChar] operator[=] identifier[formatString] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] } identifier[beginIndex] operator[=] identifier[i] operator[SEP] } } Keyword[if] operator[SEP] identifier[beginIndex] operator[<] identifier[formatString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[&&] identifier[i] operator[<=] identifier[formatString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[resultString] operator[+] identifier[mapSubformat] operator[SEP] identifier[formatString] , identifier[mapping] , identifier[beginIndex] , identifier[i] , identifier[escapeStart] , identifier[escapeEnd] , identifier[targetEscapeStart] , identifier[targetEscapeEnd] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[resultString] operator[SEP] } }
public boolean pathExists(String path) { String[] pathElements = path.split("/"); ZConfig current = this; for (String pathElem : pathElements) { if (pathElem.isEmpty()) { continue; } current = current.children.get(pathElem); if (current == null) { return false; } } return true; }
class class_name[name] begin[{] method[pathExists, return_type[type[boolean]], modifier[public], parameter[path]] begin[{] local_variable[type[String], pathElements] local_variable[type[ZConfig], current] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=pathElem, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=pathElem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=current.children, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=pathElements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pathElem)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[pathExists] operator[SEP] identifier[String] identifier[path] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[pathElements] operator[=] identifier[path] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ZConfig] identifier[current] operator[=] Keyword[this] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[pathElem] operator[:] identifier[pathElements] operator[SEP] { Keyword[if] operator[SEP] identifier[pathElem] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[current] operator[=] identifier[current] operator[SEP] identifier[children] operator[SEP] identifier[get] operator[SEP] identifier[pathElem] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
@Override public void release() throws IOException { if (includeLevel.in != null && end != cursor) { if (end % size < cursor % size) { buffer2.position(0); buffer2.limit((int)(end % size)); buffer1.position((int)(cursor % size)); buffer1.limit(size); } else { buffer2.position((int)(cursor % size)); buffer2.limit((int)(end % size)); buffer1.position(size); } if (features.contains(UsePushback)) { if (includeLevel.in instanceof Pushbackable) { Pushbackable p = (Pushbackable) includeLevel.in; p.pushback(array2); } else { unread(includeLevel.in); } } else { if (includeLevel.in instanceof Rewindable) { Rewindable rewindable = (Rewindable) includeLevel.in; rewindable.rewind((int)(end-cursor)); } else { unread(includeLevel.in); } } buffer1.clear(); buffer2.clear(); end = cursor; } }
class class_name[name] begin[{] method[release, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[member[includeLevel.in], !=, literal[null]], &&, binary_operation[member[.end], !=, member[.cursor]]]] begin[{] if[binary_operation[binary_operation[member[.end], %, member[.size]], <, binary_operation[member[.cursor], %, member[.size]]]] begin[{] call[buffer2.position, parameter[literal[0]]] call[buffer2.limit, parameter[Cast(expression=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=%), type=BasicType(dimensions=[], name=int))]] call[buffer1.position, parameter[Cast(expression=BinaryOperation(operandl=MemberReference(member=cursor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=%), type=BasicType(dimensions=[], name=int))]] call[buffer1.limit, parameter[member[.size]]] else begin[{] call[buffer2.position, parameter[Cast(expression=BinaryOperation(operandl=MemberReference(member=cursor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=%), type=BasicType(dimensions=[], name=int))]] call[buffer2.limit, parameter[Cast(expression=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=%), type=BasicType(dimensions=[], name=int))]] call[buffer1.position, parameter[member[.size]]] end[}] if[call[features.contains, parameter[member[.UsePushback]]]] begin[{] if[binary_operation[member[includeLevel.in], instanceof, type[Pushbackable]]] begin[{] local_variable[type[Pushbackable], p] call[p.pushback, parameter[member[.array2]]] else begin[{] call[.unread, parameter[member[includeLevel.in]]] end[}] else begin[{] if[binary_operation[member[includeLevel.in], instanceof, type[Rewindable]]] begin[{] local_variable[type[Rewindable], rewindable] call[rewindable.rewind, parameter[Cast(expression=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=cursor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), type=BasicType(dimensions=[], name=int))]] else begin[{] call[.unread, parameter[member[includeLevel.in]]] end[}] end[}] call[buffer1.clear, parameter[]] call[buffer2.clear, parameter[]] assign[member[.end], member[.cursor]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[release] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[includeLevel] operator[SEP] identifier[in] operator[!=] Other[null] operator[&&] identifier[end] operator[!=] identifier[cursor] operator[SEP] { Keyword[if] operator[SEP] identifier[end] operator[%] identifier[size] operator[<] identifier[cursor] operator[%] identifier[size] operator[SEP] { identifier[buffer2] operator[SEP] identifier[position] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[buffer2] operator[SEP] identifier[limit] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[end] operator[%] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[buffer1] operator[SEP] identifier[position] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[cursor] operator[%] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[buffer1] operator[SEP] identifier[limit] operator[SEP] identifier[size] operator[SEP] operator[SEP] } Keyword[else] { identifier[buffer2] operator[SEP] identifier[position] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[cursor] operator[%] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[buffer2] operator[SEP] identifier[limit] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[end] operator[%] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[buffer1] operator[SEP] identifier[position] operator[SEP] identifier[size] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[features] operator[SEP] identifier[contains] operator[SEP] identifier[UsePushback] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[includeLevel] operator[SEP] identifier[in] Keyword[instanceof] identifier[Pushbackable] operator[SEP] { identifier[Pushbackable] identifier[p] operator[=] operator[SEP] identifier[Pushbackable] operator[SEP] identifier[includeLevel] operator[SEP] identifier[in] operator[SEP] identifier[p] operator[SEP] identifier[pushback] operator[SEP] identifier[array2] operator[SEP] operator[SEP] } Keyword[else] { identifier[unread] operator[SEP] identifier[includeLevel] operator[SEP] identifier[in] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[includeLevel] operator[SEP] identifier[in] Keyword[instanceof] identifier[Rewindable] operator[SEP] { identifier[Rewindable] identifier[rewindable] operator[=] operator[SEP] identifier[Rewindable] operator[SEP] identifier[includeLevel] operator[SEP] identifier[in] operator[SEP] identifier[rewindable] operator[SEP] identifier[rewind] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[end] operator[-] identifier[cursor] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[unread] operator[SEP] identifier[includeLevel] operator[SEP] identifier[in] operator[SEP] operator[SEP] } } identifier[buffer1] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[buffer2] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[end] operator[=] identifier[cursor] operator[SEP] } }
private static DataTable2D bivariateMatrix(Dataframe dataSet, BivariateType type) { DataTable2D bivariateMatrix = new DataTable2D(); //extract values of first variable Map<Object, TypeInference.DataType> columnTypes = dataSet.getXDataTypes(); Object[] allVariables = columnTypes.keySet().toArray(); int numberOfVariables = allVariables.length; TransposeDataList transposeDataList; for(int i=0;i<numberOfVariables;++i) { Object variable0 = allVariables[i]; if(columnTypes.get(variable0)==TypeInference.DataType.CATEGORICAL) { continue; } transposeDataList = new TransposeDataList(); //extract values of first variable transposeDataList.put(0, dataSet.getXColumn(variable0)); for(int j=i;j<numberOfVariables;++j) { Object variable1 = allVariables[j]; if(columnTypes.get(variable1)==TypeInference.DataType.CATEGORICAL) { continue; } transposeDataList.put(1, dataSet.getXColumn(variable1)); double value = 0.0; if(type==BivariateType.COVARIANCE) { value = Descriptives.covariance(transposeDataList, true); } else if(type==BivariateType.PEARSONCORRELATION) { if(variable0.equals(variable1)) { value=1.0; } else { value = PearsonCorrelation.calculateCorrelation(transposeDataList); } } else if(type==BivariateType.SPEARMANCORRELATION) { if(variable0.equals(variable1)) { value=1.0; } else { value = SpearmanCorrelation.calculateCorrelation(transposeDataList); } } else if(type==BivariateType.KENDALLTAUCORRELATION) { if(variable0.equals(variable1)) { value=1.0; } else { value = KendallTauCorrelation.calculateCorrelation(transposeDataList); } } //bivariateMatrix.internalData.get(variable0).internalData.put(variable1, value); bivariateMatrix.put2d(variable0, variable1, value); if(!variable0.equals(variable1)) { /* if(!bivariateMatrix.internalData.containsKey(variable1)) { bivariateMatrix.internalData.put(variable1, new AssociativeArray()); } bivariateMatrix.internalData.get(variable1).internalData.put(variable0, value); */ bivariateMatrix.put2d(variable1, variable0, value); } } //transposeDataList = null; } return bivariateMatrix; }
class class_name[name] begin[{] method[bivariateMatrix, return_type[type[DataTable2D]], modifier[private static], parameter[dataSet, type]] begin[{] local_variable[type[DataTable2D], bivariateMatrix] local_variable[type[Map], columnTypes] local_variable[type[Object], allVariables] local_variable[type[int], numberOfVariables] local_variable[type[TransposeDataList], transposeDataList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=allVariables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=variable0)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=variable0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=columnTypes, selectors=[], type_arguments=None), operandr=MemberReference(member=CATEGORICAL, postfix_operators=[], prefix_operators=[], qualifier=TypeInference.DataType, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=transposeDataList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TransposeDataList, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[MemberReference(member=variable0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getXColumn, postfix_operators=[], prefix_operators=[], qualifier=dataSet, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=transposeDataList, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=allVariables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=variable1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=variable1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=columnTypes, selectors=[], type_arguments=None), operandr=MemberReference(member=CATEGORICAL, postfix_operators=[], prefix_operators=[], qualifier=TypeInference.DataType, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MethodInvocation(arguments=[MemberReference(member=variable1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getXColumn, postfix_operators=[], prefix_operators=[], qualifier=dataSet, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=transposeDataList, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), name=value)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COVARIANCE, postfix_operators=[], prefix_operators=[], qualifier=BivariateType, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=PEARSONCORRELATION, postfix_operators=[], prefix_operators=[], qualifier=BivariateType, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SPEARMANCORRELATION, postfix_operators=[], prefix_operators=[], qualifier=BivariateType, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=KENDALLTAUCORRELATION, postfix_operators=[], prefix_operators=[], qualifier=BivariateType, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=variable1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=variable0, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=transposeDataList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=calculateCorrelation, postfix_operators=[], prefix_operators=[], qualifier=KendallTauCorrelation, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=variable1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=variable0, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=transposeDataList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=calculateCorrelation, postfix_operators=[], prefix_operators=[], qualifier=SpearmanCorrelation, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=variable1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=variable0, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=transposeDataList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=calculateCorrelation, postfix_operators=[], prefix_operators=[], qualifier=PearsonCorrelation, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0)), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=transposeDataList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=covariance, postfix_operators=[], prefix_operators=[], qualifier=Descriptives, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=variable0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=variable1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put2d, postfix_operators=[], prefix_operators=[], qualifier=bivariateMatrix, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=variable1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=variable0, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=variable1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=variable0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put2d, postfix_operators=[], prefix_operators=[], qualifier=bivariateMatrix, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numberOfVariables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=numberOfVariables, 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[.bivariateMatrix]] end[}] END[}]
Keyword[private] Keyword[static] identifier[DataTable2D] identifier[bivariateMatrix] operator[SEP] identifier[Dataframe] identifier[dataSet] , identifier[BivariateType] identifier[type] operator[SEP] { identifier[DataTable2D] identifier[bivariateMatrix] operator[=] Keyword[new] identifier[DataTable2D] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[Object] , identifier[TypeInference] operator[SEP] identifier[DataType] operator[>] identifier[columnTypes] operator[=] identifier[dataSet] operator[SEP] identifier[getXDataTypes] operator[SEP] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[allVariables] operator[=] identifier[columnTypes] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[numberOfVariables] operator[=] identifier[allVariables] operator[SEP] identifier[length] operator[SEP] identifier[TransposeDataList] identifier[transposeDataList] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numberOfVariables] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[Object] identifier[variable0] operator[=] identifier[allVariables] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[columnTypes] operator[SEP] identifier[get] operator[SEP] identifier[variable0] operator[SEP] operator[==] identifier[TypeInference] operator[SEP] identifier[DataType] operator[SEP] identifier[CATEGORICAL] operator[SEP] { Keyword[continue] operator[SEP] } identifier[transposeDataList] operator[=] Keyword[new] identifier[TransposeDataList] operator[SEP] operator[SEP] operator[SEP] identifier[transposeDataList] operator[SEP] identifier[put] operator[SEP] Other[0] , identifier[dataSet] operator[SEP] identifier[getXColumn] operator[SEP] identifier[variable0] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[i] operator[SEP] identifier[j] operator[<] identifier[numberOfVariables] operator[SEP] operator[++] identifier[j] operator[SEP] { identifier[Object] identifier[variable1] operator[=] identifier[allVariables] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[columnTypes] operator[SEP] identifier[get] operator[SEP] identifier[variable1] operator[SEP] operator[==] identifier[TypeInference] operator[SEP] identifier[DataType] operator[SEP] identifier[CATEGORICAL] operator[SEP] { Keyword[continue] operator[SEP] } identifier[transposeDataList] operator[SEP] identifier[put] operator[SEP] Other[1] , identifier[dataSet] operator[SEP] identifier[getXColumn] operator[SEP] identifier[variable1] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[value] operator[=] literal[Float] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[==] identifier[BivariateType] operator[SEP] identifier[COVARIANCE] operator[SEP] { identifier[value] operator[=] identifier[Descriptives] operator[SEP] identifier[covariance] operator[SEP] identifier[transposeDataList] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] identifier[BivariateType] operator[SEP] identifier[PEARSONCORRELATION] operator[SEP] { Keyword[if] operator[SEP] identifier[variable0] operator[SEP] identifier[equals] operator[SEP] identifier[variable1] operator[SEP] operator[SEP] { identifier[value] operator[=] literal[Float] operator[SEP] } Keyword[else] { identifier[value] operator[=] identifier[PearsonCorrelation] operator[SEP] identifier[calculateCorrelation] operator[SEP] identifier[transposeDataList] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] identifier[BivariateType] operator[SEP] identifier[SPEARMANCORRELATION] operator[SEP] { Keyword[if] operator[SEP] identifier[variable0] operator[SEP] identifier[equals] operator[SEP] identifier[variable1] operator[SEP] operator[SEP] { identifier[value] operator[=] literal[Float] operator[SEP] } Keyword[else] { identifier[value] operator[=] identifier[SpearmanCorrelation] operator[SEP] identifier[calculateCorrelation] operator[SEP] identifier[transposeDataList] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] identifier[BivariateType] operator[SEP] identifier[KENDALLTAUCORRELATION] operator[SEP] { Keyword[if] operator[SEP] identifier[variable0] operator[SEP] identifier[equals] operator[SEP] identifier[variable1] operator[SEP] operator[SEP] { identifier[value] operator[=] literal[Float] operator[SEP] } Keyword[else] { identifier[value] operator[=] identifier[KendallTauCorrelation] operator[SEP] identifier[calculateCorrelation] operator[SEP] identifier[transposeDataList] operator[SEP] operator[SEP] } } identifier[bivariateMatrix] operator[SEP] identifier[put2d] operator[SEP] identifier[variable0] , identifier[variable1] , identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[variable0] operator[SEP] identifier[equals] operator[SEP] identifier[variable1] operator[SEP] operator[SEP] { identifier[bivariateMatrix] operator[SEP] identifier[put2d] operator[SEP] identifier[variable1] , identifier[variable0] , identifier[value] operator[SEP] operator[SEP] } } } Keyword[return] identifier[bivariateMatrix] operator[SEP] }
public void buildClassConstantSummary(XMLNode node, Content summariesTree) throws DocletException { SortedSet<TypeElement> classes = !currentPackage.isUnnamed() ? utils.getAllClasses(currentPackage) : configuration.typeElementCatalog.allUnnamedClasses(); Content classConstantTree = writer.getClassConstantHeader(); for (TypeElement te : classes) { if (!typeElementsWithConstFields.contains(te) || !utils.isIncluded(te)) { continue; } currentClass = te; //Build the documentation for the current class. buildChildren(node, classConstantTree); } writer.addClassConstant(summariesTree, classConstantTree); }
class class_name[name] begin[{] method[buildClassConstantSummary, return_type[void], modifier[public], parameter[node, summariesTree]] begin[{] local_variable[type[SortedSet], classes] local_variable[type[Content], classConstantTree] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=te, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=typeElementsWithConstFields, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=te, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isIncluded, postfix_operators=[], prefix_operators=['!'], qualifier=utils, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=currentClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=te, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=classConstantTree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=buildChildren, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=classes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=te)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TypeElement, sub_type=None))), label=None) call[writer.addClassConstant, parameter[member[.summariesTree], member[.classConstantTree]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[buildClassConstantSummary] operator[SEP] identifier[XMLNode] identifier[node] , identifier[Content] identifier[summariesTree] operator[SEP] Keyword[throws] identifier[DocletException] { identifier[SortedSet] operator[<] identifier[TypeElement] operator[>] identifier[classes] operator[=] operator[!] identifier[currentPackage] operator[SEP] identifier[isUnnamed] operator[SEP] operator[SEP] operator[?] identifier[utils] operator[SEP] identifier[getAllClasses] operator[SEP] identifier[currentPackage] operator[SEP] operator[:] identifier[configuration] operator[SEP] identifier[typeElementCatalog] operator[SEP] identifier[allUnnamedClasses] operator[SEP] operator[SEP] operator[SEP] identifier[Content] identifier[classConstantTree] operator[=] identifier[writer] operator[SEP] identifier[getClassConstantHeader] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[TypeElement] identifier[te] operator[:] identifier[classes] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[typeElementsWithConstFields] operator[SEP] identifier[contains] operator[SEP] identifier[te] operator[SEP] operator[||] operator[!] identifier[utils] operator[SEP] identifier[isIncluded] operator[SEP] identifier[te] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[currentClass] operator[=] identifier[te] operator[SEP] identifier[buildChildren] operator[SEP] identifier[node] , identifier[classConstantTree] operator[SEP] operator[SEP] } identifier[writer] operator[SEP] identifier[addClassConstant] operator[SEP] identifier[summariesTree] , identifier[classConstantTree] operator[SEP] operator[SEP] }
public static DatatypeFactory newInstance() throws DatatypeConfigurationException { try { return (DatatypeFactory) FactoryFinder.find( /* The default property name according to the JAXP spec */ DATATYPEFACTORY_PROPERTY, /* The fallback implementation class name */ DATATYPEFACTORY_IMPLEMENTATION_CLASS); } catch (FactoryFinder.ConfigurationError e) { throw new DatatypeConfigurationException(e.getMessage(), e.getException()); } }
class class_name[name] begin[{] method[newInstance, return_type[type[DatatypeFactory]], modifier[public static], parameter[]] begin[{] TryStatement(block=[ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=DATATYPEFACTORY_PROPERTY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=DATATYPEFACTORY_IMPLEMENTATION_CLASS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=find, postfix_operators=[], prefix_operators=[], qualifier=FactoryFinder, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=DatatypeFactory, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getException, 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=DatatypeConfigurationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['FactoryFinder.ConfigurationError']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[DatatypeFactory] identifier[newInstance] operator[SEP] operator[SEP] Keyword[throws] identifier[DatatypeConfigurationException] { Keyword[try] { Keyword[return] operator[SEP] identifier[DatatypeFactory] operator[SEP] identifier[FactoryFinder] operator[SEP] identifier[find] operator[SEP] identifier[DATATYPEFACTORY_PROPERTY] , identifier[DATATYPEFACTORY_IMPLEMENTATION_CLASS] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[FactoryFinder] operator[SEP] identifier[ConfigurationError] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[DatatypeConfigurationException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] identifier[getException] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private byte[] transform(byte[] classfileBuffer, InstrumentationActions instrumentationActions) { ClassReader classReader = new ClassReader(classfileBuffer); ClassWriter classWriter = new ClassWriter(classReader, ClassWriter.COMPUTE_FRAMES); ClassVisitor localVariableStateEmitterTestClassVisitor = new StateTrackingClassVisitor(classWriter, instrumentationActions); classReader.accept(localVariableStateEmitterTestClassVisitor, 0); return classWriter.toByteArray(); }
class class_name[name] begin[{] method[transform, return_type[type[byte]], modifier[private], parameter[classfileBuffer, instrumentationActions]] begin[{] local_variable[type[ClassReader], classReader] local_variable[type[ClassWriter], classWriter] local_variable[type[ClassVisitor], localVariableStateEmitterTestClassVisitor] call[classReader.accept, parameter[member[.localVariableStateEmitterTestClassVisitor], literal[0]]] return[call[classWriter.toByteArray, parameter[]]] end[}] END[}]
Keyword[private] Keyword[byte] operator[SEP] operator[SEP] identifier[transform] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[classfileBuffer] , identifier[InstrumentationActions] identifier[instrumentationActions] operator[SEP] { identifier[ClassReader] identifier[classReader] operator[=] Keyword[new] identifier[ClassReader] operator[SEP] identifier[classfileBuffer] operator[SEP] operator[SEP] identifier[ClassWriter] identifier[classWriter] operator[=] Keyword[new] identifier[ClassWriter] operator[SEP] identifier[classReader] , identifier[ClassWriter] operator[SEP] identifier[COMPUTE_FRAMES] operator[SEP] operator[SEP] identifier[ClassVisitor] identifier[localVariableStateEmitterTestClassVisitor] operator[=] Keyword[new] identifier[StateTrackingClassVisitor] operator[SEP] identifier[classWriter] , identifier[instrumentationActions] operator[SEP] operator[SEP] identifier[classReader] operator[SEP] identifier[accept] operator[SEP] identifier[localVariableStateEmitterTestClassVisitor] , Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[classWriter] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] }
public String writeXML( ) { XMLOutputter fmt = new XMLOutputter( Format.getPrettyFormat()); return fmt.outputString( makeDocument()); }
class class_name[name] begin[{] method[writeXML, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[XMLOutputter], fmt] return[call[fmt.outputString, parameter[call[.makeDocument, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[writeXML] operator[SEP] operator[SEP] { identifier[XMLOutputter] identifier[fmt] operator[=] Keyword[new] identifier[XMLOutputter] operator[SEP] identifier[Format] operator[SEP] identifier[getPrettyFormat] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[fmt] operator[SEP] identifier[outputString] operator[SEP] identifier[makeDocument] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public ListPlatformApplicationsResult withPlatformApplications(PlatformApplication... platformApplications) { if (this.platformApplications == null) { setPlatformApplications(new com.amazonaws.internal.SdkInternalList<PlatformApplication>(platformApplications.length)); } for (PlatformApplication ele : platformApplications) { this.platformApplications.add(ele); } return this; }
class class_name[name] begin[{] method[withPlatformApplications, return_type[type[ListPlatformApplicationsResult]], modifier[public], parameter[platformApplications]] begin[{] if[binary_operation[THIS[member[None.platformApplications]], ==, literal[null]]] begin[{] call[.setPlatformApplications, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=platformApplications, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=PlatformApplication, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=platformApplications, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=platformApplications, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PlatformApplication, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[ListPlatformApplicationsResult] identifier[withPlatformApplications] operator[SEP] identifier[PlatformApplication] operator[...] identifier[platformApplications] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[platformApplications] operator[==] Other[null] operator[SEP] { identifier[setPlatformApplications] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[PlatformApplication] operator[>] operator[SEP] identifier[platformApplications] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[PlatformApplication] identifier[ele] operator[:] identifier[platformApplications] operator[SEP] { Keyword[this] operator[SEP] identifier[platformApplications] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public void marshall(BusinessCallingSettings businessCallingSettings, ProtocolMarshaller protocolMarshaller) { if (businessCallingSettings == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(businessCallingSettings.getCdrBucket(), CDRBUCKET_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[businessCallingSettings, protocolMarshaller]] begin[{] if[binary_operation[member[.businessCallingSettings], ==, 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=getCdrBucket, postfix_operators=[], prefix_operators=[], qualifier=businessCallingSettings, selectors=[], type_arguments=None), MemberReference(member=CDRBUCKET_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[BusinessCallingSettings] identifier[businessCallingSettings] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[businessCallingSettings] 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[businessCallingSettings] operator[SEP] identifier[getCdrBucket] operator[SEP] operator[SEP] , identifier[CDRBUCKET_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 marshall(BatchListIncomingTypedLinks batchListIncomingTypedLinks, ProtocolMarshaller protocolMarshaller) { if (batchListIncomingTypedLinks == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(batchListIncomingTypedLinks.getObjectReference(), OBJECTREFERENCE_BINDING); protocolMarshaller.marshall(batchListIncomingTypedLinks.getFilterAttributeRanges(), FILTERATTRIBUTERANGES_BINDING); protocolMarshaller.marshall(batchListIncomingTypedLinks.getFilterTypedLink(), FILTERTYPEDLINK_BINDING); protocolMarshaller.marshall(batchListIncomingTypedLinks.getNextToken(), NEXTTOKEN_BINDING); protocolMarshaller.marshall(batchListIncomingTypedLinks.getMaxResults(), MAXRESULTS_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[batchListIncomingTypedLinks, protocolMarshaller]] begin[{] if[binary_operation[member[.batchListIncomingTypedLinks], ==, 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=getObjectReference, postfix_operators=[], prefix_operators=[], qualifier=batchListIncomingTypedLinks, selectors=[], type_arguments=None), MemberReference(member=OBJECTREFERENCE_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=getFilterAttributeRanges, postfix_operators=[], prefix_operators=[], qualifier=batchListIncomingTypedLinks, selectors=[], type_arguments=None), MemberReference(member=FILTERATTRIBUTERANGES_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=getFilterTypedLink, postfix_operators=[], prefix_operators=[], qualifier=batchListIncomingTypedLinks, selectors=[], type_arguments=None), MemberReference(member=FILTERTYPEDLINK_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=batchListIncomingTypedLinks, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMaxResults, postfix_operators=[], prefix_operators=[], qualifier=batchListIncomingTypedLinks, selectors=[], type_arguments=None), MemberReference(member=MAXRESULTS_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[BatchListIncomingTypedLinks] identifier[batchListIncomingTypedLinks] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[batchListIncomingTypedLinks] 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[batchListIncomingTypedLinks] operator[SEP] identifier[getObjectReference] operator[SEP] operator[SEP] , identifier[OBJECTREFERENCE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[batchListIncomingTypedLinks] operator[SEP] identifier[getFilterAttributeRanges] operator[SEP] operator[SEP] , identifier[FILTERATTRIBUTERANGES_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[batchListIncomingTypedLinks] operator[SEP] identifier[getFilterTypedLink] operator[SEP] operator[SEP] , identifier[FILTERTYPEDLINK_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[batchListIncomingTypedLinks] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[batchListIncomingTypedLinks] operator[SEP] identifier[getMaxResults] operator[SEP] operator[SEP] , identifier[MAXRESULTS_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 boolean shouldIgnore(MaterialConfig materialConfig, String name) { return materialConfig.matches(FilenameUtils.separatorsToUnix(name), processedPattern()); }
class class_name[name] begin[{] method[shouldIgnore, return_type[type[boolean]], modifier[public], parameter[materialConfig, name]] begin[{] return[call[materialConfig.matches, parameter[call[FilenameUtils.separatorsToUnix, parameter[member[.name]]], call[.processedPattern, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[shouldIgnore] operator[SEP] identifier[MaterialConfig] identifier[materialConfig] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[materialConfig] operator[SEP] identifier[matches] operator[SEP] identifier[FilenameUtils] operator[SEP] identifier[separatorsToUnix] operator[SEP] identifier[name] operator[SEP] , identifier[processedPattern] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static double shinglerSimilarity(String text1, String text2, int w) { preprocessDocument(text1); preprocessDocument(text2); NgramsExtractor.Parameters parameters = new NgramsExtractor.Parameters(); parameters.setMaxCombinations(w); parameters.setMaxDistanceBetweenKwds(0); parameters.setExaminationWindowLength(w); NgramsExtractor ngrams = new NgramsExtractor(parameters); Map<String, Double> keywords1 = ngrams.extract(text1); Map<String, Double> keywords2 = ngrams.extract(text2); //remove all the other combinations except of the w-grams filterKeywordCombinations(keywords1, w); filterKeywordCombinations(keywords2, w); //ngrams=null; //parameters=null; double totalKeywords=0.0; double commonKeywords=0.0; Set<String> union = new HashSet<>(keywords1.keySet()); union.addAll(keywords2.keySet()); totalKeywords+=union.size(); //union=null; Set<String> intersect = new HashSet<>(keywords1.keySet()); intersect.retainAll(keywords2.keySet()); commonKeywords+=intersect.size(); //intersect=null; double resemblance=commonKeywords/totalKeywords; //keywords1=null; //keywords2=null; return resemblance; }
class class_name[name] begin[{] method[shinglerSimilarity, return_type[type[double]], modifier[public static], parameter[text1, text2, w]] begin[{] call[.preprocessDocument, parameter[member[.text1]]] call[.preprocessDocument, parameter[member[.text2]]] local_variable[type[NgramsExtractor], parameters] call[parameters.setMaxCombinations, parameter[member[.w]]] call[parameters.setMaxDistanceBetweenKwds, parameter[literal[0]]] call[parameters.setExaminationWindowLength, parameter[member[.w]]] local_variable[type[NgramsExtractor], ngrams] local_variable[type[Map], keywords1] local_variable[type[Map], keywords2] call[.filterKeywordCombinations, parameter[member[.keywords1], member[.w]]] call[.filterKeywordCombinations, parameter[member[.keywords2], member[.w]]] local_variable[type[double], totalKeywords] local_variable[type[double], commonKeywords] local_variable[type[Set], union] call[union.addAll, parameter[call[keywords2.keySet, parameter[]]]] assign[member[.totalKeywords], call[union.size, parameter[]]] local_variable[type[Set], intersect] call[intersect.retainAll, parameter[call[keywords2.keySet, parameter[]]]] assign[member[.commonKeywords], call[intersect.size, parameter[]]] local_variable[type[double], resemblance] return[member[.resemblance]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[shinglerSimilarity] operator[SEP] identifier[String] identifier[text1] , identifier[String] identifier[text2] , Keyword[int] identifier[w] operator[SEP] { identifier[preprocessDocument] operator[SEP] identifier[text1] operator[SEP] operator[SEP] identifier[preprocessDocument] operator[SEP] identifier[text2] operator[SEP] operator[SEP] identifier[NgramsExtractor] operator[SEP] identifier[Parameters] identifier[parameters] operator[=] Keyword[new] identifier[NgramsExtractor] operator[SEP] identifier[Parameters] operator[SEP] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[setMaxCombinations] operator[SEP] identifier[w] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[setMaxDistanceBetweenKwds] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[setExaminationWindowLength] operator[SEP] identifier[w] operator[SEP] operator[SEP] identifier[NgramsExtractor] identifier[ngrams] operator[=] Keyword[new] identifier[NgramsExtractor] operator[SEP] identifier[parameters] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Double] operator[>] identifier[keywords1] operator[=] identifier[ngrams] operator[SEP] identifier[extract] operator[SEP] identifier[text1] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Double] operator[>] identifier[keywords2] operator[=] identifier[ngrams] operator[SEP] identifier[extract] operator[SEP] identifier[text2] operator[SEP] operator[SEP] identifier[filterKeywordCombinations] operator[SEP] identifier[keywords1] , identifier[w] operator[SEP] operator[SEP] identifier[filterKeywordCombinations] operator[SEP] identifier[keywords2] , identifier[w] operator[SEP] operator[SEP] Keyword[double] identifier[totalKeywords] operator[=] literal[Float] operator[SEP] Keyword[double] identifier[commonKeywords] operator[=] literal[Float] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[union] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] identifier[keywords1] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[union] operator[SEP] identifier[addAll] operator[SEP] identifier[keywords2] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[totalKeywords] operator[+=] identifier[union] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[intersect] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] identifier[keywords1] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[intersect] operator[SEP] identifier[retainAll] operator[SEP] identifier[keywords2] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[commonKeywords] operator[+=] identifier[intersect] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[resemblance] operator[=] identifier[commonKeywords] operator[/] identifier[totalKeywords] operator[SEP] Keyword[return] identifier[resemblance] operator[SEP] }
private void validate(WorkflowDef def) { Preconditions.checkNotNull(def, "WorkflowDef object cannot be null"); Preconditions.checkNotNull(def.getName(), "WorkflowDef name cannot be null"); }
class class_name[name] begin[{] method[validate, return_type[void], modifier[private], parameter[def]] begin[{] call[Preconditions.checkNotNull, parameter[member[.def], literal["WorkflowDef object cannot be null"]]] call[Preconditions.checkNotNull, parameter[call[def.getName, parameter[]], literal["WorkflowDef name cannot be null"]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[validate] operator[SEP] identifier[WorkflowDef] identifier[def] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[def] , literal[String] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[def] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] }
public Update withErrors(ErrorDetail... errors) { if (this.errors == null) { setErrors(new java.util.ArrayList<ErrorDetail>(errors.length)); } for (ErrorDetail ele : errors) { this.errors.add(ele); } return this; }
class class_name[name] begin[{] method[withErrors, return_type[type[Update]], modifier[public], parameter[errors]] begin[{] if[binary_operation[THIS[member[None.errors]], ==, literal[null]]] begin[{] call[.setErrors, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=errors, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ErrorDetail, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=errors, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=errors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ErrorDetail, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[Update] identifier[withErrors] operator[SEP] identifier[ErrorDetail] operator[...] identifier[errors] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[errors] operator[==] Other[null] operator[SEP] { identifier[setErrors] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[ErrorDetail] operator[>] operator[SEP] identifier[errors] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[ErrorDetail] identifier[ele] operator[:] identifier[errors] operator[SEP] { Keyword[this] operator[SEP] identifier[errors] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static String getRid(final Object value) { Preconditions.checkNotNull(value, "Not null value required"); final String res; if (value instanceof ORID) { res = value.toString(); } else if (value instanceof OIdentifiable) { // ODocument, Vertex support res = ((OIdentifiable) value).getIdentity().toString(); } else if (value instanceof String) { res = checkRid(value); } else if (value instanceof Proxy) { // object proxy res = OObjectEntitySerializer.getRid((Proxy) value).toString(); } else { // raw (non proxy) object res = resolveIdFromObject(value); } return res; }
class class_name[name] begin[{] method[getRid, return_type[type[String]], modifier[public static], parameter[value]] begin[{] call[Preconditions.checkNotNull, parameter[member[.value], literal["Not null value required"]]] local_variable[type[String], res] if[binary_operation[member[.value], instanceof, type[ORID]]] begin[{] assign[member[.res], call[value.toString, parameter[]]] else begin[{] if[binary_operation[member[.value], instanceof, type[OIdentifiable]]] begin[{] assign[member[.res], Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=OIdentifiable, sub_type=None))] else begin[{] if[binary_operation[member[.value], instanceof, type[String]]] begin[{] assign[member[.res], call[.checkRid, parameter[member[.value]]]] else begin[{] if[binary_operation[member[.value], instanceof, type[Proxy]]] begin[{] assign[member[.res], call[OObjectEntitySerializer.getRid, parameter[Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Proxy, sub_type=None))]]] else begin[{] assign[member[.res], call[.resolveIdFromObject, parameter[member[.value]]]] end[}] end[}] end[}] end[}] return[member[.res]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getRid] operator[SEP] Keyword[final] identifier[Object] identifier[value] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[value] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[res] operator[SEP] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[ORID] operator[SEP] { identifier[res] operator[=] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[OIdentifiable] operator[SEP] { identifier[res] operator[=] operator[SEP] operator[SEP] identifier[OIdentifiable] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[getIdentity] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] { identifier[res] operator[=] identifier[checkRid] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Proxy] operator[SEP] { identifier[res] operator[=] identifier[OObjectEntitySerializer] operator[SEP] identifier[getRid] operator[SEP] operator[SEP] identifier[Proxy] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[res] operator[=] identifier[resolveIdFromObject] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[return] identifier[res] operator[SEP] }
public ServiceFuture<OperationStatus> deleteCompositeEntityRoleAsync(UUID appId, String versionId, UUID cEntityId, UUID roleId, final ServiceCallback<OperationStatus> serviceCallback) { return ServiceFuture.fromResponse(deleteCompositeEntityRoleWithServiceResponseAsync(appId, versionId, cEntityId, roleId), serviceCallback); }
class class_name[name] begin[{] method[deleteCompositeEntityRoleAsync, return_type[type[ServiceFuture]], modifier[public], parameter[appId, versionId, cEntityId, roleId, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.deleteCompositeEntityRoleWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.cEntityId], member[.roleId]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[OperationStatus] operator[>] identifier[deleteCompositeEntityRoleAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , identifier[UUID] identifier[cEntityId] , identifier[UUID] identifier[roleId] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[OperationStatus] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[deleteCompositeEntityRoleWithServiceResponseAsync] operator[SEP] identifier[appId] , identifier[versionId] , identifier[cEntityId] , identifier[roleId] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public static void pretty(final Source input, final StreamResult output) { try { // Configure transformer Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.ENCODING, "utf-8"); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "no"); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", Integer.toString(DEFAULT_INDENT)); transformer.transform(input, output); } catch (Throwable t) { throw new RuntimeException("Error during pretty-print operation", t); } }
class class_name[name] begin[{] method[pretty, return_type[void], modifier[public static], parameter[input, output]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=TransformerFactory, selectors=[MethodInvocation(arguments=[], member=newTransformer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=transformer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Transformer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ENCODING, postfix_operators=[], prefix_operators=[], qualifier=OutputKeys, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="utf-8")], member=setOutputProperty, postfix_operators=[], prefix_operators=[], qualifier=transformer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=OMIT_XML_DECLARATION, postfix_operators=[], prefix_operators=[], qualifier=OutputKeys, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="no")], member=setOutputProperty, postfix_operators=[], prefix_operators=[], qualifier=transformer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=INDENT, postfix_operators=[], prefix_operators=[], qualifier=OutputKeys, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="yes")], member=setOutputProperty, postfix_operators=[], prefix_operators=[], qualifier=transformer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="{http://xml.apache.org/xslt}indent-amount"), MethodInvocation(arguments=[MemberReference(member=DEFAULT_INDENT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], member=setOutputProperty, postfix_operators=[], prefix_operators=[], qualifier=transformer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=transform, postfix_operators=[], prefix_operators=[], qualifier=transformer, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error during pretty-print operation"), MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[pretty] operator[SEP] Keyword[final] identifier[Source] identifier[input] , Keyword[final] identifier[StreamResult] identifier[output] operator[SEP] { Keyword[try] { identifier[Transformer] identifier[transformer] operator[=] identifier[TransformerFactory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[newTransformer] operator[SEP] operator[SEP] operator[SEP] identifier[transformer] operator[SEP] identifier[setOutputProperty] operator[SEP] identifier[OutputKeys] operator[SEP] identifier[ENCODING] , literal[String] operator[SEP] operator[SEP] identifier[transformer] operator[SEP] identifier[setOutputProperty] operator[SEP] identifier[OutputKeys] operator[SEP] identifier[OMIT_XML_DECLARATION] , literal[String] operator[SEP] operator[SEP] identifier[transformer] operator[SEP] identifier[setOutputProperty] operator[SEP] identifier[OutputKeys] operator[SEP] identifier[INDENT] , literal[String] operator[SEP] operator[SEP] identifier[transformer] operator[SEP] identifier[setOutputProperty] operator[SEP] literal[String] , identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[DEFAULT_INDENT] operator[SEP] operator[SEP] operator[SEP] identifier[transformer] operator[SEP] identifier[transform] operator[SEP] identifier[input] , identifier[output] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] , identifier[t] operator[SEP] operator[SEP] } }
@Override protected Query makeQuery(Token lower, Token upper, boolean includeLower, boolean includeUpper) { return new TokenRangeQuery(lower, upper, includeLower, includeUpper, this); }
class class_name[name] begin[{] method[makeQuery, return_type[type[Query]], modifier[protected], parameter[lower, upper, includeLower, includeUpper]] begin[{] return[ClassCreator(arguments=[MemberReference(member=lower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=upper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=includeLower, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=includeUpper, 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=None, dimensions=None, name=TokenRangeQuery, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[Query] identifier[makeQuery] operator[SEP] identifier[Token] identifier[lower] , identifier[Token] identifier[upper] , Keyword[boolean] identifier[includeLower] , Keyword[boolean] identifier[includeUpper] operator[SEP] { Keyword[return] Keyword[new] identifier[TokenRangeQuery] operator[SEP] identifier[lower] , identifier[upper] , identifier[includeLower] , identifier[includeUpper] , Keyword[this] operator[SEP] operator[SEP] }
public static void unsubscribe(Object object) throws IllegalStateException { if (!sIsInitialized) { throw new IllegalStateException("Wings must be initialized. See Wings#init()."); } WingsInjector.getBus().unregister(object); }
class class_name[name] begin[{] method[unsubscribe, return_type[void], modifier[public static], parameter[object]] begin[{] if[member[.sIsInitialized]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Wings must be initialized. See Wings#init().")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] call[WingsInjector.getBus, parameter[]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[unsubscribe] operator[SEP] identifier[Object] identifier[object] operator[SEP] Keyword[throws] identifier[IllegalStateException] { Keyword[if] operator[SEP] operator[!] identifier[sIsInitialized] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[WingsInjector] operator[SEP] identifier[getBus] operator[SEP] operator[SEP] operator[SEP] identifier[unregister] operator[SEP] identifier[object] operator[SEP] operator[SEP] }
public com.squareup.okhttp.Call getWarsWarIdAsync(Integer warId, String datasource, String ifNoneMatch, final ApiCallback<WarResponse> callback) throws ApiException { com.squareup.okhttp.Call call = getWarsWarIdValidateBeforeCall(warId, datasource, ifNoneMatch, callback); Type localVarReturnType = new TypeToken<WarResponse>() { }.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
class class_name[name] begin[{] method[getWarsWarIdAsync, return_type[type[com]], modifier[public], parameter[warId, datasource, ifNoneMatch, callback]] begin[{] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] call[apiClient.executeAsync, parameter[member[.call], member[.localVarReturnType], member[.callback]]] return[member[.call]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[getWarsWarIdAsync] operator[SEP] identifier[Integer] identifier[warId] , identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] , Keyword[final] identifier[ApiCallback] operator[<] identifier[WarResponse] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[getWarsWarIdValidateBeforeCall] operator[SEP] identifier[warId] , identifier[datasource] , identifier[ifNoneMatch] , identifier[callback] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[WarResponse] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[apiClient] operator[SEP] identifier[executeAsync] operator[SEP] identifier[call] , identifier[localVarReturnType] , identifier[callback] operator[SEP] operator[SEP] Keyword[return] identifier[call] operator[SEP] }
public void marshall(CreateDeploymentGroupRequest createDeploymentGroupRequest, ProtocolMarshaller protocolMarshaller) { if (createDeploymentGroupRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createDeploymentGroupRequest.getApplicationName(), APPLICATIONNAME_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getDeploymentGroupName(), DEPLOYMENTGROUPNAME_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getDeploymentConfigName(), DEPLOYMENTCONFIGNAME_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getEc2TagFilters(), EC2TAGFILTERS_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getOnPremisesInstanceTagFilters(), ONPREMISESINSTANCETAGFILTERS_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getAutoScalingGroups(), AUTOSCALINGGROUPS_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getServiceRoleArn(), SERVICEROLEARN_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getTriggerConfigurations(), TRIGGERCONFIGURATIONS_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getAlarmConfiguration(), ALARMCONFIGURATION_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getAutoRollbackConfiguration(), AUTOROLLBACKCONFIGURATION_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getDeploymentStyle(), DEPLOYMENTSTYLE_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getBlueGreenDeploymentConfiguration(), BLUEGREENDEPLOYMENTCONFIGURATION_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getLoadBalancerInfo(), LOADBALANCERINFO_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getEc2TagSet(), EC2TAGSET_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getEcsServices(), ECSSERVICES_BINDING); protocolMarshaller.marshall(createDeploymentGroupRequest.getOnPremisesTagSet(), ONPREMISESTAGSET_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[createDeploymentGroupRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.createDeploymentGroupRequest], ==, 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=getApplicationName, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=APPLICATIONNAME_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=getDeploymentGroupName, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=DEPLOYMENTGROUPNAME_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=getDeploymentConfigName, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=DEPLOYMENTCONFIGNAME_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=getEc2TagFilters, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=EC2TAGFILTERS_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=getOnPremisesInstanceTagFilters, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=ONPREMISESINSTANCETAGFILTERS_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=getAutoScalingGroups, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=AUTOSCALINGGROUPS_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=getServiceRoleArn, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=SERVICEROLEARN_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=getTriggerConfigurations, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=TRIGGERCONFIGURATIONS_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=getAlarmConfiguration, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=ALARMCONFIGURATION_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=getAutoRollbackConfiguration, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=AUTOROLLBACKCONFIGURATION_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=getDeploymentStyle, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=DEPLOYMENTSTYLE_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=getBlueGreenDeploymentConfiguration, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=BLUEGREENDEPLOYMENTCONFIGURATION_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=getLoadBalancerInfo, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=LOADBALANCERINFO_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=getEc2TagSet, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=EC2TAGSET_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=getEcsServices, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=ECSSERVICES_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=getOnPremisesTagSet, postfix_operators=[], prefix_operators=[], qualifier=createDeploymentGroupRequest, selectors=[], type_arguments=None), MemberReference(member=ONPREMISESTAGSET_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[CreateDeploymentGroupRequest] identifier[createDeploymentGroupRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[createDeploymentGroupRequest] 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[createDeploymentGroupRequest] operator[SEP] identifier[getApplicationName] operator[SEP] operator[SEP] , identifier[APPLICATIONNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getDeploymentGroupName] operator[SEP] operator[SEP] , identifier[DEPLOYMENTGROUPNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getDeploymentConfigName] operator[SEP] operator[SEP] , identifier[DEPLOYMENTCONFIGNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getEc2TagFilters] operator[SEP] operator[SEP] , identifier[EC2TAGFILTERS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getOnPremisesInstanceTagFilters] operator[SEP] operator[SEP] , identifier[ONPREMISESINSTANCETAGFILTERS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getAutoScalingGroups] operator[SEP] operator[SEP] , identifier[AUTOSCALINGGROUPS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getServiceRoleArn] operator[SEP] operator[SEP] , identifier[SERVICEROLEARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getTriggerConfigurations] operator[SEP] operator[SEP] , identifier[TRIGGERCONFIGURATIONS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getAlarmConfiguration] operator[SEP] operator[SEP] , identifier[ALARMCONFIGURATION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getAutoRollbackConfiguration] operator[SEP] operator[SEP] , identifier[AUTOROLLBACKCONFIGURATION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getDeploymentStyle] operator[SEP] operator[SEP] , identifier[DEPLOYMENTSTYLE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getBlueGreenDeploymentConfiguration] operator[SEP] operator[SEP] , identifier[BLUEGREENDEPLOYMENTCONFIGURATION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getLoadBalancerInfo] operator[SEP] operator[SEP] , identifier[LOADBALANCERINFO_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getEc2TagSet] operator[SEP] operator[SEP] , identifier[EC2TAGSET_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getEcsServices] operator[SEP] operator[SEP] , identifier[ECSSERVICES_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createDeploymentGroupRequest] operator[SEP] identifier[getOnPremisesTagSet] operator[SEP] operator[SEP] , identifier[ONPREMISESTAGSET_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 setActiveProfiles(String... profiles) { if (profiles == null) { throw new IllegalArgumentException("profiles must not be null"); } synchronized (activeProfiles) { activeProfiles.clear(); for (String profile : profiles) { validateProfile(profile); activeProfiles.add(profile); } } }
class class_name[name] begin[{] method[setActiveProfiles, return_type[void], modifier[public], parameter[profiles]] begin[{] if[binary_operation[member[.profiles], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="profiles must not 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[}] SYNCHRONIZED[member[.activeProfiles]] BEGIN[{] call[activeProfiles.clear, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=profile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validateProfile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=profile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=activeProfiles, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=profiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=profile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setActiveProfiles] operator[SEP] identifier[String] operator[...] identifier[profiles] operator[SEP] { Keyword[if] operator[SEP] identifier[profiles] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[synchronized] operator[SEP] identifier[activeProfiles] operator[SEP] { identifier[activeProfiles] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[profile] operator[:] identifier[profiles] operator[SEP] { identifier[validateProfile] operator[SEP] identifier[profile] operator[SEP] operator[SEP] identifier[activeProfiles] operator[SEP] identifier[add] operator[SEP] identifier[profile] operator[SEP] operator[SEP] } } }
public static <E extends Exception> DataSet loadCSV(final InputStream csvInputStream, final Collection<String> selectColumnNames, final long offset, final long count, final Try.Predicate<String[], E> filter) throws UncheckedIOException, E { final Reader csvReader = new InputStreamReader(csvInputStream); return loadCSV(csvReader, selectColumnNames, offset, count, filter); }
class class_name[name] begin[{] method[loadCSV, return_type[type[DataSet]], modifier[public static], parameter[csvInputStream, selectColumnNames, offset, count, filter]] begin[{] local_variable[type[Reader], csvReader] return[call[.loadCSV, parameter[member[.csvReader], member[.selectColumnNames], member[.offset], member[.count], member[.filter]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] Keyword[extends] identifier[Exception] operator[>] identifier[DataSet] identifier[loadCSV] operator[SEP] Keyword[final] identifier[InputStream] identifier[csvInputStream] , Keyword[final] identifier[Collection] operator[<] identifier[String] operator[>] identifier[selectColumnNames] , Keyword[final] Keyword[long] identifier[offset] , Keyword[final] Keyword[long] identifier[count] , Keyword[final] identifier[Try] operator[SEP] identifier[Predicate] operator[<] identifier[String] operator[SEP] operator[SEP] , identifier[E] operator[>] identifier[filter] operator[SEP] Keyword[throws] identifier[UncheckedIOException] , identifier[E] { Keyword[final] identifier[Reader] identifier[csvReader] operator[=] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[csvInputStream] operator[SEP] operator[SEP] Keyword[return] identifier[loadCSV] operator[SEP] identifier[csvReader] , identifier[selectColumnNames] , identifier[offset] , identifier[count] , identifier[filter] operator[SEP] operator[SEP] }
public NodeInfo getNode(String name) { final URI uri = uriWithPath("./nodes/" + encodePathSegment(name)); return this.rt.getForObject(uri, NodeInfo.class); }
class class_name[name] begin[{] method[getNode, return_type[type[NodeInfo]], modifier[public], parameter[name]] begin[{] local_variable[type[URI], uri] return[THIS[member[None.rt]call[None.getForObject, parameter[member[.uri], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NodeInfo, sub_type=None))]]]] end[}] END[}]
Keyword[public] identifier[NodeInfo] identifier[getNode] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[final] identifier[URI] identifier[uri] operator[=] identifier[uriWithPath] operator[SEP] literal[String] operator[+] identifier[encodePathSegment] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[rt] operator[SEP] identifier[getForObject] operator[SEP] identifier[uri] , identifier[NodeInfo] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public Runnable function() { return new Runnable() { @Override public void run() { try { method.invoke(scheduled); } catch (IllegalAccessException e) { WisdomTaskScheduler.getLogger().error("Error while accessing to the scheduled method {}.{}", scheduled.getClass().getName(), method.getName(), e); } catch (InvocationTargetException e) { WisdomTaskScheduler.getLogger().error("Error in scheduled method {}.{}", scheduled.getClass().getName(), method.getName(), e); } } }; }
class class_name[name] begin[{] method[function, return_type[type[Runnable]], modifier[public], parameter[]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=scheduled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLogger, postfix_operators=[], prefix_operators=[], qualifier=WisdomTaskScheduler, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error while accessing to the scheduled method {}.{}"), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=scheduled, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, 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=e, types=['IllegalAccessException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getLogger, postfix_operators=[], prefix_operators=[], qualifier=WisdomTaskScheduler, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error in scheduled method {}.{}"), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=scheduled, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, 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=e, types=['InvocationTargetException']))], finally_block=None, label=None, resources=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))] end[}] END[}]
Keyword[public] identifier[Runnable] identifier[function] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[try] { identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[scheduled] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { identifier[WisdomTaskScheduler] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[scheduled] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvocationTargetException] identifier[e] operator[SEP] { identifier[WisdomTaskScheduler] operator[SEP] identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[scheduled] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[method] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } } operator[SEP] }
public final ListApplicationsPagedResponse listApplications(ProfileName parent) { ListApplicationsRequest request = ListApplicationsRequest.newBuilder() .setParent(parent == null ? null : parent.toString()) .build(); return listApplications(request); }
class class_name[name] begin[{] method[listApplications, return_type[type[ListApplicationsPagedResponse]], modifier[final public], parameter[parent]] begin[{] local_variable[type[ListApplicationsRequest], request] return[call[.listApplications, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[ListApplicationsPagedResponse] identifier[listApplications] operator[SEP] identifier[ProfileName] identifier[parent] operator[SEP] { identifier[ListApplicationsRequest] identifier[request] operator[=] identifier[ListApplicationsRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setParent] operator[SEP] identifier[parent] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[parent] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[listApplications] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@ReplacedBy("com.google.common.collect.Iterators#concat() or com.google.common.collect.Iterables#concat()") public static <T> Iterator<T> getMetaIterator (Iterable<Iterator<T>> metaIterable) { return new MetaIterator<T>(metaIterable); }
class class_name[name] begin[{] method[getMetaIterator, return_type[type[Iterator]], modifier[public static], parameter[metaIterable]] begin[{] return[ClassCreator(arguments=[MemberReference(member=metaIterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=MetaIterator, sub_type=None))] end[}] END[}]
annotation[@] identifier[ReplacedBy] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Iterator] operator[<] identifier[T] operator[>] identifier[getMetaIterator] operator[SEP] identifier[Iterable] operator[<] identifier[Iterator] operator[<] identifier[T] operator[>] operator[>] identifier[metaIterable] operator[SEP] { Keyword[return] Keyword[new] identifier[MetaIterator] operator[<] identifier[T] operator[>] operator[SEP] identifier[metaIterable] operator[SEP] operator[SEP] }
public List<FaceletTaglibFunctionType<WebFacelettaglibraryDescriptor>> getAllFunction() { List<FaceletTaglibFunctionType<WebFacelettaglibraryDescriptor>> list = new ArrayList<FaceletTaglibFunctionType<WebFacelettaglibraryDescriptor>>(); List<Node> nodeList = model.get("function"); for(Node node: nodeList) { FaceletTaglibFunctionType<WebFacelettaglibraryDescriptor> type = new FaceletTaglibFunctionTypeImpl<WebFacelettaglibraryDescriptor>(this, "function", model, node); list.add(type); } return list; }
class class_name[name] begin[{] method[getAllFunction, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], list] local_variable[type[List], nodeList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="function"), MemberReference(member=model, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=WebFacelettaglibraryDescriptor, sub_type=None))], dimensions=None, name=FaceletTaglibFunctionTypeImpl, sub_type=None)), name=type)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=WebFacelettaglibraryDescriptor, sub_type=None))], dimensions=[], name=FaceletTaglibFunctionType, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=nodeList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None))), label=None) return[member[.list]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[FaceletTaglibFunctionType] operator[<] identifier[WebFacelettaglibraryDescriptor] operator[>] operator[>] identifier[getAllFunction] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[FaceletTaglibFunctionType] operator[<] identifier[WebFacelettaglibraryDescriptor] operator[>] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[FaceletTaglibFunctionType] operator[<] identifier[WebFacelettaglibraryDescriptor] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Node] operator[>] identifier[nodeList] operator[=] identifier[model] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Node] identifier[node] operator[:] identifier[nodeList] operator[SEP] { identifier[FaceletTaglibFunctionType] operator[<] identifier[WebFacelettaglibraryDescriptor] operator[>] identifier[type] operator[=] Keyword[new] identifier[FaceletTaglibFunctionTypeImpl] operator[<] identifier[WebFacelettaglibraryDescriptor] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[model] , identifier[node] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[type] operator[SEP] operator[SEP] } Keyword[return] identifier[list] operator[SEP] }
public void join(SelectableChannel ch1, SelectableChannel ch2) throws IOException { join(ch1, ch2, (ByteChannel)ch1, (ByteChannel)ch2); }
class class_name[name] begin[{] method[join, return_type[void], modifier[public], parameter[ch1, ch2]] begin[{] call[.join, parameter[member[.ch1], member[.ch2], Cast(expression=MemberReference(member=ch1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ByteChannel, sub_type=None)), Cast(expression=MemberReference(member=ch2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ByteChannel, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[join] operator[SEP] identifier[SelectableChannel] identifier[ch1] , identifier[SelectableChannel] identifier[ch2] operator[SEP] Keyword[throws] identifier[IOException] { identifier[join] operator[SEP] identifier[ch1] , identifier[ch2] , operator[SEP] identifier[ByteChannel] operator[SEP] identifier[ch1] , operator[SEP] identifier[ByteChannel] operator[SEP] identifier[ch2] operator[SEP] operator[SEP] }
@Override public CacheCluster createCacheCluster(CreateCacheClusterRequest request) { request = beforeClientExecution(request); return executeCreateCacheCluster(request); }
class class_name[name] begin[{] method[createCacheCluster, return_type[type[CacheCluster]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateCacheCluster, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CacheCluster] identifier[createCacheCluster] operator[SEP] identifier[CreateCacheClusterRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreateCacheCluster] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public ProxyDataSourceBuilder logSlowQueryByJUL(long thresholdTime, TimeUnit timeUnit, String loggerName) { return logSlowQueryByJUL(thresholdTime, timeUnit, null, loggerName); }
class class_name[name] begin[{] method[logSlowQueryByJUL, return_type[type[ProxyDataSourceBuilder]], modifier[public], parameter[thresholdTime, timeUnit, loggerName]] begin[{] return[call[.logSlowQueryByJUL, parameter[member[.thresholdTime], member[.timeUnit], literal[null], member[.loggerName]]]] end[}] END[}]
Keyword[public] identifier[ProxyDataSourceBuilder] identifier[logSlowQueryByJUL] operator[SEP] Keyword[long] identifier[thresholdTime] , identifier[TimeUnit] identifier[timeUnit] , identifier[String] identifier[loggerName] operator[SEP] { Keyword[return] identifier[logSlowQueryByJUL] operator[SEP] identifier[thresholdTime] , identifier[timeUnit] , Other[null] , identifier[loggerName] operator[SEP] operator[SEP] }
public static boolean isClass(String name) { if(name == null) { return false; } Matcher matcher = CLASS_NAME_PATTERN.matcher(name); return matcher.find(); }
class class_name[name] begin[{] method[isClass, return_type[type[boolean]], modifier[public static], parameter[name]] begin[{] if[binary_operation[member[.name], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[Matcher], matcher] return[call[matcher.find, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isClass] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[Matcher] identifier[matcher] operator[=] identifier[CLASS_NAME_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[return] identifier[matcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] }
public void onComplete(final Consumer<OnComplete> fn) { this.forXOf = fn; //set - could also be called on a separate thread if (done) { //can be called again fn.accept(buildOnComplete()); } }
class class_name[name] begin[{] method[onComplete, return_type[void], modifier[public], parameter[fn]] begin[{] assign[THIS[member[None.forXOf]], member[.fn]] if[member[.done]] begin[{] call[fn.accept, parameter[call[.buildOnComplete, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[onComplete] operator[SEP] Keyword[final] identifier[Consumer] operator[<] identifier[OnComplete] operator[>] identifier[fn] operator[SEP] { Keyword[this] operator[SEP] identifier[forXOf] operator[=] identifier[fn] operator[SEP] Keyword[if] operator[SEP] identifier[done] operator[SEP] { identifier[fn] operator[SEP] identifier[accept] operator[SEP] identifier[buildOnComplete] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public void addBinder ( final Binder binder, final boolean initializeBinder ) { if ( initializeBinder ) { initializeBinder ( binder ); } this.binders.add ( binder ); }
class class_name[name] begin[{] method[addBinder, return_type[void], modifier[public], parameter[binder, initializeBinder]] begin[{] if[member[.initializeBinder]] begin[{] call[.initializeBinder, parameter[member[.binder]]] else begin[{] None end[}] THIS[member[None.binders]call[None.add, parameter[member[.binder]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addBinder] operator[SEP] Keyword[final] identifier[Binder] identifier[binder] , Keyword[final] Keyword[boolean] identifier[initializeBinder] operator[SEP] { Keyword[if] operator[SEP] identifier[initializeBinder] operator[SEP] { identifier[initializeBinder] operator[SEP] identifier[binder] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[binders] operator[SEP] identifier[add] operator[SEP] identifier[binder] operator[SEP] operator[SEP] }