code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public final String toJsonStringAndClose( final Reader source) throws Exception { StringBuffer sb = new StringBuffer(); int chi; boolean isStartSpaces = false; while ((chi = source.read()) != -1) { char ch = (char) chi; isStartSpaces = addJsonChar(ch, sb, isStartSpaces); } source.close(); return sb.toString(); }
class class_name[name] begin[{] method[toJsonStringAndClose, return_type[type[String]], modifier[final public], parameter[source]] begin[{] local_variable[type[StringBuffer], sb] local_variable[type[int], chi] local_variable[type[boolean], isStartSpaces] while[binary_operation[assign[member[.chi], call[source.read, parameter[]]], !=, literal[1]]] begin[{] local_variable[type[char], ch] assign[member[.isStartSpaces], call[.addJsonChar, parameter[member[.ch], member[.sb], member[.isStartSpaces]]]] end[}] call[source.close, parameter[]] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[String] identifier[toJsonStringAndClose] operator[SEP] Keyword[final] identifier[Reader] identifier[source] operator[SEP] Keyword[throws] identifier[Exception] { identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[chi] operator[SEP] Keyword[boolean] identifier[isStartSpaces] operator[=] literal[boolean] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[chi] operator[=] identifier[source] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[char] identifier[ch] operator[=] operator[SEP] Keyword[char] operator[SEP] identifier[chi] operator[SEP] identifier[isStartSpaces] operator[=] identifier[addJsonChar] operator[SEP] identifier[ch] , identifier[sb] , identifier[isStartSpaces] operator[SEP] operator[SEP] } identifier[source] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static String extName(String fileName) { if (fileName == null) { return null; } int index = fileName.lastIndexOf(StrUtil.DOT); if (index == -1) { return StrUtil.EMPTY; } else { String ext = fileName.substring(index + 1); // 扩展名中不能包含路径相关的符号 return StrUtil.containsAny(ext, UNIX_SEPARATOR, WINDOWS_SEPARATOR) ? StrUtil.EMPTY : ext; } }
class class_name[name] begin[{] method[extName, return_type[type[String]], modifier[public static], parameter[fileName]] begin[{] if[binary_operation[member[.fileName], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[int], index] if[binary_operation[member[.index], ==, literal[1]]] begin[{] return[member[StrUtil.EMPTY]] else begin[{] local_variable[type[String], ext] return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=ext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=UNIX_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=WINDOWS_SEPARATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsAny, postfix_operators=[], prefix_operators=[], qualifier=StrUtil, selectors=[], type_arguments=None), if_false=MemberReference(member=ext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=EMPTY, postfix_operators=[], prefix_operators=[], qualifier=StrUtil, selectors=[]))] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[extName] operator[SEP] identifier[String] identifier[fileName] operator[SEP] { Keyword[if] operator[SEP] identifier[fileName] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[int] identifier[index] operator[=] identifier[fileName] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[StrUtil] operator[SEP] identifier[DOT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[==] operator[-] Other[1] operator[SEP] { Keyword[return] identifier[StrUtil] operator[SEP] identifier[EMPTY] operator[SEP] } Keyword[else] { identifier[String] identifier[ext] operator[=] identifier[fileName] operator[SEP] identifier[substring] operator[SEP] identifier[index] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[StrUtil] operator[SEP] identifier[containsAny] operator[SEP] identifier[ext] , identifier[UNIX_SEPARATOR] , identifier[WINDOWS_SEPARATOR] operator[SEP] operator[?] identifier[StrUtil] operator[SEP] identifier[EMPTY] operator[:] identifier[ext] operator[SEP] } }
public Object mapToResultType(ControlBeanContext context, Method m, ResultSet resultSet, Calendar cal) { return resultSet; }
class class_name[name] begin[{] method[mapToResultType, return_type[type[Object]], modifier[public], parameter[context, m, resultSet, cal]] begin[{] return[member[.resultSet]] end[}] END[}]
Keyword[public] identifier[Object] identifier[mapToResultType] operator[SEP] identifier[ControlBeanContext] identifier[context] , identifier[Method] identifier[m] , identifier[ResultSet] identifier[resultSet] , identifier[Calendar] identifier[cal] operator[SEP] { Keyword[return] identifier[resultSet] operator[SEP] }
@Override public final Enumeration<String> getPropertyNames() { assertDeserializationLevel(MessageSerializationLevel.ALL_HEADERS); if (propertyMap == null) return new EmptyEnumeration<>(); return new IteratorEnumeration<>(propertyMap.keySet().iterator()); }
class class_name[name] begin[{] method[getPropertyNames, return_type[type[Enumeration]], modifier[final public], parameter[]] begin[{] call[.assertDeserializationLevel, parameter[member[MessageSerializationLevel.ALL_HEADERS]]] if[binary_operation[member[.propertyMap], ==, literal[null]]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=EmptyEnumeration, sub_type=None))] else begin[{] None end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=propertyMap, selectors=[MethodInvocation(arguments=[], member=iterator, 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=[], dimensions=None, name=IteratorEnumeration, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[Enumeration] operator[<] identifier[String] operator[>] identifier[getPropertyNames] operator[SEP] operator[SEP] { identifier[assertDeserializationLevel] operator[SEP] identifier[MessageSerializationLevel] operator[SEP] identifier[ALL_HEADERS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[propertyMap] operator[==] Other[null] operator[SEP] Keyword[return] Keyword[new] identifier[EmptyEnumeration] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[IteratorEnumeration] operator[<] operator[>] operator[SEP] identifier[propertyMap] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static boolean isArtifactIsOlderThanArtifact(Artifact artifact, Artifact comparisonArtifact) throws InvalidVersionSpecificationException { GenericVersionScheme genericVersionScheme = new GenericVersionScheme(); Version firstArtifactVersion = genericVersionScheme.parseVersion(artifact.getVersion()); Version secondArtifactVersion = genericVersionScheme.parseVersion(comparisonArtifact.getVersion()); return firstArtifactVersion.compareTo(secondArtifactVersion) < 0; }
class class_name[name] begin[{] method[isArtifactIsOlderThanArtifact, return_type[type[boolean]], modifier[public static], parameter[artifact, comparisonArtifact]] begin[{] local_variable[type[GenericVersionScheme], genericVersionScheme] local_variable[type[Version], firstArtifactVersion] local_variable[type[Version], secondArtifactVersion] return[binary_operation[call[firstArtifactVersion.compareTo, parameter[member[.secondArtifactVersion]]], <, literal[0]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isArtifactIsOlderThanArtifact] operator[SEP] identifier[Artifact] identifier[artifact] , identifier[Artifact] identifier[comparisonArtifact] operator[SEP] Keyword[throws] identifier[InvalidVersionSpecificationException] { identifier[GenericVersionScheme] identifier[genericVersionScheme] operator[=] Keyword[new] identifier[GenericVersionScheme] operator[SEP] operator[SEP] operator[SEP] identifier[Version] identifier[firstArtifactVersion] operator[=] identifier[genericVersionScheme] operator[SEP] identifier[parseVersion] operator[SEP] identifier[artifact] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Version] identifier[secondArtifactVersion] operator[=] identifier[genericVersionScheme] operator[SEP] identifier[parseVersion] operator[SEP] identifier[comparisonArtifact] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[firstArtifactVersion] operator[SEP] identifier[compareTo] operator[SEP] identifier[secondArtifactVersion] operator[SEP] operator[<] Other[0] operator[SEP] }
public Observable<LoadBalancerInner> beginCreateOrUpdateAsync(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters).map(new Func1<ServiceResponse<LoadBalancerInner>, LoadBalancerInner>() { @Override public LoadBalancerInner call(ServiceResponse<LoadBalancerInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[beginCreateOrUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, loadBalancerName, parameters]] begin[{] return[call[.beginCreateOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.loadBalancerName], member[.parameters]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[LoadBalancerInner] operator[>] identifier[beginCreateOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[loadBalancerName] , identifier[LoadBalancerInner] identifier[parameters] operator[SEP] { Keyword[return] identifier[beginCreateOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[loadBalancerName] , identifier[parameters] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[LoadBalancerInner] operator[>] , identifier[LoadBalancerInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[LoadBalancerInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[LoadBalancerInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public final ManagedIndex getManagedIndex( String indexName, String workspaceName ) { logger().trace("Looking for managed index '{0}' in '{1}' provider in workspace '{2}'", indexName, getName(), workspaceName); Map<String, AtomicIndex> byWorkspaceNames = providedIndexesByWorkspaceNameByIndexName.get(indexName); if (byWorkspaceNames == null) { return null; } AtomicIndex atomicIndex = byWorkspaceNames.get(workspaceName); return atomicIndex == null ? null : atomicIndex.managed(); }
class class_name[name] begin[{] method[getManagedIndex, return_type[type[ManagedIndex]], modifier[final public], parameter[indexName, workspaceName]] begin[{] call[.logger, parameter[]] local_variable[type[Map], byWorkspaceNames] if[binary_operation[member[.byWorkspaceNames], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[AtomicIndex], atomicIndex] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=atomicIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=managed, postfix_operators=[], prefix_operators=[], qualifier=atomicIndex, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] Keyword[final] identifier[ManagedIndex] identifier[getManagedIndex] operator[SEP] identifier[String] identifier[indexName] , identifier[String] identifier[workspaceName] operator[SEP] { identifier[logger] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[indexName] , identifier[getName] operator[SEP] operator[SEP] , identifier[workspaceName] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[AtomicIndex] operator[>] identifier[byWorkspaceNames] operator[=] identifier[providedIndexesByWorkspaceNameByIndexName] operator[SEP] identifier[get] operator[SEP] identifier[indexName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[byWorkspaceNames] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[AtomicIndex] identifier[atomicIndex] operator[=] identifier[byWorkspaceNames] operator[SEP] identifier[get] operator[SEP] identifier[workspaceName] operator[SEP] operator[SEP] Keyword[return] identifier[atomicIndex] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[atomicIndex] operator[SEP] identifier[managed] operator[SEP] operator[SEP] operator[SEP] }
public void calculateFitness(List<S> solutionSet) { // Obtains the lower and upper bounds of the population double[] maximumValues = new double[problem.getNumberOfObjectives()]; double[] minimumValues = new double[problem.getNumberOfObjectives()]; for (int i = 0; i < problem.getNumberOfObjectives(); i++) { maximumValues[i] = -Double.MAX_VALUE; minimumValues[i] = Double.MAX_VALUE; } for (S solution : solutionSet) { for (int obj = 0; obj < problem.getNumberOfObjectives(); obj++) { double value = solution.getObjective(obj); if (value > maximumValues[obj]) { maximumValues[obj] = value; } if (value < minimumValues[obj]) { minimumValues[obj] = value; } } } computeIndicatorValuesHD(solutionSet, maximumValues, minimumValues); for (int pos = 0; pos < solutionSet.size(); pos++) { fitness(solutionSet, pos); } }
class class_name[name] begin[{] method[calculateFitness, return_type[void], modifier[public], parameter[solutionSet]] begin[{] local_variable[type[double], maximumValues] local_variable[type[double], minimumValues] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=maximumValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=['-'], qualifier=Double, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=minimumValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getNumberOfObjectives, postfix_operators=[], prefix_operators=[], qualifier=problem, 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) ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getObjective, postfix_operators=[], prefix_operators=[], qualifier=solution, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=maximumValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=maximumValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=minimumValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=minimumValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getNumberOfObjectives, postfix_operators=[], prefix_operators=[], qualifier=problem, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=obj)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=obj, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=solutionSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=solution)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=S, sub_type=None))), label=None) call[.computeIndicatorValuesHD, parameter[member[.solutionSet], member[.maximumValues], member[.minimumValues]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=solutionSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fitness, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=solutionSet, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=pos)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=pos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[calculateFitness] operator[SEP] identifier[List] operator[<] identifier[S] operator[>] identifier[solutionSet] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] identifier[maximumValues] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[problem] operator[SEP] identifier[getNumberOfObjectives] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[minimumValues] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[problem] operator[SEP] identifier[getNumberOfObjectives] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[problem] operator[SEP] identifier[getNumberOfObjectives] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[maximumValues] operator[SEP] identifier[i] operator[SEP] operator[=] operator[-] identifier[Double] operator[SEP] identifier[MAX_VALUE] operator[SEP] identifier[minimumValues] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[Double] operator[SEP] identifier[MAX_VALUE] operator[SEP] } Keyword[for] operator[SEP] identifier[S] identifier[solution] operator[:] identifier[solutionSet] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[obj] operator[=] Other[0] operator[SEP] identifier[obj] operator[<] identifier[problem] operator[SEP] identifier[getNumberOfObjectives] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[++] operator[SEP] { Keyword[double] identifier[value] operator[=] identifier[solution] operator[SEP] identifier[getObjective] operator[SEP] identifier[obj] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[>] identifier[maximumValues] operator[SEP] identifier[obj] operator[SEP] operator[SEP] { identifier[maximumValues] operator[SEP] identifier[obj] operator[SEP] operator[=] identifier[value] operator[SEP] } Keyword[if] operator[SEP] identifier[value] operator[<] identifier[minimumValues] operator[SEP] identifier[obj] operator[SEP] operator[SEP] { identifier[minimumValues] operator[SEP] identifier[obj] operator[SEP] operator[=] identifier[value] operator[SEP] } } } identifier[computeIndicatorValuesHD] operator[SEP] identifier[solutionSet] , identifier[maximumValues] , identifier[minimumValues] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[pos] operator[=] Other[0] operator[SEP] identifier[pos] operator[<] identifier[solutionSet] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[pos] operator[++] operator[SEP] { identifier[fitness] operator[SEP] identifier[solutionSet] , identifier[pos] operator[SEP] operator[SEP] } }
public String getUriStyleSheet() { if (m_uriStyleSheet == null) { try { if (OpenCms.getWorkplaceManager().getEditorCssHandlers().size() > 0) { // use the configured handlers to determine the CSS to use Iterator<I_CmsEditorCssHandler> i = OpenCms.getWorkplaceManager().getEditorCssHandlers().iterator(); while (i.hasNext()) { I_CmsEditorCssHandler cssHandler = i.next(); if (cssHandler.matches(getCms(), getParamTempfile())) { m_uriStyleSheet = cssHandler.getUriStyleSheet(getCms(), getParamTempfile()); break; } } } else { // for compatibility reasons, read the template property value from the template file to get the CSS String currentTemplate = getUriTemplate(); m_uriStyleSheet = getCms().readPropertyObject( currentTemplate, CmsPropertyDefinition.PROPERTY_TEMPLATE, false).getValue(""); } } catch (CmsException e) { LOG.warn(Messages.get().getBundle().key(Messages.LOG_READ_TEMPLATE_PROP_STYLESHEET_FAILED_0), e); } } return m_uriStyleSheet; }
class class_name[name] begin[{] method[getUriStyleSheet, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.m_uriStyleSheet], ==, literal[null]]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWorkplaceManager, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[MethodInvocation(arguments=[], member=getEditorCssHandlers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getUriTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=currentTemplate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_uriStyleSheet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getCms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=currentTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=PROPERTY_TEMPLATE, postfix_operators=[], prefix_operators=[], qualifier=CmsPropertyDefinition, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=readPropertyObject, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=getValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getWorkplaceManager, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[MethodInvocation(arguments=[], member=getEditorCssHandlers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=iterator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=i)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=I_CmsEditorCssHandler, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), name=cssHandler)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=I_CmsEditorCssHandler, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getParamTempfile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=matches, postfix_operators=[], prefix_operators=[], qualifier=cssHandler, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_uriStyleSheet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getParamTempfile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=getUriStyleSheet, postfix_operators=[], prefix_operators=[], qualifier=cssHandler, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]))]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=i, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[], member=getBundle, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=LOG_READ_TEMPLATE_PROP_STYLESHEET_FAILED_0, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[])], member=key, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[member[.m_uriStyleSheet]] end[}] END[}]
Keyword[public] identifier[String] identifier[getUriStyleSheet] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m_uriStyleSheet] operator[==] Other[null] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[OpenCms] operator[SEP] identifier[getWorkplaceManager] operator[SEP] operator[SEP] operator[SEP] identifier[getEditorCssHandlers] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[Iterator] operator[<] identifier[I_CmsEditorCssHandler] operator[>] identifier[i] operator[=] identifier[OpenCms] operator[SEP] identifier[getWorkplaceManager] operator[SEP] operator[SEP] operator[SEP] identifier[getEditorCssHandlers] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[I_CmsEditorCssHandler] identifier[cssHandler] operator[=] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cssHandler] operator[SEP] identifier[matches] operator[SEP] identifier[getCms] operator[SEP] operator[SEP] , identifier[getParamTempfile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[m_uriStyleSheet] operator[=] identifier[cssHandler] operator[SEP] identifier[getUriStyleSheet] operator[SEP] identifier[getCms] operator[SEP] operator[SEP] , identifier[getParamTempfile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[else] { identifier[String] identifier[currentTemplate] operator[=] identifier[getUriTemplate] operator[SEP] operator[SEP] operator[SEP] identifier[m_uriStyleSheet] operator[=] identifier[getCms] operator[SEP] operator[SEP] operator[SEP] identifier[readPropertyObject] operator[SEP] identifier[currentTemplate] , identifier[CmsPropertyDefinition] operator[SEP] identifier[PROPERTY_TEMPLATE] , literal[boolean] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[CmsException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[LOG_READ_TEMPLATE_PROP_STYLESHEET_FAILED_0] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } Keyword[return] identifier[m_uriStyleSheet] operator[SEP] }
public void rollbackThis() throws XAException { if (state != XA_STATE_PREPARED) { throw new XAException("Invalid XAResource state"); } try { /** * @todo: Determine if work was committed, rolled back, or both, * and return appropriate Heuristic Exception. */ connection.rollback(); // real/phys. } catch (SQLException se) { throw new XAException(se.getMessage()); } dispose(); }
class class_name[name] begin[{] method[rollbackThis, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.state], !=, member[.XA_STATE_PREPARED]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid XAResource state")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XAException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=rollback, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=se, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XAException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=se, types=['SQLException']))], finally_block=None, label=None, resources=None) call[.dispose, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[rollbackThis] operator[SEP] operator[SEP] Keyword[throws] identifier[XAException] { Keyword[if] operator[SEP] identifier[state] operator[!=] identifier[XA_STATE_PREPARED] operator[SEP] { Keyword[throw] Keyword[new] identifier[XAException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[connection] operator[SEP] identifier[rollback] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[se] operator[SEP] { Keyword[throw] Keyword[new] identifier[XAException] operator[SEP] identifier[se] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[dispose] operator[SEP] operator[SEP] operator[SEP] }
private float getBorderWidthInside(int side) { float width = 0f; if (useBorderPadding) { switch (side) { case Rectangle.LEFT: width = getBorderWidthLeft(); break; case Rectangle.RIGHT: width = getBorderWidthRight(); break; case Rectangle.TOP: width = getBorderWidthTop(); break; default: // default and BOTTOM width = getBorderWidthBottom(); break; } // non-variable (original style) borders overlap the rectangle (only 1/2 counts) if (!isUseVariableBorders()) { width = width / 2f; } } return width; }
class class_name[name] begin[{] method[getBorderWidthInside, return_type[type[float]], modifier[private], parameter[side]] begin[{] local_variable[type[float], width] if[member[.useBorderPadding]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=LEFT, postfix_operators=[], prefix_operators=[], qualifier=Rectangle, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getBorderWidthLeft, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=RIGHT, postfix_operators=[], prefix_operators=[], qualifier=Rectangle, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getBorderWidthRight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=TOP, postfix_operators=[], prefix_operators=[], qualifier=Rectangle, selectors=[])], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getBorderWidthTop, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getBorderWidthBottom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=side, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) if[call[.isUseVariableBorders, parameter[]]] begin[{] assign[member[.width], binary_operation[member[.width], /, literal[2f]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.width]] end[}] END[}]
Keyword[private] Keyword[float] identifier[getBorderWidthInside] operator[SEP] Keyword[int] identifier[side] operator[SEP] { Keyword[float] identifier[width] operator[=] literal[Float] operator[SEP] Keyword[if] operator[SEP] identifier[useBorderPadding] operator[SEP] { Keyword[switch] operator[SEP] identifier[side] operator[SEP] { Keyword[case] identifier[Rectangle] operator[SEP] identifier[LEFT] operator[:] identifier[width] operator[=] identifier[getBorderWidthLeft] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Rectangle] operator[SEP] identifier[RIGHT] operator[:] identifier[width] operator[=] identifier[getBorderWidthRight] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[Rectangle] operator[SEP] identifier[TOP] operator[:] identifier[width] operator[=] identifier[getBorderWidthTop] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[width] operator[=] identifier[getBorderWidthBottom] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[isUseVariableBorders] operator[SEP] operator[SEP] operator[SEP] { identifier[width] operator[=] identifier[width] operator[/] literal[Float] operator[SEP] } } Keyword[return] identifier[width] operator[SEP] }
public static List<AssociatedPair> computeMatches( BufferedImage left , BufferedImage right ) { DetectDescribePoint detDesc = FactoryDetectDescribe.surfStable( new ConfigFastHessian(0, 2, 400, 1, 9, 4, 4), null,null, GrayF32.class); // DetectDescribePoint detDesc = FactoryDetectDescribe.sift(null,new ConfigSiftDetector(2,0,200,5),null,null); ScoreAssociation<BrightFeature> scorer = FactoryAssociation.scoreEuclidean(BrightFeature.class,true); AssociateDescription<BrightFeature> associate = FactoryAssociation.greedy(scorer, 0.1, true); ExampleAssociatePoints<GrayF32,BrightFeature> findMatches = new ExampleAssociatePoints<>(detDesc, associate, GrayF32.class); findMatches.associate(left,right); List<AssociatedPair> matches = new ArrayList<>(); FastQueue<AssociatedIndex> matchIndexes = associate.getMatches(); for( int i = 0; i < matchIndexes.size; i++ ) { AssociatedIndex a = matchIndexes.get(i); AssociatedPair p = new AssociatedPair(findMatches.pointsA.get(a.src) , findMatches.pointsB.get(a.dst)); matches.add( p); } return matches; }
class class_name[name] begin[{] method[computeMatches, return_type[type[List]], modifier[public static], parameter[left, right]] begin[{] local_variable[type[DetectDescribePoint], detDesc] local_variable[type[ScoreAssociation], scorer] local_variable[type[AssociateDescription], associate] local_variable[type[ExampleAssociatePoints], findMatches] call[findMatches.associate, parameter[member[.left], member[.right]]] local_variable[type[List], matches] local_variable[type[FastQueue], matchIndexes] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=matchIndexes, selectors=[], type_arguments=None), name=a)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AssociatedIndex, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=findMatches.pointsA, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=dst, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=findMatches.pointsB, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AssociatedPair, sub_type=None)), name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AssociatedPair, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=matches, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=matchIndexes, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.matches]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[AssociatedPair] operator[>] identifier[computeMatches] operator[SEP] identifier[BufferedImage] identifier[left] , identifier[BufferedImage] identifier[right] operator[SEP] { identifier[DetectDescribePoint] identifier[detDesc] operator[=] identifier[FactoryDetectDescribe] operator[SEP] identifier[surfStable] operator[SEP] Keyword[new] identifier[ConfigFastHessian] operator[SEP] Other[0] , Other[2] , Other[400] , Other[1] , Other[9] , Other[4] , Other[4] operator[SEP] , Other[null] , Other[null] , identifier[GrayF32] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[ScoreAssociation] operator[<] identifier[BrightFeature] operator[>] identifier[scorer] operator[=] identifier[FactoryAssociation] operator[SEP] identifier[scoreEuclidean] operator[SEP] identifier[BrightFeature] operator[SEP] Keyword[class] , literal[boolean] operator[SEP] operator[SEP] identifier[AssociateDescription] operator[<] identifier[BrightFeature] operator[>] identifier[associate] operator[=] identifier[FactoryAssociation] operator[SEP] identifier[greedy] operator[SEP] identifier[scorer] , literal[Float] , literal[boolean] operator[SEP] operator[SEP] identifier[ExampleAssociatePoints] operator[<] identifier[GrayF32] , identifier[BrightFeature] operator[>] identifier[findMatches] operator[=] Keyword[new] identifier[ExampleAssociatePoints] operator[<] operator[>] operator[SEP] identifier[detDesc] , identifier[associate] , identifier[GrayF32] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[findMatches] operator[SEP] identifier[associate] operator[SEP] identifier[left] , identifier[right] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[AssociatedPair] operator[>] identifier[matches] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[FastQueue] operator[<] identifier[AssociatedIndex] operator[>] identifier[matchIndexes] operator[=] identifier[associate] operator[SEP] identifier[getMatches] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[matchIndexes] operator[SEP] identifier[size] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[AssociatedIndex] identifier[a] operator[=] identifier[matchIndexes] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[AssociatedPair] identifier[p] operator[=] Keyword[new] identifier[AssociatedPair] operator[SEP] identifier[findMatches] operator[SEP] identifier[pointsA] operator[SEP] identifier[get] operator[SEP] identifier[a] operator[SEP] identifier[src] operator[SEP] , identifier[findMatches] operator[SEP] identifier[pointsB] operator[SEP] identifier[get] operator[SEP] identifier[a] operator[SEP] identifier[dst] operator[SEP] operator[SEP] operator[SEP] identifier[matches] operator[SEP] identifier[add] operator[SEP] identifier[p] operator[SEP] operator[SEP] } Keyword[return] identifier[matches] operator[SEP] }
public static String toMethodDescriptor(Method method, boolean ignoreFirstParameter) { Class<?>[] params = method.getParameterTypes(); if (ignoreFirstParameter && params.length < 1) { throw new IllegalStateException("Cannot ignore the first parameter when there are none. method=" + method); } StringBuilder s = new StringBuilder(); if (!ignoreFirstParameter) { s.append("("); } for (int i = (ignoreFirstParameter ? 1 : 0), max = params.length; i < max; i++) { appendDescriptor(params[i], s); } s.append(")"); appendDescriptor(method.getReturnType(), s); return s.toString(); }
class class_name[name] begin[{] method[toMethodDescriptor, return_type[type[String]], modifier[public static], parameter[method, ignoreFirstParameter]] begin[{] local_variable[type[Class], params] if[binary_operation[member[.ignoreFirstParameter], &&, binary_operation[member[params.length], <, literal[1]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot ignore the first parameter when there are none. method="), operandr=MemberReference(member=method, 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=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[StringBuilder], s] if[member[.ignoreFirstParameter]] begin[{] call[s.append, parameter[literal["("]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=TernaryExpression(condition=MemberReference(member=ignoreFirstParameter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), name=i), VariableDeclarator(dimensions=[], initializer=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[]), name=max)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[s.append, parameter[literal[")"]]] call[.appendDescriptor, parameter[call[method.getReturnType, parameter[]], member[.s]]] return[call[s.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[toMethodDescriptor] operator[SEP] identifier[Method] identifier[method] , Keyword[boolean] identifier[ignoreFirstParameter] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[params] operator[=] identifier[method] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ignoreFirstParameter] operator[&&] identifier[params] operator[SEP] identifier[length] operator[<] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[method] operator[SEP] operator[SEP] } identifier[StringBuilder] identifier[s] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[ignoreFirstParameter] operator[SEP] { identifier[s] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] operator[SEP] identifier[ignoreFirstParameter] operator[?] Other[1] operator[:] Other[0] operator[SEP] , identifier[max] operator[=] identifier[params] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[<] identifier[max] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[appendDescriptor] operator[SEP] identifier[params] operator[SEP] identifier[i] operator[SEP] , identifier[s] operator[SEP] operator[SEP] } identifier[s] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[appendDescriptor] operator[SEP] identifier[method] operator[SEP] identifier[getReturnType] operator[SEP] operator[SEP] , identifier[s] operator[SEP] operator[SEP] Keyword[return] identifier[s] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override @SuppressWarnings("unchecked") public V get(Object key) { V result; result = map.get(key); if (result == null){ synchronized(structureLock){ if (!map.containsKey(key)){ try { result = valueFactory.createValue((K)key); map.put((K) key, result); } catch (Exception e) { throw new RuntimeException("Error creating or puting value for the map.", e); } }else{ result = map.get(key); } } } return result; }
class class_name[name] begin[{] method[get, return_type[type[V]], modifier[public], parameter[key]] begin[{] local_variable[type[V], result] assign[member[.result], call[map.get, parameter[member[.key]]]] if[binary_operation[member[.result], ==, literal[null]]] begin[{] SYNCHRONIZED[member[.structureLock]] BEGIN[{] if[call[map.containsKey, parameter[member[.key]]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Cast(expression=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None))], member=createValue, postfix_operators=[], prefix_operators=[], qualifier=valueFactory, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error creating or puting value for the map."), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] assign[member[.result], call[map.get, parameter[member[.key]]]] end[}] END[}] else begin[{] None end[}] return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[V] identifier[get] operator[SEP] identifier[Object] identifier[key] operator[SEP] { identifier[V] identifier[result] operator[SEP] identifier[result] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[structureLock] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[map] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] { Keyword[try] { identifier[result] operator[=] identifier[valueFactory] operator[SEP] identifier[createValue] operator[SEP] operator[SEP] identifier[K] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] operator[SEP] identifier[K] operator[SEP] identifier[key] , identifier[result] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } Keyword[else] { identifier[result] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] } } } Keyword[return] identifier[result] operator[SEP] }
public static boolean canAcceptChild(Class<? extends ElementBase> parentClass, Class<? extends ElementBase> childClass) { return allowedChildClasses.isRelated(parentClass, childClass); }
class class_name[name] begin[{] method[canAcceptChild, return_type[type[boolean]], modifier[public static], parameter[parentClass, childClass]] begin[{] return[call[allowedChildClasses.isRelated, parameter[member[.parentClass], member[.childClass]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[canAcceptChild] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[ElementBase] operator[>] identifier[parentClass] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[ElementBase] operator[>] identifier[childClass] operator[SEP] { Keyword[return] identifier[allowedChildClasses] operator[SEP] identifier[isRelated] operator[SEP] identifier[parentClass] , identifier[childClass] operator[SEP] operator[SEP] }
public static Class<?> wrappedType(Class<?> c) { int i; if (c.isPrimitive()) { for (i = 0; i < Type.PRIMITIVES.length; i++) { if (Type.PRIMITIVES[i].type == c) { return Type.PRIMITIVES[i].wrapper; } } throw new RuntimeException(); } else { return c; } }
class class_name[name] begin[{] method[wrappedType, return_type[type[Class]], modifier[public static], parameter[c]] begin[{] local_variable[type[int], i] if[call[c.isPrimitive, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=PRIMITIVES, postfix_operators=[], prefix_operators=[], qualifier=Type, 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)]), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=PRIMITIVES, postfix_operators=[], prefix_operators=[], qualifier=Type, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=wrapper, 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=Type.PRIMITIVES, 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) ThrowStatement(expression=ClassCreator(arguments=[], 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) else begin[{] return[member[.c]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[wrappedType] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[c] operator[SEP] { Keyword[int] identifier[i] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[SEP] identifier[isPrimitive] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[Type] operator[SEP] identifier[PRIMITIVES] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[Type] operator[SEP] identifier[PRIMITIVES] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[type] operator[==] identifier[c] operator[SEP] { Keyword[return] identifier[Type] operator[SEP] identifier[PRIMITIVES] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[wrapper] operator[SEP] } } Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[c] operator[SEP] } }
public boolean removeElement(int s) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESETDTM_NOT_MUTABLE, null)); //"This NodeSetDTM is not mutable!"); return super.removeElement(s); }
class class_name[name] begin[{] method[removeElement, return_type[type[boolean]], modifier[public], parameter[s]] begin[{] if[member[.m_mutable]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=ER_NODESETDTM_NOT_MUTABLE, postfix_operators=[], prefix_operators=[], qualifier=XPATHErrorResources, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=createXPATHMessage, postfix_operators=[], prefix_operators=[], qualifier=XSLMessages, selectors=[], type_arguments=None)], 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) else begin[{] None end[}] return[SuperMethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeElement, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[removeElement] operator[SEP] Keyword[int] identifier[s] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[m_mutable] operator[SEP] Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[XSLMessages] operator[SEP] identifier[createXPATHMessage] operator[SEP] identifier[XPATHErrorResources] operator[SEP] identifier[ER_NODESETDTM_NOT_MUTABLE] , Other[null] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[super] operator[SEP] identifier[removeElement] operator[SEP] identifier[s] operator[SEP] operator[SEP] }
public JsHandlerRegistration addGeometryIndexSelectedHandler(final GeometryIndexSelectedHandler handler) { org.geomajas.plugin.editing.client.event.state.GeometryIndexSelectedHandler h; h = new org.geomajas.plugin.editing.client.event.state.GeometryIndexSelectedHandler() { public void onGeometryIndexSelected(GeometryIndexSelectedEvent event) { org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexSelectedEvent e; List<GeometryIndex> indices = event.getIndices(); e = new org.geomajas.plugin.editing.jsapi.client.event.state.GeometryIndexSelectedEvent( event.getGeometry(), indices.toArray(new GeometryIndex[indices.size()])); handler.onGeometryIndexSelected(e); } }; return new JsHandlerRegistration(new HandlerRegistration[] { delegate.addGeometryIndexSelectedHandler(h) }); }
class class_name[name] begin[{] method[addGeometryIndexSelectedHandler, return_type[type[JsHandlerRegistration]], modifier[public], parameter[handler]] begin[{] local_variable[type[org], h] assign[member[.h], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=geomajas, sub_type=ReferenceType(arguments=None, dimensions=None, name=plugin, sub_type=ReferenceType(arguments=None, dimensions=None, name=editing, sub_type=ReferenceType(arguments=None, dimensions=None, name=jsapi, sub_type=ReferenceType(arguments=None, dimensions=None, name=client, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=state, sub_type=ReferenceType(arguments=None, dimensions=None, name=GeometryIndexSelectedEvent, sub_type=None)))))))))), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getIndices, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), name=indices)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GeometryIndex, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getGeometry, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None), MethodInvocation(arguments=[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=indices, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GeometryIndex, sub_type=None))], member=toArray, postfix_operators=[], prefix_operators=[], qualifier=indices, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=geomajas, sub_type=ReferenceType(arguments=None, dimensions=None, name=plugin, sub_type=ReferenceType(arguments=None, dimensions=None, name=editing, sub_type=ReferenceType(arguments=None, dimensions=None, name=jsapi, sub_type=ReferenceType(arguments=None, dimensions=None, name=client, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=state, sub_type=ReferenceType(arguments=None, dimensions=None, name=GeometryIndexSelectedEvent, sub_type=None))))))))))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onGeometryIndexSelected, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onGeometryIndexSelected, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=GeometryIndexSelectedEvent, 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=org, sub_type=ReferenceType(arguments=None, dimensions=None, name=geomajas, sub_type=ReferenceType(arguments=None, dimensions=None, name=plugin, sub_type=ReferenceType(arguments=None, dimensions=None, name=editing, sub_type=ReferenceType(arguments=None, dimensions=None, name=client, sub_type=ReferenceType(arguments=None, dimensions=None, name=event, sub_type=ReferenceType(arguments=None, dimensions=None, name=state, sub_type=ReferenceType(arguments=None, dimensions=None, name=GeometryIndexSelectedHandler, sub_type=None)))))))))] return[ClassCreator(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addGeometryIndexSelectedHandler, postfix_operators=[], prefix_operators=[], qualifier=delegate, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HandlerRegistration, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JsHandlerRegistration, sub_type=None))] end[}] END[}]
Keyword[public] identifier[JsHandlerRegistration] identifier[addGeometryIndexSelectedHandler] operator[SEP] Keyword[final] identifier[GeometryIndexSelectedHandler] identifier[handler] operator[SEP] { identifier[org] operator[SEP] identifier[geomajas] operator[SEP] identifier[plugin] operator[SEP] identifier[editing] operator[SEP] identifier[client] operator[SEP] identifier[event] operator[SEP] identifier[state] operator[SEP] identifier[GeometryIndexSelectedHandler] identifier[h] operator[SEP] identifier[h] operator[=] Keyword[new] identifier[org] operator[SEP] identifier[geomajas] operator[SEP] identifier[plugin] operator[SEP] identifier[editing] operator[SEP] identifier[client] operator[SEP] identifier[event] operator[SEP] identifier[state] operator[SEP] identifier[GeometryIndexSelectedHandler] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[onGeometryIndexSelected] operator[SEP] identifier[GeometryIndexSelectedEvent] identifier[event] operator[SEP] { identifier[org] operator[SEP] identifier[geomajas] operator[SEP] identifier[plugin] operator[SEP] identifier[editing] operator[SEP] identifier[jsapi] operator[SEP] identifier[client] operator[SEP] identifier[event] operator[SEP] identifier[state] operator[SEP] identifier[GeometryIndexSelectedEvent] identifier[e] operator[SEP] identifier[List] operator[<] identifier[GeometryIndex] operator[>] identifier[indices] operator[=] identifier[event] operator[SEP] identifier[getIndices] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[=] Keyword[new] identifier[org] operator[SEP] identifier[geomajas] operator[SEP] identifier[plugin] operator[SEP] identifier[editing] operator[SEP] identifier[jsapi] operator[SEP] identifier[client] operator[SEP] identifier[event] operator[SEP] identifier[state] operator[SEP] identifier[GeometryIndexSelectedEvent] operator[SEP] identifier[event] operator[SEP] identifier[getGeometry] operator[SEP] operator[SEP] , identifier[indices] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[GeometryIndex] operator[SEP] identifier[indices] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[handler] operator[SEP] identifier[onGeometryIndexSelected] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } operator[SEP] Keyword[return] Keyword[new] identifier[JsHandlerRegistration] operator[SEP] Keyword[new] identifier[HandlerRegistration] operator[SEP] operator[SEP] { identifier[delegate] operator[SEP] identifier[addGeometryIndexSelectedHandler] operator[SEP] identifier[h] operator[SEP] } operator[SEP] operator[SEP] }
public ApiSuccessResponse publishTopic(String topic, PublishEventData publishEventData) throws ApiException { ApiResponse<ApiSuccessResponse> resp = publishTopicWithHttpInfo(topic, publishEventData); return resp.getData(); }
class class_name[name] begin[{] method[publishTopic, return_type[type[ApiSuccessResponse]], modifier[public], parameter[topic, publishEventData]] begin[{] local_variable[type[ApiResponse], resp] return[call[resp.getData, parameter[]]] end[}] END[}]
Keyword[public] identifier[ApiSuccessResponse] identifier[publishTopic] operator[SEP] identifier[String] identifier[topic] , identifier[PublishEventData] identifier[publishEventData] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ApiResponse] operator[<] identifier[ApiSuccessResponse] operator[>] identifier[resp] operator[=] identifier[publishTopicWithHttpInfo] operator[SEP] identifier[topic] , identifier[publishEventData] operator[SEP] operator[SEP] Keyword[return] identifier[resp] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] }
public static NodeSequence emptySequence( final int width ) { assert width >= 0; return new NodeSequence() { @Override public int width() { return width; } @Override public Batch nextBatch() { return null; } @Override public long getRowCount() { return 0; } @Override public boolean isEmpty() { return true; } @Override public void close() { } @Override public String toString() { return "(empty-sequence width=" + width() + ")"; } }; }
class class_name[name] begin[{] method[emptySequence, return_type[type[NodeSequence]], modifier[public static], parameter[width]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), label=None, value=None) return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=width, parameters=[], return_type=BasicType(dimensions=[], name=int), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], documentation=None, modifiers={'public'}, name=nextBatch, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Batch, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), label=None)], documentation=None, modifiers={'public'}, name=getRowCount, parameters=[], return_type=BasicType(dimensions=[], name=long), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], documentation=None, modifiers={'public'}, name=isEmpty, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[], documentation=None, modifiers={'public'}, name=close, parameters=[], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="(empty-sequence width="), operandr=MethodInvocation(arguments=[], member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+), label=None)], documentation=None, modifiers={'public'}, name=toString, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NodeSequence, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[NodeSequence] identifier[emptySequence] operator[SEP] Keyword[final] Keyword[int] identifier[width] operator[SEP] { Keyword[assert] identifier[width] operator[>=] Other[0] operator[SEP] Keyword[return] Keyword[new] identifier[NodeSequence] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[width] operator[SEP] operator[SEP] { Keyword[return] identifier[width] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[Batch] identifier[nextBatch] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[getRowCount] operator[SEP] operator[SEP] { Keyword[return] Other[0] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[isEmpty] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { } annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[toString] operator[SEP] operator[SEP] { Keyword[return] literal[String] operator[+] identifier[width] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] } } operator[SEP] }
public QueueConfig getQueueConfig(String name) { return ConfigUtils.getConfig(configPatternMatcher, queueConfigs, name, QueueConfig.class); }
class class_name[name] begin[{] method[getQueueConfig, return_type[type[QueueConfig]], modifier[public], parameter[name]] begin[{] return[call[ConfigUtils.getConfig, parameter[member[.configPatternMatcher], member[.queueConfigs], member[.name], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QueueConfig, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[QueueConfig] identifier[getQueueConfig] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[ConfigUtils] operator[SEP] identifier[getConfig] operator[SEP] identifier[configPatternMatcher] , identifier[queueConfigs] , identifier[name] , identifier[QueueConfig] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public JBBPDslBuilder DoubleArray(final String name, final String sizeExpression) { final Item item = new Item(BinType.DOUBLE_ARRAY, name, this.byteOrder); item.sizeExpression = assertExpressionChars(sizeExpression); this.addItem(item); return this; }
class class_name[name] begin[{] method[DoubleArray, return_type[type[JBBPDslBuilder]], modifier[public], parameter[name, sizeExpression]] begin[{] local_variable[type[Item], item] assign[member[item.sizeExpression], call[.assertExpressionChars, parameter[member[.sizeExpression]]]] THIS[call[None.addItem, parameter[member[.item]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[JBBPDslBuilder] identifier[DoubleArray] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[sizeExpression] operator[SEP] { Keyword[final] identifier[Item] identifier[item] operator[=] Keyword[new] identifier[Item] operator[SEP] identifier[BinType] operator[SEP] identifier[DOUBLE_ARRAY] , identifier[name] , Keyword[this] operator[SEP] identifier[byteOrder] operator[SEP] operator[SEP] identifier[item] operator[SEP] identifier[sizeExpression] operator[=] identifier[assertExpressionChars] operator[SEP] identifier[sizeExpression] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addItem] operator[SEP] identifier[item] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public Map<String, Object> toMap() { Map<String, Object> result = new HashMap<>(); for (Entry<Key, Value> keyValueEntry : fields.entrySet()) { Key key = keyValueEntry.getKey(); Value value = keyValueEntry.getValue(); if (!key.isExtension()) { result.put(key.getName(), transformValueToObject(value)); } else { result.put("(" + key.getName() + ")", transformValueToObject(value)); } } return result; }
class class_name[name] begin[{] method[toMap, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[Map], result] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=keyValueEntry, selectors=[], type_arguments=None), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Key, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=keyValueEntry, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Value, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isExtension, postfix_operators=[], prefix_operators=['!'], qualifier=key, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="("), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=")"), operator=+), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=transformValueToObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=transformValueToObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], 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=keyValueEntry)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Key, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Value, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) return[member[.result]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[toMap] operator[SEP] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[result] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[Key] , identifier[Value] operator[>] identifier[keyValueEntry] operator[:] identifier[fields] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[Key] identifier[key] operator[=] identifier[keyValueEntry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[Value] identifier[value] operator[=] identifier[keyValueEntry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[key] operator[SEP] identifier[isExtension] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[put] operator[SEP] identifier[key] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[transformValueToObject] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[result] operator[SEP] identifier[put] operator[SEP] literal[String] operator[+] identifier[key] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[transformValueToObject] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
public synchronized List<GuiceRecurringDaemon> getRecurring() { return daemons.stream() .filter(d -> d instanceof GuiceRecurringDaemon) .map(d -> (GuiceRecurringDaemon) d) .sorted(Comparator.comparing(GuiceDaemon::getName)) .collect(Collectors.toList()); }
class class_name[name] begin[{] method[getRecurring, return_type[type[List]], modifier[synchronized public], parameter[]] begin[{] return[call[daemons.stream, parameter[]]] end[}] END[}]
Keyword[public] Keyword[synchronized] identifier[List] operator[<] identifier[GuiceRecurringDaemon] operator[>] identifier[getRecurring] operator[SEP] operator[SEP] { Keyword[return] identifier[daemons] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[d] operator[->] identifier[d] Keyword[instanceof] identifier[GuiceRecurringDaemon] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[d] operator[->] operator[SEP] identifier[GuiceRecurringDaemon] operator[SEP] identifier[d] operator[SEP] operator[SEP] identifier[sorted] operator[SEP] identifier[Comparator] operator[SEP] identifier[comparing] operator[SEP] identifier[GuiceDaemon] operator[::] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public Photos getPhotos(String groupId, List<String> tags, String userId, EnumSet<JinxConstants.PhotoExtras> extras, int perPage, int page, boolean sign) throws JinxException { JinxUtils.validateParams(groupId); Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.groups.pools.getPhotos"); params.put("group_id", groupId); if (!JinxUtils.isNullOrEmpty(tags)) { params.put("tags", tags.get(0)); } if (!JinxUtils.isNullOrEmpty(userId)) { params.put("user_id", userId); } if (!JinxUtils.isNullOrEmpty(extras)) { params.put("extras", JinxUtils.buildCommaDelimitedList(extras)); } if (page > 0) { params.put("page", Integer.toString(page)); } if (perPage > 0) { params.put("per_page", Integer.toString(perPage)); } return jinx.flickrGet(params, Photos.class, sign); }
class class_name[name] begin[{] method[getPhotos, return_type[type[Photos]], modifier[public], parameter[groupId, tags, userId, extras, perPage, page, sign]] begin[{] call[JinxUtils.validateParams, parameter[member[.groupId]]] local_variable[type[Map], params] call[params.put, parameter[literal["method"], literal["flickr.groups.pools.getPhotos"]]] call[params.put, parameter[literal["group_id"], member[.groupId]]] if[call[JinxUtils.isNullOrEmpty, parameter[member[.tags]]]] begin[{] call[params.put, parameter[literal["tags"], call[tags.get, parameter[literal[0]]]]] else begin[{] None end[}] if[call[JinxUtils.isNullOrEmpty, parameter[member[.userId]]]] begin[{] call[params.put, parameter[literal["user_id"], member[.userId]]] else begin[{] None end[}] if[call[JinxUtils.isNullOrEmpty, parameter[member[.extras]]]] begin[{] call[params.put, parameter[literal["extras"], call[JinxUtils.buildCommaDelimitedList, parameter[member[.extras]]]]] else begin[{] None end[}] if[binary_operation[member[.page], >, literal[0]]] begin[{] call[params.put, parameter[literal["page"], call[Integer.toString, parameter[member[.page]]]]] else begin[{] None end[}] if[binary_operation[member[.perPage], >, literal[0]]] begin[{] call[params.put, parameter[literal["per_page"], call[Integer.toString, parameter[member[.perPage]]]]] else begin[{] None end[}] return[call[jinx.flickrGet, parameter[member[.params], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Photos, sub_type=None)), member[.sign]]]] end[}] END[}]
Keyword[public] identifier[Photos] identifier[getPhotos] operator[SEP] identifier[String] identifier[groupId] , identifier[List] operator[<] identifier[String] operator[>] identifier[tags] , identifier[String] identifier[userId] , identifier[EnumSet] operator[<] identifier[JinxConstants] operator[SEP] identifier[PhotoExtras] operator[>] identifier[extras] , Keyword[int] identifier[perPage] , Keyword[int] identifier[page] , Keyword[boolean] identifier[sign] operator[SEP] Keyword[throws] identifier[JinxException] { identifier[JinxUtils] operator[SEP] identifier[validateParams] operator[SEP] identifier[groupId] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[=] Keyword[new] identifier[TreeMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[groupId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[JinxUtils] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[tags] operator[SEP] operator[SEP] { identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[tags] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[JinxUtils] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[userId] operator[SEP] operator[SEP] { identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[userId] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[JinxUtils] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[extras] operator[SEP] operator[SEP] { identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[JinxUtils] operator[SEP] identifier[buildCommaDelimitedList] operator[SEP] identifier[extras] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[page] operator[>] Other[0] operator[SEP] { identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[page] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[perPage] operator[>] Other[0] operator[SEP] { identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[Integer] operator[SEP] identifier[toString] operator[SEP] identifier[perPage] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[jinx] operator[SEP] identifier[flickrGet] operator[SEP] identifier[params] , identifier[Photos] operator[SEP] Keyword[class] , identifier[sign] operator[SEP] operator[SEP] }
public int copyTo(byte[] dest, int start) throws BufferTooSmallException { if (size > (dest.length - start)) { throw new BufferTooSmallException("size is " + size + ", buffer availabe size is " + (dest.length - start)); } if (size > 0) { System.arraycopy(bytes, 0, dest, start, size); } return size; }
class class_name[name] begin[{] method[copyTo, return_type[type[int]], modifier[public], parameter[dest, start]] begin[{] if[binary_operation[member[.size], >, binary_operation[member[dest.length], -, member[.start]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="size is "), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", buffer availabe size is "), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=dest, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferTooSmallException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.size], >, literal[0]]] begin[{] call[System.arraycopy, parameter[member[.bytes], literal[0], member[.dest], member[.start], member[.size]]] else begin[{] None end[}] return[member[.size]] end[}] END[}]
Keyword[public] Keyword[int] identifier[copyTo] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[dest] , Keyword[int] identifier[start] operator[SEP] Keyword[throws] identifier[BufferTooSmallException] { Keyword[if] operator[SEP] identifier[size] operator[>] operator[SEP] identifier[dest] operator[SEP] identifier[length] operator[-] identifier[start] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[BufferTooSmallException] operator[SEP] literal[String] operator[+] identifier[size] operator[+] literal[String] operator[+] operator[SEP] identifier[dest] operator[SEP] identifier[length] operator[-] identifier[start] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[size] operator[>] Other[0] operator[SEP] { identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[bytes] , Other[0] , identifier[dest] , identifier[start] , identifier[size] operator[SEP] operator[SEP] } Keyword[return] identifier[size] operator[SEP] }
private String getFirstSurrogateFor(SurrogateCapabilitiesHeader surrogateCapabilitiesHeader, String capability) { for (SurrogateCapabilities surrogate : surrogateCapabilitiesHeader.getSurrogates()) { for (Capability sc : surrogate.getCapabilities()) { if (capability.equals(sc.toString())) { return surrogate.getDeviceToken(); } } } return null; }
class class_name[name] begin[{] method[getFirstSurrogateFor, return_type[type[String]], modifier[private], parameter[surrogateCapabilitiesHeader, capability]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sc, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=capability, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getDeviceToken, postfix_operators=[], prefix_operators=[], qualifier=surrogate, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getCapabilities, postfix_operators=[], prefix_operators=[], qualifier=surrogate, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Capability, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getSurrogates, postfix_operators=[], prefix_operators=[], qualifier=surrogateCapabilitiesHeader, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=surrogate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SurrogateCapabilities, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[private] identifier[String] identifier[getFirstSurrogateFor] operator[SEP] identifier[SurrogateCapabilitiesHeader] identifier[surrogateCapabilitiesHeader] , identifier[String] identifier[capability] operator[SEP] { Keyword[for] operator[SEP] identifier[SurrogateCapabilities] identifier[surrogate] operator[:] identifier[surrogateCapabilitiesHeader] operator[SEP] identifier[getSurrogates] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Capability] identifier[sc] operator[:] identifier[surrogate] operator[SEP] identifier[getCapabilities] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[capability] operator[SEP] identifier[equals] operator[SEP] identifier[sc] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[surrogate] operator[SEP] identifier[getDeviceToken] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] Other[null] operator[SEP] }
public void setRelation_ref(Relation v) { if (RelationMention_Type.featOkTst && ((RelationMention_Type)jcasType).casFeat_relation_ref == null) jcasType.jcas.throwFeatMissing("relation_ref", "de.julielab.jules.types.ace.RelationMention"); jcasType.ll_cas.ll_setRefValue(addr, ((RelationMention_Type)jcasType).casFeatCode_relation_ref, jcasType.ll_cas.ll_getFSRef(v));}
class class_name[name] begin[{] method[setRelation_ref, return_type[void], modifier[public], parameter[v]] begin[{] if[binary_operation[member[RelationMention_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RelationMention_Type, sub_type=None)), ==, literal[null]]]] begin[{] call[jcasType.jcas.throwFeatMissing, parameter[literal["relation_ref"], literal["de.julielab.jules.types.ace.RelationMention"]]] else begin[{] None end[}] call[jcasType.ll_cas.ll_setRefValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RelationMention_Type, sub_type=None)), call[jcasType.ll_cas.ll_getFSRef, parameter[member[.v]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setRelation_ref] operator[SEP] identifier[Relation] identifier[v] operator[SEP] { Keyword[if] operator[SEP] identifier[RelationMention_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[RelationMention_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_relation_ref] 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[ll_cas] operator[SEP] identifier[ll_setRefValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[RelationMention_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_relation_ref] , identifier[jcasType] operator[SEP] identifier[ll_cas] operator[SEP] identifier[ll_getFSRef] operator[SEP] identifier[v] operator[SEP] operator[SEP] operator[SEP] }
@POST @Path("/statuses") @Produces(APPLICATION_JSON) @Timed @ExceptionMetered public Map<String, HostStatus> hostStatuses( final List<String> hosts, @QueryParam("status") @DefaultValue("") final String statusFilter) { final Map<String, HostStatus> statuses = Maps.newHashMap(); for (final String host : hosts) { final HostStatus status = model.getHostStatus(host); if (status != null) { if (isNullOrEmpty(statusFilter) || statusFilter.equals(status.getStatus().toString())) { statuses.put(host, status); } } } return statuses; }
class class_name[name] begin[{] method[hostStatuses, return_type[type[Map]], modifier[public], parameter[hosts, statusFilter]] begin[{] local_variable[type[Map], statuses] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=host, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getHostStatus, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), name=status)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=HostStatus, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=statusFilter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNullOrEmpty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=statusFilter, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=host, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=statuses, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=hosts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=host)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.statuses]] end[}] END[}]
annotation[@] identifier[POST] annotation[@] identifier[Path] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Produces] operator[SEP] identifier[APPLICATION_JSON] operator[SEP] annotation[@] identifier[Timed] annotation[@] identifier[ExceptionMetered] Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[HostStatus] operator[>] identifier[hostStatuses] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[hosts] , annotation[@] identifier[QueryParam] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[DefaultValue] operator[SEP] literal[String] operator[SEP] Keyword[final] identifier[String] identifier[statusFilter] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[HostStatus] operator[>] identifier[statuses] operator[=] identifier[Maps] operator[SEP] identifier[newHashMap] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[host] operator[:] identifier[hosts] operator[SEP] { Keyword[final] identifier[HostStatus] identifier[status] operator[=] identifier[model] operator[SEP] identifier[getHostStatus] operator[SEP] identifier[host] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[status] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[statusFilter] operator[SEP] operator[||] identifier[statusFilter] operator[SEP] identifier[equals] operator[SEP] identifier[status] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[statuses] operator[SEP] identifier[put] operator[SEP] identifier[host] , identifier[status] operator[SEP] operator[SEP] } } } Keyword[return] identifier[statuses] operator[SEP] }
@Override protected boolean performDialogOperation() throws CmsException { // check if the current resource is a folder for single operation boolean isFolder = isOperationOnFolder(); // on folder undo changes or multi operation display "please wait" screen, not for simple file undo changes if ((isMultiOperation() || isFolder) && !DIALOG_WAIT.equals(getParamAction())) { // return false, this will trigger the "please wait" screen return false; } // get the flag if the undo changes is recursive from request parameter boolean undoRecursive = Boolean.valueOf(getParamRecursive()).booleanValue(); boolean undoMove = Boolean.valueOf(getParamMove()).booleanValue(); CmsResourceUndoMode mode = CmsResource.UNDO_CONTENT; if (undoRecursive) { mode = CmsResource.UNDO_CONTENT_RECURSIVE; } if (undoMove) { mode = mode.includeMove(); } Iterator<String> i = getResourceList().iterator(); // iterate the resources to delete while (i.hasNext()) { String resName = i.next(); try { // lock resource if autolock is enabled checkLock(resName); // undo changes on the resource getCms().undoChanges(resName, mode); } catch (CmsException e) { if (isMultiOperation()) { // collect exceptions to create a detailed output addMultiOperationException(e); } else { // for single operation, throw the exception immediately throw e; } } } // check if exceptions occurred checkMultiOperationException(Messages.get(), Messages.ERR_UNDO_CHANGES_MULTI_0); return true; }
class class_name[name] begin[{] method[performDialogOperation, return_type[type[boolean]], modifier[protected], parameter[]] begin[{] local_variable[type[boolean], isFolder] if[binary_operation[binary_operation[call[.isMultiOperation, parameter[]], ||, member[.isFolder]], &&, call[DIALOG_WAIT.equals, parameter[call[.getParamAction, parameter[]]]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[boolean], undoRecursive] local_variable[type[boolean], undoMove] local_variable[type[CmsResourceUndoMode], mode] if[member[.undoRecursive]] begin[{] assign[member[.mode], member[CmsResource.UNDO_CONTENT_RECURSIVE]] else begin[{] None end[}] if[member[.undoMove]] begin[{] assign[member[.mode], call[mode.includeMove, parameter[]]] else begin[{] None end[}] local_variable[type[Iterator], i] while[call[i.hasNext, parameter[]]] begin[{] local_variable[type[String], resName] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkLock, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getCms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=resName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=undoChanges, 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=isMultiOperation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addMultiOperationException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsException']))], finally_block=None, label=None, resources=None) end[}] call[.checkMultiOperationException, parameter[call[Messages.get, parameter[]], member[Messages.ERR_UNDO_CHANGES_MULTI_0]]] return[literal[true]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[boolean] identifier[performDialogOperation] operator[SEP] operator[SEP] Keyword[throws] identifier[CmsException] { Keyword[boolean] identifier[isFolder] operator[=] identifier[isOperationOnFolder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[isMultiOperation] operator[SEP] operator[SEP] operator[||] identifier[isFolder] operator[SEP] operator[&&] operator[!] identifier[DIALOG_WAIT] operator[SEP] identifier[equals] operator[SEP] identifier[getParamAction] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[boolean] identifier[undoRecursive] operator[=] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[getParamRecursive] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[undoMove] operator[=] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[getParamMove] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[booleanValue] operator[SEP] operator[SEP] operator[SEP] identifier[CmsResourceUndoMode] identifier[mode] operator[=] identifier[CmsResource] operator[SEP] identifier[UNDO_CONTENT] operator[SEP] Keyword[if] operator[SEP] identifier[undoRecursive] operator[SEP] { identifier[mode] operator[=] identifier[CmsResource] operator[SEP] identifier[UNDO_CONTENT_RECURSIVE] operator[SEP] } Keyword[if] operator[SEP] identifier[undoMove] operator[SEP] { identifier[mode] operator[=] identifier[mode] operator[SEP] identifier[includeMove] operator[SEP] operator[SEP] operator[SEP] } identifier[Iterator] operator[<] identifier[String] operator[>] identifier[i] operator[=] identifier[getResourceList] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[resName] operator[=] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[checkLock] operator[SEP] identifier[resName] operator[SEP] operator[SEP] identifier[getCms] operator[SEP] operator[SEP] operator[SEP] identifier[undoChanges] operator[SEP] identifier[resName] , identifier[mode] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmsException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[isMultiOperation] operator[SEP] operator[SEP] operator[SEP] { identifier[addMultiOperationException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] identifier[e] operator[SEP] } } } identifier[checkMultiOperationException] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] , identifier[Messages] operator[SEP] identifier[ERR_UNDO_CHANGES_MULTI_0] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public static String getAbsoluteUrl(SlingHttpServletRequest request, String url) { if (!isExternalUrl(url) && url.startsWith("/")) { String scheme = request.getScheme().toLowerCase(); url = scheme + "://" + getAuthority(request) + url; } return url; }
class class_name[name] begin[{] method[getAbsoluteUrl, return_type[type[String]], modifier[public static], parameter[request, url]] begin[{] if[binary_operation[call[.isExternalUrl, parameter[member[.url]]], &&, call[url.startsWith, parameter[literal["/"]]]]] begin[{] local_variable[type[String], scheme] assign[member[.url], binary_operation[binary_operation[binary_operation[member[.scheme], +, literal["://"]], +, call[.getAuthority, parameter[member[.request]]]], +, member[.url]]] else begin[{] None end[}] return[member[.url]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getAbsoluteUrl] operator[SEP] identifier[SlingHttpServletRequest] identifier[request] , identifier[String] identifier[url] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isExternalUrl] operator[SEP] identifier[url] operator[SEP] operator[&&] identifier[url] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[String] identifier[scheme] operator[=] identifier[request] operator[SEP] identifier[getScheme] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[url] operator[=] identifier[scheme] operator[+] literal[String] operator[+] identifier[getAuthority] operator[SEP] identifier[request] operator[SEP] operator[+] identifier[url] operator[SEP] } Keyword[return] identifier[url] operator[SEP] }
public Options put(String key, String value) { putOption(key, new StringOption(value)); return this; }
class class_name[name] begin[{] method[put, return_type[type[Options]], modifier[public], parameter[key, value]] begin[{] call[.putOption, parameter[member[.key], ClassCreator(arguments=[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=None, dimensions=None, name=StringOption, sub_type=None))]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Options] identifier[put] operator[SEP] identifier[String] identifier[key] , identifier[String] identifier[value] operator[SEP] { identifier[putOption] operator[SEP] identifier[key] , Keyword[new] identifier[StringOption] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private synchronized void maybeSchedulePingServerTask(int delta) { maybeStopPingServerTask(); if (pingInterval > 0) { int nextPingIn = pingInterval - delta; LOGGER.fine("Scheduling ServerPingTask in " + nextPingIn + " seconds (pingInterval=" + pingInterval + ", delta=" + delta + ")"); nextAutomaticPing = schedule(pingServerRunnable, nextPingIn, TimeUnit.SECONDS); } }
class class_name[name] begin[{] method[maybeSchedulePingServerTask, return_type[void], modifier[synchronized private], parameter[delta]] begin[{] call[.maybeStopPingServerTask, parameter[]] if[binary_operation[member[.pingInterval], >, literal[0]]] begin[{] local_variable[type[int], nextPingIn] call[LOGGER.fine, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["Scheduling ServerPingTask in "], +, member[.nextPingIn]], +, literal[" seconds (pingInterval="]], +, member[.pingInterval]], +, literal[", delta="]], +, member[.delta]], +, literal[")"]]]] assign[member[.nextAutomaticPing], call[.schedule, parameter[member[.pingServerRunnable], member[.nextPingIn], member[TimeUnit.SECONDS]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[synchronized] Keyword[void] identifier[maybeSchedulePingServerTask] operator[SEP] Keyword[int] identifier[delta] operator[SEP] { identifier[maybeStopPingServerTask] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pingInterval] operator[>] Other[0] operator[SEP] { Keyword[int] identifier[nextPingIn] operator[=] identifier[pingInterval] operator[-] identifier[delta] operator[SEP] identifier[LOGGER] operator[SEP] identifier[fine] operator[SEP] literal[String] operator[+] identifier[nextPingIn] operator[+] literal[String] operator[+] identifier[pingInterval] operator[+] literal[String] operator[+] identifier[delta] operator[+] literal[String] operator[SEP] operator[SEP] identifier[nextAutomaticPing] operator[=] identifier[schedule] operator[SEP] identifier[pingServerRunnable] , identifier[nextPingIn] , identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SEP] operator[SEP] } }
@com.fasterxml.jackson.annotation.JsonProperty("lastValidByteReceived") public void setLastValidByteReceived(Long lastValidByteReceived) { this.lastValidByteReceived = lastValidByteReceived; }
class class_name[name] begin[{] method[setLastValidByteReceived, return_type[void], modifier[public], parameter[lastValidByteReceived]] begin[{] assign[THIS[member[None.lastValidByteReceived]], member[.lastValidByteReceived]] end[}] END[}]
annotation[@] identifier[com] operator[SEP] identifier[fasterxml] operator[SEP] identifier[jackson] operator[SEP] identifier[annotation] operator[SEP] identifier[JsonProperty] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setLastValidByteReceived] operator[SEP] identifier[Long] identifier[lastValidByteReceived] operator[SEP] { Keyword[this] operator[SEP] identifier[lastValidByteReceived] operator[=] identifier[lastValidByteReceived] operator[SEP] }
public Sort and(final Sort sort) { Assert.notNull(sort, "Sort must not be null!"); final ArrayList<Order> these = new ArrayList<>(orders); for (final Order order : sort) { these.add(order); } return Sort.by(these); }
class class_name[name] begin[{] method[and, return_type[type[Sort]], modifier[public], parameter[sort]] begin[{] call[Assert.notNull, parameter[member[.sort], literal["Sort must not be null!"]]] local_variable[type[ArrayList], these] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=order, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=these, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=sort, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=order)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Order, sub_type=None))), label=None) return[call[Sort.by, parameter[member[.these]]]] end[}] END[}]
Keyword[public] identifier[Sort] identifier[and] operator[SEP] Keyword[final] identifier[Sort] identifier[sort] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[sort] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[ArrayList] operator[<] identifier[Order] operator[>] identifier[these] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[orders] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Order] identifier[order] operator[:] identifier[sort] operator[SEP] { identifier[these] operator[SEP] identifier[add] operator[SEP] identifier[order] operator[SEP] operator[SEP] } Keyword[return] identifier[Sort] operator[SEP] identifier[by] operator[SEP] identifier[these] operator[SEP] operator[SEP] }
public <A extends Annotation> BindingKey<T> qualifiedWith(final A instance) { return underlying.qualifiedWith(instance).asJava(); }
class class_name[name] begin[{] method[qualifiedWith, return_type[type[BindingKey]], modifier[public], parameter[instance]] begin[{] return[call[underlying.qualifiedWith, parameter[member[.instance]]]] end[}] END[}]
Keyword[public] operator[<] identifier[A] Keyword[extends] identifier[Annotation] operator[>] identifier[BindingKey] operator[<] identifier[T] operator[>] identifier[qualifiedWith] operator[SEP] Keyword[final] identifier[A] identifier[instance] operator[SEP] { Keyword[return] identifier[underlying] operator[SEP] identifier[qualifiedWith] operator[SEP] identifier[instance] operator[SEP] operator[SEP] identifier[asJava] operator[SEP] operator[SEP] operator[SEP] }
protected void init(peer_info p) { client = Vectors.byte_vector2utf8(p.get_client()); totalDownload = p.getTotal_download(); totalUpload = p.getTotal_upload(); flags = p.get_flags(); source = p.get_source(); upSpeed = p.getUp_speed(); downSpeed = p.getDown_speed(); connectionType = ConnectionType.fromSwig(p.getConnection_type()); progress = p.getProgress(); progressPpm = p.getProgress_ppm(); ip = new TcpEndpoint(p.getIp()).toString(); }
class class_name[name] begin[{] method[init, return_type[void], modifier[protected], parameter[p]] begin[{] assign[member[.client], call[Vectors.byte_vector2utf8, parameter[call[p.get_client, parameter[]]]]] assign[member[.totalDownload], call[p.getTotal_download, parameter[]]] assign[member[.totalUpload], call[p.getTotal_upload, parameter[]]] assign[member[.flags], call[p.get_flags, parameter[]]] assign[member[.source], call[p.get_source, parameter[]]] assign[member[.upSpeed], call[p.getUp_speed, parameter[]]] assign[member[.downSpeed], call[p.getDown_speed, parameter[]]] assign[member[.connectionType], call[ConnectionType.fromSwig, parameter[call[p.getConnection_type, parameter[]]]]] assign[member[.progress], call[p.getProgress, parameter[]]] assign[member[.progressPpm], call[p.getProgress_ppm, parameter[]]] assign[member[.ip], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getIp, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=TcpEndpoint, sub_type=None))] end[}] END[}]
Keyword[protected] Keyword[void] identifier[init] operator[SEP] identifier[peer_info] identifier[p] operator[SEP] { identifier[client] operator[=] identifier[Vectors] operator[SEP] identifier[byte_vector2utf8] operator[SEP] identifier[p] operator[SEP] identifier[get_client] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[totalDownload] operator[=] identifier[p] operator[SEP] identifier[getTotal_download] operator[SEP] operator[SEP] operator[SEP] identifier[totalUpload] operator[=] identifier[p] operator[SEP] identifier[getTotal_upload] operator[SEP] operator[SEP] operator[SEP] identifier[flags] operator[=] identifier[p] operator[SEP] identifier[get_flags] operator[SEP] operator[SEP] operator[SEP] identifier[source] operator[=] identifier[p] operator[SEP] identifier[get_source] operator[SEP] operator[SEP] operator[SEP] identifier[upSpeed] operator[=] identifier[p] operator[SEP] identifier[getUp_speed] operator[SEP] operator[SEP] operator[SEP] identifier[downSpeed] operator[=] identifier[p] operator[SEP] identifier[getDown_speed] operator[SEP] operator[SEP] operator[SEP] identifier[connectionType] operator[=] identifier[ConnectionType] operator[SEP] identifier[fromSwig] operator[SEP] identifier[p] operator[SEP] identifier[getConnection_type] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[progress] operator[=] identifier[p] operator[SEP] identifier[getProgress] operator[SEP] operator[SEP] operator[SEP] identifier[progressPpm] operator[=] identifier[p] operator[SEP] identifier[getProgress_ppm] operator[SEP] operator[SEP] operator[SEP] identifier[ip] operator[=] Keyword[new] identifier[TcpEndpoint] operator[SEP] identifier[p] operator[SEP] identifier[getIp] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public WebAppDescriptor version(final String version) { if (version == null || version.length() == 0) { throw new IllegalArgumentException("Version must be specified"); } model.attribute("xsi:schemaLocation", "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_" + version.replace(".", "_") + ".xsd"); model.attribute("version", version); return this; }
class class_name[name] begin[{] method[version, return_type[type[WebAppDescriptor]], modifier[public], parameter[version]] begin[{] if[binary_operation[binary_operation[member[.version], ==, literal[null]], ||, binary_operation[call[version.length, parameter[]], ==, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Version must be specified")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[model.attribute, parameter[literal["xsi:schemaLocation"], binary_operation[binary_operation[literal["http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_"], +, call[version.replace, parameter[literal["."], literal["_"]]]], +, literal[".xsd"]]]] call[model.attribute, parameter[literal["version"], member[.version]]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[WebAppDescriptor] identifier[version] operator[SEP] Keyword[final] identifier[String] identifier[version] operator[SEP] { Keyword[if] operator[SEP] identifier[version] operator[==] Other[null] operator[||] identifier[version] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[model] operator[SEP] identifier[attribute] operator[SEP] literal[String] , literal[String] operator[+] identifier[version] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[attribute] operator[SEP] literal[String] , identifier[version] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public boolean doConnectionCleanup(Connection conn) throws SQLException { final boolean trace = TraceComponent.isAnyTracingEnabled(); if (trace && tc.isEntryEnabled()) Tr.entry(tc, "doConnectionCleanup"); boolean result = false; try { Class<?> c = OracleConnection.get(); if (c == null) OracleConnection.set(c = WSManagedConnectionFactoryImpl.priv.loadClass(mcf.jdbcDriverLoader, oracle_jdbc_OracleConnection)); if (c.isInstance(conn)) { try { Method m = isProxySession.get(); if (m == null) isProxySession.set(m = c.getMethod("isProxySession")); if ((Boolean) m.invoke(conn)) { m = close.get(); if (m == null) close.set(m = c.getMethod("close", int.class)); m.invoke(conn, 1); // value of OracleConnection.PROXY_SESSION result = true; } } catch (NoSuchMethodException nsme) { // This is expected when older version of the Oracle JDBC Driver // like classes12.zip are being used } } } catch (RuntimeException x) { throw x; } catch (Exception x) { throw AdapterUtil.toSQLException(x); } if (trace && tc.isEntryEnabled()) Tr.exit(tc, "doConnectionCleanup", result); return result; }
class class_name[name] begin[{] method[doConnectionCleanup, return_type[type[boolean]], modifier[public], parameter[conn]] begin[{] local_variable[type[boolean], trace] if[binary_operation[member[.trace], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["doConnectionCleanup"]]] else begin[{] None end[}] local_variable[type[boolean], result] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=OracleConnection, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=jdbcDriverLoader, postfix_operators=[], prefix_operators=[], qualifier=mcf, selectors=[]), MemberReference(member=oracle_jdbc_OracleConnection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadClass, postfix_operators=[], prefix_operators=[], qualifier=WSManagedConnectionFactoryImpl.priv, selectors=[], type_arguments=None))], member=set, postfix_operators=[], prefix_operators=[], qualifier=OracleConnection, selectors=[], type_arguments=None), label=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isInstance, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=isProxySession, selectors=[], type_arguments=None), name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Assignment(expressionl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="isProxySession")], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None))], member=set, postfix_operators=[], prefix_operators=[], qualifier=isProxySession, selectors=[], type_arguments=None), label=None)), IfStatement(condition=Cast(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None)), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=close, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[Assignment(expressionl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="close"), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=int))], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None))], member=set, postfix_operators=[], prefix_operators=[], qualifier=close, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=nsme, types=['NoSuchMethodException']))], finally_block=None, label=None, resources=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=x, types=['RuntimeException'])), CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toSQLException, postfix_operators=[], prefix_operators=[], qualifier=AdapterUtil, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=x, types=['Exception']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.trace], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["doConnectionCleanup"], member[.result]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[doConnectionCleanup] operator[SEP] identifier[Connection] identifier[conn] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[final] Keyword[boolean] identifier[trace] operator[=] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[trace] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[boolean] identifier[result] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[Class] operator[<] operator[?] operator[>] identifier[c] operator[=] identifier[OracleConnection] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] Other[null] operator[SEP] identifier[OracleConnection] operator[SEP] identifier[set] operator[SEP] identifier[c] operator[=] identifier[WSManagedConnectionFactoryImpl] operator[SEP] identifier[priv] operator[SEP] identifier[loadClass] operator[SEP] identifier[mcf] operator[SEP] identifier[jdbcDriverLoader] , identifier[oracle_jdbc_OracleConnection] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[SEP] identifier[isInstance] operator[SEP] identifier[conn] operator[SEP] operator[SEP] { Keyword[try] { identifier[Method] identifier[m] operator[=] identifier[isProxySession] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m] operator[==] Other[null] operator[SEP] identifier[isProxySession] operator[SEP] identifier[set] operator[SEP] identifier[m] operator[=] identifier[c] operator[SEP] identifier[getMethod] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[Boolean] operator[SEP] identifier[m] operator[SEP] identifier[invoke] operator[SEP] identifier[conn] operator[SEP] operator[SEP] { identifier[m] operator[=] identifier[close] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m] operator[==] Other[null] operator[SEP] identifier[close] operator[SEP] identifier[set] operator[SEP] identifier[m] operator[=] identifier[c] operator[SEP] identifier[getMethod] operator[SEP] literal[String] , Keyword[int] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] identifier[m] operator[SEP] identifier[invoke] operator[SEP] identifier[conn] , Other[1] operator[SEP] operator[SEP] identifier[result] operator[=] literal[boolean] operator[SEP] } } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] identifier[nsme] operator[SEP] { } } } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[x] operator[SEP] { Keyword[throw] identifier[x] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[x] operator[SEP] { Keyword[throw] identifier[AdapterUtil] operator[SEP] identifier[toSQLException] operator[SEP] identifier[x] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[trace] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
void sendTaskListToChannels(List<TaskRec> tasks) { // group by type // Map<String, List<TaskRec>> grouped = new HashMap<String, List<TaskRec>>(); for (TaskRec taskRec : tasks) { List<TaskRec> tlist = grouped.get(taskRec.name); if (tlist == null) { tlist = new ArrayList<TaskRec>(); grouped.put(taskRec.name, tlist); } tlist.add(taskRec); } // execute // for (String taskName : grouped.keySet()) { final List<TaskRec> taskList = grouped.get(taskName); TaskRec trec1 = taskList.get(0); Channel channel = context.registry.getChannel(trec1.channel); if (channel == null) { // should never happen logger.warn("Task channel '{}' not exists. Use channel MAIN (task={} taskId={})", trec1.channel, trec1.name, trec1.taskId); channel = context.registry.getChannel(Model.CHANNEL_MAIN); } TaskConfig taskConfig = context.registry.getTaskConfig(trec1.name); if (taskConfig == null) { handleUnknownTasks(taskList); continue; } for (final TaskRec taskRec : taskList) { logger.debug("got task: " + taskRec); context.stats.metrics.loadTask(taskRec.taskId, taskRec.name, taskRec.channel); channel.workers.execute(new TedRunnable(taskRec) { @Override public void run() { processTask(taskRec); } }); } } }
class class_name[name] begin[{] method[sendTaskListToChannels, return_type[void], modifier[default], parameter[tasks]] begin[{] local_variable[type[Map], grouped] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=taskRec, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=grouped, selectors=[], type_arguments=None), name=tlist)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TaskRec, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tlist, 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=tlist, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TaskRec, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=taskRec, selectors=[]), MemberReference(member=tlist, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=grouped, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=taskRec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=tlist, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=tasks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=taskRec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TaskRec, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=taskName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=grouped, selectors=[], type_arguments=None), name=taskList)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TaskRec, sub_type=None))], dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=get, postfix_operators=[], prefix_operators=[], qualifier=taskList, selectors=[], type_arguments=None), name=trec1)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TaskRec, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=trec1, selectors=[])], member=getChannel, postfix_operators=[], prefix_operators=[], qualifier=context.registry, selectors=[], type_arguments=None), name=channel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Channel, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Task channel '{}' not exists. Use channel MAIN (task={} taskId={})"), MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=trec1, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=trec1, selectors=[]), MemberReference(member=taskId, postfix_operators=[], prefix_operators=[], qualifier=trec1, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=CHANNEL_MAIN, postfix_operators=[], prefix_operators=[], qualifier=Model, selectors=[])], member=getChannel, postfix_operators=[], prefix_operators=[], qualifier=context.registry, selectors=[], type_arguments=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=trec1, selectors=[])], member=getTaskConfig, postfix_operators=[], prefix_operators=[], qualifier=context.registry, selectors=[], type_arguments=None), name=taskConfig)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TaskConfig, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=taskConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=taskList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleUnknownTasks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="got task: "), operandr=MemberReference(member=taskRec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=taskId, postfix_operators=[], prefix_operators=[], qualifier=taskRec, selectors=[]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=taskRec, selectors=[]), MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=taskRec, selectors=[])], member=loadTask, postfix_operators=[], prefix_operators=[], qualifier=context.stats.metrics, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=taskRec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=taskRec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TedRunnable, sub_type=None))], member=execute, postfix_operators=[], prefix_operators=[], qualifier=channel.workers, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=taskList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=taskRec)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=TaskRec, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=grouped, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=taskName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[void] identifier[sendTaskListToChannels] operator[SEP] identifier[List] operator[<] identifier[TaskRec] operator[>] identifier[tasks] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[List] operator[<] identifier[TaskRec] operator[>] operator[>] identifier[grouped] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[List] operator[<] identifier[TaskRec] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[TaskRec] identifier[taskRec] operator[:] identifier[tasks] operator[SEP] { identifier[List] operator[<] identifier[TaskRec] operator[>] identifier[tlist] operator[=] identifier[grouped] operator[SEP] identifier[get] operator[SEP] identifier[taskRec] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tlist] operator[==] Other[null] operator[SEP] { identifier[tlist] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[TaskRec] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[grouped] operator[SEP] identifier[put] operator[SEP] identifier[taskRec] operator[SEP] identifier[name] , identifier[tlist] operator[SEP] operator[SEP] } identifier[tlist] operator[SEP] identifier[add] operator[SEP] identifier[taskRec] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[taskName] operator[:] identifier[grouped] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[TaskRec] operator[>] identifier[taskList] operator[=] identifier[grouped] operator[SEP] identifier[get] operator[SEP] identifier[taskName] operator[SEP] operator[SEP] identifier[TaskRec] identifier[trec1] operator[=] identifier[taskList] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[Channel] identifier[channel] operator[=] identifier[context] operator[SEP] identifier[registry] operator[SEP] identifier[getChannel] operator[SEP] identifier[trec1] operator[SEP] identifier[channel] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[channel] operator[==] Other[null] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[trec1] operator[SEP] identifier[channel] , identifier[trec1] operator[SEP] identifier[name] , identifier[trec1] operator[SEP] identifier[taskId] operator[SEP] operator[SEP] identifier[channel] operator[=] identifier[context] operator[SEP] identifier[registry] operator[SEP] identifier[getChannel] operator[SEP] identifier[Model] operator[SEP] identifier[CHANNEL_MAIN] operator[SEP] operator[SEP] } identifier[TaskConfig] identifier[taskConfig] operator[=] identifier[context] operator[SEP] identifier[registry] operator[SEP] identifier[getTaskConfig] operator[SEP] identifier[trec1] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[taskConfig] operator[==] Other[null] operator[SEP] { identifier[handleUnknownTasks] operator[SEP] identifier[taskList] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[for] operator[SEP] Keyword[final] identifier[TaskRec] identifier[taskRec] operator[:] identifier[taskList] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[taskRec] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[stats] operator[SEP] identifier[metrics] operator[SEP] identifier[loadTask] operator[SEP] identifier[taskRec] operator[SEP] identifier[taskId] , identifier[taskRec] operator[SEP] identifier[name] , identifier[taskRec] operator[SEP] identifier[channel] operator[SEP] operator[SEP] identifier[channel] operator[SEP] identifier[workers] operator[SEP] identifier[execute] operator[SEP] Keyword[new] identifier[TedRunnable] operator[SEP] identifier[taskRec] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[processTask] operator[SEP] identifier[taskRec] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } } }
@Scope(DocScope.IO) public UrlIO addRequestProperties(final Map<String, String> params) { requestProperties.putAll(params); return this; }
class class_name[name] begin[{] method[addRequestProperties, return_type[type[UrlIO]], modifier[public], parameter[params]] begin[{] call[requestProperties.putAll, parameter[member[.params]]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Scope] operator[SEP] identifier[DocScope] operator[SEP] identifier[IO] operator[SEP] Keyword[public] identifier[UrlIO] identifier[addRequestProperties] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[SEP] { identifier[requestProperties] operator[SEP] identifier[putAll] operator[SEP] identifier[params] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static <T> Number count(Iterable<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure closure) { return count(self.iterator(), closure); }
class class_name[name] begin[{] method[count, return_type[type[Number]], modifier[public static], parameter[self, closure]] begin[{] return[call[.count, parameter[call[self.iterator, parameter[]], member[.closure]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Number] identifier[count] operator[SEP] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[self] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[FirstParam] operator[SEP] identifier[FirstGenericType] operator[SEP] Keyword[class] operator[SEP] identifier[Closure] identifier[closure] operator[SEP] { Keyword[return] identifier[count] operator[SEP] identifier[self] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] , identifier[closure] operator[SEP] operator[SEP] }
public static CharSequence getText(@NonNull final Context context, @StyleRes final int themeResourceId, @AttrRes final int resourceId) { TypedArray typedArray = null; try { typedArray = obtainStyledAttributes(context, themeResourceId, resourceId); CharSequence text = typedArray.getText(0); if (text == null) { throw new NotFoundException( "Resource ID #0x" + Integer.toHexString(resourceId) + " is not valid"); } return text; } finally { if (typedArray != null) { typedArray.recycle(); } } }
class class_name[name] begin[{] method[getText, return_type[type[CharSequence]], modifier[public static], parameter[context, themeResourceId, resourceId]] begin[{] local_variable[type[TypedArray], typedArray] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=typedArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=themeResourceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resourceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=obtainStyledAttributes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getText, postfix_operators=[], prefix_operators=[], qualifier=typedArray, selectors=[], type_arguments=None), name=text)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CharSequence, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=text, 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=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Resource ID #0x"), operandr=MethodInvocation(arguments=[MemberReference(member=resourceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toHexString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is not valid"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NotFoundException, sub_type=None)), label=None)])), ReturnStatement(expression=MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=None, finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=typedArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=recycle, postfix_operators=[], prefix_operators=[], qualifier=typedArray, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[CharSequence] identifier[getText] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Context] identifier[context] , annotation[@] identifier[StyleRes] Keyword[final] Keyword[int] identifier[themeResourceId] , annotation[@] identifier[AttrRes] Keyword[final] Keyword[int] identifier[resourceId] operator[SEP] { identifier[TypedArray] identifier[typedArray] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[typedArray] operator[=] identifier[obtainStyledAttributes] operator[SEP] identifier[context] , identifier[themeResourceId] , identifier[resourceId] operator[SEP] operator[SEP] identifier[CharSequence] identifier[text] operator[=] identifier[typedArray] operator[SEP] identifier[getText] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[text] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NotFoundException] operator[SEP] literal[String] operator[+] identifier[Integer] operator[SEP] identifier[toHexString] operator[SEP] identifier[resourceId] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[text] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[typedArray] operator[!=] Other[null] operator[SEP] { identifier[typedArray] operator[SEP] identifier[recycle] operator[SEP] operator[SEP] operator[SEP] } } }
@Override public List<WebserviceDescription> getWebServiceDescriptions() { if (webservice_descriptions != null) { return webservice_descriptions.getList(); } else { return Collections.emptyList(); } }
class class_name[name] begin[{] method[getWebServiceDescriptions, return_type[type[List]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.webservice_descriptions], !=, literal[null]]] begin[{] return[call[webservice_descriptions.getList, parameter[]]] else begin[{] return[call[Collections.emptyList, parameter[]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[WebserviceDescription] operator[>] identifier[getWebServiceDescriptions] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[webservice_descriptions] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[webservice_descriptions] operator[SEP] identifier[getList] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } }
public EventContext createEventContext(EventTypeID eventTypeId, Object eventObject, ActivityContext ac, Address address, ServiceID serviceID, EventProcessingSucceedCallback succeedCallback, EventProcessingFailedCallback failedCallback, EventUnreferencedCallback unreferencedCallback) { final EventReferencesHandlerImpl referencesHandler = new EventReferencesHandlerImpl(); final EventContextData data = dataSource.newEventContextData( eventTypeId, eventObject, ac, address, serviceID, succeedCallback, failedCallback, unreferencedCallback, referencesHandler); final EventContextImpl eventContext = new EventContextImpl(data, this); referencesHandler.setEventContext(eventContext); return eventContext; }
class class_name[name] begin[{] method[createEventContext, return_type[type[EventContext]], modifier[public], parameter[eventTypeId, eventObject, ac, address, serviceID, succeedCallback, failedCallback, unreferencedCallback]] begin[{] local_variable[type[EventReferencesHandlerImpl], referencesHandler] local_variable[type[EventContextData], data] local_variable[type[EventContextImpl], eventContext] call[referencesHandler.setEventContext, parameter[member[.eventContext]]] return[member[.eventContext]] end[}] END[}]
Keyword[public] identifier[EventContext] identifier[createEventContext] operator[SEP] identifier[EventTypeID] identifier[eventTypeId] , identifier[Object] identifier[eventObject] , identifier[ActivityContext] identifier[ac] , identifier[Address] identifier[address] , identifier[ServiceID] identifier[serviceID] , identifier[EventProcessingSucceedCallback] identifier[succeedCallback] , identifier[EventProcessingFailedCallback] identifier[failedCallback] , identifier[EventUnreferencedCallback] identifier[unreferencedCallback] operator[SEP] { Keyword[final] identifier[EventReferencesHandlerImpl] identifier[referencesHandler] operator[=] Keyword[new] identifier[EventReferencesHandlerImpl] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[EventContextData] identifier[data] operator[=] identifier[dataSource] operator[SEP] identifier[newEventContextData] operator[SEP] identifier[eventTypeId] , identifier[eventObject] , identifier[ac] , identifier[address] , identifier[serviceID] , identifier[succeedCallback] , identifier[failedCallback] , identifier[unreferencedCallback] , identifier[referencesHandler] operator[SEP] operator[SEP] Keyword[final] identifier[EventContextImpl] identifier[eventContext] operator[=] Keyword[new] identifier[EventContextImpl] operator[SEP] identifier[data] , Keyword[this] operator[SEP] operator[SEP] identifier[referencesHandler] operator[SEP] identifier[setEventContext] operator[SEP] identifier[eventContext] operator[SEP] operator[SEP] Keyword[return] identifier[eventContext] operator[SEP] }
public void validateTrue(boolean value, String name, String message) { if (!value) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.TRUE_KEY.name(), name))); } }
class class_name[name] begin[{] method[validateTrue, return_type[void], modifier[public], parameter[value, name, message]] begin[{] if[member[.value]] begin[{] call[.addError, parameter[member[.name], call[Optional.ofNullable, parameter[member[.message]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[validateTrue] operator[SEP] Keyword[boolean] identifier[value] , identifier[String] identifier[name] , identifier[String] identifier[message] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[value] operator[SEP] { identifier[addError] operator[SEP] identifier[name] , identifier[Optional] operator[SEP] identifier[ofNullable] operator[SEP] identifier[message] operator[SEP] operator[SEP] identifier[orElse] operator[SEP] identifier[messages] operator[SEP] identifier[get] operator[SEP] identifier[Validation] operator[SEP] identifier[TRUE_KEY] operator[SEP] identifier[name] operator[SEP] operator[SEP] , identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@Override public CommerceNotificationTemplateUserSegmentRel findByCommerceUserSegmentEntryId_Last( long commerceUserSegmentEntryId, OrderByComparator<CommerceNotificationTemplateUserSegmentRel> orderByComparator) throws NoSuchNotificationTemplateUserSegmentRelException { CommerceNotificationTemplateUserSegmentRel commerceNotificationTemplateUserSegmentRel = fetchByCommerceUserSegmentEntryId_Last(commerceUserSegmentEntryId, orderByComparator); if (commerceNotificationTemplateUserSegmentRel != null) { return commerceNotificationTemplateUserSegmentRel; } StringBundler msg = new StringBundler(4); msg.append(_NO_SUCH_ENTITY_WITH_KEY); msg.append("commerceUserSegmentEntryId="); msg.append(commerceUserSegmentEntryId); msg.append("}"); throw new NoSuchNotificationTemplateUserSegmentRelException(msg.toString()); }
class class_name[name] begin[{] method[findByCommerceUserSegmentEntryId_Last, return_type[type[CommerceNotificationTemplateUserSegmentRel]], modifier[public], parameter[commerceUserSegmentEntryId, orderByComparator]] begin[{] local_variable[type[CommerceNotificationTemplateUserSegmentRel], commerceNotificationTemplateUserSegmentRel] if[binary_operation[member[.commerceNotificationTemplateUserSegmentRel], !=, literal[null]]] begin[{] return[member[.commerceNotificationTemplateUserSegmentRel]] else begin[{] None end[}] local_variable[type[StringBundler], msg] call[msg.append, parameter[member[._NO_SUCH_ENTITY_WITH_KEY]]] call[msg.append, parameter[literal["commerceUserSegmentEntryId="]]] call[msg.append, parameter[member[.commerceUserSegmentEntryId]]] 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=NoSuchNotificationTemplateUserSegmentRelException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceNotificationTemplateUserSegmentRel] identifier[findByCommerceUserSegmentEntryId_Last] operator[SEP] Keyword[long] identifier[commerceUserSegmentEntryId] , identifier[OrderByComparator] operator[<] identifier[CommerceNotificationTemplateUserSegmentRel] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchNotificationTemplateUserSegmentRelException] { identifier[CommerceNotificationTemplateUserSegmentRel] identifier[commerceNotificationTemplateUserSegmentRel] operator[=] identifier[fetchByCommerceUserSegmentEntryId_Last] operator[SEP] identifier[commerceUserSegmentEntryId] , identifier[orderByComparator] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commerceNotificationTemplateUserSegmentRel] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[commerceNotificationTemplateUserSegmentRel] 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[commerceUserSegmentEntryId] operator[SEP] operator[SEP] identifier[msg] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[NoSuchNotificationTemplateUserSegmentRelException] operator[SEP] identifier[msg] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static void initializeSerializerMaps(final TSDB tsdb) throws SecurityException, NoSuchMethodException, ClassNotFoundException { List<HttpSerializer> serializers = PluginLoader.loadPlugins(HttpSerializer.class); // add the default serializers compiled with OpenTSDB if (serializers == null) { serializers = new ArrayList<HttpSerializer>(1); } final HttpSerializer default_serializer = new HttpJsonSerializer(); serializers.add(default_serializer); serializer_map_content_type = new HashMap<String, Constructor<? extends HttpSerializer>>(); serializer_map_query_string = new HashMap<String, Constructor<? extends HttpSerializer>>(); serializer_status = new ArrayList<HashMap<String, Object>>(); for (HttpSerializer serializer : serializers) { final Constructor<? extends HttpSerializer> ctor = serializer.getClass().getDeclaredConstructor(HttpQuery.class); // check for collisions before adding serializers to the maps Constructor<? extends HttpSerializer> map_ctor = serializer_map_content_type.get(serializer.requestContentType()); if (map_ctor != null) { final String err = "Serializer content type collision between \"" + serializer.getClass().getCanonicalName() + "\" and \"" + map_ctor.getClass().getCanonicalName() + "\""; LOG.error(err); throw new IllegalStateException(err); } serializer_map_content_type.put(serializer.requestContentType(), ctor); map_ctor = serializer_map_query_string.get(serializer.shortName()); if (map_ctor != null) { final String err = "Serializer name collision between \"" + serializer.getClass().getCanonicalName() + "\" and \"" + map_ctor.getClass().getCanonicalName() + "\""; LOG.error(err); throw new IllegalStateException(err); } serializer_map_query_string.put(serializer.shortName(), ctor); // initialize the plugins serializer.initialize(tsdb); // write the status for any serializers OTHER than the default if (serializer.shortName().equals("json")) { continue; } HashMap<String, Object> status = new HashMap<String, Object>(); status.put("version", serializer.version()); status.put("class", serializer.getClass().getCanonicalName()); status.put("serializer", serializer.shortName()); status.put("request_content_type", serializer.requestContentType()); status.put("response_content_type", serializer.responseContentType()); HashSet<String> parsers = new HashSet<String>(); HashSet<String> formats = new HashSet<String>(); Method[] methods = serializer.getClass().getDeclaredMethods(); for (Method m : methods) { if (Modifier.isPublic(m.getModifiers())) { if (m.getName().startsWith("parse")) { parsers.add(m.getName().substring(5)); } else if (m.getName().startsWith("format")) { formats.add(m.getName().substring(6)); } } } status.put("parsers", parsers); status.put("formatters", formats); serializer_status.add(status); } // add the base class to the status map so users can see everything that // is implemented HashMap<String, Object> status = new HashMap<String, Object>(); // todo - set the OpenTSDB version //status.put("version", BuildData.version); final Class<?> base_serializer = Class.forName("net.opentsdb.tsd.HttpSerializer"); status.put("class", default_serializer.getClass().getCanonicalName()); status.put("serializer", default_serializer.shortName()); status.put("request_content_type", default_serializer.requestContentType()); status.put("response_content_type", default_serializer.responseContentType()); ArrayList<String> parsers = new ArrayList<String>(); ArrayList<String> formats = new ArrayList<String>(); Method[] methods = base_serializer.getDeclaredMethods(); for (Method m : methods) { if (Modifier.isPublic(m.getModifiers())) { if (m.getName().startsWith("parse")) { parsers.add(m.getName().substring(5)); } if (m.getName().startsWith("format")) { formats.add(m.getName().substring(6)); } } } status.put("parsers", parsers); status.put("formatters", formats); serializer_status.add(status); }
class class_name[name] begin[{] method[initializeSerializerMaps, return_type[void], modifier[public static], parameter[tsdb]] begin[{] local_variable[type[List], serializers] if[binary_operation[member[.serializers], ==, literal[null]]] begin[{] assign[member[.serializers], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=HttpSerializer, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] local_variable[type[HttpSerializer], default_serializer] call[serializers.add, parameter[member[.default_serializer]]] assign[member[.serializer_map_content_type], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=HttpSerializer, sub_type=None))], dimensions=[], name=Constructor, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] assign[member[.serializer_map_query_string], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=HttpSerializer, sub_type=None))], dimensions=[], name=Constructor, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] assign[member[.serializer_status], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=HashMap, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HttpQuery, sub_type=None))], member=getDeclaredConstructor, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=ctor)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=HttpSerializer, sub_type=None))], dimensions=[], name=Constructor, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=requestContentType, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=serializer_map_content_type, selectors=[], type_arguments=None), name=map_ctor)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=HttpSerializer, sub_type=None))], dimensions=[], name=Constructor, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=map_ctor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Serializer content type collision between \""), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" and \""), operator=+), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=map_ctor, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\""), operator=+), name=err)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=err, 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)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=requestContentType, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None), MemberReference(member=ctor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=serializer_map_content_type, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=map_ctor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=shortName, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=serializer_map_query_string, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=map_ctor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Serializer name collision between \""), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" and \""), operator=+), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=map_ctor, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\""), operator=+), name=err)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=err, 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)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=shortName, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None), MemberReference(member=ctor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=serializer_map_query_string, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tsdb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initialize, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=shortName, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="json")], 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=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=HashMap, sub_type=None)), name=status)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=HashMap, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="version"), MethodInvocation(arguments=[], member=version, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="class"), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="serializer"), MethodInvocation(arguments=[], member=shortName, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="request_content_type"), MethodInvocation(arguments=[], member=requestContentType, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="response_content_type"), MethodInvocation(arguments=[], member=responseContentType, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=HashSet, sub_type=None)), name=parsers)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=HashSet, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=HashSet, sub_type=None)), name=formats)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=HashSet, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=serializer, selectors=[MethodInvocation(arguments=[], member=getDeclaredMethods, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=methods)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=Method, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getModifiers, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None)], member=isPublic, postfix_operators=[], prefix_operators=[], qualifier=Modifier, selectors=[], 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=m, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="parse")], member=startsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="format")], member=startsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=formats, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=parsers, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=methods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="parsers"), MemberReference(member=parsers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="formatters"), MemberReference(member=formats, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=status, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=serializer_status, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=serializers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=serializer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HttpSerializer, sub_type=None))), label=None) local_variable[type[HashMap], status] local_variable[type[Class], base_serializer] call[status.put, parameter[literal["class"], call[default_serializer.getClass, parameter[]]]] call[status.put, parameter[literal["serializer"], call[default_serializer.shortName, parameter[]]]] call[status.put, parameter[literal["request_content_type"], call[default_serializer.requestContentType, parameter[]]]] call[status.put, parameter[literal["response_content_type"], call[default_serializer.responseContentType, parameter[]]]] local_variable[type[ArrayList], parsers] local_variable[type[ArrayList], formats] local_variable[type[Method], methods] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getModifiers, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None)], member=isPublic, postfix_operators=[], prefix_operators=[], qualifier=Modifier, selectors=[], 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=m, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="parse")], member=startsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=parsers, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="format")], member=startsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=formats, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=methods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=m)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None) call[status.put, parameter[literal["parsers"], member[.parsers]]] call[status.put, parameter[literal["formatters"], member[.formats]]] call[serializer_status.add, parameter[member[.status]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[initializeSerializerMaps] operator[SEP] Keyword[final] identifier[TSDB] identifier[tsdb] operator[SEP] Keyword[throws] identifier[SecurityException] , identifier[NoSuchMethodException] , identifier[ClassNotFoundException] { identifier[List] operator[<] identifier[HttpSerializer] operator[>] identifier[serializers] operator[=] identifier[PluginLoader] operator[SEP] identifier[loadPlugins] operator[SEP] identifier[HttpSerializer] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serializers] operator[==] Other[null] operator[SEP] { identifier[serializers] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[HttpSerializer] operator[>] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[final] identifier[HttpSerializer] identifier[default_serializer] operator[=] Keyword[new] identifier[HttpJsonSerializer] operator[SEP] operator[SEP] operator[SEP] identifier[serializers] operator[SEP] identifier[add] operator[SEP] identifier[default_serializer] operator[SEP] operator[SEP] identifier[serializer_map_content_type] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Constructor] operator[<] operator[?] Keyword[extends] identifier[HttpSerializer] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[serializer_map_query_string] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Constructor] operator[<] operator[?] Keyword[extends] identifier[HttpSerializer] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[serializer_status] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[HttpSerializer] identifier[serializer] operator[:] identifier[serializers] operator[SEP] { Keyword[final] identifier[Constructor] operator[<] operator[?] Keyword[extends] identifier[HttpSerializer] operator[>] identifier[ctor] operator[=] identifier[serializer] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getDeclaredConstructor] operator[SEP] identifier[HttpQuery] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[Constructor] operator[<] operator[?] Keyword[extends] identifier[HttpSerializer] operator[>] identifier[map_ctor] operator[=] identifier[serializer_map_content_type] operator[SEP] identifier[get] operator[SEP] identifier[serializer] operator[SEP] identifier[requestContentType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[map_ctor] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[String] identifier[err] operator[=] literal[String] operator[+] identifier[serializer] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[map_ctor] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[err] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[err] operator[SEP] operator[SEP] } identifier[serializer_map_content_type] operator[SEP] identifier[put] operator[SEP] identifier[serializer] operator[SEP] identifier[requestContentType] operator[SEP] operator[SEP] , identifier[ctor] operator[SEP] operator[SEP] identifier[map_ctor] operator[=] identifier[serializer_map_query_string] operator[SEP] identifier[get] operator[SEP] identifier[serializer] operator[SEP] identifier[shortName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[map_ctor] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[String] identifier[err] operator[=] literal[String] operator[+] identifier[serializer] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[map_ctor] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] identifier[err] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[err] operator[SEP] operator[SEP] } identifier[serializer_map_query_string] operator[SEP] identifier[put] operator[SEP] identifier[serializer] operator[SEP] identifier[shortName] operator[SEP] operator[SEP] , identifier[ctor] operator[SEP] operator[SEP] identifier[serializer] operator[SEP] identifier[initialize] operator[SEP] identifier[tsdb] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[serializer] operator[SEP] identifier[shortName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[status] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[serializer] operator[SEP] identifier[version] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[serializer] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[serializer] operator[SEP] identifier[shortName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[serializer] operator[SEP] identifier[requestContentType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[serializer] operator[SEP] identifier[responseContentType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[HashSet] operator[<] identifier[String] operator[>] identifier[parsers] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[HashSet] operator[<] identifier[String] operator[>] identifier[formats] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Method] operator[SEP] operator[SEP] identifier[methods] operator[=] identifier[serializer] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getDeclaredMethods] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Method] identifier[m] operator[:] identifier[methods] operator[SEP] { Keyword[if] operator[SEP] identifier[Modifier] operator[SEP] identifier[isPublic] operator[SEP] identifier[m] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[parsers] operator[SEP] identifier[add] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[5] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[formats] operator[SEP] identifier[add] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[6] operator[SEP] operator[SEP] operator[SEP] } } } identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[parsers] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[formats] operator[SEP] operator[SEP] identifier[serializer_status] operator[SEP] identifier[add] operator[SEP] identifier[status] operator[SEP] operator[SEP] } identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[status] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[base_serializer] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[default_serializer] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[default_serializer] operator[SEP] identifier[shortName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[default_serializer] operator[SEP] identifier[requestContentType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[default_serializer] operator[SEP] identifier[responseContentType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[parsers] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[formats] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Method] operator[SEP] operator[SEP] identifier[methods] operator[=] identifier[base_serializer] operator[SEP] identifier[getDeclaredMethods] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Method] identifier[m] operator[:] identifier[methods] operator[SEP] { Keyword[if] operator[SEP] identifier[Modifier] operator[SEP] identifier[isPublic] operator[SEP] identifier[m] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[parsers] operator[SEP] identifier[add] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[5] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[formats] operator[SEP] identifier[add] operator[SEP] identifier[m] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[6] operator[SEP] operator[SEP] operator[SEP] } } } identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[parsers] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[formats] operator[SEP] operator[SEP] identifier[serializer_status] operator[SEP] identifier[add] operator[SEP] identifier[status] operator[SEP] operator[SEP] }
private static Class<?> getDeploymentClassFromConfig(ArquillianDescriptor descriptor) { String deploymentClassName = getDeploymentClassNameFromXml(descriptor); if (StringUtils.isNotEmpty(deploymentClassName)) { try { log.log(Level.INFO, "arquillian-suite-deployment: Using deployment class {0} from configuration.", deploymentClassName); return Class.forName(deploymentClassName); } catch (ClassNotFoundException e) { throw new IllegalStateException("Cannot load class " + deploymentClassName + " from configuration."); } } return null; }
class class_name[name] begin[{] method[getDeploymentClassFromConfig, return_type[type[Class]], modifier[private static], parameter[descriptor]] begin[{] local_variable[type[String], deploymentClassName] if[call[StringUtils.isNotEmpty, parameter[member[.deploymentClassName]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=INFO, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="arquillian-suite-deployment: Using deployment class {0} from configuration."), MemberReference(member=deploymentClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=deploymentClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot load class "), operandr=MemberReference(member=deploymentClassName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" from configuration."), operator=+)], 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, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[getDeploymentClassFromConfig] operator[SEP] identifier[ArquillianDescriptor] identifier[descriptor] operator[SEP] { identifier[String] identifier[deploymentClassName] operator[=] identifier[getDeploymentClassNameFromXml] operator[SEP] identifier[descriptor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[deploymentClassName] operator[SEP] operator[SEP] { Keyword[try] { identifier[log] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[INFO] , literal[String] , identifier[deploymentClassName] operator[SEP] operator[SEP] Keyword[return] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[deploymentClassName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[deploymentClassName] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
@SuppressWarnings("unchecked") public EList<IfcVertexBasedTextureMap> getTextureMaps() { return (EList<IfcVertexBasedTextureMap>) eGet(Ifc2x3tc1Package.Literals.IFC_TEXTURE_MAP__TEXTURE_MAPS, true); }
class class_name[name] begin[{] method[getTextureMaps, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_TEXTURE_MAP__TEXTURE_MAPS, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package.Literals, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=eGet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IfcVertexBasedTextureMap, sub_type=None))], dimensions=[], name=EList, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[EList] operator[<] identifier[IfcVertexBasedTextureMap] operator[>] identifier[getTextureMaps] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] operator[<] identifier[IfcVertexBasedTextureMap] operator[>] operator[SEP] identifier[eGet] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[Literals] operator[SEP] identifier[IFC_TEXTURE_MAP__TEXTURE_MAPS] , literal[boolean] operator[SEP] operator[SEP] }
private <T> void fireEvent(StorageChangeEvent.ChangeType changeType, StorageKey<T> key, T value, T oldVal, String data, String oldData) { UncaughtExceptionHandler ueh = GWT.getUncaughtExceptionHandler(); if (handlers != null && !handlers.isEmpty()) { T oldValue = oldVal; if (oldValue == null && oldData != null && StorageChangeEvent.Level.OBJECT.equals(eventLevel)) { try { oldValue = StorageUtils.deserialize(key.getClazz(), data); } catch (SerializationException e) { if (ueh != null) ueh.onUncaughtException(e); oldValue = null; } } final StorageChangeEvent event = new StorageChangeEvent(changeType, key, value, oldValue, data, oldData); for (StorageChangeEvent.Handler handler : handlers) { try{ handler.onStorageChange(event); }catch(Exception e){ if(ueh != null){ ueh.onUncaughtException(e); } } } } }
class class_name[name] begin[{] method[fireEvent, return_type[void], modifier[private], parameter[changeType, key, value, oldVal, data, oldData]] begin[{] local_variable[type[UncaughtExceptionHandler], ueh] if[binary_operation[binary_operation[member[.handlers], !=, literal[null]], &&, call[handlers.isEmpty, parameter[]]]] begin[{] local_variable[type[T], oldValue] if[binary_operation[binary_operation[binary_operation[member[.oldValue], ==, literal[null]], &&, binary_operation[member[.oldData], !=, literal[null]]], &&, call[StorageChangeEvent.Level.OBJECT.equals, parameter[member[.eventLevel]]]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=oldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClazz, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deserialize, postfix_operators=[], prefix_operators=[], qualifier=StorageUtils, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ueh, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onUncaughtException, postfix_operators=[], prefix_operators=[], qualifier=ueh, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=oldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SerializationException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] local_variable[type[StorageChangeEvent], event] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onStorageChange, postfix_operators=[], prefix_operators=[], qualifier=handler, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ueh, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onUncaughtException, postfix_operators=[], prefix_operators=[], qualifier=ueh, selectors=[], type_arguments=None), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=handlers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=handler)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StorageChangeEvent, sub_type=ReferenceType(arguments=None, dimensions=None, name=Handler, sub_type=None)))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] operator[<] identifier[T] operator[>] Keyword[void] identifier[fireEvent] operator[SEP] identifier[StorageChangeEvent] operator[SEP] identifier[ChangeType] identifier[changeType] , identifier[StorageKey] operator[<] identifier[T] operator[>] identifier[key] , identifier[T] identifier[value] , identifier[T] identifier[oldVal] , identifier[String] identifier[data] , identifier[String] identifier[oldData] operator[SEP] { identifier[UncaughtExceptionHandler] identifier[ueh] operator[=] identifier[GWT] operator[SEP] identifier[getUncaughtExceptionHandler] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[handlers] operator[!=] Other[null] operator[&&] operator[!] identifier[handlers] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[T] identifier[oldValue] operator[=] identifier[oldVal] operator[SEP] Keyword[if] operator[SEP] identifier[oldValue] operator[==] Other[null] operator[&&] identifier[oldData] operator[!=] Other[null] operator[&&] identifier[StorageChangeEvent] operator[SEP] identifier[Level] operator[SEP] identifier[OBJECT] operator[SEP] identifier[equals] operator[SEP] identifier[eventLevel] operator[SEP] operator[SEP] { Keyword[try] { identifier[oldValue] operator[=] identifier[StorageUtils] operator[SEP] identifier[deserialize] operator[SEP] identifier[key] operator[SEP] identifier[getClazz] operator[SEP] operator[SEP] , identifier[data] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SerializationException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[ueh] operator[!=] Other[null] operator[SEP] identifier[ueh] operator[SEP] identifier[onUncaughtException] operator[SEP] identifier[e] operator[SEP] operator[SEP] identifier[oldValue] operator[=] Other[null] operator[SEP] } } Keyword[final] identifier[StorageChangeEvent] identifier[event] operator[=] Keyword[new] identifier[StorageChangeEvent] operator[SEP] identifier[changeType] , identifier[key] , identifier[value] , identifier[oldValue] , identifier[data] , identifier[oldData] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[StorageChangeEvent] operator[SEP] identifier[Handler] identifier[handler] operator[:] identifier[handlers] operator[SEP] { Keyword[try] { identifier[handler] operator[SEP] identifier[onStorageChange] operator[SEP] identifier[event] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[ueh] operator[!=] Other[null] operator[SEP] { identifier[ueh] operator[SEP] identifier[onUncaughtException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } } } }
public List<EjbLocalRefType<WebFragmentType<T>>> getAllEjbLocalRef() { List<EjbLocalRefType<WebFragmentType<T>>> list = new ArrayList<EjbLocalRefType<WebFragmentType<T>>>(); List<Node> nodeList = childNode.get("ejb-local-ref"); for(Node node: nodeList) { EjbLocalRefType<WebFragmentType<T>> type = new EjbLocalRefTypeImpl<WebFragmentType<T>>(this, "ejb-local-ref", childNode, node); list.add(type); } return list; }
class class_name[name] begin[{] method[getAllEjbLocalRef, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], list] local_variable[type[List], nodeList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ejb-local-ref"), MemberReference(member=childNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=WebFragmentType, sub_type=None))], dimensions=None, name=EjbLocalRefTypeImpl, sub_type=None)), name=type)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=WebFragmentType, sub_type=None))], dimensions=[], name=EjbLocalRefType, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=nodeList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None))), label=None) return[member[.list]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[EjbLocalRefType] operator[<] identifier[WebFragmentType] operator[<] identifier[T] operator[>] operator[>] operator[>] identifier[getAllEjbLocalRef] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[EjbLocalRefType] operator[<] identifier[WebFragmentType] operator[<] identifier[T] operator[>] operator[>] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[EjbLocalRefType] operator[<] identifier[WebFragmentType] operator[<] identifier[T] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Node] operator[>] identifier[nodeList] operator[=] identifier[childNode] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Node] identifier[node] operator[:] identifier[nodeList] operator[SEP] { identifier[EjbLocalRefType] operator[<] identifier[WebFragmentType] operator[<] identifier[T] operator[>] operator[>] identifier[type] operator[=] Keyword[new] identifier[EjbLocalRefTypeImpl] operator[<] identifier[WebFragmentType] operator[<] identifier[T] operator[>] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[childNode] , identifier[node] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[type] operator[SEP] operator[SEP] } Keyword[return] identifier[list] operator[SEP] }
public Date getEndDate(Date startDate, long period) { long now = getNow().getTime(); long endDate = startDate.getTime() + period; if (now - period > endDate) { return new Date(endDate); } else { return null; } }
class class_name[name] begin[{] method[getEndDate, return_type[type[Date]], modifier[public], parameter[startDate, period]] begin[{] local_variable[type[long], now] local_variable[type[long], endDate] if[binary_operation[binary_operation[member[.now], -, member[.period]], >, member[.endDate]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=endDate, 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[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] identifier[Date] identifier[getEndDate] operator[SEP] identifier[Date] identifier[startDate] , Keyword[long] identifier[period] operator[SEP] { Keyword[long] identifier[now] operator[=] identifier[getNow] operator[SEP] operator[SEP] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[endDate] operator[=] identifier[startDate] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[+] identifier[period] operator[SEP] Keyword[if] operator[SEP] identifier[now] operator[-] identifier[period] operator[>] identifier[endDate] operator[SEP] { Keyword[return] Keyword[new] identifier[Date] operator[SEP] identifier[endDate] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
public <V> void observe(Callable<V> callable, CheckedConsumer<V> onSuccess) { service.executeAsynchronously(wrap(callable, onSuccess), config); }
class class_name[name] begin[{] method[observe, return_type[void], modifier[public], parameter[callable, onSuccess]] begin[{] call[service.executeAsynchronously, parameter[call[.wrap, parameter[member[.callable], member[.onSuccess]]], member[.config]]] end[}] END[}]
Keyword[public] operator[<] identifier[V] operator[>] Keyword[void] identifier[observe] operator[SEP] identifier[Callable] operator[<] identifier[V] operator[>] identifier[callable] , identifier[CheckedConsumer] operator[<] identifier[V] operator[>] identifier[onSuccess] operator[SEP] { identifier[service] operator[SEP] identifier[executeAsynchronously] operator[SEP] identifier[wrap] operator[SEP] identifier[callable] , identifier[onSuccess] operator[SEP] , identifier[config] operator[SEP] operator[SEP] }
public String convertIfcLightFixtureTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertIfcLightFixtureTypeEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=instanceValue, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] identifier[String] identifier[convertIfcLightFixtureTypeEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[instanceValue] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
void setStartTime(long startTime) { //Making the assumption of passed startTime to be a positive //long value explicit. if (startTime > 0) { this.startTime = startTime; } else { //Using String utils to get the stack trace. LOG.error("Trying to set illegal startTime for task : " + taskid + ".Stack trace is : " + StringUtils.stringifyException(new Exception())); } }
class class_name[name] begin[{] method[setStartTime, return_type[void], modifier[default], parameter[startTime]] begin[{] if[binary_operation[member[.startTime], >, literal[0]]] begin[{] assign[THIS[member[None.startTime]], member[.startTime]] else begin[{] call[LOG.error, parameter[binary_operation[binary_operation[binary_operation[literal["Trying to set illegal startTime for task : "], +, member[.taskid]], +, literal[".Stack trace is : "]], +, call[StringUtils.stringifyException, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None))]]]]] end[}] end[}] END[}]
Keyword[void] identifier[setStartTime] operator[SEP] Keyword[long] identifier[startTime] operator[SEP] { Keyword[if] operator[SEP] identifier[startTime] operator[>] Other[0] operator[SEP] { Keyword[this] operator[SEP] identifier[startTime] operator[=] identifier[startTime] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[taskid] operator[+] literal[String] operator[+] identifier[StringUtils] operator[SEP] identifier[stringifyException] operator[SEP] Keyword[new] identifier[Exception] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static int nextClearBit(long[] v, int start) { start = start < 0 ? 0 : start; int wordindex = start >>> LONG_LOG2_SIZE; if(wordindex >= v.length) { return -1; } // Initial word long cur = ~v[wordindex] & (LONG_ALL_BITS << start); for(;;) { if(cur != 0) { return (wordindex * Long.SIZE) + Long.numberOfTrailingZeros(cur); } if(++wordindex == v.length) { return -1; } cur = ~v[wordindex]; } }
class class_name[name] begin[{] method[nextClearBit, return_type[type[int]], modifier[public static], parameter[v, start]] begin[{] assign[member[.start], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), if_false=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))] local_variable[type[int], wordindex] if[binary_operation[member[.wordindex], >=, member[v.length]]] begin[{] return[literal[1]] else begin[{] None end[}] local_variable[type[long], cur] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cur, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=wordindex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SIZE, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[]), operator=*), operandr=MethodInvocation(arguments=[MemberReference(member=cur, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=numberOfTrailingZeros, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), operator=+), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=wordindex, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cur, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=v, postfix_operators=[], prefix_operators=['~'], qualifier=, selectors=[ArraySelector(index=MemberReference(member=wordindex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=None, init=None, update=None), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[nextClearBit] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[v] , Keyword[int] identifier[start] operator[SEP] { identifier[start] operator[=] identifier[start] operator[<] Other[0] operator[?] Other[0] operator[:] identifier[start] operator[SEP] Keyword[int] identifier[wordindex] operator[=] identifier[start] operator[>] operator[>] operator[>] identifier[LONG_LOG2_SIZE] operator[SEP] Keyword[if] operator[SEP] identifier[wordindex] operator[>=] identifier[v] operator[SEP] identifier[length] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[long] identifier[cur] operator[=] operator[~] identifier[v] operator[SEP] identifier[wordindex] operator[SEP] operator[&] operator[SEP] identifier[LONG_ALL_BITS] operator[<<] identifier[start] operator[SEP] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[cur] operator[!=] Other[0] operator[SEP] { Keyword[return] operator[SEP] identifier[wordindex] operator[*] identifier[Long] operator[SEP] identifier[SIZE] operator[SEP] operator[+] identifier[Long] operator[SEP] identifier[numberOfTrailingZeros] operator[SEP] identifier[cur] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[++] identifier[wordindex] operator[==] identifier[v] operator[SEP] identifier[length] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } identifier[cur] operator[=] operator[~] identifier[v] operator[SEP] identifier[wordindex] operator[SEP] operator[SEP] } }
private ObjectFactory getObjectFactory() throws IllegalAccessException { if (Env.INSTANCE.get(ObjectFactory.class.getName()).equals(CitrusObjectFactory.class.getName())) { return CitrusObjectFactory.instance(); } else if (Env.INSTANCE.get(ObjectFactory.class.getName()).equals(CitrusSpringObjectFactory.class.getName())) { return CitrusSpringObjectFactory.instance(); } return ObjectFactoryLoader.loadObjectFactory(new ResourceLoaderClassFinder(resourceLoader, Thread.currentThread().getContextClassLoader()), Env.INSTANCE.get(ObjectFactory.class.getName())); }
class class_name[name] begin[{] method[getObjectFactory, return_type[type[ObjectFactory]], modifier[private], parameter[]] begin[{] if[call[Env.INSTANCE.get, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ObjectFactory, sub_type=None))]]] begin[{] return[call[CitrusObjectFactory.instance, parameter[]]] else begin[{] if[call[Env.INSTANCE.get, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ObjectFactory, sub_type=None))]]] begin[{] return[call[CitrusSpringObjectFactory.instance, parameter[]]] else begin[{] None end[}] end[}] return[call[ObjectFactoryLoader.loadObjectFactory, parameter[ClassCreator(arguments=[MemberReference(member=resourceLoader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=getContextClassLoader, 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=ResourceLoaderClassFinder, sub_type=None)), call[Env.INSTANCE.get, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ObjectFactory, sub_type=None))]]]]] end[}] END[}]
Keyword[private] identifier[ObjectFactory] identifier[getObjectFactory] operator[SEP] operator[SEP] Keyword[throws] identifier[IllegalAccessException] { Keyword[if] operator[SEP] identifier[Env] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[get] operator[SEP] identifier[ObjectFactory] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[CitrusObjectFactory] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[CitrusObjectFactory] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Env] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[get] operator[SEP] identifier[ObjectFactory] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[CitrusSpringObjectFactory] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[CitrusSpringObjectFactory] operator[SEP] identifier[instance] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[ObjectFactoryLoader] operator[SEP] identifier[loadObjectFactory] operator[SEP] Keyword[new] identifier[ResourceLoaderClassFinder] operator[SEP] identifier[resourceLoader] , identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] , identifier[Env] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[get] operator[SEP] identifier[ObjectFactory] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public String parameters() { FllExporter exporter = new FllExporter(); String result = String.format("%s %s %s", Op.str(degree), exporter.toString(implication), exporter.toString(term)); return result; }
class class_name[name] begin[{] method[parameters, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[FllExporter], exporter] local_variable[type[String], result] return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[parameters] operator[SEP] operator[SEP] { identifier[FllExporter] identifier[exporter] operator[=] Keyword[new] identifier[FllExporter] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[result] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[Op] operator[SEP] identifier[str] operator[SEP] identifier[degree] operator[SEP] , identifier[exporter] operator[SEP] identifier[toString] operator[SEP] identifier[implication] operator[SEP] , identifier[exporter] operator[SEP] identifier[toString] operator[SEP] identifier[term] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static Vertex newE() { return new Vertex(Predefine.TAG_END, " ", new CoreDictionary.Attribute(Nature.end, Predefine.MAX_FREQUENCY / 10), CoreDictionary.getWordID(Predefine.TAG_END)); }
class class_name[name] begin[{] method[newE, return_type[type[Vertex]], modifier[public static], parameter[]] begin[{] return[ClassCreator(arguments=[MemberReference(member=TAG_END, postfix_operators=[], prefix_operators=[], qualifier=Predefine, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), ClassCreator(arguments=[MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=Nature, selectors=[]), BinaryOperation(operandl=MemberReference(member=MAX_FREQUENCY, postfix_operators=[], prefix_operators=[], qualifier=Predefine, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10), operator=/)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CoreDictionary, sub_type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))), MethodInvocation(arguments=[MemberReference(member=TAG_END, postfix_operators=[], prefix_operators=[], qualifier=Predefine, selectors=[])], member=getWordID, postfix_operators=[], prefix_operators=[], qualifier=CoreDictionary, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Vertex, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Vertex] identifier[newE] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Vertex] operator[SEP] identifier[Predefine] operator[SEP] identifier[TAG_END] , literal[String] , Keyword[new] identifier[CoreDictionary] operator[SEP] identifier[Attribute] operator[SEP] identifier[Nature] operator[SEP] identifier[end] , identifier[Predefine] operator[SEP] identifier[MAX_FREQUENCY] operator[/] Other[10] operator[SEP] , identifier[CoreDictionary] operator[SEP] identifier[getWordID] operator[SEP] identifier[Predefine] operator[SEP] identifier[TAG_END] operator[SEP] operator[SEP] operator[SEP] }
private static Charset getCharset(MediaType mediaType) { String charsetName = mediaType.getParameters().get(MediaType.CHARSET_PARAMETER); Charset charset; if (charsetName != null) { charset = Charset.forName(charsetName); } else { charset = DEFAULT_CHARSET; } return charset; }
class class_name[name] begin[{] method[getCharset, return_type[type[Charset]], modifier[private static], parameter[mediaType]] begin[{] local_variable[type[String], charsetName] local_variable[type[Charset], charset] if[binary_operation[member[.charsetName], !=, literal[null]]] begin[{] assign[member[.charset], call[Charset.forName, parameter[member[.charsetName]]]] else begin[{] assign[member[.charset], member[.DEFAULT_CHARSET]] end[}] return[member[.charset]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Charset] identifier[getCharset] operator[SEP] identifier[MediaType] identifier[mediaType] operator[SEP] { identifier[String] identifier[charsetName] operator[=] identifier[mediaType] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[MediaType] operator[SEP] identifier[CHARSET_PARAMETER] operator[SEP] operator[SEP] identifier[Charset] identifier[charset] operator[SEP] Keyword[if] operator[SEP] identifier[charsetName] operator[!=] Other[null] operator[SEP] { identifier[charset] operator[=] identifier[Charset] operator[SEP] identifier[forName] operator[SEP] identifier[charsetName] operator[SEP] operator[SEP] } Keyword[else] { identifier[charset] operator[=] identifier[DEFAULT_CHARSET] operator[SEP] } Keyword[return] identifier[charset] operator[SEP] }
protected void failed () { if (_buffer != null) { _buffer.delete(); _buffer = null; } _state = UNLOADED; _observers.apply(new ObserverList.ObserverOp<Observer>() { public boolean apply (Observer observer) { observer.clipFailed(ClipBuffer.this); return true; } }); _observers.clear(); }
class class_name[name] begin[{] method[failed, return_type[void], modifier[protected], parameter[]] begin[{] if[binary_operation[member[._buffer], !=, literal[null]]] begin[{] call[_buffer.delete, parameter[]] assign[member[._buffer], literal[null]] else begin[{] None end[}] assign[member[._state], member[.UNLOADED]] call[_observers.apply, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=ClipBuffer, selectors=[])], member=clipFailed, postfix_operators=[], prefix_operators=[], qualifier=observer, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], documentation=None, modifiers={'public'}, name=apply, parameters=[FormalParameter(annotations=[], modifiers=set(), name=observer, type=ReferenceType(arguments=None, dimensions=[], name=Observer, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ObserverList, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Observer, sub_type=None))], dimensions=None, name=ObserverOp, sub_type=None)))]] call[_observers.clear, parameter[]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[failed] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[_buffer] operator[!=] Other[null] operator[SEP] { identifier[_buffer] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] identifier[_buffer] operator[=] Other[null] operator[SEP] } identifier[_state] operator[=] identifier[UNLOADED] operator[SEP] identifier[_observers] operator[SEP] identifier[apply] operator[SEP] Keyword[new] identifier[ObserverList] operator[SEP] identifier[ObserverOp] operator[<] identifier[Observer] operator[>] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[apply] operator[SEP] identifier[Observer] identifier[observer] operator[SEP] { identifier[observer] operator[SEP] identifier[clipFailed] operator[SEP] identifier[ClipBuffer] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } operator[SEP] operator[SEP] identifier[_observers] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] }
@Override protected List<Runner> getChildren() { // one runner for each parameter List<Runner> runners = super.getChildren(); List<Runner> proxyRunners = new ArrayList<>(runners.size()); for (Runner runner : runners) { // if the next line fails then the internal of Parameterized.class has been updated since this works with JUnit 4.11 BlockJUnit4ClassRunner blockJUnit4ClassRunner = (BlockJUnit4ClassRunner) runner; Description description = blockJUnit4ClassRunner.getDescription(); String name = description.getDisplayName(); try { proxyRunners .add(new ProxyTestClassRunnerForParameters(mTestClass, mContainerUrl, name)); } catch (InitializationError e) { throw new RuntimeException("Could not create runner for paramamter " + name, e); } } return proxyRunners; }
class class_name[name] begin[{] method[getChildren, return_type[type[List]], modifier[protected], parameter[]] begin[{] local_variable[type[List], runners] local_variable[type[List], proxyRunners] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=runner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BlockJUnit4ClassRunner, sub_type=None)), name=blockJUnit4ClassRunner)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BlockJUnit4ClassRunner, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDescription, postfix_operators=[], prefix_operators=[], qualifier=blockJUnit4ClassRunner, selectors=[], type_arguments=None), name=description)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Description, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDisplayName, postfix_operators=[], prefix_operators=[], qualifier=description, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=mTestClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mContainerUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=ProxyTestClassRunnerForParameters, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=proxyRunners, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not create runner for paramamter "), operandr=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InitializationError']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=runners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=runner)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Runner, sub_type=None))), label=None) return[member[.proxyRunners]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[List] operator[<] identifier[Runner] operator[>] identifier[getChildren] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Runner] operator[>] identifier[runners] operator[=] Keyword[super] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Runner] operator[>] identifier[proxyRunners] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[runners] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Runner] identifier[runner] operator[:] identifier[runners] operator[SEP] { identifier[BlockJUnit4ClassRunner] identifier[blockJUnit4ClassRunner] operator[=] operator[SEP] identifier[BlockJUnit4ClassRunner] operator[SEP] identifier[runner] operator[SEP] identifier[Description] identifier[description] operator[=] identifier[blockJUnit4ClassRunner] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[name] operator[=] identifier[description] operator[SEP] identifier[getDisplayName] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[proxyRunners] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[ProxyTestClassRunnerForParameters] operator[SEP] identifier[mTestClass] , identifier[mContainerUrl] , identifier[name] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InitializationError] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[name] , identifier[e] operator[SEP] operator[SEP] } } Keyword[return] identifier[proxyRunners] operator[SEP] }
public void setPrimaryButtonHoverColor(String color) throws HelloSignException { if (white_labeling_options == null) { white_labeling_options = new WhiteLabelingOptions(); } white_labeling_options.setPrimaryButtonHoverColor(color); }
class class_name[name] begin[{] method[setPrimaryButtonHoverColor, return_type[void], modifier[public], parameter[color]] begin[{] if[binary_operation[member[.white_labeling_options], ==, literal[null]]] begin[{] assign[member[.white_labeling_options], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WhiteLabelingOptions, sub_type=None))] else begin[{] None end[}] call[white_labeling_options.setPrimaryButtonHoverColor, parameter[member[.color]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setPrimaryButtonHoverColor] operator[SEP] identifier[String] identifier[color] operator[SEP] Keyword[throws] identifier[HelloSignException] { Keyword[if] operator[SEP] identifier[white_labeling_options] operator[==] Other[null] operator[SEP] { identifier[white_labeling_options] operator[=] Keyword[new] identifier[WhiteLabelingOptions] operator[SEP] operator[SEP] operator[SEP] } identifier[white_labeling_options] operator[SEP] identifier[setPrimaryButtonHoverColor] operator[SEP] identifier[color] operator[SEP] operator[SEP] }
@Override public String getTitle(String languageId, boolean useDefault) { return _cpAttachmentFileEntry.getTitle(languageId, useDefault); }
class class_name[name] begin[{] method[getTitle, return_type[type[String]], modifier[public], parameter[languageId, useDefault]] begin[{] return[call[_cpAttachmentFileEntry.getTitle, parameter[member[.languageId], member[.useDefault]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[getTitle] operator[SEP] identifier[String] identifier[languageId] , Keyword[boolean] identifier[useDefault] operator[SEP] { Keyword[return] identifier[_cpAttachmentFileEntry] operator[SEP] identifier[getTitle] operator[SEP] identifier[languageId] , identifier[useDefault] operator[SEP] operator[SEP] }
public void zrevrank(final String key, final String member) { zrevrank(SafeEncoder.encode(key), SafeEncoder.encode(member)); }
class class_name[name] begin[{] method[zrevrank, return_type[void], modifier[public], parameter[key, member]] begin[{] call[.zrevrank, parameter[call[SafeEncoder.encode, parameter[member[.key]]], call[SafeEncoder.encode, parameter[member[.member]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[zrevrank] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] identifier[String] identifier[member] operator[SEP] { identifier[zrevrank] operator[SEP] identifier[SafeEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[key] operator[SEP] , identifier[SafeEncoder] operator[SEP] identifier[encode] operator[SEP] identifier[member] operator[SEP] operator[SEP] operator[SEP] }
protected void collectHeaderParameters(HttpRequest request, HttpParameters out) { HttpParameters headerParams = OAuth.oauthHeaderToParamsMap(request.getHeader(OAuth.HTTP_AUTHORIZATION_HEADER)); out.putAll(headerParams, false); }
class class_name[name] begin[{] method[collectHeaderParameters, return_type[void], modifier[protected], parameter[request, out]] begin[{] local_variable[type[HttpParameters], headerParams] call[out.putAll, parameter[member[.headerParams], literal[false]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[collectHeaderParameters] operator[SEP] identifier[HttpRequest] identifier[request] , identifier[HttpParameters] identifier[out] operator[SEP] { identifier[HttpParameters] identifier[headerParams] operator[=] identifier[OAuth] operator[SEP] identifier[oauthHeaderToParamsMap] operator[SEP] identifier[request] operator[SEP] identifier[getHeader] operator[SEP] identifier[OAuth] operator[SEP] identifier[HTTP_AUTHORIZATION_HEADER] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[putAll] operator[SEP] identifier[headerParams] , literal[boolean] operator[SEP] operator[SEP] }
public static Coordinate getCenterPoint(Bbox bbox) { double centerX = (bbox.getWidth() == 0 ? bbox.getX() : bbox.getX() + bbox.getWidth() / 2); double centerY = (bbox.getHeight() == 0 ? bbox.getY() : bbox.getY() + bbox.getHeight() / 2); return new Coordinate(centerX, centerY); }
class class_name[name] begin[{] method[getCenterPoint, return_type[type[Coordinate]], modifier[public static], parameter[bbox]] begin[{] local_variable[type[double], centerX] local_variable[type[double], centerY] return[ClassCreator(arguments=[MemberReference(member=centerX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=centerY, 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[}] END[}]
Keyword[public] Keyword[static] identifier[Coordinate] identifier[getCenterPoint] operator[SEP] identifier[Bbox] identifier[bbox] operator[SEP] { Keyword[double] identifier[centerX] operator[=] operator[SEP] identifier[bbox] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[==] Other[0] operator[?] identifier[bbox] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[:] identifier[bbox] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[+] identifier[bbox] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[/] Other[2] operator[SEP] operator[SEP] Keyword[double] identifier[centerY] operator[=] operator[SEP] identifier[bbox] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[==] Other[0] operator[?] identifier[bbox] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[:] identifier[bbox] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[+] identifier[bbox] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[/] Other[2] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Coordinate] operator[SEP] identifier[centerX] , identifier[centerY] operator[SEP] operator[SEP] }
public static boolean copyMerge(FileSystem srcFS, Path srcDir, FileSystem dstFS, Path dstFile, boolean deleteSource, Configuration conf, String addString) throws IOException { dstFile = checkDest(srcDir.getName(), dstFS, dstFile, false); if (!srcFS.getFileStatus(srcDir).isDir()) return false; OutputStream out = dstFS.create(dstFile); try { FileStatus contents[] = srcFS.listStatus(srcDir); for (int i = 0; i < contents.length; i++) { if (!contents[i].isDir()) { InputStream in = srcFS.open(contents[i].getPath()); try { IOUtils.copyBytes(in, out, conf, false); if (addString!=null) out.write(addString.getBytes("UTF-8")); } finally { in.close(); } } } } finally { out.close(); } if (deleteSource) { return srcFS.delete(srcDir, true); } else { return true; } }
class class_name[name] begin[{] method[copyMerge, return_type[type[boolean]], modifier[public static], parameter[srcFS, srcDir, dstFS, dstFile, deleteSource, conf, addString]] begin[{] assign[member[.dstFile], call[.checkDest, parameter[call[srcDir.getName, parameter[]], member[.dstFS], member[.dstFile], literal[false]]]] if[call[srcFS.getFileStatus, parameter[member[.srcDir]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[OutputStream], out] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[None], initializer=MethodInvocation(arguments=[MemberReference(member=srcDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=listStatus, postfix_operators=[], prefix_operators=[], qualifier=srcFS, selectors=[], type_arguments=None), name=contents)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileStatus, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=contents, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=isDir, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=contents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=open, postfix_operators=[], prefix_operators=[], qualifier=srcFS, selectors=[], type_arguments=None), name=in)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=copyBytes, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=addString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF-8")], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=addString, selectors=[], type_arguments=None)], member=write, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None))], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), label=None)], label=None, resources=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=contents, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)], label=None, resources=None) if[member[.deleteSource]] begin[{] return[call[srcFS.delete, parameter[member[.srcDir], literal[true]]]] else begin[{] return[literal[true]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[copyMerge] operator[SEP] identifier[FileSystem] identifier[srcFS] , identifier[Path] identifier[srcDir] , identifier[FileSystem] identifier[dstFS] , identifier[Path] identifier[dstFile] , Keyword[boolean] identifier[deleteSource] , identifier[Configuration] identifier[conf] , identifier[String] identifier[addString] operator[SEP] Keyword[throws] identifier[IOException] { identifier[dstFile] operator[=] identifier[checkDest] operator[SEP] identifier[srcDir] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[dstFS] , identifier[dstFile] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[srcFS] operator[SEP] identifier[getFileStatus] operator[SEP] identifier[srcDir] operator[SEP] operator[SEP] identifier[isDir] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[OutputStream] identifier[out] operator[=] identifier[dstFS] operator[SEP] identifier[create] operator[SEP] identifier[dstFile] operator[SEP] operator[SEP] Keyword[try] { identifier[FileStatus] identifier[contents] operator[SEP] operator[SEP] operator[=] identifier[srcFS] operator[SEP] identifier[listStatus] operator[SEP] identifier[srcDir] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[contents] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[contents] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[isDir] operator[SEP] operator[SEP] operator[SEP] { identifier[InputStream] identifier[in] operator[=] identifier[srcFS] operator[SEP] identifier[open] operator[SEP] identifier[contents] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[IOUtils] operator[SEP] identifier[copyBytes] operator[SEP] identifier[in] , identifier[out] , identifier[conf] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[addString] operator[!=] Other[null] operator[SEP] identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[addString] operator[SEP] identifier[getBytes] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[in] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[finally] { identifier[out] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[deleteSource] operator[SEP] { Keyword[return] identifier[srcFS] operator[SEP] identifier[delete] operator[SEP] identifier[srcDir] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
private void materializeChildren(ElementBase parent, LayoutElement node, boolean ignoreInternal) { for (LayoutNode child : node.getChildren()) { PluginDefinition def = child.getDefinition(); ElementBase element = ignoreInternal && def.isInternal() ? null : createElement(parent, child); if (element != null) { materializeChildren(element, (LayoutElement) child, false); } } for (LayoutTrigger trigger : node.getTriggers()) { ElementTrigger trg = new ElementTrigger(); trg.addTarget((ElementUI) parent); createElement(trg, trigger.getChild(LayoutTriggerCondition.class)); createElement(trg, trigger.getChild(LayoutTriggerAction.class)); ((ElementUI) parent).addTrigger(trg); } }
class class_name[name] begin[{] method[materializeChildren, return_type[void], modifier[private], parameter[parent, node, ignoreInternal]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDefinition, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None), name=def)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PluginDefinition, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=ignoreInternal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isInternal, postfix_operators=[], prefix_operators=[], qualifier=def, selectors=[], type_arguments=None), operator=&&), if_false=MethodInvocation(arguments=[MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), name=element)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ElementBase, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LayoutElement, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=materializeChildren, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getChildren, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=child)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LayoutNode, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ElementTrigger, sub_type=None)), name=trg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ElementTrigger, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ElementUI, sub_type=None))], member=addTarget, postfix_operators=[], prefix_operators=[], qualifier=trg, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=trg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LayoutTriggerCondition, sub_type=None))], member=getChild, postfix_operators=[], prefix_operators=[], qualifier=trigger, selectors=[], type_arguments=None)], member=createElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=trg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LayoutTriggerAction, sub_type=None))], member=getChild, postfix_operators=[], prefix_operators=[], qualifier=trigger, selectors=[], type_arguments=None)], member=createElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Cast(expression=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ElementUI, sub_type=None)), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getTriggers, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=trigger)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LayoutTrigger, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[materializeChildren] operator[SEP] identifier[ElementBase] identifier[parent] , identifier[LayoutElement] identifier[node] , Keyword[boolean] identifier[ignoreInternal] operator[SEP] { Keyword[for] operator[SEP] identifier[LayoutNode] identifier[child] operator[:] identifier[node] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] { identifier[PluginDefinition] identifier[def] operator[=] identifier[child] operator[SEP] identifier[getDefinition] operator[SEP] operator[SEP] operator[SEP] identifier[ElementBase] identifier[element] operator[=] identifier[ignoreInternal] operator[&&] identifier[def] operator[SEP] identifier[isInternal] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[createElement] operator[SEP] identifier[parent] , identifier[child] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[element] operator[!=] Other[null] operator[SEP] { identifier[materializeChildren] operator[SEP] identifier[element] , operator[SEP] identifier[LayoutElement] operator[SEP] identifier[child] , literal[boolean] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[LayoutTrigger] identifier[trigger] operator[:] identifier[node] operator[SEP] identifier[getTriggers] operator[SEP] operator[SEP] operator[SEP] { identifier[ElementTrigger] identifier[trg] operator[=] Keyword[new] identifier[ElementTrigger] operator[SEP] operator[SEP] operator[SEP] identifier[trg] operator[SEP] identifier[addTarget] operator[SEP] operator[SEP] identifier[ElementUI] operator[SEP] identifier[parent] operator[SEP] operator[SEP] identifier[createElement] operator[SEP] identifier[trg] , identifier[trigger] operator[SEP] identifier[getChild] operator[SEP] identifier[LayoutTriggerCondition] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] identifier[createElement] operator[SEP] identifier[trg] , identifier[trigger] operator[SEP] identifier[getChild] operator[SEP] identifier[LayoutTriggerAction] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ElementUI] operator[SEP] identifier[parent] operator[SEP] operator[SEP] identifier[addTrigger] operator[SEP] identifier[trg] operator[SEP] operator[SEP] } }
private void decreaseCache(I_CmsLruCacheObject theCacheObject) { // notify the object that it was now removed from the cache //theCacheObject.notify(); theCacheObject.removeFromLruCache(); // set the list pointers to null theCacheObject.setNextLruObject(null); theCacheObject.setPreviousLruObject(null); // update the cache stats. m_objectCosts -= theCacheObject.getLruCacheCosts(); m_objectCount--; }
class class_name[name] begin[{] method[decreaseCache, return_type[void], modifier[private], parameter[theCacheObject]] begin[{] call[theCacheObject.removeFromLruCache, parameter[]] call[theCacheObject.setNextLruObject, parameter[literal[null]]] call[theCacheObject.setPreviousLruObject, parameter[literal[null]]] assign[member[.m_objectCosts], call[theCacheObject.getLruCacheCosts, parameter[]]] member[.m_objectCount] end[}] END[}]
Keyword[private] Keyword[void] identifier[decreaseCache] operator[SEP] identifier[I_CmsLruCacheObject] identifier[theCacheObject] operator[SEP] { identifier[theCacheObject] operator[SEP] identifier[removeFromLruCache] operator[SEP] operator[SEP] operator[SEP] identifier[theCacheObject] operator[SEP] identifier[setNextLruObject] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[theCacheObject] operator[SEP] identifier[setPreviousLruObject] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[m_objectCosts] operator[-=] identifier[theCacheObject] operator[SEP] identifier[getLruCacheCosts] operator[SEP] operator[SEP] operator[SEP] identifier[m_objectCount] operator[--] operator[SEP] }
public DrawableParent getDrawableParentForIndex(int index) { Preconditions.checkArgument(index >= 0); Preconditions.checkArgument(index < mDrawableParents.length); if (mDrawableParents[index] == null) { mDrawableParents[index] = createDrawableParentForIndex(index); } return mDrawableParents[index]; }
class class_name[name] begin[{] method[getDrawableParentForIndex, return_type[type[DrawableParent]], modifier[public], parameter[index]] begin[{] call[Preconditions.checkArgument, parameter[binary_operation[member[.index], >=, literal[0]]]] call[Preconditions.checkArgument, parameter[binary_operation[member[.index], <, member[mDrawableParents.length]]]] if[binary_operation[member[.mDrawableParents], ==, literal[null]]] begin[{] assign[member[.mDrawableParents], call[.createDrawableParentForIndex, parameter[member[.index]]]] else begin[{] None end[}] return[member[.mDrawableParents]] end[}] END[}]
Keyword[public] identifier[DrawableParent] identifier[getDrawableParentForIndex] operator[SEP] Keyword[int] identifier[index] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[index] operator[>=] Other[0] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[index] operator[<] identifier[mDrawableParents] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mDrawableParents] operator[SEP] identifier[index] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[mDrawableParents] operator[SEP] identifier[index] operator[SEP] operator[=] identifier[createDrawableParentForIndex] operator[SEP] identifier[index] operator[SEP] operator[SEP] } Keyword[return] identifier[mDrawableParents] operator[SEP] identifier[index] operator[SEP] operator[SEP] }
public List<Friend> getPendingFriendRequests() { return getFriends(new Filter<Friend>() { public boolean accept(Friend friend) { return friend.getFriendStatus() == FriendStatus.ADD_REQUEST_PENDING; } }); }
class class_name[name] begin[{] method[getPendingFriendRequests, return_type[type[List]], modifier[public], parameter[]] begin[{] return[call[.getFriends, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getFriendStatus, postfix_operators=[], prefix_operators=[], qualifier=friend, selectors=[], type_arguments=None), operandr=MemberReference(member=ADD_REQUEST_PENDING, postfix_operators=[], prefix_operators=[], qualifier=FriendStatus, selectors=[]), operator===), label=None)], documentation=None, modifiers={'public'}, name=accept, parameters=[FormalParameter(annotations=[], modifiers=set(), name=friend, type=ReferenceType(arguments=None, dimensions=[], name=Friend, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Friend, sub_type=None))], dimensions=None, name=Filter, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Friend] operator[>] identifier[getPendingFriendRequests] operator[SEP] operator[SEP] { Keyword[return] identifier[getFriends] operator[SEP] Keyword[new] identifier[Filter] operator[<] identifier[Friend] operator[>] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[Friend] identifier[friend] operator[SEP] { Keyword[return] identifier[friend] operator[SEP] identifier[getFriendStatus] operator[SEP] operator[SEP] operator[==] identifier[FriendStatus] operator[SEP] identifier[ADD_REQUEST_PENDING] operator[SEP] } } operator[SEP] operator[SEP] }
public final ListTopicSubscriptionsPagedResponse listTopicSubscriptions(ProjectTopicName topic) { ListTopicSubscriptionsRequest request = ListTopicSubscriptionsRequest.newBuilder() .setTopic(topic == null ? null : topic.toString()) .build(); return listTopicSubscriptions(request); }
class class_name[name] begin[{] method[listTopicSubscriptions, return_type[type[ListTopicSubscriptionsPagedResponse]], modifier[final public], parameter[topic]] begin[{] local_variable[type[ListTopicSubscriptionsRequest], request] return[call[.listTopicSubscriptions, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[ListTopicSubscriptionsPagedResponse] identifier[listTopicSubscriptions] operator[SEP] identifier[ProjectTopicName] identifier[topic] operator[SEP] { identifier[ListTopicSubscriptionsRequest] identifier[request] operator[=] identifier[ListTopicSubscriptionsRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setTopic] operator[SEP] identifier[topic] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[topic] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[listTopicSubscriptions] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
static boolean isStale(OmemoDevice userDevice, OmemoDevice subject, Date lastReceipt, int maxAgeHours) { if (userDevice.equals(subject)) { return false; } if (lastReceipt == null) { return false; } long maxAgeMillis = MILLIS_PER_HOUR * maxAgeHours; Date now = new Date(); return now.getTime() - lastReceipt.getTime() > maxAgeMillis; }
class class_name[name] begin[{] method[isStale, return_type[type[boolean]], modifier[static], parameter[userDevice, subject, lastReceipt, maxAgeHours]] begin[{] if[call[userDevice.equals, parameter[member[.subject]]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[member[.lastReceipt], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[long], maxAgeMillis] local_variable[type[Date], now] return[binary_operation[binary_operation[call[now.getTime, parameter[]], -, call[lastReceipt.getTime, parameter[]]], >, member[.maxAgeMillis]]] end[}] END[}]
Keyword[static] Keyword[boolean] identifier[isStale] operator[SEP] identifier[OmemoDevice] identifier[userDevice] , identifier[OmemoDevice] identifier[subject] , identifier[Date] identifier[lastReceipt] , Keyword[int] identifier[maxAgeHours] operator[SEP] { Keyword[if] operator[SEP] identifier[userDevice] operator[SEP] identifier[equals] operator[SEP] identifier[subject] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[lastReceipt] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[long] identifier[maxAgeMillis] operator[=] identifier[MILLIS_PER_HOUR] operator[*] identifier[maxAgeHours] operator[SEP] identifier[Date] identifier[now] operator[=] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[now] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[-] identifier[lastReceipt] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[>] identifier[maxAgeMillis] operator[SEP] }
static void checkDeprecatedDirective(List<GraphQLError> errors, Directive directive, Supplier<InvalidDeprecationDirectiveError> errorSupplier) { if ("deprecated".equals(directive.getName())) { // it can have zero args List<Argument> arguments = directive.getArguments(); if (arguments.size() == 0) { return; } // but if has more than it must have 1 called "reason" of type StringValue if (arguments.size() == 1) { Argument arg = arguments.get(0); if ("reason".equals(arg.getName()) && arg.getValue() instanceof StringValue) { return; } } // not valid errors.add(errorSupplier.get()); } }
class class_name[name] begin[{] method[checkDeprecatedDirective, return_type[void], modifier[static], parameter[errors, directive, errorSupplier]] begin[{] if[literal["deprecated"]] begin[{] local_variable[type[List], arguments] if[binary_operation[call[arguments.size, parameter[]], ==, literal[0]]] begin[{] return[None] else begin[{] None end[}] if[binary_operation[call[arguments.size, parameter[]], ==, literal[1]]] begin[{] local_variable[type[Argument], arg] if[binary_operation[literal["reason"], &&, binary_operation[call[arg.getValue, parameter[]], instanceof, type[StringValue]]]] begin[{] return[None] else begin[{] None end[}] else begin[{] None end[}] call[errors.add, parameter[call[errorSupplier.get, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[static] Keyword[void] identifier[checkDeprecatedDirective] operator[SEP] identifier[List] operator[<] identifier[GraphQLError] operator[>] identifier[errors] , identifier[Directive] identifier[directive] , identifier[Supplier] operator[<] identifier[InvalidDeprecationDirectiveError] operator[>] identifier[errorSupplier] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[directive] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[Argument] operator[>] identifier[arguments] operator[=] identifier[directive] operator[SEP] identifier[getArguments] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[arguments] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[arguments] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[Argument] identifier[arg] operator[=] identifier[arguments] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[arg] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[arg] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] Keyword[instanceof] identifier[StringValue] operator[SEP] { Keyword[return] operator[SEP] } } identifier[errors] operator[SEP] identifier[add] operator[SEP] identifier[errorSupplier] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public static MapGeometry jsonToGeometry(String json) { MapGeometry geom = OperatorImportFromJson.local().execute(Geometry.Type.Unknown, json); return geom; }
class class_name[name] begin[{] method[jsonToGeometry, return_type[type[MapGeometry]], modifier[public static], parameter[json]] begin[{] local_variable[type[MapGeometry], geom] return[member[.geom]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MapGeometry] identifier[jsonToGeometry] operator[SEP] identifier[String] identifier[json] operator[SEP] { identifier[MapGeometry] identifier[geom] operator[=] identifier[OperatorImportFromJson] operator[SEP] identifier[local] operator[SEP] operator[SEP] operator[SEP] identifier[execute] operator[SEP] identifier[Geometry] operator[SEP] identifier[Type] operator[SEP] identifier[Unknown] , identifier[json] operator[SEP] operator[SEP] Keyword[return] identifier[geom] operator[SEP] }
public static List<RemoteRepository> getStandardRemoteRepositories() { final List<RemoteRepository> remoteRepositories = new ArrayList<>(); remoteRepositories.add(new RemoteRepository.Builder("central","default","https://central.maven.org/maven2/").build()); remoteRepositories.add(new RemoteRepository.Builder("jboss-community-repository", "default", "https://repository.jboss.org/nexus/content/groups/public/").build()); return remoteRepositories; }
class class_name[name] begin[{] method[getStandardRemoteRepositories, return_type[type[List]], modifier[public static], parameter[]] begin[{] local_variable[type[List], remoteRepositories] call[remoteRepositories.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="central"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="default"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="https://central.maven.org/maven2/")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=RemoteRepository, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None)))]] call[remoteRepositories.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="jboss-community-repository"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="default"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="https://repository.jboss.org/nexus/content/groups/public/")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=RemoteRepository, sub_type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None)))]] return[member[.remoteRepositories]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[RemoteRepository] operator[>] identifier[getStandardRemoteRepositories] operator[SEP] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[RemoteRepository] operator[>] identifier[remoteRepositories] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[remoteRepositories] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[RemoteRepository] operator[SEP] identifier[Builder] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[remoteRepositories] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[RemoteRepository] operator[SEP] identifier[Builder] operator[SEP] literal[String] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[remoteRepositories] operator[SEP] }
public String determineVirtualHost() { if (CollectionUtils.isEmpty(this.parsedAddresses)) { return getVirtualHost(); } Address address = this.parsedAddresses.get(0); return (address.virtualHost != null) ? address.virtualHost : getVirtualHost(); }
class class_name[name] begin[{] method[determineVirtualHost, return_type[type[String]], modifier[public], parameter[]] begin[{] if[call[CollectionUtils.isEmpty, parameter[THIS[member[None.parsedAddresses]]]]] begin[{] return[call[.getVirtualHost, parameter[]]] else begin[{] None end[}] local_variable[type[Address], address] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=virtualHost, postfix_operators=[], prefix_operators=[], qualifier=address, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[], member=getVirtualHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_true=MemberReference(member=virtualHost, postfix_operators=[], prefix_operators=[], qualifier=address, selectors=[]))] end[}] END[}]
Keyword[public] identifier[String] identifier[determineVirtualHost] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[CollectionUtils] operator[SEP] identifier[isEmpty] operator[SEP] Keyword[this] operator[SEP] identifier[parsedAddresses] operator[SEP] operator[SEP] { Keyword[return] identifier[getVirtualHost] operator[SEP] operator[SEP] operator[SEP] } identifier[Address] identifier[address] operator[=] Keyword[this] operator[SEP] identifier[parsedAddresses] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[address] operator[SEP] identifier[virtualHost] operator[!=] Other[null] operator[SEP] operator[?] identifier[address] operator[SEP] identifier[virtualHost] operator[:] identifier[getVirtualHost] operator[SEP] operator[SEP] operator[SEP] }
private boolean ready(Build.Task task) { // FIXME: this is not a great solution in the long run for several reasons. // Firstly, its possible that a given source will be rebuilt in the near future // as a result of some other task and we should be waiting for that. Path.Entry<?> target = task.getTarget(); for(Path.Entry<?> s : task.getSources()) { if(s.lastModified() > target.lastModified()) { return true; } } return false; }
class class_name[name] begin[{] method[ready, return_type[type[boolean]], modifier[private], parameter[task]] begin[{] local_variable[type[Path], target] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=lastModified, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=lastModified, postfix_operators=[], prefix_operators=[], qualifier=target, selectors=[], type_arguments=None), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getSources, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Path, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=None, name=Entry, sub_type=None)))), label=None) return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[ready] operator[SEP] identifier[Build] operator[SEP] identifier[Task] identifier[task] operator[SEP] { identifier[Path] operator[SEP] identifier[Entry] operator[<] operator[?] operator[>] identifier[target] operator[=] identifier[task] operator[SEP] identifier[getTarget] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Path] operator[SEP] identifier[Entry] operator[<] operator[?] operator[>] identifier[s] operator[:] identifier[task] operator[SEP] identifier[getSources] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[SEP] identifier[lastModified] operator[SEP] operator[SEP] operator[>] identifier[target] operator[SEP] identifier[lastModified] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public static IPath getGlobalSARLOutputPath() { final Injector injector = LangActivator.getInstance().getInjector(LangActivator.IO_SARL_LANG_SARL); final IOutputConfigurationProvider configurationProvider = injector.getInstance(IOutputConfigurationProvider.class); final OutputConfiguration config = Iterables.find( configurationProvider.getOutputConfigurations(), it -> Objects.equals(it.getName(), IFileSystemAccess.DEFAULT_OUTPUT)); if (config != null) { final String path = config.getOutputDirectory(); if (!Strings.isNullOrEmpty(path)) { final IPath pathObject = Path.fromOSString(path); if (pathObject != null) { return pathObject; } } } throw new IllegalStateException("No global preferences found for SARL."); //$NON-NLS-1$ }
class class_name[name] begin[{] method[getGlobalSARLOutputPath, return_type[type[IPath]], modifier[public static], parameter[]] begin[{] local_variable[type[Injector], injector] local_variable[type[IOutputConfigurationProvider], configurationProvider] local_variable[type[OutputConfiguration], config] if[binary_operation[member[.config], !=, literal[null]]] begin[{] local_variable[type[String], path] if[call[Strings.isNullOrEmpty, parameter[member[.path]]]] begin[{] local_variable[type[IPath], pathObject] if[binary_operation[member[.pathObject], !=, literal[null]]] begin[{] return[member[.pathObject]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No global preferences found for SARL.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[IPath] identifier[getGlobalSARLOutputPath] operator[SEP] operator[SEP] { Keyword[final] identifier[Injector] identifier[injector] operator[=] identifier[LangActivator] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getInjector] operator[SEP] identifier[LangActivator] operator[SEP] identifier[IO_SARL_LANG_SARL] operator[SEP] operator[SEP] Keyword[final] identifier[IOutputConfigurationProvider] identifier[configurationProvider] operator[=] identifier[injector] operator[SEP] identifier[getInstance] operator[SEP] identifier[IOutputConfigurationProvider] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[final] identifier[OutputConfiguration] identifier[config] operator[=] identifier[Iterables] operator[SEP] identifier[find] operator[SEP] identifier[configurationProvider] operator[SEP] identifier[getOutputConfigurations] operator[SEP] operator[SEP] , identifier[it] operator[->] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[it] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[IFileSystemAccess] operator[SEP] identifier[DEFAULT_OUTPUT] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[config] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[String] identifier[path] operator[=] identifier[config] operator[SEP] identifier[getOutputDirectory] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[path] operator[SEP] operator[SEP] { Keyword[final] identifier[IPath] identifier[pathObject] operator[=] identifier[Path] operator[SEP] identifier[fromOSString] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pathObject] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[pathObject] operator[SEP] } } } Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public FDistort input( ImageBase input ) { if( this.input == null || this.input.width != input.width || this.input.height != input.height ) { distorter = null; } this.input = input; inputType = input.getImageType(); return this; }
class class_name[name] begin[{] method[input, return_type[type[FDistort]], modifier[public], parameter[input]] begin[{] if[binary_operation[binary_operation[binary_operation[THIS[member[None.input]], ==, literal[null]], ||, binary_operation[THIS[member[None.input]member[None.width]], !=, member[input.width]]], ||, binary_operation[THIS[member[None.input]member[None.height]], !=, member[input.height]]]] begin[{] assign[member[.distorter], literal[null]] else begin[{] None end[}] assign[THIS[member[None.input]], member[.input]] assign[member[.inputType], call[input.getImageType, parameter[]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[FDistort] identifier[input] operator[SEP] identifier[ImageBase] identifier[input] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[input] operator[==] Other[null] operator[||] Keyword[this] operator[SEP] identifier[input] operator[SEP] identifier[width] operator[!=] identifier[input] operator[SEP] identifier[width] operator[||] Keyword[this] operator[SEP] identifier[input] operator[SEP] identifier[height] operator[!=] identifier[input] operator[SEP] identifier[height] operator[SEP] { identifier[distorter] operator[=] Other[null] operator[SEP] } Keyword[this] operator[SEP] identifier[input] operator[=] identifier[input] operator[SEP] identifier[inputType] operator[=] identifier[input] operator[SEP] identifier[getImageType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
protected boolean isSwappableData(Object obj) { if (obj != null && (obj instanceof Serializable || obj instanceof Externalizable)) { return true; } return false; }
class class_name[name] begin[{] method[isSwappableData, return_type[type[boolean]], modifier[protected], parameter[obj]] begin[{] if[binary_operation[binary_operation[member[.obj], !=, literal[null]], &&, binary_operation[binary_operation[member[.obj], instanceof, type[Serializable]], ||, binary_operation[member[.obj], instanceof, type[Externalizable]]]]] begin[{] return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[isSwappableData] operator[SEP] identifier[Object] identifier[obj] operator[SEP] { Keyword[if] operator[SEP] identifier[obj] operator[!=] Other[null] operator[&&] operator[SEP] identifier[obj] Keyword[instanceof] identifier[Serializable] operator[||] identifier[obj] Keyword[instanceof] identifier[Externalizable] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static <T extends Number> WindowOver<T> sum(Expression<T> expr) { return new WindowOver<T>(expr.getType(), Ops.AggOps.SUM_AGG, expr); }
class class_name[name] begin[{] method[sum, return_type[type[WindowOver]], modifier[public static], parameter[expr]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=expr, selectors=[], type_arguments=None), MemberReference(member=SUM_AGG, postfix_operators=[], prefix_operators=[], qualifier=Ops.AggOps, selectors=[]), MemberReference(member=expr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=WindowOver, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Number] operator[>] identifier[WindowOver] operator[<] identifier[T] operator[>] identifier[sum] operator[SEP] identifier[Expression] operator[<] identifier[T] operator[>] identifier[expr] operator[SEP] { Keyword[return] Keyword[new] identifier[WindowOver] operator[<] identifier[T] operator[>] operator[SEP] identifier[expr] operator[SEP] identifier[getType] operator[SEP] operator[SEP] , identifier[Ops] operator[SEP] identifier[AggOps] operator[SEP] identifier[SUM_AGG] , identifier[expr] operator[SEP] operator[SEP] }
public final void setItsCatalog(final CatalogGs pCatalog) { this.itsCatalog = pCatalog; if (this.itsId == null) { this.itsId = new SubcatalogsCatalogsGsId(); } this.itsId.setItsCatalog(this.itsCatalog); }
class class_name[name] begin[{] method[setItsCatalog, return_type[void], modifier[final public], parameter[pCatalog]] begin[{] assign[THIS[member[None.itsCatalog]], member[.pCatalog]] if[binary_operation[THIS[member[None.itsId]], ==, literal[null]]] begin[{] assign[THIS[member[None.itsId]], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SubcatalogsCatalogsGsId, sub_type=None))] else begin[{] None end[}] THIS[member[None.itsId]call[None.setItsCatalog, parameter[THIS[member[None.itsCatalog]]]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[setItsCatalog] operator[SEP] Keyword[final] identifier[CatalogGs] identifier[pCatalog] operator[SEP] { Keyword[this] operator[SEP] identifier[itsCatalog] operator[=] identifier[pCatalog] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[itsId] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[itsId] operator[=] Keyword[new] identifier[SubcatalogsCatalogsGsId] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[itsId] operator[SEP] identifier[setItsCatalog] operator[SEP] Keyword[this] operator[SEP] identifier[itsCatalog] operator[SEP] operator[SEP] }
public static void assertOneParameter(final Method method, Class<? extends Annotation> annotation) { if (method.getParameterTypes().length != 1) { throw annotation == null ? MESSAGES.methodHasToDeclareExactlyOneParameter(method) : MESSAGES.methodHasToDeclareExactlyOneParameter2(method, annotation); } }
class class_name[name] begin[{] method[assertOneParameter, return_type[void], modifier[public static], parameter[method, annotation]] begin[{] if[binary_operation[call[method.getParameterTypes, parameter[]], !=, literal[1]]] begin[{] ThrowStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=annotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=annotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=methodHasToDeclareExactlyOneParameter2, postfix_operators=[], prefix_operators=[], qualifier=MESSAGES, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=methodHasToDeclareExactlyOneParameter, postfix_operators=[], prefix_operators=[], qualifier=MESSAGES, selectors=[], type_arguments=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[assertOneParameter] operator[SEP] Keyword[final] identifier[Method] identifier[method] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Annotation] operator[>] identifier[annotation] operator[SEP] { Keyword[if] operator[SEP] identifier[method] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[!=] Other[1] operator[SEP] { Keyword[throw] identifier[annotation] operator[==] Other[null] operator[?] identifier[MESSAGES] operator[SEP] identifier[methodHasToDeclareExactlyOneParameter] operator[SEP] identifier[method] operator[SEP] operator[:] identifier[MESSAGES] operator[SEP] identifier[methodHasToDeclareExactlyOneParameter2] operator[SEP] identifier[method] , identifier[annotation] operator[SEP] operator[SEP] } }
public void toast(final int strId) { if (act == null) return; act.runOnUiThread(new Runnable() { public void run() { Toast.makeText(act, strId, Toast.LENGTH_SHORT).show(); } }); }
class class_name[name] begin[{] method[toast, return_type[void], modifier[public], parameter[strId]] begin[{] if[binary_operation[member[.act], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[act.runOnUiThread, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=act, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=strId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=LENGTH_SHORT, postfix_operators=[], prefix_operators=[], qualifier=Toast, selectors=[])], member=makeText, postfix_operators=[], prefix_operators=[], qualifier=Toast, selectors=[MethodInvocation(arguments=[], member=show, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[toast] operator[SEP] Keyword[final] Keyword[int] identifier[strId] operator[SEP] { Keyword[if] operator[SEP] identifier[act] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[act] operator[SEP] identifier[runOnUiThread] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[Toast] operator[SEP] identifier[makeText] operator[SEP] identifier[act] , identifier[strId] , identifier[Toast] operator[SEP] identifier[LENGTH_SHORT] operator[SEP] operator[SEP] identifier[show] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
private void readObject(ObjectInputStream in) throws Exception { in.defaultReadObject(); /** * Recreate tables. For serialization, object references have been transformed into strings */ for (Name key : this.contexts.keySet()) { String ref = (String) this.contexts.remove(key); this.contexts.put(key, orb.string_to_object(ref)); } for (Name key : this.names.keySet()) { String ref = (String) this.names.remove(key); this.names.put(key, orb.string_to_object(ref)); } }
class class_name[name] begin[{] method[readObject, return_type[void], modifier[private], parameter[in]] begin[{] call[in.defaultReadObject, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=contexts, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=ref)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=contexts, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=string_to_object, postfix_operators=[], prefix_operators=[], qualifier=orb, selectors=[], type_arguments=None)], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=contexts, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=keySet, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Name, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=names, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=ref)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=names, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=string_to_object, postfix_operators=[], prefix_operators=[], qualifier=orb, selectors=[], type_arguments=None)], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=names, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=keySet, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Name, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[readObject] operator[SEP] identifier[ObjectInputStream] identifier[in] operator[SEP] Keyword[throws] identifier[Exception] { identifier[in] operator[SEP] identifier[defaultReadObject] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Name] identifier[key] operator[:] Keyword[this] operator[SEP] identifier[contexts] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[ref] operator[=] operator[SEP] identifier[String] operator[SEP] Keyword[this] operator[SEP] identifier[contexts] operator[SEP] identifier[remove] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[contexts] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[orb] operator[SEP] identifier[string_to_object] operator[SEP] identifier[ref] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Name] identifier[key] operator[:] Keyword[this] operator[SEP] identifier[names] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[ref] operator[=] operator[SEP] identifier[String] operator[SEP] Keyword[this] operator[SEP] identifier[names] operator[SEP] identifier[remove] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[names] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[orb] operator[SEP] identifier[string_to_object] operator[SEP] identifier[ref] operator[SEP] operator[SEP] operator[SEP] } }
public static int getCtrlOrMetaModifier() { final WebBrowser webBrowser = Page.getCurrent().getWebBrowser(); if (webBrowser.isMacOSX()) { return ShortcutAction.ModifierKey.META; } return ShortcutAction.ModifierKey.CTRL; }
class class_name[name] begin[{] method[getCtrlOrMetaModifier, return_type[type[int]], modifier[public static], parameter[]] begin[{] local_variable[type[WebBrowser], webBrowser] if[call[webBrowser.isMacOSX, parameter[]]] begin[{] return[member[ShortcutAction.ModifierKey.META]] else begin[{] None end[}] return[member[ShortcutAction.ModifierKey.CTRL]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[getCtrlOrMetaModifier] operator[SEP] operator[SEP] { Keyword[final] identifier[WebBrowser] identifier[webBrowser] operator[=] identifier[Page] operator[SEP] identifier[getCurrent] operator[SEP] operator[SEP] operator[SEP] identifier[getWebBrowser] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[webBrowser] operator[SEP] identifier[isMacOSX] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[ShortcutAction] operator[SEP] identifier[ModifierKey] operator[SEP] identifier[META] operator[SEP] } Keyword[return] identifier[ShortcutAction] operator[SEP] identifier[ModifierKey] operator[SEP] identifier[CTRL] operator[SEP] }
public void setCPName(String newCPName) { String oldCPName = cpName; cpName = newCPName; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.MCF1RG__CP_NAME, oldCPName, cpName)); }
class class_name[name] begin[{] method[setCPName, return_type[void], modifier[public], parameter[newCPName]] begin[{] local_variable[type[String], oldCPName] assign[member[.cpName], member[.newCPName]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=MCF1RG__CP_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[]), MemberReference(member=oldCPName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cpName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCPName] operator[SEP] identifier[String] identifier[newCPName] operator[SEP] { identifier[String] identifier[oldCPName] operator[=] identifier[cpName] operator[SEP] identifier[cpName] operator[=] identifier[newCPName] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[AfplibPackage] operator[SEP] identifier[MCF1RG__CP_NAME] , identifier[oldCPName] , identifier[cpName] operator[SEP] operator[SEP] operator[SEP] }
protected String getGeneSymbol(ProteinReference pr) { for (Xref xr : pr.getXref()) { String db = xr.getDb(); if (db != null) { db = db.toLowerCase(); if (db.startsWith("hgnc")) { String id = xr.getId(); if (id != null) { String symbol = HGNC.getSymbol(id); if (symbol != null && !symbol.isEmpty()) { return symbol; } } } } } return null; }
class class_name[name] begin[{] method[getGeneSymbol, return_type[type[String]], modifier[protected], parameter[pr]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDb, postfix_operators=[], prefix_operators=[], qualifier=xr, selectors=[], type_arguments=None), name=db)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=db, 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=db, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toLowerCase, postfix_operators=[], prefix_operators=[], qualifier=db, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="hgnc")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=db, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=xr, selectors=[], type_arguments=None), name=id)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSymbol, postfix_operators=[], prefix_operators=[], qualifier=HGNC, selectors=[], type_arguments=None), name=symbol)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=symbol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=symbol, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=symbol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getXref, postfix_operators=[], prefix_operators=[], qualifier=pr, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=xr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Xref, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[protected] identifier[String] identifier[getGeneSymbol] operator[SEP] identifier[ProteinReference] identifier[pr] operator[SEP] { Keyword[for] operator[SEP] identifier[Xref] identifier[xr] operator[:] identifier[pr] operator[SEP] identifier[getXref] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[db] operator[=] identifier[xr] operator[SEP] identifier[getDb] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[db] operator[!=] Other[null] operator[SEP] { identifier[db] operator[=] identifier[db] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[db] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[String] identifier[id] operator[=] identifier[xr] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[symbol] operator[=] identifier[HGNC] operator[SEP] identifier[getSymbol] operator[SEP] identifier[id] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[symbol] operator[!=] Other[null] operator[&&] operator[!] identifier[symbol] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[symbol] operator[SEP] } } } } } Keyword[return] Other[null] operator[SEP] }
static long parseLong(String value) { if (value.startsWith("0x")) { // Oracle JDK on OS X do not use prefix for tid - so we need to be able to read both // https://github.com/olivergondza/dumpling/issues/59 value = value.substring(2); } // Long.parseLong is faster but unsuitable in some cases: https://github.com/olivergondza/dumpling/issues/71 return new BigInteger(value, 16).longValue(); }
class class_name[name] begin[{] method[parseLong, return_type[type[long]], modifier[static], parameter[value]] begin[{] if[call[value.startsWith, parameter[literal["0x"]]]] begin[{] assign[member[.value], call[value.substring, parameter[literal[2]]]] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=longValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=BigInteger, sub_type=None))] end[}] END[}]
Keyword[static] Keyword[long] identifier[parseLong] operator[SEP] identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[value] operator[=] identifier[value] operator[SEP] identifier[substring] operator[SEP] Other[2] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[BigInteger] operator[SEP] identifier[value] , Other[16] operator[SEP] operator[SEP] identifier[longValue] operator[SEP] operator[SEP] operator[SEP] }
public static void drawCenter(Font font, String s, int x, int y, int width) { drawString(font, s, Alignment.CENTER, x, y, width, Color.white); }
class class_name[name] begin[{] method[drawCenter, return_type[void], modifier[public static], parameter[font, s, x, y, width]] begin[{] call[.drawString, parameter[member[.font], member[.s], member[Alignment.CENTER], member[.x], member[.y], member[.width], member[Color.white]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[drawCenter] operator[SEP] identifier[Font] identifier[font] , identifier[String] identifier[s] , Keyword[int] identifier[x] , Keyword[int] identifier[y] , Keyword[int] identifier[width] operator[SEP] { identifier[drawString] operator[SEP] identifier[font] , identifier[s] , identifier[Alignment] operator[SEP] identifier[CENTER] , identifier[x] , identifier[y] , identifier[width] , identifier[Color] operator[SEP] identifier[white] operator[SEP] operator[SEP] }
public static ChainableStatement unload(JsScope jsScope) { return new DefaultChainableStatement(StateEvent.UNLOAD.getEventLabel(), jsScope.render()); }
class class_name[name] begin[{] method[unload, return_type[type[ChainableStatement]], modifier[public static], parameter[jsScope]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getEventLabel, postfix_operators=[], prefix_operators=[], qualifier=StateEvent.UNLOAD, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=render, postfix_operators=[], prefix_operators=[], qualifier=jsScope, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DefaultChainableStatement, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ChainableStatement] identifier[unload] operator[SEP] identifier[JsScope] identifier[jsScope] operator[SEP] { Keyword[return] Keyword[new] identifier[DefaultChainableStatement] operator[SEP] identifier[StateEvent] operator[SEP] identifier[UNLOAD] operator[SEP] identifier[getEventLabel] operator[SEP] operator[SEP] , identifier[jsScope] operator[SEP] identifier[render] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public final void entryRuleXAnnotationElementValuePair() throws RecognitionException { try { // InternalXbaseWithAnnotations.g:84:1: ( ruleXAnnotationElementValuePair EOF ) // InternalXbaseWithAnnotations.g:85:1: ruleXAnnotationElementValuePair EOF { if ( state.backtracking==0 ) { before(grammarAccess.getXAnnotationElementValuePairRule()); } pushFollow(FOLLOW_1); ruleXAnnotationElementValuePair(); state._fsp--; if (state.failed) return ; if ( state.backtracking==0 ) { after(grammarAccess.getXAnnotationElementValuePairRule()); } match(input,EOF,FOLLOW_2); if (state.failed) return ; } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
class class_name[name] begin[{] method[entryRuleXAnnotationElementValuePair, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXAnnotationElementValuePairRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=before, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=ruleXAnnotationElementValuePair, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXAnnotationElementValuePairRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=after, 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=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=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)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[None] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[entryRuleXAnnotationElementValuePair] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValuePairRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_1] operator[SEP] operator[SEP] identifier[ruleXAnnotationElementValuePair] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[after] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXAnnotationElementValuePairRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[match] operator[SEP] identifier[input] , identifier[EOF] , identifier[FOLLOW_2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] 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] } Keyword[finally] { } Keyword[return] operator[SEP] }
public static int cublasSetVector (int n, cuDoubleComplex x[], int offsetx, int incx, Pointer y, int incy) { ByteBuffer byteBufferx = ByteBuffer.allocateDirect(x.length * 8 * 2); byteBufferx.order(ByteOrder.nativeOrder()); DoubleBuffer doubleBufferx = byteBufferx.asDoubleBuffer(); int indexx = offsetx; for (int i=0; i<n; i++, indexx+=incx) { doubleBufferx.put(indexx*2+0, x[indexx].x); doubleBufferx.put(indexx*2+1, x[indexx].y); } return checkResult(cublasSetVectorNative(n, 16, Pointer.to(doubleBufferx).withByteOffset(offsetx * 8 * 2), incx, y, incy)); }
class class_name[name] begin[{] method[cublasSetVector, return_type[type[int]], modifier[public static], parameter[n, x, offsetx, incx, y, incy]] begin[{] local_variable[type[ByteBuffer], byteBufferx] call[byteBufferx.order, parameter[call[ByteOrder.nativeOrder, parameter[]]]] local_variable[type[DoubleBuffer], doubleBufferx] local_variable[type[int], indexx] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=indexx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=+), MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=indexx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=x, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=put, postfix_operators=[], prefix_operators=[], qualifier=doubleBufferx, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=indexx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=indexx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=y, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=put, postfix_operators=[], prefix_operators=[], qualifier=doubleBufferx, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), Assignment(expressionl=MemberReference(member=indexx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=incx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), label=None) return[call[.checkResult, parameter[call[.cublasSetVectorNative, parameter[member[.n], literal[16], call[Pointer.to, parameter[member[.doubleBufferx]]], member[.incx], member[.y], member[.incy]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[cublasSetVector] operator[SEP] Keyword[int] identifier[n] , identifier[cuDoubleComplex] identifier[x] operator[SEP] operator[SEP] , Keyword[int] identifier[offsetx] , Keyword[int] identifier[incx] , identifier[Pointer] identifier[y] , Keyword[int] identifier[incy] operator[SEP] { identifier[ByteBuffer] identifier[byteBufferx] operator[=] identifier[ByteBuffer] operator[SEP] identifier[allocateDirect] operator[SEP] identifier[x] operator[SEP] identifier[length] operator[*] Other[8] operator[*] Other[2] operator[SEP] operator[SEP] identifier[byteBufferx] operator[SEP] identifier[order] operator[SEP] identifier[ByteOrder] operator[SEP] identifier[nativeOrder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[DoubleBuffer] identifier[doubleBufferx] operator[=] identifier[byteBufferx] operator[SEP] identifier[asDoubleBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[indexx] operator[=] identifier[offsetx] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] , identifier[indexx] operator[+=] identifier[incx] operator[SEP] { identifier[doubleBufferx] operator[SEP] identifier[put] operator[SEP] identifier[indexx] operator[*] Other[2] operator[+] Other[0] , identifier[x] operator[SEP] identifier[indexx] operator[SEP] operator[SEP] identifier[x] operator[SEP] operator[SEP] identifier[doubleBufferx] operator[SEP] identifier[put] operator[SEP] identifier[indexx] operator[*] Other[2] operator[+] Other[1] , identifier[x] operator[SEP] identifier[indexx] operator[SEP] operator[SEP] identifier[y] operator[SEP] operator[SEP] } Keyword[return] identifier[checkResult] operator[SEP] identifier[cublasSetVectorNative] operator[SEP] identifier[n] , Other[16] , identifier[Pointer] operator[SEP] identifier[to] operator[SEP] identifier[doubleBufferx] operator[SEP] operator[SEP] identifier[withByteOffset] operator[SEP] identifier[offsetx] operator[*] Other[8] operator[*] Other[2] operator[SEP] , identifier[incx] , identifier[y] , identifier[incy] operator[SEP] operator[SEP] operator[SEP] }
public final ScanRun startScanRun(ScanConfigName name) { StartScanRunRequest request = StartScanRunRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return startScanRun(request); }
class class_name[name] begin[{] method[startScanRun, return_type[type[ScanRun]], modifier[final public], parameter[name]] begin[{] local_variable[type[StartScanRunRequest], request] return[call[.startScanRun, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[ScanRun] identifier[startScanRun] operator[SEP] identifier[ScanConfigName] identifier[name] operator[SEP] { identifier[StartScanRunRequest] identifier[request] operator[=] identifier[StartScanRunRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setName] operator[SEP] identifier[name] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[name] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[startScanRun] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public java.awt.Image createAwtImage(Color foreground, Color background) { int f = foreground.getRGB(); int g = background.getRGB(); Canvas canvas = new Canvas(); paintCode(); int h = (int)yHeight; int pix[] = new int[bitColumns * codeRows * h]; int stride = (bitColumns + 7) / 8; int ptr = 0; for (int k = 0; k < codeRows; ++k) { int p = k * stride; for (int j = 0; j < bitColumns; ++j) { int b = outBits[p + (j / 8)] & 0xff; b <<= j % 8; pix[ptr++] = (b & 0x80) == 0 ? g : f; } for (int j = 1; j < h; ++j) { System.arraycopy(pix, ptr - bitColumns, pix, ptr + bitColumns * (j - 1), bitColumns); } ptr += bitColumns * (h - 1); } java.awt.Image img = canvas.createImage(new MemoryImageSource(bitColumns, codeRows * h, pix, 0, bitColumns)); return img; }
class class_name[name] begin[{] method[createAwtImage, return_type[type[java]], modifier[public], parameter[foreground, background]] begin[{] local_variable[type[int], f] local_variable[type[int], g] local_variable[type[Canvas], canvas] call[.paintCode, parameter[]] local_variable[type[int], h] local_variable[type[int], pix] local_variable[type[int], stride] local_variable[type[int], ptr] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=stride, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), name=p)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=outBits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=/), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), name=b)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=<<=, value=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=%)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=pix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=ptr, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bitColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=pix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bitColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), MemberReference(member=pix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=bitColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=*), operator=+), MemberReference(member=bitColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=ptr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=bitColumns, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=codeRows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) local_variable[type[java], img] return[member[.img]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Image] identifier[createAwtImage] operator[SEP] identifier[Color] identifier[foreground] , identifier[Color] identifier[background] operator[SEP] { Keyword[int] identifier[f] operator[=] identifier[foreground] operator[SEP] identifier[getRGB] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[g] operator[=] identifier[background] operator[SEP] identifier[getRGB] operator[SEP] operator[SEP] operator[SEP] identifier[Canvas] identifier[canvas] operator[=] Keyword[new] identifier[Canvas] operator[SEP] operator[SEP] operator[SEP] identifier[paintCode] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[h] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[yHeight] operator[SEP] Keyword[int] identifier[pix] operator[SEP] operator[SEP] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[bitColumns] operator[*] identifier[codeRows] operator[*] identifier[h] operator[SEP] operator[SEP] Keyword[int] identifier[stride] operator[=] operator[SEP] identifier[bitColumns] operator[+] Other[7] operator[SEP] operator[/] Other[8] operator[SEP] Keyword[int] identifier[ptr] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[codeRows] operator[SEP] operator[++] identifier[k] operator[SEP] { Keyword[int] identifier[p] operator[=] identifier[k] operator[*] identifier[stride] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[bitColumns] operator[SEP] operator[++] identifier[j] operator[SEP] { Keyword[int] identifier[b] operator[=] identifier[outBits] operator[SEP] identifier[p] operator[+] operator[SEP] identifier[j] operator[/] Other[8] operator[SEP] operator[SEP] operator[&] literal[Integer] operator[SEP] identifier[b] operator[<<=] identifier[j] operator[%] Other[8] operator[SEP] identifier[pix] operator[SEP] identifier[ptr] operator[++] operator[SEP] operator[=] operator[SEP] identifier[b] operator[&] literal[Integer] operator[SEP] operator[==] Other[0] operator[?] identifier[g] operator[:] identifier[f] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[1] operator[SEP] identifier[j] operator[<] identifier[h] operator[SEP] operator[++] identifier[j] operator[SEP] { identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[pix] , identifier[ptr] operator[-] identifier[bitColumns] , identifier[pix] , identifier[ptr] operator[+] identifier[bitColumns] operator[*] operator[SEP] identifier[j] operator[-] Other[1] operator[SEP] , identifier[bitColumns] operator[SEP] operator[SEP] } identifier[ptr] operator[+=] identifier[bitColumns] operator[*] operator[SEP] identifier[h] operator[-] Other[1] operator[SEP] operator[SEP] } identifier[java] operator[SEP] identifier[awt] operator[SEP] identifier[Image] identifier[img] operator[=] identifier[canvas] operator[SEP] identifier[createImage] operator[SEP] Keyword[new] identifier[MemoryImageSource] operator[SEP] identifier[bitColumns] , identifier[codeRows] operator[*] identifier[h] , identifier[pix] , Other[0] , identifier[bitColumns] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[img] operator[SEP] }
@Override public void eUnset(int featureID) { switch (featureID) { case SarlPackage.SARL_ASSERT_EXPRESSION__CONDITION: setCondition((XExpression)null); return; case SarlPackage.SARL_ASSERT_EXPRESSION__MESSAGE: setMessage(MESSAGE_EDEFAULT); return; case SarlPackage.SARL_ASSERT_EXPRESSION__IS_STATIC: setIsStatic(IS_STATIC_EDEFAULT); return; } super.eUnset(featureID); }
class class_name[name] begin[{] method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SARL_ASSERT_EXPRESSION__CONDITION, postfix_operators=[], prefix_operators=[], qualifier=SarlPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=XExpression, sub_type=None))], member=setCondition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SARL_ASSERT_EXPRESSION__MESSAGE, postfix_operators=[], prefix_operators=[], qualifier=SarlPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=MESSAGE_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)]), SwitchStatementCase(case=[MemberReference(member=SARL_ASSERT_EXPRESSION__IS_STATIC, postfix_operators=[], prefix_operators=[], qualifier=SarlPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=IS_STATIC_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setIsStatic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eUnset, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[SarlPackage] operator[SEP] identifier[SARL_ASSERT_EXPRESSION__CONDITION] operator[:] identifier[setCondition] operator[SEP] operator[SEP] identifier[XExpression] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[SarlPackage] operator[SEP] identifier[SARL_ASSERT_EXPRESSION__MESSAGE] operator[:] identifier[setMessage] operator[SEP] identifier[MESSAGE_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[case] identifier[SarlPackage] operator[SEP] identifier[SARL_ASSERT_EXPRESSION__IS_STATIC] operator[:] identifier[setIsStatic] operator[SEP] identifier[IS_STATIC_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[super] operator[SEP] identifier[eUnset] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
public final AntlrDatatypeRuleToken ruleQualifiedNameInStaticImport() throws RecognitionException { AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken(); Token kw=null; AntlrDatatypeRuleToken this_ValidID_0 = null; enterRule(); try { // InternalPureXbase.g:6859:2: ( (this_ValidID_0= ruleValidID kw= '.' )+ ) // InternalPureXbase.g:6860:2: (this_ValidID_0= ruleValidID kw= '.' )+ { // InternalPureXbase.g:6860:2: (this_ValidID_0= ruleValidID kw= '.' )+ int cnt124=0; loop124: do { int alt124=2; int LA124_0 = input.LA(1); if ( (LA124_0==RULE_ID) ) { int LA124_2 = input.LA(2); if ( (LA124_2==54) ) { alt124=1; } } switch (alt124) { case 1 : // InternalPureXbase.g:6861:3: this_ValidID_0= ruleValidID kw= '.' { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getQualifiedNameInStaticImportAccess().getValidIDParserRuleCall_0()); } pushFollow(FOLLOW_76); this_ValidID_0=ruleValidID(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(this_ValidID_0); } if ( state.backtracking==0 ) { afterParserOrEnumRuleCall(); } kw=(Token)match(input,54,FOLLOW_83); if (state.failed) return current; if ( state.backtracking==0 ) { current.merge(kw); newLeafNode(kw, grammarAccess.getQualifiedNameInStaticImportAccess().getFullStopKeyword_1()); } } break; default : if ( cnt124 >= 1 ) break loop124; if (state.backtracking>0) {state.failed=true; return current;} EarlyExitException eee = new EarlyExitException(124, input); throw eee; } cnt124++; } while (true); } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleQualifiedNameInStaticImport, return_type[type[AntlrDatatypeRuleToken]], modifier[final public], parameter[]] begin[{] local_variable[type[AntlrDatatypeRuleToken], current] local_variable[type[Token], kw] local_variable[type[AntlrDatatypeRuleToken], this_ValidID_0] call[.enterRule, parameter[]] TryStatement(block=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=cnt124)], modifiers=set(), type=BasicType(dimensions=[], name=int)), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt124)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA124_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA124_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RULE_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA124_2)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA124_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=54), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt124, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getQualifiedNameInStaticImportAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getValidIDParserRuleCall_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_76, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=this_ValidID_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleValidID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=this_ValidID_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=kw, 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=54), MemberReference(member=FOLLOW_83, 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), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=kw, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getQualifiedNameInStaticImportAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getFullStopKeyword_1, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newLeafNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cnt124, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>=), else_statement=None, label=None, then_statement=BreakStatement(goto=loop124, label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=124), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=EarlyExitException, sub_type=None)), name=eee)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=EarlyExitException, sub_type=None)), ThrowStatement(expression=MemberReference(member=eee, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], expression=MemberReference(member=alt124, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=cnt124, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop124)]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=leaveRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[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=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[AntlrDatatypeRuleToken] identifier[ruleQualifiedNameInStaticImport] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[AntlrDatatypeRuleToken] identifier[current] operator[=] Keyword[new] identifier[AntlrDatatypeRuleToken] operator[SEP] operator[SEP] operator[SEP] identifier[Token] identifier[kw] operator[=] Other[null] operator[SEP] identifier[AntlrDatatypeRuleToken] identifier[this_ValidID_0] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { Keyword[int] identifier[cnt124] operator[=] Other[0] operator[SEP] identifier[loop124] operator[:] Keyword[do] { Keyword[int] identifier[alt124] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA124_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA124_0] operator[==] identifier[RULE_ID] operator[SEP] operator[SEP] { Keyword[int] identifier[LA124_2] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA124_2] operator[==] Other[54] operator[SEP] operator[SEP] { identifier[alt124] operator[=] Other[1] operator[SEP] } } Keyword[switch] operator[SEP] identifier[alt124] operator[SEP] { Keyword[case] Other[1] operator[:] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getQualifiedNameInStaticImportAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getValidIDParserRuleCall_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_76] operator[SEP] operator[SEP] identifier[this_ValidID_0] operator[=] identifier[ruleValidID] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[SEP] identifier[merge] operator[SEP] identifier[this_ValidID_0] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } identifier[kw] operator[=] operator[SEP] identifier[Token] operator[SEP] identifier[match] operator[SEP] identifier[input] , Other[54] , identifier[FOLLOW_83] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[SEP] identifier[merge] operator[SEP] identifier[kw] operator[SEP] operator[SEP] identifier[newLeafNode] operator[SEP] identifier[kw] , identifier[grammarAccess] operator[SEP] identifier[getQualifiedNameInStaticImportAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getFullStopKeyword_1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[if] operator[SEP] identifier[cnt124] operator[>=] Other[1] operator[SEP] Keyword[break] identifier[loop124] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[current] operator[SEP] } identifier[EarlyExitException] identifier[eee] operator[=] Keyword[new] identifier[EarlyExitException] operator[SEP] Other[124] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[eee] operator[SEP] } identifier[cnt124] operator[++] operator[SEP] } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[leaveRule] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }