code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public boolean computeHomography( CalibrationObservation observedPoints ) { if( observedPoints.size() < 4) throw new IllegalArgumentException("At least 4 points needed in each set of observations. " + " Filter these first please"); List<AssociatedPair> pairs = new ArrayList<>(); for( int i = 0; i < observedPoints.size(); i++ ) { int which = observedPoints.get(i).index; Point2D_F64 obs = observedPoints.get(i); pairs.add( new AssociatedPair(worldPoints.get(which),obs,true)); } if( !computeHomography.process(pairs,found) ) return false; // todo do non-linear refinement. Take advantage of coordinates being fixed return true; }
class class_name[name] begin[{] method[computeHomography, return_type[type[boolean]], modifier[public], parameter[observedPoints]] begin[{] if[binary_operation[call[observedPoints.size, parameter[]], <, literal[4]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="At least 4 points needed in each set of observations. "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" Filter these first please"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[List], pairs] 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=observedPoints, selectors=[MemberReference(member=index, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), name=which)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=observedPoints, selectors=[], type_arguments=None), name=obs)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point2D_F64, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=which, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=worldPoints, selectors=[], type_arguments=None), MemberReference(member=obs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AssociatedPair, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=pairs, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=observedPoints, 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) if[call[computeHomography.process, parameter[member[.pairs], member[.found]]]] begin[{] return[literal[false]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[computeHomography] operator[SEP] identifier[CalibrationObservation] identifier[observedPoints] operator[SEP] { Keyword[if] operator[SEP] identifier[observedPoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] Other[4] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[AssociatedPair] operator[>] identifier[pairs] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[observedPoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[which] operator[=] identifier[observedPoints] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[index] operator[SEP] identifier[Point2D_F64] identifier[obs] operator[=] identifier[observedPoints] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[pairs] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[AssociatedPair] operator[SEP] identifier[worldPoints] operator[SEP] identifier[get] operator[SEP] identifier[which] operator[SEP] , identifier[obs] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[computeHomography] operator[SEP] identifier[process] operator[SEP] identifier[pairs] , identifier[found] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public String[] extract_DevVarStringArray(Any in) throws DevFailed { String[] data = null; try { data = DevVarStringArrayHelper.extract(in); } catch (BAD_OPERATION ex) { throw_bad_type("DevVarStringArray"); } return data; }
class class_name[name] begin[{] method[extract_DevVarStringArray, return_type[type[String]], modifier[public], parameter[in]] begin[{] local_variable[type[String], data] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extract, postfix_operators=[], prefix_operators=[], qualifier=DevVarStringArrayHelper, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DevVarStringArray")], member=throw_bad_type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['BAD_OPERATION']))], finally_block=None, label=None, resources=None) return[member[.data]] end[}] END[}]
Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[extract_DevVarStringArray] operator[SEP] identifier[Any] identifier[in] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[String] operator[SEP] operator[SEP] identifier[data] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[data] operator[=] identifier[DevVarStringArrayHelper] operator[SEP] identifier[extract] operator[SEP] identifier[in] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_OPERATION] identifier[ex] operator[SEP] { identifier[throw_bad_type] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[data] operator[SEP] }
public List<URI> getURIs() { List<URI> uris = new ArrayList<URI>(); lock.lock(); try { List<URI> result = new ArrayList<URI>(uriIndex.keySet()); result.remove(null); return Collections.unmodifiableList(result); } finally { uris.addAll(uriIndex.keySet()); lock.unlock(); } }
class class_name[name] begin[{] method[getURIs, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], uris] call[lock.lock, parameter[]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=uriIndex, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), name=result)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=URI, sub_type=None))], dimensions=[], name=List, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=remove, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unmodifiableList, postfix_operators=[], prefix_operators=[], qualifier=Collections, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=uriIndex, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=uris, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[URI] operator[>] identifier[getURIs] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[URI] operator[>] identifier[uris] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[URI] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[List] operator[<] identifier[URI] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[URI] operator[>] operator[SEP] identifier[uriIndex] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[remove] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[Collections] operator[SEP] identifier[unmodifiableList] operator[SEP] identifier[result] operator[SEP] operator[SEP] } Keyword[finally] { identifier[uris] operator[SEP] identifier[addAll] operator[SEP] identifier[uriIndex] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[lock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
public Stream<T> merge(final T value) { return new Stream<T>() { @Override public Iterator<T> iterator() { return new ReadOnlyIterator<T>() { Iterator<T> iterator = Stream.this.iterator(); boolean completed; @Override public boolean hasNext() { return iterator.hasNext() || !completed; } @Override public T next() { if (iterator.hasNext()) return iterator.next(); completed = true; return value; } }; } }; }
class class_name[name] begin[{] method[merge, return_type[type[Stream]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=Stream, selectors=[MethodInvocation(arguments=[], member=iterator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=iterator)], documentation=None, modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=completed)], documentation=None, modifiers=set(), type=BasicType(dimensions=[], name=boolean)), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), operandr=MemberReference(member=completed, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=||), label=None)], documentation=None, modifiers={'public'}, name=hasNext, parameters=[], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=iterator, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=completed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=next, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=ReadOnlyIterator, sub_type=None)), label=None)], documentation=None, modifiers={'public'}, name=iterator, parameters=[], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Iterator, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=Stream, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Stream] operator[<] identifier[T] operator[>] identifier[merge] operator[SEP] Keyword[final] identifier[T] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[Stream] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Iterator] operator[<] identifier[T] operator[>] identifier[iterator] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ReadOnlyIterator] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] { identifier[Iterator] operator[<] identifier[T] operator[>] identifier[iterator] operator[=] identifier[Stream] operator[SEP] Keyword[this] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[completed] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasNext] operator[SEP] operator[SEP] { Keyword[return] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[||] operator[!] identifier[completed] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[next] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[completed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[value] operator[SEP] } } operator[SEP] } } operator[SEP] }
String compact(final String json) throws IOException { final StringWriter output = new StringWriter(json.length()); final JsonFactory factory = mapper.getFactory(); final JsonParser parser = factory.createParser(json); final JsonGenerator generator = factory.createGenerator(output); // https://github.com/jacoco/jacoco/wiki/FilteringOptions //noinspection TryFinallyCanBeTryWithResources - jacoco can't handle try-with correctly try { while (parser.nextToken() != null) { generator.copyCurrentEvent(parser); } } finally { generator.close(); } return output.toString(); }
class class_name[name] begin[{] method[compact, return_type[type[String]], modifier[default], parameter[json]] begin[{] local_variable[type[StringWriter], output] local_variable[type[JsonFactory], factory] local_variable[type[JsonParser], parser] local_variable[type[JsonGenerator], generator] TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=parser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=copyCurrentEvent, postfix_operators=[], prefix_operators=[], qualifier=generator, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=generator, selectors=[], type_arguments=None), label=None)], label=None, resources=None) return[call[output.toString, parameter[]]] end[}] END[}]
identifier[String] identifier[compact] operator[SEP] Keyword[final] identifier[String] identifier[json] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] identifier[StringWriter] identifier[output] operator[=] Keyword[new] identifier[StringWriter] operator[SEP] identifier[json] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[JsonFactory] identifier[factory] operator[=] identifier[mapper] operator[SEP] identifier[getFactory] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[JsonParser] identifier[parser] operator[=] identifier[factory] operator[SEP] identifier[createParser] operator[SEP] identifier[json] operator[SEP] operator[SEP] Keyword[final] identifier[JsonGenerator] identifier[generator] operator[=] identifier[factory] operator[SEP] identifier[createGenerator] operator[SEP] identifier[output] operator[SEP] operator[SEP] Keyword[try] { Keyword[while] operator[SEP] identifier[parser] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[generator] operator[SEP] identifier[copyCurrentEvent] operator[SEP] identifier[parser] operator[SEP] operator[SEP] } } Keyword[finally] { identifier[generator] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[output] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) { BeanDefinitionBuilder advisor = BeanDefinitionBuilder .rootBeanDefinition(MethodSecurityMetadataSourceAdvisor.class); advisor.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); advisor.addConstructorArgValue("methodSecurityInterceptor"); advisor.addConstructorArgReference("methodSecurityMetadataSource"); advisor.addConstructorArgValue("methodSecurityMetadataSource"); MultiValueMap<String, Object> attributes = importingClassMetadata.getAllAnnotationAttributes(EnableGlobalMethodSecurity.class.getName()); Integer order = (Integer) attributes.getFirst("order"); if (order != null) { advisor.addPropertyValue("order", order); } registry.registerBeanDefinition("metaDataSourceAdvisor", advisor.getBeanDefinition()); }
class class_name[name] begin[{] method[registerBeanDefinitions, return_type[void], modifier[public], parameter[importingClassMetadata, registry]] begin[{] local_variable[type[BeanDefinitionBuilder], advisor] call[advisor.setRole, parameter[member[BeanDefinition.ROLE_INFRASTRUCTURE]]] call[advisor.addConstructorArgValue, parameter[literal["methodSecurityInterceptor"]]] call[advisor.addConstructorArgReference, parameter[literal["methodSecurityMetadataSource"]]] call[advisor.addConstructorArgValue, parameter[literal["methodSecurityMetadataSource"]]] local_variable[type[MultiValueMap], attributes] local_variable[type[Integer], order] if[binary_operation[member[.order], !=, literal[null]]] begin[{] call[advisor.addPropertyValue, parameter[literal["order"], member[.order]]] else begin[{] None end[}] call[registry.registerBeanDefinition, parameter[literal["metaDataSourceAdvisor"], call[advisor.getBeanDefinition, parameter[]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[registerBeanDefinitions] operator[SEP] identifier[AnnotationMetadata] identifier[importingClassMetadata] , identifier[BeanDefinitionRegistry] identifier[registry] operator[SEP] { identifier[BeanDefinitionBuilder] identifier[advisor] operator[=] identifier[BeanDefinitionBuilder] operator[SEP] identifier[rootBeanDefinition] operator[SEP] identifier[MethodSecurityMetadataSourceAdvisor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[advisor] operator[SEP] identifier[setRole] operator[SEP] identifier[BeanDefinition] operator[SEP] identifier[ROLE_INFRASTRUCTURE] operator[SEP] operator[SEP] identifier[advisor] operator[SEP] identifier[addConstructorArgValue] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[advisor] operator[SEP] identifier[addConstructorArgReference] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[advisor] operator[SEP] identifier[addConstructorArgValue] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[MultiValueMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[attributes] operator[=] identifier[importingClassMetadata] operator[SEP] identifier[getAllAnnotationAttributes] operator[SEP] identifier[EnableGlobalMethodSecurity] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Integer] identifier[order] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[attributes] operator[SEP] identifier[getFirst] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[order] operator[!=] Other[null] operator[SEP] { identifier[advisor] operator[SEP] identifier[addPropertyValue] operator[SEP] literal[String] , identifier[order] operator[SEP] operator[SEP] } identifier[registry] operator[SEP] identifier[registerBeanDefinition] operator[SEP] literal[String] , identifier[advisor] operator[SEP] identifier[getBeanDefinition] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public OrderingList<S> reduce() { if (size() == 0) { return this; } Set<ChainedProperty<S>> seen = new HashSet<ChainedProperty<S>>(); OrderingList<S> newList = emptyList(); for (OrderedProperty<S> property : this) { ChainedProperty<S> chained = property.getChainedProperty(); if (!seen.contains(chained)) { newList = newList.concat(property); seen.add(chained); } } return newList; }
class class_name[name] begin[{] method[reduce, return_type[type[OrderingList]], modifier[public], parameter[]] begin[{] if[binary_operation[call[.size, parameter[]], ==, literal[0]]] begin[{] return[THIS[]] else begin[{] None end[}] local_variable[type[Set], seen] local_variable[type[OrderingList], newList] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getChainedProperty, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), name=chained)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=S, sub_type=None))], dimensions=[], name=ChainedProperty, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=chained, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=seen, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=newList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=concat, postfix_operators=[], prefix_operators=[], qualifier=newList, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=chained, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=seen, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=property)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=S, sub_type=None))], dimensions=[], name=OrderedProperty, sub_type=None))), label=None) return[member[.newList]] end[}] END[}]
Keyword[public] identifier[OrderingList] operator[<] identifier[S] operator[>] identifier[reduce] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } identifier[Set] operator[<] identifier[ChainedProperty] operator[<] identifier[S] operator[>] operator[>] identifier[seen] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[ChainedProperty] operator[<] identifier[S] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[OrderingList] operator[<] identifier[S] operator[>] identifier[newList] operator[=] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[OrderedProperty] operator[<] identifier[S] operator[>] identifier[property] operator[:] Keyword[this] operator[SEP] { identifier[ChainedProperty] operator[<] identifier[S] operator[>] identifier[chained] operator[=] identifier[property] operator[SEP] identifier[getChainedProperty] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[seen] operator[SEP] identifier[contains] operator[SEP] identifier[chained] operator[SEP] operator[SEP] { identifier[newList] operator[=] identifier[newList] operator[SEP] identifier[concat] operator[SEP] identifier[property] operator[SEP] operator[SEP] identifier[seen] operator[SEP] identifier[add] operator[SEP] identifier[chained] operator[SEP] operator[SEP] } } Keyword[return] identifier[newList] operator[SEP] }
public Jar addEntries(Path path, Path dirOrZip) throws IOException { return addEntries(path, dirOrZip, null); }
class class_name[name] begin[{] method[addEntries, return_type[type[Jar]], modifier[public], parameter[path, dirOrZip]] begin[{] return[call[.addEntries, parameter[member[.path], member[.dirOrZip], literal[null]]]] end[}] END[}]
Keyword[public] identifier[Jar] identifier[addEntries] operator[SEP] identifier[Path] identifier[path] , identifier[Path] identifier[dirOrZip] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[addEntries] operator[SEP] identifier[path] , identifier[dirOrZip] , Other[null] operator[SEP] operator[SEP] }
@Override public String lookup(Parameter p) throws NamespaceSyntaxWarning, IndexingFailure { if (nulls(p, p.getValue())) { throw new InvalidArgument("parameter is null"); } Namespace ns = p.getNamespace(); if (ns == null) { return null; } String resourceLocation = ns.getResourceLocation(); if (resourceLocation == null) { throw new InvalidArgument("resourceLocation", resourceLocation); } // get opened namespace and lookup namespace parameter encoding JDBMNamespaceLookup il = openNamespaces.get(ns.getResourceLocation()); if (il == null) { final String fmt = "Namespace '%s' is not open."; final String msg = String.format(fmt, resourceLocation); throw new IndexingFailure(resourceLocation, msg); } String encoding = il.lookup(p.getValue()); if (encoding == null) { String rl = ns.getResourceLocation(); String pref = ns.getPrefix(); throw new NamespaceSyntaxWarning(rl, pref, p.getValue()); } return encoding; }
class class_name[name] begin[{] method[lookup, return_type[type[String]], modifier[public], parameter[p]] begin[{] if[call[.nulls, parameter[member[.p], call[p.getValue, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="parameter is null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidArgument, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Namespace], ns] if[binary_operation[member[.ns], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], resourceLocation] if[binary_operation[member[.resourceLocation], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="resourceLocation"), MemberReference(member=resourceLocation, 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=InvalidArgument, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[JDBMNamespaceLookup], il] if[binary_operation[member[.il], ==, literal[null]]] begin[{] local_variable[type[String], fmt] local_variable[type[String], msg] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=resourceLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msg, 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=IndexingFailure, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], encoding] if[binary_operation[member[.encoding], ==, literal[null]]] begin[{] local_variable[type[String], rl] local_variable[type[String], pref] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=rl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NamespaceSyntaxWarning, sub_type=None)), label=None) else begin[{] None end[}] return[member[.encoding]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[lookup] operator[SEP] identifier[Parameter] identifier[p] operator[SEP] Keyword[throws] identifier[NamespaceSyntaxWarning] , identifier[IndexingFailure] { Keyword[if] operator[SEP] identifier[nulls] operator[SEP] identifier[p] , identifier[p] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidArgument] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Namespace] identifier[ns] operator[=] identifier[p] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ns] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[String] identifier[resourceLocation] operator[=] identifier[ns] operator[SEP] identifier[getResourceLocation] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resourceLocation] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidArgument] operator[SEP] literal[String] , identifier[resourceLocation] operator[SEP] operator[SEP] } identifier[JDBMNamespaceLookup] identifier[il] operator[=] identifier[openNamespaces] operator[SEP] identifier[get] operator[SEP] identifier[ns] operator[SEP] identifier[getResourceLocation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[il] operator[==] Other[null] operator[SEP] { Keyword[final] identifier[String] identifier[fmt] operator[=] literal[String] operator[SEP] Keyword[final] identifier[String] identifier[msg] operator[=] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[fmt] , identifier[resourceLocation] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IndexingFailure] operator[SEP] identifier[resourceLocation] , identifier[msg] operator[SEP] operator[SEP] } identifier[String] identifier[encoding] operator[=] identifier[il] operator[SEP] identifier[lookup] operator[SEP] identifier[p] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[encoding] operator[==] Other[null] operator[SEP] { identifier[String] identifier[rl] operator[=] identifier[ns] operator[SEP] identifier[getResourceLocation] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[pref] operator[=] identifier[ns] operator[SEP] identifier[getPrefix] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[NamespaceSyntaxWarning] operator[SEP] identifier[rl] , identifier[pref] , identifier[p] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[encoding] operator[SEP] }
public boolean acquireUpgradableLock(long timeout) throws InterruptedException, IllegalStateException { LockInfo info = (LockInfo)mLockInfoRef.get(); int type = info.mType; if (type == READ) { throw new IllegalStateException ("Cannot acquire an upgradable lock while thread holds " + "only a read lock."); } if (type == NONE) { synchronized (this) { if (!upgradableLockAvailable()) { if (timeout < 0) { while (true) { wait(); if (upgradableLockAvailable()) { break; } } } else if (timeout > 0) { long expire = System.currentTimeMillis() + timeout; while (true) { wait(timeout); if (upgradableLockAvailable()) { break; } timeout = expire - System.currentTimeMillis(); if (timeout <= 0) { return false; } }; } else { return false; } } mUpgradableLockHeld = Thread.currentThread(); } info.mType = UPGRADABLE; } info.mCount++; return true; }
class class_name[name] begin[{] method[acquireUpgradableLock, return_type[type[boolean]], modifier[public], parameter[timeout]] begin[{] local_variable[type[LockInfo], info] local_variable[type[int], type] if[binary_operation[member[.type], ==, member[.READ]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot acquire an upgradable lock while thread holds "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="only a read lock."), 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[}] if[binary_operation[member[.type], ==, member[.NONE]]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] if[call[.upgradableLockAvailable, parameter[]]] begin[{] if[binary_operation[member[.timeout], <, literal[0]]] begin[{] while[literal[true]] begin[{] call[.wait, parameter[]] if[call[.upgradableLockAvailable, parameter[]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] else begin[{] if[binary_operation[member[.timeout], >, literal[0]]] begin[{] local_variable[type[long], expire] while[literal[true]] begin[{] call[.wait, parameter[member[.timeout]]] if[call[.upgradableLockAvailable, parameter[]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] assign[member[.timeout], binary_operation[member[.expire], -, call[System.currentTimeMillis, parameter[]]]] if[binary_operation[member[.timeout], <=, literal[0]]] begin[{] return[literal[false]] else begin[{] None end[}] end[}] Statement(label=None) else begin[{] return[literal[false]] end[}] end[}] else begin[{] None end[}] assign[member[.mUpgradableLockHeld], call[Thread.currentThread, parameter[]]] END[}] assign[member[info.mType], member[.UPGRADABLE]] else begin[{] None end[}] member[info.mCount] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[acquireUpgradableLock] operator[SEP] Keyword[long] identifier[timeout] operator[SEP] Keyword[throws] identifier[InterruptedException] , identifier[IllegalStateException] { identifier[LockInfo] identifier[info] operator[=] operator[SEP] identifier[LockInfo] operator[SEP] identifier[mLockInfoRef] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[type] operator[=] identifier[info] operator[SEP] identifier[mType] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[==] identifier[READ] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[type] operator[==] identifier[NONE] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[upgradableLockAvailable] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[timeout] operator[<] Other[0] operator[SEP] { Keyword[while] operator[SEP] literal[boolean] operator[SEP] { identifier[wait] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[upgradableLockAvailable] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[timeout] operator[>] Other[0] operator[SEP] { Keyword[long] identifier[expire] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[+] identifier[timeout] operator[SEP] Keyword[while] operator[SEP] literal[boolean] operator[SEP] { identifier[wait] operator[SEP] identifier[timeout] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[upgradableLockAvailable] operator[SEP] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } identifier[timeout] operator[=] identifier[expire] operator[-] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[timeout] operator[<=] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } } identifier[mUpgradableLockHeld] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] } identifier[info] operator[SEP] identifier[mType] operator[=] identifier[UPGRADABLE] operator[SEP] } identifier[info] operator[SEP] identifier[mCount] operator[++] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
private boolean hasSubject(String subject) { boolean result = false; String s = subject + "."; int c = s.length(); for (String propName : contextItems.getItemNames()) { result = s.equalsIgnoreCase(propName.substring(0, c)); if (result) { break; } } return result; }
class class_name[name] begin[{] method[hasSubject, return_type[type[boolean]], modifier[private], parameter[subject]] begin[{] local_variable[type[boolean], result] local_variable[type[String], s] local_variable[type[int], c] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=propName, selectors=[], type_arguments=None)], member=equalsIgnoreCase, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getItemNames, postfix_operators=[], prefix_operators=[], qualifier=contextItems, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=propName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[member[.result]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[hasSubject] operator[SEP] identifier[String] identifier[subject] operator[SEP] { Keyword[boolean] identifier[result] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[s] operator[=] identifier[subject] operator[+] literal[String] operator[SEP] Keyword[int] identifier[c] operator[=] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[propName] operator[:] identifier[contextItems] operator[SEP] identifier[getItemNames] operator[SEP] operator[SEP] operator[SEP] { identifier[result] operator[=] identifier[s] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[propName] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[c] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
public char getDefaultJava(String strBrowser, String strOS) { char chJavaLaunch = 'A'; // Applet = default if ("safari".equalsIgnoreCase(strBrowser)) chJavaLaunch = 'W'; // Web start // if ("linux".equalsIgnoreCase(strOS)) // chJavaLaunch = 'W'; // Web start return chJavaLaunch; }
class class_name[name] begin[{] method[getDefaultJava, return_type[type[char]], modifier[public], parameter[strBrowser, strOS]] begin[{] local_variable[type[char], chJavaLaunch] if[literal["safari"]] begin[{] assign[member[.chJavaLaunch], literal['W']] else begin[{] None end[}] return[member[.chJavaLaunch]] end[}] END[}]
Keyword[public] Keyword[char] identifier[getDefaultJava] operator[SEP] identifier[String] identifier[strBrowser] , identifier[String] identifier[strOS] operator[SEP] { Keyword[char] identifier[chJavaLaunch] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[strBrowser] operator[SEP] operator[SEP] identifier[chJavaLaunch] operator[=] literal[String] operator[SEP] Keyword[return] identifier[chJavaLaunch] operator[SEP] }
public IndexDef getIndex(String name) { String realName = (name == null ? "" : name); IndexDef def = null; for (Iterator it = getIndices(); it.hasNext();) { def = (IndexDef)it.next(); if (def.getName().equals(realName)) { return def; } } return null; }
class class_name[name] begin[{] method[getIndex, return_type[type[IndexDef]], modifier[public], parameter[name]] begin[{] local_variable[type[String], realName] local_variable[type[IndexDef], def] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=def, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=IndexDef, sub_type=None))), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=def, selectors=[MethodInvocation(arguments=[MemberReference(member=realName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=def, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=getIndices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=it)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) return[literal[null]] end[}] END[}]
Keyword[public] identifier[IndexDef] identifier[getIndex] operator[SEP] identifier[String] identifier[name] operator[SEP] { identifier[String] identifier[realName] operator[=] operator[SEP] identifier[name] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[name] operator[SEP] operator[SEP] identifier[IndexDef] identifier[def] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Iterator] identifier[it] operator[=] identifier[getIndices] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[def] operator[=] operator[SEP] identifier[IndexDef] operator[SEP] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[def] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[realName] operator[SEP] operator[SEP] { Keyword[return] identifier[def] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
protected void initDistributable(XmlParser.Node node) { // the element has no content, so its simple presence // indicates that the webapp is distributable... WebApplicationContext wac=getWebApplicationContext(); if (!wac.isDistributable()) wac.setDistributable(true); }
class class_name[name] begin[{] method[initDistributable, return_type[void], modifier[protected], parameter[node]] begin[{] local_variable[type[WebApplicationContext], wac] if[call[wac.isDistributable, parameter[]]] begin[{] call[wac.setDistributable, parameter[literal[true]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[initDistributable] operator[SEP] identifier[XmlParser] operator[SEP] identifier[Node] identifier[node] operator[SEP] { identifier[WebApplicationContext] identifier[wac] operator[=] identifier[getWebApplicationContext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[wac] operator[SEP] identifier[isDistributable] operator[SEP] operator[SEP] operator[SEP] identifier[wac] operator[SEP] identifier[setDistributable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] }
public void gridToPmesh(String outPutFileName) { try { gridGenerator.writeGridInPmeshFormat(outPutFileName); } catch (IOException e) { logger.debug(e); } }
class class_name[name] begin[{] method[gridToPmesh, return_type[void], modifier[public], parameter[outPutFileName]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=outPutFileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeGridInPmeshFormat, postfix_operators=[], prefix_operators=[], qualifier=gridGenerator, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[gridToPmesh] operator[SEP] identifier[String] identifier[outPutFileName] operator[SEP] { Keyword[try] { identifier[gridGenerator] operator[SEP] identifier[writeGridInPmeshFormat] operator[SEP] identifier[outPutFileName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public void populateFromObj(ClassObj obj) { for (InterfaceObj iobj : obj.getImpls()) { addInterfaceObj(iobj); } addInterfaceObj(obj.getPrimaryImpl()); addImports(obj.getImports()); setPackageName(obj.getFullPackageName()); setProperty(CLASS_OBJ_PROP, obj); if (obj.getSuperClass() != null) { setSuperClass(obj.getSuperClass()); } populateFromObj((ModelObj) obj); }
class class_name[name] begin[{] method[populateFromObj, return_type[void], modifier[public], parameter[obj]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=iobj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addInterfaceObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getImpls, postfix_operators=[], prefix_operators=[], qualifier=obj, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=iobj)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InterfaceObj, sub_type=None))), label=None) call[.addInterfaceObj, parameter[call[obj.getPrimaryImpl, parameter[]]]] call[.addImports, parameter[call[obj.getImports, parameter[]]]] call[.setPackageName, parameter[call[obj.getFullPackageName, parameter[]]]] call[.setProperty, parameter[member[.CLASS_OBJ_PROP], member[.obj]]] if[binary_operation[call[obj.getSuperClass, parameter[]], !=, literal[null]]] begin[{] call[.setSuperClass, parameter[call[obj.getSuperClass, parameter[]]]] else begin[{] None end[}] call[.populateFromObj, parameter[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ModelObj, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[populateFromObj] operator[SEP] identifier[ClassObj] identifier[obj] operator[SEP] { Keyword[for] operator[SEP] identifier[InterfaceObj] identifier[iobj] operator[:] identifier[obj] operator[SEP] identifier[getImpls] operator[SEP] operator[SEP] operator[SEP] { identifier[addInterfaceObj] operator[SEP] identifier[iobj] operator[SEP] operator[SEP] } identifier[addInterfaceObj] operator[SEP] identifier[obj] operator[SEP] identifier[getPrimaryImpl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addImports] operator[SEP] identifier[obj] operator[SEP] identifier[getImports] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setPackageName] operator[SEP] identifier[obj] operator[SEP] identifier[getFullPackageName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setProperty] operator[SEP] identifier[CLASS_OBJ_PROP] , identifier[obj] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[obj] operator[SEP] identifier[getSuperClass] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[setSuperClass] operator[SEP] identifier[obj] operator[SEP] identifier[getSuperClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[populateFromObj] operator[SEP] operator[SEP] identifier[ModelObj] operator[SEP] identifier[obj] operator[SEP] operator[SEP] }
public static boolean hasFavorite(@Nonnull User user, @Nonnull Item item) throws FavoriteException { try { FavoriteUserProperty property = getProperty(user); return property.hasFavorite(item.getFullName()); } catch (IOException e) { throw new FavoriteException("Could not determine Favorite state. User: <" + user.getFullName() + "> Item: <" + item.getFullName() + ">", e); } }
class class_name[name] begin[{] method[hasFavorite, return_type[type[boolean]], modifier[public static], parameter[user, item]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=user, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=property)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FavoriteUserProperty, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFullName, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None)], member=hasFavorite, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not determine Favorite state. User: <"), operandr=MethodInvocation(arguments=[], member=getFullName, postfix_operators=[], prefix_operators=[], qualifier=user, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="> Item: <"), operator=+), operandr=MethodInvocation(arguments=[], member=getFullName, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=">"), 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=FavoriteException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[hasFavorite] operator[SEP] annotation[@] identifier[Nonnull] identifier[User] identifier[user] , annotation[@] identifier[Nonnull] identifier[Item] identifier[item] operator[SEP] Keyword[throws] identifier[FavoriteException] { Keyword[try] { identifier[FavoriteUserProperty] identifier[property] operator[=] identifier[getProperty] operator[SEP] identifier[user] operator[SEP] operator[SEP] Keyword[return] identifier[property] operator[SEP] identifier[hasFavorite] operator[SEP] identifier[item] operator[SEP] identifier[getFullName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[FavoriteException] operator[SEP] literal[String] operator[+] identifier[user] operator[SEP] identifier[getFullName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[item] operator[SEP] identifier[getFullName] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
static Node getNodeInfo(String serviceName) { String jvmName = ManagementFactory.getRuntimeMXBean().getName(); Timestamp censusTimestamp = Timestamp.fromMillis(System.currentTimeMillis()); return Node.newBuilder() .setIdentifier(getProcessIdentifier(jvmName, censusTimestamp)) .setLibraryInfo(getLibraryInfo(OpenCensusLibraryInformation.VERSION)) .setServiceInfo(getServiceInfo(serviceName)) .build(); }
class class_name[name] begin[{] method[getNodeInfo, return_type[type[Node]], modifier[static], parameter[serviceName]] begin[{] local_variable[type[String], jvmName] local_variable[type[Timestamp], censusTimestamp] return[call[Node.newBuilder, parameter[]]] end[}] END[}]
Keyword[static] identifier[Node] identifier[getNodeInfo] operator[SEP] identifier[String] identifier[serviceName] operator[SEP] { identifier[String] identifier[jvmName] operator[=] identifier[ManagementFactory] operator[SEP] identifier[getRuntimeMXBean] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[Timestamp] identifier[censusTimestamp] operator[=] identifier[Timestamp] operator[SEP] identifier[fromMillis] operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Node] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setIdentifier] operator[SEP] identifier[getProcessIdentifier] operator[SEP] identifier[jvmName] , identifier[censusTimestamp] operator[SEP] operator[SEP] operator[SEP] identifier[setLibraryInfo] operator[SEP] identifier[getLibraryInfo] operator[SEP] identifier[OpenCensusLibraryInformation] operator[SEP] identifier[VERSION] operator[SEP] operator[SEP] operator[SEP] identifier[setServiceInfo] operator[SEP] identifier[getServiceInfo] operator[SEP] identifier[serviceName] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public boolean resetConsumable(VacuumConsumableStatus.Names consumable) throws CommandExecutionException { if (consumable == null) throw new CommandExecutionException(CommandExecutionException.Error.INVALID_PARAMETERS); JSONArray params = new JSONArray(); params.put(consumable.toString()); return sendOk("reset_consumable", params); }
class class_name[name] begin[{] method[resetConsumable, return_type[type[boolean]], modifier[public], parameter[consumable]] begin[{] if[binary_operation[member[.consumable], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=INVALID_PARAMETERS, postfix_operators=[], prefix_operators=[], qualifier=CommandExecutionException.Error, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommandExecutionException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[JSONArray], params] call[params.put, parameter[call[consumable.toString, parameter[]]]] return[call[.sendOk, parameter[literal["reset_consumable"], member[.params]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[resetConsumable] operator[SEP] identifier[VacuumConsumableStatus] operator[SEP] identifier[Names] identifier[consumable] operator[SEP] Keyword[throws] identifier[CommandExecutionException] { Keyword[if] operator[SEP] identifier[consumable] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[CommandExecutionException] operator[SEP] identifier[CommandExecutionException] operator[SEP] identifier[Error] operator[SEP] identifier[INVALID_PARAMETERS] operator[SEP] operator[SEP] identifier[JSONArray] identifier[params] operator[=] Keyword[new] identifier[JSONArray] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] identifier[consumable] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[sendOk] operator[SEP] literal[String] , identifier[params] operator[SEP] operator[SEP] }
public void loadAndShow() { // enable or disable the OK button if (getFilesToUpload().isEmpty()) { disableOKButton(Messages.get().key(Messages.GUI_UPLOAD_NOTIFICATION_NO_FILES_0)); setDragAndDropMessage(); } else { enableOKButton(); removeDragAndDropMessage(); } m_uploadedFiles = null; // set the user info displayDialogInfo(Messages.get().key(Messages.GUI_UPLOAD_INFO_SELECTION_0), false); // set the selection summary updateSummary(); // add a upload button m_uploadButton.createFileInput(); // show the popup if (!isShowing()) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { /** * @see com.google.gwt.core.client.Scheduler.ScheduledCommand#execute() */ public void execute() { setContentWrapperHeight(); center(); } }); } center(); }
class class_name[name] begin[{] method[loadAndShow, return_type[void], modifier[public], parameter[]] begin[{] if[call[.getFilesToUpload, parameter[]]] begin[{] call[.disableOKButton, parameter[call[Messages.get, parameter[]]]] call[.setDragAndDropMessage, parameter[]] else begin[{] call[.enableOKButton, parameter[]] call[.removeDragAndDropMessage, parameter[]] end[}] assign[member[.m_uploadedFiles], literal[null]] call[.displayDialogInfo, parameter[call[Messages.get, parameter[]], literal[false]]] call[.updateSummary, parameter[]] call[m_uploadButton.createFileInput, parameter[]] if[call[.isShowing, parameter[]]] begin[{] call[Scheduler.get, parameter[]] else begin[{] None end[}] call[.center, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[loadAndShow] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[getFilesToUpload] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[disableOKButton] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_UPLOAD_NOTIFICATION_NO_FILES_0] operator[SEP] operator[SEP] operator[SEP] identifier[setDragAndDropMessage] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[enableOKButton] operator[SEP] operator[SEP] operator[SEP] identifier[removeDragAndDropMessage] operator[SEP] operator[SEP] operator[SEP] } identifier[m_uploadedFiles] operator[=] Other[null] operator[SEP] identifier[displayDialogInfo] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_UPLOAD_INFO_SELECTION_0] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] identifier[updateSummary] operator[SEP] operator[SEP] operator[SEP] identifier[m_uploadButton] operator[SEP] identifier[createFileInput] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isShowing] operator[SEP] operator[SEP] operator[SEP] { identifier[Scheduler] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[scheduleDeferred] operator[SEP] Keyword[new] identifier[ScheduledCommand] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[execute] operator[SEP] operator[SEP] { identifier[setContentWrapperHeight] operator[SEP] operator[SEP] operator[SEP] identifier[center] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } identifier[center] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings ( "unchecked" ) @Override public <T extends Address> T unwrap ( Class<T> type ) { if ( this.addr instanceof Address ) { return ( (Address) this.addr ).unwrap(type); } else if ( this.getClass().isAssignableFrom(type) ) { return (T) this; } return null; }
class class_name[name] begin[{] method[unwrap, return_type[type[T]], modifier[public], parameter[type]] begin[{] if[binary_operation[THIS[member[None.addr]], instanceof, type[Address]]] begin[{] return[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=addr, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type=ReferenceType(arguments=None, dimensions=[], name=Address, sub_type=None))] else begin[{] if[THIS[call[None.getClass, parameter[]]call[None.isAssignableFrom, parameter[member[.type]]]]] begin[{] return[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))] else begin[{] None end[}] end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[Address] operator[>] identifier[T] identifier[unwrap] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[addr] Keyword[instanceof] identifier[Address] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[Address] operator[SEP] Keyword[this] operator[SEP] identifier[addr] operator[SEP] operator[SEP] identifier[unwrap] operator[SEP] identifier[type] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[type] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[T] operator[SEP] Keyword[this] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public void beginDelete(String resourceGroupName, String publicIpAddressName) { beginDeleteWithServiceResponseAsync(resourceGroupName, publicIpAddressName).toBlocking().single().body(); }
class class_name[name] begin[{] method[beginDelete, return_type[void], modifier[public], parameter[resourceGroupName, publicIpAddressName]] begin[{] call[.beginDeleteWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.publicIpAddressName]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[beginDelete] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[publicIpAddressName] operator[SEP] { identifier[beginDeleteWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[publicIpAddressName] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public static <T> Maker<T> cycle(T first, T... rest) { ImmutableList<T> values = ImmutableList.<T>builder().add(first).add(rest).build(); return new RangeValuesMaker<T>(Iterables.cycle(values).iterator()); }
class class_name[name] begin[{] method[cycle, return_type[type[Maker]], modifier[public static], parameter[first, rest]] begin[{] local_variable[type[ImmutableList], values] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cycle, postfix_operators=[], prefix_operators=[], qualifier=Iterables, 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=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=RangeValuesMaker, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Maker] operator[<] identifier[T] operator[>] identifier[cycle] operator[SEP] identifier[T] identifier[first] , identifier[T] operator[...] identifier[rest] operator[SEP] { identifier[ImmutableList] operator[<] identifier[T] operator[>] identifier[values] operator[=] identifier[ImmutableList] operator[SEP] operator[<] identifier[T] operator[>] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[first] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[rest] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[RangeValuesMaker] operator[<] identifier[T] operator[>] operator[SEP] identifier[Iterables] operator[SEP] identifier[cycle] operator[SEP] identifier[values] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@JsOverlay public static <T extends IsVueComponent> void component(String id, VueComponentFactory<T> vueFactory) { component(id, vueFactory.getJsConstructor()); }
class class_name[name] begin[{] method[component, return_type[void], modifier[public static], parameter[id, vueFactory]] begin[{] call[.component, parameter[member[.id], call[vueFactory.getJsConstructor, parameter[]]]] end[}] END[}]
annotation[@] identifier[JsOverlay] Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[IsVueComponent] operator[>] Keyword[void] identifier[component] operator[SEP] identifier[String] identifier[id] , identifier[VueComponentFactory] operator[<] identifier[T] operator[>] identifier[vueFactory] operator[SEP] { identifier[component] operator[SEP] identifier[id] , identifier[vueFactory] operator[SEP] identifier[getJsConstructor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://www.ibm.com/websphere/wim", name = "facsimileTelephoneNumber") public JAXBElement<String> createFacsimileTelephoneNumber(String value) { return new JAXBElement<String>(_FacsimileTelephoneNumber_QNAME, String.class, null, value); }
class class_name[name] begin[{] method[createFacsimileTelephoneNumber, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_FacsimileTelephoneNumber_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[String] operator[>] identifier[createFacsimileTelephoneNumber] operator[SEP] identifier[String] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[String] operator[>] operator[SEP] identifier[_FacsimileTelephoneNumber_QNAME] , identifier[String] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
public static Trades adaptTrades( BitcoindeTradesWrapper bitcoindeTradesWrapper, CurrencyPair currencyPair) { List<Trade> trades = new ArrayList<>(); long lastTradeId = 0; for (BitcoindeTrade bitcoindeTrade : bitcoindeTradesWrapper.getTrades()) { final long tid = bitcoindeTrade.getTid(); if (tid > lastTradeId) { lastTradeId = tid; } trades.add( new Trade( null, bitcoindeTrade.getAmount(), currencyPair, bitcoindeTrade.getPrice(), DateUtils.fromMillisUtc(bitcoindeTrade.getDate() * 1000L), String.valueOf(tid))); } return new Trades(trades, lastTradeId, TradeSortType.SortByID); }
class class_name[name] begin[{] method[adaptTrades, return_type[type[Trades]], modifier[public static], parameter[bitcoindeTradesWrapper, currencyPair]] begin[{] local_variable[type[List], trades] local_variable[type[long], lastTradeId] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getTid, postfix_operators=[], prefix_operators=[], qualifier=bitcoindeTrade, selectors=[], type_arguments=None), name=tid)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=lastTradeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastTradeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=tid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MethodInvocation(arguments=[], member=getAmount, postfix_operators=[], prefix_operators=[], qualifier=bitcoindeTrade, selectors=[], type_arguments=None), MemberReference(member=currencyPair, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getPrice, postfix_operators=[], prefix_operators=[], qualifier=bitcoindeTrade, selectors=[], type_arguments=None), MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getDate, postfix_operators=[], prefix_operators=[], qualifier=bitcoindeTrade, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000L), operator=*)], member=fromMillisUtc, postfix_operators=[], prefix_operators=[], qualifier=DateUtils, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=tid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Trade, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=trades, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getTrades, postfix_operators=[], prefix_operators=[], qualifier=bitcoindeTradesWrapper, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=bitcoindeTrade)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BitcoindeTrade, sub_type=None))), label=None) return[ClassCreator(arguments=[MemberReference(member=trades, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastTradeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SortByID, postfix_operators=[], prefix_operators=[], qualifier=TradeSortType, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Trades, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Trades] identifier[adaptTrades] operator[SEP] identifier[BitcoindeTradesWrapper] identifier[bitcoindeTradesWrapper] , identifier[CurrencyPair] identifier[currencyPair] operator[SEP] { identifier[List] operator[<] identifier[Trade] operator[>] identifier[trades] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[lastTradeId] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[BitcoindeTrade] identifier[bitcoindeTrade] operator[:] identifier[bitcoindeTradesWrapper] operator[SEP] identifier[getTrades] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] Keyword[long] identifier[tid] operator[=] identifier[bitcoindeTrade] operator[SEP] identifier[getTid] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tid] operator[>] identifier[lastTradeId] operator[SEP] { identifier[lastTradeId] operator[=] identifier[tid] operator[SEP] } identifier[trades] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Trade] operator[SEP] Other[null] , identifier[bitcoindeTrade] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] , identifier[currencyPair] , identifier[bitcoindeTrade] operator[SEP] identifier[getPrice] operator[SEP] operator[SEP] , identifier[DateUtils] operator[SEP] identifier[fromMillisUtc] operator[SEP] identifier[bitcoindeTrade] operator[SEP] identifier[getDate] operator[SEP] operator[SEP] operator[*] Other[1000L] operator[SEP] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[tid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[Trades] operator[SEP] identifier[trades] , identifier[lastTradeId] , identifier[TradeSortType] operator[SEP] identifier[SortByID] operator[SEP] operator[SEP] }
public CommandLine setEndOfOptionsDelimiter(String delimiter) { getCommandSpec().parser().endOfOptionsDelimiter(delimiter); for (CommandLine command : getCommandSpec().subcommands().values()) { command.setEndOfOptionsDelimiter(delimiter); } return this; }
class class_name[name] begin[{] method[setEndOfOptionsDelimiter, return_type[type[CommandLine]], modifier[public], parameter[delimiter]] begin[{] call[.getCommandSpec, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=delimiter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setEndOfOptionsDelimiter, postfix_operators=[], prefix_operators=[], qualifier=command, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getCommandSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=subcommands, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=values, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=command)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CommandLine, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[CommandLine] identifier[setEndOfOptionsDelimiter] operator[SEP] identifier[String] identifier[delimiter] operator[SEP] { identifier[getCommandSpec] operator[SEP] operator[SEP] operator[SEP] identifier[parser] operator[SEP] operator[SEP] operator[SEP] identifier[endOfOptionsDelimiter] operator[SEP] identifier[delimiter] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CommandLine] identifier[command] operator[:] identifier[getCommandSpec] operator[SEP] operator[SEP] operator[SEP] identifier[subcommands] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[command] operator[SEP] identifier[setEndOfOptionsDelimiter] operator[SEP] identifier[delimiter] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public StringUTF8Token visitStringUTF8(EditsElement e) throws IOException { return (StringUTF8Token)visit(tokenizer.read(new StringUTF8Token(e))); }
class class_name[name] begin[{] method[visitStringUTF8, return_type[type[StringUTF8Token]], modifier[public], parameter[e]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringUTF8Token, sub_type=None))], member=read, postfix_operators=[], prefix_operators=[], qualifier=tokenizer, selectors=[], type_arguments=None)], member=visit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=StringUTF8Token, sub_type=None))] end[}] END[}]
Keyword[public] identifier[StringUTF8Token] identifier[visitStringUTF8] operator[SEP] identifier[EditsElement] identifier[e] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] operator[SEP] identifier[StringUTF8Token] operator[SEP] identifier[visit] operator[SEP] identifier[tokenizer] operator[SEP] identifier[read] operator[SEP] Keyword[new] identifier[StringUTF8Token] operator[SEP] identifier[e] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public DataColumns queryForId(TableColumnKey key) throws SQLException { DataColumns dataColumns = null; if (key != null) { Map<String, Object> fieldValues = new HashMap<String, Object>(); fieldValues.put(DataColumns.COLUMN_TABLE_NAME, key.getTableName()); fieldValues .put(DataColumns.COLUMN_COLUMN_NAME, key.getColumnName()); List<DataColumns> results = queryForFieldValues(fieldValues); if (!results.isEmpty()) { if (results.size() > 1) { throw new SQLException("More than one " + DataColumns.class.getSimpleName() + " returned for key. Table Name: " + key.getTableName() + ", Column Name: " + key.getColumnName()); } dataColumns = results.get(0); } } return dataColumns; }
class class_name[name] begin[{] method[queryForId, return_type[type[DataColumns]], modifier[public], parameter[key]] begin[{] local_variable[type[DataColumns], dataColumns] if[binary_operation[member[.key], !=, literal[null]]] begin[{] local_variable[type[Map], fieldValues] call[fieldValues.put, parameter[member[DataColumns.COLUMN_TABLE_NAME], call[key.getTableName, parameter[]]]] call[fieldValues.put, parameter[member[DataColumns.COLUMN_COLUMN_NAME], call[key.getColumnName, parameter[]]]] local_variable[type[List], results] if[call[results.isEmpty, parameter[]]] begin[{] if[binary_operation[call[results.size, parameter[]], >, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="More than one "), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=DataColumns, sub_type=None)), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" returned for key. Table Name: "), operator=+), operandr=MethodInvocation(arguments=[], member=getTableName, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", Column Name: "), operator=+), operandr=MethodInvocation(arguments=[], member=getColumnName, postfix_operators=[], prefix_operators=[], qualifier=key, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SQLException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.dataColumns], call[results.get, parameter[literal[0]]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.dataColumns]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DataColumns] identifier[queryForId] operator[SEP] identifier[TableColumnKey] identifier[key] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[DataColumns] identifier[dataColumns] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[key] operator[!=] Other[null] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[fieldValues] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[fieldValues] operator[SEP] identifier[put] operator[SEP] identifier[DataColumns] operator[SEP] identifier[COLUMN_TABLE_NAME] , identifier[key] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fieldValues] operator[SEP] identifier[put] operator[SEP] identifier[DataColumns] operator[SEP] identifier[COLUMN_COLUMN_NAME] , identifier[key] operator[SEP] identifier[getColumnName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[DataColumns] operator[>] identifier[results] operator[=] identifier[queryForFieldValues] operator[SEP] identifier[fieldValues] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[results] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[results] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[SQLException] operator[SEP] literal[String] operator[+] identifier[DataColumns] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[key] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[key] operator[SEP] identifier[getColumnName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[dataColumns] operator[=] identifier[results] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } } Keyword[return] identifier[dataColumns] operator[SEP] }
protected final void useResultSet( ResultSet pResultSet ) throws SQLException { boolean lFirst = true; if( !pResultSet.next() ) { handleEmptyResultSet(); } else { while( lFirst || pResultSet.next() ) { lFirst = false; useResultSetRow( pResultSet ); } } }
class class_name[name] begin[{] method[useResultSet, return_type[void], modifier[final protected], parameter[pResultSet]] begin[{] local_variable[type[boolean], lFirst] if[call[pResultSet.next, parameter[]]] begin[{] call[.handleEmptyResultSet, parameter[]] else begin[{] while[binary_operation[member[.lFirst], ||, call[pResultSet.next, parameter[]]]] begin[{] assign[member[.lFirst], literal[false]] call[.useResultSetRow, parameter[member[.pResultSet]]] end[}] end[}] end[}] END[}]
Keyword[protected] Keyword[final] Keyword[void] identifier[useResultSet] operator[SEP] identifier[ResultSet] identifier[pResultSet] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[boolean] identifier[lFirst] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[pResultSet] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] { identifier[handleEmptyResultSet] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[while] operator[SEP] identifier[lFirst] operator[||] identifier[pResultSet] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] { identifier[lFirst] operator[=] literal[boolean] operator[SEP] identifier[useResultSetRow] operator[SEP] identifier[pResultSet] operator[SEP] operator[SEP] } } }
public void addTextFieldReadOnly(int tabIndex, String fieldLabel, String value) { addTextComponent(tabIndex, new ZapLabel(), fieldLabel, value); }
class class_name[name] begin[{] method[addTextFieldReadOnly, return_type[void], modifier[public], parameter[tabIndex, fieldLabel, value]] begin[{] call[.addTextComponent, parameter[member[.tabIndex], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ZapLabel, sub_type=None)), member[.fieldLabel], member[.value]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addTextFieldReadOnly] operator[SEP] Keyword[int] identifier[tabIndex] , identifier[String] identifier[fieldLabel] , identifier[String] identifier[value] operator[SEP] { identifier[addTextComponent] operator[SEP] identifier[tabIndex] , Keyword[new] identifier[ZapLabel] operator[SEP] operator[SEP] , identifier[fieldLabel] , identifier[value] operator[SEP] operator[SEP] }
@Override public boolean getUseParentHandlers() { Boolean value = _useParentHandlers.get(); if (value != null) return Boolean.TRUE.equals(value); else return true; }
class class_name[name] begin[{] method[getUseParentHandlers, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[Boolean], value] if[binary_operation[member[.value], !=, literal[null]]] begin[{] return[call[Boolean.TRUE.equals, parameter[member[.value]]]] else begin[{] return[literal[true]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[getUseParentHandlers] operator[SEP] operator[SEP] { identifier[Boolean] identifier[value] operator[=] identifier[_useParentHandlers] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[Boolean] operator[SEP] identifier[TRUE] operator[SEP] identifier[equals] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[else] Keyword[return] literal[boolean] operator[SEP] }
public static void show(View view) { view.postDelayed(() -> Managers.inputMethod(view.getContext()).showSoftInput(view, 0), 300L); // give InputMethodManager some time to recognise that the View is focused }
class class_name[name] begin[{] method[show, return_type[void], modifier[public static], parameter[view]] begin[{] call[view.postDelayed, parameter[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getContext, postfix_operators=[], prefix_operators=[], qualifier=view, selectors=[], type_arguments=None)], member=inputMethod, postfix_operators=[], prefix_operators=[], qualifier=Managers, selectors=[MethodInvocation(arguments=[MemberReference(member=view, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=showSoftInput, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), parameters=[]), literal[300L]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[show] operator[SEP] identifier[View] identifier[view] operator[SEP] { identifier[view] operator[SEP] identifier[postDelayed] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[Managers] operator[SEP] identifier[inputMethod] operator[SEP] identifier[view] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[showSoftInput] operator[SEP] identifier[view] , Other[0] operator[SEP] , Other[300L] operator[SEP] operator[SEP] }
public static MutableLongTuple addScaled( LongTuple t0, long factor, LongTuple t1, MutableLongTuple result) { return LongTupleFunctions.apply( t0, t1, (a,b)->(a+factor*b), result); }
class class_name[name] begin[{] method[addScaled, return_type[type[MutableLongTuple]], modifier[public static], parameter[t0, factor, t1, result]] begin[{] return[call[LongTupleFunctions.apply, parameter[member[.t0], member[.t1], LambdaExpression(body=BinaryOperation(operandl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=factor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+), parameters=[InferredFormalParameter(name=a), InferredFormalParameter(name=b)]), member[.result]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MutableLongTuple] identifier[addScaled] operator[SEP] identifier[LongTuple] identifier[t0] , Keyword[long] identifier[factor] , identifier[LongTuple] identifier[t1] , identifier[MutableLongTuple] identifier[result] operator[SEP] { Keyword[return] identifier[LongTupleFunctions] operator[SEP] identifier[apply] operator[SEP] identifier[t0] , identifier[t1] , operator[SEP] identifier[a] , identifier[b] operator[SEP] operator[->] operator[SEP] identifier[a] operator[+] identifier[factor] operator[*] identifier[b] operator[SEP] , identifier[result] operator[SEP] operator[SEP] }
protected void writeTerminalCount(final BitOutputStream out, final long value, final long max) throws IOException { assert 0 <= value; assert max >= value; if (SERIALIZATION_CHECKS) { out.write(SerializationChecks.BeforeTerminal); } out.writeBoundedLong(value, 1 + max); if (SERIALIZATION_CHECKS) { out.write(SerializationChecks.AfterTerminal); } }
class class_name[name] begin[{] method[writeTerminalCount, return_type[void], modifier[protected], parameter[out, value, max]] begin[{] AssertStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operandr=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=max, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), label=None, value=None) if[member[.SERIALIZATION_CHECKS]] begin[{] call[out.write, parameter[member[SerializationChecks.BeforeTerminal]]] else begin[{] None end[}] call[out.writeBoundedLong, parameter[member[.value], binary_operation[literal[1], +, member[.max]]]] if[member[.SERIALIZATION_CHECKS]] begin[{] call[out.write, parameter[member[SerializationChecks.AfterTerminal]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[writeTerminalCount] operator[SEP] Keyword[final] identifier[BitOutputStream] identifier[out] , Keyword[final] Keyword[long] identifier[value] , Keyword[final] Keyword[long] identifier[max] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[assert] Other[0] operator[<=] identifier[value] operator[SEP] Keyword[assert] identifier[max] operator[>=] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[SERIALIZATION_CHECKS] operator[SEP] { identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[SerializationChecks] operator[SEP] identifier[BeforeTerminal] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[writeBoundedLong] operator[SEP] identifier[value] , Other[1] operator[+] identifier[max] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[SERIALIZATION_CHECKS] operator[SEP] { identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[SerializationChecks] operator[SEP] identifier[AfterTerminal] operator[SEP] operator[SEP] } }
public ServiceFuture<VirtualNetworkInner> createOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters, final ServiceCallback<VirtualNetworkInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters), serviceCallback); }
class class_name[name] begin[{] method[createOrUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, virtualNetworkName, parameters, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.virtualNetworkName], member[.parameters]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[VirtualNetworkInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualNetworkName] , identifier[VirtualNetworkInner] identifier[parameters] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[VirtualNetworkInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[createOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[virtualNetworkName] , identifier[parameters] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public void show(int gravity, int x, int y) { initializePopupWindow(); mPopupWindow.showAtLocation(mTrigger, gravity, x, y); mPopupWindow.update(); // 此处如果ContentView有入场动画的话,显示动画 if (null != contentInAnimation) { mContentView.startAnimation(contentInAnimation); } }
class class_name[name] begin[{] method[show, return_type[void], modifier[public], parameter[gravity, x, y]] begin[{] call[.initializePopupWindow, parameter[]] call[mPopupWindow.showAtLocation, parameter[member[.mTrigger], member[.gravity], member[.x], member[.y]]] call[mPopupWindow.update, parameter[]] if[binary_operation[literal[null], !=, member[.contentInAnimation]]] begin[{] call[mContentView.startAnimation, parameter[member[.contentInAnimation]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[show] operator[SEP] Keyword[int] identifier[gravity] , Keyword[int] identifier[x] , Keyword[int] identifier[y] operator[SEP] { identifier[initializePopupWindow] operator[SEP] operator[SEP] operator[SEP] identifier[mPopupWindow] operator[SEP] identifier[showAtLocation] operator[SEP] identifier[mTrigger] , identifier[gravity] , identifier[x] , identifier[y] operator[SEP] operator[SEP] identifier[mPopupWindow] operator[SEP] identifier[update] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[contentInAnimation] operator[SEP] { identifier[mContentView] operator[SEP] identifier[startAnimation] operator[SEP] identifier[contentInAnimation] operator[SEP] operator[SEP] } }
public void resetInterval(Localizable localizable) { final int intervalHorizontalOld = intervalHorizontal; final int intervalVerticalOld = intervalVertical; final double oldX = getX(); final double oldY = getY(); setIntervals(0, 0); offset.setLocation(0.0, 0.0); setLocation(localizable.getX(), localizable.getY()); final double newX = getX(); final double newY = getY(); moveLocation(1.0, oldX - newX, oldY - newY); moveLocation(1.0, newX - oldX, newY - oldY); setIntervals(intervalHorizontalOld, intervalVerticalOld); offset.setLocation(0.0, 0.0); }
class class_name[name] begin[{] method[resetInterval, return_type[void], modifier[public], parameter[localizable]] begin[{] local_variable[type[int], intervalHorizontalOld] local_variable[type[int], intervalVerticalOld] local_variable[type[double], oldX] local_variable[type[double], oldY] call[.setIntervals, parameter[literal[0], literal[0]]] call[offset.setLocation, parameter[literal[0.0], literal[0.0]]] call[.setLocation, parameter[call[localizable.getX, parameter[]], call[localizable.getY, parameter[]]]] local_variable[type[double], newX] local_variable[type[double], newY] call[.moveLocation, parameter[literal[1.0], binary_operation[member[.oldX], -, member[.newX]], binary_operation[member[.oldY], -, member[.newY]]]] call[.moveLocation, parameter[literal[1.0], binary_operation[member[.newX], -, member[.oldX]], binary_operation[member[.newY], -, member[.oldY]]]] call[.setIntervals, parameter[member[.intervalHorizontalOld], member[.intervalVerticalOld]]] call[offset.setLocation, parameter[literal[0.0], literal[0.0]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[resetInterval] operator[SEP] identifier[Localizable] identifier[localizable] operator[SEP] { Keyword[final] Keyword[int] identifier[intervalHorizontalOld] operator[=] identifier[intervalHorizontal] operator[SEP] Keyword[final] Keyword[int] identifier[intervalVerticalOld] operator[=] identifier[intervalVertical] operator[SEP] Keyword[final] Keyword[double] identifier[oldX] operator[=] identifier[getX] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[oldY] operator[=] identifier[getY] operator[SEP] operator[SEP] operator[SEP] identifier[setIntervals] operator[SEP] Other[0] , Other[0] operator[SEP] operator[SEP] identifier[offset] operator[SEP] identifier[setLocation] operator[SEP] literal[Float] , literal[Float] operator[SEP] operator[SEP] identifier[setLocation] operator[SEP] identifier[localizable] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[localizable] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[newX] operator[=] identifier[getX] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[newY] operator[=] identifier[getY] operator[SEP] operator[SEP] operator[SEP] identifier[moveLocation] operator[SEP] literal[Float] , identifier[oldX] operator[-] identifier[newX] , identifier[oldY] operator[-] identifier[newY] operator[SEP] operator[SEP] identifier[moveLocation] operator[SEP] literal[Float] , identifier[newX] operator[-] identifier[oldX] , identifier[newY] operator[-] identifier[oldY] operator[SEP] operator[SEP] identifier[setIntervals] operator[SEP] identifier[intervalHorizontalOld] , identifier[intervalVerticalOld] operator[SEP] operator[SEP] identifier[offset] operator[SEP] identifier[setLocation] operator[SEP] literal[Float] , literal[Float] operator[SEP] operator[SEP] }
public void setActionListener(ActionListener listener) { for (int i = 0; i < this.radioButtons.length; i++) { this.radioButtons[i].addActionListener(listener); } }
class class_name[name] begin[{] method[setActionListener, return_type[void], modifier[public], parameter[listener]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=radioButtons, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addActionListener, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=radioButtons, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[setActionListener] operator[SEP] identifier[ActionListener] identifier[listener] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Keyword[this] operator[SEP] identifier[radioButtons] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[this] operator[SEP] identifier[radioButtons] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[addActionListener] operator[SEP] identifier[listener] operator[SEP] operator[SEP] } }
public int edit() throws DBException { if (m_iLogicalFilePosition == UNKNOWN_POSITION) throw new DatabaseException(DBConstants.INVALID_RECORD); // Data source exception else if (m_iLogicalFilePosition == ADD_NEW_POSITION) { // addNew - No extra processing (Usually locking a refeshed record) } else if (m_iLogicalFilePosition != m_iPhysicalFilePosition) { // Move to this physical location try { DataRecord dataRecord = (DataRecord)this.elementAt(m_iLogicalFilePosition); m_iPhysicalFilePosition = m_iLogicalFilePosition; this.getNextTable().addNew(); // Make sure setHandle doesn't just use the current record! dataRecord.setBuffer(null); // Make sure you don't just restore the cached copy boolean bFound = this.getNextTable().setDataRecord(dataRecord); if (bFound) this.addRecordReference(m_iLogicalFilePosition); // Update data record to current copy if (!bFound) throw new DatabaseException(DBConstants.INVALID_RECORD); // Data source exception } catch (DBException ex) { ex.printStackTrace(); // Ignore exception? } } return super.edit(); }
class class_name[name] begin[{] method[edit, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.m_iLogicalFilePosition], ==, member[.UNKNOWN_POSITION]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=INVALID_RECORD, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatabaseException, sub_type=None)), label=None) else begin[{] if[binary_operation[member[.m_iLogicalFilePosition], ==, member[.ADD_NEW_POSITION]]] begin[{] else begin[{] if[binary_operation[member[.m_iLogicalFilePosition], !=, member[.m_iPhysicalFilePosition]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=m_iLogicalFilePosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=elementAt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=DataRecord, sub_type=None)), name=dataRecord)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DataRecord, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=m_iPhysicalFilePosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=m_iLogicalFilePosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getNextTable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addNew, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=setBuffer, postfix_operators=[], prefix_operators=[], qualifier=dataRecord, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getNextTable, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=dataRecord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setDataRecord, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=bFound)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=bFound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=m_iLogicalFilePosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addRecordReference, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)), IfStatement(condition=MemberReference(member=bFound, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=INVALID_RECORD, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatabaseException, sub_type=None)), label=None))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['DBException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] end[}] return[SuperMethodInvocation(arguments=[], member=edit, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
Keyword[public] Keyword[int] identifier[edit] operator[SEP] operator[SEP] Keyword[throws] identifier[DBException] { Keyword[if] operator[SEP] identifier[m_iLogicalFilePosition] operator[==] identifier[UNKNOWN_POSITION] operator[SEP] Keyword[throw] Keyword[new] identifier[DatabaseException] operator[SEP] identifier[DBConstants] operator[SEP] identifier[INVALID_RECORD] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[m_iLogicalFilePosition] operator[==] identifier[ADD_NEW_POSITION] operator[SEP] { } Keyword[else] Keyword[if] operator[SEP] identifier[m_iLogicalFilePosition] operator[!=] identifier[m_iPhysicalFilePosition] operator[SEP] { Keyword[try] { identifier[DataRecord] identifier[dataRecord] operator[=] operator[SEP] identifier[DataRecord] operator[SEP] Keyword[this] operator[SEP] identifier[elementAt] operator[SEP] identifier[m_iLogicalFilePosition] operator[SEP] operator[SEP] identifier[m_iPhysicalFilePosition] operator[=] identifier[m_iLogicalFilePosition] operator[SEP] Keyword[this] operator[SEP] identifier[getNextTable] operator[SEP] operator[SEP] operator[SEP] identifier[addNew] operator[SEP] operator[SEP] operator[SEP] identifier[dataRecord] operator[SEP] identifier[setBuffer] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[boolean] identifier[bFound] operator[=] Keyword[this] operator[SEP] identifier[getNextTable] operator[SEP] operator[SEP] operator[SEP] identifier[setDataRecord] operator[SEP] identifier[dataRecord] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bFound] operator[SEP] Keyword[this] operator[SEP] identifier[addRecordReference] operator[SEP] identifier[m_iLogicalFilePosition] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[bFound] operator[SEP] Keyword[throw] Keyword[new] identifier[DatabaseException] operator[SEP] identifier[DBConstants] operator[SEP] identifier[INVALID_RECORD] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[DBException] identifier[ex] operator[SEP] { identifier[ex] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Keyword[super] operator[SEP] identifier[edit] operator[SEP] operator[SEP] operator[SEP] }
public boolean offer(Runnable o) { int poolSize = threadPoolExecutor.getPoolSize(); // we are maxed out on threads, simply queue the object if (poolSize == threadPoolExecutor.getMaximumPoolSize()) { return super.offer(o); } // we have idle threads, just add it to the queue // note that we don't use getActiveCount(), see BZ 49730 if (threadPoolExecutor.getSubmittedTasksCount() <= poolSize) { return super.offer(o); } // if we have less threads than maximum force creation of a new // thread if (poolSize < threadPoolExecutor.getMaximumPoolSize()) { return false; } // if we reached here, we need to add it to the queue return super.offer(o); }
class class_name[name] begin[{] method[offer, return_type[type[boolean]], modifier[public], parameter[o]] begin[{] local_variable[type[int], poolSize] if[binary_operation[member[.poolSize], ==, call[threadPoolExecutor.getMaximumPoolSize, parameter[]]]] begin[{] return[SuperMethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=offer, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] else begin[{] None end[}] if[binary_operation[call[threadPoolExecutor.getSubmittedTasksCount, parameter[]], <=, member[.poolSize]]] begin[{] return[SuperMethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=offer, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] else begin[{] None end[}] if[binary_operation[member[.poolSize], <, call[threadPoolExecutor.getMaximumPoolSize, parameter[]]]] begin[{] return[literal[false]] else begin[{] None end[}] return[SuperMethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=offer, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[offer] operator[SEP] identifier[Runnable] identifier[o] operator[SEP] { Keyword[int] identifier[poolSize] operator[=] identifier[threadPoolExecutor] operator[SEP] identifier[getPoolSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[poolSize] operator[==] identifier[threadPoolExecutor] operator[SEP] identifier[getMaximumPoolSize] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[super] operator[SEP] identifier[offer] operator[SEP] identifier[o] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[threadPoolExecutor] operator[SEP] identifier[getSubmittedTasksCount] operator[SEP] operator[SEP] operator[<=] identifier[poolSize] operator[SEP] { Keyword[return] Keyword[super] operator[SEP] identifier[offer] operator[SEP] identifier[o] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[poolSize] operator[<] identifier[threadPoolExecutor] operator[SEP] identifier[getMaximumPoolSize] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[offer] operator[SEP] identifier[o] operator[SEP] operator[SEP] }
public void setAttribute(ObjectName name, String attrName, Object value) throws Exception { checkClientConnected(); Attribute attribute = new Attribute(attrName, value); mbeanConn.setAttribute(name, attribute); }
class class_name[name] begin[{] method[setAttribute, return_type[void], modifier[public], parameter[name, attrName, value]] begin[{] call[.checkClientConnected, parameter[]] local_variable[type[Attribute], attribute] call[mbeanConn.setAttribute, parameter[member[.name], member[.attribute]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAttribute] operator[SEP] identifier[ObjectName] identifier[name] , identifier[String] identifier[attrName] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[Exception] { identifier[checkClientConnected] operator[SEP] operator[SEP] operator[SEP] identifier[Attribute] identifier[attribute] operator[=] Keyword[new] identifier[Attribute] operator[SEP] identifier[attrName] , identifier[value] operator[SEP] operator[SEP] identifier[mbeanConn] operator[SEP] identifier[setAttribute] operator[SEP] identifier[name] , identifier[attribute] operator[SEP] operator[SEP] }
@FFDCIgnore(IllegalStateException.class) private static String get(String propertyName) { String tmpObj = null; if (bContext != null) { try { tmpObj = bContext.getProperty(propertyName); } catch (IllegalStateException ise) { } } if (tmpObj == null) { tmpObj = System.getProperty(propertyName); } return tmpObj; }
class class_name[name] begin[{] method[get, return_type[type[String]], modifier[private static], parameter[propertyName]] begin[{] local_variable[type[String], tmpObj] if[binary_operation[member[.bContext], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=tmpObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=bContext, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ise, types=['IllegalStateException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[binary_operation[member[.tmpObj], ==, literal[null]]] begin[{] assign[member[.tmpObj], call[System.getProperty, parameter[member[.propertyName]]]] else begin[{] None end[}] return[member[.tmpObj]] end[}] END[}]
annotation[@] identifier[FFDCIgnore] operator[SEP] identifier[IllegalStateException] operator[SEP] Keyword[class] operator[SEP] Keyword[private] Keyword[static] identifier[String] identifier[get] operator[SEP] identifier[String] identifier[propertyName] operator[SEP] { identifier[String] identifier[tmpObj] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[bContext] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[tmpObj] operator[=] identifier[bContext] operator[SEP] identifier[getProperty] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalStateException] identifier[ise] operator[SEP] { } } Keyword[if] operator[SEP] identifier[tmpObj] operator[==] Other[null] operator[SEP] { identifier[tmpObj] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] } Keyword[return] identifier[tmpObj] operator[SEP] }
public void dump(YamlNode data, OutputStream output) { getDelegate().dump(data, new OutputStreamWriter(output, Charset .forName("UTF-8"))); }
class class_name[name] begin[{] method[dump, return_type[void], modifier[public], parameter[data, output]] begin[{] call[.getDelegate, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[dump] operator[SEP] identifier[YamlNode] identifier[data] , identifier[OutputStream] identifier[output] operator[SEP] { identifier[getDelegate] operator[SEP] operator[SEP] operator[SEP] identifier[dump] operator[SEP] identifier[data] , Keyword[new] identifier[OutputStreamWriter] operator[SEP] identifier[output] , identifier[Charset] operator[SEP] identifier[forName] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public DeleteProjectResult deleteProject(DeleteProjectRequest request) { request = beforeClientExecution(request); return executeDeleteProject(request); }
class class_name[name] begin[{] method[deleteProject, return_type[type[DeleteProjectResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDeleteProject, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DeleteProjectResult] identifier[deleteProject] operator[SEP] identifier[DeleteProjectRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDeleteProject] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static boolean contains(String target, List<String> containWith) { if (isNull(target)) { return false; } return matcher(target).contains(containWith); }
class class_name[name] begin[{] method[contains, return_type[type[boolean]], modifier[public static], parameter[target, containWith]] begin[{] if[call[.isNull, parameter[member[.target]]]] begin[{] return[literal[false]] else begin[{] None end[}] return[call[.matcher, parameter[member[.target]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[contains] operator[SEP] identifier[String] identifier[target] , identifier[List] operator[<] identifier[String] operator[>] identifier[containWith] operator[SEP] { Keyword[if] operator[SEP] identifier[isNull] operator[SEP] identifier[target] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] identifier[matcher] operator[SEP] identifier[target] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[containWith] operator[SEP] operator[SEP] }
final void cmdRemoveExpiring(final long lockId, final PersistentTransaction transaction) throws ProtocolException, TransactionException, SevereMessageStoreException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "cmdRemoveExpiring", new Object[] { "Item Link: " + this, "Stream Link: " + _owningStreamLink, formatLockId(lockId), "Transaction: " + transaction }); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "expiring item " + _tuple.getUniqueId()); synchronized (this) { if (ItemLinkState.STATE_LOCKED_FOR_EXPIRY == _itemLinkState) { if (_lockID != lockId) { throw new LockIdMismatch(_lockID, lockId); } ListStatistics stats = getParentStatistics(); synchronized (stats) { stats.decrementExpiring(); stats.incrementRemoving(); } _transactionId = transaction.getPersistentTranId(); _itemLinkState = ItemLinkState.STATE_REMOVING_EXPIRING; } else { if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) SibTr.event(this, tc, "Invalid Item state: " + _itemLinkState); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "cmdRemoveExpiring"); throw new StateException(_itemLinkState.toString()); } } final Task task = new RemoveLockedTask(this); transaction.addWork(task); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "cmdRemoveExpiring"); }
class class_name[name] begin[{] method[cmdRemoveExpiring, return_type[void], modifier[final], parameter[lockId, transaction]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["cmdRemoveExpiring"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Item Link: "), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), operator=+), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Stream Link: "), operandr=MemberReference(member=_owningStreamLink, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MethodInvocation(arguments=[MemberReference(member=lockId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=formatLockId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Transaction: "), operandr=MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], binary_operation[literal["expiring item "], +, call[_tuple.getUniqueId, parameter[]]]]] else begin[{] None end[}] SYNCHRONIZED[THIS[]] BEGIN[{] if[binary_operation[member[ItemLinkState.STATE_LOCKED_FOR_EXPIRY], ==, member[._itemLinkState]]] begin[{] if[binary_operation[member[._lockID], !=, member[.lockId]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=_lockID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lockId, 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=LockIdMismatch, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[ListStatistics], stats] SYNCHRONIZED[member[.stats]] BEGIN[{] call[stats.decrementExpiring, parameter[]] call[stats.incrementRemoving, parameter[]] END[}] assign[member[._transactionId], call[transaction.getPersistentTranId, parameter[]]] assign[member[._itemLinkState], member[ItemLinkState.STATE_REMOVING_EXPIRING]] else begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEventEnabled, parameter[]]]] begin[{] call[SibTr.event, parameter[THIS[], member[.tc], binary_operation[literal["Invalid Item state: "], +, member[._itemLinkState]]]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["cmdRemoveExpiring"]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=_itemLinkState, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StateException, sub_type=None)), label=None) end[}] END[}] local_variable[type[Task], task] call[transaction.addWork, parameter[member[.task]]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["cmdRemoveExpiring"]]] else begin[{] None end[}] end[}] END[}]
Keyword[final] Keyword[void] identifier[cmdRemoveExpiring] operator[SEP] Keyword[final] Keyword[long] identifier[lockId] , Keyword[final] identifier[PersistentTransaction] identifier[transaction] operator[SEP] Keyword[throws] identifier[ProtocolException] , identifier[TransactionException] , identifier[SevereMessageStoreException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] operator[+] Keyword[this] , literal[String] operator[+] identifier[_owningStreamLink] , identifier[formatLockId] operator[SEP] identifier[lockId] operator[SEP] , literal[String] operator[+] identifier[transaction] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[_tuple] operator[SEP] identifier[getUniqueId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[ItemLinkState] operator[SEP] identifier[STATE_LOCKED_FOR_EXPIRY] operator[==] identifier[_itemLinkState] operator[SEP] { Keyword[if] operator[SEP] identifier[_lockID] operator[!=] identifier[lockId] operator[SEP] { Keyword[throw] Keyword[new] identifier[LockIdMismatch] operator[SEP] identifier[_lockID] , identifier[lockId] operator[SEP] operator[SEP] } identifier[ListStatistics] identifier[stats] operator[=] identifier[getParentStatistics] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[stats] operator[SEP] { identifier[stats] operator[SEP] identifier[decrementExpiring] operator[SEP] operator[SEP] operator[SEP] identifier[stats] operator[SEP] identifier[incrementRemoving] operator[SEP] operator[SEP] operator[SEP] } identifier[_transactionId] operator[=] identifier[transaction] operator[SEP] identifier[getPersistentTranId] operator[SEP] operator[SEP] operator[SEP] identifier[_itemLinkState] operator[=] identifier[ItemLinkState] operator[SEP] identifier[STATE_REMOVING_EXPIRING] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[event] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[+] identifier[_itemLinkState] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[StateException] operator[SEP] identifier[_itemLinkState] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[final] identifier[Task] identifier[task] operator[=] Keyword[new] identifier[RemoveLockedTask] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[transaction] operator[SEP] identifier[addWork] operator[SEP] identifier[task] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
private void initializeDefaultCentury() { calendar.setTimeInMillis(System.currentTimeMillis()); calendar.add( Calendar.YEAR, -80 ); parseAmbiguousDatesAsAfter(calendar.getTime()); }
class class_name[name] begin[{] method[initializeDefaultCentury, return_type[void], modifier[private], parameter[]] begin[{] call[calendar.setTimeInMillis, parameter[call[System.currentTimeMillis, parameter[]]]] call[calendar.add, parameter[member[Calendar.YEAR], literal[80]]] call[.parseAmbiguousDatesAsAfter, parameter[call[calendar.getTime, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[initializeDefaultCentury] operator[SEP] operator[SEP] { identifier[calendar] operator[SEP] identifier[setTimeInMillis] operator[SEP] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[calendar] operator[SEP] identifier[add] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] , operator[-] Other[80] operator[SEP] operator[SEP] identifier[parseAmbiguousDatesAsAfter] operator[SEP] identifier[calendar] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static org.apache.jena.graph.Triple triple(final Node subj, final Node pred, final Node obj) { return org.apache.jena.graph.Triple.create(subj, pred, obj); }
class class_name[name] begin[{] method[triple, return_type[type[org]], modifier[private static], parameter[subj, pred, obj]] begin[{] return[call[org.apache.jena.graph.Triple.create, parameter[member[.subj], member[.pred], member[.obj]]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[jena] operator[SEP] identifier[graph] operator[SEP] identifier[Triple] identifier[triple] operator[SEP] Keyword[final] identifier[Node] identifier[subj] , Keyword[final] identifier[Node] identifier[pred] , Keyword[final] identifier[Node] identifier[obj] operator[SEP] { Keyword[return] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[jena] operator[SEP] identifier[graph] operator[SEP] identifier[Triple] operator[SEP] identifier[create] operator[SEP] identifier[subj] , identifier[pred] , identifier[obj] operator[SEP] operator[SEP] }
protected String encodedByte (int b) { String hex = Integer.toHexString(b).toUpperCase(); if (hex.length() < 2) { return "%0" + hex; } else { return "%" + hex; } }
class class_name[name] begin[{] method[encodedByte, return_type[type[String]], modifier[protected], parameter[b]] begin[{] local_variable[type[String], hex] if[binary_operation[call[hex.length, parameter[]], <, literal[2]]] begin[{] return[binary_operation[literal["%0"], +, member[.hex]]] else begin[{] return[binary_operation[literal["%"], +, member[.hex]]] end[}] end[}] END[}]
Keyword[protected] identifier[String] identifier[encodedByte] operator[SEP] Keyword[int] identifier[b] operator[SEP] { identifier[String] identifier[hex] operator[=] identifier[Integer] operator[SEP] identifier[toHexString] operator[SEP] identifier[b] operator[SEP] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hex] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] Other[2] operator[SEP] { Keyword[return] literal[String] operator[+] identifier[hex] operator[SEP] } Keyword[else] { Keyword[return] literal[String] operator[+] identifier[hex] operator[SEP] } }
@Override protected int onExecuteUpdate() { if (kunderaQuery.isDeleteUpdate()) { List result = getResultList(); return result != null ? result.size() : 0; } return 0; }
class class_name[name] begin[{] method[onExecuteUpdate, return_type[type[int]], modifier[protected], parameter[]] begin[{] if[call[kunderaQuery.isDeleteUpdate, parameter[]]] begin[{] local_variable[type[List], result] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None))] else begin[{] None end[}] return[literal[0]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[int] identifier[onExecuteUpdate] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[kunderaQuery] operator[SEP] identifier[isDeleteUpdate] operator[SEP] operator[SEP] operator[SEP] { identifier[List] identifier[result] operator[=] identifier[getResultList] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[!=] Other[null] operator[?] identifier[result] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[:] Other[0] operator[SEP] } Keyword[return] Other[0] operator[SEP] }
public void setTimexMod(String v) { if (Timex3_Type.featOkTst && ((Timex3_Type)jcasType).casFeat_timexMod == null) jcasType.jcas.throwFeatMissing("timexMod", "de.unihd.dbs.uima.types.heideltime.Timex3"); jcasType.ll_cas.ll_setStringValue(addr, ((Timex3_Type)jcasType).casFeatCode_timexMod, v);}
class class_name[name] begin[{] method[setTimexMod, return_type[void], modifier[public], parameter[v]] begin[{] if[binary_operation[member[Timex3_Type.featOkTst], &&, binary_operation[Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Timex3_Type, sub_type=None)), ==, literal[null]]]] begin[{] call[jcasType.jcas.throwFeatMissing, parameter[literal["timexMod"], literal["de.unihd.dbs.uima.types.heideltime.Timex3"]]] else begin[{] None end[}] call[jcasType.ll_cas.ll_setStringValue, parameter[member[.addr], Cast(expression=MemberReference(member=jcasType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Timex3_Type, sub_type=None)), member[.v]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setTimexMod] operator[SEP] identifier[String] identifier[v] operator[SEP] { Keyword[if] operator[SEP] identifier[Timex3_Type] operator[SEP] identifier[featOkTst] operator[&&] operator[SEP] operator[SEP] identifier[Timex3_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeat_timexMod] 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_setStringValue] operator[SEP] identifier[addr] , operator[SEP] operator[SEP] identifier[Timex3_Type] operator[SEP] identifier[jcasType] operator[SEP] operator[SEP] identifier[casFeatCode_timexMod] , identifier[v] operator[SEP] operator[SEP] }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Single<R> reduce(R seed, BiFunction<R, ? super T, R> reducer) { ObjectHelper.requireNonNull(seed, "seed is null"); ObjectHelper.requireNonNull(reducer, "reducer is null"); return RxJavaPlugins.onAssembly(new ObservableReduceSeedSingle<T, R>(this, seed, reducer)); }
class class_name[name] begin[{] method[reduce, return_type[type[Single]], modifier[final public], parameter[seed, reducer]] begin[{] call[ObjectHelper.requireNonNull, parameter[member[.seed], literal["seed is null"]]] call[ObjectHelper.requireNonNull, parameter[member[.reducer], literal["reducer is null"]]] return[call[RxJavaPlugins.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=seed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reducer, 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)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=R, sub_type=None))], dimensions=None, name=ObservableReduceSeedSingle, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] operator[<] identifier[R] operator[>] identifier[Single] operator[<] identifier[R] operator[>] identifier[reduce] operator[SEP] identifier[R] identifier[seed] , identifier[BiFunction] operator[<] identifier[R] , operator[?] Keyword[super] identifier[T] , identifier[R] operator[>] identifier[reducer] operator[SEP] { identifier[ObjectHelper] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[seed] , literal[String] operator[SEP] operator[SEP] identifier[ObjectHelper] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[reducer] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[RxJavaPlugins] operator[SEP] identifier[onAssembly] operator[SEP] Keyword[new] identifier[ObservableReduceSeedSingle] operator[<] identifier[T] , identifier[R] operator[>] operator[SEP] Keyword[this] , identifier[seed] , identifier[reducer] operator[SEP] operator[SEP] operator[SEP] }
public static long current(Context context, String tag) { Long appRxValue = sReceivedBytes.get(tag); Long appTxValue = sSendBytes.get(tag); if (appRxValue == null || appTxValue == null) { if (DEBUG) { LogUtils.w(TAG, "current() appRxValue or appTxValue is null."); } return 0; } final int uid = getUid(context); long appRxValue2 = TrafficStats.getUidRxBytes(uid); long appTxValue2 = TrafficStats.getUidTxBytes(uid); long rxValue = appRxValue2 - appRxValue; long txValue = appTxValue2 - appTxValue; if (DEBUG) { LogUtils.v(TAG, "current() rxValue=" + rxValue / 1000 + " txValue=" + txValue / 1000 + " uid=" + uid); } return rxValue; }
class class_name[name] begin[{] method[current, return_type[type[long]], modifier[public static], parameter[context, tag]] begin[{] local_variable[type[Long], appRxValue] local_variable[type[Long], appTxValue] if[binary_operation[binary_operation[member[.appRxValue], ==, literal[null]], ||, binary_operation[member[.appTxValue], ==, literal[null]]]] begin[{] if[member[.DEBUG]] begin[{] call[LogUtils.w, parameter[member[.TAG], literal["current() appRxValue or appTxValue is null."]]] else begin[{] None end[}] return[literal[0]] else begin[{] None end[}] local_variable[type[int], uid] local_variable[type[long], appRxValue2] local_variable[type[long], appTxValue2] local_variable[type[long], rxValue] local_variable[type[long], txValue] if[member[.DEBUG]] begin[{] call[LogUtils.v, parameter[member[.TAG], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["current() rxValue="], +, binary_operation[member[.rxValue], /, literal[1000]]], +, literal[" txValue="]], +, binary_operation[member[.txValue], /, literal[1000]]], +, literal[" uid="]], +, member[.uid]]]] else begin[{] None end[}] return[member[.rxValue]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[current] operator[SEP] identifier[Context] identifier[context] , identifier[String] identifier[tag] operator[SEP] { identifier[Long] identifier[appRxValue] operator[=] identifier[sReceivedBytes] operator[SEP] identifier[get] operator[SEP] identifier[tag] operator[SEP] operator[SEP] identifier[Long] identifier[appTxValue] operator[=] identifier[sSendBytes] operator[SEP] identifier[get] operator[SEP] identifier[tag] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[appRxValue] operator[==] Other[null] operator[||] identifier[appTxValue] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[DEBUG] operator[SEP] { identifier[LogUtils] operator[SEP] identifier[w] operator[SEP] identifier[TAG] , literal[String] operator[SEP] operator[SEP] } Keyword[return] Other[0] operator[SEP] } Keyword[final] Keyword[int] identifier[uid] operator[=] identifier[getUid] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[long] identifier[appRxValue2] operator[=] identifier[TrafficStats] operator[SEP] identifier[getUidRxBytes] operator[SEP] identifier[uid] operator[SEP] operator[SEP] Keyword[long] identifier[appTxValue2] operator[=] identifier[TrafficStats] operator[SEP] identifier[getUidTxBytes] operator[SEP] identifier[uid] operator[SEP] operator[SEP] Keyword[long] identifier[rxValue] operator[=] identifier[appRxValue2] operator[-] identifier[appRxValue] operator[SEP] Keyword[long] identifier[txValue] operator[=] identifier[appTxValue2] operator[-] identifier[appTxValue] operator[SEP] Keyword[if] operator[SEP] identifier[DEBUG] operator[SEP] { identifier[LogUtils] operator[SEP] identifier[v] operator[SEP] identifier[TAG] , literal[String] operator[+] identifier[rxValue] operator[/] Other[1000] operator[+] literal[String] operator[+] identifier[txValue] operator[/] Other[1000] operator[+] literal[String] operator[+] identifier[uid] operator[SEP] operator[SEP] } Keyword[return] identifier[rxValue] operator[SEP] }
@Override public long count(String tableName, String familyName, XPath condition) throws IOException { logger.debug("NATIVE Begin count"); // clone the current conf org.apache.hadoop.conf.Configuration customConf = new org.apache.hadoop.conf.Configuration(super.getHbcfg()); // Increase RPC timeout, in case of a slow computation customConf.setLong("hbase.rpc.timeout", 600000); // Default is 1, set to a higher value for faster scanner.next(..) customConf.setLong("hbase.client.scanner.caching", 1000); /* System.out.println("HBaseUtils begin of |customConf|"); Configuration.dumpConfiguration(customConf, new PrintWriter(System.out)); System.out.println("\nHBaseUtils end of |customConf|"); */ AggregationClient agClient = new AggregationClient(customConf); long rowCount = 0; byte[] tName = Bytes.toBytes(tableName); try { Scan scan = getScan(tableName, familyName); rowCount = agClient.rowCount(tName, null, scan); } catch (Throwable e) { throw new IOException(e.toString()); } return rowCount; }
class class_name[name] begin[{] method[count, return_type[type[long]], modifier[public], parameter[tableName, familyName, condition]] begin[{] call[logger.debug, parameter[literal["NATIVE Begin count"]]] local_variable[type[org], customConf] call[customConf.setLong, parameter[literal["hbase.rpc.timeout"], literal[600000]]] call[customConf.setLong, parameter[literal["hbase.client.scanner.caching"], literal[1000]]] local_variable[type[AggregationClient], agClient] local_variable[type[long], rowCount] local_variable[type[byte], tName] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=tableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=familyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getScan, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=scan)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Scan, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=rowCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=tName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=scan, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rowCount, postfix_operators=[], prefix_operators=[], qualifier=agClient, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None) return[member[.rowCount]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[long] identifier[count] operator[SEP] identifier[String] identifier[tableName] , identifier[String] identifier[familyName] , identifier[XPath] identifier[condition] operator[SEP] Keyword[throws] identifier[IOException] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[hadoop] operator[SEP] identifier[conf] operator[SEP] identifier[Configuration] identifier[customConf] operator[=] Keyword[new] identifier[org] operator[SEP] identifier[apache] operator[SEP] identifier[hadoop] operator[SEP] identifier[conf] operator[SEP] identifier[Configuration] operator[SEP] Keyword[super] operator[SEP] identifier[getHbcfg] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[customConf] operator[SEP] identifier[setLong] operator[SEP] literal[String] , Other[600000] operator[SEP] operator[SEP] identifier[customConf] operator[SEP] identifier[setLong] operator[SEP] literal[String] , Other[1000] operator[SEP] operator[SEP] identifier[AggregationClient] identifier[agClient] operator[=] Keyword[new] identifier[AggregationClient] operator[SEP] identifier[customConf] operator[SEP] operator[SEP] Keyword[long] identifier[rowCount] operator[=] Other[0] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[tName] operator[=] identifier[Bytes] operator[SEP] identifier[toBytes] operator[SEP] identifier[tableName] operator[SEP] operator[SEP] Keyword[try] { identifier[Scan] identifier[scan] operator[=] identifier[getScan] operator[SEP] identifier[tableName] , identifier[familyName] operator[SEP] operator[SEP] identifier[rowCount] operator[=] identifier[agClient] operator[SEP] identifier[rowCount] operator[SEP] identifier[tName] , Other[null] , identifier[scan] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[e] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[rowCount] operator[SEP] }
public AbstractPubSubHub<ID, DATA> setMessageFactory(IMessageFactory<ID, DATA> messageFactory) { this.messageFactory = messageFactory; return this; }
class class_name[name] begin[{] method[setMessageFactory, return_type[type[AbstractPubSubHub]], modifier[public], parameter[messageFactory]] begin[{] assign[THIS[member[None.messageFactory]], member[.messageFactory]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[AbstractPubSubHub] operator[<] identifier[ID] , identifier[DATA] operator[>] identifier[setMessageFactory] operator[SEP] identifier[IMessageFactory] operator[<] identifier[ID] , identifier[DATA] operator[>] identifier[messageFactory] operator[SEP] { Keyword[this] operator[SEP] identifier[messageFactory] operator[=] identifier[messageFactory] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public void upload(SFSession connection, String command, int parallelism, boolean uploadFromStream, String remoteStorageLocation, File srcFile, String destFileName, InputStream inputStream, FileBackedOutputStream fileBackedOutputStream, StorageObjectMetadata meta, String stageRegion) throws SnowflakeSQLException { final List<FileInputStream> toClose = new ArrayList<>(); long originalContentLength = meta.getContentLength(); SFPair<InputStream, Boolean> uploadStreamInfo = createUploadStream( srcFile, uploadFromStream, inputStream, meta, originalContentLength, fileBackedOutputStream, toClose); if (!(meta instanceof AzureObjectMetadata)) { throw new IllegalArgumentException("Unexpected metadata object type"); } int retryCount = 0; do { try { logger.debug("Starting upload"); InputStream fileInputStream = uploadStreamInfo.left; CloudBlobContainer container = azStorageClient.getContainerReference(remoteStorageLocation); CloudBlockBlob blob = container.getBlockBlobReference(destFileName); // Set the user-defined/Snowflake metadata and upload the BLOB blob.setMetadata((HashMap<String, String>) meta.getUserMetadata()); // Note that Azure doesn't offer a multi-part parallel upload library, // where the user has control of block size and parallelism // we rely on Azure to handle the upload, hence the "parallelism" parameter is ignored // in the Azure implementation of the method blob.upload(fileInputStream, // input stream to upload from -1 // -1 indicates an unknown stream length ); logger.debug("Upload successful"); blob.uploadMetadata(); // close any open streams in the "toClose" list and return for (FileInputStream is : toClose) IOUtils.closeQuietly(is); return; } catch (Exception ex) { handleAzureException(ex, ++retryCount, "upload", connection, command, this); if (uploadFromStream && fileBackedOutputStream == null) { throw new SnowflakeSQLException(ex, SqlState.SYSTEM_ERROR, ErrorCode.IO_ERROR.getMessageCode(), "Encountered exception during upload: " + ex.getMessage() + "\nCannot retry upload from stream."); } uploadStreamInfo = createUploadStream(srcFile, uploadFromStream, inputStream, meta, originalContentLength, fileBackedOutputStream, toClose); } } while (retryCount <= getMaxRetries()); for (FileInputStream is : toClose) IOUtils.closeQuietly(is); throw new SnowflakeSQLException(SqlState.INTERNAL_ERROR, ErrorCode.INTERNAL_ERROR.getMessageCode(), "Unexpected: upload unsuccessful without exception!"); }
class class_name[name] begin[{] method[upload, return_type[void], modifier[public], parameter[connection, command, parallelism, uploadFromStream, remoteStorageLocation, srcFile, destFileName, inputStream, fileBackedOutputStream, meta, stageRegion]] begin[{] local_variable[type[List], toClose] local_variable[type[long], originalContentLength] local_variable[type[SFPair], uploadStreamInfo] if[binary_operation[member[.meta], instanceof, type[AzureObjectMetadata]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected metadata object type")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], retryCount] do[binary_operation[member[.retryCount], <=, call[.getMaxRetries, parameter[]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Starting upload")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=uploadStreamInfo, selectors=[]), name=fileInputStream)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=remoteStorageLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getContainerReference, postfix_operators=[], prefix_operators=[], qualifier=azStorageClient, selectors=[], type_arguments=None), name=container)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CloudBlobContainer, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=destFileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBlockBlobReference, postfix_operators=[], prefix_operators=[], qualifier=container, selectors=[], type_arguments=None), name=blob)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CloudBlockBlob, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getUserMetadata, postfix_operators=[], prefix_operators=[], qualifier=meta, selectors=[], type_arguments=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=String, sub_type=None))], dimensions=[], name=HashMap, sub_type=None))], member=setMetadata, postfix_operators=[], prefix_operators=[], qualifier=blob, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fileInputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)], member=upload, postfix_operators=[], prefix_operators=[], qualifier=blob, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Upload successful")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=uploadMetadata, postfix_operators=[], prefix_operators=[], qualifier=blob, selectors=[], type_arguments=None), label=None), ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MemberReference(member=toClose, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=is)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileInputStream, sub_type=None))), label=None), ReturnStatement(expression=None, label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=retryCount, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="upload"), MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=handleAzureException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=uploadFromStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=fileBackedOutputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SYSTEM_ERROR, postfix_operators=[], prefix_operators=[], qualifier=SqlState, selectors=[]), MethodInvocation(arguments=[], member=getMessageCode, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode.IO_ERROR, selectors=[], type_arguments=None), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Encountered exception during upload: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\nCannot retry upload from stream."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SnowflakeSQLException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=uploadStreamInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=srcFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=uploadFromStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=inputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=meta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=originalContentLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fileBackedOutputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=toClose, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createUploadStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MemberReference(member=toClose, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=is)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FileInputStream, sub_type=None))), label=None) ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=INTERNAL_ERROR, postfix_operators=[], prefix_operators=[], qualifier=SqlState, selectors=[]), MethodInvocation(arguments=[], member=getMessageCode, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode.INTERNAL_ERROR, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected: upload unsuccessful without exception!")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SnowflakeSQLException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[upload] operator[SEP] identifier[SFSession] identifier[connection] , identifier[String] identifier[command] , Keyword[int] identifier[parallelism] , Keyword[boolean] identifier[uploadFromStream] , identifier[String] identifier[remoteStorageLocation] , identifier[File] identifier[srcFile] , identifier[String] identifier[destFileName] , identifier[InputStream] identifier[inputStream] , identifier[FileBackedOutputStream] identifier[fileBackedOutputStream] , identifier[StorageObjectMetadata] identifier[meta] , identifier[String] identifier[stageRegion] operator[SEP] Keyword[throws] identifier[SnowflakeSQLException] { Keyword[final] identifier[List] operator[<] identifier[FileInputStream] operator[>] identifier[toClose] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[originalContentLength] operator[=] identifier[meta] operator[SEP] identifier[getContentLength] operator[SEP] operator[SEP] operator[SEP] identifier[SFPair] operator[<] identifier[InputStream] , identifier[Boolean] operator[>] identifier[uploadStreamInfo] operator[=] identifier[createUploadStream] operator[SEP] identifier[srcFile] , identifier[uploadFromStream] , identifier[inputStream] , identifier[meta] , identifier[originalContentLength] , identifier[fileBackedOutputStream] , identifier[toClose] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[meta] Keyword[instanceof] identifier[AzureObjectMetadata] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[retryCount] operator[=] Other[0] operator[SEP] Keyword[do] { Keyword[try] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[InputStream] identifier[fileInputStream] operator[=] identifier[uploadStreamInfo] operator[SEP] identifier[left] operator[SEP] identifier[CloudBlobContainer] identifier[container] operator[=] identifier[azStorageClient] operator[SEP] identifier[getContainerReference] operator[SEP] identifier[remoteStorageLocation] operator[SEP] operator[SEP] identifier[CloudBlockBlob] identifier[blob] operator[=] identifier[container] operator[SEP] identifier[getBlockBlobReference] operator[SEP] identifier[destFileName] operator[SEP] operator[SEP] identifier[blob] operator[SEP] identifier[setMetadata] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] identifier[meta] operator[SEP] identifier[getUserMetadata] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[blob] operator[SEP] identifier[upload] operator[SEP] identifier[fileInputStream] , operator[-] Other[1] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[blob] operator[SEP] identifier[uploadMetadata] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[FileInputStream] identifier[is] operator[:] identifier[toClose] operator[SEP] identifier[IOUtils] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[is] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[handleAzureException] operator[SEP] identifier[ex] , operator[++] identifier[retryCount] , literal[String] , identifier[connection] , identifier[command] , Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[uploadFromStream] operator[&&] identifier[fileBackedOutputStream] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SnowflakeSQLException] operator[SEP] identifier[ex] , identifier[SqlState] operator[SEP] identifier[SYSTEM_ERROR] , identifier[ErrorCode] operator[SEP] identifier[IO_ERROR] operator[SEP] identifier[getMessageCode] operator[SEP] operator[SEP] , literal[String] operator[+] identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[uploadStreamInfo] operator[=] identifier[createUploadStream] operator[SEP] identifier[srcFile] , identifier[uploadFromStream] , identifier[inputStream] , identifier[meta] , identifier[originalContentLength] , identifier[fileBackedOutputStream] , identifier[toClose] operator[SEP] operator[SEP] } } Keyword[while] operator[SEP] identifier[retryCount] operator[<=] identifier[getMaxRetries] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[FileInputStream] identifier[is] operator[:] identifier[toClose] operator[SEP] identifier[IOUtils] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[is] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SnowflakeSQLException] operator[SEP] identifier[SqlState] operator[SEP] identifier[INTERNAL_ERROR] , identifier[ErrorCode] operator[SEP] identifier[INTERNAL_ERROR] operator[SEP] identifier[getMessageCode] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] }
@Override protected int writeBytesWireFormat ( byte[] dst, int dstIndex ) { int start = dstIndex; SMBUtil.writeInt2(33, dst, dstIndex); dst[ dstIndex + 2 ] = this.infoType; dst[ dstIndex + 3 ] = this.fileInfoClass; dstIndex += 4; int bufferLengthOffset = dstIndex; dstIndex += 4; int bufferOffsetOffset = dstIndex; dstIndex += 4; SMBUtil.writeInt4(this.additionalInformation, dst, dstIndex); dstIndex += 4; System.arraycopy(this.fileId, 0, dst, dstIndex, 16); dstIndex += 16; SMBUtil.writeInt2(dstIndex - getHeaderStart(), dst, bufferOffsetOffset); int len = this.info.encode(dst, dstIndex); SMBUtil.writeInt4(len, dst, bufferLengthOffset); dstIndex += len; return dstIndex - start; }
class class_name[name] begin[{] method[writeBytesWireFormat, return_type[type[int]], modifier[protected], parameter[dst, dstIndex]] begin[{] local_variable[type[int], start] call[SMBUtil.writeInt2, parameter[literal[33], member[.dst], member[.dstIndex]]] assign[member[.dst], THIS[member[None.infoType]]] assign[member[.dst], THIS[member[None.fileInfoClass]]] assign[member[.dstIndex], literal[4]] local_variable[type[int], bufferLengthOffset] assign[member[.dstIndex], literal[4]] local_variable[type[int], bufferOffsetOffset] assign[member[.dstIndex], literal[4]] call[SMBUtil.writeInt4, parameter[THIS[member[None.additionalInformation]], member[.dst], member[.dstIndex]]] assign[member[.dstIndex], literal[4]] call[System.arraycopy, parameter[THIS[member[None.fileId]], literal[0], member[.dst], member[.dstIndex], literal[16]]] assign[member[.dstIndex], literal[16]] call[SMBUtil.writeInt2, parameter[binary_operation[member[.dstIndex], -, call[.getHeaderStart, parameter[]]], member[.dst], member[.bufferOffsetOffset]]] local_variable[type[int], len] call[SMBUtil.writeInt4, parameter[member[.len], member[.dst], member[.bufferLengthOffset]]] assign[member[.dstIndex], member[.len]] return[binary_operation[member[.dstIndex], -, member[.start]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[int] identifier[writeBytesWireFormat] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[dst] , Keyword[int] identifier[dstIndex] operator[SEP] { Keyword[int] identifier[start] operator[=] identifier[dstIndex] operator[SEP] identifier[SMBUtil] operator[SEP] identifier[writeInt2] operator[SEP] Other[33] , identifier[dst] , identifier[dstIndex] operator[SEP] operator[SEP] identifier[dst] operator[SEP] identifier[dstIndex] operator[+] Other[2] operator[SEP] operator[=] Keyword[this] operator[SEP] identifier[infoType] operator[SEP] identifier[dst] operator[SEP] identifier[dstIndex] operator[+] Other[3] operator[SEP] operator[=] Keyword[this] operator[SEP] identifier[fileInfoClass] operator[SEP] identifier[dstIndex] operator[+=] Other[4] operator[SEP] Keyword[int] identifier[bufferLengthOffset] operator[=] identifier[dstIndex] operator[SEP] identifier[dstIndex] operator[+=] Other[4] operator[SEP] Keyword[int] identifier[bufferOffsetOffset] operator[=] identifier[dstIndex] operator[SEP] identifier[dstIndex] operator[+=] Other[4] operator[SEP] identifier[SMBUtil] operator[SEP] identifier[writeInt4] operator[SEP] Keyword[this] operator[SEP] identifier[additionalInformation] , identifier[dst] , identifier[dstIndex] operator[SEP] operator[SEP] identifier[dstIndex] operator[+=] Other[4] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] Keyword[this] operator[SEP] identifier[fileId] , Other[0] , identifier[dst] , identifier[dstIndex] , Other[16] operator[SEP] operator[SEP] identifier[dstIndex] operator[+=] Other[16] operator[SEP] identifier[SMBUtil] operator[SEP] identifier[writeInt2] operator[SEP] identifier[dstIndex] operator[-] identifier[getHeaderStart] operator[SEP] operator[SEP] , identifier[dst] , identifier[bufferOffsetOffset] operator[SEP] operator[SEP] Keyword[int] identifier[len] operator[=] Keyword[this] operator[SEP] identifier[info] operator[SEP] identifier[encode] operator[SEP] identifier[dst] , identifier[dstIndex] operator[SEP] operator[SEP] identifier[SMBUtil] operator[SEP] identifier[writeInt4] operator[SEP] identifier[len] , identifier[dst] , identifier[bufferLengthOffset] operator[SEP] operator[SEP] identifier[dstIndex] operator[+=] identifier[len] operator[SEP] Keyword[return] identifier[dstIndex] operator[-] identifier[start] operator[SEP] }
public String[] getUserPermissionList(String userName) { if (!m_enabled) { return m_perm_list; } if (userName == null) { return new String[] {}; } AuthUser user = getUser(userName); if (user == null) { return new String[] {}; } return user.m_permissions_list; }
class class_name[name] begin[{] method[getUserPermissionList, return_type[type[String]], modifier[public], parameter[userName]] begin[{] if[member[.m_enabled]] begin[{] return[member[.m_perm_list]] else begin[{] None end[}] if[binary_operation[member[.userName], ==, literal[null]]] begin[{] return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] else begin[{] None end[}] local_variable[type[AuthUser], user] if[binary_operation[member[.user], ==, literal[null]]] begin[{] return[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] else begin[{] None end[}] return[member[user.m_permissions_list]] end[}] END[}]
Keyword[public] identifier[String] operator[SEP] operator[SEP] identifier[getUserPermissionList] operator[SEP] identifier[String] identifier[userName] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[m_enabled] operator[SEP] { Keyword[return] identifier[m_perm_list] operator[SEP] } Keyword[if] operator[SEP] identifier[userName] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[String] operator[SEP] operator[SEP] { } operator[SEP] } identifier[AuthUser] identifier[user] operator[=] identifier[getUser] operator[SEP] identifier[userName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[user] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[String] operator[SEP] operator[SEP] { } operator[SEP] } Keyword[return] identifier[user] operator[SEP] identifier[m_permissions_list] operator[SEP] }
public java.util.List<ValidationError> getValidationErrors() { if (validationErrors == null) { validationErrors = new com.amazonaws.internal.SdkInternalList<ValidationError>(); } return validationErrors; }
class class_name[name] begin[{] method[getValidationErrors, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.validationErrors], ==, literal[null]]] begin[{] assign[member[.validationErrors], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ValidationError, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.validationErrors]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[ValidationError] operator[>] identifier[getValidationErrors] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[validationErrors] operator[==] Other[null] operator[SEP] { identifier[validationErrors] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[ValidationError] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[validationErrors] operator[SEP] }
public void execute(String filename) throws IOException { File input = new File(filename); out.format("BufrSplitter on %s length=%d%n", input.getPath(), input.length()); try (InputStream is = new FileInputStream(input)) { processStream(is); } }
class class_name[name] begin[{] method[execute, return_type[void], modifier[public], parameter[filename]] begin[{] local_variable[type[File], input] call[out.format, parameter[literal["BufrSplitter on %s length=%d%n"], call[input.getPath, parameter[]], call[input.length, parameter[]]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=is, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileInputStream, sub_type=None)))]) end[}] END[}]
Keyword[public] Keyword[void] identifier[execute] operator[SEP] identifier[String] identifier[filename] operator[SEP] Keyword[throws] identifier[IOException] { identifier[File] identifier[input] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[filename] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[input] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] , identifier[input] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[InputStream] identifier[is] operator[=] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[input] operator[SEP] operator[SEP] { identifier[processStream] operator[SEP] identifier[is] operator[SEP] operator[SEP] } }
public static Annotation getAnnotation(Properties attributes) { float llx = 0, lly = 0, urx = 0, ury = 0; String value; value = attributes.getProperty(ElementTags.LLX); if (value != null) { llx = Float.parseFloat(value + "f"); } value = attributes.getProperty(ElementTags.LLY); if (value != null) { lly = Float.parseFloat(value + "f"); } value = attributes.getProperty(ElementTags.URX); if (value != null) { urx = Float.parseFloat(value + "f"); } value = attributes.getProperty(ElementTags.URY); if (value != null) { ury = Float.parseFloat(value + "f"); } String title = attributes.getProperty(ElementTags.TITLE); String text = attributes.getProperty(ElementTags.CONTENT); if (title != null || text != null) { return new Annotation(title, text, llx, lly, urx, ury); } value = attributes.getProperty(ElementTags.URL); if (value != null) { return new Annotation(llx, lly, urx, ury, value); } value = attributes.getProperty(ElementTags.NAMED); if (value != null) { return new Annotation(llx, lly, urx, ury, Integer.parseInt(value)); } String file = attributes.getProperty(ElementTags.FILE); String destination = attributes.getProperty(ElementTags.DESTINATION); String page = (String) attributes.remove(ElementTags.PAGE); if (file != null) { if (destination != null) { return new Annotation(llx, lly, urx, ury, file, destination); } if (page != null) { return new Annotation(llx, lly, urx, ury, file, Integer .parseInt(page)); } } return new Annotation("", "", llx, lly, urx, ury); }
class class_name[name] begin[{] method[getAnnotation, return_type[type[Annotation]], modifier[public static], parameter[attributes]] begin[{] local_variable[type[float], llx] local_variable[type[String], value] assign[member[.value], call[attributes.getProperty, parameter[member[ElementTags.LLX]]]] if[binary_operation[member[.value], !=, literal[null]]] begin[{] assign[member[.llx], call[Float.parseFloat, parameter[binary_operation[member[.value], +, literal["f"]]]]] else begin[{] None end[}] assign[member[.value], call[attributes.getProperty, parameter[member[ElementTags.LLY]]]] if[binary_operation[member[.value], !=, literal[null]]] begin[{] assign[member[.lly], call[Float.parseFloat, parameter[binary_operation[member[.value], +, literal["f"]]]]] else begin[{] None end[}] assign[member[.value], call[attributes.getProperty, parameter[member[ElementTags.URX]]]] if[binary_operation[member[.value], !=, literal[null]]] begin[{] assign[member[.urx], call[Float.parseFloat, parameter[binary_operation[member[.value], +, literal["f"]]]]] else begin[{] None end[}] assign[member[.value], call[attributes.getProperty, parameter[member[ElementTags.URY]]]] if[binary_operation[member[.value], !=, literal[null]]] begin[{] assign[member[.ury], call[Float.parseFloat, parameter[binary_operation[member[.value], +, literal["f"]]]]] else begin[{] None end[}] local_variable[type[String], title] local_variable[type[String], text] if[binary_operation[binary_operation[member[.title], !=, literal[null]], ||, binary_operation[member[.text], !=, literal[null]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=title, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=llx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=urx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ury, 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=Annotation, sub_type=None))] else begin[{] None end[}] assign[member[.value], call[attributes.getProperty, parameter[member[ElementTags.URL]]]] if[binary_operation[member[.value], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=llx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=urx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ury, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=Annotation, sub_type=None))] else begin[{] None end[}] assign[member[.value], call[attributes.getProperty, parameter[member[ElementTags.NAMED]]]] if[binary_operation[member[.value], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=llx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=urx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ury, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Annotation, sub_type=None))] else begin[{] None end[}] local_variable[type[String], file] local_variable[type[String], destination] local_variable[type[String], page] if[binary_operation[member[.file], !=, literal[null]]] begin[{] if[binary_operation[member[.destination], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=llx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=urx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ury, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=destination, 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=Annotation, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.page], !=, literal[null]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=llx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=urx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ury, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=page, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Annotation, sub_type=None))] else begin[{] None end[}] else begin[{] None end[}] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), MemberReference(member=llx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=urx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ury, 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=Annotation, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Annotation] identifier[getAnnotation] operator[SEP] identifier[Properties] identifier[attributes] operator[SEP] { Keyword[float] identifier[llx] operator[=] Other[0] , identifier[lly] operator[=] Other[0] , identifier[urx] operator[=] Other[0] , identifier[ury] operator[=] Other[0] operator[SEP] identifier[String] identifier[value] operator[SEP] identifier[value] operator[=] identifier[attributes] operator[SEP] identifier[getProperty] operator[SEP] identifier[ElementTags] operator[SEP] identifier[LLX] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[llx] operator[=] identifier[Float] operator[SEP] identifier[parseFloat] operator[SEP] identifier[value] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[value] operator[=] identifier[attributes] operator[SEP] identifier[getProperty] operator[SEP] identifier[ElementTags] operator[SEP] identifier[LLY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[lly] operator[=] identifier[Float] operator[SEP] identifier[parseFloat] operator[SEP] identifier[value] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[value] operator[=] identifier[attributes] operator[SEP] identifier[getProperty] operator[SEP] identifier[ElementTags] operator[SEP] identifier[URX] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[urx] operator[=] identifier[Float] operator[SEP] identifier[parseFloat] operator[SEP] identifier[value] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[value] operator[=] identifier[attributes] operator[SEP] identifier[getProperty] operator[SEP] identifier[ElementTags] operator[SEP] identifier[URY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[ury] operator[=] identifier[Float] operator[SEP] identifier[parseFloat] operator[SEP] identifier[value] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[String] identifier[title] operator[=] identifier[attributes] operator[SEP] identifier[getProperty] operator[SEP] identifier[ElementTags] operator[SEP] identifier[TITLE] operator[SEP] operator[SEP] identifier[String] identifier[text] operator[=] identifier[attributes] operator[SEP] identifier[getProperty] operator[SEP] identifier[ElementTags] operator[SEP] identifier[CONTENT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[title] operator[!=] Other[null] operator[||] identifier[text] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[Annotation] operator[SEP] identifier[title] , identifier[text] , identifier[llx] , identifier[lly] , identifier[urx] , identifier[ury] operator[SEP] operator[SEP] } identifier[value] operator[=] identifier[attributes] operator[SEP] identifier[getProperty] operator[SEP] identifier[ElementTags] operator[SEP] identifier[URL] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[Annotation] operator[SEP] identifier[llx] , identifier[lly] , identifier[urx] , identifier[ury] , identifier[value] operator[SEP] operator[SEP] } identifier[value] operator[=] identifier[attributes] operator[SEP] identifier[getProperty] operator[SEP] identifier[ElementTags] operator[SEP] identifier[NAMED] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[Annotation] operator[SEP] identifier[llx] , identifier[lly] , identifier[urx] , identifier[ury] , identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[file] operator[=] identifier[attributes] operator[SEP] identifier[getProperty] operator[SEP] identifier[ElementTags] operator[SEP] identifier[FILE] operator[SEP] operator[SEP] identifier[String] identifier[destination] operator[=] identifier[attributes] operator[SEP] identifier[getProperty] operator[SEP] identifier[ElementTags] operator[SEP] identifier[DESTINATION] operator[SEP] operator[SEP] identifier[String] identifier[page] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[attributes] operator[SEP] identifier[remove] operator[SEP] identifier[ElementTags] operator[SEP] identifier[PAGE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[file] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[destination] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[Annotation] operator[SEP] identifier[llx] , identifier[lly] , identifier[urx] , identifier[ury] , identifier[file] , identifier[destination] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[page] operator[!=] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[Annotation] operator[SEP] identifier[llx] , identifier[lly] , identifier[urx] , identifier[ury] , identifier[file] , identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[page] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[Annotation] operator[SEP] literal[String] , literal[String] , identifier[llx] , identifier[lly] , identifier[urx] , identifier[ury] operator[SEP] operator[SEP] }
protected final <REQ, RESP> Route delete(RouteAction<Request<REQ>, Response<RESP>> action) { return createEntityRoute(HttpMethod.DELETE, "", action, null, null); }
class class_name[name] begin[{] method[delete, return_type[type[Route]], modifier[final protected], parameter[action]] begin[{] return[call[.createEntityRoute, parameter[member[HttpMethod.DELETE], literal[""], member[.action], literal[null], literal[null]]]] end[}] END[}]
Keyword[protected] Keyword[final] operator[<] identifier[REQ] , identifier[RESP] operator[>] identifier[Route] identifier[delete] operator[SEP] identifier[RouteAction] operator[<] identifier[Request] operator[<] identifier[REQ] operator[>] , identifier[Response] operator[<] identifier[RESP] operator[>] operator[>] identifier[action] operator[SEP] { Keyword[return] identifier[createEntityRoute] operator[SEP] identifier[HttpMethod] operator[SEP] identifier[DELETE] , literal[String] , identifier[action] , Other[null] , Other[null] operator[SEP] operator[SEP] }
public static String formatFallback(final String pattern, final Object... arguments) { StringBuilder sb = new StringBuilder(pattern); for (Object argument : arguments) { sb.append(", "); sb.append(argument); } return sb.toString(); }
class class_name[name] begin[{] method[formatFallback, return_type[type[String]], modifier[public static], parameter[pattern, arguments]] begin[{] local_variable[type[StringBuilder], sb] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=argument, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=argument)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[formatFallback] operator[SEP] Keyword[final] identifier[String] identifier[pattern] , Keyword[final] identifier[Object] operator[...] identifier[arguments] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[pattern] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[argument] operator[:] identifier[arguments] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[argument] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
int readFromInputStream(byte[] buffer, InputStream is) { try { return is.read(buffer); } catch (IOException e) { if (END_OF_STREAM.equals(e.getMessage())) { return -2; } return Integer.MIN_VALUE; } }
class class_name[name] begin[{] method[readFromInputStream, return_type[type[int]], modifier[default], parameter[buffer, is]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=is, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=END_OF_STREAM, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=2), label=None)])), ReturnStatement(expression=MemberReference(member=MIN_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[int] identifier[readFromInputStream] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] , identifier[InputStream] identifier[is] operator[SEP] { Keyword[try] { Keyword[return] identifier[is] operator[SEP] identifier[read] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[END_OF_STREAM] operator[SEP] identifier[equals] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[-] Other[2] operator[SEP] } Keyword[return] identifier[Integer] operator[SEP] identifier[MIN_VALUE] operator[SEP] } }
public static int safeMultiply(int a, int b) { long total = (long) a * (long) b; if (total < Integer.MIN_VALUE || total > Integer.MAX_VALUE) { throw new ArithmeticException("Multiplication overflows an int: " + a + " * " + b); } return (int) total; }
class class_name[name] begin[{] method[safeMultiply, return_type[type[int]], modifier[public static], parameter[a, b]] begin[{] local_variable[type[long], total] if[binary_operation[binary_operation[member[.total], <, member[Integer.MIN_VALUE]], ||, binary_operation[member[.total], >, member[Integer.MAX_VALUE]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Multiplication overflows an int: "), operandr=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" * "), operator=+), operandr=MemberReference(member=b, 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=ArithmeticException, sub_type=None)), label=None) else begin[{] None end[}] return[Cast(expression=MemberReference(member=total, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[safeMultiply] operator[SEP] Keyword[int] identifier[a] , Keyword[int] identifier[b] operator[SEP] { Keyword[long] identifier[total] operator[=] operator[SEP] Keyword[long] operator[SEP] identifier[a] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[b] operator[SEP] Keyword[if] operator[SEP] identifier[total] operator[<] identifier[Integer] operator[SEP] identifier[MIN_VALUE] operator[||] identifier[total] operator[>] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] { Keyword[throw] Keyword[new] identifier[ArithmeticException] operator[SEP] literal[String] operator[+] identifier[a] operator[+] literal[String] operator[+] identifier[b] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] Keyword[int] operator[SEP] identifier[total] operator[SEP] }
public synchronized int addObject(Object object) throws ConversationStateFullException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "addObject", "object=" + object); int objectIndex = 0; if (freeSlot == MINUS_ONE) { // Object Store full ? extendObjectTable(); // extend it } objectIndex = freeSlot; objectTable[objectIndex] = object; // Save object // Set high water mark highWatermark = Math.max(highWatermark, freeSlot); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "High Water Mark = ", Integer.valueOf(highWatermark)); foundFreeSlot = false; // Find next free slot for (int i = (highWatermark + 1); i <= maxIndex; i++) { if (objectTable[i] == null) { freeSlot = i; // Save index of next free slot foundFreeSlot = true; break; } } if (!foundFreeSlot) { // Not found a free slot yet for (int i = OBJECT_TABLE_ORIGIN; i <= (highWatermark - 1); i++) { if (objectTable[i] == null) { freeSlot = i; // Save index of next free slot foundFreeSlot = true; break; } } } // No free slots, extend table on next add if (!foundFreeSlot) { freeSlot = MINUS_ONE; // Indicate need for extension } if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { SibTr.debug(tc, "Next free slot = ", Integer.valueOf(freeSlot)); SibTr.debug(tc, "Max Index = ", Integer.valueOf(maxIndex)); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "addObject", "" + objectIndex); return objectIndex; // Pass back object index }
class class_name[name] begin[{] method[addObject, return_type[type[int]], modifier[synchronized public], parameter[object]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["addObject"], binary_operation[literal["object="], +, member[.object]]]] else begin[{] None end[}] local_variable[type[int], objectIndex] if[binary_operation[member[.freeSlot], ==, member[.MINUS_ONE]]] begin[{] call[.extendObjectTable, parameter[]] else begin[{] None end[}] assign[member[.objectIndex], member[.freeSlot]] assign[member[.objectTable], member[.object]] assign[member[.highWatermark], call[Math.max, parameter[member[.highWatermark], member[.freeSlot]]]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], literal["High Water Mark = "], call[Integer.valueOf, parameter[member[.highWatermark]]]]] else begin[{] None end[}] assign[member[.foundFreeSlot], literal[false]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=objectTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=freeSlot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=foundFreeSlot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=maxIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=highWatermark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[member[.foundFreeSlot]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=objectTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, 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=freeSlot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=foundFreeSlot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=highWatermark, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=OBJECT_TABLE_ORIGIN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] if[member[.foundFreeSlot]] begin[{] assign[member[.freeSlot], member[.MINUS_ONE]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[member[.tc], literal["Next free slot = "], call[Integer.valueOf, parameter[member[.freeSlot]]]]] call[SibTr.debug, parameter[member[.tc], literal["Max Index = "], call[Integer.valueOf, parameter[member[.maxIndex]]]]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["addObject"], binary_operation[literal[""], +, member[.objectIndex]]]] else begin[{] None end[}] return[member[.objectIndex]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[int] identifier[addObject] operator[SEP] identifier[Object] identifier[object] operator[SEP] Keyword[throws] identifier[ConversationStateFullException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , literal[String] operator[+] identifier[object] operator[SEP] operator[SEP] Keyword[int] identifier[objectIndex] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[freeSlot] operator[==] identifier[MINUS_ONE] operator[SEP] { identifier[extendObjectTable] operator[SEP] operator[SEP] operator[SEP] } identifier[objectIndex] operator[=] identifier[freeSlot] operator[SEP] identifier[objectTable] operator[SEP] identifier[objectIndex] operator[SEP] operator[=] identifier[object] operator[SEP] identifier[highWatermark] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[highWatermark] , identifier[freeSlot] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[highWatermark] operator[SEP] operator[SEP] operator[SEP] identifier[foundFreeSlot] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] operator[SEP] identifier[highWatermark] operator[+] Other[1] operator[SEP] operator[SEP] identifier[i] operator[<=] identifier[maxIndex] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[objectTable] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[freeSlot] operator[=] identifier[i] operator[SEP] identifier[foundFreeSlot] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[foundFreeSlot] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[OBJECT_TABLE_ORIGIN] operator[SEP] identifier[i] operator[<=] operator[SEP] identifier[highWatermark] operator[-] Other[1] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[objectTable] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[freeSlot] operator[=] identifier[i] operator[SEP] identifier[foundFreeSlot] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[if] operator[SEP] operator[!] identifier[foundFreeSlot] operator[SEP] { identifier[freeSlot] operator[=] identifier[MINUS_ONE] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[freeSlot] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[maxIndex] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , literal[String] operator[+] identifier[objectIndex] operator[SEP] operator[SEP] Keyword[return] identifier[objectIndex] operator[SEP] }
protected List<CmsResource> getManageableResources(CmsDbContext dbc, CmsRole role) throws CmsException { CmsOrganizationalUnit ou = m_driverManager.readOrganizationalUnit(dbc, role.getOuFqn()); if (hasRole(dbc, dbc.currentUser(), role)) { return m_driverManager.getResourcesForOrganizationalUnit(dbc, ou); } List<CmsResource> resources = new ArrayList<CmsResource>(); Iterator<CmsOrganizationalUnit> it = m_driverManager.getOrganizationalUnits(dbc, ou, false).iterator(); while (it.hasNext()) { CmsOrganizationalUnit orgUnit = it.next(); resources.addAll(getManageableResources(dbc, role.forOrgUnit(orgUnit.getName()))); } return resources; }
class class_name[name] begin[{] method[getManageableResources, return_type[type[List]], modifier[protected], parameter[dbc, role]] begin[{] local_variable[type[CmsOrganizationalUnit], ou] if[call[.hasRole, parameter[member[.dbc], call[dbc.currentUser, parameter[]], member[.role]]]] begin[{] return[call[m_driverManager.getResourcesForOrganizationalUnit, parameter[member[.dbc], member[.ou]]]] else begin[{] None end[}] local_variable[type[List], resources] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[CmsOrganizationalUnit], orgUnit] call[resources.addAll, parameter[call[.getManageableResources, parameter[member[.dbc], call[role.forOrgUnit, parameter[call[orgUnit.getName, parameter[]]]]]]]] end[}] return[member[.resources]] end[}] END[}]
Keyword[protected] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[getManageableResources] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsRole] identifier[role] operator[SEP] Keyword[throws] identifier[CmsException] { identifier[CmsOrganizationalUnit] identifier[ou] operator[=] identifier[m_driverManager] operator[SEP] identifier[readOrganizationalUnit] operator[SEP] identifier[dbc] , identifier[role] operator[SEP] identifier[getOuFqn] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hasRole] operator[SEP] identifier[dbc] , identifier[dbc] operator[SEP] identifier[currentUser] operator[SEP] operator[SEP] , identifier[role] operator[SEP] operator[SEP] { Keyword[return] identifier[m_driverManager] operator[SEP] identifier[getResourcesForOrganizationalUnit] operator[SEP] identifier[dbc] , identifier[ou] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[resources] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CmsResource] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[CmsOrganizationalUnit] operator[>] identifier[it] operator[=] identifier[m_driverManager] operator[SEP] identifier[getOrganizationalUnits] operator[SEP] identifier[dbc] , identifier[ou] , literal[boolean] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsOrganizationalUnit] identifier[orgUnit] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[resources] operator[SEP] identifier[addAll] operator[SEP] identifier[getManageableResources] operator[SEP] identifier[dbc] , identifier[role] operator[SEP] identifier[forOrgUnit] operator[SEP] identifier[orgUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[resources] operator[SEP] }
protected void doPropagateAssertObject(InternalFactHandle factHandle, PropagationContext context, InternalWorkingMemory workingMemory, ObjectSink sink) { sink.assertObject( factHandle, context, workingMemory ); }
class class_name[name] begin[{] method[doPropagateAssertObject, return_type[void], modifier[protected], parameter[factHandle, context, workingMemory, sink]] begin[{] call[sink.assertObject, parameter[member[.factHandle], member[.context], member[.workingMemory]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[doPropagateAssertObject] operator[SEP] identifier[InternalFactHandle] identifier[factHandle] , identifier[PropagationContext] identifier[context] , identifier[InternalWorkingMemory] identifier[workingMemory] , identifier[ObjectSink] identifier[sink] operator[SEP] { identifier[sink] operator[SEP] identifier[assertObject] operator[SEP] identifier[factHandle] , identifier[context] , identifier[workingMemory] operator[SEP] operator[SEP] }
protected void releaseProxyWriteBuffer() { WsByteBuffer buffer = connLink.getWriteInterface().getBuffer(); if (null != buffer) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Releasing proxy write buffer: " + buffer); } buffer.release(); connLink.getWriteInterface().setBuffer(null); } }
class class_name[name] begin[{] method[releaseProxyWriteBuffer, return_type[void], modifier[protected], parameter[]] begin[{] local_variable[type[WsByteBuffer], buffer] if[binary_operation[literal[null], !=, member[.buffer]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["Releasing proxy write buffer: "], +, member[.buffer]]]] else begin[{] None end[}] call[buffer.release, parameter[]] call[connLink.getWriteInterface, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[releaseProxyWriteBuffer] operator[SEP] operator[SEP] { identifier[WsByteBuffer] identifier[buffer] operator[=] identifier[connLink] operator[SEP] identifier[getWriteInterface] operator[SEP] operator[SEP] operator[SEP] identifier[getBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[buffer] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[buffer] operator[SEP] operator[SEP] } identifier[buffer] operator[SEP] identifier[release] operator[SEP] operator[SEP] operator[SEP] identifier[connLink] operator[SEP] identifier[getWriteInterface] operator[SEP] operator[SEP] operator[SEP] identifier[setBuffer] operator[SEP] Other[null] operator[SEP] operator[SEP] } }
public static BlockingThreadPoolExecutorService newInstance( int activeTasks, int waitingTasks, long keepAliveTime, TimeUnit unit, String prefixName) { /* Although we generally only expect up to waitingTasks tasks in the queue, we need to be able to buffer all tasks in case dequeueing is slower than enqueueing. */ final BlockingQueue<Runnable> workQueue = new LinkedBlockingQueue<>(waitingTasks + activeTasks); ThreadPoolExecutor eventProcessingExecutor = new ThreadPoolExecutor(activeTasks, activeTasks, keepAliveTime, unit, workQueue, newDaemonThreadFactory(prefixName), new RejectedExecutionHandler() { @Override public void rejectedExecution(Runnable r, ThreadPoolExecutor executor) { //This is not expected to happen. LOG.error("Could not submit task to executor {}", executor.toString()); } }); eventProcessingExecutor.allowCoreThreadTimeOut(true); return new BlockingThreadPoolExecutorService(waitingTasks + activeTasks, eventProcessingExecutor); }
class class_name[name] begin[{] method[newInstance, return_type[type[BlockingThreadPoolExecutorService]], modifier[public static], parameter[activeTasks, waitingTasks, keepAliveTime, unit, prefixName]] begin[{] local_variable[type[BlockingQueue], workQueue] local_variable[type[ThreadPoolExecutor], eventProcessingExecutor] call[eventProcessingExecutor.allowCoreThreadTimeOut, parameter[literal[true]]] return[ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=waitingTasks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=activeTasks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=eventProcessingExecutor, 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=BlockingThreadPoolExecutorService, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[BlockingThreadPoolExecutorService] identifier[newInstance] operator[SEP] Keyword[int] identifier[activeTasks] , Keyword[int] identifier[waitingTasks] , Keyword[long] identifier[keepAliveTime] , identifier[TimeUnit] identifier[unit] , identifier[String] identifier[prefixName] operator[SEP] { Keyword[final] identifier[BlockingQueue] operator[<] identifier[Runnable] operator[>] identifier[workQueue] operator[=] Keyword[new] identifier[LinkedBlockingQueue] operator[<] operator[>] operator[SEP] identifier[waitingTasks] operator[+] identifier[activeTasks] operator[SEP] operator[SEP] identifier[ThreadPoolExecutor] identifier[eventProcessingExecutor] operator[=] Keyword[new] identifier[ThreadPoolExecutor] operator[SEP] identifier[activeTasks] , identifier[activeTasks] , identifier[keepAliveTime] , identifier[unit] , identifier[workQueue] , identifier[newDaemonThreadFactory] operator[SEP] identifier[prefixName] operator[SEP] , Keyword[new] identifier[RejectedExecutionHandler] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[rejectedExecution] operator[SEP] identifier[Runnable] identifier[r] , identifier[ThreadPoolExecutor] identifier[executor] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[executor] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[eventProcessingExecutor] operator[SEP] identifier[allowCoreThreadTimeOut] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[BlockingThreadPoolExecutorService] operator[SEP] identifier[waitingTasks] operator[+] identifier[activeTasks] , identifier[eventProcessingExecutor] operator[SEP] operator[SEP] }
public void setReservationStatus(com.google.api.ads.admanager.axis.v201811.ReservationStatus reservationStatus) { this.reservationStatus = reservationStatus; }
class class_name[name] begin[{] method[setReservationStatus, return_type[void], modifier[public], parameter[reservationStatus]] begin[{] assign[THIS[member[None.reservationStatus]], member[.reservationStatus]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setReservationStatus] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201811] operator[SEP] identifier[ReservationStatus] identifier[reservationStatus] operator[SEP] { Keyword[this] operator[SEP] identifier[reservationStatus] operator[=] identifier[reservationStatus] operator[SEP] }
private char[] compile(String pattern) { int length = pattern.length(); boolean inQuote = false; StringBuilder compiledPattern = new StringBuilder(length * 2); StringBuilder tmpBuffer = null; int count = 0; int lastTag = -1; for (int i = 0; i < length; i++) { char c = pattern.charAt(i); if (c == '\'') { // '' is treated as a single quote regardless of being // in a quoted section. if ((i + 1) < length) { c = pattern.charAt(i + 1); if (c == '\'') { i++; if (count != 0) { encode(lastTag, count, compiledPattern); lastTag = -1; count = 0; } if (inQuote) { tmpBuffer.append(c); } else { compiledPattern.append((char)(TAG_QUOTE_ASCII_CHAR << 8 | c)); } continue; } } if (!inQuote) { if (count != 0) { encode(lastTag, count, compiledPattern); lastTag = -1; count = 0; } if (tmpBuffer == null) { tmpBuffer = new StringBuilder(length); } else { tmpBuffer.setLength(0); } inQuote = true; } else { int len = tmpBuffer.length(); if (len == 1) { char ch = tmpBuffer.charAt(0); if (ch < 128) { compiledPattern.append((char)(TAG_QUOTE_ASCII_CHAR << 8 | ch)); } else { compiledPattern.append((char)(TAG_QUOTE_CHARS << 8 | 1)); compiledPattern.append(ch); } } else { encode(TAG_QUOTE_CHARS, len, compiledPattern); compiledPattern.append(tmpBuffer); } inQuote = false; } continue; } if (inQuote) { tmpBuffer.append(c); continue; } if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')) { if (count != 0) { encode(lastTag, count, compiledPattern); lastTag = -1; count = 0; } if (c < 128) { // In most cases, c would be a delimiter, such as ':'. compiledPattern.append((char)(TAG_QUOTE_ASCII_CHAR << 8 | c)); } else { // Take any contiguous non-ASCII alphabet characters and // put them in a single TAG_QUOTE_CHARS. int j; for (j = i + 1; j < length; j++) { char d = pattern.charAt(j); if (d == '\'' || (d >= 'a' && d <= 'z' || d >= 'A' && d <= 'Z')) { break; } } compiledPattern.append((char)(TAG_QUOTE_CHARS << 8 | (j - i))); for (; i < j; i++) { compiledPattern.append(pattern.charAt(i)); } i--; } continue; } int tag; if ((tag = DateFormatSymbols.patternChars.indexOf(c)) == -1) { throw new IllegalArgumentException("Illegal pattern character " + "'" + c + "'"); } if (lastTag == -1 || lastTag == tag) { lastTag = tag; count++; continue; } encode(lastTag, count, compiledPattern); lastTag = tag; count = 1; } if (inQuote) { throw new IllegalArgumentException("Unterminated quote"); } if (count != 0) { encode(lastTag, count, compiledPattern); } // Copy the compiled pattern to a char array int len = compiledPattern.length(); char[] r = new char[len]; compiledPattern.getChars(0, len, r, 0); return r; }
class class_name[name] begin[{] method[compile, return_type[type[char]], modifier[private], parameter[pattern]] begin[{] local_variable[type[int], length] local_variable[type[boolean], inQuote] local_variable[type[StringBuilder], compiledPattern] local_variable[type[StringBuilder], tmpBuffer] local_variable[type[int], count] local_variable[type[int], lastTag] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pattern, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\''), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pattern, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\''), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lastTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=compiledPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)])), IfStatement(condition=MemberReference(member=inQuote, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=TAG_QUOTE_ASCII_CHAR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=char))], member=append, postfix_operators=[], prefix_operators=[], qualifier=compiledPattern, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=tmpBuffer, selectors=[], type_arguments=None), label=None)])), ContinueStatement(goto=None, label=None)]))])), IfStatement(condition=MemberReference(member=inQuote, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=tmpBuffer, selectors=[], type_arguments=None), name=len)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG_QUOTE_CHARS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=compiledPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tmpBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=compiledPattern, selectors=[], type_arguments=None), label=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=0)], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=tmpBuffer, selectors=[], type_arguments=None), name=ch)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=128), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=TAG_QUOTE_CHARS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=|), type=BasicType(dimensions=[], name=char))], member=append, postfix_operators=[], prefix_operators=[], qualifier=compiledPattern, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=compiledPattern, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=TAG_QUOTE_ASCII_CHAR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operandr=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=char))], member=append, postfix_operators=[], prefix_operators=[], qualifier=compiledPattern, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=inQuote, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lastTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=compiledPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tmpBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=setLength, postfix_operators=[], prefix_operators=[], qualifier=tmpBuffer, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=tmpBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=length, 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=StringBuilder, sub_type=None))), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=inQuote, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), ContinueStatement(goto=None, label=None)])), IfStatement(condition=MemberReference(member=inQuote, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=tmpBuffer, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='a'), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='z'), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='A'), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='Z'), operator=<=), operator=&&), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lastTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=compiledPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=128), operator=<), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pattern, selectors=[], type_arguments=None), name=d)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\''), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='a'), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='z'), operator=<=), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='A'), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='Z'), operator=<=), operator=&&), operator=||), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))], update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=TAG_QUOTE_CHARS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operandr=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operator=|), type=BasicType(dimensions=[], name=char))], member=append, postfix_operators=[], prefix_operators=[], qualifier=compiledPattern, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=pattern, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=compiledPattern, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=None, update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MemberReference(member=i, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=TAG_QUOTE_ASCII_CHAR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|), type=BasicType(dimensions=[], name=char))], member=append, postfix_operators=[], prefix_operators=[], qualifier=compiledPattern, selectors=[], type_arguments=None), label=None)])), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=tag)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=DateFormatSymbols.patternChars, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal pattern character "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+), operandr=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=lastTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), operandr=BinaryOperation(operandl=MemberReference(member=lastTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=count, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lastTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=compiledPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[member[.inQuote]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unterminated quote")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.count], !=, literal[0]]] begin[{] call[.encode, parameter[member[.lastTag], member[.count], member[.compiledPattern]]] else begin[{] None end[}] local_variable[type[int], len] local_variable[type[char], r] call[compiledPattern.getChars, parameter[literal[0], member[.len], member[.r], literal[0]]] return[member[.r]] end[}] END[}]
Keyword[private] Keyword[char] operator[SEP] operator[SEP] identifier[compile] operator[SEP] identifier[String] identifier[pattern] operator[SEP] { Keyword[int] identifier[length] operator[=] identifier[pattern] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[inQuote] operator[=] literal[boolean] operator[SEP] identifier[StringBuilder] identifier[compiledPattern] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[length] operator[*] Other[2] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[tmpBuffer] operator[=] Other[null] operator[SEP] Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[int] identifier[lastTag] operator[=] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[pattern] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[<] identifier[length] operator[SEP] { identifier[c] operator[=] identifier[pattern] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[i] operator[++] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[!=] Other[0] operator[SEP] { identifier[encode] operator[SEP] identifier[lastTag] , identifier[count] , identifier[compiledPattern] operator[SEP] operator[SEP] identifier[lastTag] operator[=] operator[-] Other[1] operator[SEP] identifier[count] operator[=] Other[0] operator[SEP] } Keyword[if] operator[SEP] identifier[inQuote] operator[SEP] { identifier[tmpBuffer] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] } Keyword[else] { identifier[compiledPattern] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[TAG_QUOTE_ASCII_CHAR] operator[<<] Other[8] operator[|] identifier[c] operator[SEP] operator[SEP] operator[SEP] } Keyword[continue] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[inQuote] operator[SEP] { Keyword[if] operator[SEP] identifier[count] operator[!=] Other[0] operator[SEP] { identifier[encode] operator[SEP] identifier[lastTag] , identifier[count] , identifier[compiledPattern] operator[SEP] operator[SEP] identifier[lastTag] operator[=] operator[-] Other[1] operator[SEP] identifier[count] operator[=] Other[0] operator[SEP] } Keyword[if] operator[SEP] identifier[tmpBuffer] operator[==] Other[null] operator[SEP] { identifier[tmpBuffer] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[length] operator[SEP] operator[SEP] } Keyword[else] { identifier[tmpBuffer] operator[SEP] identifier[setLength] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[inQuote] operator[=] literal[boolean] operator[SEP] } Keyword[else] { Keyword[int] identifier[len] operator[=] identifier[tmpBuffer] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[len] operator[==] Other[1] operator[SEP] { Keyword[char] identifier[ch] operator[=] identifier[tmpBuffer] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ch] operator[<] Other[128] operator[SEP] { identifier[compiledPattern] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[TAG_QUOTE_ASCII_CHAR] operator[<<] Other[8] operator[|] identifier[ch] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[compiledPattern] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[TAG_QUOTE_CHARS] operator[<<] Other[8] operator[|] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[compiledPattern] operator[SEP] identifier[append] operator[SEP] identifier[ch] operator[SEP] operator[SEP] } } Keyword[else] { identifier[encode] operator[SEP] identifier[TAG_QUOTE_CHARS] , identifier[len] , identifier[compiledPattern] operator[SEP] operator[SEP] identifier[compiledPattern] operator[SEP] identifier[append] operator[SEP] identifier[tmpBuffer] operator[SEP] operator[SEP] } identifier[inQuote] operator[=] literal[boolean] operator[SEP] } Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[inQuote] operator[SEP] { identifier[tmpBuffer] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[c] operator[>=] literal[String] operator[&&] identifier[c] operator[<=] literal[String] operator[||] identifier[c] operator[>=] literal[String] operator[&&] identifier[c] operator[<=] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[count] operator[!=] Other[0] operator[SEP] { identifier[encode] operator[SEP] identifier[lastTag] , identifier[count] , identifier[compiledPattern] operator[SEP] operator[SEP] identifier[lastTag] operator[=] operator[-] Other[1] operator[SEP] identifier[count] operator[=] Other[0] operator[SEP] } Keyword[if] operator[SEP] identifier[c] operator[<] Other[128] operator[SEP] { identifier[compiledPattern] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[TAG_QUOTE_ASCII_CHAR] operator[<<] Other[8] operator[|] identifier[c] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[int] identifier[j] operator[SEP] Keyword[for] operator[SEP] identifier[j] operator[=] identifier[i] operator[+] Other[1] operator[SEP] identifier[j] operator[<] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[char] identifier[d] operator[=] identifier[pattern] operator[SEP] identifier[charAt] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[d] operator[==] literal[String] operator[||] operator[SEP] identifier[d] operator[>=] literal[String] operator[&&] identifier[d] operator[<=] literal[String] operator[||] identifier[d] operator[>=] literal[String] operator[&&] identifier[d] operator[<=] literal[String] operator[SEP] operator[SEP] { Keyword[break] operator[SEP] } } identifier[compiledPattern] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[TAG_QUOTE_CHARS] operator[<<] Other[8] operator[|] operator[SEP] identifier[j] operator[-] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[j] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[compiledPattern] operator[SEP] identifier[append] operator[SEP] identifier[pattern] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[i] operator[--] operator[SEP] } Keyword[continue] operator[SEP] } Keyword[int] identifier[tag] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[tag] operator[=] identifier[DateFormatSymbols] operator[SEP] identifier[patternChars] operator[SEP] identifier[indexOf] operator[SEP] identifier[c] operator[SEP] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[c] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[lastTag] operator[==] operator[-] Other[1] operator[||] identifier[lastTag] operator[==] identifier[tag] operator[SEP] { identifier[lastTag] operator[=] identifier[tag] operator[SEP] identifier[count] operator[++] operator[SEP] Keyword[continue] operator[SEP] } identifier[encode] operator[SEP] identifier[lastTag] , identifier[count] , identifier[compiledPattern] operator[SEP] operator[SEP] identifier[lastTag] operator[=] identifier[tag] operator[SEP] identifier[count] operator[=] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[inQuote] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[count] operator[!=] Other[0] operator[SEP] { identifier[encode] operator[SEP] identifier[lastTag] , identifier[count] , identifier[compiledPattern] operator[SEP] operator[SEP] } Keyword[int] identifier[len] operator[=] identifier[compiledPattern] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[r] operator[=] Keyword[new] Keyword[char] operator[SEP] identifier[len] operator[SEP] operator[SEP] identifier[compiledPattern] operator[SEP] identifier[getChars] operator[SEP] Other[0] , identifier[len] , identifier[r] , Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[r] operator[SEP] }
public static void main(String[] args) throws RunnerException { new Runner(new OptionsBuilder() .include(WILDCARD + SuperClassInvocationBenchmark.class.getSimpleName() + WILDCARD) .include(WILDCARD + StubInvocationBenchmark.class.getSimpleName() + WILDCARD) .include(WILDCARD + ClassByImplementationBenchmark.class.getSimpleName() + WILDCARD) .include(WILDCARD + ClassByExtensionBenchmark.class.getSimpleName() + WILDCARD) .include(WILDCARD + TrivialClassCreationBenchmark.class.getSimpleName() + WILDCARD) .forks(0) // Should rather be 1 but there seems to be a bug in JMH. .build()).run(); }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] ClassCreator(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=SuperClassInvocationBenchmark, sub_type=None)), operator=+), operandr=MemberReference(member=WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=include, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=StubInvocationBenchmark, sub_type=None)), operator=+), operandr=MemberReference(member=WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=include, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ClassByImplementationBenchmark, sub_type=None)), operator=+), operandr=MemberReference(member=WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=include, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ClassByExtensionBenchmark, sub_type=None)), operator=+), operandr=MemberReference(member=WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=include, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=TrivialClassCreationBenchmark, sub_type=None)), operator=+), operandr=MemberReference(member=WILDCARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=include, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=forks, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=OptionsBuilder, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=run, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Runner, sub_type=None)) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[RunnerException] { Keyword[new] identifier[Runner] operator[SEP] Keyword[new] identifier[OptionsBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[include] operator[SEP] identifier[WILDCARD] operator[+] identifier[SuperClassInvocationBenchmark] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] identifier[WILDCARD] operator[SEP] operator[SEP] identifier[include] operator[SEP] identifier[WILDCARD] operator[+] identifier[StubInvocationBenchmark] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] identifier[WILDCARD] operator[SEP] operator[SEP] identifier[include] operator[SEP] identifier[WILDCARD] operator[+] identifier[ClassByImplementationBenchmark] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] identifier[WILDCARD] operator[SEP] operator[SEP] identifier[include] operator[SEP] identifier[WILDCARD] operator[+] identifier[ClassByExtensionBenchmark] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] identifier[WILDCARD] operator[SEP] operator[SEP] identifier[include] operator[SEP] identifier[WILDCARD] operator[+] identifier[TrivialClassCreationBenchmark] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] identifier[WILDCARD] operator[SEP] operator[SEP] identifier[forks] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[run] operator[SEP] operator[SEP] operator[SEP] }
@Override public Optional<HttpTracing> build(final Environment environment) { if (!isEnabled()) { LOGGER.warn("Zipkin tracing is disabled"); return Optional.empty(); } LOGGER.info("Dropping all collected spans"); return buildTracing(environment, Reporter.NOOP); }
class class_name[name] begin[{] method[build, return_type[type[Optional]], modifier[public], parameter[environment]] begin[{] if[call[.isEnabled, parameter[]]] begin[{] call[LOGGER.warn, parameter[literal["Zipkin tracing is disabled"]]] return[call[Optional.empty, parameter[]]] else begin[{] None end[}] call[LOGGER.info, parameter[literal["Dropping all collected spans"]]] return[call[.buildTracing, parameter[member[.environment], member[Reporter.NOOP]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Optional] operator[<] identifier[HttpTracing] operator[>] identifier[build] operator[SEP] Keyword[final] identifier[Environment] identifier[environment] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[buildTracing] operator[SEP] identifier[environment] , identifier[Reporter] operator[SEP] identifier[NOOP] operator[SEP] operator[SEP] }
private RTPFormat createVideoFormat(int payload, Text description) { Iterator<Text> it = description.split('/').iterator(); //encoding name Text token = it.next(); token.trim(); EncodingName name = new EncodingName(token); //clock rate //TODO : convert to frame rate token = it.next(); token.trim(); int clockRate = token.toInteger(); RTPFormat rtpFormat = getFormat(payload); if (rtpFormat == null) { formats.add(new RTPFormat(payload, FormatFactory.createVideoFormat(name, clockRate))); } else { //TODO: recreate format anyway. it is illegal to use clock rate as frame rate ((VideoFormat)rtpFormat.getFormat()).setName(name); ((VideoFormat)rtpFormat.getFormat()).setFrameRate(clockRate); } return rtpFormat; }
class class_name[name] begin[{] method[createVideoFormat, return_type[type[RTPFormat]], modifier[private], parameter[payload, description]] begin[{] local_variable[type[Iterator], it] local_variable[type[Text], token] call[token.trim, parameter[]] local_variable[type[EncodingName], name] assign[member[.token], call[it.next, parameter[]]] call[token.trim, parameter[]] local_variable[type[int], clockRate] local_variable[type[RTPFormat], rtpFormat] if[binary_operation[member[.rtpFormat], ==, literal[null]]] begin[{] call[formats.add, parameter[ClassCreator(arguments=[MemberReference(member=payload, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=clockRate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createVideoFormat, postfix_operators=[], prefix_operators=[], qualifier=FormatFactory, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RTPFormat, sub_type=None))]] else begin[{] Cast(expression=MethodInvocation(arguments=[], member=getFormat, postfix_operators=[], prefix_operators=[], qualifier=rtpFormat, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=VideoFormat, sub_type=None)) Cast(expression=MethodInvocation(arguments=[], member=getFormat, postfix_operators=[], prefix_operators=[], qualifier=rtpFormat, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=VideoFormat, sub_type=None)) end[}] return[member[.rtpFormat]] end[}] END[}]
Keyword[private] identifier[RTPFormat] identifier[createVideoFormat] operator[SEP] Keyword[int] identifier[payload] , identifier[Text] identifier[description] operator[SEP] { identifier[Iterator] operator[<] identifier[Text] operator[>] identifier[it] operator[=] identifier[description] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[Text] identifier[token] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[token] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[EncodingName] identifier[name] operator[=] Keyword[new] identifier[EncodingName] operator[SEP] identifier[token] operator[SEP] operator[SEP] identifier[token] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[token] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[clockRate] operator[=] identifier[token] operator[SEP] identifier[toInteger] operator[SEP] operator[SEP] operator[SEP] identifier[RTPFormat] identifier[rtpFormat] operator[=] identifier[getFormat] operator[SEP] identifier[payload] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rtpFormat] operator[==] Other[null] operator[SEP] { identifier[formats] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[RTPFormat] operator[SEP] identifier[payload] , identifier[FormatFactory] operator[SEP] identifier[createVideoFormat] operator[SEP] identifier[name] , identifier[clockRate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { operator[SEP] operator[SEP] identifier[VideoFormat] operator[SEP] identifier[rtpFormat] operator[SEP] identifier[getFormat] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setName] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[VideoFormat] operator[SEP] identifier[rtpFormat] operator[SEP] identifier[getFormat] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setFrameRate] operator[SEP] identifier[clockRate] operator[SEP] operator[SEP] } Keyword[return] identifier[rtpFormat] operator[SEP] }
AtlasVertex findVertex(DataTypes.TypeCategory category, String typeName) { LOG.debug("Finding AtlasVertex for {}.{}", category, typeName); Iterator results = graph.query().has(Constants.TYPENAME_PROPERTY_KEY, typeName).vertices().iterator(); AtlasVertex vertex = null; if (results != null && results.hasNext()) { //There should be just one AtlasVertex with the given typeName vertex = (AtlasVertex) results.next(); } return vertex; }
class class_name[name] begin[{] method[findVertex, return_type[type[AtlasVertex]], modifier[default], parameter[category, typeName]] begin[{] call[LOG.debug, parameter[literal["Finding AtlasVertex for {}.{}"], member[.category], member[.typeName]]] local_variable[type[Iterator], results] local_variable[type[AtlasVertex], vertex] if[binary_operation[binary_operation[member[.results], !=, literal[null]], &&, call[results.hasNext, parameter[]]]] begin[{] assign[member[.vertex], Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=AtlasVertex, sub_type=None))] else begin[{] None end[}] return[member[.vertex]] end[}] END[}]
identifier[AtlasVertex] identifier[findVertex] operator[SEP] identifier[DataTypes] operator[SEP] identifier[TypeCategory] identifier[category] , identifier[String] identifier[typeName] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[category] , identifier[typeName] operator[SEP] operator[SEP] identifier[Iterator] identifier[results] operator[=] identifier[graph] operator[SEP] identifier[query] operator[SEP] operator[SEP] operator[SEP] identifier[has] operator[SEP] identifier[Constants] operator[SEP] identifier[TYPENAME_PROPERTY_KEY] , identifier[typeName] operator[SEP] operator[SEP] identifier[vertices] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[AtlasVertex] identifier[vertex] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[results] operator[!=] Other[null] operator[&&] identifier[results] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[vertex] operator[=] operator[SEP] identifier[AtlasVertex] operator[SEP] identifier[results] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[vertex] operator[SEP] }
@Override public void onCommunicationException(Throwable error) { addMessage(MESSAGES.commandCommunicationError() + error.getMessage(), ERRORMESSAGE_STYLE); }
class class_name[name] begin[{] method[onCommunicationException, return_type[void], modifier[public], parameter[error]] begin[{] call[.addMessage, parameter[binary_operation[call[MESSAGES.commandCommunicationError, parameter[]], +, call[error.getMessage, parameter[]]], member[.ERRORMESSAGE_STYLE]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onCommunicationException] operator[SEP] identifier[Throwable] identifier[error] operator[SEP] { identifier[addMessage] operator[SEP] identifier[MESSAGES] operator[SEP] identifier[commandCommunicationError] operator[SEP] operator[SEP] operator[+] identifier[error] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[ERRORMESSAGE_STYLE] operator[SEP] operator[SEP] }
public static boolean isPointNearMarker(LatLng point, MarkerOptions shapeMarker, double tolerance) { return isPointNearPoint(point, shapeMarker.getPosition(), tolerance); }
class class_name[name] begin[{] method[isPointNearMarker, return_type[type[boolean]], modifier[public static], parameter[point, shapeMarker, tolerance]] begin[{] return[call[.isPointNearPoint, parameter[member[.point], call[shapeMarker.getPosition, parameter[]], member[.tolerance]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isPointNearMarker] operator[SEP] identifier[LatLng] identifier[point] , identifier[MarkerOptions] identifier[shapeMarker] , Keyword[double] identifier[tolerance] operator[SEP] { Keyword[return] identifier[isPointNearPoint] operator[SEP] identifier[point] , identifier[shapeMarker] operator[SEP] identifier[getPosition] operator[SEP] operator[SEP] , identifier[tolerance] operator[SEP] operator[SEP] }
public void setValue(final double VALUE) { oldValue = value; value = VALUE < niceMinValue ? niceMinValue : (VALUE > niceMaxValue ? niceMaxValue : VALUE); fireStateChanged(); }
class class_name[name] begin[{] method[setValue, return_type[void], modifier[public], parameter[VALUE]] begin[{] assign[member[.oldValue], member[.value]] assign[member[.value], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=VALUE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), if_false=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=VALUE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), if_false=MemberReference(member=VALUE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=niceMaxValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), if_true=MemberReference(member=niceMinValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] call[.fireStateChanged, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setValue] operator[SEP] Keyword[final] Keyword[double] identifier[VALUE] operator[SEP] { identifier[oldValue] operator[=] identifier[value] operator[SEP] identifier[value] operator[=] identifier[VALUE] operator[<] identifier[niceMinValue] operator[?] identifier[niceMinValue] operator[:] operator[SEP] identifier[VALUE] operator[>] identifier[niceMaxValue] operator[?] identifier[niceMaxValue] operator[:] identifier[VALUE] operator[SEP] operator[SEP] identifier[fireStateChanged] operator[SEP] operator[SEP] operator[SEP] }
public List<CmsUUID> getIdsOfAlreadyPublishedResources() { List<CmsUUID> alreadyPublished = new ArrayList<CmsUUID>(); List<CmsPublishResource> allResources = new ArrayList<CmsPublishResource>(); for (CmsPublishGroup group : m_groups) { for (CmsPublishResource resource : group.getResources()) { allResources.add(resource); for (CmsPublishResource related : resource.getRelated()) { allResources.add(related); } } } for (CmsPublishResource resource : allResources) { if ((resource.getInfo() != null) && (resource.getInfo().getType() == Type.PUBLISHED)) { alreadyPublished.add(resource.getId()); } } return alreadyPublished; }
class class_name[name] begin[{] method[getIdsOfAlreadyPublishedResources, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], alreadyPublished] local_variable[type[List], allResources] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=resource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=allResources, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=related, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=allResources, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getRelated, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=related)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsPublishResource, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getResources, postfix_operators=[], prefix_operators=[], qualifier=group, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=resource)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsPublishResource, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=m_groups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=group)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsPublishGroup, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getInfo, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getInfo, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[MethodInvocation(arguments=[], member=getType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MemberReference(member=PUBLISHED, postfix_operators=[], prefix_operators=[], qualifier=Type, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=resource, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=alreadyPublished, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=allResources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=resource)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsPublishResource, sub_type=None))), label=None) return[member[.alreadyPublished]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[CmsUUID] operator[>] identifier[getIdsOfAlreadyPublishedResources] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[CmsUUID] operator[>] identifier[alreadyPublished] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CmsUUID] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[CmsPublishResource] operator[>] identifier[allResources] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[CmsPublishResource] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CmsPublishGroup] identifier[group] operator[:] identifier[m_groups] operator[SEP] { Keyword[for] operator[SEP] identifier[CmsPublishResource] identifier[resource] operator[:] identifier[group] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] { identifier[allResources] operator[SEP] identifier[add] operator[SEP] identifier[resource] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CmsPublishResource] identifier[related] operator[:] identifier[resource] operator[SEP] identifier[getRelated] operator[SEP] operator[SEP] operator[SEP] { identifier[allResources] operator[SEP] identifier[add] operator[SEP] identifier[related] operator[SEP] operator[SEP] } } } Keyword[for] operator[SEP] identifier[CmsPublishResource] identifier[resource] operator[:] identifier[allResources] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[resource] operator[SEP] identifier[getInfo] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[resource] operator[SEP] identifier[getInfo] operator[SEP] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[==] identifier[Type] operator[SEP] identifier[PUBLISHED] operator[SEP] operator[SEP] { identifier[alreadyPublished] operator[SEP] identifier[add] operator[SEP] identifier[resource] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[alreadyPublished] operator[SEP] }
public Map<String, String> getProperties() { final Map<String, String> res = new HashMap<>(); for (final Map.Entry<String, Object> e: prop.entrySet()) { if (e.getValue() instanceof String) { res.put(e.getKey(), (String) e.getValue()); } } return Collections.unmodifiableMap(res); }
class class_name[name] begin[{] method[getProperties, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[Map], res] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operandr=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), Cast(expression=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=res, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=prop, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=e)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_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=Entry, sub_type=None)))), label=None) return[call[Collections.unmodifiableMap, parameter[member[.res]]]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[getProperties] operator[SEP] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[res] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[Object] operator[>] identifier[e] operator[:] identifier[prop] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] Keyword[instanceof] identifier[String] operator[SEP] { identifier[res] operator[SEP] identifier[put] operator[SEP] identifier[e] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , operator[SEP] identifier[String] operator[SEP] identifier[e] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[Collections] operator[SEP] identifier[unmodifiableMap] operator[SEP] identifier[res] operator[SEP] operator[SEP] }
public Object findClosest(Point2D pt) { Object o = null; int indexX = (int) ((pt.getX()-offsetX)/gridWidth); int indexY = (int) ((pt.getY()-offsetY)/gridHeight); if (debugClosest) System.out.println("findClosest "+ pt+ " "+indexX+" "+indexY); if ((indexX < 0) || (indexX >= countX) || (indexY < 0) || (indexY >= countY)) // outside box return null; GridCell gwant = gridArray[indexY][indexX]; if (gwant.used) // that was easy return gwant.o; // check the surrounding points along perimeter of increasing diameter for (int p=1; p<Math.max(countX-1, countY-1); p++) if (null != (o = findClosestAlongPerimeter(pt, indexX, indexY, p))) return o; return null; // nothing found }
class class_name[name] begin[{] method[findClosest, return_type[type[Object]], modifier[public], parameter[pt]] begin[{] local_variable[type[Object], o] local_variable[type[int], indexX] local_variable[type[int], indexY] if[member[.debugClosest]] begin[{] call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["findClosest "], +, member[.pt]], +, literal[" "]], +, member[.indexX]], +, literal[" "]], +, member[.indexY]]]] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.indexX], <, literal[0]], ||, binary_operation[member[.indexX], >=, member[.countX]]], ||, binary_operation[member[.indexY], <, literal[0]]], ||, binary_operation[member[.indexY], >=, member[.countY]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[GridCell], gwant] if[member[gwant.used]] begin[{] return[member[gwant.o]] else begin[{] None end[}] ForStatement(body=IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=Assignment(expressionl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=pt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=indexX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=indexY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findClosestAlongPerimeter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), operator=!=), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=countX, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), BinaryOperation(operandl=MemberReference(member=countY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=p)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=p, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[null]] end[}] END[}]
Keyword[public] identifier[Object] identifier[findClosest] operator[SEP] identifier[Point2D] identifier[pt] operator[SEP] { identifier[Object] identifier[o] operator[=] Other[null] operator[SEP] Keyword[int] identifier[indexX] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] identifier[pt] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[-] identifier[offsetX] operator[SEP] operator[/] identifier[gridWidth] operator[SEP] operator[SEP] Keyword[int] identifier[indexY] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] identifier[pt] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[-] identifier[offsetY] operator[SEP] operator[/] identifier[gridHeight] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[debugClosest] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[pt] operator[+] literal[String] operator[+] identifier[indexX] operator[+] literal[String] operator[+] identifier[indexY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[indexX] operator[<] Other[0] operator[SEP] operator[||] operator[SEP] identifier[indexX] operator[>=] identifier[countX] operator[SEP] operator[||] operator[SEP] identifier[indexY] operator[<] Other[0] operator[SEP] operator[||] operator[SEP] identifier[indexY] operator[>=] identifier[countY] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[GridCell] identifier[gwant] operator[=] identifier[gridArray] operator[SEP] identifier[indexY] operator[SEP] operator[SEP] identifier[indexX] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[gwant] operator[SEP] identifier[used] operator[SEP] Keyword[return] identifier[gwant] operator[SEP] identifier[o] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[p] operator[=] Other[1] operator[SEP] identifier[p] operator[<] identifier[Math] operator[SEP] identifier[max] operator[SEP] identifier[countX] operator[-] Other[1] , identifier[countY] operator[-] Other[1] operator[SEP] operator[SEP] identifier[p] operator[++] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] operator[SEP] identifier[o] operator[=] identifier[findClosestAlongPerimeter] operator[SEP] identifier[pt] , identifier[indexX] , identifier[indexY] , identifier[p] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[o] operator[SEP] Keyword[return] Other[null] operator[SEP] }
void inspectStorageDirs(FSImageStorageInspector inspector) throws IOException { // Process each of the storage directories to find the pair of // newest image file and edit file for (Iterator<StorageDirectory> it = dirIterator(); it.hasNext();) { StorageDirectory sd = it.next(); inspector.inspectDirectory(sd); } }
class class_name[name] begin[{] method[inspectStorageDirs, return_type[void], modifier[default], parameter[inspector]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), name=sd)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StorageDirectory, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=inspectDirectory, postfix_operators=[], prefix_operators=[], qualifier=inspector, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=dirIterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=it)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=StorageDirectory, sub_type=None))], dimensions=[], name=Iterator, sub_type=None)), update=None), label=None) end[}] END[}]
Keyword[void] identifier[inspectStorageDirs] operator[SEP] identifier[FSImageStorageInspector] identifier[inspector] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[for] operator[SEP] identifier[Iterator] operator[<] identifier[StorageDirectory] operator[>] identifier[it] operator[=] identifier[dirIterator] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[StorageDirectory] identifier[sd] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[inspector] operator[SEP] identifier[inspectDirectory] operator[SEP] identifier[sd] operator[SEP] operator[SEP] } }
public final void onCreate(@NonNull final Object client, @Nullable final Bundle savedInstanceState) { mGUIClient = client; if (savedInstanceState != null) { mChronosListener = ChronosListenerManager.getInstance() .getListener(savedInstanceState.getInt(KEY_CHRONOS_LISTENER_ID)); } else { mChronosListener = ChronosListenerManager.getInstance() .createListener(); } }
class class_name[name] begin[{] method[onCreate, return_type[void], modifier[final public], parameter[client, savedInstanceState]] begin[{] assign[member[.mGUIClient], member[.client]] if[binary_operation[member[.savedInstanceState], !=, literal[null]]] begin[{] assign[member[.mChronosListener], call[ChronosListenerManager.getInstance, parameter[]]] else begin[{] assign[member[.mChronosListener], call[ChronosListenerManager.getInstance, parameter[]]] end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[onCreate] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[Object] identifier[client] , annotation[@] identifier[Nullable] Keyword[final] identifier[Bundle] identifier[savedInstanceState] operator[SEP] { identifier[mGUIClient] operator[=] identifier[client] operator[SEP] Keyword[if] operator[SEP] identifier[savedInstanceState] operator[!=] Other[null] operator[SEP] { identifier[mChronosListener] operator[=] identifier[ChronosListenerManager] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getListener] operator[SEP] identifier[savedInstanceState] operator[SEP] identifier[getInt] operator[SEP] identifier[KEY_CHRONOS_LISTENER_ID] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[mChronosListener] operator[=] identifier[ChronosListenerManager] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[createListener] operator[SEP] operator[SEP] operator[SEP] } }
@Override public T validate(T wert) { if (!isValid(wert)) { throw new InvalidLengthException(Objects.toString(wert), min, max); } return wert; }
class class_name[name] begin[{] method[validate, return_type[type[T]], modifier[public], parameter[wert]] begin[{] if[call[.isValid, parameter[member[.wert]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=wert, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Objects, selectors=[], type_arguments=None), MemberReference(member=min, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=max, 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=InvalidLengthException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.wert]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[T] identifier[validate] operator[SEP] identifier[T] identifier[wert] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isValid] operator[SEP] identifier[wert] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidLengthException] operator[SEP] identifier[Objects] operator[SEP] identifier[toString] operator[SEP] identifier[wert] operator[SEP] , identifier[min] , identifier[max] operator[SEP] operator[SEP] } Keyword[return] identifier[wert] operator[SEP] }
@SafeVarargs public static @Nonnull JsonObject object(Entry<String,JsonElement>...fields) { JsonObject object = new JsonObject(); object.add(fields); return object; }
class class_name[name] begin[{] method[object, return_type[type[JsonObject]], modifier[public static], parameter[fields]] begin[{] local_variable[type[JsonObject], object] call[object.add, parameter[member[.fields]]] return[member[.object]] end[}] END[}]
annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] annotation[@] identifier[Nonnull] identifier[JsonObject] identifier[object] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[JsonElement] operator[>] operator[...] identifier[fields] operator[SEP] { identifier[JsonObject] identifier[object] operator[=] Keyword[new] identifier[JsonObject] operator[SEP] operator[SEP] operator[SEP] identifier[object] operator[SEP] identifier[add] operator[SEP] identifier[fields] operator[SEP] operator[SEP] Keyword[return] identifier[object] operator[SEP] }
public S isInstanceOf(Class<?> type) { objects.assertIsInstanceOf(description, actual, type); return myself; }
class class_name[name] begin[{] method[isInstanceOf, return_type[type[S]], modifier[public], parameter[type]] begin[{] call[objects.assertIsInstanceOf, parameter[member[.description], member[.actual], member[.type]]] return[member[.myself]] end[}] END[}]
Keyword[public] identifier[S] identifier[isInstanceOf] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[SEP] { identifier[objects] operator[SEP] identifier[assertIsInstanceOf] operator[SEP] identifier[description] , identifier[actual] , identifier[type] operator[SEP] operator[SEP] Keyword[return] identifier[myself] operator[SEP] }
public ServiceFuture<AvailabilitySetInner> updateAsync(String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters, final ServiceCallback<AvailabilitySetInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, availabilitySetName, parameters), serviceCallback); }
class class_name[name] begin[{] method[updateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, availabilitySetName, parameters, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.updateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.availabilitySetName], member[.parameters]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[AvailabilitySetInner] operator[>] identifier[updateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[availabilitySetName] , identifier[AvailabilitySetUpdate] identifier[parameters] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[AvailabilitySetInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[updateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[availabilitySetName] , identifier[parameters] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
private void remove(Thread t) { synchronized (this) { if (destroyed) { return; } for (int i = 0 ; i < nthreads ; i++) { if (threads[i] == t) { System.arraycopy(threads, i + 1, threads, i, --nthreads - i); // Zap dangling reference to the dead thread so that // the garbage collector will collect it. threads[nthreads] = null; break; } } } }
class class_name[name] begin[{] method[remove, return_type[void], modifier[private], parameter[t]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] if[member[.destroyed]] begin[{] return[None] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=threads, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=threads, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=threads, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=nthreads, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=threads, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=nthreads, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nthreads, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) END[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[remove] operator[SEP] identifier[Thread] identifier[t] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[destroyed] operator[SEP] { Keyword[return] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[nthreads] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[threads] operator[SEP] identifier[i] operator[SEP] operator[==] identifier[t] operator[SEP] { identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[threads] , identifier[i] operator[+] Other[1] , identifier[threads] , identifier[i] , operator[--] identifier[nthreads] operator[-] identifier[i] operator[SEP] operator[SEP] identifier[threads] operator[SEP] identifier[nthreads] operator[SEP] operator[=] Other[null] operator[SEP] Keyword[break] operator[SEP] } } } }
private void injectArguments(final List<Element> arguments, final MethodIdentifier identifier) { final boolean staticMethod = identifier.isStaticMethod(); final int startIndex = staticMethod ? 0 : 1; final int endIndex = staticMethod ? arguments.size() - 1 : arguments.size(); IntStream.rangeClosed(startIndex, endIndex).forEach(i -> localVariables.put(i, arguments.get(staticMethod ? i : i - 1))); }
class class_name[name] begin[{] method[injectArguments, return_type[void], modifier[private], parameter[arguments, identifier]] begin[{] local_variable[type[boolean], staticMethod] local_variable[type[int], startIndex] local_variable[type[int], endIndex] call[IntStream.rangeClosed, parameter[member[.startIndex], member[.endIndex]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[injectArguments] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[Element] operator[>] identifier[arguments] , Keyword[final] identifier[MethodIdentifier] identifier[identifier] operator[SEP] { Keyword[final] Keyword[boolean] identifier[staticMethod] operator[=] identifier[identifier] operator[SEP] identifier[isStaticMethod] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[startIndex] operator[=] identifier[staticMethod] operator[?] Other[0] operator[:] Other[1] operator[SEP] Keyword[final] Keyword[int] identifier[endIndex] operator[=] identifier[staticMethod] operator[?] identifier[arguments] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[:] identifier[arguments] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[IntStream] operator[SEP] identifier[rangeClosed] operator[SEP] identifier[startIndex] , identifier[endIndex] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[i] operator[->] identifier[localVariables] operator[SEP] identifier[put] operator[SEP] identifier[i] , identifier[arguments] operator[SEP] identifier[get] operator[SEP] identifier[staticMethod] operator[?] identifier[i] operator[:] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public void writeString(String text) throws IOException, JsonGenerationException { _verifyValueWrite("write text value"); if (text == null) { _writeNull(); return; } if (_outputTail >= _outputEnd) { _flushBuffer(); } _outputBuffer[_outputTail++] = '"'; _writeString(text); // And finally, closing quotes if (_outputTail >= _outputEnd) { _flushBuffer(); } _outputBuffer[_outputTail++] = '"'; }
class class_name[name] begin[{] method[writeString, return_type[void], modifier[public], parameter[text]] begin[{] call[._verifyValueWrite, parameter[literal["write text value"]]] if[binary_operation[member[.text], ==, literal[null]]] begin[{] call[._writeNull, parameter[]] return[None] else begin[{] None end[}] if[binary_operation[member[._outputTail], >=, member[._outputEnd]]] begin[{] call[._flushBuffer, parameter[]] else begin[{] None end[}] assign[member[._outputBuffer], literal['"']] call[._writeString, parameter[member[.text]]] if[binary_operation[member[._outputTail], >=, member[._outputEnd]]] begin[{] call[._flushBuffer, parameter[]] else begin[{] None end[}] assign[member[._outputBuffer], literal['"']] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[writeString] operator[SEP] identifier[String] identifier[text] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JsonGenerationException] { identifier[_verifyValueWrite] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[text] operator[==] Other[null] operator[SEP] { identifier[_writeNull] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[_outputTail] operator[>=] identifier[_outputEnd] operator[SEP] { identifier[_flushBuffer] operator[SEP] operator[SEP] operator[SEP] } identifier[_outputBuffer] operator[SEP] identifier[_outputTail] operator[++] operator[SEP] operator[=] literal[String] operator[SEP] identifier[_writeString] operator[SEP] identifier[text] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_outputTail] operator[>=] identifier[_outputEnd] operator[SEP] { identifier[_flushBuffer] operator[SEP] operator[SEP] operator[SEP] } identifier[_outputBuffer] operator[SEP] identifier[_outputTail] operator[++] operator[SEP] operator[=] literal[String] operator[SEP] }
public static void setValue(Object instance, String fieldName, Object value) { try { Field f = findFieldRecursively(instance.getClass(), fieldName); if (f == null) throw new NoSuchMethodException("Cannot find field " + fieldName + " on " + instance.getClass() + " or superclasses"); f.setAccessible(true); f.set(instance, value); } catch (Exception e) { throw new RuntimeException(e); } }
class class_name[name] begin[{] method[setValue, return_type[void], modifier[public static], parameter[instance, fieldName, value]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=instance, selectors=[], type_arguments=None), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findFieldRecursively, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=f, 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=ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot find field "), operandr=MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" on "), operator=+), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=instance, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" or superclasses"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoSuchMethodException, sub_type=None)), label=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAccessible, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=instance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setValue] operator[SEP] identifier[Object] identifier[instance] , identifier[String] identifier[fieldName] , identifier[Object] identifier[value] operator[SEP] { Keyword[try] { identifier[Field] identifier[f] operator[=] identifier[findFieldRecursively] operator[SEP] identifier[instance] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[fieldName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[f] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[NoSuchMethodException] operator[SEP] literal[String] operator[+] identifier[fieldName] operator[+] literal[String] operator[+] identifier[instance] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[f] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[f] operator[SEP] identifier[set] operator[SEP] identifier[instance] , identifier[value] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final File yamlFile) throws SQLException, IOException { YamlRootMasterSlaveConfiguration config = YamlEngine.unmarshal(yamlFile, YamlRootMasterSlaveConfiguration.class); return MasterSlaveDataSourceFactory.createDataSource(dataSourceMap, new MasterSlaveRuleConfigurationYamlSwapper().swap(config.getMasterSlaveRule()), config.getProps()); }
class class_name[name] begin[{] method[createDataSource, return_type[type[DataSource]], modifier[public static], parameter[dataSourceMap, yamlFile]] begin[{] local_variable[type[YamlRootMasterSlaveConfiguration], config] return[call[MasterSlaveDataSourceFactory.createDataSource, parameter[member[.dataSourceMap], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMasterSlaveRule, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None)], member=swap, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=MasterSlaveRuleConfigurationYamlSwapper, sub_type=None)), call[config.getProps, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DataSource] identifier[createDataSource] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[DataSource] operator[>] identifier[dataSourceMap] , Keyword[final] identifier[File] identifier[yamlFile] operator[SEP] Keyword[throws] identifier[SQLException] , identifier[IOException] { identifier[YamlRootMasterSlaveConfiguration] identifier[config] operator[=] identifier[YamlEngine] operator[SEP] identifier[unmarshal] operator[SEP] identifier[yamlFile] , identifier[YamlRootMasterSlaveConfiguration] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[MasterSlaveDataSourceFactory] operator[SEP] identifier[createDataSource] operator[SEP] identifier[dataSourceMap] , Keyword[new] identifier[MasterSlaveRuleConfigurationYamlSwapper] operator[SEP] operator[SEP] operator[SEP] identifier[swap] operator[SEP] identifier[config] operator[SEP] identifier[getMasterSlaveRule] operator[SEP] operator[SEP] operator[SEP] , identifier[config] operator[SEP] identifier[getProps] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private BufferedImage getImage(int layer) { BufferedImage image = layeredImage[layer]; if (image == null) { createImageAndGraphics(layer); image = layeredImage[layer]; } return image; }
class class_name[name] begin[{] method[getImage, return_type[type[BufferedImage]], modifier[private], parameter[layer]] begin[{] local_variable[type[BufferedImage], image] if[binary_operation[member[.image], ==, literal[null]]] begin[{] call[.createImageAndGraphics, parameter[member[.layer]]] assign[member[.image], member[.layeredImage]] else begin[{] None end[}] return[member[.image]] end[}] END[}]
Keyword[private] identifier[BufferedImage] identifier[getImage] operator[SEP] Keyword[int] identifier[layer] operator[SEP] { identifier[BufferedImage] identifier[image] operator[=] identifier[layeredImage] operator[SEP] identifier[layer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[image] operator[==] Other[null] operator[SEP] { identifier[createImageAndGraphics] operator[SEP] identifier[layer] operator[SEP] operator[SEP] identifier[image] operator[=] identifier[layeredImage] operator[SEP] identifier[layer] operator[SEP] operator[SEP] } Keyword[return] identifier[image] operator[SEP] }
@Override public RegisterThingResult registerThing(RegisterThingRequest request) { request = beforeClientExecution(request); return executeRegisterThing(request); }
class class_name[name] begin[{] method[registerThing, return_type[type[RegisterThingResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeRegisterThing, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[RegisterThingResult] identifier[registerThing] operator[SEP] identifier[RegisterThingRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeRegisterThing] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static void setWhiteListDomains(List<String> whiteListDomains) { WhitelistDomainRequest request = new WhitelistDomainRequest( whiteListDomains, DomainActionType.ADD); FbBotMillNetworkController.postThreadSetting(request); }
class class_name[name] begin[{] method[setWhiteListDomains, return_type[void], modifier[public static], parameter[whiteListDomains]] begin[{] local_variable[type[WhitelistDomainRequest], request] call[FbBotMillNetworkController.postThreadSetting, parameter[member[.request]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setWhiteListDomains] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[whiteListDomains] operator[SEP] { identifier[WhitelistDomainRequest] identifier[request] operator[=] Keyword[new] identifier[WhitelistDomainRequest] operator[SEP] identifier[whiteListDomains] , identifier[DomainActionType] operator[SEP] identifier[ADD] operator[SEP] operator[SEP] identifier[FbBotMillNetworkController] operator[SEP] identifier[postThreadSetting] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Pure public static String basename(URL filename) { if (filename == null) { return null; } final String largeBasename = filename.getPath(); assert !isWindowsNativeFilename(largeBasename); int end = largeBasename.length(); int idx; do { end--; idx = largeBasename.lastIndexOf(URL_PATH_SEPARATOR_CHAR, end); } while (idx >= 0 && end >= 0 && idx >= end); String basename; if (idx < 0) { if (end < largeBasename.length() - 1) { basename = largeBasename.substring(0, end + 1); } else { basename = largeBasename; } } else { basename = largeBasename.substring(idx + 1, end + 1); } idx = basename.lastIndexOf(getFileExtensionCharacter()); if (idx >= 0) { basename = basename.substring(0, idx); } return decodeHTMLEntities(basename); }
class class_name[name] begin[{] method[basename, 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[String], largeBasename] AssertStatement(condition=MethodInvocation(arguments=[MemberReference(member=largeBasename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isWindowsNativeFilename, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), label=None, value=None) local_variable[type[int], end] local_variable[type[int], idx] do[binary_operation[binary_operation[binary_operation[member[.idx], >=, literal[0]], &&, binary_operation[member[.end], >=, literal[0]]], &&, binary_operation[member[.idx], >=, member[.end]]]] begin[{] member[.end] assign[member[.idx], call[largeBasename.lastIndexOf, parameter[member[.URL_PATH_SEPARATOR_CHAR], member[.end]]]] end[}] local_variable[type[String], basename] if[binary_operation[member[.idx], <, literal[0]]] begin[{] if[binary_operation[member[.end], <, binary_operation[call[largeBasename.length, parameter[]], -, literal[1]]]] begin[{] assign[member[.basename], call[largeBasename.substring, parameter[literal[0], binary_operation[member[.end], +, literal[1]]]]] else begin[{] assign[member[.basename], member[.largeBasename]] end[}] else begin[{] assign[member[.basename], call[largeBasename.substring, parameter[binary_operation[member[.idx], +, literal[1]], binary_operation[member[.end], +, literal[1]]]]] end[}] assign[member[.idx], call[basename.lastIndexOf, parameter[call[.getFileExtensionCharacter, parameter[]]]]] if[binary_operation[member[.idx], >=, literal[0]]] begin[{] assign[member[.basename], call[basename.substring, parameter[literal[0], member[.idx]]]] else begin[{] None end[}] return[call[.decodeHTMLEntities, parameter[member[.basename]]]] end[}] END[}]
annotation[@] identifier[Pure] Keyword[public] Keyword[static] identifier[String] identifier[basename] operator[SEP] identifier[URL] identifier[filename] operator[SEP] { Keyword[if] operator[SEP] identifier[filename] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[final] identifier[String] identifier[largeBasename] operator[=] identifier[filename] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] operator[!] identifier[isWindowsNativeFilename] operator[SEP] identifier[largeBasename] operator[SEP] operator[SEP] Keyword[int] identifier[end] operator[=] identifier[largeBasename] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[idx] operator[SEP] Keyword[do] { identifier[end] operator[--] operator[SEP] identifier[idx] operator[=] identifier[largeBasename] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[URL_PATH_SEPARATOR_CHAR] , identifier[end] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[idx] operator[>=] Other[0] operator[&&] identifier[end] operator[>=] Other[0] operator[&&] identifier[idx] operator[>=] identifier[end] operator[SEP] operator[SEP] identifier[String] identifier[basename] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[<] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[end] operator[<] identifier[largeBasename] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] { identifier[basename] operator[=] identifier[largeBasename] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[end] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[basename] operator[=] identifier[largeBasename] operator[SEP] } } Keyword[else] { identifier[basename] operator[=] identifier[largeBasename] operator[SEP] identifier[substring] operator[SEP] identifier[idx] operator[+] Other[1] , identifier[end] operator[+] Other[1] operator[SEP] operator[SEP] } identifier[idx] operator[=] identifier[basename] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[getFileExtensionCharacter] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idx] operator[>=] Other[0] operator[SEP] { identifier[basename] operator[=] identifier[basename] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[idx] operator[SEP] operator[SEP] } Keyword[return] identifier[decodeHTMLEntities] operator[SEP] identifier[basename] operator[SEP] operator[SEP] }
private boolean addInactive(PeerAddress peerAddress) { lock.lock(); try { // Deduplicate if (backoffMap.containsKey(peerAddress)) return false; backoffMap.put(peerAddress, new ExponentialBackoff(peerBackoffParams)); inactives.offer(peerAddress); return true; } finally { lock.unlock(); } }
class class_name[name] begin[{] method[addInactive, return_type[type[boolean]], modifier[private], parameter[peerAddress]] begin[{] call[lock.lock, parameter[]] TryStatement(block=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=peerAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=backoffMap, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=peerAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=peerBackoffParams, 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=ExponentialBackoff, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=backoffMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=peerAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=offer, postfix_operators=[], prefix_operators=[], qualifier=inactives, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=lock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[boolean] identifier[addInactive] operator[SEP] identifier[PeerAddress] identifier[peerAddress] operator[SEP] { identifier[lock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[backoffMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[peerAddress] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[backoffMap] operator[SEP] identifier[put] operator[SEP] identifier[peerAddress] , Keyword[new] identifier[ExponentialBackoff] operator[SEP] identifier[peerBackoffParams] operator[SEP] operator[SEP] operator[SEP] identifier[inactives] operator[SEP] identifier[offer] operator[SEP] identifier[peerAddress] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[finally] { identifier[lock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
public FeatureTableData buildMapClickTableData(LatLng latLng, View view, GoogleMap map, Projection projection) { // Get the zoom level double zoom = MapUtils.getCurrentZoom(map); // Build a bounding box to represent the click location BoundingBox boundingBox = MapUtils.buildClickBoundingBox(latLng, view, map, screenClickPercentage); // Get the map click distance tolerance double tolerance = MapUtils.getToleranceDistance(latLng, view, map, screenClickPercentage); FeatureTableData tableData = buildMapClickTableData(latLng, zoom, boundingBox, tolerance, projection); return tableData; }
class class_name[name] begin[{] method[buildMapClickTableData, return_type[type[FeatureTableData]], modifier[public], parameter[latLng, view, map, projection]] begin[{] local_variable[type[double], zoom] local_variable[type[BoundingBox], boundingBox] local_variable[type[double], tolerance] local_variable[type[FeatureTableData], tableData] return[member[.tableData]] end[}] END[}]
Keyword[public] identifier[FeatureTableData] identifier[buildMapClickTableData] operator[SEP] identifier[LatLng] identifier[latLng] , identifier[View] identifier[view] , identifier[GoogleMap] identifier[map] , identifier[Projection] identifier[projection] operator[SEP] { Keyword[double] identifier[zoom] operator[=] identifier[MapUtils] operator[SEP] identifier[getCurrentZoom] operator[SEP] identifier[map] operator[SEP] operator[SEP] identifier[BoundingBox] identifier[boundingBox] operator[=] identifier[MapUtils] operator[SEP] identifier[buildClickBoundingBox] operator[SEP] identifier[latLng] , identifier[view] , identifier[map] , identifier[screenClickPercentage] operator[SEP] operator[SEP] Keyword[double] identifier[tolerance] operator[=] identifier[MapUtils] operator[SEP] identifier[getToleranceDistance] operator[SEP] identifier[latLng] , identifier[view] , identifier[map] , identifier[screenClickPercentage] operator[SEP] operator[SEP] identifier[FeatureTableData] identifier[tableData] operator[=] identifier[buildMapClickTableData] operator[SEP] identifier[latLng] , identifier[zoom] , identifier[boundingBox] , identifier[tolerance] , identifier[projection] operator[SEP] operator[SEP] Keyword[return] identifier[tableData] operator[SEP] }