code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
@Override public String[] getRequestValue(final Request request) { if (isPresent(request)) { String[] paramValues = request.getParameterValues(getId()); return removeEmptyStrings(paramValues); } else { return getValue(); } }
class class_name[name] begin[{] method[getRequestValue, return_type[type[String]], modifier[public], parameter[request]] begin[{] if[call[.isPresent, parameter[member[.request]]]] begin[{] local_variable[type[String], paramValues] return[call[.removeEmptyStrings, parameter[member[.paramValues]]]] else begin[{] return[call[.getValue, parameter[]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getRequestValue] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] { Keyword[if] operator[SEP] identifier[isPresent] operator[SEP] identifier[request] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[paramValues] operator[=] identifier[request] operator[SEP] identifier[getParameterValues] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[removeEmptyStrings] operator[SEP] identifier[paramValues] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] } }
public static <E extends SpecificRecord, S extends SpecificRecord> Dao<E> buildCompositeDaoWithInputStream( HTablePool tablePool, String tableName, List<InputStream> subEntitySchemaStreams, Class<E> entityClass) { List<String> subEntitySchemaStrings = new ArrayList<String>(); for (InputStream subEntitySchemaStream : subEntitySchemaStreams) { subEntitySchemaStrings.add(AvroUtils .inputStreamToString(subEntitySchemaStream)); } return buildCompositeDao(tablePool, tableName, subEntitySchemaStrings, entityClass); }
class class_name[name] begin[{] method[buildCompositeDaoWithInputStream, return_type[type[Dao]], modifier[public static], parameter[tablePool, tableName, subEntitySchemaStreams, entityClass]] begin[{] local_variable[type[List], subEntitySchemaStrings] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=subEntitySchemaStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=inputStreamToString, postfix_operators=[], prefix_operators=[], qualifier=AvroUtils, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=subEntitySchemaStrings, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=subEntitySchemaStreams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=subEntitySchemaStream)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None))), label=None) return[call[.buildCompositeDao, parameter[member[.tablePool], member[.tableName], member[.subEntitySchemaStrings], member[.entityClass]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[E] Keyword[extends] identifier[SpecificRecord] , identifier[S] Keyword[extends] identifier[SpecificRecord] operator[>] identifier[Dao] operator[<] identifier[E] operator[>] identifier[buildCompositeDaoWithInputStream] operator[SEP] identifier[HTablePool] identifier[tablePool] , identifier[String] identifier[tableName] , identifier[List] operator[<] identifier[InputStream] operator[>] identifier[subEntitySchemaStreams] , identifier[Class] operator[<] identifier[E] operator[>] identifier[entityClass] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[subEntitySchemaStrings] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[InputStream] identifier[subEntitySchemaStream] operator[:] identifier[subEntitySchemaStreams] operator[SEP] { identifier[subEntitySchemaStrings] operator[SEP] identifier[add] operator[SEP] identifier[AvroUtils] operator[SEP] identifier[inputStreamToString] operator[SEP] identifier[subEntitySchemaStream] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[buildCompositeDao] operator[SEP] identifier[tablePool] , identifier[tableName] , identifier[subEntitySchemaStrings] , identifier[entityClass] operator[SEP] operator[SEP] }
void insertValueAtPosition(final T value, final int pos) { if ((pos < 0) || (pos >= getNumSamples())) { throw new SketchesArgumentException("Insert position must be between 0 and " + getNumSamples() + ", " + "inclusive. Received: " + pos); } data_.set(pos, value); }
class class_name[name] begin[{] method[insertValueAtPosition, return_type[void], modifier[default], parameter[value, pos]] begin[{] if[binary_operation[binary_operation[member[.pos], <, literal[0]], ||, binary_operation[member[.pos], >=, call[.getNumSamples, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Insert position must be between 0 and "), operandr=MethodInvocation(arguments=[], member=getNumSamples, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="inclusive. Received: "), operator=+), operandr=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SketchesArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[data_.set, parameter[member[.pos], member[.value]]] end[}] END[}]
Keyword[void] identifier[insertValueAtPosition] operator[SEP] Keyword[final] identifier[T] identifier[value] , Keyword[final] Keyword[int] identifier[pos] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[pos] operator[<] Other[0] operator[SEP] operator[||] operator[SEP] identifier[pos] operator[>=] identifier[getNumSamples] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[SketchesArgumentException] operator[SEP] literal[String] operator[+] identifier[getNumSamples] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[pos] operator[SEP] operator[SEP] } identifier[data_] operator[SEP] identifier[set] operator[SEP] identifier[pos] , identifier[value] operator[SEP] operator[SEP] }
@Override public void onMapTouchEnd(TouchEvent<?> event) { onUp(event); event.stopPropagation(); event.preventDefault(); }
class class_name[name] begin[{] method[onMapTouchEnd, return_type[void], modifier[public], parameter[event]] begin[{] call[.onUp, parameter[member[.event]]] call[event.stopPropagation, parameter[]] call[event.preventDefault, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onMapTouchEnd] operator[SEP] identifier[TouchEvent] operator[<] operator[?] operator[>] identifier[event] operator[SEP] { identifier[onUp] operator[SEP] identifier[event] operator[SEP] operator[SEP] identifier[event] operator[SEP] identifier[stopPropagation] operator[SEP] operator[SEP] operator[SEP] identifier[event] operator[SEP] identifier[preventDefault] operator[SEP] operator[SEP] operator[SEP] }
private static void addDescriptor(List<String> descriptors, ServiceDescriptor serviceDescriptor) { for (MethodDescriptor<?, ?> method : serviceDescriptor.getMethods()) { // This is added by Cloud Bigtable's AbstractRetryingOperation descriptors.add("Operation." + method.getFullMethodName().replace('/', '.')); } }
class class_name[name] begin[{] method[addDescriptor, return_type[void], modifier[private static], parameter[descriptors, serviceDescriptor]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Operation."), operandr=MethodInvocation(arguments=[], member=getFullMethodName, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=replace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=add, postfix_operators=[], prefix_operators=[], qualifier=descriptors, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getMethods, postfix_operators=[], prefix_operators=[], qualifier=serviceDescriptor, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=method)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=MethodDescriptor, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[addDescriptor] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[descriptors] , identifier[ServiceDescriptor] identifier[serviceDescriptor] operator[SEP] { Keyword[for] operator[SEP] identifier[MethodDescriptor] operator[<] operator[?] , operator[?] operator[>] identifier[method] operator[:] identifier[serviceDescriptor] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] operator[SEP] { identifier[descriptors] operator[SEP] identifier[add] operator[SEP] literal[String] operator[+] identifier[method] operator[SEP] identifier[getFullMethodName] operator[SEP] operator[SEP] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] } }
public <K, V> StatefulRedisConnection<K, V> connect(RedisCodec<K, V> codec, RedisURI redisURI) { assertNotNull(redisURI); return getConnection(connectStandaloneAsync(codec, redisURI, redisURI.getTimeout())); }
class class_name[name] begin[{] method[connect, return_type[type[StatefulRedisConnection]], modifier[public], parameter[codec, redisURI]] begin[{] call[.assertNotNull, parameter[member[.redisURI]]] return[call[.getConnection, parameter[call[.connectStandaloneAsync, parameter[member[.codec], member[.redisURI], call[redisURI.getTimeout, parameter[]]]]]]] end[}] END[}]
Keyword[public] operator[<] identifier[K] , identifier[V] operator[>] identifier[StatefulRedisConnection] operator[<] identifier[K] , identifier[V] operator[>] identifier[connect] operator[SEP] identifier[RedisCodec] operator[<] identifier[K] , identifier[V] operator[>] identifier[codec] , identifier[RedisURI] identifier[redisURI] operator[SEP] { identifier[assertNotNull] operator[SEP] identifier[redisURI] operator[SEP] operator[SEP] Keyword[return] identifier[getConnection] operator[SEP] identifier[connectStandaloneAsync] operator[SEP] identifier[codec] , identifier[redisURI] , identifier[redisURI] operator[SEP] identifier[getTimeout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void createContentTypeExtensionPoint() { context.create(Content.Type.class, new Module.ExtensionPoint<Content.Type>() { @Override public void register(Content.Type contentType) { contentTypes.add(contentType); } }); }
class class_name[name] begin[{] method[createContentTypeExtensionPoint, return_type[void], modifier[private], parameter[]] begin[{] call[context.create, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=Content, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Type, sub_type=None)), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=contentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=contentTypes, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=register, parameters=[FormalParameter(annotations=[], modifiers=set(), name=contentType, type=ReferenceType(arguments=None, dimensions=[], name=Content, sub_type=ReferenceType(arguments=None, dimensions=None, name=Type, sub_type=None)), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Module, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Content, sub_type=ReferenceType(arguments=None, dimensions=None, name=Type, sub_type=None)))], dimensions=None, name=ExtensionPoint, sub_type=None)))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[createContentTypeExtensionPoint] operator[SEP] operator[SEP] { identifier[context] operator[SEP] identifier[create] operator[SEP] identifier[Content] operator[SEP] identifier[Type] operator[SEP] Keyword[class] , Keyword[new] identifier[Module] operator[SEP] identifier[ExtensionPoint] operator[<] identifier[Content] operator[SEP] identifier[Type] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[register] operator[SEP] identifier[Content] operator[SEP] identifier[Type] identifier[contentType] operator[SEP] { identifier[contentTypes] operator[SEP] identifier[add] operator[SEP] identifier[contentType] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public FessMessages addErrorsSuffix(String property) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_SUFFIX)); return this; }
class class_name[name] begin[{] method[addErrorsSuffix, return_type[type[FessMessages]], modifier[public], parameter[property]] begin[{] call[.assertPropertyNotNull, parameter[member[.property]]] call[.add, parameter[member[.property], ClassCreator(arguments=[MemberReference(member=ERRORS_SUFFIX, 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=UserMessage, sub_type=None))]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[FessMessages] identifier[addErrorsSuffix] operator[SEP] identifier[String] identifier[property] operator[SEP] { identifier[assertPropertyNotNull] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[property] , Keyword[new] identifier[UserMessage] operator[SEP] identifier[ERRORS_SUFFIX] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void setIgnoreDependencyPattern(String ignoreDependencyPattern) { try { Pattern pattern = Pattern.compile(ignoreDependencyPattern); this.ignoreDependencyPattern = pattern; } catch (PatternSyntaxException e) { throw new BuildException("invalid ignore dependency pattern: " + e.getMessage()); } }
class class_name[name] begin[{] method[setIgnoreDependencyPattern, return_type[void], modifier[public], parameter[ignoreDependencyPattern]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ignoreDependencyPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compile, postfix_operators=[], prefix_operators=[], qualifier=Pattern, selectors=[], type_arguments=None), name=pattern)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Pattern, sub_type=None)), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=ignoreDependencyPattern, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=pattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="invalid ignore dependency pattern: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, 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=BuildException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['PatternSyntaxException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[setIgnoreDependencyPattern] operator[SEP] identifier[String] identifier[ignoreDependencyPattern] operator[SEP] { Keyword[try] { identifier[Pattern] identifier[pattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[ignoreDependencyPattern] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[ignoreDependencyPattern] operator[=] identifier[pattern] operator[SEP] } Keyword[catch] operator[SEP] identifier[PatternSyntaxException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[BuildException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static boolean checkMemberStatus(String serverName,JMX jmx) { try { ObjectName objectName = new ObjectName("GemFire:type=Member,member="+serverName); String status = (String)jmx.invoke(objectName, "status", null, null); boolean isOnline = status != null && status.contains("online"); Debugger.println("member:"+serverName+" isOnline:"+isOnline); return isOnline; } catch (MalformedObjectNameException e) { throw new CommunicationException(e.getMessage()+ " server="+serverName); } }
class class_name[name] begin[{] method[checkMemberStatus, return_type[type[boolean]], modifier[public static], parameter[serverName, jmx]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="GemFire:type=Member,member="), operandr=MemberReference(member=serverName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ObjectName, sub_type=None)), name=objectName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ObjectName, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=objectName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="status"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=jmx, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=status)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="online")], member=contains, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), operator=&&), name=isOnline)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="member:"), operandr=MemberReference(member=serverName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" isOnline:"), operator=+), operandr=MemberReference(member=isOnline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=Debugger, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=isOnline, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" server="), operator=+), operandr=MemberReference(member=serverName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommunicationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MalformedObjectNameException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[checkMemberStatus] operator[SEP] identifier[String] identifier[serverName] , identifier[JMX] identifier[jmx] operator[SEP] { Keyword[try] { identifier[ObjectName] identifier[objectName] operator[=] Keyword[new] identifier[ObjectName] operator[SEP] literal[String] operator[+] identifier[serverName] operator[SEP] operator[SEP] identifier[String] identifier[status] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[jmx] operator[SEP] identifier[invoke] operator[SEP] identifier[objectName] , literal[String] , Other[null] , Other[null] operator[SEP] operator[SEP] Keyword[boolean] identifier[isOnline] operator[=] identifier[status] operator[!=] Other[null] operator[&&] identifier[status] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Debugger] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[serverName] operator[+] literal[String] operator[+] identifier[isOnline] operator[SEP] operator[SEP] Keyword[return] identifier[isOnline] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedObjectNameException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CommunicationException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[serverName] operator[SEP] operator[SEP] } }
public static boolean resemblesPattern(String pattern, int pos) { return ((pos+1) < pattern.length() && pattern.charAt(pos) == '[') || resemblesPropertyPattern(pattern, pos); }
class class_name[name] begin[{] method[resemblesPattern, return_type[type[boolean]], modifier[public static], parameter[pattern, pos]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[member[.pos], +, literal[1]], <, call[pattern.length, parameter[]]], &&, binary_operation[call[pattern.charAt, parameter[member[.pos]]], ==, literal['[']]], ||, call[.resemblesPropertyPattern, parameter[member[.pattern], member[.pos]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[resemblesPattern] operator[SEP] identifier[String] identifier[pattern] , Keyword[int] identifier[pos] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[pos] operator[+] Other[1] operator[SEP] operator[<] identifier[pattern] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[&&] identifier[pattern] operator[SEP] identifier[charAt] operator[SEP] identifier[pos] operator[SEP] operator[==] literal[String] operator[SEP] operator[||] identifier[resemblesPropertyPattern] operator[SEP] identifier[pattern] , identifier[pos] operator[SEP] operator[SEP] }
public static Expression select(String field, String operator, Val<Expression>[] args, EbeanExprInvoker invoker) { if (args.length > 0) { EbeanServer server = invoker.getServer(); Class type = Filters.getBeanTypeByName(field, (SpiEbeanServer) server); if (type == null) { throw new QuerySyntaxException(Messages.get("dsl.bean.type.err", field)); } Query q = Filters.createQuery(type, server); ExpressionList<?> et = q.select(args[0].string()).where(); for (int i = 1; i < args.length; i++) { Object o = args[i].object(); if (o instanceof HavingExpression) { ExpressionList having = q.having(); ((HavingExpression) o).expressionList.forEach(having::add); } else if (o instanceof DistinctExpression) { et.setDistinct(((DistinctExpression) o).distinct); } else if (o instanceof Expression) { et.add(args[i].expr()); } else { throw new QuerySyntaxException(Messages.get("dsl.arguments.error3", operator)); } } EbeanUtils.checkQuery(q, invoker.getInjectionManager()); return QueryExpression.of(q); } throw new QuerySyntaxException(Messages.get("dsl.arguments.error0", operator)); }
class class_name[name] begin[{] method[select, return_type[type[Expression]], modifier[public static], parameter[field, operator, args, invoker]] begin[{] if[binary_operation[member[args.length], >, literal[0]]] begin[{] local_variable[type[EbeanServer], server] local_variable[type[Class], type] if[binary_operation[member[.type], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="dsl.bean.type.err"), MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QuerySyntaxException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Query], q] local_variable[type[ExpressionList], et] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=object, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=o)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=HavingExpression, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=DistinctExpression, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="dsl.arguments.error3"), MemberReference(member=operator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QuerySyntaxException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=expr, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=add, postfix_operators=[], prefix_operators=[], qualifier=et, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=DistinctExpression, sub_type=None))], member=setDistinct, postfix_operators=[], prefix_operators=[], qualifier=et, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=having, postfix_operators=[], prefix_operators=[], qualifier=q, selectors=[], type_arguments=None), name=having)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ExpressionList, sub_type=None)), StatementExpression(expression=Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=HavingExpression, sub_type=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=args, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[EbeanUtils.checkQuery, parameter[member[.q], call[invoker.getInjectionManager, parameter[]]]] return[call[QueryExpression.of, parameter[member[.q]]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="dsl.arguments.error0"), MemberReference(member=operator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QuerySyntaxException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Expression] identifier[select] operator[SEP] identifier[String] identifier[field] , identifier[String] identifier[operator] , identifier[Val] operator[<] identifier[Expression] operator[>] operator[SEP] operator[SEP] identifier[args] , identifier[EbeanExprInvoker] identifier[invoker] operator[SEP] { Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[EbeanServer] identifier[server] operator[=] identifier[invoker] operator[SEP] identifier[getServer] operator[SEP] operator[SEP] operator[SEP] identifier[Class] identifier[type] operator[=] identifier[Filters] operator[SEP] identifier[getBeanTypeByName] operator[SEP] identifier[field] , operator[SEP] identifier[SpiEbeanServer] operator[SEP] identifier[server] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[QuerySyntaxException] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] literal[String] , identifier[field] operator[SEP] operator[SEP] operator[SEP] } identifier[Query] identifier[q] operator[=] identifier[Filters] operator[SEP] identifier[createQuery] operator[SEP] identifier[type] , identifier[server] operator[SEP] operator[SEP] identifier[ExpressionList] operator[<] operator[?] operator[>] identifier[et] operator[=] identifier[q] operator[SEP] identifier[select] operator[SEP] identifier[args] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[string] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[where] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[args] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Object] identifier[o] operator[=] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[object] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[HavingExpression] operator[SEP] { identifier[ExpressionList] identifier[having] operator[=] identifier[q] operator[SEP] identifier[having] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[HavingExpression] operator[SEP] identifier[o] operator[SEP] operator[SEP] identifier[expressionList] operator[SEP] identifier[forEach] operator[SEP] identifier[having] operator[::] identifier[add] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[DistinctExpression] operator[SEP] { identifier[et] operator[SEP] identifier[setDistinct] operator[SEP] operator[SEP] operator[SEP] identifier[DistinctExpression] operator[SEP] identifier[o] operator[SEP] operator[SEP] identifier[distinct] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[o] Keyword[instanceof] identifier[Expression] operator[SEP] { identifier[et] operator[SEP] identifier[add] operator[SEP] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[expr] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[QuerySyntaxException] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] literal[String] , identifier[operator] operator[SEP] operator[SEP] operator[SEP] } } identifier[EbeanUtils] operator[SEP] identifier[checkQuery] operator[SEP] identifier[q] , identifier[invoker] operator[SEP] identifier[getInjectionManager] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[QueryExpression] operator[SEP] identifier[of] operator[SEP] identifier[q] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[QuerySyntaxException] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] literal[String] , identifier[operator] operator[SEP] operator[SEP] operator[SEP] }
private CacheEntry getCacheEntry(Object value, boolean create) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) tc.entry( this,cclass, "getCacheEntry", new Object[] { value, new Boolean(create), matchCache }); CacheEntry e = (CacheEntry) matchCache.get(value); if (e == null) { if (create) { e = new CacheEntry(); // The following method call may stimulate multiple callbacks to the shouldRetain // method if the Hashtable is at the rehash threshold. matchCache.put(value, e); cacheCreates++; } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) tc.exit(this,cclass, "getCacheEntry", e); return e; }
class class_name[name] begin[{] method[getCacheEntry, return_type[type[CacheEntry]], modifier[private], parameter[value, create]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[tc.entry, parameter[THIS[], member[.cclass], literal["getCacheEntry"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=create, 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=Boolean, sub_type=None)), MemberReference(member=matchCache, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] local_variable[type[CacheEntry], e] if[binary_operation[member[.e], ==, literal[null]]] begin[{] if[member[.create]] begin[{] assign[member[.e], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CacheEntry, sub_type=None))] call[matchCache.put, parameter[member[.value], member[.e]]] member[.cacheCreates] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[tc.exit, parameter[THIS[], member[.cclass], literal["getCacheEntry"], member[.e]]] else begin[{] None end[}] return[member[.e]] end[}] END[}]
Keyword[private] identifier[CacheEntry] identifier[getCacheEntry] operator[SEP] identifier[Object] identifier[value] , Keyword[boolean] identifier[create] 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[tc] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[cclass] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[value] , Keyword[new] identifier[Boolean] operator[SEP] identifier[create] operator[SEP] , identifier[matchCache] } operator[SEP] operator[SEP] identifier[CacheEntry] identifier[e] operator[=] operator[SEP] identifier[CacheEntry] operator[SEP] identifier[matchCache] operator[SEP] identifier[get] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[create] operator[SEP] { identifier[e] operator[=] Keyword[new] identifier[CacheEntry] operator[SEP] operator[SEP] operator[SEP] identifier[matchCache] operator[SEP] identifier[put] operator[SEP] identifier[value] , identifier[e] operator[SEP] operator[SEP] identifier[cacheCreates] operator[++] 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[tc] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[cclass] , literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] identifier[e] operator[SEP] }
@Override public Date computeFirstFireTime(Calendar calendar) { nextFireTime = getStartTime(); while (nextFireTime != null && calendar != null && !calendar.isTimeIncluded(nextFireTime.getTime())) { nextFireTime = getFireTimeAfter(nextFireTime); if (nextFireTime == null) { break; } // avoid infinite loop java.util.Calendar c = java.util.Calendar.getInstance(); c.setTime(nextFireTime); if (c.get(java.util.Calendar.YEAR) > YEAR_TO_GIVEUP_SCHEDULING_AT) { return null; } } return nextFireTime; }
class class_name[name] begin[{] method[computeFirstFireTime, return_type[type[Date]], modifier[public], parameter[calendar]] begin[{] assign[member[.nextFireTime], call[.getStartTime, parameter[]]] while[binary_operation[binary_operation[binary_operation[member[.nextFireTime], !=, literal[null]], &&, binary_operation[member[.calendar], !=, literal[null]]], &&, call[calendar.isTimeIncluded, parameter[call[nextFireTime.getTime, parameter[]]]]]] begin[{] assign[member[.nextFireTime], call[.getFireTimeAfter, parameter[member[.nextFireTime]]]] if[binary_operation[member[.nextFireTime], ==, literal[null]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] local_variable[type[java], c] call[c.setTime, parameter[member[.nextFireTime]]] if[binary_operation[call[c.get, parameter[member[java.util.Calendar.YEAR]]], >, member[.YEAR_TO_GIVEUP_SCHEDULING_AT]]] begin[{] return[literal[null]] else begin[{] None end[}] end[}] return[member[.nextFireTime]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Date] identifier[computeFirstFireTime] operator[SEP] identifier[Calendar] identifier[calendar] operator[SEP] { identifier[nextFireTime] operator[=] identifier[getStartTime] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[nextFireTime] operator[!=] Other[null] operator[&&] identifier[calendar] operator[!=] Other[null] operator[&&] operator[!] identifier[calendar] operator[SEP] identifier[isTimeIncluded] operator[SEP] identifier[nextFireTime] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[nextFireTime] operator[=] identifier[getFireTimeAfter] operator[SEP] identifier[nextFireTime] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nextFireTime] operator[==] Other[null] operator[SEP] { Keyword[break] operator[SEP] } identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Calendar] identifier[c] operator[=] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[setTime] operator[SEP] identifier[nextFireTime] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[SEP] identifier[get] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] operator[SEP] operator[>] identifier[YEAR_TO_GIVEUP_SCHEDULING_AT] operator[SEP] { Keyword[return] Other[null] operator[SEP] } } Keyword[return] identifier[nextFireTime] operator[SEP] }
@Deprecated public void setText(String text) { if (text == null) { throw new NullPointerException(); } this.text = text; this.begin = 0; this.end = text.length(); this.pos = 0; }
class class_name[name] begin[{] method[setText, return_type[void], modifier[public], parameter[text]] begin[{] if[binary_operation[member[.text], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] assign[THIS[member[None.text]], member[.text]] assign[THIS[member[None.begin]], literal[0]] assign[THIS[member[None.end]], call[text.length, parameter[]]] assign[THIS[member[None.pos]], literal[0]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[void] identifier[setText] operator[SEP] identifier[String] identifier[text] operator[SEP] { Keyword[if] operator[SEP] identifier[text] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[text] operator[=] identifier[text] operator[SEP] Keyword[this] operator[SEP] identifier[begin] operator[=] Other[0] operator[SEP] Keyword[this] operator[SEP] identifier[end] operator[=] identifier[text] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[pos] operator[=] Other[0] operator[SEP] }
public static <T extends TimePoint<? super CalendarUnit, T>> Years<CalendarUnit> between(T t1, T t2) { long delta = CalendarUnit.YEARS.between(t1, t2); return Years.ofGregorian(MathUtils.safeCast(delta)); }
class class_name[name] begin[{] method[between, return_type[type[Years]], modifier[public static], parameter[t1, t2]] begin[{] local_variable[type[long], delta] return[call[Years.ofGregorian, parameter[call[MathUtils.safeCast, parameter[member[.delta]]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[TimePoint] operator[<] operator[?] Keyword[super] identifier[CalendarUnit] , identifier[T] operator[>] operator[>] identifier[Years] operator[<] identifier[CalendarUnit] operator[>] identifier[between] operator[SEP] identifier[T] identifier[t1] , identifier[T] identifier[t2] operator[SEP] { Keyword[long] identifier[delta] operator[=] identifier[CalendarUnit] operator[SEP] identifier[YEARS] operator[SEP] identifier[between] operator[SEP] identifier[t1] , identifier[t2] operator[SEP] operator[SEP] Keyword[return] identifier[Years] operator[SEP] identifier[ofGregorian] operator[SEP] identifier[MathUtils] operator[SEP] identifier[safeCast] operator[SEP] identifier[delta] operator[SEP] operator[SEP] operator[SEP] }
public final Task runTask(String name) { RunTaskRequest request = RunTaskRequest.newBuilder().setName(name).build(); return runTask(request); }
class class_name[name] begin[{] method[runTask, return_type[type[Task]], modifier[final public], parameter[name]] begin[{] local_variable[type[RunTaskRequest], request] return[call[.runTask, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Task] identifier[runTask] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[RunTaskRequest] identifier[request] operator[=] identifier[RunTaskRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setName] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[runTask] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public <T extends Map> void dropBigMap(String name, T map) { assertConnectionOpen(); map.clear(); catalog.remove(name); }
class class_name[name] begin[{] method[dropBigMap, return_type[void], modifier[public], parameter[name, map]] begin[{] call[.assertConnectionOpen, parameter[]] call[map.clear, parameter[]] call[catalog.remove, parameter[member[.name]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Map] operator[>] Keyword[void] identifier[dropBigMap] operator[SEP] identifier[String] identifier[name] , identifier[T] identifier[map] operator[SEP] { identifier[assertConnectionOpen] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[catalog] operator[SEP] identifier[remove] operator[SEP] identifier[name] operator[SEP] operator[SEP] }
public static base_responses update(nitro_service client, snmpview resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { snmpview updateresources[] = new snmpview[resources.length]; for (int i=0;i<resources.length;i++){ updateresources[i] = new snmpview(); updateresources[i].name = resources[i].name; updateresources[i].subtree = resources[i].subtree; updateresources[i].type = resources[i].type; } result = update_bulk_request(client, updateresources); } return result; }
class class_name[name] begin[{] method[update, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{] local_variable[type[base_responses], result] if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operation[member[resources.length], >, literal[0]]]] begin[{] local_variable[type[snmpview], updateresources] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=updateresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=snmpview, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=updateresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=updateresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=subtree, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=subtree, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=updateresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=type, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=type, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=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=resources, 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) assign[member[.result], call[.update_bulk_request, parameter[member[.client], member[.updateresources]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_responses] identifier[update] operator[SEP] identifier[nitro_service] identifier[client] , identifier[snmpview] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[base_responses] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[resources] operator[!=] Other[null] operator[&&] identifier[resources] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[snmpview] identifier[updateresources] operator[SEP] operator[SEP] operator[=] Keyword[new] identifier[snmpview] operator[SEP] identifier[resources] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[resources] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[updateresources] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[snmpview] operator[SEP] operator[SEP] operator[SEP] identifier[updateresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[name] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[name] operator[SEP] identifier[updateresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[subtree] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[subtree] operator[SEP] identifier[updateresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[type] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[type] operator[SEP] } identifier[result] operator[=] identifier[update_bulk_request] operator[SEP] identifier[client] , identifier[updateresources] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
@Override public CommercePriceEntry findByUuid_First(String uuid, OrderByComparator<CommercePriceEntry> orderByComparator) throws NoSuchPriceEntryException { CommercePriceEntry commercePriceEntry = fetchByUuid_First(uuid, orderByComparator); if (commercePriceEntry != null) { return commercePriceEntry; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("uuid="); msg.append(uuid); msg.append("}"); throw new NoSuchPriceEntryException(msg.toString()); }
class class_name[name] begin[{] method[findByUuid_First, return_type[type[CommercePriceEntry]], modifier[public], parameter[uuid, orderByComparator]] begin[{] local_variable[type[CommercePriceEntry], commercePriceEntry] if[binary_operation[member[.commercePriceEntry], !=, literal[null]]] begin[{] return[member[.commercePriceEntry]] else begin[{] None end[}] local_variable[type[StringBundler], msg] call[msg.append, parameter[member[._NO_SUCH_ENTITY_WITH_KEY]]] call[msg.append, parameter[literal["uuid="]]] call[msg.append, parameter[member[.uuid]]] call[msg.append, parameter[literal["}"]]] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=msg, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchPriceEntryException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommercePriceEntry] identifier[findByUuid_First] operator[SEP] identifier[String] identifier[uuid] , identifier[OrderByComparator] operator[<] identifier[CommercePriceEntry] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchPriceEntryException] { identifier[CommercePriceEntry] identifier[commercePriceEntry] operator[=] identifier[fetchByUuid_First] operator[SEP] identifier[uuid] , identifier[orderByComparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commercePriceEntry] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[commercePriceEntry] operator[SEP] } identifier[StringBundler] identifier[msg] operator[=] Keyword[new] identifier[StringBundler] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[_NO_SUCH_ENTITY_WITH_KEY] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] identifier[uuid] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[NoSuchPriceEntryException] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://www.w3.org/1998/Math/MathML", name = "arcsec") public JAXBElement<ElementaryFunctionsType> createArcsec(ElementaryFunctionsType value) { return new JAXBElement<ElementaryFunctionsType>(_Arcsec_QNAME, ElementaryFunctionsType.class, null, value); }
class class_name[name] begin[{] method[createArcsec, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_Arcsec_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ElementaryFunctionsType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, 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=ElementaryFunctionsType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[ElementaryFunctionsType] operator[>] identifier[createArcsec] operator[SEP] identifier[ElementaryFunctionsType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[ElementaryFunctionsType] operator[>] operator[SEP] identifier[_Arcsec_QNAME] , identifier[ElementaryFunctionsType] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
public <A> ListPath<A, PathBuilder<A>> getList(String property, Class<A> type) { return this.<A, PathBuilder<A>>getList(property, type, PathBuilder.class); }
class class_name[name] begin[{] method[getList, return_type[type[ListPath]], modifier[public], parameter[property, type]] begin[{] return[THIS[call[None.getList, parameter[member[.property], member[.type], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PathBuilder, sub_type=None))]]]] end[}] END[}]
Keyword[public] operator[<] identifier[A] operator[>] identifier[ListPath] operator[<] identifier[A] , identifier[PathBuilder] operator[<] identifier[A] operator[>] operator[>] identifier[getList] operator[SEP] identifier[String] identifier[property] , identifier[Class] operator[<] identifier[A] operator[>] identifier[type] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] operator[<] identifier[A] , identifier[PathBuilder] operator[<] identifier[A] operator[>] operator[>] identifier[getList] operator[SEP] identifier[property] , identifier[type] , identifier[PathBuilder] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") @Override public Map getConstrainedProperties() { verifyContextIsInitialized(); if(constrainedProperties == null) { ConstrainedDiscovery constrainedDiscovery = GrailsFactoriesLoader.loadFactory(ConstrainedDiscovery.class); if(constrainedDiscovery == null) { constrainedProperties = Collections.emptyMap(); } else { constrainedProperties = constrainedDiscovery.findConstrainedProperties(persistentEntity); } } return constrainedProperties; }
class class_name[name] begin[{] method[getConstrainedProperties, return_type[type[Map]], modifier[public], parameter[]] begin[{] call[.verifyContextIsInitialized, parameter[]] if[binary_operation[member[.constrainedProperties], ==, literal[null]]] begin[{] local_variable[type[ConstrainedDiscovery], constrainedDiscovery] if[binary_operation[member[.constrainedDiscovery], ==, literal[null]]] begin[{] assign[member[.constrainedProperties], call[Collections.emptyMap, parameter[]]] else begin[{] assign[member[.constrainedProperties], call[constrainedDiscovery.findConstrainedProperties, parameter[member[.persistentEntity]]]] end[}] else begin[{] None end[}] return[member[.constrainedProperties]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[Map] identifier[getConstrainedProperties] operator[SEP] operator[SEP] { identifier[verifyContextIsInitialized] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[constrainedProperties] operator[==] Other[null] operator[SEP] { identifier[ConstrainedDiscovery] identifier[constrainedDiscovery] operator[=] identifier[GrailsFactoriesLoader] operator[SEP] identifier[loadFactory] operator[SEP] identifier[ConstrainedDiscovery] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[constrainedDiscovery] operator[==] Other[null] operator[SEP] { identifier[constrainedProperties] operator[=] identifier[Collections] operator[SEP] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[constrainedProperties] operator[=] identifier[constrainedDiscovery] operator[SEP] identifier[findConstrainedProperties] operator[SEP] identifier[persistentEntity] operator[SEP] operator[SEP] } } Keyword[return] identifier[constrainedProperties] operator[SEP] }
double computeAssessment(MathNode refTree, MathNode compTree) { int absDiff = Math.abs(refTree.getDepth() - compTree.getDepth()); int maxDepth = compTree.getMaxDepth() + 1; double depthWeight = 1 - (double) absDiff / (double) maxDepth; return depthWeight * coverage; }
class class_name[name] begin[{] method[computeAssessment, return_type[type[double]], modifier[default], parameter[refTree, compTree]] begin[{] local_variable[type[int], absDiff] local_variable[type[int], maxDepth] local_variable[type[double], depthWeight] return[binary_operation[member[.depthWeight], *, member[.coverage]]] end[}] END[}]
Keyword[double] identifier[computeAssessment] operator[SEP] identifier[MathNode] identifier[refTree] , identifier[MathNode] identifier[compTree] operator[SEP] { Keyword[int] identifier[absDiff] operator[=] identifier[Math] operator[SEP] identifier[abs] operator[SEP] identifier[refTree] operator[SEP] identifier[getDepth] operator[SEP] operator[SEP] operator[-] identifier[compTree] operator[SEP] identifier[getDepth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[maxDepth] operator[=] identifier[compTree] operator[SEP] identifier[getMaxDepth] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[double] identifier[depthWeight] operator[=] Other[1] operator[-] operator[SEP] Keyword[double] operator[SEP] identifier[absDiff] operator[/] operator[SEP] Keyword[double] operator[SEP] identifier[maxDepth] operator[SEP] Keyword[return] identifier[depthWeight] operator[*] identifier[coverage] operator[SEP] }
public ModelNode addOperationParameterDescription(final ResourceBundle bundle, final String prefix, final ModelNode operationDescription) { final ModelNode param = getNoTextDescription(true); param.get(ModelDescriptionConstants.DESCRIPTION).set(getAttributeTextDescription(bundle, prefix)); final ModelNode result = operationDescription.get(ModelDescriptionConstants.REQUEST_PROPERTIES, getName()).set(param); ModelNode deprecated = addDeprecatedInfo(result); if (deprecated != null) { deprecated.get(ModelDescriptionConstants.REASON).set(getAttributeDeprecatedDescription(bundle, prefix)); } return result; }
class class_name[name] begin[{] method[addOperationParameterDescription, return_type[type[ModelNode]], modifier[public], parameter[bundle, prefix, operationDescription]] begin[{] local_variable[type[ModelNode], param] call[param.get, parameter[member[ModelDescriptionConstants.DESCRIPTION]]] local_variable[type[ModelNode], result] local_variable[type[ModelNode], deprecated] if[binary_operation[member[.deprecated], !=, literal[null]]] begin[{] call[deprecated.get, parameter[member[ModelDescriptionConstants.REASON]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[ModelNode] identifier[addOperationParameterDescription] operator[SEP] Keyword[final] identifier[ResourceBundle] identifier[bundle] , Keyword[final] identifier[String] identifier[prefix] , Keyword[final] identifier[ModelNode] identifier[operationDescription] operator[SEP] { Keyword[final] identifier[ModelNode] identifier[param] operator[=] identifier[getNoTextDescription] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[param] operator[SEP] identifier[get] operator[SEP] identifier[ModelDescriptionConstants] operator[SEP] identifier[DESCRIPTION] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[getAttributeTextDescription] operator[SEP] identifier[bundle] , identifier[prefix] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ModelNode] identifier[result] operator[=] identifier[operationDescription] operator[SEP] identifier[get] operator[SEP] identifier[ModelDescriptionConstants] operator[SEP] identifier[REQUEST_PROPERTIES] , identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[param] operator[SEP] operator[SEP] identifier[ModelNode] identifier[deprecated] operator[=] identifier[addDeprecatedInfo] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[deprecated] operator[!=] Other[null] operator[SEP] { identifier[deprecated] operator[SEP] identifier[get] operator[SEP] identifier[ModelDescriptionConstants] operator[SEP] identifier[REASON] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[getAttributeDeprecatedDescription] operator[SEP] identifier[bundle] , identifier[prefix] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public final QueryParser.t_return t() throws RecognitionException { QueryParser.t_return retval = new QueryParser.t_return(); retval.start = input.LT(1); CommonTree root_0 = null; Token string_literal84=null; CommonTree string_literal84_tree=null; try { // src/riemann/Query.g:71:3: ( 'true' ) // src/riemann/Query.g:71:5: 'true' { root_0 = (CommonTree)adaptor.nil(); string_literal84=(Token)match(input,27,FOLLOW_27_in_t552); string_literal84_tree = (CommonTree)adaptor.create(string_literal84); adaptor.addChild(root_0, string_literal84_tree); } retval.stop = input.LT(-1); retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0); adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop); } catch (RecognitionException re) { reportError(re); recover(input,re); retval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re); } finally { } return retval; }
class class_name[name] begin[{] method[t, return_type[type[QueryParser]], modifier[final public], parameter[]] begin[{] local_variable[type[QueryParser], retval] assign[member[retval.start], call[input.LT, parameter[literal[1]]]] local_variable[type[CommonTree], root_0] local_variable[type[Token], string_literal84] local_variable[type[CommonTree], string_literal84_tree] TryStatement(block=[BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=root_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=nil, postfix_operators=[], prefix_operators=[], qualifier=adaptor, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CommonTree, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=string_literal84, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=27), MemberReference(member=FOLLOW_27_in_t552, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Token, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=string_literal84_tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=string_literal84, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=adaptor, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CommonTree, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=root_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=string_literal84_tree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addChild, postfix_operators=[], prefix_operators=[], qualifier=adaptor, selectors=[], type_arguments=None), label=None)]), StatementExpression(expression=Assignment(expressionl=MemberReference(member=stop, postfix_operators=[], prefix_operators=[], qualifier=retval, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=LT, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=retval, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=root_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rulePostProcessing, postfix_operators=[], prefix_operators=[], qualifier=adaptor, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CommonTree, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=retval, selectors=[]), MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=retval, selectors=[]), MemberReference(member=stop, postfix_operators=[], prefix_operators=[], qualifier=retval, selectors=[])], member=setTokenBoundaries, postfix_operators=[], prefix_operators=[], qualifier=adaptor, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tree, postfix_operators=[], prefix_operators=[], qualifier=retval, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=retval, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=LT, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=errorNode, postfix_operators=[], prefix_operators=[], qualifier=adaptor, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=CommonTree, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.retval]] end[}] END[}]
Keyword[public] Keyword[final] identifier[QueryParser] operator[SEP] identifier[t_return] identifier[t] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[QueryParser] operator[SEP] identifier[t_return] identifier[retval] operator[=] Keyword[new] identifier[QueryParser] operator[SEP] identifier[t_return] operator[SEP] operator[SEP] operator[SEP] identifier[retval] operator[SEP] identifier[start] operator[=] identifier[input] operator[SEP] identifier[LT] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[CommonTree] identifier[root_0] operator[=] Other[null] operator[SEP] identifier[Token] identifier[string_literal84] operator[=] Other[null] operator[SEP] identifier[CommonTree] identifier[string_literal84_tree] operator[=] Other[null] operator[SEP] Keyword[try] { { identifier[root_0] operator[=] operator[SEP] identifier[CommonTree] operator[SEP] identifier[adaptor] operator[SEP] identifier[nil] operator[SEP] operator[SEP] operator[SEP] identifier[string_literal84] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[27] , identifier[FOLLOW_27_in_t552] operator[SEP] operator[SEP] identifier[string_literal84_tree] operator[=] operator[SEP] identifier[CommonTree] operator[SEP] identifier[adaptor] operator[SEP] identifier[create] operator[SEP] identifier[string_literal84] operator[SEP] operator[SEP] identifier[adaptor] operator[SEP] identifier[addChild] operator[SEP] identifier[root_0] , identifier[string_literal84_tree] operator[SEP] operator[SEP] } identifier[retval] operator[SEP] identifier[stop] operator[=] identifier[input] operator[SEP] identifier[LT] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[retval] operator[SEP] identifier[tree] operator[=] operator[SEP] identifier[CommonTree] operator[SEP] identifier[adaptor] operator[SEP] identifier[rulePostProcessing] operator[SEP] identifier[root_0] operator[SEP] operator[SEP] identifier[adaptor] operator[SEP] identifier[setTokenBoundaries] operator[SEP] identifier[retval] operator[SEP] identifier[tree] , identifier[retval] operator[SEP] identifier[start] , identifier[retval] operator[SEP] identifier[stop] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[retval] operator[SEP] identifier[tree] operator[=] operator[SEP] identifier[CommonTree] operator[SEP] identifier[adaptor] operator[SEP] identifier[errorNode] operator[SEP] identifier[input] , identifier[retval] operator[SEP] identifier[start] , identifier[input] operator[SEP] identifier[LT] operator[SEP] operator[-] Other[1] operator[SEP] , identifier[re] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[retval] operator[SEP] }
public final UnresolvedReferenceExpression mergeOperand(UnresolvedReferenceExpression aggBuffer) { String name = String.valueOf(Arrays.asList(aggBufferAttributes()).indexOf(aggBuffer)); validateOperandName(name); return new UnresolvedReferenceExpression(name); }
class class_name[name] begin[{] method[mergeOperand, return_type[type[UnresolvedReferenceExpression]], modifier[final public], parameter[aggBuffer]] begin[{] local_variable[type[String], name] call[.validateOperandName, parameter[member[.name]]] return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnresolvedReferenceExpression, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[final] identifier[UnresolvedReferenceExpression] identifier[mergeOperand] operator[SEP] identifier[UnresolvedReferenceExpression] identifier[aggBuffer] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[aggBufferAttributes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] identifier[aggBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[validateOperandName] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[UnresolvedReferenceExpression] operator[SEP] identifier[name] operator[SEP] operator[SEP] }
public static void reset() { ShadowApplication shadowApplication = Shadow.extract(RuntimeEnvironment.application); shadowApplication.setLatestAlertDialog(null); }
class class_name[name] begin[{] method[reset, return_type[void], modifier[public static], parameter[]] begin[{] local_variable[type[ShadowApplication], shadowApplication] call[shadowApplication.setLatestAlertDialog, parameter[literal[null]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[reset] operator[SEP] operator[SEP] { identifier[ShadowApplication] identifier[shadowApplication] operator[=] identifier[Shadow] operator[SEP] identifier[extract] operator[SEP] identifier[RuntimeEnvironment] operator[SEP] identifier[application] operator[SEP] operator[SEP] identifier[shadowApplication] operator[SEP] identifier[setLatestAlertDialog] operator[SEP] Other[null] operator[SEP] operator[SEP] }
public SelectRecordsInputStream getRecordsInputStream(SelectObjectContentEventVisitor listener) throws SelectObjectContentEventException { InputStream recordInputStream = new SequenceInputStream(new EventStreamEnumeration(getEventsIterator(), listener)); // Ignore close() calls to the record stream. The sequence input stream would read the whole stream to close all of the // streams in the enum, and the streams in the enum aren't needed because they're byte array input streams. recordInputStream = ReleasableInputStream.wrap(recordInputStream).disableClose(); return new SelectRecordsInputStream(recordInputStream, inputStream); }
class class_name[name] begin[{] method[getRecordsInputStream, return_type[type[SelectRecordsInputStream]], modifier[public], parameter[listener]] begin[{] local_variable[type[InputStream], recordInputStream] assign[member[.recordInputStream], call[ReleasableInputStream.wrap, parameter[member[.recordInputStream]]]] return[ClassCreator(arguments=[MemberReference(member=recordInputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=inputStream, 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=SelectRecordsInputStream, sub_type=None))] end[}] END[}]
Keyword[public] identifier[SelectRecordsInputStream] identifier[getRecordsInputStream] operator[SEP] identifier[SelectObjectContentEventVisitor] identifier[listener] operator[SEP] Keyword[throws] identifier[SelectObjectContentEventException] { identifier[InputStream] identifier[recordInputStream] operator[=] Keyword[new] identifier[SequenceInputStream] operator[SEP] Keyword[new] identifier[EventStreamEnumeration] operator[SEP] identifier[getEventsIterator] operator[SEP] operator[SEP] , identifier[listener] operator[SEP] operator[SEP] operator[SEP] identifier[recordInputStream] operator[=] identifier[ReleasableInputStream] operator[SEP] identifier[wrap] operator[SEP] identifier[recordInputStream] operator[SEP] operator[SEP] identifier[disableClose] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[SelectRecordsInputStream] operator[SEP] identifier[recordInputStream] , identifier[inputStream] operator[SEP] operator[SEP] }
public synchronized void openDriver(SurfaceHolder holder) throws IOException { OpenCamera theCamera = camera; if (theCamera == null) { theCamera = OpenCameraInterface.open(requestedCameraId); if (theCamera == null) { throw new IOException("Camera.open() failed to return object from driver"); } camera = theCamera; } if (!initialized) { initialized = true; configManager.initFromCameraParameters(theCamera); if (requestedFramingRectWidth > 0 && requestedFramingRectHeight > 0) { setManualFramingRect(requestedFramingRectWidth, requestedFramingRectHeight); requestedFramingRectWidth = 0; requestedFramingRectHeight = 0; } } Camera cameraObject = theCamera.getCamera(); Camera.Parameters parameters = cameraObject.getParameters(); String parametersFlattened = parameters == null ? null : parameters.flatten(); // Save these, temporarily try { configManager.setDesiredCameraParameters(theCamera, false); } catch (RuntimeException re) { // Driver failed Log.w(TAG, "Camera rejected parameters. Setting only minimal safe-mode parameters"); Log.i(TAG, "Resetting to saved camera params: " + parametersFlattened); // Reset: if (parametersFlattened != null) { parameters = cameraObject.getParameters(); parameters.unflatten(parametersFlattened); try { cameraObject.setParameters(parameters); configManager.setDesiredCameraParameters(theCamera, true); } catch (RuntimeException re2) { // Well, darn. Give up Log.w(TAG, "Camera rejected even safe-mode parameters! No configuration"); } } } cameraObject.setPreviewDisplay(holder); }
class class_name[name] begin[{] method[openDriver, return_type[void], modifier[synchronized public], parameter[holder]] begin[{] local_variable[type[OpenCamera], theCamera] if[binary_operation[member[.theCamera], ==, literal[null]]] begin[{] assign[member[.theCamera], call[OpenCameraInterface.open, parameter[member[.requestedCameraId]]]] if[binary_operation[member[.theCamera], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Camera.open() failed to return object from driver")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.camera], member[.theCamera]] else begin[{] None end[}] if[member[.initialized]] begin[{] assign[member[.initialized], literal[true]] call[configManager.initFromCameraParameters, parameter[member[.theCamera]]] if[binary_operation[binary_operation[member[.requestedFramingRectWidth], >, literal[0]], &&, binary_operation[member[.requestedFramingRectHeight], >, literal[0]]]] begin[{] call[.setManualFramingRect, parameter[member[.requestedFramingRectWidth], member[.requestedFramingRectHeight]]] assign[member[.requestedFramingRectWidth], literal[0]] assign[member[.requestedFramingRectHeight], literal[0]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[Camera], cameraObject] local_variable[type[Camera], parameters] local_variable[type[String], parametersFlattened] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=theCamera, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setDesiredCameraParameters, postfix_operators=[], prefix_operators=[], qualifier=configManager, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Camera rejected parameters. Setting only minimal safe-mode parameters")], member=w, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Resetting to saved camera params: "), operandr=MemberReference(member=parametersFlattened, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=i, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parametersFlattened, 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=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getParameters, postfix_operators=[], prefix_operators=[], qualifier=cameraObject, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parametersFlattened, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unflatten, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setParameters, postfix_operators=[], prefix_operators=[], qualifier=cameraObject, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=theCamera, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setDesiredCameraParameters, postfix_operators=[], prefix_operators=[], qualifier=configManager, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Camera rejected even safe-mode parameters! No configuration")], member=w, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re2, types=['RuntimeException']))], finally_block=None, label=None, resources=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RuntimeException']))], finally_block=None, label=None, resources=None) call[cameraObject.setPreviewDisplay, parameter[member[.holder]]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[openDriver] operator[SEP] identifier[SurfaceHolder] identifier[holder] operator[SEP] Keyword[throws] identifier[IOException] { identifier[OpenCamera] identifier[theCamera] operator[=] identifier[camera] operator[SEP] Keyword[if] operator[SEP] identifier[theCamera] operator[==] Other[null] operator[SEP] { identifier[theCamera] operator[=] identifier[OpenCameraInterface] operator[SEP] identifier[open] operator[SEP] identifier[requestedCameraId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[theCamera] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[camera] operator[=] identifier[theCamera] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[initialized] operator[SEP] { identifier[initialized] operator[=] literal[boolean] operator[SEP] identifier[configManager] operator[SEP] identifier[initFromCameraParameters] operator[SEP] identifier[theCamera] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[requestedFramingRectWidth] operator[>] Other[0] operator[&&] identifier[requestedFramingRectHeight] operator[>] Other[0] operator[SEP] { identifier[setManualFramingRect] operator[SEP] identifier[requestedFramingRectWidth] , identifier[requestedFramingRectHeight] operator[SEP] operator[SEP] identifier[requestedFramingRectWidth] operator[=] Other[0] operator[SEP] identifier[requestedFramingRectHeight] operator[=] Other[0] operator[SEP] } } identifier[Camera] identifier[cameraObject] operator[=] identifier[theCamera] operator[SEP] identifier[getCamera] operator[SEP] operator[SEP] operator[SEP] identifier[Camera] operator[SEP] identifier[Parameters] identifier[parameters] operator[=] identifier[cameraObject] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[parametersFlattened] operator[=] identifier[parameters] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[parameters] operator[SEP] identifier[flatten] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[configManager] operator[SEP] identifier[setDesiredCameraParameters] operator[SEP] identifier[theCamera] , literal[boolean] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[re] operator[SEP] { identifier[Log] operator[SEP] identifier[w] operator[SEP] identifier[TAG] , literal[String] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[i] operator[SEP] identifier[TAG] , literal[String] operator[+] identifier[parametersFlattened] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parametersFlattened] operator[!=] Other[null] operator[SEP] { identifier[parameters] operator[=] identifier[cameraObject] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[unflatten] operator[SEP] identifier[parametersFlattened] operator[SEP] operator[SEP] Keyword[try] { identifier[cameraObject] operator[SEP] identifier[setParameters] operator[SEP] identifier[parameters] operator[SEP] operator[SEP] identifier[configManager] operator[SEP] identifier[setDesiredCameraParameters] operator[SEP] identifier[theCamera] , literal[boolean] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[re2] operator[SEP] { identifier[Log] operator[SEP] identifier[w] operator[SEP] identifier[TAG] , literal[String] operator[SEP] operator[SEP] } } } identifier[cameraObject] operator[SEP] identifier[setPreviewDisplay] operator[SEP] identifier[holder] operator[SEP] operator[SEP] }
public static void propagateTracingContext(Span span, HttpHeaders headers) { Preconditions.checkArgument(span != null, "span should not be null."); Preconditions.checkArgument(headers != null, "headers should not be null."); if (propagationTextFormat != null && propagationTextFormatSetter != null) { if (!span.equals(BlankSpan.INSTANCE)) { propagationTextFormat.inject(span.getContext(), headers, propagationTextFormatSetter); } } }
class class_name[name] begin[{] method[propagateTracingContext, return_type[void], modifier[public static], parameter[span, headers]] begin[{] call[Preconditions.checkArgument, parameter[binary_operation[member[.span], !=, literal[null]], literal["span should not be null."]]] call[Preconditions.checkArgument, parameter[binary_operation[member[.headers], !=, literal[null]], literal["headers should not be null."]]] if[binary_operation[binary_operation[member[.propagationTextFormat], !=, literal[null]], &&, binary_operation[member[.propagationTextFormatSetter], !=, literal[null]]]] begin[{] if[call[span.equals, parameter[member[BlankSpan.INSTANCE]]]] begin[{] call[propagationTextFormat.inject, parameter[call[span.getContext, parameter[]], member[.headers], member[.propagationTextFormatSetter]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[propagateTracingContext] operator[SEP] identifier[Span] identifier[span] , identifier[HttpHeaders] identifier[headers] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[span] operator[!=] Other[null] , literal[String] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[headers] operator[!=] Other[null] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[propagationTextFormat] operator[!=] Other[null] operator[&&] identifier[propagationTextFormatSetter] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[span] operator[SEP] identifier[equals] operator[SEP] identifier[BlankSpan] operator[SEP] identifier[INSTANCE] operator[SEP] operator[SEP] { identifier[propagationTextFormat] operator[SEP] identifier[inject] operator[SEP] identifier[span] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] , identifier[headers] , identifier[propagationTextFormatSetter] operator[SEP] operator[SEP] } } }
public Record openHeaderRecord() { Record record = null; this.syncContactTypeToMain(); // Read in the current contact record ReferenceField fldContactType = (ReferenceField)this.getMainRecord().getField(MessageDetail.CONTACT_TYPE_ID); ContactType recContactType = (ContactType)fldContactType.getReferenceRecord(this); recContactType = (ContactType)fldContactType.getReference(); // Being careful String strHeaderRecordName = null; if (recContactType != null) strHeaderRecordName = recContactType.getField(ContactType.CODE).toString(); if ((strHeaderRecordName == null) || (strHeaderRecordName.length() == 0)) strHeaderRecordName = this.getProperty(fldContactType.getFieldName()); record = recContactType.makeRecordFromRecordName(strHeaderRecordName, this); if (record != null) ((ReferenceField)this.getMainRecord().getField(MessageDetail.PERSON_ID)).setReferenceRecord(record); return record; }
class class_name[name] begin[{] method[openHeaderRecord, return_type[type[Record]], modifier[public], parameter[]] begin[{] local_variable[type[Record], record] THIS[call[None.syncContactTypeToMain, parameter[]]] local_variable[type[ReferenceField], fldContactType] local_variable[type[ContactType], recContactType] assign[member[.recContactType], Cast(expression=MethodInvocation(arguments=[], member=getReference, postfix_operators=[], prefix_operators=[], qualifier=fldContactType, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ContactType, sub_type=None))] local_variable[type[String], strHeaderRecordName] if[binary_operation[member[.recContactType], !=, literal[null]]] begin[{] assign[member[.strHeaderRecordName], call[recContactType.getField, parameter[member[ContactType.CODE]]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.strHeaderRecordName], ==, literal[null]], ||, binary_operation[call[strHeaderRecordName.length, parameter[]], ==, literal[0]]]] begin[{] assign[member[.strHeaderRecordName], THIS[call[None.getProperty, parameter[call[fldContactType.getFieldName, parameter[]]]]]] else begin[{] None end[}] assign[member[.record], call[recContactType.makeRecordFromRecordName, parameter[member[.strHeaderRecordName], THIS[]]]] if[binary_operation[member[.record], !=, literal[null]]] begin[{] Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getMainRecord, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=PERSON_ID, postfix_operators=[], prefix_operators=[], qualifier=MessageDetail, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=ReferenceField, sub_type=None)) else begin[{] None end[}] return[member[.record]] end[}] END[}]
Keyword[public] identifier[Record] identifier[openHeaderRecord] operator[SEP] operator[SEP] { identifier[Record] identifier[record] operator[=] Other[null] operator[SEP] Keyword[this] operator[SEP] identifier[syncContactTypeToMain] operator[SEP] operator[SEP] operator[SEP] identifier[ReferenceField] identifier[fldContactType] operator[=] operator[SEP] identifier[ReferenceField] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[MessageDetail] operator[SEP] identifier[CONTACT_TYPE_ID] operator[SEP] operator[SEP] identifier[ContactType] identifier[recContactType] operator[=] operator[SEP] identifier[ContactType] operator[SEP] identifier[fldContactType] operator[SEP] identifier[getReferenceRecord] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[recContactType] operator[=] operator[SEP] identifier[ContactType] operator[SEP] identifier[fldContactType] operator[SEP] identifier[getReference] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[strHeaderRecordName] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[recContactType] operator[!=] Other[null] operator[SEP] identifier[strHeaderRecordName] operator[=] identifier[recContactType] operator[SEP] identifier[getField] operator[SEP] identifier[ContactType] operator[SEP] identifier[CODE] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[strHeaderRecordName] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[strHeaderRecordName] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] identifier[strHeaderRecordName] operator[=] Keyword[this] operator[SEP] identifier[getProperty] operator[SEP] identifier[fldContactType] operator[SEP] identifier[getFieldName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[record] operator[=] identifier[recContactType] operator[SEP] identifier[makeRecordFromRecordName] operator[SEP] identifier[strHeaderRecordName] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[record] operator[!=] Other[null] operator[SEP] operator[SEP] operator[SEP] identifier[ReferenceField] operator[SEP] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[MessageDetail] operator[SEP] identifier[PERSON_ID] operator[SEP] operator[SEP] operator[SEP] identifier[setReferenceRecord] operator[SEP] identifier[record] operator[SEP] operator[SEP] Keyword[return] identifier[record] operator[SEP] }
public void logDomNode (String msg, Node node, Level level, StackTraceElement caller) { String toLog = (msg != null ? msg + "\n" : "DOM node:\n") + domNodeDescription (node, 0); if (caller != null) { logger.logp (level, caller.getClassName (), caller.getMethodName () + "():" + caller.getLineNumber (), toLog); } else { logger.logp (level, "(UnknownSourceClass)", "(unknownSourceMethod)", toLog); } }
class class_name[name] begin[{] method[logDomNode, return_type[void], modifier[public], parameter[msg, node, level, caller]] begin[{] local_variable[type[String], toLog] if[binary_operation[member[.caller], !=, literal[null]]] begin[{] call[logger.logp, parameter[member[.level], call[caller.getClassName, parameter[]], binary_operation[binary_operation[call[caller.getMethodName, parameter[]], +, literal["():"]], +, call[caller.getLineNumber, parameter[]]], member[.toLog]]] else begin[{] call[logger.logp, parameter[member[.level], literal["(UnknownSourceClass)"], literal["(unknownSourceMethod)"], member[.toLog]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[logDomNode] operator[SEP] identifier[String] identifier[msg] , identifier[Node] identifier[node] , identifier[Level] identifier[level] , identifier[StackTraceElement] identifier[caller] operator[SEP] { identifier[String] identifier[toLog] operator[=] operator[SEP] identifier[msg] operator[!=] Other[null] operator[?] identifier[msg] operator[+] literal[String] operator[:] literal[String] operator[SEP] operator[+] identifier[domNodeDescription] operator[SEP] identifier[node] , Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[caller] operator[!=] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[logp] operator[SEP] identifier[level] , identifier[caller] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] , identifier[caller] operator[SEP] identifier[getMethodName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[caller] operator[SEP] identifier[getLineNumber] operator[SEP] operator[SEP] , identifier[toLog] operator[SEP] operator[SEP] } Keyword[else] { identifier[logger] operator[SEP] identifier[logp] operator[SEP] identifier[level] , literal[String] , literal[String] , identifier[toLog] operator[SEP] operator[SEP] } }
public int getSerializedSize() { int result = 0; for (final Map.Entry<Integer, Field> entry : fields.entrySet()) { result += entry.getValue().getSerializedSize(entry.getKey()); } return result; }
class class_name[name] begin[{] method[getSerializedSize, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[int], result] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=getSerializedSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=fields, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getSerializedSize] operator[SEP] operator[SEP] { Keyword[int] identifier[result] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Integer] , identifier[Field] operator[>] identifier[entry] operator[:] identifier[fields] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[+=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getSerializedSize] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public JavaWriter emitField(String type, String name, Set<Modifier> modifiers) throws IOException { return emitField(type, name, modifiers, null); }
class class_name[name] begin[{] method[emitField, return_type[type[JavaWriter]], modifier[public], parameter[type, name, modifiers]] begin[{] return[call[.emitField, parameter[member[.type], member[.name], member[.modifiers], literal[null]]]] end[}] END[}]
Keyword[public] identifier[JavaWriter] identifier[emitField] operator[SEP] identifier[String] identifier[type] , identifier[String] identifier[name] , identifier[Set] operator[<] identifier[Modifier] operator[>] identifier[modifiers] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[emitField] operator[SEP] identifier[type] , identifier[name] , identifier[modifiers] , Other[null] operator[SEP] operator[SEP] }
@TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) public static boolean hasLandscapeScreenFeature(PackageManager manager) { return manager.hasSystemFeature(PackageManager.FEATURE_SCREEN_LANDSCAPE); }
class class_name[name] begin[{] method[hasLandscapeScreenFeature, return_type[type[boolean]], modifier[public static], parameter[manager]] begin[{] return[call[manager.hasSystemFeature, parameter[member[PackageManager.FEATURE_SCREEN_LANDSCAPE]]]] end[}] END[}]
annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[HONEYCOMB_MR2] operator[SEP] Keyword[public] Keyword[static] Keyword[boolean] identifier[hasLandscapeScreenFeature] operator[SEP] identifier[PackageManager] identifier[manager] operator[SEP] { Keyword[return] identifier[manager] operator[SEP] identifier[hasSystemFeature] operator[SEP] identifier[PackageManager] operator[SEP] identifier[FEATURE_SCREEN_LANDSCAPE] operator[SEP] operator[SEP] }
private Version getClusterOrNodeVersion() { if (node.getClusterService() != null && !node.getClusterService().getClusterVersion().isUnknown()) { return node.getClusterService().getClusterVersion(); } else { String overriddenClusterVersion = node.getProperties().getString(GroupProperty.INIT_CLUSTER_VERSION); return (overriddenClusterVersion != null) ? MemberVersion.of(overriddenClusterVersion).asVersion() : node.getVersion().asVersion(); } }
class class_name[name] begin[{] method[getClusterOrNodeVersion, return_type[type[Version]], modifier[private], parameter[]] begin[{] if[binary_operation[binary_operation[call[node.getClusterService, parameter[]], !=, literal[null]], &&, call[node.getClusterService, parameter[]]]] begin[{] return[call[node.getClusterService, parameter[]]] else begin[{] local_variable[type[String], overriddenClusterVersion] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=overriddenClusterVersion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[], member=getVersion, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[MethodInvocation(arguments=[], member=asVersion, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=overriddenClusterVersion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=MemberVersion, selectors=[MethodInvocation(arguments=[], member=asVersion, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None))] end[}] end[}] END[}]
Keyword[private] identifier[Version] identifier[getClusterOrNodeVersion] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[getClusterService] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] identifier[node] operator[SEP] identifier[getClusterService] operator[SEP] operator[SEP] operator[SEP] identifier[getClusterVersion] operator[SEP] operator[SEP] operator[SEP] identifier[isUnknown] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[node] operator[SEP] identifier[getClusterService] operator[SEP] operator[SEP] operator[SEP] identifier[getClusterVersion] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[String] identifier[overriddenClusterVersion] operator[=] identifier[node] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[getString] operator[SEP] identifier[GroupProperty] operator[SEP] identifier[INIT_CLUSTER_VERSION] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[overriddenClusterVersion] operator[!=] Other[null] operator[SEP] operator[?] identifier[MemberVersion] operator[SEP] identifier[of] operator[SEP] identifier[overriddenClusterVersion] operator[SEP] operator[SEP] identifier[asVersion] operator[SEP] operator[SEP] operator[:] identifier[node] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] identifier[asVersion] operator[SEP] operator[SEP] operator[SEP] } }
public void marshall(ListBuildsRequest listBuildsRequest, ProtocolMarshaller protocolMarshaller) { if (listBuildsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(listBuildsRequest.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(listBuildsRequest.getLimit(), LIMIT_BINDING); protocolMarshaller.marshall(listBuildsRequest.getNextToken(), NEXTTOKEN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[listBuildsRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.listBuildsRequest], ==, 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=getStatus, postfix_operators=[], prefix_operators=[], qualifier=listBuildsRequest, selectors=[], type_arguments=None), MemberReference(member=STATUS_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=getLimit, postfix_operators=[], prefix_operators=[], qualifier=listBuildsRequest, selectors=[], type_arguments=None), MemberReference(member=LIMIT_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=listBuildsRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[ListBuildsRequest] identifier[listBuildsRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[listBuildsRequest] 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[listBuildsRequest] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] , identifier[STATUS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listBuildsRequest] operator[SEP] identifier[getLimit] operator[SEP] operator[SEP] , identifier[LIMIT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listBuildsRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void addComponentListeners() { // avoid duplicate registration removeListeners(); for (final AbstractField<?> field : allComponents) { if (field instanceof TextChangeNotifier) { ((TextChangeNotifier) field).addTextChangeListener(new ChangeListener(field)); } if (field instanceof Table) { ((Table) field).addItemSetChangeListener(new ChangeListener(field)); } field.addValueChangeListener(new ChangeListener(field)); } }
class class_name[name] begin[{] method[addComponentListeners, return_type[void], modifier[public], parameter[]] begin[{] call[.removeListeners, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=TextChangeNotifier, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=TextChangeNotifier, sub_type=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Table, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Table, sub_type=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=field, 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=ChangeListener, sub_type=None))], member=addValueChangeListener, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=allComponents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=AbstractField, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[addComponentListeners] operator[SEP] operator[SEP] { identifier[removeListeners] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[AbstractField] operator[<] operator[?] operator[>] identifier[field] operator[:] identifier[allComponents] operator[SEP] { Keyword[if] operator[SEP] identifier[field] Keyword[instanceof] identifier[TextChangeNotifier] operator[SEP] { operator[SEP] operator[SEP] identifier[TextChangeNotifier] operator[SEP] identifier[field] operator[SEP] operator[SEP] identifier[addTextChangeListener] operator[SEP] Keyword[new] identifier[ChangeListener] operator[SEP] identifier[field] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[field] Keyword[instanceof] identifier[Table] operator[SEP] { operator[SEP] operator[SEP] identifier[Table] operator[SEP] identifier[field] operator[SEP] operator[SEP] identifier[addItemSetChangeListener] operator[SEP] Keyword[new] identifier[ChangeListener] operator[SEP] identifier[field] operator[SEP] operator[SEP] operator[SEP] } identifier[field] operator[SEP] identifier[addValueChangeListener] operator[SEP] Keyword[new] identifier[ChangeListener] operator[SEP] identifier[field] operator[SEP] operator[SEP] operator[SEP] } }
protected void calculateDrawRectF() { mFillCircleRectF = getArcRect(mClockwiseReachedArcWidth); mReachedArcRectF = getArcRect(mClockwiseReachedArcWidth / 2); mOutlineArcRectF = getArcRect(mClockwiseOutlineArcWidth / 2); }
class class_name[name] begin[{] method[calculateDrawRectF, return_type[void], modifier[protected], parameter[]] begin[{] assign[member[.mFillCircleRectF], call[.getArcRect, parameter[member[.mClockwiseReachedArcWidth]]]] assign[member[.mReachedArcRectF], call[.getArcRect, parameter[binary_operation[member[.mClockwiseReachedArcWidth], /, literal[2]]]]] assign[member[.mOutlineArcRectF], call[.getArcRect, parameter[binary_operation[member[.mClockwiseOutlineArcWidth], /, literal[2]]]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[calculateDrawRectF] operator[SEP] operator[SEP] { identifier[mFillCircleRectF] operator[=] identifier[getArcRect] operator[SEP] identifier[mClockwiseReachedArcWidth] operator[SEP] operator[SEP] identifier[mReachedArcRectF] operator[=] identifier[getArcRect] operator[SEP] identifier[mClockwiseReachedArcWidth] operator[/] Other[2] operator[SEP] operator[SEP] identifier[mOutlineArcRectF] operator[=] identifier[getArcRect] operator[SEP] identifier[mClockwiseOutlineArcWidth] operator[/] Other[2] operator[SEP] operator[SEP] }
public void receiveAndProcess() { if (this.shouldContinue()) { this.receiver.receive(this.onReceiveHandler.getMaxEventCount()) .handleAsync(this.processAndReschedule, this.executor); } else { if (TRACE_LOGGER.isInfoEnabled()) { TRACE_LOGGER.info(String.format(Locale.US, "Stopping receive pump for eventHub (%s), consumerGroup (%s), partition (%s) as %s", this.eventHubName, this.consumerGroupName, this.receiver.getPartitionId(), this.stopPumpRaised.get() ? "per the request." : "pump ran into errors.")); } this.stopPump.complete(null); } }
class class_name[name] begin[{] method[receiveAndProcess, return_type[void], modifier[public], parameter[]] begin[{] if[THIS[call[None.shouldContinue, parameter[]]]] begin[{] THIS[member[None.receiver]call[None.receive, parameter[THIS[member[None.onReceiveHandler]call[None.getMaxEventCount, parameter[]]]]]call[None.handleAsync, parameter[THIS[member[None.processAndReschedule]], THIS[member[None.executor]]]]] else begin[{] if[call[TRACE_LOGGER.isInfoEnabled, parameter[]]] begin[{] call[TRACE_LOGGER.info, parameter[call[String.format, parameter[member[Locale.US], literal["Stopping receive pump for eventHub (%s), consumerGroup (%s), partition (%s) as %s"], THIS[member[None.eventHubName]], THIS[member[None.consumerGroupName]], THIS[member[None.receiver]call[None.getPartitionId, parameter[]]], TernaryExpression(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=stopPumpRaised, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="pump ran into errors."), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="per the request."))]]]] else begin[{] None end[}] THIS[member[None.stopPump]call[None.complete, parameter[literal[null]]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[receiveAndProcess] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[shouldContinue] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[receiver] operator[SEP] identifier[receive] operator[SEP] Keyword[this] operator[SEP] identifier[onReceiveHandler] operator[SEP] identifier[getMaxEventCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[handleAsync] operator[SEP] Keyword[this] operator[SEP] identifier[processAndReschedule] , Keyword[this] operator[SEP] identifier[executor] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[TRACE_LOGGER] operator[SEP] identifier[isInfoEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[TRACE_LOGGER] operator[SEP] identifier[info] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[Locale] operator[SEP] identifier[US] , literal[String] , Keyword[this] operator[SEP] identifier[eventHubName] , Keyword[this] operator[SEP] identifier[consumerGroupName] , Keyword[this] operator[SEP] identifier[receiver] operator[SEP] identifier[getPartitionId] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[stopPumpRaised] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[stopPump] operator[SEP] identifier[complete] operator[SEP] Other[null] operator[SEP] operator[SEP] } }
@Override public Mono<ServiceDiscovery> start() { return Mono.defer( () -> { Map<String, String> metadata = endpoint != null ? Collections.singletonMap( endpoint.id(), ClusterMetadataCodec.encodeMetadata(endpoint)) : Collections.emptyMap(); ClusterConfig clusterConfig = copyFrom(this.clusterConfig).addMetadata(metadata).build(); ScalecubeServiceDiscovery serviceDiscovery = new ScalecubeServiceDiscovery(this, clusterConfig); return Cluster.join(clusterConfig) .doOnSuccess(cluster -> serviceDiscovery.cluster = cluster) .thenReturn(serviceDiscovery); }); }
class class_name[name] begin[{] method[start, return_type[type[Mono]], modifier[public], parameter[]] begin[{] return[call[Mono.defer, parameter[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=endpoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[], member=emptyMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=id, postfix_operators=[], prefix_operators=[], qualifier=endpoint, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=endpoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encodeMetadata, postfix_operators=[], prefix_operators=[], qualifier=ClusterMetadataCodec, selectors=[], type_arguments=None)], member=singletonMap, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None)), name=metadata)], 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=String, sub_type=None))], dimensions=[], name=Map, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=clusterConfig, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=copyFrom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=metadata, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addMetadata, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=clusterConfig)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ClusterConfig, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=clusterConfig, 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=ScalecubeServiceDiscovery, sub_type=None)), name=serviceDiscovery)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ScalecubeServiceDiscovery, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=clusterConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=join, postfix_operators=[], prefix_operators=[], qualifier=Cluster, selectors=[MethodInvocation(arguments=[LambdaExpression(body=Assignment(expressionl=MemberReference(member=cluster, postfix_operators=[], prefix_operators=[], qualifier=serviceDiscovery, selectors=[]), type==, value=MemberReference(member=cluster, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), parameters=[MemberReference(member=cluster, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=doOnSuccess, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=serviceDiscovery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=thenReturn, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], parameters=[])]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Mono] operator[<] identifier[ServiceDiscovery] operator[>] identifier[start] operator[SEP] operator[SEP] { Keyword[return] identifier[Mono] operator[SEP] identifier[defer] operator[SEP] operator[SEP] operator[SEP] operator[->] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[metadata] operator[=] identifier[endpoint] operator[!=] Other[null] operator[?] identifier[Collections] operator[SEP] identifier[singletonMap] operator[SEP] identifier[endpoint] operator[SEP] identifier[id] operator[SEP] operator[SEP] , identifier[ClusterMetadataCodec] operator[SEP] identifier[encodeMetadata] operator[SEP] identifier[endpoint] operator[SEP] operator[SEP] operator[:] identifier[Collections] operator[SEP] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] identifier[ClusterConfig] identifier[clusterConfig] operator[=] identifier[copyFrom] operator[SEP] Keyword[this] operator[SEP] identifier[clusterConfig] operator[SEP] operator[SEP] identifier[addMetadata] operator[SEP] identifier[metadata] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[ScalecubeServiceDiscovery] identifier[serviceDiscovery] operator[=] Keyword[new] identifier[ScalecubeServiceDiscovery] operator[SEP] Keyword[this] , identifier[clusterConfig] operator[SEP] operator[SEP] Keyword[return] identifier[Cluster] operator[SEP] identifier[join] operator[SEP] identifier[clusterConfig] operator[SEP] operator[SEP] identifier[doOnSuccess] operator[SEP] identifier[cluster] operator[->] identifier[serviceDiscovery] operator[SEP] identifier[cluster] operator[=] identifier[cluster] operator[SEP] operator[SEP] identifier[thenReturn] operator[SEP] identifier[serviceDiscovery] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] }
@BsonIgnore @Nullable public MongoNamespace getNamespace() { if (namespaceDocument == null) { return null; } if (!namespaceDocument.containsKey("db") || !namespaceDocument.containsKey("coll")) { return null; } return new MongoNamespace(namespaceDocument.getString("db").getValue(), namespaceDocument.getString("coll").getValue()); }
class class_name[name] begin[{] method[getNamespace, return_type[type[MongoNamespace]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.namespaceDocument], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[call[namespaceDocument.containsKey, parameter[literal["db"]]], ||, call[namespaceDocument.containsKey, parameter[literal["coll"]]]]] begin[{] return[literal[null]] else begin[{] None end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="db")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=namespaceDocument, selectors=[MethodInvocation(arguments=[], member=getValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="coll")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=namespaceDocument, selectors=[MethodInvocation(arguments=[], member=getValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MongoNamespace, sub_type=None))] end[}] END[}]
annotation[@] identifier[BsonIgnore] annotation[@] identifier[Nullable] Keyword[public] identifier[MongoNamespace] identifier[getNamespace] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[namespaceDocument] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[namespaceDocument] operator[SEP] identifier[containsKey] operator[SEP] literal[String] operator[SEP] operator[||] operator[!] identifier[namespaceDocument] operator[SEP] identifier[containsKey] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] Keyword[new] identifier[MongoNamespace] operator[SEP] identifier[namespaceDocument] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[namespaceDocument] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static List<String> executeScript(InstanceConfiguration config, CommandLine command, Map<String, String> environment, ProcessDestroyer processDestroyer) { return executeScript(config, command, environment, processDestroyer, false); }
class class_name[name] begin[{] method[executeScript, return_type[type[List]], modifier[public static], parameter[config, command, environment, processDestroyer]] begin[{] return[call[.executeScript, parameter[member[.config], member[.command], member[.environment], member[.processDestroyer], literal[false]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[executeScript] operator[SEP] identifier[InstanceConfiguration] identifier[config] , identifier[CommandLine] identifier[command] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[environment] , identifier[ProcessDestroyer] identifier[processDestroyer] operator[SEP] { Keyword[return] identifier[executeScript] operator[SEP] identifier[config] , identifier[command] , identifier[environment] , identifier[processDestroyer] , literal[boolean] operator[SEP] operator[SEP] }
@Override public Object resolveVariable(final String variableName) throws Exception { final Variable variable = getVariables().get(variableName); if (variable == null) return null; return variable.value; }
class class_name[name] begin[{] method[resolveVariable, return_type[type[Object]], modifier[public], parameter[variableName]] begin[{] local_variable[type[Variable], variable] if[binary_operation[member[.variable], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[member[variable.value]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[resolveVariable] operator[SEP] Keyword[final] identifier[String] identifier[variableName] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[final] identifier[Variable] identifier[variable] operator[=] identifier[getVariables] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[variableName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[variable] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[return] identifier[variable] operator[SEP] identifier[value] operator[SEP] }
public void setFirstIds(int i, String v) { if (Cooccurrence_Type.featOkTst && ((Cooccurrence_Type)jcasType).casFeat_firstIds == null) jcasType.jcas.throwFeatMissing("firstIds", "ch.epfl.bbp.uima.types.Cooccurrence"); jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_firstIds), i); jcasType.ll_cas.ll_setStringArrayValue(jcasType.ll_cas.ll_getRefValue(addr, ((Cooccurrence_Type)jcasType).casFeatCode_firstIds), i, v);}
class class_name[name] begin[{] method[setFirstIds, return_type[void], modifier[public], parameter[i, v]] begin[{] if[binary_operation[member[Cooccurrence_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Cooccurrence_Type, sub_type=None)), ==, literal[null]]]] begin[{] call[jcasType.jcas.throwFeatMissing, parameter[literal["firstIds"], literal["ch.epfl.bbp.uima.types.Cooccurrence"]]] else begin[{] None end[}] call[jcasType.jcas.checkArrayBounds, parameter[call[jcasType.ll_cas.ll_getRefValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Cooccurrence_Type, sub_type=None))]], member[.i]]] call[jcasType.ll_cas.ll_setStringArrayValue, parameter[call[jcasType.ll_cas.ll_getRefValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Cooccurrence_Type, sub_type=None))]], member[.i], member[.v]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setFirstIds] operator[SEP] Keyword[int] identifier[i] , identifier[String] identifier[v] operator[SEP] { Keyword[if] operator[SEP] identifier[Cooccurrence_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[Cooccurrence_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_firstIds] operator[==] Other[null] operator[SEP] identifier[jcasType] operator[SEP] identifier[jcas] operator[SEP] identifier[throwFeatMissing] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[jcasType] operator[SEP] identifier[jcas] operator[SEP] identifier[checkArrayBounds] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getRefValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[Cooccurrence_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_firstIds] operator[SEP] , identifier[i] operator[SEP] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_setStringArrayValue] operator[SEP] identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getRefValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[Cooccurrence_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_firstIds] operator[SEP] , identifier[i] , identifier[v] operator[SEP] operator[SEP] }
public DescriptionBuilder freeSelectProperty(final String name, final String defaultValue, final boolean required, final String propTitle, final String propDescription, final List<String> selectValues) { properties.add(PropertyUtil.freeSelect(name, propTitle, propDescription, required, defaultValue, selectValues)); return this; }
class class_name[name] begin[{] method[freeSelectProperty, return_type[type[DescriptionBuilder]], modifier[public], parameter[name, defaultValue, required, propTitle, propDescription, selectValues]] begin[{] call[properties.add, parameter[call[PropertyUtil.freeSelect, parameter[member[.name], member[.propTitle], member[.propDescription], member[.required], member[.defaultValue], member[.selectValues]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[DescriptionBuilder] identifier[freeSelectProperty] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[defaultValue] , Keyword[final] Keyword[boolean] identifier[required] , Keyword[final] identifier[String] identifier[propTitle] , Keyword[final] identifier[String] identifier[propDescription] , Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[selectValues] operator[SEP] { identifier[properties] operator[SEP] identifier[add] operator[SEP] identifier[PropertyUtil] operator[SEP] identifier[freeSelect] operator[SEP] identifier[name] , identifier[propTitle] , identifier[propDescription] , identifier[required] , identifier[defaultValue] , identifier[selectValues] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static void validateMetadata(Map<String, String> metadata) throws ServiceException { for ( String key : metadata.keySet()){ if (!validateRequiredField(key, metaKeyRegEx)){ throw new ServiceException( ErrorCode.SERVICE_INSTANCE_METAKEY_FORMAT_ERROR, ErrorCode.SERVICE_INSTANCE_METAKEY_FORMAT_ERROR.getMessageTemplate(),key ); } } }
class class_name[name] begin[{] method[validateMetadata, return_type[void], modifier[public static], parameter[metadata]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=metaKeyRegEx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validateRequiredField, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=SERVICE_INSTANCE_METAKEY_FORMAT_ERROR, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[]), MethodInvocation(arguments=[], member=getMessageTemplate, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode.SERVICE_INSTANCE_METAKEY_FORMAT_ERROR, selectors=[], type_arguments=None), MemberReference(member=key, 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)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=metadata, 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[static] Keyword[void] identifier[validateMetadata] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[metadata] operator[SEP] Keyword[throws] identifier[ServiceException] { Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[metadata] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[validateRequiredField] operator[SEP] identifier[key] , identifier[metaKeyRegEx] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServiceException] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[SERVICE_INSTANCE_METAKEY_FORMAT_ERROR] , identifier[ErrorCode] operator[SEP] identifier[SERVICE_INSTANCE_METAKEY_FORMAT_ERROR] operator[SEP] identifier[getMessageTemplate] operator[SEP] operator[SEP] , identifier[key] operator[SEP] operator[SEP] } } }
@Override public R visitModule(ModuleElement e, P p) { // Use implementation from interface default method return ElementVisitor.super.visitModule(e, p); }
class class_name[name] begin[{] method[visitModule, return_type[type[R]], modifier[public], parameter[e, p]] begin[{] return[member[.ElementVisitor]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[R] identifier[visitModule] operator[SEP] identifier[ModuleElement] identifier[e] , identifier[P] identifier[p] operator[SEP] { Keyword[return] identifier[ElementVisitor] operator[SEP] Keyword[super] operator[SEP] identifier[visitModule] operator[SEP] identifier[e] , identifier[p] operator[SEP] operator[SEP] }
public static VolleyFragment newInstance() { VolleyFragment fragment = new VolleyFragment(); Bundle args = new Bundle(); fragment.setArguments(args); return fragment; }
class class_name[name] begin[{] method[newInstance, return_type[type[VolleyFragment]], modifier[public static], parameter[]] begin[{] local_variable[type[VolleyFragment], fragment] local_variable[type[Bundle], args] call[fragment.setArguments, parameter[member[.args]]] return[member[.fragment]] end[}] END[}]
Keyword[public] Keyword[static] identifier[VolleyFragment] identifier[newInstance] operator[SEP] operator[SEP] { identifier[VolleyFragment] identifier[fragment] operator[=] Keyword[new] identifier[VolleyFragment] operator[SEP] operator[SEP] operator[SEP] identifier[Bundle] identifier[args] operator[=] Keyword[new] identifier[Bundle] operator[SEP] operator[SEP] operator[SEP] identifier[fragment] operator[SEP] identifier[setArguments] operator[SEP] identifier[args] operator[SEP] operator[SEP] Keyword[return] identifier[fragment] operator[SEP] }
public QueryQuestionComment createQueryQuestionComment(QueryReply queryReply, QueryPage queryPage, QueryQuestionComment parentComment, String comment, Boolean hidden, User creator, Date created) { return queryQuestionCommentDAO.create(queryReply, queryPage, parentComment, comment, hidden, creator, created, creator, created); }
class class_name[name] begin[{] method[createQueryQuestionComment, return_type[type[QueryQuestionComment]], modifier[public], parameter[queryReply, queryPage, parentComment, comment, hidden, creator, created]] begin[{] return[call[queryQuestionCommentDAO.create, parameter[member[.queryReply], member[.queryPage], member[.parentComment], member[.comment], member[.hidden], member[.creator], member[.created], member[.creator], member[.created]]]] end[}] END[}]
Keyword[public] identifier[QueryQuestionComment] identifier[createQueryQuestionComment] operator[SEP] identifier[QueryReply] identifier[queryReply] , identifier[QueryPage] identifier[queryPage] , identifier[QueryQuestionComment] identifier[parentComment] , identifier[String] identifier[comment] , identifier[Boolean] identifier[hidden] , identifier[User] identifier[creator] , identifier[Date] identifier[created] operator[SEP] { Keyword[return] identifier[queryQuestionCommentDAO] operator[SEP] identifier[create] operator[SEP] identifier[queryReply] , identifier[queryPage] , identifier[parentComment] , identifier[comment] , identifier[hidden] , identifier[creator] , identifier[created] , identifier[creator] , identifier[created] operator[SEP] operator[SEP] }
public final void init(AlgorithmParameterSpec paramSpec) throws InvalidParameterSpecException { if (this.initialized) throw new InvalidParameterSpecException("already initialized"); paramSpi.engineInit(paramSpec); this.initialized = true; }
class class_name[name] begin[{] method[init, return_type[void], modifier[final public], parameter[paramSpec]] begin[{] if[THIS[member[None.initialized]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="already initialized")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidParameterSpecException, sub_type=None)), label=None) else begin[{] None end[}] call[paramSpi.engineInit, parameter[member[.paramSpec]]] assign[THIS[member[None.initialized]], literal[true]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[init] operator[SEP] identifier[AlgorithmParameterSpec] identifier[paramSpec] operator[SEP] Keyword[throws] identifier[InvalidParameterSpecException] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[initialized] operator[SEP] Keyword[throw] Keyword[new] identifier[InvalidParameterSpecException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[paramSpi] operator[SEP] identifier[engineInit] operator[SEP] identifier[paramSpec] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[initialized] operator[=] literal[boolean] operator[SEP] }
public static Vector getRawShort(int[] data, int offset) throws Exception { byte[] bytes = (byte[])getBits(data, 16, offset); ByteBuffer bb = ByteBuffer.wrap(bytes); bb.order(ByteOrder.LITTLE_ENDIAN); int val = bb.getShort(); Vector v = new Vector(); v.add(new Integer(offset+16)); v.add(new Integer(val)); return v; }
class class_name[name] begin[{] method[getRawShort, return_type[type[Vector]], modifier[public static], parameter[data, offset]] begin[{] local_variable[type[byte], bytes] local_variable[type[ByteBuffer], bb] call[bb.order, parameter[member[ByteOrder.LITTLE_ENDIAN]]] local_variable[type[int], val] local_variable[type[Vector], v] call[v.add, parameter[ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))]] call[v.add, parameter[ClassCreator(arguments=[MemberReference(member=val, 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=Integer, sub_type=None))]] return[member[.v]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Vector] identifier[getRawShort] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[offset] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[getBits] operator[SEP] identifier[data] , Other[16] , identifier[offset] operator[SEP] operator[SEP] identifier[ByteBuffer] identifier[bb] operator[=] identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP] identifier[bytes] operator[SEP] operator[SEP] identifier[bb] operator[SEP] identifier[order] operator[SEP] identifier[ByteOrder] operator[SEP] identifier[LITTLE_ENDIAN] operator[SEP] operator[SEP] Keyword[int] identifier[val] operator[=] identifier[bb] operator[SEP] identifier[getShort] operator[SEP] operator[SEP] operator[SEP] identifier[Vector] identifier[v] operator[=] Keyword[new] identifier[Vector] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Integer] operator[SEP] identifier[offset] operator[+] Other[16] operator[SEP] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Integer] operator[SEP] identifier[val] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[v] operator[SEP] }
public static ResultDescriptor analyzeReturnType(final DescriptorContext context, final Class<? extends Collection> returnCollectionType) { final Method method = context.method; final MethodGenericsContext generics = context.generics.method(method); final Class<?> returnClass = generics.resolveReturnClass(); final ResultDescriptor descriptor = new ResultDescriptor(); descriptor.expectType = resolveExpectedType(returnClass, returnCollectionType); final ResultType type; final Class<?> entityClass; if (isCollection(returnClass)) { type = COLLECTION; entityClass = resolveGenericType(method, generics); } else if (returnClass.isArray()) { type = ARRAY; entityClass = returnClass.getComponentType(); } else if (VOID_TYPES.contains(returnClass)) { type = VOID; entityClass = Void.class; } else { type = PLAIN; // support for guava and jdk8 optionals entityClass = Optionals.isOptional(returnClass) ? resolveGenericType(method, generics) : returnClass; } descriptor.returnType = type; descriptor.entityType = entityClass; return descriptor; }
class class_name[name] begin[{] method[analyzeReturnType, return_type[type[ResultDescriptor]], modifier[public static], parameter[context, returnCollectionType]] begin[{] local_variable[type[Method], method] local_variable[type[MethodGenericsContext], generics] local_variable[type[Class], returnClass] local_variable[type[ResultDescriptor], descriptor] assign[member[descriptor.expectType], call[.resolveExpectedType, parameter[member[.returnClass], member[.returnCollectionType]]]] local_variable[type[ResultType], type] local_variable[type[Class], entityClass] if[call[.isCollection, parameter[member[.returnClass]]]] begin[{] assign[member[.type], member[.COLLECTION]] assign[member[.entityClass], call[.resolveGenericType, parameter[member[.method], member[.generics]]]] else begin[{] if[call[returnClass.isArray, parameter[]]] begin[{] assign[member[.type], member[.ARRAY]] assign[member[.entityClass], call[returnClass.getComponentType, parameter[]]] else begin[{] if[call[VOID_TYPES.contains, parameter[member[.returnClass]]]] begin[{] assign[member[.type], member[.VOID]] assign[member[.entityClass], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Void, sub_type=None))] else begin[{] assign[member[.type], member[.PLAIN]] assign[member[.entityClass], TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=returnClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isOptional, postfix_operators=[], prefix_operators=[], qualifier=Optionals, selectors=[], type_arguments=None), if_false=MemberReference(member=returnClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=generics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveGenericType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))] end[}] end[}] end[}] assign[member[descriptor.returnType], member[.type]] assign[member[descriptor.entityType], member[.entityClass]] return[member[.descriptor]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ResultDescriptor] identifier[analyzeReturnType] operator[SEP] Keyword[final] identifier[DescriptorContext] identifier[context] , Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Collection] operator[>] identifier[returnCollectionType] operator[SEP] { Keyword[final] identifier[Method] identifier[method] operator[=] identifier[context] operator[SEP] identifier[method] operator[SEP] Keyword[final] identifier[MethodGenericsContext] identifier[generics] operator[=] identifier[context] operator[SEP] identifier[generics] operator[SEP] identifier[method] operator[SEP] identifier[method] operator[SEP] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[returnClass] operator[=] identifier[generics] operator[SEP] identifier[resolveReturnClass] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ResultDescriptor] identifier[descriptor] operator[=] Keyword[new] identifier[ResultDescriptor] operator[SEP] operator[SEP] operator[SEP] identifier[descriptor] operator[SEP] identifier[expectType] operator[=] identifier[resolveExpectedType] operator[SEP] identifier[returnClass] , identifier[returnCollectionType] operator[SEP] operator[SEP] Keyword[final] identifier[ResultType] identifier[type] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[entityClass] operator[SEP] Keyword[if] operator[SEP] identifier[isCollection] operator[SEP] identifier[returnClass] operator[SEP] operator[SEP] { identifier[type] operator[=] identifier[COLLECTION] operator[SEP] identifier[entityClass] operator[=] identifier[resolveGenericType] operator[SEP] identifier[method] , identifier[generics] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[returnClass] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[SEP] { identifier[type] operator[=] identifier[ARRAY] operator[SEP] identifier[entityClass] operator[=] identifier[returnClass] operator[SEP] identifier[getComponentType] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[VOID_TYPES] operator[SEP] identifier[contains] operator[SEP] identifier[returnClass] operator[SEP] operator[SEP] { identifier[type] operator[=] identifier[VOID] operator[SEP] identifier[entityClass] operator[=] identifier[Void] operator[SEP] Keyword[class] operator[SEP] } Keyword[else] { identifier[type] operator[=] identifier[PLAIN] operator[SEP] identifier[entityClass] operator[=] identifier[Optionals] operator[SEP] identifier[isOptional] operator[SEP] identifier[returnClass] operator[SEP] operator[?] identifier[resolveGenericType] operator[SEP] identifier[method] , identifier[generics] operator[SEP] operator[:] identifier[returnClass] operator[SEP] } identifier[descriptor] operator[SEP] identifier[returnType] operator[=] identifier[type] operator[SEP] identifier[descriptor] operator[SEP] identifier[entityType] operator[=] identifier[entityClass] operator[SEP] Keyword[return] identifier[descriptor] operator[SEP] }
public static int getLastDateOfMonth(Calendar calendar) { Calendar tmpCal = new GregorianCalendar(calendar.getTimeZone()); tmpCal.set(Calendar.YEAR, calendar.get(Calendar.YEAR)); tmpCal.set(Calendar.MONTH, calendar.get(Calendar.MONTH)); tmpCal.set(Calendar.DAY_OF_MONTH, 1); return tmpCal.getActualMaximum(Calendar.DAY_OF_MONTH); }
class class_name[name] begin[{] method[getLastDateOfMonth, return_type[type[int]], modifier[public static], parameter[calendar]] begin[{] local_variable[type[Calendar], tmpCal] call[tmpCal.set, parameter[member[Calendar.YEAR], call[calendar.get, parameter[member[Calendar.YEAR]]]]] call[tmpCal.set, parameter[member[Calendar.MONTH], call[calendar.get, parameter[member[Calendar.MONTH]]]]] call[tmpCal.set, parameter[member[Calendar.DAY_OF_MONTH], literal[1]]] return[call[tmpCal.getActualMaximum, parameter[member[Calendar.DAY_OF_MONTH]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[getLastDateOfMonth] operator[SEP] identifier[Calendar] identifier[calendar] operator[SEP] { identifier[Calendar] identifier[tmpCal] operator[=] Keyword[new] identifier[GregorianCalendar] operator[SEP] identifier[calendar] operator[SEP] identifier[getTimeZone] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tmpCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] , identifier[calendar] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] operator[SEP] operator[SEP] operator[SEP] identifier[tmpCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[MONTH] , identifier[calendar] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[MONTH] operator[SEP] operator[SEP] operator[SEP] identifier[tmpCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[DAY_OF_MONTH] , Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[tmpCal] operator[SEP] identifier[getActualMaximum] operator[SEP] identifier[Calendar] operator[SEP] identifier[DAY_OF_MONTH] operator[SEP] operator[SEP] }
public void setBumper(com.google.api.ads.admanager.axis.v201805.AdRuleSlotBumper bumper) { this.bumper = bumper; }
class class_name[name] begin[{] method[setBumper, return_type[void], modifier[public], parameter[bumper]] begin[{] assign[THIS[member[None.bumper]], member[.bumper]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setBumper] 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[v201805] operator[SEP] identifier[AdRuleSlotBumper] identifier[bumper] operator[SEP] { Keyword[this] operator[SEP] identifier[bumper] operator[=] identifier[bumper] operator[SEP] }
public void marshall(UpdateNumberOfDomainControllersRequest updateNumberOfDomainControllersRequest, ProtocolMarshaller protocolMarshaller) { if (updateNumberOfDomainControllersRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateNumberOfDomainControllersRequest.getDirectoryId(), DIRECTORYID_BINDING); protocolMarshaller.marshall(updateNumberOfDomainControllersRequest.getDesiredNumber(), DESIREDNUMBER_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[updateNumberOfDomainControllersRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.updateNumberOfDomainControllersRequest], ==, 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=getDirectoryId, postfix_operators=[], prefix_operators=[], qualifier=updateNumberOfDomainControllersRequest, selectors=[], type_arguments=None), MemberReference(member=DIRECTORYID_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=getDesiredNumber, postfix_operators=[], prefix_operators=[], qualifier=updateNumberOfDomainControllersRequest, selectors=[], type_arguments=None), MemberReference(member=DESIREDNUMBER_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[UpdateNumberOfDomainControllersRequest] identifier[updateNumberOfDomainControllersRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[updateNumberOfDomainControllersRequest] 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[updateNumberOfDomainControllersRequest] operator[SEP] identifier[getDirectoryId] operator[SEP] operator[SEP] , identifier[DIRECTORYID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[updateNumberOfDomainControllersRequest] operator[SEP] identifier[getDesiredNumber] operator[SEP] operator[SEP] , identifier[DESIREDNUMBER_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 PrimaryBackupSession createSession(long sessionId, MemberId memberId) { PrimaryBackupSession session = new PrimaryBackupSession(SessionId.from(sessionId), memberId, service.serializer(), this); if (sessions.putIfAbsent(sessionId, session) == null) { service.register(session); } return session; }
class class_name[name] begin[{] method[createSession, return_type[type[PrimaryBackupSession]], modifier[public], parameter[sessionId, memberId]] begin[{] local_variable[type[PrimaryBackupSession], session] if[binary_operation[call[sessions.putIfAbsent, parameter[member[.sessionId], member[.session]]], ==, literal[null]]] begin[{] call[service.register, parameter[member[.session]]] else begin[{] None end[}] return[member[.session]] end[}] END[}]
Keyword[public] identifier[PrimaryBackupSession] identifier[createSession] operator[SEP] Keyword[long] identifier[sessionId] , identifier[MemberId] identifier[memberId] operator[SEP] { identifier[PrimaryBackupSession] identifier[session] operator[=] Keyword[new] identifier[PrimaryBackupSession] operator[SEP] identifier[SessionId] operator[SEP] identifier[from] operator[SEP] identifier[sessionId] operator[SEP] , identifier[memberId] , identifier[service] operator[SEP] identifier[serializer] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sessions] operator[SEP] identifier[putIfAbsent] operator[SEP] identifier[sessionId] , identifier[session] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[service] operator[SEP] identifier[register] operator[SEP] identifier[session] operator[SEP] operator[SEP] } Keyword[return] identifier[session] operator[SEP] }
public Matrix4f rotateLocalX(float ang, Matrix4f dest) { float sin = (float) Math.sin(ang); float cos = (float) Math.cosFromSin(sin, ang); float nm01 = cos * m01 - sin * m02; float nm02 = sin * m01 + cos * m02; float nm11 = cos * m11 - sin * m12; float nm12 = sin * m11 + cos * m12; float nm21 = cos * m21 - sin * m22; float nm22 = sin * m21 + cos * m22; float nm31 = cos * m31 - sin * m32; float nm32 = sin * m31 + cos * m32; dest._m00(m00); dest._m01(nm01); dest._m02(nm02); dest._m03(m03); dest._m10(m10); dest._m11(nm11); dest._m12(nm12); dest._m13(m13); dest._m20(m20); dest._m21(nm21); dest._m22(nm22); dest._m23(m23); dest._m30(m30); dest._m31(nm31); dest._m32(nm32); dest._m33(m33); dest._properties(properties & ~(PROPERTY_PERSPECTIVE | PROPERTY_IDENTITY | PROPERTY_TRANSLATION)); return dest; }
class class_name[name] begin[{] method[rotateLocalX, return_type[type[Matrix4f]], modifier[public], parameter[ang, dest]] begin[{] local_variable[type[float], sin] local_variable[type[float], cos] local_variable[type[float], nm01] local_variable[type[float], nm02] local_variable[type[float], nm11] local_variable[type[float], nm12] local_variable[type[float], nm21] local_variable[type[float], nm22] local_variable[type[float], nm31] local_variable[type[float], nm32] call[dest._m00, parameter[member[.m00]]] call[dest._m01, parameter[member[.nm01]]] call[dest._m02, parameter[member[.nm02]]] call[dest._m03, parameter[member[.m03]]] call[dest._m10, parameter[member[.m10]]] call[dest._m11, parameter[member[.nm11]]] call[dest._m12, parameter[member[.nm12]]] call[dest._m13, parameter[member[.m13]]] call[dest._m20, parameter[member[.m20]]] call[dest._m21, parameter[member[.nm21]]] call[dest._m22, parameter[member[.nm22]]] call[dest._m23, parameter[member[.m23]]] call[dest._m30, parameter[member[.m30]]] call[dest._m31, parameter[member[.nm31]]] call[dest._m32, parameter[member[.nm32]]] call[dest._m33, parameter[member[.m33]]] call[dest._properties, parameter[binary_operation[member[.properties], &, binary_operation[binary_operation[member[.PROPERTY_PERSPECTIVE], |, member[.PROPERTY_IDENTITY]], |, member[.PROPERTY_TRANSLATION]]]]] return[member[.dest]] end[}] END[}]
Keyword[public] identifier[Matrix4f] identifier[rotateLocalX] operator[SEP] Keyword[float] identifier[ang] , identifier[Matrix4f] identifier[dest] operator[SEP] { Keyword[float] identifier[sin] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[Math] operator[SEP] identifier[sin] operator[SEP] identifier[ang] operator[SEP] operator[SEP] Keyword[float] identifier[cos] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[Math] operator[SEP] identifier[cosFromSin] operator[SEP] identifier[sin] , identifier[ang] operator[SEP] operator[SEP] Keyword[float] identifier[nm01] operator[=] identifier[cos] operator[*] identifier[m01] operator[-] identifier[sin] operator[*] identifier[m02] operator[SEP] Keyword[float] identifier[nm02] operator[=] identifier[sin] operator[*] identifier[m01] operator[+] identifier[cos] operator[*] identifier[m02] operator[SEP] Keyword[float] identifier[nm11] operator[=] identifier[cos] operator[*] identifier[m11] operator[-] identifier[sin] operator[*] identifier[m12] operator[SEP] Keyword[float] identifier[nm12] operator[=] identifier[sin] operator[*] identifier[m11] operator[+] identifier[cos] operator[*] identifier[m12] operator[SEP] Keyword[float] identifier[nm21] operator[=] identifier[cos] operator[*] identifier[m21] operator[-] identifier[sin] operator[*] identifier[m22] operator[SEP] Keyword[float] identifier[nm22] operator[=] identifier[sin] operator[*] identifier[m21] operator[+] identifier[cos] operator[*] identifier[m22] operator[SEP] Keyword[float] identifier[nm31] operator[=] identifier[cos] operator[*] identifier[m31] operator[-] identifier[sin] operator[*] identifier[m32] operator[SEP] Keyword[float] identifier[nm32] operator[=] identifier[sin] operator[*] identifier[m31] operator[+] identifier[cos] operator[*] identifier[m32] operator[SEP] identifier[dest] operator[SEP] identifier[_m00] operator[SEP] identifier[m00] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m01] operator[SEP] identifier[nm01] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m02] operator[SEP] identifier[nm02] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m03] operator[SEP] identifier[m03] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m10] operator[SEP] identifier[m10] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m11] operator[SEP] identifier[nm11] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m12] operator[SEP] identifier[nm12] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m13] operator[SEP] identifier[m13] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m20] operator[SEP] identifier[m20] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m21] operator[SEP] identifier[nm21] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m22] operator[SEP] identifier[nm22] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m23] operator[SEP] identifier[m23] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m30] operator[SEP] identifier[m30] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m31] operator[SEP] identifier[nm31] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m32] operator[SEP] identifier[nm32] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_m33] operator[SEP] identifier[m33] operator[SEP] operator[SEP] identifier[dest] operator[SEP] identifier[_properties] operator[SEP] identifier[properties] operator[&] operator[~] operator[SEP] identifier[PROPERTY_PERSPECTIVE] operator[|] identifier[PROPERTY_IDENTITY] operator[|] identifier[PROPERTY_TRANSLATION] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[dest] operator[SEP] }
public byte[] getStreamAsBytearray() throws IOException { byte[] result = null; try { result = IOUtils.toByteArray(getStream()); } catch (NullPointerException npex) { throw new IOException("Timeout has been forced by CommonHttpClient", npex); } return result; }
class class_name[name] begin[{] method[getStreamAsBytearray, return_type[type[byte]], modifier[public], parameter[]] begin[{] local_variable[type[byte], result] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Timeout has been forced by CommonHttpClient"), MemberReference(member=npex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=npex, types=['NullPointerException']))], finally_block=None, label=None, resources=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[getStreamAsBytearray] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[result] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[result] operator[=] identifier[IOUtils] operator[SEP] identifier[toByteArray] operator[SEP] identifier[getStream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NullPointerException] identifier[npex] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] , identifier[npex] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public void enableAutoScale(String poolId, PoolEnableAutoScaleParameter poolEnableAutoScaleParameter, PoolEnableAutoScaleOptions poolEnableAutoScaleOptions) { enableAutoScaleWithServiceResponseAsync(poolId, poolEnableAutoScaleParameter, poolEnableAutoScaleOptions).toBlocking().single().body(); }
class class_name[name] begin[{] method[enableAutoScale, return_type[void], modifier[public], parameter[poolId, poolEnableAutoScaleParameter, poolEnableAutoScaleOptions]] begin[{] call[.enableAutoScaleWithServiceResponseAsync, parameter[member[.poolId], member[.poolEnableAutoScaleParameter], member[.poolEnableAutoScaleOptions]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[enableAutoScale] operator[SEP] identifier[String] identifier[poolId] , identifier[PoolEnableAutoScaleParameter] identifier[poolEnableAutoScaleParameter] , identifier[PoolEnableAutoScaleOptions] identifier[poolEnableAutoScaleOptions] operator[SEP] { identifier[enableAutoScaleWithServiceResponseAsync] operator[SEP] identifier[poolId] , identifier[poolEnableAutoScaleParameter] , identifier[poolEnableAutoScaleOptions] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public final void fidivr(Mem src) { assert(src.size() == 2 || src.size() == 4); emitX86(INST_FIDIVR, src); }
class class_name[name] begin[{] method[fidivr, return_type[void], modifier[final public], parameter[src]] begin[{] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=src, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator===), operator=||), label=None, value=None) call[.emitX86, parameter[member[.INST_FIDIVR], member[.src]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[fidivr] operator[SEP] identifier[Mem] identifier[src] operator[SEP] { Keyword[assert] operator[SEP] identifier[src] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[2] operator[||] identifier[src] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[4] operator[SEP] operator[SEP] identifier[emitX86] operator[SEP] identifier[INST_FIDIVR] , identifier[src] operator[SEP] operator[SEP] }
public BsonRegularExpression getRegularExpression(final Object key, final BsonRegularExpression defaultValue) { if (!containsKey(key)) { return defaultValue; } return get(key).asRegularExpression(); }
class class_name[name] begin[{] method[getRegularExpression, return_type[type[BsonRegularExpression]], modifier[public], parameter[key, defaultValue]] begin[{] if[call[.containsKey, parameter[member[.key]]]] begin[{] return[member[.defaultValue]] else begin[{] None end[}] return[call[.get, parameter[member[.key]]]] end[}] END[}]
Keyword[public] identifier[BsonRegularExpression] identifier[getRegularExpression] operator[SEP] Keyword[final] identifier[Object] identifier[key] , Keyword[final] identifier[BsonRegularExpression] identifier[defaultValue] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] { Keyword[return] identifier[defaultValue] operator[SEP] } Keyword[return] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[asRegularExpression] operator[SEP] operator[SEP] operator[SEP] }
private Coordinate parseCoordinate(JsonParser jp) throws IOException { jp.nextToken(); double x = jp.getDoubleValue();// VALUE_NUMBER_FLOAT jp.nextToken(); // second value double y = jp.getDoubleValue(); Coordinate coord; //We look for a z value jp.nextToken(); if (jp.getCurrentToken() == JsonToken.END_ARRAY) { coord = new Coordinate(x, y); } else { double z = jp.getDoubleValue(); jp.nextToken(); // exit array coord = new Coordinate(x, y, z); } jp.nextToken(); return coord; }
class class_name[name] begin[{] method[parseCoordinate, return_type[type[Coordinate]], modifier[private], parameter[jp]] begin[{] call[jp.nextToken, parameter[]] local_variable[type[double], x] call[jp.nextToken, parameter[]] local_variable[type[double], y] local_variable[type[Coordinate], coord] call[jp.nextToken, parameter[]] if[binary_operation[call[jp.getCurrentToken, parameter[]], ==, member[JsonToken.END_ARRAY]]] begin[{] assign[member[.coord], ClassCreator(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, 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=Coordinate, sub_type=None))] else begin[{] local_variable[type[double], z] call[jp.nextToken, parameter[]] assign[member[.coord], ClassCreator(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=z, 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=Coordinate, sub_type=None))] end[}] call[jp.nextToken, parameter[]] return[member[.coord]] end[}] END[}]
Keyword[private] identifier[Coordinate] identifier[parseCoordinate] operator[SEP] identifier[JsonParser] identifier[jp] operator[SEP] Keyword[throws] identifier[IOException] { identifier[jp] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[x] operator[=] identifier[jp] operator[SEP] identifier[getDoubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[jp] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[y] operator[=] identifier[jp] operator[SEP] identifier[getDoubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[Coordinate] identifier[coord] operator[SEP] identifier[jp] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jp] operator[SEP] identifier[getCurrentToken] operator[SEP] operator[SEP] operator[==] identifier[JsonToken] operator[SEP] identifier[END_ARRAY] operator[SEP] { identifier[coord] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] } Keyword[else] { Keyword[double] identifier[z] operator[=] identifier[jp] operator[SEP] identifier[getDoubleValue] operator[SEP] operator[SEP] operator[SEP] identifier[jp] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] identifier[coord] operator[=] Keyword[new] identifier[Coordinate] operator[SEP] identifier[x] , identifier[y] , identifier[z] operator[SEP] operator[SEP] } identifier[jp] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[coord] operator[SEP] }
public static void drawTree(Cluster a, Graphics2D g, int x, int y, int level) { level++; g.setPaint(Color.RED); g.drawString(a.getN(), x-wunit/2, y+hunit/2); int newx = width/level/4; if (a.getLeft() != null) { g.setPaint(Color.BLACK); g.drawLine(x, y, x - newx , y + hunit); drawTree(a.getLeft(), g, x - newx, y + hunit, level); } if (a.getRight() != null) { g.setPaint(Color.BLACK); g.drawLine(x, y, x + newx, y + hunit); drawTree(a.getRight(), g, x + newx, y +hunit, level); } }
class class_name[name] begin[{] method[drawTree, return_type[void], modifier[public static], parameter[a, g, x, y, level]] begin[{] member[.level] call[g.setPaint, parameter[member[Color.RED]]] call[g.drawString, parameter[call[a.getN, parameter[]], binary_operation[member[.x], -, binary_operation[member[.wunit], /, literal[2]]], binary_operation[member[.y], +, binary_operation[member[.hunit], /, literal[2]]]]] local_variable[type[int], newx] if[binary_operation[call[a.getLeft, parameter[]], !=, literal[null]]] begin[{] call[g.setPaint, parameter[member[Color.BLACK]]] call[g.drawLine, parameter[member[.x], member[.y], binary_operation[member[.x], -, member[.newx]], binary_operation[member[.y], +, member[.hunit]]]] call[.drawTree, parameter[call[a.getLeft, parameter[]], member[.g], binary_operation[member[.x], -, member[.newx]], binary_operation[member[.y], +, member[.hunit]], member[.level]]] else begin[{] None end[}] if[binary_operation[call[a.getRight, parameter[]], !=, literal[null]]] begin[{] call[g.setPaint, parameter[member[Color.BLACK]]] call[g.drawLine, parameter[member[.x], member[.y], binary_operation[member[.x], +, member[.newx]], binary_operation[member[.y], +, member[.hunit]]]] call[.drawTree, parameter[call[a.getRight, parameter[]], member[.g], binary_operation[member[.x], +, member[.newx]], binary_operation[member[.y], +, member[.hunit]], member[.level]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[drawTree] operator[SEP] identifier[Cluster] identifier[a] , identifier[Graphics2D] identifier[g] , Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[level] operator[SEP] { identifier[level] operator[++] operator[SEP] identifier[g] operator[SEP] identifier[setPaint] operator[SEP] identifier[Color] operator[SEP] identifier[RED] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[drawString] operator[SEP] identifier[a] operator[SEP] identifier[getN] operator[SEP] operator[SEP] , identifier[x] operator[-] identifier[wunit] operator[/] Other[2] , identifier[y] operator[+] identifier[hunit] operator[/] Other[2] operator[SEP] operator[SEP] Keyword[int] identifier[newx] operator[=] identifier[width] operator[/] identifier[level] operator[/] Other[4] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[getLeft] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[g] operator[SEP] identifier[setPaint] operator[SEP] identifier[Color] operator[SEP] identifier[BLACK] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[drawLine] operator[SEP] identifier[x] , identifier[y] , identifier[x] operator[-] identifier[newx] , identifier[y] operator[+] identifier[hunit] operator[SEP] operator[SEP] identifier[drawTree] operator[SEP] identifier[a] operator[SEP] identifier[getLeft] operator[SEP] operator[SEP] , identifier[g] , identifier[x] operator[-] identifier[newx] , identifier[y] operator[+] identifier[hunit] , identifier[level] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[a] operator[SEP] identifier[getRight] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[g] operator[SEP] identifier[setPaint] operator[SEP] identifier[Color] operator[SEP] identifier[BLACK] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[drawLine] operator[SEP] identifier[x] , identifier[y] , identifier[x] operator[+] identifier[newx] , identifier[y] operator[+] identifier[hunit] operator[SEP] operator[SEP] identifier[drawTree] operator[SEP] identifier[a] operator[SEP] identifier[getRight] operator[SEP] operator[SEP] , identifier[g] , identifier[x] operator[+] identifier[newx] , identifier[y] operator[+] identifier[hunit] , identifier[level] operator[SEP] operator[SEP] } }
public static LineParametric2D_F64 convert( LineSegment2D_F64 src , LineParametric2D_F64 ret ) { if( ret == null ) ret = new LineParametric2D_F64(); ret.p.set(src.a); ret.slope.set(src.slopeX(),src.slopeY()); return ret; }
class class_name[name] begin[{] method[convert, return_type[type[LineParametric2D_F64]], modifier[public static], parameter[src, ret]] begin[{] if[binary_operation[member[.ret], ==, literal[null]]] begin[{] assign[member[.ret], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LineParametric2D_F64, sub_type=None))] else begin[{] None end[}] call[ret.p.set, parameter[member[src.a]]] call[ret.slope.set, parameter[call[src.slopeX, parameter[]], call[src.slopeY, parameter[]]]] return[member[.ret]] end[}] END[}]
Keyword[public] Keyword[static] identifier[LineParametric2D_F64] identifier[convert] operator[SEP] identifier[LineSegment2D_F64] identifier[src] , identifier[LineParametric2D_F64] identifier[ret] operator[SEP] { Keyword[if] operator[SEP] identifier[ret] operator[==] Other[null] operator[SEP] identifier[ret] operator[=] Keyword[new] identifier[LineParametric2D_F64] operator[SEP] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[p] operator[SEP] identifier[set] operator[SEP] identifier[src] operator[SEP] identifier[a] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[slope] operator[SEP] identifier[set] operator[SEP] identifier[src] operator[SEP] identifier[slopeX] operator[SEP] operator[SEP] , identifier[src] operator[SEP] identifier[slopeY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[ret] operator[SEP] }
private static String toDigest(String input) { md.reset(); try { md.update(input.getBytes("UTF-8")); } catch (UnsupportedEncodingException e) { } String result = com.ibm.ws.common.internal.encoder.Base64Coder.base64EncodeToString(md.digest()); //String result = Base64.getEncoder().encodeToString(md.digest()); // java8 only return result; }
class class_name[name] begin[{] method[toDigest, return_type[type[String]], modifier[private static], parameter[input]] begin[{] call[md.reset, parameter[]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)], member=update, postfix_operators=[], prefix_operators=[], qualifier=md, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnsupportedEncodingException']))], finally_block=None, label=None, resources=None) local_variable[type[String], result] return[member[.result]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[toDigest] operator[SEP] identifier[String] identifier[input] operator[SEP] { identifier[md] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[md] operator[SEP] identifier[update] operator[SEP] identifier[input] operator[SEP] identifier[getBytes] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnsupportedEncodingException] identifier[e] operator[SEP] { } identifier[String] identifier[result] operator[=] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ws] operator[SEP] identifier[common] operator[SEP] identifier[internal] operator[SEP] identifier[encoder] operator[SEP] identifier[Base64Coder] operator[SEP] identifier[base64EncodeToString] operator[SEP] identifier[md] operator[SEP] identifier[digest] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public GetPermissionsSuccessResponse getPermissions(String objectType, String dbids, String dnType, String folderType) throws ApiException { ApiResponse<GetPermissionsSuccessResponse> resp = getPermissionsWithHttpInfo(objectType, dbids, dnType, folderType); return resp.getData(); }
class class_name[name] begin[{] method[getPermissions, return_type[type[GetPermissionsSuccessResponse]], modifier[public], parameter[objectType, dbids, dnType, folderType]] begin[{] local_variable[type[ApiResponse], resp] return[call[resp.getData, parameter[]]] end[}] END[}]
Keyword[public] identifier[GetPermissionsSuccessResponse] identifier[getPermissions] operator[SEP] identifier[String] identifier[objectType] , identifier[String] identifier[dbids] , identifier[String] identifier[dnType] , identifier[String] identifier[folderType] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ApiResponse] operator[<] identifier[GetPermissionsSuccessResponse] operator[>] identifier[resp] operator[=] identifier[getPermissionsWithHttpInfo] operator[SEP] identifier[objectType] , identifier[dbids] , identifier[dnType] , identifier[folderType] operator[SEP] operator[SEP] Keyword[return] identifier[resp] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] }
public T get(final String name) { for (final T i : this) { if (i.getName().equals(name)) { return i; } } return null; }
class class_name[name] begin[{] method[get, return_type[type[T]], modifier[public], parameter[name]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=i)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] identifier[T] identifier[get] operator[SEP] Keyword[final] identifier[String] identifier[name] operator[SEP] { Keyword[for] operator[SEP] Keyword[final] identifier[T] identifier[i] operator[:] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] identifier[i] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
SchedulingResult scheduleOnce( TaskIterator taskIterator, List<VirtualMachineLease> newLeases) throws IllegalStateException { checkIfShutdown(); try (AutoCloseable ignored = stateMonitor.enter()) { return doScheduling(taskIterator, newLeases); } catch (Exception e) { logger.error("Error with scheduling run: " + e.getMessage(), e); if (e instanceof IllegalStateException) { throw (IllegalStateException) e; } else { logger.warn("Unexpected exception: " + e.getMessage()); throw new IllegalStateException("Unexpected exception during scheduling run: " + e.getMessage(), e); } } }
class class_name[name] begin[{] method[scheduleOnce, return_type[type[SchedulingResult]], modifier[default], parameter[taskIterator, newLeases]] begin[{] call[.checkIfShutdown, parameter[]] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=taskIterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newLeases, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doScheduling, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error with scheduling run: "), 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=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=IllegalStateException, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected exception: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected exception during scheduling run: "), 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=IllegalStateException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=Cast(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=IllegalStateException, sub_type=None)), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=ignored, type=ReferenceType(arguments=None, dimensions=[], name=AutoCloseable, sub_type=None), value=MethodInvocation(arguments=[], member=enter, postfix_operators=[], prefix_operators=[], qualifier=stateMonitor, selectors=[], type_arguments=None))]) end[}] END[}]
identifier[SchedulingResult] identifier[scheduleOnce] operator[SEP] identifier[TaskIterator] identifier[taskIterator] , identifier[List] operator[<] identifier[VirtualMachineLease] operator[>] identifier[newLeases] operator[SEP] Keyword[throws] identifier[IllegalStateException] { identifier[checkIfShutdown] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[AutoCloseable] identifier[ignored] operator[=] identifier[stateMonitor] operator[SEP] identifier[enter] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[doScheduling] operator[SEP] identifier[taskIterator] , identifier[newLeases] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] Keyword[instanceof] identifier[IllegalStateException] operator[SEP] { Keyword[throw] operator[SEP] identifier[IllegalStateException] operator[SEP] identifier[e] operator[SEP] } Keyword[else] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } }
public com.google.protobuf.ByteString getFullNameBytes() { java.lang.Object ref = fullName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); fullName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } }
class class_name[name] begin[{] method[getFullNameBytes, return_type[type[com]], modifier[public], parameter[]] begin[{] local_variable[type[java], ref] if[binary_operation[member[.ref], instanceof, type[java]]] begin[{] local_variable[type[com], b] assign[member[.fullName_], member[.b]] return[member[.b]] else begin[{] return[Cast(expression=MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=google, sub_type=ReferenceType(arguments=None, dimensions=None, name=protobuf, sub_type=ReferenceType(arguments=None, dimensions=None, name=ByteString, sub_type=None)))))] end[}] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[getFullNameBytes] operator[SEP] operator[SEP] { identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identifier[fullName_] operator[SEP] Keyword[if] operator[SEP] identifier[ref] Keyword[instanceof] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] { identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[b] operator[=] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[copyFromUtf8] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] identifier[ref] operator[SEP] operator[SEP] identifier[fullName_] operator[=] identifier[b] operator[SEP] Keyword[return] identifier[b] operator[SEP] } Keyword[else] { Keyword[return] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[ref] operator[SEP] } }
public static boolean isProxy(GSIConstants.CertificateType certType) { return isGsi2Proxy(certType) || isGsi3Proxy(certType) || isGsi4Proxy(certType); }
class class_name[name] begin[{] method[isProxy, return_type[type[boolean]], modifier[public static], parameter[certType]] begin[{] return[binary_operation[binary_operation[call[.isGsi2Proxy, parameter[member[.certType]]], ||, call[.isGsi3Proxy, parameter[member[.certType]]]], ||, call[.isGsi4Proxy, parameter[member[.certType]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isProxy] operator[SEP] identifier[GSIConstants] operator[SEP] identifier[CertificateType] identifier[certType] operator[SEP] { Keyword[return] identifier[isGsi2Proxy] operator[SEP] identifier[certType] operator[SEP] operator[||] identifier[isGsi3Proxy] operator[SEP] identifier[certType] operator[SEP] operator[||] identifier[isGsi4Proxy] operator[SEP] identifier[certType] operator[SEP] operator[SEP] }
public WebElementFinder selected(final Boolean theSelected) { Fields fields = new Fields(this); fields.selected = theSelected; return new WebElementFinder(fields); }
class class_name[name] begin[{] method[selected, return_type[type[WebElementFinder]], modifier[public], parameter[theSelected]] begin[{] local_variable[type[Fields], fields] assign[member[fields.selected], member[.theSelected]] return[ClassCreator(arguments=[MemberReference(member=fields, 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=WebElementFinder, sub_type=None))] end[}] END[}]
Keyword[public] identifier[WebElementFinder] identifier[selected] operator[SEP] Keyword[final] identifier[Boolean] identifier[theSelected] operator[SEP] { identifier[Fields] identifier[fields] operator[=] Keyword[new] identifier[Fields] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[fields] operator[SEP] identifier[selected] operator[=] identifier[theSelected] operator[SEP] Keyword[return] Keyword[new] identifier[WebElementFinder] operator[SEP] identifier[fields] operator[SEP] operator[SEP] }
public static void hsvToRgb( double h , double s , double v , double []rgb ) { if( s == 0 ) { rgb[0] = v; rgb[1] = v; rgb[2] = v; return; } h /= d60_F64; int h_int = (int)h; double remainder = h - h_int; double p = v * ( 1 - s ); double q = v * ( 1 - s * remainder ); double t = v * ( 1 - s * ( 1 - remainder ) ); if( h_int < 1 ) { rgb[0] = v; rgb[1] = t; rgb[2] = p; } else if( h_int < 2 ) { rgb[0] = q; rgb[1] = v; rgb[2] = p; } else if( h_int < 3 ) { rgb[0] = p; rgb[1] = v; rgb[2] = t; } else if( h_int < 4 ) { rgb[0] = p; rgb[1] = q; rgb[2] = v; } else if( h_int < 5 ) { rgb[0] = t; rgb[1] = p; rgb[2] = v; } else { rgb[0] = v; rgb[1] = p; rgb[2] = q; } }
class class_name[name] begin[{] method[hsvToRgb, return_type[void], modifier[public static], parameter[h, s, v, rgb]] begin[{] if[binary_operation[member[.s], ==, literal[0]]] begin[{] assign[member[.rgb], member[.v]] assign[member[.rgb], member[.v]] assign[member[.rgb], member[.v]] return[None] else begin[{] None end[}] assign[member[.h], member[.d60_F64]] local_variable[type[int], h_int] local_variable[type[double], remainder] local_variable[type[double], p] local_variable[type[double], q] local_variable[type[double], t] if[binary_operation[member[.h_int], <, literal[1]]] begin[{] assign[member[.rgb], member[.v]] assign[member[.rgb], member[.t]] assign[member[.rgb], member[.p]] else begin[{] if[binary_operation[member[.h_int], <, literal[2]]] begin[{] assign[member[.rgb], member[.q]] assign[member[.rgb], member[.v]] assign[member[.rgb], member[.p]] else begin[{] if[binary_operation[member[.h_int], <, literal[3]]] begin[{] assign[member[.rgb], member[.p]] assign[member[.rgb], member[.v]] assign[member[.rgb], member[.t]] else begin[{] if[binary_operation[member[.h_int], <, literal[4]]] begin[{] assign[member[.rgb], member[.p]] assign[member[.rgb], member[.q]] assign[member[.rgb], member[.v]] else begin[{] if[binary_operation[member[.h_int], <, literal[5]]] begin[{] assign[member[.rgb], member[.t]] assign[member[.rgb], member[.p]] assign[member[.rgb], member[.v]] else begin[{] assign[member[.rgb], member[.v]] assign[member[.rgb], member[.p]] assign[member[.rgb], member[.q]] end[}] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[hsvToRgb] operator[SEP] Keyword[double] identifier[h] , Keyword[double] identifier[s] , Keyword[double] identifier[v] , Keyword[double] operator[SEP] operator[SEP] identifier[rgb] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[==] Other[0] operator[SEP] { identifier[rgb] operator[SEP] Other[0] operator[SEP] operator[=] identifier[v] operator[SEP] identifier[rgb] operator[SEP] Other[1] operator[SEP] operator[=] identifier[v] operator[SEP] identifier[rgb] operator[SEP] Other[2] operator[SEP] operator[=] identifier[v] operator[SEP] Keyword[return] operator[SEP] } identifier[h] operator[/=] identifier[d60_F64] operator[SEP] Keyword[int] identifier[h_int] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[h] operator[SEP] Keyword[double] identifier[remainder] operator[=] identifier[h] operator[-] identifier[h_int] operator[SEP] Keyword[double] identifier[p] operator[=] identifier[v] operator[*] operator[SEP] Other[1] operator[-] identifier[s] operator[SEP] operator[SEP] Keyword[double] identifier[q] operator[=] identifier[v] operator[*] operator[SEP] Other[1] operator[-] identifier[s] operator[*] identifier[remainder] operator[SEP] operator[SEP] Keyword[double] identifier[t] operator[=] identifier[v] operator[*] operator[SEP] Other[1] operator[-] identifier[s] operator[*] operator[SEP] Other[1] operator[-] identifier[remainder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[h_int] operator[<] Other[1] operator[SEP] { identifier[rgb] operator[SEP] Other[0] operator[SEP] operator[=] identifier[v] operator[SEP] identifier[rgb] operator[SEP] Other[1] operator[SEP] operator[=] identifier[t] operator[SEP] identifier[rgb] operator[SEP] Other[2] operator[SEP] operator[=] identifier[p] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[h_int] operator[<] Other[2] operator[SEP] { identifier[rgb] operator[SEP] Other[0] operator[SEP] operator[=] identifier[q] operator[SEP] identifier[rgb] operator[SEP] Other[1] operator[SEP] operator[=] identifier[v] operator[SEP] identifier[rgb] operator[SEP] Other[2] operator[SEP] operator[=] identifier[p] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[h_int] operator[<] Other[3] operator[SEP] { identifier[rgb] operator[SEP] Other[0] operator[SEP] operator[=] identifier[p] operator[SEP] identifier[rgb] operator[SEP] Other[1] operator[SEP] operator[=] identifier[v] operator[SEP] identifier[rgb] operator[SEP] Other[2] operator[SEP] operator[=] identifier[t] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[h_int] operator[<] Other[4] operator[SEP] { identifier[rgb] operator[SEP] Other[0] operator[SEP] operator[=] identifier[p] operator[SEP] identifier[rgb] operator[SEP] Other[1] operator[SEP] operator[=] identifier[q] operator[SEP] identifier[rgb] operator[SEP] Other[2] operator[SEP] operator[=] identifier[v] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[h_int] operator[<] Other[5] operator[SEP] { identifier[rgb] operator[SEP] Other[0] operator[SEP] operator[=] identifier[t] operator[SEP] identifier[rgb] operator[SEP] Other[1] operator[SEP] operator[=] identifier[p] operator[SEP] identifier[rgb] operator[SEP] Other[2] operator[SEP] operator[=] identifier[v] operator[SEP] } Keyword[else] { identifier[rgb] operator[SEP] Other[0] operator[SEP] operator[=] identifier[v] operator[SEP] identifier[rgb] operator[SEP] Other[1] operator[SEP] operator[=] identifier[p] operator[SEP] identifier[rgb] operator[SEP] Other[2] operator[SEP] operator[=] identifier[q] operator[SEP] } }
@SuppressWarnings("unchecked") public static <T> T unwrap(T instance) { return instance instanceof Decorator ? unwrap(((Decorator<T>) instance).delegate) : instance; }
class class_name[name] begin[{] method[unwrap, return_type[type[T]], modifier[public static], parameter[instance]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Decorator, sub_type=None), operator=instanceof), if_false=MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[Cast(expression=MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Decorator, sub_type=None))], member=unwrap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[unwrap] operator[SEP] identifier[T] identifier[instance] operator[SEP] { Keyword[return] identifier[instance] Keyword[instanceof] identifier[Decorator] operator[?] identifier[unwrap] operator[SEP] operator[SEP] operator[SEP] identifier[Decorator] operator[<] identifier[T] operator[>] operator[SEP] identifier[instance] operator[SEP] operator[SEP] identifier[delegate] operator[SEP] operator[:] identifier[instance] operator[SEP] }
public EClass getIfcPreDefinedColour() { if (ifcPreDefinedColourEClass == null) { ifcPreDefinedColourEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(372); } return ifcPreDefinedColourEClass; }
class class_name[name] begin[{] method[getIfcPreDefinedColour, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcPreDefinedColourEClass], ==, literal[null]]] begin[{] assign[member[.ifcPreDefinedColourEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=372)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcPreDefinedColourEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getIfcPreDefinedColour] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcPreDefinedColourEClass] operator[==] Other[null] operator[SEP] { identifier[ifcPreDefinedColourEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[372] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcPreDefinedColourEClass] operator[SEP] }
private boolean findNodeFromTail(Node node) { // We check for node first, since it's likely to be at or near tail. // tail is known to be non-null, so we could re-order to "save" // one null check, but we leave it this way to help the VM. for (Node p = tail;;) { if (p == node) return true; if (p == null) return false; p = p.prev; } }
class class_name[name] begin[{] method[findNodeFromTail, return_type[type[boolean]], modifier[private], parameter[node]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=prev, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[])), label=None)]), control=ForControl(condition=None, init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=tail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), update=None), label=None) end[}] END[}]
Keyword[private] Keyword[boolean] identifier[findNodeFromTail] operator[SEP] identifier[Node] identifier[node] operator[SEP] { Keyword[for] operator[SEP] identifier[Node] identifier[p] operator[=] identifier[tail] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[p] operator[==] identifier[node] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[p] operator[==] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[p] operator[=] identifier[p] operator[SEP] identifier[prev] operator[SEP] } }
public void parseQualifierElement(Element ele, AbstractBeanDefinition bd) { String typeName = ele.getAttribute(TYPE_ATTRIBUTE); if (!StringUtils.hasLength(typeName)) { error("Tag 'qualifier' must have a 'type' attribute", ele); return; } this.parseState.push(new QualifierEntry(typeName)); try { AutowireCandidateQualifier qualifier = new AutowireCandidateQualifier(typeName); qualifier.setSource(extractSource(ele)); String value = ele.getAttribute(VALUE_ATTRIBUTE); if (StringUtils.hasLength(value)) { qualifier.setAttribute(AutowireCandidateQualifier.VALUE_KEY, value); } NodeList nl = ele.getChildNodes(); for (int i = 0; i < nl.getLength(); i++) { Node node = nl.item(i); if (node instanceof Element && nodeNameEquals(node, QUALIFIER_ATTRIBUTE_ELEMENT)) { Element attributeEle = (Element) node; String attributeName = attributeEle.getAttribute(KEY_ATTRIBUTE); String attributeValue = attributeEle.getAttribute(VALUE_ATTRIBUTE); if (StringUtils.hasLength(attributeName) && StringUtils.hasLength(attributeValue)) { BeanMetadataAttribute attribute = new BeanMetadataAttribute(attributeName, attributeValue); attribute.setSource(extractSource(attributeEle)); qualifier.addMetadataAttribute(attribute); } else { error("Qualifier 'attribute' tag must have a 'name' and 'value'", attributeEle); return; } } } bd.addQualifier(qualifier); } finally { this.parseState.pop(); } }
class class_name[name] begin[{] method[parseQualifierElement, return_type[void], modifier[public], parameter[ele, bd]] begin[{] local_variable[type[String], typeName] if[call[StringUtils.hasLength, parameter[member[.typeName]]]] begin[{] call[.error, parameter[literal["Tag 'qualifier' must have a 'type' attribute"], member[.ele]]] return[None] else begin[{] None end[}] THIS[member[None.parseState]call[None.push, parameter[ClassCreator(arguments=[MemberReference(member=typeName, 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=QualifierEntry, sub_type=None))]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=typeName, 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=AutowireCandidateQualifier, sub_type=None)), name=qualifier)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AutowireCandidateQualifier, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extractSource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setSource, postfix_operators=[], prefix_operators=[], qualifier=qualifier, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=VALUE_ATTRIBUTE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=ele, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasLength, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=VALUE_KEY, postfix_operators=[], prefix_operators=[], qualifier=AutowireCandidateQualifier, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=qualifier, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getChildNodes, postfix_operators=[], prefix_operators=[], qualifier=ele, selectors=[], type_arguments=None), name=nl)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NodeList, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=nl, selectors=[], type_arguments=None), name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None), operator=instanceof), operandr=MethodInvocation(arguments=[MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=QUALIFIER_ATTRIBUTE_ELEMENT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=nodeNameEquals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), name=attributeEle)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=KEY_ATTRIBUTE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=attributeEle, selectors=[], type_arguments=None), name=attributeName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=VALUE_ATTRIBUTE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=attributeEle, selectors=[], type_arguments=None), name=attributeValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=attributeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasLength, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=attributeValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=hasLength, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Qualifier 'attribute' tag must have a 'name' and 'value'"), MemberReference(member=attributeEle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=attributeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=attributeValue, 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=BeanMetadataAttribute, sub_type=None)), name=attribute)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BeanMetadataAttribute, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=attributeEle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extractSource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setSource, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addMetadataAttribute, postfix_operators=[], prefix_operators=[], qualifier=qualifier, selectors=[], type_arguments=None), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=nl, 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), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=qualifier, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addQualifier, postfix_operators=[], prefix_operators=[], qualifier=bd, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=parseState, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=pop, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[parseQualifierElement] operator[SEP] identifier[Element] identifier[ele] , identifier[AbstractBeanDefinition] identifier[bd] operator[SEP] { identifier[String] identifier[typeName] operator[=] identifier[ele] operator[SEP] identifier[getAttribute] operator[SEP] identifier[TYPE_ATTRIBUTE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[StringUtils] operator[SEP] identifier[hasLength] operator[SEP] identifier[typeName] operator[SEP] operator[SEP] { identifier[error] operator[SEP] literal[String] , identifier[ele] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[parseState] operator[SEP] identifier[push] operator[SEP] Keyword[new] identifier[QualifierEntry] operator[SEP] identifier[typeName] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[AutowireCandidateQualifier] identifier[qualifier] operator[=] Keyword[new] identifier[AutowireCandidateQualifier] operator[SEP] identifier[typeName] operator[SEP] operator[SEP] identifier[qualifier] operator[SEP] identifier[setSource] operator[SEP] identifier[extractSource] operator[SEP] identifier[ele] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[value] operator[=] identifier[ele] operator[SEP] identifier[getAttribute] operator[SEP] identifier[VALUE_ATTRIBUTE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[hasLength] operator[SEP] identifier[value] operator[SEP] operator[SEP] { identifier[qualifier] operator[SEP] identifier[setAttribute] operator[SEP] identifier[AutowireCandidateQualifier] operator[SEP] identifier[VALUE_KEY] , identifier[value] operator[SEP] operator[SEP] } identifier[NodeList] identifier[nl] operator[=] identifier[ele] operator[SEP] identifier[getChildNodes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[nl] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[nl] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[node] Keyword[instanceof] identifier[Element] operator[&&] identifier[nodeNameEquals] operator[SEP] identifier[node] , identifier[QUALIFIER_ATTRIBUTE_ELEMENT] operator[SEP] operator[SEP] { identifier[Element] identifier[attributeEle] operator[=] operator[SEP] identifier[Element] operator[SEP] identifier[node] operator[SEP] identifier[String] identifier[attributeName] operator[=] identifier[attributeEle] operator[SEP] identifier[getAttribute] operator[SEP] identifier[KEY_ATTRIBUTE] operator[SEP] operator[SEP] identifier[String] identifier[attributeValue] operator[=] identifier[attributeEle] operator[SEP] identifier[getAttribute] operator[SEP] identifier[VALUE_ATTRIBUTE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[hasLength] operator[SEP] identifier[attributeName] operator[SEP] operator[&&] identifier[StringUtils] operator[SEP] identifier[hasLength] operator[SEP] identifier[attributeValue] operator[SEP] operator[SEP] { identifier[BeanMetadataAttribute] identifier[attribute] operator[=] Keyword[new] identifier[BeanMetadataAttribute] operator[SEP] identifier[attributeName] , identifier[attributeValue] operator[SEP] operator[SEP] identifier[attribute] operator[SEP] identifier[setSource] operator[SEP] identifier[extractSource] operator[SEP] identifier[attributeEle] operator[SEP] operator[SEP] operator[SEP] identifier[qualifier] operator[SEP] identifier[addMetadataAttribute] operator[SEP] identifier[attribute] operator[SEP] operator[SEP] } Keyword[else] { identifier[error] operator[SEP] literal[String] , identifier[attributeEle] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } } } identifier[bd] operator[SEP] identifier[addQualifier] operator[SEP] identifier[qualifier] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[this] operator[SEP] identifier[parseState] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] } }
public static <S extends HasAttachHandlers> boolean fire(S source, GroupRowData data) { if (TYPE != null) { JQMDataTableGroupRowEvent event = new JQMDataTableGroupRowEvent(data); source.fireEvent(event); return event.isStopDfltClick(); } return false; }
class class_name[name] begin[{] method[fire, return_type[type[boolean]], modifier[public static], parameter[source, data]] begin[{] if[binary_operation[member[.TYPE], !=, literal[null]]] begin[{] local_variable[type[JQMDataTableGroupRowEvent], event] call[source.fireEvent, parameter[member[.event]]] return[call[event.isStopDfltClick, parameter[]]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[S] Keyword[extends] identifier[HasAttachHandlers] operator[>] Keyword[boolean] identifier[fire] operator[SEP] identifier[S] identifier[source] , identifier[GroupRowData] identifier[data] operator[SEP] { Keyword[if] operator[SEP] identifier[TYPE] operator[!=] Other[null] operator[SEP] { identifier[JQMDataTableGroupRowEvent] identifier[event] operator[=] Keyword[new] identifier[JQMDataTableGroupRowEvent] operator[SEP] identifier[data] operator[SEP] operator[SEP] identifier[source] operator[SEP] identifier[fireEvent] operator[SEP] identifier[event] operator[SEP] operator[SEP] Keyword[return] identifier[event] operator[SEP] identifier[isStopDfltClick] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static <T extends ImageGray<T>, II extends ImageGray<II>> DescribeRegionPoint<T,BrightFeature> surfFast(@Nullable ConfigSurfDescribe.Speed config , Class<T> imageType) { Class<II> integralType = GIntegralImageOps.getIntegralType(imageType); DescribePointSurf<II> alg = FactoryDescribePointAlgs.surfSpeed( config, integralType); return new WrapDescribeSurf( alg , imageType ); }
class class_name[name] begin[{] method[surfFast, return_type[type[DescribeRegionPoint]], modifier[public static], parameter[config, imageType]] begin[{] local_variable[type[Class], integralType] local_variable[type[DescribePointSurf], alg] return[ClassCreator(arguments=[MemberReference(member=alg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=imageType, 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=WrapDescribeSurf, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[ImageGray] operator[<] identifier[T] operator[>] , identifier[II] Keyword[extends] identifier[ImageGray] operator[<] identifier[II] operator[>] operator[>] identifier[DescribeRegionPoint] operator[<] identifier[T] , identifier[BrightFeature] operator[>] identifier[surfFast] operator[SEP] annotation[@] identifier[Nullable] identifier[ConfigSurfDescribe] operator[SEP] identifier[Speed] identifier[config] , identifier[Class] operator[<] identifier[T] operator[>] identifier[imageType] operator[SEP] { identifier[Class] operator[<] identifier[II] operator[>] identifier[integralType] operator[=] identifier[GIntegralImageOps] operator[SEP] identifier[getIntegralType] operator[SEP] identifier[imageType] operator[SEP] operator[SEP] identifier[DescribePointSurf] operator[<] identifier[II] operator[>] identifier[alg] operator[=] identifier[FactoryDescribePointAlgs] operator[SEP] identifier[surfSpeed] operator[SEP] identifier[config] , identifier[integralType] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[WrapDescribeSurf] operator[SEP] identifier[alg] , identifier[imageType] operator[SEP] operator[SEP] }
public Date getTo() { Long to = null; for (final TimeInterval interval : intervals) { if (to == null) { to = interval.getTo(); } else { to = Math.max(interval.getTo(), to); } } if (to != null) { return new Date(to); } return null; }
class class_name[name] begin[{] method[getTo, return_type[type[Date]], modifier[public], parameter[]] begin[{] local_variable[type[Long], to] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=to, 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=Assignment(expressionl=MemberReference(member=to, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTo, postfix_operators=[], prefix_operators=[], qualifier=interval, selectors=[], type_arguments=None), MemberReference(member=to, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=to, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getTo, postfix_operators=[], prefix_operators=[], qualifier=interval, selectors=[], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=intervals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=interval)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=TimeInterval, sub_type=None))), label=None) if[binary_operation[member[.to], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=to, 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=Date, sub_type=None))] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[Date] identifier[getTo] operator[SEP] operator[SEP] { identifier[Long] identifier[to] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[TimeInterval] identifier[interval] operator[:] identifier[intervals] operator[SEP] { Keyword[if] operator[SEP] identifier[to] operator[==] Other[null] operator[SEP] { identifier[to] operator[=] identifier[interval] operator[SEP] identifier[getTo] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[to] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[interval] operator[SEP] identifier[getTo] operator[SEP] operator[SEP] , identifier[to] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[to] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[Date] operator[SEP] identifier[to] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public void prune( Collection<ComputationState> matchesToPrune, Collection<Map<String, List<EventId>>> matchedResult, SharedBufferAccessor<?> sharedBufferAccessor) throws Exception { EventId pruningId = getPruningId(matchedResult); if (pruningId != null) { List<ComputationState> discardStates = new ArrayList<>(); for (ComputationState computationState : matchesToPrune) { if (computationState.getStartEventID() != null && shouldPrune(computationState.getStartEventID(), pruningId)) { sharedBufferAccessor.releaseNode(computationState.getPreviousBufferEntry()); discardStates.add(computationState); } } matchesToPrune.removeAll(discardStates); } }
class class_name[name] begin[{] method[prune, return_type[void], modifier[public], parameter[matchesToPrune, matchedResult, sharedBufferAccessor]] begin[{] local_variable[type[EventId], pruningId] if[binary_operation[member[.pruningId], !=, literal[null]]] begin[{] local_variable[type[List], discardStates] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getStartEventID, postfix_operators=[], prefix_operators=[], qualifier=computationState, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStartEventID, postfix_operators=[], prefix_operators=[], qualifier=computationState, selectors=[], type_arguments=None), MemberReference(member=pruningId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=shouldPrune, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPreviousBufferEntry, postfix_operators=[], prefix_operators=[], qualifier=computationState, selectors=[], type_arguments=None)], member=releaseNode, postfix_operators=[], prefix_operators=[], qualifier=sharedBufferAccessor, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=computationState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=discardStates, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=matchesToPrune, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=computationState)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ComputationState, sub_type=None))), label=None) call[matchesToPrune.removeAll, parameter[member[.discardStates]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[prune] operator[SEP] identifier[Collection] operator[<] identifier[ComputationState] operator[>] identifier[matchesToPrune] , identifier[Collection] operator[<] identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[EventId] operator[>] operator[>] operator[>] identifier[matchedResult] , identifier[SharedBufferAccessor] operator[<] operator[?] operator[>] identifier[sharedBufferAccessor] operator[SEP] Keyword[throws] identifier[Exception] { identifier[EventId] identifier[pruningId] operator[=] identifier[getPruningId] operator[SEP] identifier[matchedResult] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pruningId] operator[!=] Other[null] operator[SEP] { identifier[List] operator[<] identifier[ComputationState] operator[>] identifier[discardStates] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ComputationState] identifier[computationState] operator[:] identifier[matchesToPrune] operator[SEP] { Keyword[if] operator[SEP] identifier[computationState] operator[SEP] identifier[getStartEventID] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[shouldPrune] operator[SEP] identifier[computationState] operator[SEP] identifier[getStartEventID] operator[SEP] operator[SEP] , identifier[pruningId] operator[SEP] operator[SEP] { identifier[sharedBufferAccessor] operator[SEP] identifier[releaseNode] operator[SEP] identifier[computationState] operator[SEP] identifier[getPreviousBufferEntry] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[discardStates] operator[SEP] identifier[add] operator[SEP] identifier[computationState] operator[SEP] operator[SEP] } } identifier[matchesToPrune] operator[SEP] identifier[removeAll] operator[SEP] identifier[discardStates] operator[SEP] operator[SEP] } }
static void channel_filter2(int frame_len, float[] filter, float[][] buffer, float[][][] X_hybrid) { int i; for(i = 0; i<frame_len; i++) { float r0 = (filter[0]*(buffer[0+i][0]+buffer[12+i][0])); float r1 = (filter[1]*(buffer[1+i][0]+buffer[11+i][0])); float r2 = (filter[2]*(buffer[2+i][0]+buffer[10+i][0])); float r3 = (filter[3]*(buffer[3+i][0]+buffer[9+i][0])); float r4 = (filter[4]*(buffer[4+i][0]+buffer[8+i][0])); float r5 = (filter[5]*(buffer[5+i][0]+buffer[7+i][0])); float r6 = (filter[6]*buffer[6+i][0]); float i0 = (filter[0]*(buffer[0+i][1]+buffer[12+i][1])); float i1 = (filter[1]*(buffer[1+i][1]+buffer[11+i][1])); float i2 = (filter[2]*(buffer[2+i][1]+buffer[10+i][1])); float i3 = (filter[3]*(buffer[3+i][1]+buffer[9+i][1])); float i4 = (filter[4]*(buffer[4+i][1]+buffer[8+i][1])); float i5 = (filter[5]*(buffer[5+i][1]+buffer[7+i][1])); float i6 = (filter[6]*buffer[6+i][1]); /* q = 0 */ X_hybrid[i][0][0] = r0+r1+r2+r3+r4+r5+r6; X_hybrid[i][0][1] = i0+i1+i2+i3+i4+i5+i6; /* q = 1 */ X_hybrid[i][1][0] = r0-r1+r2-r3+r4-r5+r6; X_hybrid[i][1][1] = i0-i1+i2-i3+i4-i5+i6; } }
class class_name[name] begin[{] method[channel_filter2, return_type[void], modifier[static], parameter[frame_len, filter, buffer, X_hybrid]] begin[{] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=+), operator=*), name=r0)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=11), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=+), operator=*), name=r1)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=+), operator=*), name=r2)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=+), operator=*), name=r3)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=+), operator=*), name=r4)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=+), operator=*), name=r5)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operator=*), name=r6)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=12), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operator=+), operator=*), name=i0)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=11), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operator=+), operator=*), name=i1)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operator=+), operator=*), name=i2)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operator=+), operator=*), name=i3)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operator=+), operator=*), name=i4)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5))]), operandr=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operator=+), operator=*), name=i5)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=filter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6))]), operandr=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operator=*), name=i6)], modifiers=set(), type=BasicType(dimensions=[], name=float)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=X_hybrid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=r0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=r1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=r2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=r3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=r4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=r5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=r6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=X_hybrid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=i2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=i3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=i4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=i5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=i6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=X_hybrid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=r0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=r1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=r2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=r3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=r4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=r5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=r6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=X_hybrid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=i2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=i3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=i4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=i5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=i6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=frame_len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[static] Keyword[void] identifier[channel_filter2] operator[SEP] Keyword[int] identifier[frame_len] , Keyword[float] operator[SEP] operator[SEP] identifier[filter] , Keyword[float] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] , Keyword[float] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[X_hybrid] operator[SEP] { Keyword[int] identifier[i] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[frame_len] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[float] identifier[r0] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[0] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[0] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[12] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[r1] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[1] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[1] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[11] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[r2] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[2] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[2] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[10] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[r3] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[3] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[3] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[9] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[r4] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[4] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[4] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[8] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[r5] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[5] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[5] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[7] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[r6] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[6] operator[SEP] operator[*] identifier[buffer] operator[SEP] Other[6] operator[+] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[i0] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[0] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[0] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[12] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[i1] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[1] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[1] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[11] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[i2] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[2] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[2] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[10] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[i3] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[3] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[3] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[9] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[i4] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[4] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[4] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[8] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[i5] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[5] operator[SEP] operator[*] operator[SEP] identifier[buffer] operator[SEP] Other[5] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[+] identifier[buffer] operator[SEP] Other[7] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[float] identifier[i6] operator[=] operator[SEP] identifier[filter] operator[SEP] Other[6] operator[SEP] operator[*] identifier[buffer] operator[SEP] Other[6] operator[+] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[X_hybrid] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[=] identifier[r0] operator[+] identifier[r1] operator[+] identifier[r2] operator[+] identifier[r3] operator[+] identifier[r4] operator[+] identifier[r5] operator[+] identifier[r6] operator[SEP] identifier[X_hybrid] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[=] identifier[i0] operator[+] identifier[i1] operator[+] identifier[i2] operator[+] identifier[i3] operator[+] identifier[i4] operator[+] identifier[i5] operator[+] identifier[i6] operator[SEP] identifier[X_hybrid] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[=] identifier[r0] operator[-] identifier[r1] operator[+] identifier[r2] operator[-] identifier[r3] operator[+] identifier[r4] operator[-] identifier[r5] operator[+] identifier[r6] operator[SEP] identifier[X_hybrid] operator[SEP] identifier[i] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[SEP] Other[1] operator[SEP] operator[=] identifier[i0] operator[-] identifier[i1] operator[+] identifier[i2] operator[-] identifier[i3] operator[+] identifier[i4] operator[-] identifier[i5] operator[+] identifier[i6] operator[SEP] } }
public Structure getStructureForDomain(ScopDomain domain, ScopDatabase scopDatabase) throws IOException, StructureException { return getStructureForDomain(domain, scopDatabase, false); }
class class_name[name] begin[{] method[getStructureForDomain, return_type[type[Structure]], modifier[public], parameter[domain, scopDatabase]] begin[{] return[call[.getStructureForDomain, parameter[member[.domain], member[.scopDatabase], literal[false]]]] end[}] END[}]
Keyword[public] identifier[Structure] identifier[getStructureForDomain] operator[SEP] identifier[ScopDomain] identifier[domain] , identifier[ScopDatabase] identifier[scopDatabase] operator[SEP] Keyword[throws] identifier[IOException] , identifier[StructureException] { Keyword[return] identifier[getStructureForDomain] operator[SEP] identifier[domain] , identifier[scopDatabase] , literal[boolean] operator[SEP] operator[SEP] }
@Override public String getAsyncMetrics(List<String> expressions, long relativeTo, int ttl, String ownerName) { BatchMetricQuery batch= new BatchMetricQuery(expressions, relativeTo, ttl, ownerName); _batchService.enqueueBatch(batch); return batch.getBatchId(); }
class class_name[name] begin[{] method[getAsyncMetrics, return_type[type[String]], modifier[public], parameter[expressions, relativeTo, ttl, ownerName]] begin[{] local_variable[type[BatchMetricQuery], batch] call[_batchService.enqueueBatch, parameter[member[.batch]]] return[call[batch.getBatchId, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getAsyncMetrics] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[expressions] , Keyword[long] identifier[relativeTo] , Keyword[int] identifier[ttl] , identifier[String] identifier[ownerName] operator[SEP] { identifier[BatchMetricQuery] identifier[batch] operator[=] Keyword[new] identifier[BatchMetricQuery] operator[SEP] identifier[expressions] , identifier[relativeTo] , identifier[ttl] , identifier[ownerName] operator[SEP] operator[SEP] identifier[_batchService] operator[SEP] identifier[enqueueBatch] operator[SEP] identifier[batch] operator[SEP] operator[SEP] Keyword[return] identifier[batch] operator[SEP] identifier[getBatchId] operator[SEP] operator[SEP] operator[SEP] }
private T getAndClearUnderLock() throws Throwable { if(error != null) { throw error; } else { // Return and clear current T retValue = data; data = null; return retValue; } }
class class_name[name] begin[{] method[getAndClearUnderLock, return_type[type[T]], modifier[private], parameter[]] begin[{] if[binary_operation[member[.error], !=, literal[null]]] begin[{] ThrowStatement(expression=MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] local_variable[type[T], retValue] assign[member[.data], literal[null]] return[member[.retValue]] end[}] end[}] END[}]
Keyword[private] identifier[T] identifier[getAndClearUnderLock] operator[SEP] operator[SEP] Keyword[throws] identifier[Throwable] { Keyword[if] operator[SEP] identifier[error] operator[!=] Other[null] operator[SEP] { Keyword[throw] identifier[error] operator[SEP] } Keyword[else] { identifier[T] identifier[retValue] operator[=] identifier[data] operator[SEP] identifier[data] operator[=] Other[null] operator[SEP] Keyword[return] identifier[retValue] operator[SEP] } }
@POST @Consumes(MediaType.APPLICATION_JSON) @RolesAllowed("administrators") @Path("/create-repository") public Response createRepository(@Context UriInfo uriInfo, RepositoryEntry newRepository) throws URISyntaxException { String errorMessage = new String(); Status status; try { repositoryService.createRepository(newRepository); repositoryService.getConfig().retain(); // save configuration to persistence (file or persister) return Response.ok().cacheControl(NO_CACHE).build(); } catch (RepositoryException e) { if (log.isDebugEnabled()) { log.error(e.getMessage(), e); } errorMessage = e.getMessage(); status = Status.BAD_REQUEST; } catch (RepositoryConfigurationException e) { if (log.isDebugEnabled()) { log.error(e.getMessage(), e); } errorMessage = e.getMessage(); status = Status.BAD_REQUEST; } catch (Throwable e) //NOSONAR { if (log.isDebugEnabled()) { log.error(e.getMessage(), e); } errorMessage = e.getMessage(); status = Status.INTERNAL_SERVER_ERROR; } return Response.status(status).entity(errorMessage).type(MediaType.TEXT_PLAIN_TYPE).cacheControl(NO_CACHE) .build(); }
class class_name[name] begin[{] method[createRepository, return_type[type[Response]], modifier[public], parameter[uriInfo, newRepository]] begin[{] local_variable[type[String], errorMessage] local_variable[type[Status], status] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=newRepository, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createRepository, postfix_operators=[], prefix_operators=[], qualifier=repositoryService, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getConfig, postfix_operators=[], prefix_operators=[], qualifier=repositoryService, selectors=[MethodInvocation(arguments=[], member=retain, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=ok, postfix_operators=[], prefix_operators=[], qualifier=Response, selectors=[MethodInvocation(arguments=[MemberReference(member=NO_CACHE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cacheControl, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errorMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=BAD_REQUEST, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RepositoryException'])), CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errorMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=BAD_REQUEST, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RepositoryConfigurationException'])), CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=errorMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=INTERNAL_SERVER_ERROR, postfix_operators=[], prefix_operators=[], qualifier=Status, selectors=[])), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None) return[call[Response.status, parameter[member[.status]]]] end[}] END[}]
annotation[@] identifier[POST] annotation[@] identifier[Consumes] operator[SEP] identifier[MediaType] operator[SEP] identifier[APPLICATION_JSON] operator[SEP] annotation[@] identifier[RolesAllowed] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Response] identifier[createRepository] operator[SEP] annotation[@] identifier[Context] identifier[UriInfo] identifier[uriInfo] , identifier[RepositoryEntry] identifier[newRepository] operator[SEP] Keyword[throws] identifier[URISyntaxException] { identifier[String] identifier[errorMessage] operator[=] Keyword[new] identifier[String] operator[SEP] operator[SEP] operator[SEP] identifier[Status] identifier[status] operator[SEP] Keyword[try] { identifier[repositoryService] operator[SEP] identifier[createRepository] operator[SEP] identifier[newRepository] operator[SEP] operator[SEP] identifier[repositoryService] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[retain] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Response] operator[SEP] identifier[ok] operator[SEP] operator[SEP] operator[SEP] identifier[cacheControl] operator[SEP] identifier[NO_CACHE] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RepositoryException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } identifier[errorMessage] operator[=] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[=] identifier[Status] operator[SEP] identifier[BAD_REQUEST] operator[SEP] } Keyword[catch] operator[SEP] identifier[RepositoryConfigurationException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } identifier[errorMessage] operator[=] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[=] identifier[Status] operator[SEP] identifier[BAD_REQUEST] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } identifier[errorMessage] operator[=] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[=] identifier[Status] operator[SEP] identifier[INTERNAL_SERVER_ERROR] operator[SEP] } Keyword[return] identifier[Response] operator[SEP] identifier[status] operator[SEP] identifier[status] operator[SEP] operator[SEP] identifier[entity] operator[SEP] identifier[errorMessage] operator[SEP] operator[SEP] identifier[type] operator[SEP] identifier[MediaType] operator[SEP] identifier[TEXT_PLAIN_TYPE] operator[SEP] operator[SEP] identifier[cacheControl] operator[SEP] identifier[NO_CACHE] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public RunAsType<ServletType<T>> getOrCreateRunAs() { Node node = childNode.getOrCreate("run-as"); RunAsType<ServletType<T>> runAs = new RunAsTypeImpl<ServletType<T>>(this, "run-as", childNode, node); return runAs; }
class class_name[name] begin[{] method[getOrCreateRunAs, return_type[type[RunAsType]], modifier[public], parameter[]] begin[{] local_variable[type[Node], node] local_variable[type[RunAsType], runAs] return[member[.runAs]] end[}] END[}]
Keyword[public] identifier[RunAsType] operator[<] identifier[ServletType] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreateRunAs] operator[SEP] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[childNode] operator[SEP] identifier[getOrCreate] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[RunAsType] operator[<] identifier[ServletType] operator[<] identifier[T] operator[>] operator[>] identifier[runAs] operator[=] Keyword[new] identifier[RunAsTypeImpl] operator[<] identifier[ServletType] operator[<] identifier[T] operator[>] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[childNode] , identifier[node] operator[SEP] operator[SEP] Keyword[return] identifier[runAs] operator[SEP] }
public static <T> List<T> query(Dao dao, Class<T> classOfT, String sql, Condition cnd, Pager pager) { Sql sql2 = Sqls.queryEntity(sql); sql2.setEntity(dao.getEntity(classOfT)); sql2.setCondition(cnd); sql2.setPager(pager); dao.execute(sql2); return sql2.getList(classOfT); }
class class_name[name] begin[{] method[query, return_type[type[List]], modifier[public static], parameter[dao, classOfT, sql, cnd, pager]] begin[{] local_variable[type[Sql], sql2] call[sql2.setEntity, parameter[call[dao.getEntity, parameter[member[.classOfT]]]]] call[sql2.setCondition, parameter[member[.cnd]]] call[sql2.setPager, parameter[member[.pager]]] call[dao.execute, parameter[member[.sql2]]] return[call[sql2.getList, parameter[member[.classOfT]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[query] operator[SEP] identifier[Dao] identifier[dao] , identifier[Class] operator[<] identifier[T] operator[>] identifier[classOfT] , identifier[String] identifier[sql] , identifier[Condition] identifier[cnd] , identifier[Pager] identifier[pager] operator[SEP] { identifier[Sql] identifier[sql2] operator[=] identifier[Sqls] operator[SEP] identifier[queryEntity] operator[SEP] identifier[sql] operator[SEP] operator[SEP] identifier[sql2] operator[SEP] identifier[setEntity] operator[SEP] identifier[dao] operator[SEP] identifier[getEntity] operator[SEP] identifier[classOfT] operator[SEP] operator[SEP] operator[SEP] identifier[sql2] operator[SEP] identifier[setCondition] operator[SEP] identifier[cnd] operator[SEP] operator[SEP] identifier[sql2] operator[SEP] identifier[setPager] operator[SEP] identifier[pager] operator[SEP] operator[SEP] identifier[dao] operator[SEP] identifier[execute] operator[SEP] identifier[sql2] operator[SEP] operator[SEP] Keyword[return] identifier[sql2] operator[SEP] identifier[getList] operator[SEP] identifier[classOfT] operator[SEP] operator[SEP] }
public static <K,V> ExtendedMutableConfiguration<K,V> of(Cache2kBuilder<K,V> builder) { return of(builder.toConfiguration()); }
class class_name[name] begin[{] method[of, return_type[type[ExtendedMutableConfiguration]], modifier[public static], parameter[builder]] begin[{] return[call[.of, parameter[call[builder.toConfiguration, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[ExtendedMutableConfiguration] operator[<] identifier[K] , identifier[V] operator[>] identifier[of] operator[SEP] identifier[Cache2kBuilder] operator[<] identifier[K] , identifier[V] operator[>] identifier[builder] operator[SEP] { Keyword[return] identifier[of] operator[SEP] identifier[builder] operator[SEP] identifier[toConfiguration] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public String process(XProperty field) { String fieldName = field.getName(); String getter = "get" + CodeGenUtils.firstLetterToUpperCase(fieldName) + "()"; String allowJavaSerialization = Boolean.toString(Configuration.get().isJavaSerializationEnabled()); return "if (concrete." + getter + " == null) {\n" + tab("out.writeByte(0);\n") + "} else {\n" + tab("out.writeByte(1);\n") + tab("com.gemstone.gemfire.DataSerializer.writeObject(concrete." + getter + ", out, " + allowJavaSerialization + ");\n") + "}\n"; }
class class_name[name] begin[{] method[process, return_type[type[String]], modifier[public], parameter[field]] begin[{] local_variable[type[String], fieldName] local_variable[type[String], getter] local_variable[type[String], allowJavaSerialization] return[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["if (concrete."], +, member[.getter]], +, literal[" == null) {\n"]], +, call[.tab, parameter[literal["out.writeByte(0);\n"]]]], +, literal["} else {\n"]], +, call[.tab, parameter[literal["out.writeByte(1);\n"]]]], +, call[.tab, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["com.gemstone.gemfire.DataSerializer.writeObject(concrete."], +, member[.getter]], +, literal[", out, "]], +, member[.allowJavaSerialization]], +, literal[");\n"]]]]], +, literal["}\n"]]] end[}] END[}]
Keyword[public] identifier[String] identifier[process] operator[SEP] identifier[XProperty] identifier[field] operator[SEP] { identifier[String] identifier[fieldName] operator[=] identifier[field] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[getter] operator[=] literal[String] operator[+] identifier[CodeGenUtils] operator[SEP] identifier[firstLetterToUpperCase] operator[SEP] identifier[fieldName] operator[SEP] operator[+] literal[String] operator[SEP] identifier[String] identifier[allowJavaSerialization] operator[=] identifier[Boolean] operator[SEP] identifier[toString] operator[SEP] identifier[Configuration] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[isJavaSerializationEnabled] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[String] operator[+] identifier[getter] operator[+] literal[String] operator[+] identifier[tab] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[+] identifier[tab] operator[SEP] literal[String] operator[SEP] operator[+] identifier[tab] operator[SEP] literal[String] operator[+] identifier[getter] operator[+] literal[String] operator[+] identifier[allowJavaSerialization] operator[+] literal[String] operator[SEP] operator[+] literal[String] operator[SEP] }
public long currentTimeInMicros() { if (!this.isRunning()) { Moment m = this.currentTime(); return ( m.getPosixTime() * MIO + m.getNanosecond() / 1000 ); } long micros = SystemClock.MONOTONIC.currentTimeInMicros(); return (micros + this.getLastOffset(micros)); }
class class_name[name] begin[{] method[currentTimeInMicros, return_type[type[long]], modifier[public], parameter[]] begin[{] if[THIS[call[None.isRunning, parameter[]]]] begin[{] local_variable[type[Moment], m] return[binary_operation[binary_operation[call[m.getPosixTime, parameter[]], *, member[.MIO]], +, binary_operation[call[m.getNanosecond, parameter[]], /, literal[1000]]]] else begin[{] None end[}] local_variable[type[long], micros] return[binary_operation[member[.micros], +, THIS[call[None.getLastOffset, parameter[member[.micros]]]]]] end[}] END[}]
Keyword[public] Keyword[long] identifier[currentTimeInMicros] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[isRunning] operator[SEP] operator[SEP] operator[SEP] { identifier[Moment] identifier[m] operator[=] Keyword[this] operator[SEP] identifier[currentTime] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[m] operator[SEP] identifier[getPosixTime] operator[SEP] operator[SEP] operator[*] identifier[MIO] operator[+] identifier[m] operator[SEP] identifier[getNanosecond] operator[SEP] operator[SEP] operator[/] Other[1000] operator[SEP] operator[SEP] } Keyword[long] identifier[micros] operator[=] identifier[SystemClock] operator[SEP] identifier[MONOTONIC] operator[SEP] identifier[currentTimeInMicros] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[micros] operator[+] Keyword[this] operator[SEP] identifier[getLastOffset] operator[SEP] identifier[micros] operator[SEP] operator[SEP] operator[SEP] }
public static void openDialog( String title, String hookUri, List<String> uploadedFiles, final CloseHandler<PopupPanel> closeHandler) { if (hookUri.startsWith("#")) { List<CmsUUID> resourceIds = new ArrayList<CmsUUID>(); if (uploadedFiles != null) { for (String id : uploadedFiles) { resourceIds.add(new CmsUUID(id)); } } CmsEmbeddedDialogHandler handler = new CmsEmbeddedDialogHandler(new I_CmsActionHandler() { public void leavePage(String targetUri) { // TODO Auto-generated method stub } public void onSiteOrProjectChange(String sitePath, String serverLink) { // TODO Auto-generated method stub } public void refreshResource(CmsUUID structureId) { closeHandler.onClose(null); } }); String dialogId = hookUri.substring(1); handler.openDialog(dialogId, CmsGwtConstants.CONTEXT_TYPE_FILE_TABLE, resourceIds); } else { Map<String, String> parameters = new HashMap<String, String>(); parameters.put(I_CmsUploadConstants.PARAM_RESOURCES, Joiner.on(",").join(uploadedFiles)); CmsPopup popup = CmsFrameDialog.showFrameDialog( title, CmsCoreProvider.get().link(hookUri), parameters, closeHandler); popup.setHeight(DIALOG_HEIGHT); popup.setWidth(CmsPopup.DEFAULT_WIDTH); popup.center(); } }
class class_name[name] begin[{] method[openDialog, return_type[void], modifier[public static], parameter[title, hookUri, uploadedFiles, closeHandler]] begin[{] if[call[hookUri.startsWith, parameter[literal["#"]]]] begin[{] local_variable[type[List], resourceIds] if[binary_operation[member[.uploadedFiles], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=id, 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=CmsUUID, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=resourceIds, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=uploadedFiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=id)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] local_variable[type[CmsEmbeddedDialogHandler], handler] local_variable[type[String], dialogId] call[handler.openDialog, parameter[member[.dialogId], member[CmsGwtConstants.CONTEXT_TYPE_FILE_TABLE], member[.resourceIds]]] else begin[{] local_variable[type[Map], parameters] call[parameters.put, parameter[member[I_CmsUploadConstants.PARAM_RESOURCES], call[Joiner.on, parameter[literal[","]]]]] local_variable[type[CmsPopup], popup] call[popup.setHeight, parameter[member[.DIALOG_HEIGHT]]] call[popup.setWidth, parameter[member[CmsPopup.DEFAULT_WIDTH]]] call[popup.center, parameter[]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[openDialog] operator[SEP] identifier[String] identifier[title] , identifier[String] identifier[hookUri] , identifier[List] operator[<] identifier[String] operator[>] identifier[uploadedFiles] , Keyword[final] identifier[CloseHandler] operator[<] identifier[PopupPanel] operator[>] identifier[closeHandler] operator[SEP] { Keyword[if] operator[SEP] identifier[hookUri] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[CmsUUID] operator[>] identifier[resourceIds] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CmsUUID] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[uploadedFiles] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[id] operator[:] identifier[uploadedFiles] operator[SEP] { identifier[resourceIds] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[CmsUUID] operator[SEP] identifier[id] operator[SEP] operator[SEP] operator[SEP] } } identifier[CmsEmbeddedDialogHandler] identifier[handler] operator[=] Keyword[new] identifier[CmsEmbeddedDialogHandler] operator[SEP] Keyword[new] identifier[I_CmsActionHandler] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[leavePage] operator[SEP] identifier[String] identifier[targetUri] operator[SEP] { } Keyword[public] Keyword[void] identifier[onSiteOrProjectChange] operator[SEP] identifier[String] identifier[sitePath] , identifier[String] identifier[serverLink] operator[SEP] { } Keyword[public] Keyword[void] identifier[refreshResource] operator[SEP] identifier[CmsUUID] identifier[structureId] operator[SEP] { identifier[closeHandler] operator[SEP] identifier[onClose] operator[SEP] Other[null] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[String] identifier[dialogId] operator[=] identifier[hookUri] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[handler] operator[SEP] identifier[openDialog] operator[SEP] identifier[dialogId] , identifier[CmsGwtConstants] operator[SEP] identifier[CONTEXT_TYPE_FILE_TABLE] , identifier[resourceIds] operator[SEP] operator[SEP] } Keyword[else] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[parameters] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[put] operator[SEP] identifier[I_CmsUploadConstants] operator[SEP] identifier[PARAM_RESOURCES] , identifier[Joiner] operator[SEP] identifier[on] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[join] operator[SEP] identifier[uploadedFiles] operator[SEP] operator[SEP] operator[SEP] identifier[CmsPopup] identifier[popup] operator[=] identifier[CmsFrameDialog] operator[SEP] identifier[showFrameDialog] operator[SEP] identifier[title] , identifier[CmsCoreProvider] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[link] operator[SEP] identifier[hookUri] operator[SEP] , identifier[parameters] , identifier[closeHandler] operator[SEP] operator[SEP] identifier[popup] operator[SEP] identifier[setHeight] operator[SEP] identifier[DIALOG_HEIGHT] operator[SEP] operator[SEP] identifier[popup] operator[SEP] identifier[setWidth] operator[SEP] identifier[CmsPopup] operator[SEP] identifier[DEFAULT_WIDTH] operator[SEP] operator[SEP] identifier[popup] operator[SEP] identifier[center] operator[SEP] operator[SEP] operator[SEP] } }
@BetaApi public final Operation addInstancesInstanceGroup( String instanceGroup, InstanceGroupsAddInstancesRequest instanceGroupsAddInstancesRequestResource) { AddInstancesInstanceGroupHttpRequest request = AddInstancesInstanceGroupHttpRequest.newBuilder() .setInstanceGroup(instanceGroup) .setInstanceGroupsAddInstancesRequestResource(instanceGroupsAddInstancesRequestResource) .build(); return addInstancesInstanceGroup(request); }
class class_name[name] begin[{] method[addInstancesInstanceGroup, return_type[type[Operation]], modifier[final public], parameter[instanceGroup, instanceGroupsAddInstancesRequestResource]] begin[{] local_variable[type[AddInstancesInstanceGroupHttpRequest], request] return[call[.addInstancesInstanceGroup, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[Operation] identifier[addInstancesInstanceGroup] operator[SEP] identifier[String] identifier[instanceGroup] , identifier[InstanceGroupsAddInstancesRequest] identifier[instanceGroupsAddInstancesRequestResource] operator[SEP] { identifier[AddInstancesInstanceGroupHttpRequest] identifier[request] operator[=] identifier[AddInstancesInstanceGroupHttpRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setInstanceGroup] operator[SEP] identifier[instanceGroup] operator[SEP] operator[SEP] identifier[setInstanceGroupsAddInstancesRequestResource] operator[SEP] identifier[instanceGroupsAddInstancesRequestResource] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[addInstancesInstanceGroup] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static UndefineArgument[] merge(final UndefineArgument[] base, final UndefineArgument[] override) { if (base.length == 0) { final UndefineArgument[] overrideClone = override.clone(); return overrideClone; } if (override.length == 0) { final UndefineArgument[] baseClone = base.clone(); return baseClone; } final Vector<UndefineArgument> unduplicated = new Vector<>(base.length); for (final UndefineArgument current : base) { final String currentName = current.getName(); boolean match = false; if (currentName == null) { match = true; } else { for (final UndefineArgument over : override) { final String overName = over.getName(); if (overName != null && overName.equals(currentName)) { match = true; break; } } } if (!match) { unduplicated.addElement(current); } } final UndefineArgument[] combined = new UndefineArgument[unduplicated.size() + override.length]; unduplicated.copyInto(combined); final int offset = unduplicated.size(); System.arraycopy(override, 0, combined, offset + 0, override.length); return combined; }
class class_name[name] begin[{] method[merge, return_type[type[UndefineArgument]], modifier[public static], parameter[base, override]] begin[{] if[binary_operation[member[base.length], ==, literal[0]]] begin[{] local_variable[type[UndefineArgument], overrideClone] return[member[.overrideClone]] else begin[{] None end[}] if[binary_operation[member[override.length], ==, literal[0]]] begin[{] local_variable[type[UndefineArgument], baseClone] return[member[.baseClone]] else begin[{] None end[}] local_variable[type[Vector], unduplicated] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), name=currentName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=match)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=currentName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=over, selectors=[], type_arguments=None), name=overName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=overName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MemberReference(member=currentName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=overName, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=override, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=over)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=UndefineArgument, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), IfStatement(condition=MemberReference(member=match, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addElement, postfix_operators=[], prefix_operators=[], qualifier=unduplicated, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=current)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=UndefineArgument, sub_type=None))), label=None) local_variable[type[UndefineArgument], combined] call[unduplicated.copyInto, parameter[member[.combined]]] local_variable[type[int], offset] call[System.arraycopy, parameter[member[.override], literal[0], member[.combined], binary_operation[member[.offset], +, literal[0]], member[override.length]]] return[member[.combined]] end[}] END[}]
Keyword[public] Keyword[static] identifier[UndefineArgument] operator[SEP] operator[SEP] identifier[merge] operator[SEP] Keyword[final] identifier[UndefineArgument] operator[SEP] operator[SEP] identifier[base] , Keyword[final] identifier[UndefineArgument] operator[SEP] operator[SEP] identifier[override] operator[SEP] { Keyword[if] operator[SEP] identifier[base] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[final] identifier[UndefineArgument] operator[SEP] operator[SEP] identifier[overrideClone] operator[=] identifier[override] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[overrideClone] operator[SEP] } Keyword[if] operator[SEP] identifier[override] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[final] identifier[UndefineArgument] operator[SEP] operator[SEP] identifier[baseClone] operator[=] identifier[base] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[baseClone] operator[SEP] } Keyword[final] identifier[Vector] operator[<] identifier[UndefineArgument] operator[>] identifier[unduplicated] operator[=] Keyword[new] identifier[Vector] operator[<] operator[>] operator[SEP] identifier[base] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[UndefineArgument] identifier[current] operator[:] identifier[base] operator[SEP] { Keyword[final] identifier[String] identifier[currentName] operator[=] identifier[current] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[match] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[currentName] operator[==] Other[null] operator[SEP] { identifier[match] operator[=] literal[boolean] operator[SEP] } Keyword[else] { Keyword[for] operator[SEP] Keyword[final] identifier[UndefineArgument] identifier[over] operator[:] identifier[override] operator[SEP] { Keyword[final] identifier[String] identifier[overName] operator[=] identifier[over] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[overName] operator[!=] Other[null] operator[&&] identifier[overName] operator[SEP] identifier[equals] operator[SEP] identifier[currentName] operator[SEP] operator[SEP] { identifier[match] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[if] operator[SEP] operator[!] identifier[match] operator[SEP] { identifier[unduplicated] operator[SEP] identifier[addElement] operator[SEP] identifier[current] operator[SEP] operator[SEP] } } Keyword[final] identifier[UndefineArgument] operator[SEP] operator[SEP] identifier[combined] operator[=] Keyword[new] identifier[UndefineArgument] operator[SEP] identifier[unduplicated] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] identifier[override] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[unduplicated] operator[SEP] identifier[copyInto] operator[SEP] identifier[combined] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[offset] operator[=] identifier[unduplicated] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[override] , Other[0] , identifier[combined] , identifier[offset] operator[+] Other[0] , identifier[override] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[return] identifier[combined] operator[SEP] }
public Index mapper(String field, Mapper mapper) { schema.mapper(field, mapper); return this; }
class class_name[name] begin[{] method[mapper, return_type[type[Index]], modifier[public], parameter[field, mapper]] begin[{] call[schema.mapper, parameter[member[.field], member[.mapper]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Index] identifier[mapper] operator[SEP] identifier[String] identifier[field] , identifier[Mapper] identifier[mapper] operator[SEP] { identifier[schema] operator[SEP] identifier[mapper] operator[SEP] identifier[field] , identifier[mapper] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public TreeGraphNode followArcToNode(Class<? extends GrammaticalRelationAnnotation> arcLabel) { Set<TreeGraphNode> valueSet = followArcToSet(arcLabel); if (valueSet == null) { return null; } return valueSet.iterator().next(); }
class class_name[name] begin[{] method[followArcToNode, return_type[type[TreeGraphNode]], modifier[public], parameter[arcLabel]] begin[{] local_variable[type[Set], valueSet] if[binary_operation[member[.valueSet], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[valueSet.iterator, parameter[]]] end[}] END[}]
Keyword[public] identifier[TreeGraphNode] identifier[followArcToNode] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[GrammaticalRelationAnnotation] operator[>] identifier[arcLabel] operator[SEP] { identifier[Set] operator[<] identifier[TreeGraphNode] operator[>] identifier[valueSet] operator[=] identifier[followArcToSet] operator[SEP] identifier[arcLabel] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[valueSet] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[valueSet] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] }
static public <D extends ImageGray<D>> void nonMaxSuppressionCrude4(GrayF32 intensity , D derivX , D derivY , GrayF32 output ) { if( derivX instanceof GrayF32) { GradientToEdgeFeatures.nonMaxSuppressionCrude4(intensity, (GrayF32) derivX, (GrayF32) derivY,output); } else if( derivX instanceof GrayS16) { GradientToEdgeFeatures.nonMaxSuppressionCrude4(intensity, (GrayS16) derivX, (GrayS16) derivY,output); } else if( derivX instanceof GrayS32) { GradientToEdgeFeatures.nonMaxSuppressionCrude4(intensity, (GrayS32) derivX, (GrayS32) derivY,output); } else { throw new IllegalArgumentException("Unknown input type"); } }
class class_name[name] begin[{] method[nonMaxSuppressionCrude4, return_type[void], modifier[public static], parameter[intensity, derivX, derivY, output]] begin[{] if[binary_operation[member[.derivX], instanceof, type[GrayF32]]] begin[{] call[GradientToEdgeFeatures.nonMaxSuppressionCrude4, parameter[member[.intensity], Cast(expression=MemberReference(member=derivX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GrayF32, sub_type=None)), Cast(expression=MemberReference(member=derivY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GrayF32, sub_type=None)), member[.output]]] else begin[{] if[binary_operation[member[.derivX], instanceof, type[GrayS16]]] begin[{] call[GradientToEdgeFeatures.nonMaxSuppressionCrude4, parameter[member[.intensity], Cast(expression=MemberReference(member=derivX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GrayS16, sub_type=None)), Cast(expression=MemberReference(member=derivY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GrayS16, sub_type=None)), member[.output]]] else begin[{] if[binary_operation[member[.derivX], instanceof, type[GrayS32]]] begin[{] call[GradientToEdgeFeatures.nonMaxSuppressionCrude4, parameter[member[.intensity], Cast(expression=MemberReference(member=derivX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GrayS32, sub_type=None)), Cast(expression=MemberReference(member=derivY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GrayS32, sub_type=None)), member[.output]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown input type")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] end[}] end[}] end[}] END[}]
Keyword[static] Keyword[public] operator[<] identifier[D] Keyword[extends] identifier[ImageGray] operator[<] identifier[D] operator[>] operator[>] Keyword[void] identifier[nonMaxSuppressionCrude4] operator[SEP] identifier[GrayF32] identifier[intensity] , identifier[D] identifier[derivX] , identifier[D] identifier[derivY] , identifier[GrayF32] identifier[output] operator[SEP] { Keyword[if] operator[SEP] identifier[derivX] Keyword[instanceof] identifier[GrayF32] operator[SEP] { identifier[GradientToEdgeFeatures] operator[SEP] identifier[nonMaxSuppressionCrude4] operator[SEP] identifier[intensity] , operator[SEP] identifier[GrayF32] operator[SEP] identifier[derivX] , operator[SEP] identifier[GrayF32] operator[SEP] identifier[derivY] , identifier[output] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[derivX] Keyword[instanceof] identifier[GrayS16] operator[SEP] { identifier[GradientToEdgeFeatures] operator[SEP] identifier[nonMaxSuppressionCrude4] operator[SEP] identifier[intensity] , operator[SEP] identifier[GrayS16] operator[SEP] identifier[derivX] , operator[SEP] identifier[GrayS16] operator[SEP] identifier[derivY] , identifier[output] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[derivX] Keyword[instanceof] identifier[GrayS32] operator[SEP] { identifier[GradientToEdgeFeatures] operator[SEP] identifier[nonMaxSuppressionCrude4] operator[SEP] identifier[intensity] , operator[SEP] identifier[GrayS32] operator[SEP] identifier[derivX] , operator[SEP] identifier[GrayS32] operator[SEP] identifier[derivY] , identifier[output] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
@Override public String getCssText() { final StringBuilder sb = new StringBuilder(); sb.append("@font-face {"); final CSSStyleDeclarationImpl style = getStyle(); if (null != style) { sb.append(style.getCssText()); } sb.append("}"); return sb.toString(); }
class class_name[name] begin[{] method[getCssText, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], sb] call[sb.append, parameter[literal["@font-face {"]]] local_variable[type[CSSStyleDeclarationImpl], style] if[binary_operation[literal[null], !=, member[.style]]] begin[{] call[sb.append, parameter[call[style.getCssText, parameter[]]]] else begin[{] None end[}] call[sb.append, parameter[literal["}"]]] return[call[sb.toString, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getCssText] operator[SEP] operator[SEP] { Keyword[final] identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[CSSStyleDeclarationImpl] identifier[style] operator[=] identifier[getStyle] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[style] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[style] operator[SEP] identifier[getCssText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public List<Resource<?>> resolve() { Resource<?> r = res; String tk; char slashChar = File.separatorChar; String slashString = File.separator; if (".".equals(path)) { return singleResult(r); } else if (path.startsWith("~")) { File homeDir = OperatingSystemUtils.getUserHomeDir(); if (path.length() == 1) { return singleResult(factory.create(DirectoryResource.class, homeDir)); } else { cursor++; r = factory.create(DirectoryResource.class, homeDir); } } // for windows, support drive letter prefixes here. else if (isWindows && WINDOWS_DRIVE_PATTERN.matcher(path).matches()) { int idx = path.lastIndexOf(slashChar) + 1; r = factory.create(DirectoryResource.class, new File(path.substring(0, idx)).getAbsoluteFile()); cursor = idx; } // Is an URL ? else if (path.matches(".*://.*")) { int idx = path.indexOf(" "); if (idx == -1) { idx = length; } try { r = factory.create(URLResource.class, new URL(path.substring(0, idx))); } catch (MalformedURLException e) { throw new RuntimeException(e); } cursor = idx + 1; } while (cursor < length) { SW: switch (path.charAt(cursor++)) { case '\\': case '/': if (cursor - 1 == 0) { r = factory.create(new File(slashString).getAbsoluteFile()); } continue; case '.': switch (read()) { case '.': cursor++; Resource<?> parent = r.getParent(); if (parent != null) { r = parent; } break SW; default: if (cursor < length && path.charAt(cursor) == slashChar) { cursor++; break SW; } } default: boolean first = --cursor == 0; tk = capture(); if (WILDCARDS_PATTERN.matcher(tk).matches()) { boolean startDot = tk.startsWith("."); String regex = pathspecToRegEx(tk.startsWith(slashString) ? tk.substring(1) : tk); Pattern p; try { p = Pattern.compile(regex); } catch (PatternSyntaxException pe) { // Regex might be incomplete, trying again quoted p = Pattern.compile(Pattern.quote(regex)); } List<Resource<?>> res = new ArrayList<>(); for (Resource<?> child : r.listResources()) { if (p.matcher(child.getName()).matches()) { // child.setFlag(ResourceFlag.AmbiguouslyQualified); if (child.getName().startsWith(".")) { if (startDot) { res.add(child); } } else { res.add(child); } } } if (cursor != length) { for (Resource<?> child : res) { results.addAll(new ResourcePathResolver(factory, child, path, cursor).resolve()); } } else { results.addAll(res); } return results; } if (tk.startsWith(slashString)) { if (first) { r = factory.create(new File(tk)); cursor++; continue; } else { tk = tk.substring(1); } } Resource<?> child = r.getChild(tk); if (child == null) { throw new RuntimeException("no such child: " + tk); } r = child; break; } } return singleResult(r); }
class class_name[name] begin[{] method[resolve, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[Resource], r] local_variable[type[String], tk] local_variable[type[char], slashChar] local_variable[type[String], slashString] if[literal["."]] begin[{] return[call[.singleResult, parameter[member[.r]]]] else begin[{] if[call[path.startsWith, parameter[literal["~"]]]] begin[{] local_variable[type[File], homeDir] if[binary_operation[call[path.length, parameter[]], ==, literal[1]]] begin[{] return[call[.singleResult, parameter[call[factory.create, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DirectoryResource, sub_type=None)), member[.homeDir]]]]]] else begin[{] member[.cursor] assign[member[.r], call[factory.create, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DirectoryResource, sub_type=None)), member[.homeDir]]]] end[}] else begin[{] if[binary_operation[member[.isWindows], &&, call[WINDOWS_DRIVE_PATTERN.matcher, parameter[member[.path]]]]] begin[{] local_variable[type[int], idx] assign[member[.r], call[factory.create, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DirectoryResource, sub_type=None)), ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getAbsoluteFile, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))]]] assign[member[.cursor], member[.idx]] else begin[{] if[call[path.matches, parameter[literal[".*://.*"]]]] begin[{] local_variable[type[int], idx] if[binary_operation[member[.idx], ==, literal[1]]] begin[{] assign[member[.idx], member[.length]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=URLResource, sub_type=None)), ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=URL, sub_type=None))], member=create, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MalformedURLException']))], finally_block=None, label=None, resources=None) assign[member[.cursor], binary_operation[member[.idx], +, literal[1]]] else begin[{] None end[}] end[}] end[}] end[}] while[binary_operation[member[.cursor], <, member[.length]]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/')], statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cursor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=slashString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getAbsoluteFile, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))], member=create, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[], type_arguments=None)), label=None)])), ContinueStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], statements=[SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], statements=[StatementExpression(expression=MemberReference(member=cursor, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getParent, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[], type_arguments=None), name=parent)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Resource, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=parent, 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=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), BreakStatement(goto=SW, label=None)]), SwitchStatementCase(case=[], statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cursor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=cursor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None), operandr=MemberReference(member=slashChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=cursor, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=SW, label=None)]))])], expression=MethodInvocation(arguments=[], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=cursor, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), name=first)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=capture, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=tk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=WILDCARDS_PATTERN, selectors=[MethodInvocation(arguments=[], member=matches, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=tk, selectors=[], type_arguments=None), name=startDot)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=slashString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=tk, selectors=[], type_arguments=None), if_false=MemberReference(member=tk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=tk, selectors=[], type_arguments=None))], member=pathspecToRegEx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=regex)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Pattern, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=regex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compile, postfix_operators=[], prefix_operators=[], qualifier=Pattern, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=regex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=quote, postfix_operators=[], prefix_operators=[], qualifier=Pattern, selectors=[], type_arguments=None)], member=compile, postfix_operators=[], prefix_operators=[], qualifier=Pattern, selectors=[], type_arguments=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=pe, types=['PatternSyntaxException']))], finally_block=None, label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None)), name=res)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Resource, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None)], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[MethodInvocation(arguments=[], member=matches, 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=[IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=startsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=res, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=startDot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=res, selectors=[], type_arguments=None), label=None)]))]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=listResources, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=child)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Resource, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cursor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=factory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cursor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=resolve, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ResourcePathResolver, sub_type=None))], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=child)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Resource, sub_type=None))), label=None)])), ReturnStatement(expression=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=slashString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=tk, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=tk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=tk, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=tk, 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=File, sub_type=None))], member=create, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=cursor, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), ContinueStatement(goto=None, label=None)]))])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=tk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getChild, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[], type_arguments=None), name=child)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Resource, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="no such child: "), operandr=MemberReference(member=tk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[MemberReference(member=cursor, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=path, selectors=[], type_arguments=None), label=SW) end[}] return[call[.singleResult, parameter[member[.r]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Resource] operator[<] operator[?] operator[>] operator[>] identifier[resolve] operator[SEP] operator[SEP] { identifier[Resource] operator[<] operator[?] operator[>] identifier[r] operator[=] identifier[res] operator[SEP] identifier[String] identifier[tk] operator[SEP] Keyword[char] identifier[slashChar] operator[=] identifier[File] operator[SEP] identifier[separatorChar] operator[SEP] identifier[String] identifier[slashString] operator[=] identifier[File] operator[SEP] identifier[separator] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[path] operator[SEP] operator[SEP] { Keyword[return] identifier[singleResult] operator[SEP] identifier[r] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[path] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[File] identifier[homeDir] operator[=] identifier[OperatingSystemUtils] operator[SEP] identifier[getUserHomeDir] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[path] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { Keyword[return] identifier[singleResult] operator[SEP] identifier[factory] operator[SEP] identifier[create] operator[SEP] identifier[DirectoryResource] operator[SEP] Keyword[class] , identifier[homeDir] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[cursor] operator[++] operator[SEP] identifier[r] operator[=] identifier[factory] operator[SEP] identifier[create] operator[SEP] identifier[DirectoryResource] operator[SEP] Keyword[class] , identifier[homeDir] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[isWindows] operator[&&] identifier[WINDOWS_DRIVE_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[path] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[idx] operator[=] identifier[path] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[slashChar] operator[SEP] operator[+] Other[1] operator[SEP] identifier[r] operator[=] identifier[factory] operator[SEP] identifier[create] operator[SEP] identifier[DirectoryResource] operator[SEP] Keyword[class] , Keyword[new] identifier[File] operator[SEP] identifier[path] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[idx] operator[SEP] operator[SEP] operator[SEP] identifier[getAbsoluteFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[cursor] operator[=] identifier[idx] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[path] operator[SEP] identifier[matches] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[int] identifier[idx] operator[=] identifier[path] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[==] operator[-] Other[1] operator[SEP] { identifier[idx] operator[=] identifier[length] operator[SEP] } Keyword[try] { identifier[r] operator[=] identifier[factory] operator[SEP] identifier[create] operator[SEP] identifier[URLResource] operator[SEP] Keyword[class] , Keyword[new] identifier[URL] operator[SEP] identifier[path] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[idx] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedURLException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[cursor] operator[=] identifier[idx] operator[+] Other[1] operator[SEP] } Keyword[while] operator[SEP] identifier[cursor] operator[<] identifier[length] operator[SEP] { identifier[SW] operator[:] Keyword[switch] operator[SEP] identifier[path] operator[SEP] identifier[charAt] operator[SEP] identifier[cursor] operator[++] operator[SEP] operator[SEP] { Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[if] operator[SEP] identifier[cursor] operator[-] Other[1] operator[==] Other[0] operator[SEP] { identifier[r] operator[=] identifier[factory] operator[SEP] identifier[create] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[slashString] operator[SEP] operator[SEP] identifier[getAbsoluteFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[continue] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[switch] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] literal[String] operator[:] identifier[cursor] operator[++] operator[SEP] identifier[Resource] operator[<] operator[?] operator[>] identifier[parent] operator[=] identifier[r] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parent] operator[!=] Other[null] operator[SEP] { identifier[r] operator[=] identifier[parent] operator[SEP] } Keyword[break] identifier[SW] operator[SEP] Keyword[default] operator[:] Keyword[if] operator[SEP] identifier[cursor] operator[<] identifier[length] operator[&&] identifier[path] operator[SEP] identifier[charAt] operator[SEP] identifier[cursor] operator[SEP] operator[==] identifier[slashChar] operator[SEP] { identifier[cursor] operator[++] operator[SEP] Keyword[break] identifier[SW] operator[SEP] } } Keyword[default] operator[:] Keyword[boolean] identifier[first] operator[=] operator[--] identifier[cursor] operator[==] Other[0] operator[SEP] identifier[tk] operator[=] identifier[capture] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[WILDCARDS_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[tk] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[boolean] identifier[startDot] operator[=] identifier[tk] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[regex] operator[=] identifier[pathspecToRegEx] operator[SEP] identifier[tk] operator[SEP] identifier[startsWith] operator[SEP] identifier[slashString] operator[SEP] operator[?] identifier[tk] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[:] identifier[tk] operator[SEP] operator[SEP] identifier[Pattern] identifier[p] operator[SEP] Keyword[try] { identifier[p] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[regex] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[PatternSyntaxException] identifier[pe] operator[SEP] { identifier[p] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[Pattern] operator[SEP] identifier[quote] operator[SEP] identifier[regex] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[Resource] operator[<] operator[?] operator[>] operator[>] identifier[res] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Resource] operator[<] operator[?] operator[>] identifier[child] operator[:] identifier[r] operator[SEP] identifier[listResources] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[p] operator[SEP] identifier[matcher] operator[SEP] identifier[child] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[child] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[startDot] operator[SEP] { identifier[res] operator[SEP] identifier[add] operator[SEP] identifier[child] operator[SEP] operator[SEP] } } Keyword[else] { identifier[res] operator[SEP] identifier[add] operator[SEP] identifier[child] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[cursor] operator[!=] identifier[length] operator[SEP] { Keyword[for] operator[SEP] identifier[Resource] operator[<] operator[?] operator[>] identifier[child] operator[:] identifier[res] operator[SEP] { identifier[results] operator[SEP] identifier[addAll] operator[SEP] Keyword[new] identifier[ResourcePathResolver] operator[SEP] identifier[factory] , identifier[child] , identifier[path] , identifier[cursor] operator[SEP] operator[SEP] identifier[resolve] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[results] operator[SEP] identifier[addAll] operator[SEP] identifier[res] operator[SEP] operator[SEP] } Keyword[return] identifier[results] operator[SEP] } Keyword[if] operator[SEP] identifier[tk] operator[SEP] identifier[startsWith] operator[SEP] identifier[slashString] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[first] operator[SEP] { identifier[r] operator[=] identifier[factory] operator[SEP] identifier[create] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[tk] operator[SEP] operator[SEP] operator[SEP] identifier[cursor] operator[++] operator[SEP] Keyword[continue] operator[SEP] } Keyword[else] { identifier[tk] operator[=] identifier[tk] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } } identifier[Resource] operator[<] operator[?] operator[>] identifier[child] operator[=] identifier[r] operator[SEP] identifier[getChild] operator[SEP] identifier[tk] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[child] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[tk] operator[SEP] operator[SEP] } identifier[r] operator[=] identifier[child] operator[SEP] Keyword[break] operator[SEP] } } Keyword[return] identifier[singleResult] operator[SEP] identifier[r] operator[SEP] operator[SEP] }