code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static <T extends Model> LazyList<T> findBySQL(String fullQuery, Object... params) { return ModelDelegate.findBySql(Model.<T>modelClass(), fullQuery, params); }
class class_name[name] begin[{] method[findBySQL, return_type[type[LazyList]], modifier[public static], parameter[fullQuery, params]] begin[{] return[call[ModelDelegate.findBySql, parameter[call[.Model, parameter[]], member[.fullQuery], member[.params]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Model] operator[>] identifier[LazyList] operator[<] identifier[T] operator[>] identifier[findBySQL] operator[SEP] identifier[String] identifier[fullQuery] , identifier[Object] operator[...] identifier[params] operator[SEP] { Keyword[return] identifier[ModelDelegate] operator[SEP] identifier[findBySql] operator[SEP] identifier[Model] operator[SEP] operator[<] identifier[T] operator[>] identifier[modelClass] operator[SEP] operator[SEP] , identifier[fullQuery] , identifier[params] operator[SEP] operator[SEP] }
public Collection<Select> getAllSelects() { final List<Select> ret = new ArrayList<>(this.selects); ret.addAll(this.instSelects.values()); return Collections.unmodifiableCollection(ret); }
class class_name[name] begin[{] method[getAllSelects, return_type[type[Collection]], modifier[public], parameter[]] begin[{] local_variable[type[List], ret] call[ret.addAll, parameter[THIS[member[None.instSelects]call[None.values, parameter[]]]]] return[call[Collections.unmodifiableCollection, parameter[member[.ret]]]] end[}] END[}]
Keyword[public] identifier[Collection] operator[<] identifier[Select] operator[>] identifier[getAllSelects] operator[SEP] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[Select] operator[>] identifier[ret] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] Keyword[this] operator[SEP] identifier[selects] operator[SEP] operator[SEP] identifier[ret] operator[SEP] identifier[addAll] operator[SEP] Keyword[this] operator[SEP] identifier[instSelects] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[Collections] operator[SEP] identifier[unmodifiableCollection] operator[SEP] identifier[ret] operator[SEP] operator[SEP] }
public double getProgressFromResponse(ResponseOnSingeRequest myResponse) { double progress = 0.0; try { if (myResponse == null || myResponse.isFailObtainResponse()) { return progress; } String responseBody = myResponse.getResponseBody(); Pattern regex = Pattern.compile(progressRegex); Matcher matcher = regex.matcher(responseBody); if (matcher.matches()) { String progressStr = matcher.group(1); progress = Double.parseDouble(progressStr); } } catch (Exception t) { logger.error("fail " + t); } return progress; }
class class_name[name] begin[{] method[getProgressFromResponse, return_type[type[double]], modifier[public], parameter[myResponse]] begin[{] local_variable[type[double], progress] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=myResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=isFailObtainResponse, postfix_operators=[], prefix_operators=[], qualifier=myResponse, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=progress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getResponseBody, postfix_operators=[], prefix_operators=[], qualifier=myResponse, selectors=[], type_arguments=None), name=responseBody)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=progressRegex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compile, postfix_operators=[], prefix_operators=[], qualifier=Pattern, selectors=[], type_arguments=None), name=regex)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Pattern, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=responseBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matcher, postfix_operators=[], prefix_operators=[], qualifier=regex, selectors=[], type_arguments=None), name=matcher)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Matcher, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=matches, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=group, postfix_operators=[], prefix_operators=[], qualifier=matcher, selectors=[], type_arguments=None), name=progressStr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=progress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=progressStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseDouble, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None)), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="fail "), operandr=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.progress]] end[}] END[}]
Keyword[public] Keyword[double] identifier[getProgressFromResponse] operator[SEP] identifier[ResponseOnSingeRequest] identifier[myResponse] operator[SEP] { Keyword[double] identifier[progress] operator[=] literal[Float] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[myResponse] operator[==] Other[null] operator[||] identifier[myResponse] operator[SEP] identifier[isFailObtainResponse] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[progress] operator[SEP] } identifier[String] identifier[responseBody] operator[=] identifier[myResponse] operator[SEP] identifier[getResponseBody] operator[SEP] operator[SEP] operator[SEP] identifier[Pattern] identifier[regex] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] identifier[progressRegex] operator[SEP] operator[SEP] identifier[Matcher] identifier[matcher] operator[=] identifier[regex] operator[SEP] identifier[matcher] operator[SEP] identifier[responseBody] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[progressStr] operator[=] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[progress] operator[=] identifier[Double] operator[SEP] identifier[parseDouble] operator[SEP] identifier[progressStr] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[t] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[t] operator[SEP] operator[SEP] } Keyword[return] identifier[progress] operator[SEP] }
public static String rejectChar(String string, CharPredicate predicate) { int size = string.length(); StringBuilder buffer = new StringBuilder(string.length()); for (int i = 0; i < size; i++) { char character = string.charAt(i); if (!predicate.accept(character)) { buffer.append(character); } } return buffer.toString(); }
class class_name[name] begin[{] method[rejectChar, return_type[type[String]], modifier[public static], parameter[string, predicate]] begin[{] local_variable[type[int], size] local_variable[type[StringBuilder], buffer] 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=string, selectors=[], type_arguments=None), name=character)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=character, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=['!'], qualifier=predicate, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=character, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[buffer.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[rejectChar] operator[SEP] identifier[String] identifier[string] , identifier[CharPredicate] identifier[predicate] operator[SEP] { Keyword[int] identifier[size] operator[=] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[buffer] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[character] operator[=] identifier[string] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[predicate] operator[SEP] identifier[accept] operator[SEP] identifier[character] operator[SEP] operator[SEP] { identifier[buffer] operator[SEP] identifier[append] operator[SEP] identifier[character] operator[SEP] operator[SEP] } } Keyword[return] identifier[buffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public int getCompareToValue() { if ((differentValue1 != null && differentValue2 != null) && (differentValue1 instanceof Comparable && differentValue2 instanceof Comparable)) { return ((Comparable<Object>) differentValue1).compareTo(differentValue2); } return 0; }
class class_name[name] begin[{] method[getCompareToValue, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.differentValue1], !=, literal[null]], &&, binary_operation[member[.differentValue2], !=, literal[null]]], &&, binary_operation[binary_operation[member[.differentValue1], instanceof, type[Comparable]], &&, binary_operation[member[.differentValue2], instanceof, type[Comparable]]]]] begin[{] return[Cast(expression=MemberReference(member=differentValue1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Comparable, sub_type=None))] else begin[{] None end[}] return[literal[0]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[int] identifier[getCompareToValue] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[differentValue1] operator[!=] Other[null] operator[&&] identifier[differentValue2] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[differentValue1] Keyword[instanceof] identifier[Comparable] operator[&&] identifier[differentValue2] Keyword[instanceof] identifier[Comparable] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] operator[SEP] identifier[Comparable] operator[<] identifier[Object] operator[>] operator[SEP] identifier[differentValue1] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[differentValue2] operator[SEP] operator[SEP] } Keyword[return] Other[0] operator[SEP] }
public PdfDictionary getAsDict(PdfName key) { PdfDictionary dict = null; PdfObject orig = getDirectObject(key); if (orig != null && orig.isDictionary()) { dict = (PdfDictionary) orig; } return dict; }
class class_name[name] begin[{] method[getAsDict, return_type[type[PdfDictionary]], modifier[public], parameter[key]] begin[{] local_variable[type[PdfDictionary], dict] local_variable[type[PdfObject], orig] if[binary_operation[binary_operation[member[.orig], !=, literal[null]], &&, call[orig.isDictionary, parameter[]]]] begin[{] assign[member[.dict], Cast(expression=MemberReference(member=orig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=PdfDictionary, sub_type=None))] else begin[{] None end[}] return[member[.dict]] end[}] END[}]
Keyword[public] identifier[PdfDictionary] identifier[getAsDict] operator[SEP] identifier[PdfName] identifier[key] operator[SEP] { identifier[PdfDictionary] identifier[dict] operator[=] Other[null] operator[SEP] identifier[PdfObject] identifier[orig] operator[=] identifier[getDirectObject] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[orig] operator[!=] Other[null] operator[&&] identifier[orig] operator[SEP] identifier[isDictionary] operator[SEP] operator[SEP] operator[SEP] { identifier[dict] operator[=] operator[SEP] identifier[PdfDictionary] operator[SEP] identifier[orig] operator[SEP] } Keyword[return] identifier[dict] operator[SEP] }
@Deprecated public String processTaglibAttributes(String content) { // matches a whole page directive final Pattern directivePattern = Pattern.compile("(?sm)<%@\\s*page.*?%>"); // matches a taglibs attribute and captures its values final Pattern taglibPattern = Pattern.compile("(?sm)taglibs\\s*=\\s*\"(.*?)\""); final Pattern commaPattern = Pattern.compile("(?sm)\\s*,\\s*"); final Set<String> taglibs = new LinkedHashSet<String>(); // we insert the marker after the first page directive final String marker = ":::TAGLIBS:::"; I_CmsRegexSubstitution directiveSub = new I_CmsRegexSubstitution() { private boolean m_first = true; public String substituteMatch(String string, Matcher matcher) { String match = string.substring(matcher.start(), matcher.end()); I_CmsRegexSubstitution taglibSub = new I_CmsRegexSubstitution() { public String substituteMatch(String string1, Matcher matcher1) { // values of the taglibs attribute String match1 = string1.substring(matcher1.start(1), matcher1.end(1)); for (String taglibKey : Splitter.on(commaPattern).split(match1)) { taglibs.add(taglibKey); } return ""; } }; String result = CmsStringUtil.substitute(taglibPattern, match, taglibSub); if (m_first) { result += marker; m_first = false; } return result; } }; String substituted = CmsStringUtil.substitute(directivePattern, content, directiveSub); // insert taglib inclusion substituted = substituted.replaceAll(marker, generateTaglibInclusions(taglibs)); // remove empty page directives substituted = substituted.replaceAll("(?sm)<%@\\s*page\\s*%>", ""); return substituted; }
class class_name[name] begin[{] method[processTaglibAttributes, return_type[type[String]], modifier[public], parameter[content]] begin[{] local_variable[type[Pattern], directivePattern] local_variable[type[Pattern], taglibPattern] local_variable[type[Pattern], commaPattern] local_variable[type[Set], taglibs] local_variable[type[String], marker] local_variable[type[I_CmsRegexSubstitution], directiveSub] local_variable[type[String], substituted] assign[member[.substituted], call[substituted.replaceAll, parameter[member[.marker], call[.generateTaglibInclusions, parameter[member[.taglibs]]]]]] assign[member[.substituted], call[substituted.replaceAll, parameter[literal["(?sm)<%@\\s*page\\s*%>"], literal[""]]]] return[member[.substituted]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] identifier[String] identifier[processTaglibAttributes] operator[SEP] identifier[String] identifier[content] operator[SEP] { Keyword[final] identifier[Pattern] identifier[directivePattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[Pattern] identifier[taglibPattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[Pattern] identifier[commaPattern] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[Set] operator[<] identifier[String] operator[>] identifier[taglibs] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[marker] operator[=] literal[String] operator[SEP] identifier[I_CmsRegexSubstitution] identifier[directiveSub] operator[=] Keyword[new] identifier[I_CmsRegexSubstitution] operator[SEP] operator[SEP] { Keyword[private] Keyword[boolean] identifier[m_first] operator[=] literal[boolean] operator[SEP] Keyword[public] identifier[String] identifier[substituteMatch] operator[SEP] identifier[String] identifier[string] , identifier[Matcher] identifier[matcher] operator[SEP] { identifier[String] identifier[match] operator[=] identifier[string] operator[SEP] identifier[substring] operator[SEP] identifier[matcher] operator[SEP] identifier[start] operator[SEP] operator[SEP] , identifier[matcher] operator[SEP] identifier[end] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[I_CmsRegexSubstitution] identifier[taglibSub] operator[=] Keyword[new] identifier[I_CmsRegexSubstitution] operator[SEP] operator[SEP] { Keyword[public] identifier[String] identifier[substituteMatch] operator[SEP] identifier[String] identifier[string1] , identifier[Matcher] identifier[matcher1] operator[SEP] { identifier[String] identifier[match1] operator[=] identifier[string1] operator[SEP] identifier[substring] operator[SEP] identifier[matcher1] operator[SEP] identifier[start] operator[SEP] Other[1] operator[SEP] , identifier[matcher1] operator[SEP] identifier[end] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[taglibKey] operator[:] identifier[Splitter] operator[SEP] identifier[on] operator[SEP] identifier[commaPattern] operator[SEP] operator[SEP] identifier[split] operator[SEP] identifier[match1] operator[SEP] operator[SEP] { identifier[taglibs] operator[SEP] identifier[add] operator[SEP] identifier[taglibKey] operator[SEP] operator[SEP] } Keyword[return] literal[String] operator[SEP] } } operator[SEP] identifier[String] identifier[result] operator[=] identifier[CmsStringUtil] operator[SEP] identifier[substitute] operator[SEP] identifier[taglibPattern] , identifier[match] , identifier[taglibSub] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[m_first] operator[SEP] { identifier[result] operator[+=] identifier[marker] operator[SEP] identifier[m_first] operator[=] literal[boolean] operator[SEP] } Keyword[return] identifier[result] operator[SEP] } } operator[SEP] identifier[String] identifier[substituted] operator[=] identifier[CmsStringUtil] operator[SEP] identifier[substitute] operator[SEP] identifier[directivePattern] , identifier[content] , identifier[directiveSub] operator[SEP] operator[SEP] identifier[substituted] operator[=] identifier[substituted] operator[SEP] identifier[replaceAll] operator[SEP] identifier[marker] , identifier[generateTaglibInclusions] operator[SEP] identifier[taglibs] operator[SEP] operator[SEP] operator[SEP] identifier[substituted] operator[=] identifier[substituted] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[substituted] operator[SEP] }
@Override public void start() throws SchedulerException { if (shuttingDown || closed) { throw new SchedulerException( "The Scheduler cannot be restarted after shutdown() has been called."); } if (initialStart == null) { initialStart = new Date(); quartzSchedulerResources.getJobStore().schedulerStarted(); startPlugins(); } this.quartzSchedulerThread.togglePause(false); logger.info("Scheduler started."); notifySchedulerListenersStarted(); }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.shuttingDown], ||, member[.closed]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The Scheduler cannot be restarted after shutdown() has been called.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SchedulerException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.initialStart], ==, literal[null]]] begin[{] assign[member[.initialStart], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))] call[quartzSchedulerResources.getJobStore, parameter[]] call[.startPlugins, parameter[]] else begin[{] None end[}] THIS[member[None.quartzSchedulerThread]call[None.togglePause, parameter[literal[false]]]] call[logger.info, parameter[literal["Scheduler started."]]] call[.notifySchedulerListenersStarted, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] operator[SEP] Keyword[throws] identifier[SchedulerException] { Keyword[if] operator[SEP] identifier[shuttingDown] operator[||] identifier[closed] operator[SEP] { Keyword[throw] Keyword[new] identifier[SchedulerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[initialStart] operator[==] Other[null] operator[SEP] { identifier[initialStart] operator[=] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[quartzSchedulerResources] operator[SEP] identifier[getJobStore] operator[SEP] operator[SEP] operator[SEP] identifier[schedulerStarted] operator[SEP] operator[SEP] operator[SEP] identifier[startPlugins] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[quartzSchedulerThread] operator[SEP] identifier[togglePause] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[notifySchedulerListenersStarted] operator[SEP] operator[SEP] operator[SEP] }
private void filter(ValueSet filterValueSet, ValueSet valueSet) { if (filterValueSet != null && valueSet != null && !filterValueSet.isEmpty() && !valueSet.isEmpty()) { Iterator it = filterValueSet.iterator(); while (it.hasNext()) { Object o = it.next(); if (valueSet.contains(o)) { it.remove(); } } } }
class class_name[name] begin[{] method[filter, return_type[void], modifier[private], parameter[filterValueSet, valueSet]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.filterValueSet], !=, literal[null]], &&, binary_operation[member[.valueSet], !=, literal[null]]], &&, call[filterValueSet.isEmpty, parameter[]]], &&, call[valueSet.isEmpty, parameter[]]]] begin[{] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[Object], o] if[call[valueSet.contains, parameter[member[.o]]]] begin[{] call[it.remove, parameter[]] else begin[{] None end[}] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[filter] operator[SEP] identifier[ValueSet] identifier[filterValueSet] , identifier[ValueSet] identifier[valueSet] operator[SEP] { Keyword[if] operator[SEP] identifier[filterValueSet] operator[!=] Other[null] operator[&&] identifier[valueSet] operator[!=] Other[null] operator[&&] operator[!] identifier[filterValueSet] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[valueSet] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Iterator] identifier[it] operator[=] identifier[filterValueSet] 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[Object] identifier[o] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[valueSet] operator[SEP] identifier[contains] operator[SEP] identifier[o] operator[SEP] operator[SEP] { identifier[it] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } } } }
public static void log( GrayF32 input , GrayF32 output ) { output.reshape(input.width,input.height); if( BoofConcurrency.USE_CONCURRENT ) { ImplPixelMath_MT.log(input,output); } else { ImplPixelMath.log(input,output); } }
class class_name[name] begin[{] method[log, return_type[void], modifier[public static], parameter[input, output]] begin[{] call[output.reshape, parameter[member[input.width], member[input.height]]] if[member[BoofConcurrency.USE_CONCURRENT]] begin[{] call[ImplPixelMath_MT.log, parameter[member[.input], member[.output]]] else begin[{] call[ImplPixelMath.log, parameter[member[.input], member[.output]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[log] operator[SEP] identifier[GrayF32] identifier[input] , identifier[GrayF32] identifier[output] operator[SEP] { identifier[output] operator[SEP] identifier[reshape] operator[SEP] identifier[input] operator[SEP] identifier[width] , identifier[input] operator[SEP] identifier[height] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[BoofConcurrency] operator[SEP] identifier[USE_CONCURRENT] operator[SEP] { identifier[ImplPixelMath_MT] operator[SEP] identifier[log] operator[SEP] identifier[input] , identifier[output] operator[SEP] operator[SEP] } Keyword[else] { identifier[ImplPixelMath] operator[SEP] identifier[log] operator[SEP] identifier[input] , identifier[output] operator[SEP] operator[SEP] } }
private void updateTile(Tile tile, Tile neighbor, Circuit circuit) { final Iterator<TileRef> iterator = getTiles(circuit).iterator(); while (iterator.hasNext()) { final TileRef newTile = iterator.next(); if (mapGroup.getGroup(newTile).equals(mapGroup.getGroup(tile))) { map.setTile(map.createTile(newTile.getSheet(), newTile.getNumber(), neighbor.getX(), neighbor.getY())); break; } } }
class class_name[name] begin[{] method[updateTile, return_type[void], modifier[private], parameter[tile, neighbor, circuit]] begin[{] local_variable[type[Iterator], iterator] while[call[iterator.hasNext, parameter[]]] begin[{] local_variable[type[TileRef], newTile] if[call[mapGroup.getGroup, parameter[member[.newTile]]]] begin[{] call[map.setTile, parameter[call[map.createTile, parameter[call[newTile.getSheet, parameter[]], call[newTile.getNumber, parameter[]], call[neighbor.getX, parameter[]], call[neighbor.getY, parameter[]]]]]] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[updateTile] operator[SEP] identifier[Tile] identifier[tile] , identifier[Tile] identifier[neighbor] , identifier[Circuit] identifier[circuit] operator[SEP] { Keyword[final] identifier[Iterator] operator[<] identifier[TileRef] operator[>] identifier[iterator] operator[=] identifier[getTiles] operator[SEP] identifier[circuit] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[TileRef] identifier[newTile] operator[=] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mapGroup] operator[SEP] identifier[getGroup] operator[SEP] identifier[newTile] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[mapGroup] operator[SEP] identifier[getGroup] operator[SEP] identifier[tile] operator[SEP] operator[SEP] operator[SEP] { identifier[map] operator[SEP] identifier[setTile] operator[SEP] identifier[map] operator[SEP] identifier[createTile] operator[SEP] identifier[newTile] operator[SEP] identifier[getSheet] operator[SEP] operator[SEP] , identifier[newTile] operator[SEP] identifier[getNumber] operator[SEP] operator[SEP] , identifier[neighbor] operator[SEP] identifier[getX] operator[SEP] operator[SEP] , identifier[neighbor] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } }
private Schema complexSchemaForType( String fieldPath, Record record, Field field ) throws OnRecordErrorException { Schema simpleSchema = simpleSchemaForType(fieldPath, record, field); Schema finalSchema = simpleSchema; if(getConfig().avroNullableFields) { finalSchema = Schema.createUnion(ImmutableList.of( Schema.create(Schema.Type.NULL), simpleSchema )); } JsonNode defaultValue = getDefaultValue(simpleSchema); if(defaultValue != null) { finalSchema.addProp("defaultValue", defaultValue); } return finalSchema; }
class class_name[name] begin[{] method[complexSchemaForType, return_type[type[Schema]], modifier[private], parameter[fieldPath, record, field]] begin[{] local_variable[type[Schema], simpleSchema] local_variable[type[Schema], finalSchema] if[call[.getConfig, parameter[]]] begin[{] assign[member[.finalSchema], call[Schema.createUnion, parameter[call[ImmutableList.of, parameter[call[Schema.create, parameter[member[Schema.Type.NULL]]], member[.simpleSchema]]]]]] else begin[{] None end[}] local_variable[type[JsonNode], defaultValue] if[binary_operation[member[.defaultValue], !=, literal[null]]] begin[{] call[finalSchema.addProp, parameter[literal["defaultValue"], member[.defaultValue]]] else begin[{] None end[}] return[member[.finalSchema]] end[}] END[}]
Keyword[private] identifier[Schema] identifier[complexSchemaForType] operator[SEP] identifier[String] identifier[fieldPath] , identifier[Record] identifier[record] , identifier[Field] identifier[field] operator[SEP] Keyword[throws] identifier[OnRecordErrorException] { identifier[Schema] identifier[simpleSchema] operator[=] identifier[simpleSchemaForType] operator[SEP] identifier[fieldPath] , identifier[record] , identifier[field] operator[SEP] operator[SEP] identifier[Schema] identifier[finalSchema] operator[=] identifier[simpleSchema] operator[SEP] Keyword[if] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[avroNullableFields] operator[SEP] { identifier[finalSchema] operator[=] identifier[Schema] operator[SEP] identifier[createUnion] operator[SEP] identifier[ImmutableList] operator[SEP] identifier[of] operator[SEP] identifier[Schema] operator[SEP] identifier[create] operator[SEP] identifier[Schema] operator[SEP] identifier[Type] operator[SEP] identifier[NULL] operator[SEP] , identifier[simpleSchema] operator[SEP] operator[SEP] operator[SEP] } identifier[JsonNode] identifier[defaultValue] operator[=] identifier[getDefaultValue] operator[SEP] identifier[simpleSchema] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[defaultValue] operator[!=] Other[null] operator[SEP] { identifier[finalSchema] operator[SEP] identifier[addProp] operator[SEP] literal[String] , identifier[defaultValue] operator[SEP] operator[SEP] } Keyword[return] identifier[finalSchema] operator[SEP] }
private URL setURL(URL url) throws RepositoryIllegalArgumentException { int port = url.getPort(); if (port == -1) { throw new RepositoryIllegalArgumentException("Bad proxy URL", new IllegalArgumentException("Proxy URL does not contain a port")); } String host = url.getHost(); if (host.equals("")) { throw new RepositoryIllegalArgumentException("Bad proxy URL", new IllegalArgumentException("Proxy URL does not contain a host")); } return url; }
class class_name[name] begin[{] method[setURL, return_type[type[URL]], modifier[private], parameter[url]] begin[{] local_variable[type[int], port] if[binary_operation[member[.port], ==, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Bad proxy URL"), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Proxy URL does not contain a port")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RepositoryIllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], host] if[call[host.equals, parameter[literal[""]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Bad proxy URL"), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Proxy URL does not contain a host")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RepositoryIllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.url]] end[}] END[}]
Keyword[private] identifier[URL] identifier[setURL] operator[SEP] identifier[URL] identifier[url] operator[SEP] Keyword[throws] identifier[RepositoryIllegalArgumentException] { Keyword[int] identifier[port] operator[=] identifier[url] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[port] operator[==] operator[-] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[RepositoryIllegalArgumentException] operator[SEP] literal[String] , Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[host] operator[=] identifier[url] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[host] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[RepositoryIllegalArgumentException] operator[SEP] literal[String] , Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[url] operator[SEP] }
@SuppressWarnings("unchecked") public CMAContentType create( String spaceId, String environmentId, CMAContentType contentType) { assertNotNull(spaceId, "spaceId"); assertNotNull(contentType, "contentType"); assertNotNull(environmentId, "environmentId"); final String contentTypeId = contentType.getId(); final CMASystem sys = contentType.getSystem(); contentType.setSystem(null); try { if (contentTypeId == null) { return service.create(spaceId, environmentId, contentType).blockingFirst(); } else { return service.create(spaceId, environmentId, contentTypeId, contentType).blockingFirst(); } } finally { contentType.setSystem(sys); } }
class class_name[name] begin[{] method[create, return_type[type[CMAContentType]], modifier[public], parameter[spaceId, environmentId, contentType]] begin[{] call[.assertNotNull, parameter[member[.spaceId], literal["spaceId"]]] call[.assertNotNull, parameter[member[.contentType], literal["contentType"]]] call[.assertNotNull, parameter[member[.environmentId], literal["environmentId"]]] local_variable[type[String], contentTypeId] local_variable[type[CMASystem], sys] call[contentType.setSystem, parameter[literal[null]]] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=contentTypeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=spaceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=environmentId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contentTypeId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=service, selectors=[MethodInvocation(arguments=[], member=blockingFirst, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=spaceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=environmentId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=create, postfix_operators=[], prefix_operators=[], qualifier=service, selectors=[MethodInvocation(arguments=[], member=blockingFirst, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSystem, postfix_operators=[], prefix_operators=[], qualifier=contentType, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[CMAContentType] identifier[create] operator[SEP] identifier[String] identifier[spaceId] , identifier[String] identifier[environmentId] , identifier[CMAContentType] identifier[contentType] operator[SEP] { identifier[assertNotNull] operator[SEP] identifier[spaceId] , literal[String] operator[SEP] operator[SEP] identifier[assertNotNull] operator[SEP] identifier[contentType] , literal[String] operator[SEP] operator[SEP] identifier[assertNotNull] operator[SEP] identifier[environmentId] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[contentTypeId] operator[=] identifier[contentType] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[CMASystem] identifier[sys] operator[=] identifier[contentType] operator[SEP] identifier[getSystem] operator[SEP] operator[SEP] operator[SEP] identifier[contentType] operator[SEP] identifier[setSystem] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[contentTypeId] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[service] operator[SEP] identifier[create] operator[SEP] identifier[spaceId] , identifier[environmentId] , identifier[contentType] operator[SEP] operator[SEP] identifier[blockingFirst] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[service] operator[SEP] identifier[create] operator[SEP] identifier[spaceId] , identifier[environmentId] , identifier[contentTypeId] , identifier[contentType] operator[SEP] operator[SEP] identifier[blockingFirst] operator[SEP] operator[SEP] operator[SEP] } } Keyword[finally] { identifier[contentType] operator[SEP] identifier[setSystem] operator[SEP] identifier[sys] operator[SEP] operator[SEP] } }
private void doCheckLocalParams(Formatter f, MCollection dcm, boolean useIndex) throws IOException { f.format("Check Grib-1 Parameter Tables for local entries%n"); int[] accum = new int[4]; for (MFile mfile : dcm.getFilesSorted()) { String path = mfile.getPath(); f.format("%n %s%n", path); try { doCheckLocalParams(mfile, f, accum); } catch (Throwable t) { System.out.printf("FAIL on %s%n", mfile.getPath()); t.printStackTrace(); } } f.format("%nGrand total=%d local = %d missing = %d%n", accum[0], accum[2], accum[3]); }
class class_name[name] begin[{] method[doCheckLocalParams, return_type[void], modifier[private], parameter[f, dcm, useIndex]] begin[{] call[f.format, parameter[literal["Check Grib-1 Parameter Tables for local entries%n"]]] local_variable[type[int], accum] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=mfile, selectors=[], type_arguments=None), name=path)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="%n %s%n"), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), label=None), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mfile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=accum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doCheckLocalParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="FAIL on %s%n"), MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=mfile, selectors=[], type_arguments=None)], member=printf, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getFilesSorted, postfix_operators=[], prefix_operators=[], qualifier=dcm, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=mfile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MFile, sub_type=None))), label=None) call[f.format, parameter[literal["%nGrand total=%d local = %d missing = %d%n"], member[.accum], member[.accum], member[.accum]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[doCheckLocalParams] operator[SEP] identifier[Formatter] identifier[f] , identifier[MCollection] identifier[dcm] , Keyword[boolean] identifier[useIndex] operator[SEP] Keyword[throws] identifier[IOException] { identifier[f] operator[SEP] identifier[format] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[accum] operator[=] Keyword[new] Keyword[int] operator[SEP] Other[4] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[MFile] identifier[mfile] operator[:] identifier[dcm] operator[SEP] identifier[getFilesSorted] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[path] operator[=] identifier[mfile] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[f] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[path] operator[SEP] operator[SEP] Keyword[try] { identifier[doCheckLocalParams] operator[SEP] identifier[mfile] , identifier[f] , identifier[accum] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[printf] operator[SEP] literal[String] , identifier[mfile] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[t] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } } identifier[f] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[accum] operator[SEP] Other[0] operator[SEP] , identifier[accum] operator[SEP] Other[2] operator[SEP] , identifier[accum] operator[SEP] Other[3] operator[SEP] operator[SEP] operator[SEP] }
public XAttributeContinuous createAttributeContinuous(String key, double value, XExtension extension) { return new XAttributeContinuousImpl(intern(key), value, extension); }
class class_name[name] begin[{] method[createAttributeContinuous, return_type[type[XAttributeContinuous]], modifier[public], parameter[key, value, extension]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=intern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=extension, 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=XAttributeContinuousImpl, sub_type=None))] end[}] END[}]
Keyword[public] identifier[XAttributeContinuous] identifier[createAttributeContinuous] operator[SEP] identifier[String] identifier[key] , Keyword[double] identifier[value] , identifier[XExtension] identifier[extension] operator[SEP] { Keyword[return] Keyword[new] identifier[XAttributeContinuousImpl] operator[SEP] identifier[intern] operator[SEP] identifier[key] operator[SEP] , identifier[value] , identifier[extension] operator[SEP] operator[SEP] }
public static long getBytesLongValue(byte[] bytes, int offset, int length) { assert length <= 8 && length > 0; assert bytes != null && bytes.length >= length + offset; byte[] value = Arrays.copyOfRange(bytes, offset, offset + length); return bytesToLong(value); }
class class_name[name] begin[{] method[getBytesLongValue, return_type[type[long]], modifier[public static], parameter[bytes, offset, length]] begin[{] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<=), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operator=&&), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=bytes, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operator=>=), operator=&&), label=None, value=None) local_variable[type[byte], value] return[call[.bytesToLong, parameter[member[.value]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[getBytesLongValue] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] { Keyword[assert] identifier[length] operator[<=] Other[8] operator[&&] identifier[length] operator[>] Other[0] operator[SEP] Keyword[assert] identifier[bytes] operator[!=] Other[null] operator[&&] identifier[bytes] operator[SEP] identifier[length] operator[>=] identifier[length] operator[+] identifier[offset] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[Arrays] operator[SEP] identifier[copyOfRange] operator[SEP] identifier[bytes] , identifier[offset] , identifier[offset] operator[+] identifier[length] operator[SEP] operator[SEP] Keyword[return] identifier[bytesToLong] operator[SEP] identifier[value] operator[SEP] operator[SEP] }
public <T> T read(Reader input, Class<T> rootType) { JodaBeanUtils.notNull(input, "input"); JodaBeanUtils.notNull(rootType, "rootType"); try { JsonInput jsonInput = new JsonInput(input); return parseRoot(jsonInput, rootType); } catch (RuntimeException ex) { throw ex; } catch (Exception ex) { throw new RuntimeException(ex); } }
class class_name[name] begin[{] method[read, return_type[type[T]], modifier[public], parameter[input, rootType]] begin[{] call[JodaBeanUtils.notNull, parameter[member[.input], literal["input"]]] call[JodaBeanUtils.notNull, parameter[member[.rootType], literal["rootType"]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=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=JsonInput, sub_type=None)), name=jsonInput)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonInput, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=jsonInput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rootType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseRoot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['RuntimeException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[read] operator[SEP] identifier[Reader] identifier[input] , identifier[Class] operator[<] identifier[T] operator[>] identifier[rootType] operator[SEP] { identifier[JodaBeanUtils] operator[SEP] identifier[notNull] operator[SEP] identifier[input] , literal[String] operator[SEP] operator[SEP] identifier[JodaBeanUtils] operator[SEP] identifier[notNull] operator[SEP] identifier[rootType] , literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[JsonInput] identifier[jsonInput] operator[=] Keyword[new] identifier[JsonInput] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[return] identifier[parseRoot] operator[SEP] identifier[jsonInput] , identifier[rootType] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[ex] operator[SEP] { Keyword[throw] identifier[ex] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } }
public TransformTask setNumWriters(int numWriters) { Preconditions.checkArgument(numWriters >= 0, "Invalid number of reducers: " + numWriters); if (numWriters == 0) { noCompaction(); } else { this.numWriters = numWriters; } return this; }
class class_name[name] begin[{] method[setNumWriters, return_type[type[TransformTask]], modifier[public], parameter[numWriters]] begin[{] call[Preconditions.checkArgument, parameter[binary_operation[member[.numWriters], >=, literal[0]], binary_operation[literal["Invalid number of reducers: "], +, member[.numWriters]]]] if[binary_operation[member[.numWriters], ==, literal[0]]] begin[{] call[.noCompaction, parameter[]] else begin[{] assign[THIS[member[None.numWriters]], member[.numWriters]] end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[TransformTask] identifier[setNumWriters] operator[SEP] Keyword[int] identifier[numWriters] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[numWriters] operator[>=] Other[0] , literal[String] operator[+] identifier[numWriters] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numWriters] operator[==] Other[0] operator[SEP] { identifier[noCompaction] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[numWriters] operator[=] identifier[numWriters] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static double gammaCdf(double x, double a, double b) { if(a<=0 || b<=0) { throw new IllegalArgumentException("All the parameters must be positive."); } double GammaCdf = ContinuousDistributions.gammaCdf(x/b, a); return GammaCdf; }
class class_name[name] begin[{] method[gammaCdf, return_type[type[double]], modifier[public static], parameter[x, a, b]] begin[{] if[binary_operation[binary_operation[member[.a], <=, literal[0]], ||, binary_operation[member[.b], <=, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="All the parameters must be positive.")], 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[double], GammaCdf] return[member[.GammaCdf]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[gammaCdf] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[a] , Keyword[double] identifier[b] operator[SEP] { Keyword[if] operator[SEP] identifier[a] operator[<=] Other[0] operator[||] identifier[b] operator[<=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[double] identifier[GammaCdf] operator[=] identifier[ContinuousDistributions] operator[SEP] identifier[gammaCdf] operator[SEP] identifier[x] operator[/] identifier[b] , identifier[a] operator[SEP] operator[SEP] Keyword[return] identifier[GammaCdf] operator[SEP] }
@Override protected Operand createOrExpression(final Operand leftExpression, final Operand rightExpression) { if (leftExpression == null || rightExpression == null) { return null; } final Set<Operand> operands = new HashSet<Operand>(); operands.add(leftExpression); operands.add(rightExpression); return new Operand(Operator.OR, operands); }
class class_name[name] begin[{] method[createOrExpression, return_type[type[Operand]], modifier[protected], parameter[leftExpression, rightExpression]] begin[{] if[binary_operation[binary_operation[member[.leftExpression], ==, literal[null]], ||, binary_operation[member[.rightExpression], ==, literal[null]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Set], operands] call[operands.add, parameter[member[.leftExpression]]] call[operands.add, parameter[member[.rightExpression]]] return[ClassCreator(arguments=[MemberReference(member=OR, postfix_operators=[], prefix_operators=[], qualifier=Operator, selectors=[]), MemberReference(member=operands, 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=Operand, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[Operand] identifier[createOrExpression] operator[SEP] Keyword[final] identifier[Operand] identifier[leftExpression] , Keyword[final] identifier[Operand] identifier[rightExpression] operator[SEP] { Keyword[if] operator[SEP] identifier[leftExpression] operator[==] Other[null] operator[||] identifier[rightExpression] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[final] identifier[Set] operator[<] identifier[Operand] operator[>] identifier[operands] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[Operand] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[operands] operator[SEP] identifier[add] operator[SEP] identifier[leftExpression] operator[SEP] operator[SEP] identifier[operands] operator[SEP] identifier[add] operator[SEP] identifier[rightExpression] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Operand] operator[SEP] identifier[Operator] operator[SEP] identifier[OR] , identifier[operands] operator[SEP] operator[SEP] }
public InputStream find(String id, String rev) { assertNotEmpty(id, "id"); assertNotEmpty(rev, "rev"); final URI uri = new DatabaseURIHelper(dbUri).documentUri(id, "rev", rev); return couchDbClient.get(uri); }
class class_name[name] begin[{] method[find, return_type[type[InputStream]], modifier[public], parameter[id, rev]] begin[{] call[.assertNotEmpty, parameter[member[.id], literal["id"]]] call[.assertNotEmpty, parameter[member[.rev], literal["rev"]]] local_variable[type[URI], uri] return[call[couchDbClient.get, parameter[member[.uri]]]] end[}] END[}]
Keyword[public] identifier[InputStream] identifier[find] operator[SEP] identifier[String] identifier[id] , identifier[String] identifier[rev] operator[SEP] { identifier[assertNotEmpty] operator[SEP] identifier[id] , literal[String] operator[SEP] operator[SEP] identifier[assertNotEmpty] operator[SEP] identifier[rev] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[URI] identifier[uri] operator[=] Keyword[new] identifier[DatabaseURIHelper] operator[SEP] identifier[dbUri] operator[SEP] operator[SEP] identifier[documentUri] operator[SEP] identifier[id] , literal[String] , identifier[rev] operator[SEP] operator[SEP] Keyword[return] identifier[couchDbClient] operator[SEP] identifier[get] operator[SEP] identifier[uri] operator[SEP] operator[SEP] }
public static Dcs cs_multiply(Dcs A, Dcs B) { int p, j, nz = 0, anz, Cp[], Ci[], Bp[], m, n, bnz, w[], Bi[]; double x[], Bx[], Cx[]; boolean values; Dcs C; if (!Dcs_util.CS_CSC(A) || !Dcs_util.CS_CSC(B)) return (null); /* check inputs */ if (A.n != B.m) return (null); m = A.m; anz = A.p[A.n]; n = B.n; Bp = B.p; Bi = B.i; Bx = B.x; bnz = Bp[n]; w = new int[m]; /* get workspace */ values = (A.x != null) && (Bx != null); x = values ? new double[m] : null; /* get workspace */ C = Dcs_util.cs_spalloc(m, n, anz + bnz, values, false); /* allocate result */ Cp = C.p; for (j = 0; j < n; j++) { if (nz + m > C.nzmax) { Dcs_util.cs_sprealloc(C, 2 * (C.nzmax) + m); } Ci = C.i; Cx = C.x; /* C.i and C.x may be reallocated */ Cp[j] = nz; /* column j of C starts here */ for (p = Bp[j]; p < Bp[j + 1]; p++) { nz = Dcs_scatter.cs_scatter(A, Bi[p], (Bx != null) ? Bx[p] : 1, w, x, j + 1, C, nz); } if (values) for (p = Cp[j]; p < nz; p++) Cx[p] = x[Ci[p]]; } Cp[n] = nz; /* finalize the last column of C */ Dcs_util.cs_sprealloc(C, 0); /* remove extra space from C */ return C; }
class class_name[name] begin[{] method[cs_multiply, return_type[type[Dcs]], modifier[public static], parameter[A, B]] begin[{] local_variable[type[int], p] local_variable[type[double], x] local_variable[type[boolean], values] local_variable[type[Dcs], C] if[binary_operation[call[Dcs_util.CS_CSC, parameter[member[.A]]], ||, call[Dcs_util.CS_CSC, parameter[member[.B]]]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[member[A.n], !=, member[B.m]]] begin[{] return[literal[null]] else begin[{] None end[}] assign[member[.m], member[A.m]] assign[member[.anz], member[A.p]] assign[member[.n], member[B.n]] assign[member[.Bp], member[B.p]] assign[member[.Bi], member[B.i]] assign[member[.Bx], member[B.x]] assign[member[.bnz], member[.Bp]] assign[member[.w], ArrayCreator(dimensions=[MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] assign[member[.values], binary_operation[binary_operation[member[A.x], !=, literal[null]], &&, binary_operation[member[.Bx], !=, literal[null]]]] assign[member[.x], TernaryExpression(condition=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=ArrayCreator(dimensions=[MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=double)))] assign[member[.C], call[Dcs_util.cs_spalloc, parameter[member[.m], member[.n], binary_operation[member[.anz], +, member[.bnz]], member[.values], literal[false]]]] assign[member[.Cp], member[C.p]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=nz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=nzmax, postfix_operators=[], prefix_operators=[], qualifier=C, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=C, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operandr=Cast(expression=MemberReference(member=m, postfix_operators=[], prefix_operators=['+'], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=C, sub_type=ReferenceType(arguments=None, dimensions=None, name=nzmax, sub_type=None))), operator=*)], member=cs_sprealloc, postfix_operators=[], prefix_operators=[], qualifier=Dcs_util, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=Ci, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=C, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=Cx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=C, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=Cp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=nz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=nz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=A, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=Bi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=Bx, 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=1), if_true=MemberReference(member=Bx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=C, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cs_scatter, postfix_operators=[], prefix_operators=[], qualifier=Dcs_scatter, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=Bp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operator=<), init=[Assignment(expressionl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=Bp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]))], update=[MemberReference(member=p, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=Cx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=Ci, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]))])), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=Cp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]))], update=[MemberReference(member=p, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.Cp], member[.nz]] call[Dcs_util.cs_sprealloc, parameter[member[.C], literal[0]]] return[member[.C]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Dcs] identifier[cs_multiply] operator[SEP] identifier[Dcs] identifier[A] , identifier[Dcs] identifier[B] operator[SEP] { Keyword[int] identifier[p] , identifier[j] , identifier[nz] operator[=] Other[0] , identifier[anz] , identifier[Cp] operator[SEP] operator[SEP] , identifier[Ci] operator[SEP] operator[SEP] , identifier[Bp] operator[SEP] operator[SEP] , identifier[m] , identifier[n] , identifier[bnz] , identifier[w] operator[SEP] operator[SEP] , identifier[Bi] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[x] operator[SEP] operator[SEP] , identifier[Bx] operator[SEP] operator[SEP] , identifier[Cx] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[values] operator[SEP] identifier[Dcs] identifier[C] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Dcs_util] operator[SEP] identifier[CS_CSC] operator[SEP] identifier[A] operator[SEP] operator[||] operator[!] identifier[Dcs_util] operator[SEP] identifier[CS_CSC] operator[SEP] identifier[B] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[A] operator[SEP] identifier[n] operator[!=] identifier[B] operator[SEP] identifier[m] operator[SEP] Keyword[return] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[m] operator[=] identifier[A] operator[SEP] identifier[m] operator[SEP] identifier[anz] operator[=] identifier[A] operator[SEP] identifier[p] operator[SEP] identifier[A] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[n] operator[=] identifier[B] operator[SEP] identifier[n] operator[SEP] identifier[Bp] operator[=] identifier[B] operator[SEP] identifier[p] operator[SEP] identifier[Bi] operator[=] identifier[B] operator[SEP] identifier[i] operator[SEP] identifier[Bx] operator[=] identifier[B] operator[SEP] identifier[x] operator[SEP] identifier[bnz] operator[=] identifier[Bp] operator[SEP] identifier[n] operator[SEP] operator[SEP] identifier[w] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[m] operator[SEP] operator[SEP] identifier[values] operator[=] operator[SEP] identifier[A] operator[SEP] identifier[x] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[Bx] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[x] operator[=] identifier[values] operator[?] Keyword[new] Keyword[double] operator[SEP] identifier[m] operator[SEP] operator[:] Other[null] operator[SEP] identifier[C] operator[=] identifier[Dcs_util] operator[SEP] identifier[cs_spalloc] operator[SEP] identifier[m] , identifier[n] , identifier[anz] operator[+] identifier[bnz] , identifier[values] , literal[boolean] operator[SEP] operator[SEP] identifier[Cp] operator[=] identifier[C] operator[SEP] identifier[p] operator[SEP] Keyword[for] operator[SEP] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[n] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[nz] operator[+] identifier[m] operator[>] identifier[C] operator[SEP] identifier[nzmax] operator[SEP] { identifier[Dcs_util] operator[SEP] identifier[cs_sprealloc] operator[SEP] identifier[C] , Other[2] operator[*] operator[SEP] identifier[C] operator[SEP] identifier[nzmax] operator[SEP] operator[+] identifier[m] operator[SEP] operator[SEP] } identifier[Ci] operator[=] identifier[C] operator[SEP] identifier[i] operator[SEP] identifier[Cx] operator[=] identifier[C] operator[SEP] identifier[x] operator[SEP] identifier[Cp] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[nz] operator[SEP] Keyword[for] operator[SEP] identifier[p] operator[=] identifier[Bp] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[p] operator[<] identifier[Bp] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[SEP] identifier[p] operator[++] operator[SEP] { identifier[nz] operator[=] identifier[Dcs_scatter] operator[SEP] identifier[cs_scatter] operator[SEP] identifier[A] , identifier[Bi] operator[SEP] identifier[p] operator[SEP] , operator[SEP] identifier[Bx] operator[!=] Other[null] operator[SEP] operator[?] identifier[Bx] operator[SEP] identifier[p] operator[SEP] operator[:] Other[1] , identifier[w] , identifier[x] , identifier[j] operator[+] Other[1] , identifier[C] , identifier[nz] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[values] operator[SEP] Keyword[for] operator[SEP] identifier[p] operator[=] identifier[Cp] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[p] operator[<] identifier[nz] operator[SEP] identifier[p] operator[++] operator[SEP] identifier[Cx] operator[SEP] identifier[p] operator[SEP] operator[=] identifier[x] operator[SEP] identifier[Ci] operator[SEP] identifier[p] operator[SEP] operator[SEP] operator[SEP] } identifier[Cp] operator[SEP] identifier[n] operator[SEP] operator[=] identifier[nz] operator[SEP] identifier[Dcs_util] operator[SEP] identifier[cs_sprealloc] operator[SEP] identifier[C] , Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[C] operator[SEP] }
public static void main(String[] args) throws IOException { if (args.length == 0) { System.out.println("need to supply a GEMPAK surface file name"); System.exit(1); } try { GempakParameters.addParameters( "resources/nj22/tables/gempak/params.tbl"); } catch (Exception e) { System.out.println("unable to init param tables"); } GempakSurfaceFileReader gsfr = getInstance(getFile(args[0]), true); System.out.println("Type = " + gsfr.getSurfaceFileType()); gsfr.printFileLabel(); gsfr.printKeys(); gsfr.printHeaders(); gsfr.printParts(); //gsfr.printDates(); //gsfr.printStations(false); int row = 1; int col = 1; if (args.length > 1) { row = Integer.parseInt(args[1]); } if (args.length > 2) { col = Integer.parseInt(args[2]); } gsfr.printOb(row, col); }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] if[binary_operation[member[args.length], ==, literal[0]]] begin[{] call[System.out.println, parameter[literal["need to supply a GEMPAK surface file name"]]] call[System.exit, parameter[literal[1]]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="resources/nj22/tables/gempak/params.tbl")], member=addParameters, postfix_operators=[], prefix_operators=[], qualifier=GempakParameters, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unable to init param tables")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) local_variable[type[GempakSurfaceFileReader], gsfr] call[System.out.println, parameter[binary_operation[literal["Type = "], +, call[gsfr.getSurfaceFileType, parameter[]]]]] call[gsfr.printFileLabel, parameter[]] call[gsfr.printKeys, parameter[]] call[gsfr.printHeaders, parameter[]] call[gsfr.printParts, parameter[]] local_variable[type[int], row] local_variable[type[int], col] if[binary_operation[member[args.length], >, literal[1]]] begin[{] assign[member[.row], call[Integer.parseInt, parameter[member[.args]]]] else begin[{] None end[}] if[binary_operation[member[args.length], >, literal[2]]] begin[{] assign[member[.col], call[Integer.parseInt, parameter[member[.args]]]] else begin[{] None end[}] call[gsfr.printOb, parameter[member[.row], member[.col]]] 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[IOException] { Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[exit] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[try] { identifier[GempakParameters] operator[SEP] identifier[addParameters] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[GempakSurfaceFileReader] identifier[gsfr] operator[=] identifier[getInstance] operator[SEP] identifier[getFile] operator[SEP] identifier[args] operator[SEP] Other[0] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[gsfr] operator[SEP] identifier[getSurfaceFileType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[gsfr] operator[SEP] identifier[printFileLabel] operator[SEP] operator[SEP] operator[SEP] identifier[gsfr] operator[SEP] identifier[printKeys] operator[SEP] operator[SEP] operator[SEP] identifier[gsfr] operator[SEP] identifier[printHeaders] operator[SEP] operator[SEP] operator[SEP] identifier[gsfr] operator[SEP] identifier[printParts] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[row] operator[=] Other[1] operator[SEP] Keyword[int] identifier[col] operator[=] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] { identifier[row] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[args] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[>] Other[2] operator[SEP] { identifier[col] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[args] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] } identifier[gsfr] operator[SEP] identifier[printOb] operator[SEP] identifier[row] , identifier[col] operator[SEP] operator[SEP] }
public static boolean process(final URI uri, final String path, final SpanFilterType type) { final String methodName = "process"; String newExcludeFilterString = OpentracingConfiguration.getServerSkipPattern(); if (!compare(excludeFilterString, newExcludeFilterString)) { updateFilters(newExcludeFilterString); } boolean result = true; // Copy the static reference locally so that it doesn't matter if the static list // is updated while we're processing since that will just overwrite the reference final SpanFilter[] filters = allFilters; for (int i = 0; i < filters.length; i++) { result = filters[i].process(result, uri, path, type); if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, methodName, "filter " + filters[i] + " set result to " + result); } } if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, methodName, "Checking to see if this request should be excluded. request uri=" + uri + ", path=" + path + " result=" + (result ? "INCLUDE" : "EXCLUDE")); } return result; }
class class_name[name] begin[{] method[process, return_type[type[boolean]], modifier[public static], parameter[uri, path, type]] begin[{] local_variable[type[String], methodName] local_variable[type[String], newExcludeFilterString] if[call[.compare, parameter[member[.excludeFilterString], member[.newExcludeFilterString]]]] begin[{] call[.updateFilters, parameter[member[.newExcludeFilterString]]] else begin[{] None end[}] local_variable[type[boolean], result] local_variable[type[SpanFilter], filters] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=filters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=uri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=process, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="filter "), operandr=MemberReference(member=filters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" set result to "), operator=+), operandr=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=filters, 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[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], member[.methodName], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["Checking to see if this request should be excluded. request uri="], +, member[.uri]], +, literal[", path="]], +, member[.path]], +, literal[" result="]], +, TernaryExpression(condition=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="EXCLUDE"), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INCLUDE"))]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[process] operator[SEP] Keyword[final] identifier[URI] identifier[uri] , Keyword[final] identifier[String] identifier[path] , Keyword[final] identifier[SpanFilterType] identifier[type] operator[SEP] { Keyword[final] identifier[String] identifier[methodName] operator[=] literal[String] operator[SEP] identifier[String] identifier[newExcludeFilterString] operator[=] identifier[OpentracingConfiguration] operator[SEP] identifier[getServerSkipPattern] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[compare] operator[SEP] identifier[excludeFilterString] , identifier[newExcludeFilterString] operator[SEP] operator[SEP] { identifier[updateFilters] operator[SEP] identifier[newExcludeFilterString] operator[SEP] operator[SEP] } Keyword[boolean] identifier[result] operator[=] literal[boolean] operator[SEP] Keyword[final] identifier[SpanFilter] operator[SEP] operator[SEP] identifier[filters] operator[=] identifier[allFilters] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[filters] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[result] operator[=] identifier[filters] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[process] operator[SEP] identifier[result] , identifier[uri] , identifier[path] , identifier[type] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[methodName] , literal[String] operator[+] identifier[filters] operator[SEP] identifier[i] operator[SEP] operator[+] literal[String] operator[+] identifier[result] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[methodName] , literal[String] operator[+] identifier[uri] operator[+] literal[String] operator[+] identifier[path] operator[+] literal[String] operator[+] operator[SEP] identifier[result] operator[?] literal[String] operator[:] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
private void initializeShowListDialogPreference() { Preference preference = findPreference(getString(R.string.show_list_dialog_preference_key)); preference.setOnPreferenceClickListener(new OnPreferenceClickListener() { @Override public boolean onPreferenceClick(final Preference preference) { initializeListDialog(); listDialog.setShowAnimation(createRectangularRevealAnimation(preference)); listDialog.setDismissAnimation(createRectangularRevealAnimation(preference)); listDialog.setCancelAnimation(createRectangularRevealAnimation(preference)); listDialog.show(); return true; } }); }
class class_name[name] begin[{] method[initializeShowListDialogPreference, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[Preference], preference] call[preference.setOnPreferenceClickListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[], member=initializeListDialog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=preference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createRectangularRevealAnimation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setShowAnimation, postfix_operators=[], prefix_operators=[], qualifier=listDialog, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=preference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createRectangularRevealAnimation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setDismissAnimation, postfix_operators=[], prefix_operators=[], qualifier=listDialog, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=preference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createRectangularRevealAnimation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setCancelAnimation, postfix_operators=[], prefix_operators=[], qualifier=listDialog, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=show, postfix_operators=[], prefix_operators=[], qualifier=listDialog, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], documentation=None, modifiers={'public'}, name=onPreferenceClick, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=preference, type=ReferenceType(arguments=None, dimensions=[], name=Preference, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OnPreferenceClickListener, sub_type=None))]] end[}] END[}]
Keyword[private] Keyword[void] identifier[initializeShowListDialogPreference] operator[SEP] operator[SEP] { identifier[Preference] identifier[preference] operator[=] identifier[findPreference] operator[SEP] identifier[getString] operator[SEP] identifier[R] operator[SEP] identifier[string] operator[SEP] identifier[show_list_dialog_preference_key] operator[SEP] operator[SEP] operator[SEP] identifier[preference] operator[SEP] identifier[setOnPreferenceClickListener] operator[SEP] Keyword[new] identifier[OnPreferenceClickListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[onPreferenceClick] operator[SEP] Keyword[final] identifier[Preference] identifier[preference] operator[SEP] { identifier[initializeListDialog] operator[SEP] operator[SEP] operator[SEP] identifier[listDialog] operator[SEP] identifier[setShowAnimation] operator[SEP] identifier[createRectangularRevealAnimation] operator[SEP] identifier[preference] operator[SEP] operator[SEP] operator[SEP] identifier[listDialog] operator[SEP] identifier[setDismissAnimation] operator[SEP] identifier[createRectangularRevealAnimation] operator[SEP] identifier[preference] operator[SEP] operator[SEP] operator[SEP] identifier[listDialog] operator[SEP] identifier[setCancelAnimation] operator[SEP] identifier[createRectangularRevealAnimation] operator[SEP] identifier[preference] operator[SEP] operator[SEP] operator[SEP] identifier[listDialog] operator[SEP] identifier[show] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } operator[SEP] operator[SEP] }
public boolean hasTriggerWindow() { skipEmptyWindow(); Preconditions.checkState(watermark == Long.MIN_VALUE || nextWindow != null, "next trigger window cannot be null."); return nextWindow != null && nextWindow.getEnd() <= watermark; }
class class_name[name] begin[{] method[hasTriggerWindow, return_type[type[boolean]], modifier[public], parameter[]] begin[{] call[.skipEmptyWindow, parameter[]] call[Preconditions.checkState, parameter[binary_operation[binary_operation[member[.watermark], ==, member[Long.MIN_VALUE]], ||, binary_operation[member[.nextWindow], !=, literal[null]]], literal["next trigger window cannot be null."]]] return[binary_operation[binary_operation[member[.nextWindow], !=, literal[null]], &&, binary_operation[call[nextWindow.getEnd, parameter[]], <=, member[.watermark]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[hasTriggerWindow] operator[SEP] operator[SEP] { identifier[skipEmptyWindow] operator[SEP] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] identifier[watermark] operator[==] identifier[Long] operator[SEP] identifier[MIN_VALUE] operator[||] identifier[nextWindow] operator[!=] Other[null] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[nextWindow] operator[!=] Other[null] operator[&&] identifier[nextWindow] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[<=] identifier[watermark] operator[SEP] }
public boolean restart(final Password password) throws IOException, ServletException { if (!singelton.can(CFMLEngine.CAN_RESTART_ALL, password)) throw new IOException("access denied to restart CFMLEngine"); return _restart(); }
class class_name[name] begin[{] method[restart, return_type[type[boolean]], modifier[public], parameter[password]] begin[{] if[call[singelton.can, parameter[member[CFMLEngine.CAN_RESTART_ALL], member[.password]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="access denied to restart CFMLEngine")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] return[call[._restart, parameter[]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[restart] operator[SEP] Keyword[final] identifier[Password] identifier[password] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] { Keyword[if] operator[SEP] operator[!] identifier[singelton] operator[SEP] identifier[can] operator[SEP] identifier[CFMLEngine] operator[SEP] identifier[CAN_RESTART_ALL] , identifier[password] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[_restart] operator[SEP] operator[SEP] operator[SEP] }
public static boolean isErrorAndSendException(ResultSender<Object> resultSender, Object data) { if(data instanceof Throwable) { Throwable e = (Throwable)data; resultSender.sendException(e); return true; } return false; }
class class_name[name] begin[{] method[isErrorAndSendException, return_type[type[boolean]], modifier[public static], parameter[resultSender, data]] begin[{] if[binary_operation[member[.data], instanceof, type[Throwable]]] begin[{] local_variable[type[Throwable], e] call[resultSender.sendException, parameter[member[.e]]] return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isErrorAndSendException] operator[SEP] identifier[ResultSender] operator[<] identifier[Object] operator[>] identifier[resultSender] , identifier[Object] identifier[data] operator[SEP] { Keyword[if] operator[SEP] identifier[data] Keyword[instanceof] identifier[Throwable] operator[SEP] { identifier[Throwable] identifier[e] operator[=] operator[SEP] identifier[Throwable] operator[SEP] identifier[data] operator[SEP] identifier[resultSender] operator[SEP] identifier[sendException] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static Class commonClass(Class c1, Class c2) { if (c1 == c2) { return c1; } if ((c1 == Object.class) || c1.isAssignableFrom(c2)) { return c1; } if (c2.isAssignableFrom(c1)) { return c2; } if (c1.isPrimitive() || c2.isPrimitive()) { // REVISIT: we could try to autoconvert to Object or something appropriate throw new IllegalArgumentException("incompatible types " + c1 + " and " + c2); } // REVISIT: we could try to find a common supper class or interface return Object.class; }
class class_name[name] begin[{] method[commonClass, return_type[type[Class]], modifier[public static], parameter[c1, c2]] begin[{] if[binary_operation[member[.c1], ==, member[.c2]]] begin[{] return[member[.c1]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.c1], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], ||, call[c1.isAssignableFrom, parameter[member[.c2]]]]] begin[{] return[member[.c1]] else begin[{] None end[}] if[call[c2.isAssignableFrom, parameter[member[.c1]]]] begin[{] return[member[.c2]] else begin[{] None end[}] if[binary_operation[call[c1.isPrimitive, parameter[]], ||, call[c2.isPrimitive, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="incompatible types "), operandr=MemberReference(member=c1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" and "), operator=+), operandr=MemberReference(member=c2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Class] identifier[commonClass] operator[SEP] identifier[Class] identifier[c1] , identifier[Class] identifier[c2] operator[SEP] { Keyword[if] operator[SEP] identifier[c1] operator[==] identifier[c2] operator[SEP] { Keyword[return] identifier[c1] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[c1] operator[==] identifier[Object] operator[SEP] Keyword[class] operator[SEP] operator[||] identifier[c1] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[c2] operator[SEP] operator[SEP] { Keyword[return] identifier[c1] operator[SEP] } Keyword[if] operator[SEP] identifier[c2] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[c1] operator[SEP] operator[SEP] { Keyword[return] identifier[c2] operator[SEP] } Keyword[if] operator[SEP] identifier[c1] operator[SEP] identifier[isPrimitive] operator[SEP] operator[SEP] operator[||] identifier[c2] operator[SEP] identifier[isPrimitive] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[c1] operator[+] literal[String] operator[+] identifier[c2] operator[SEP] operator[SEP] } Keyword[return] identifier[Object] operator[SEP] Keyword[class] operator[SEP] }
public Object runFunctionMethod(int functionIndex, Object[] args, ExecutionContext ctx) throws SecurityException, NoSuchMethodException, IllegalArgumentException, ServiceException, IllegalAccessException, InvocationTargetException { Method method = functionMethods[functionIndex]; Object params[] = getInjectedValueArray(method, args, ctx); Object result; try { result = method.invoke(m_class.newInstance(), params); } catch (InstantiationException e) { // TODO catch and re-throw ewwwww throw new ServiceException("Cannot delegate instantiate script context: " + e.getMessage()); } if (result == null) { return result; } return convertReturnValue(result); }
class class_name[name] begin[{] method[runFunctionMethod, return_type[type[Object]], modifier[public], parameter[functionIndex, args, ctx]] begin[{] local_variable[type[Method], method] local_variable[type[Object], params] local_variable[type[Object], result] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=m_class, selectors=[], type_arguments=None), MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot delegate instantiate script context: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServiceException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstantiationException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.result], ==, literal[null]]] begin[{] return[member[.result]] else begin[{] None end[}] return[call[.convertReturnValue, parameter[member[.result]]]] end[}] END[}]
Keyword[public] identifier[Object] identifier[runFunctionMethod] operator[SEP] Keyword[int] identifier[functionIndex] , identifier[Object] operator[SEP] operator[SEP] identifier[args] , identifier[ExecutionContext] identifier[ctx] operator[SEP] Keyword[throws] identifier[SecurityException] , identifier[NoSuchMethodException] , identifier[IllegalArgumentException] , identifier[ServiceException] , identifier[IllegalAccessException] , identifier[InvocationTargetException] { identifier[Method] identifier[method] operator[=] identifier[functionMethods] operator[SEP] identifier[functionIndex] operator[SEP] operator[SEP] identifier[Object] identifier[params] operator[SEP] operator[SEP] operator[=] identifier[getInjectedValueArray] operator[SEP] identifier[method] , identifier[args] , identifier[ctx] operator[SEP] operator[SEP] identifier[Object] identifier[result] operator[SEP] Keyword[try] { identifier[result] operator[=] identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[m_class] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] , identifier[params] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InstantiationException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServiceException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[result] operator[SEP] } Keyword[return] identifier[convertReturnValue] operator[SEP] identifier[result] operator[SEP] operator[SEP] }
public void setOcspExtensions(List<Extension> extensions) { this.ocspExtensions = (extensions == null) ? Collections.<Extension>emptyList() : new ArrayList<Extension>(extensions); }
class class_name[name] begin[{] method[setOcspExtensions, return_type[void], modifier[public], parameter[extensions]] begin[{] assign[THIS[member[None.ocspExtensions]], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=extensions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=ClassCreator(arguments=[MemberReference(member=extensions, 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=Extension, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None)), if_true=MethodInvocation(arguments=[], member=Collections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Extension, sub_type=None))]))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOcspExtensions] operator[SEP] identifier[List] operator[<] identifier[Extension] operator[>] identifier[extensions] operator[SEP] { Keyword[this] operator[SEP] identifier[ocspExtensions] operator[=] operator[SEP] identifier[extensions] operator[==] Other[null] operator[SEP] operator[?] identifier[Collections] operator[SEP] operator[<] identifier[Extension] operator[>] identifier[emptyList] operator[SEP] operator[SEP] operator[:] Keyword[new] identifier[ArrayList] operator[<] identifier[Extension] operator[>] operator[SEP] identifier[extensions] operator[SEP] operator[SEP] }
public static boolean addPathToPath(RoadPath inside, RoadPath elements) { RoadConnection first = elements.getFirstPoint(); RoadConnection last = elements.getLastPoint(); assert first != null; assert last != null; first = first.getWrappedRoadConnection(); last = last.getWrappedRoadConnection(); assert first != null; assert last != null; if (last.equals(inside.getLastPoint()) || last.equals(inside.getFirstPoint())) { for (int i = elements.size() - 1; i >= 0; --i) { if (!inside.add(elements.get(i))) { return false; } } } else { for (final RoadSegment segment : elements) { if (!inside.add(segment)) { return false; } } } return true; }
class class_name[name] begin[{] method[addPathToPath, return_type[type[boolean]], modifier[public static], parameter[inside, elements]] begin[{] local_variable[type[RoadConnection], first] local_variable[type[RoadConnection], last] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) assign[member[.first], call[first.getWrappedRoadConnection, parameter[]]] assign[member[.last], call[last.getWrappedRoadConnection, parameter[]]] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) if[binary_operation[call[last.equals, parameter[call[inside.getLastPoint, parameter[]]]], ||, call[last.equals, parameter[call[inside.getFirstPoint, parameter[]]]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=elements, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=['!'], qualifier=inside, 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=false), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=elements, selectors=[], type_arguments=None), 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) else begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=segment, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=['!'], qualifier=inside, 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=false), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=elements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=segment)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=RoadSegment, sub_type=None))), label=None) end[}] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[addPathToPath] operator[SEP] identifier[RoadPath] identifier[inside] , identifier[RoadPath] identifier[elements] operator[SEP] { identifier[RoadConnection] identifier[first] operator[=] identifier[elements] operator[SEP] identifier[getFirstPoint] operator[SEP] operator[SEP] operator[SEP] identifier[RoadConnection] identifier[last] operator[=] identifier[elements] operator[SEP] identifier[getLastPoint] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[first] operator[!=] Other[null] operator[SEP] Keyword[assert] identifier[last] operator[!=] Other[null] operator[SEP] identifier[first] operator[=] identifier[first] operator[SEP] identifier[getWrappedRoadConnection] operator[SEP] operator[SEP] operator[SEP] identifier[last] operator[=] identifier[last] operator[SEP] identifier[getWrappedRoadConnection] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[first] operator[!=] Other[null] operator[SEP] Keyword[assert] identifier[last] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[last] operator[SEP] identifier[equals] operator[SEP] identifier[inside] operator[SEP] identifier[getLastPoint] operator[SEP] operator[SEP] operator[SEP] operator[||] identifier[last] operator[SEP] identifier[equals] operator[SEP] identifier[inside] operator[SEP] identifier[getFirstPoint] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[elements] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] operator[--] identifier[i] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[inside] operator[SEP] identifier[add] operator[SEP] identifier[elements] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } } Keyword[else] { Keyword[for] operator[SEP] Keyword[final] identifier[RoadSegment] identifier[segment] operator[:] identifier[elements] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[inside] operator[SEP] identifier[add] operator[SEP] identifier[segment] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } } Keyword[return] literal[boolean] operator[SEP] }
protected HttpURLConnection createConnection(URL url) throws IOException { HttpURLConnection connection = (HttpURLConnection) url.openConnection(); // Workaround for HttpURLConnection not observing the // HttpURLConnection.setFollowRedirects() property. // Happening in Android M release // https://code.google.com/p/android/issues/detail?id=194495 connection.setInstanceFollowRedirects(HttpURLConnection.getFollowRedirects()); return connection; }
class class_name[name] begin[{] method[createConnection, return_type[type[HttpURLConnection]], modifier[protected], parameter[url]] begin[{] local_variable[type[HttpURLConnection], connection] call[connection.setInstanceFollowRedirects, parameter[call[HttpURLConnection.getFollowRedirects, parameter[]]]] return[member[.connection]] end[}] END[}]
Keyword[protected] identifier[HttpURLConnection] identifier[createConnection] operator[SEP] identifier[URL] identifier[url] operator[SEP] Keyword[throws] identifier[IOException] { identifier[HttpURLConnection] identifier[connection] operator[=] operator[SEP] identifier[HttpURLConnection] operator[SEP] identifier[url] operator[SEP] identifier[openConnection] operator[SEP] operator[SEP] operator[SEP] identifier[connection] operator[SEP] identifier[setInstanceFollowRedirects] operator[SEP] identifier[HttpURLConnection] operator[SEP] identifier[getFollowRedirects] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[connection] operator[SEP] }
private IoBuffer encodeInitialGreetingPacket(final SocksProxyRequest request) { byte nbMethods = (byte) SocksProxyConstants.SUPPORTED_AUTH_METHODS.length; IoBuffer buf = IoBuffer.allocate(2 + nbMethods); buf.put(request.getProtocolVersion()); buf.put(nbMethods); buf.put(SocksProxyConstants.SUPPORTED_AUTH_METHODS); return buf; }
class class_name[name] begin[{] method[encodeInitialGreetingPacket, return_type[type[IoBuffer]], modifier[private], parameter[request]] begin[{] local_variable[type[byte], nbMethods] local_variable[type[IoBuffer], buf] call[buf.put, parameter[call[request.getProtocolVersion, parameter[]]]] call[buf.put, parameter[member[.nbMethods]]] call[buf.put, parameter[member[SocksProxyConstants.SUPPORTED_AUTH_METHODS]]] return[member[.buf]] end[}] END[}]
Keyword[private] identifier[IoBuffer] identifier[encodeInitialGreetingPacket] operator[SEP] Keyword[final] identifier[SocksProxyRequest] identifier[request] operator[SEP] { Keyword[byte] identifier[nbMethods] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[SocksProxyConstants] operator[SEP] identifier[SUPPORTED_AUTH_METHODS] operator[SEP] identifier[length] operator[SEP] identifier[IoBuffer] identifier[buf] operator[=] identifier[IoBuffer] operator[SEP] identifier[allocate] operator[SEP] Other[2] operator[+] identifier[nbMethods] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[put] operator[SEP] identifier[request] operator[SEP] identifier[getProtocolVersion] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[put] operator[SEP] identifier[nbMethods] operator[SEP] operator[SEP] identifier[buf] operator[SEP] identifier[put] operator[SEP] identifier[SocksProxyConstants] operator[SEP] identifier[SUPPORTED_AUTH_METHODS] operator[SEP] operator[SEP] Keyword[return] identifier[buf] operator[SEP] }
public EKBCommit addUpdates(Collection<?> updates) { if (updates != null) { for (Object update : updates) { checkIfModel(update); this.updates.add((OpenEngSBModel) update); } } return this; }
class class_name[name] begin[{] method[addUpdates, return_type[type[EKBCommit]], modifier[public], parameter[updates]] begin[{] if[binary_operation[member[.updates], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=update, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkIfModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=updates, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Cast(expression=MemberReference(member=update, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=OpenEngSBModel, sub_type=None))], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=updates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=update)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[EKBCommit] identifier[addUpdates] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] identifier[updates] operator[SEP] { Keyword[if] operator[SEP] identifier[updates] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[Object] identifier[update] operator[:] identifier[updates] operator[SEP] { identifier[checkIfModel] operator[SEP] identifier[update] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[updates] operator[SEP] identifier[add] operator[SEP] operator[SEP] identifier[OpenEngSBModel] operator[SEP] identifier[update] operator[SEP] operator[SEP] } } Keyword[return] Keyword[this] operator[SEP] }
public long[] get(long index, final long dest[], final int offset, final int length) { selectUpper.select(index, dest, offset, length); if (l == 0) for(int i = 0; i < length; i++) dest[offset + i] -= index++; else { long position = index * l; for(int i = 0; i < length; i++) { final int startWord = (int)(position / Long.SIZE); final int startBit = (int)(position % Long.SIZE); final int totalOffset = startBit + l; final long result = lowerBits[startWord] >>> startBit; dest[offset + i] = dest[offset + i] - index++ << l | (totalOffset <= Long.SIZE ? result : result | lowerBits[startWord + 1] << -startBit) & lowerBitsMask; position += l; } } return dest; }
class class_name[name] begin[{] method[get, return_type[type[long]], modifier[public], parameter[index, dest, offset, length]] begin[{] call[selectUpper.select, parameter[member[.index], member[.dest], member[.offset], member[.length]]] if[binary_operation[member[.l], ==, literal[0]]] begin[{] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=dest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), type=-=, value=MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])), label=None), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, 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) else begin[{] local_variable[type[long], position] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SIZE, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[]), operator=/), type=BasicType(dimensions=[], name=int)), name=startWord)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=BinaryOperation(operandl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SIZE, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[]), operator=%), type=BasicType(dimensions=[], name=int)), name=startBit)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=startBit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=totalOffset)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=lowerBits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=startWord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=startBit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>>>), name=result)], modifiers={'final'}, type=BasicType(dimensions=[], name=long)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=dest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=dest, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), operandr=MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<<), operandr=BinaryOperation(operandl=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=totalOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=SIZE, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[]), operator=<=), if_false=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=lowerBits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=startWord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), operandr=MemberReference(member=startBit, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[]), operator=<<), operator=|), if_true=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), operandr=MemberReference(member=lowerBitsMask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&), operator=|)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, 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[}] return[member[.dest]] end[}] END[}]
Keyword[public] Keyword[long] operator[SEP] operator[SEP] identifier[get] operator[SEP] Keyword[long] identifier[index] , Keyword[final] Keyword[long] identifier[dest] operator[SEP] operator[SEP] , Keyword[final] Keyword[int] identifier[offset] , Keyword[final] Keyword[int] identifier[length] operator[SEP] { identifier[selectUpper] operator[SEP] identifier[select] operator[SEP] identifier[index] , identifier[dest] , identifier[offset] , identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[l] operator[==] Other[0] 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] identifier[dest] operator[SEP] identifier[offset] operator[+] identifier[i] operator[SEP] operator[-=] identifier[index] operator[++] operator[SEP] Keyword[else] { Keyword[long] identifier[position] operator[=] identifier[index] operator[*] identifier[l] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[int] identifier[startWord] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[position] operator[/] identifier[Long] operator[SEP] identifier[SIZE] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[startBit] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[position] operator[%] identifier[Long] operator[SEP] identifier[SIZE] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[totalOffset] operator[=] identifier[startBit] operator[+] identifier[l] operator[SEP] Keyword[final] Keyword[long] identifier[result] operator[=] identifier[lowerBits] operator[SEP] identifier[startWord] operator[SEP] operator[>] operator[>] operator[>] identifier[startBit] operator[SEP] identifier[dest] operator[SEP] identifier[offset] operator[+] identifier[i] operator[SEP] operator[=] identifier[dest] operator[SEP] identifier[offset] operator[+] identifier[i] operator[SEP] operator[-] identifier[index] operator[++] operator[<<] identifier[l] operator[|] operator[SEP] identifier[totalOffset] operator[<=] identifier[Long] operator[SEP] identifier[SIZE] operator[?] identifier[result] operator[:] identifier[result] operator[|] identifier[lowerBits] operator[SEP] identifier[startWord] operator[+] Other[1] operator[SEP] operator[<<] operator[-] identifier[startBit] operator[SEP] operator[&] identifier[lowerBitsMask] operator[SEP] identifier[position] operator[+=] identifier[l] operator[SEP] } } Keyword[return] identifier[dest] operator[SEP] }
@Override public CPDefinitionOptionRel create(long CPDefinitionOptionRelId) { CPDefinitionOptionRel cpDefinitionOptionRel = new CPDefinitionOptionRelImpl(); cpDefinitionOptionRel.setNew(true); cpDefinitionOptionRel.setPrimaryKey(CPDefinitionOptionRelId); String uuid = PortalUUIDUtil.generate(); cpDefinitionOptionRel.setUuid(uuid); cpDefinitionOptionRel.setCompanyId(companyProvider.getCompanyId()); return cpDefinitionOptionRel; }
class class_name[name] begin[{] method[create, return_type[type[CPDefinitionOptionRel]], modifier[public], parameter[CPDefinitionOptionRelId]] begin[{] local_variable[type[CPDefinitionOptionRel], cpDefinitionOptionRel] call[cpDefinitionOptionRel.setNew, parameter[literal[true]]] call[cpDefinitionOptionRel.setPrimaryKey, parameter[member[.CPDefinitionOptionRelId]]] local_variable[type[String], uuid] call[cpDefinitionOptionRel.setUuid, parameter[member[.uuid]]] call[cpDefinitionOptionRel.setCompanyId, parameter[call[companyProvider.getCompanyId, parameter[]]]] return[member[.cpDefinitionOptionRel]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionOptionRel] identifier[create] operator[SEP] Keyword[long] identifier[CPDefinitionOptionRelId] operator[SEP] { identifier[CPDefinitionOptionRel] identifier[cpDefinitionOptionRel] operator[=] Keyword[new] identifier[CPDefinitionOptionRelImpl] operator[SEP] operator[SEP] operator[SEP] identifier[cpDefinitionOptionRel] operator[SEP] identifier[setNew] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[cpDefinitionOptionRel] operator[SEP] identifier[setPrimaryKey] operator[SEP] identifier[CPDefinitionOptionRelId] operator[SEP] operator[SEP] identifier[String] identifier[uuid] operator[=] identifier[PortalUUIDUtil] operator[SEP] identifier[generate] operator[SEP] operator[SEP] operator[SEP] identifier[cpDefinitionOptionRel] operator[SEP] identifier[setUuid] operator[SEP] identifier[uuid] operator[SEP] operator[SEP] identifier[cpDefinitionOptionRel] operator[SEP] identifier[setCompanyId] operator[SEP] identifier[companyProvider] operator[SEP] identifier[getCompanyId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[cpDefinitionOptionRel] operator[SEP] }
@Override public java.util.concurrent.Future<SendMessageResult> sendMessageAsync(String queueUrl, String messageBody) { return sendMessageAsync(new SendMessageRequest().withQueueUrl(queueUrl).withMessageBody(messageBody)); }
class class_name[name] begin[{] method[sendMessageAsync, return_type[type[java]], modifier[public], parameter[queueUrl, messageBody]] begin[{] return[call[.sendMessageAsync, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=queueUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withQueueUrl, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=messageBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withMessageBody, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=SendMessageRequest, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[concurrent] operator[SEP] identifier[Future] operator[<] identifier[SendMessageResult] operator[>] identifier[sendMessageAsync] operator[SEP] identifier[String] identifier[queueUrl] , identifier[String] identifier[messageBody] operator[SEP] { Keyword[return] identifier[sendMessageAsync] operator[SEP] Keyword[new] identifier[SendMessageRequest] operator[SEP] operator[SEP] operator[SEP] identifier[withQueueUrl] operator[SEP] identifier[queueUrl] operator[SEP] operator[SEP] identifier[withMessageBody] operator[SEP] identifier[messageBody] operator[SEP] operator[SEP] operator[SEP] }
public static String normalise(String s) { if (sDiacritics == null) { sDiacritics = Pattern.compile("\\p{InCombiningDiacriticalMarks}+"); } return sDiacritics.matcher(Normalizer.normalize(s, NFD)).replaceAll("").toUpperCase(US); }
class class_name[name] begin[{] method[normalise, return_type[type[String]], modifier[public static], parameter[s]] begin[{] if[binary_operation[member[.sDiacritics], ==, literal[null]]] begin[{] assign[member[.sDiacritics], call[Pattern.compile, parameter[literal["\\p{InCombiningDiacriticalMarks}+"]]]] else begin[{] None end[}] return[call[sDiacritics.matcher, parameter[call[Normalizer.normalize, parameter[member[.s], member[.NFD]]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[normalise] operator[SEP] identifier[String] identifier[s] operator[SEP] { Keyword[if] operator[SEP] identifier[sDiacritics] operator[==] Other[null] operator[SEP] { identifier[sDiacritics] operator[=] identifier[Pattern] operator[SEP] identifier[compile] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[sDiacritics] operator[SEP] identifier[matcher] operator[SEP] identifier[Normalizer] operator[SEP] identifier[normalize] operator[SEP] identifier[s] , identifier[NFD] operator[SEP] operator[SEP] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toUpperCase] operator[SEP] identifier[US] operator[SEP] operator[SEP] }
public void print(String s) throws IOException { if (_startLine) printIndent(); if (s == null) { _lastCr = false; _os.print("null"); return; } int len = s.length(); for (int i = 0; i < len; i++) { int ch = s.charAt(i); if (ch == '\n' && !_lastCr) _destLine++; else if (ch == '\r') _destLine++; _lastCr = ch == '\r'; _os.print((char) ch); } }
class class_name[name] begin[{] method[print, return_type[void], modifier[public], parameter[s]] begin[{] if[member[._startLine]] begin[{] call[.printIndent, parameter[]] else begin[{] None end[}] if[binary_operation[member[.s], ==, literal[null]]] begin[{] assign[member[._lastCr], literal[false]] call[_os.print, parameter[literal["null"]]] return[None] else begin[{] None end[}] local_variable[type[int], len] 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=s, selectors=[], type_arguments=None), name=ch)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n'), operator===), operandr=MemberReference(member=_lastCr, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r'), operator===), else_statement=None, label=None, then_statement=StatementExpression(expression=MemberReference(member=_destLine, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)), label=None, then_statement=StatementExpression(expression=MemberReference(member=_destLine, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_lastCr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r'), operator===)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=ch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))], member=print, postfix_operators=[], prefix_operators=[], qualifier=_os, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[print] operator[SEP] identifier[String] identifier[s] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[_startLine] operator[SEP] identifier[printIndent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] { identifier[_lastCr] operator[=] literal[boolean] operator[SEP] identifier[_os] operator[SEP] identifier[print] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[int] identifier[len] operator[=] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[ch] operator[=] identifier[s] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ch] operator[==] literal[String] operator[&&] operator[!] identifier[_lastCr] operator[SEP] identifier[_destLine] operator[++] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[ch] operator[==] literal[String] operator[SEP] identifier[_destLine] operator[++] operator[SEP] identifier[_lastCr] operator[=] identifier[ch] operator[==] literal[String] operator[SEP] identifier[_os] operator[SEP] identifier[print] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[ch] operator[SEP] operator[SEP] } }
protected void changeCurrentLevel(ParserData parserData, final Level newLevel, int newIndentationLevel) { parserData.setIndentationLevel(newIndentationLevel); parserData.setCurrentLevel(newLevel); }
class class_name[name] begin[{] method[changeCurrentLevel, return_type[void], modifier[protected], parameter[parserData, newLevel, newIndentationLevel]] begin[{] call[parserData.setIndentationLevel, parameter[member[.newIndentationLevel]]] call[parserData.setCurrentLevel, parameter[member[.newLevel]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[changeCurrentLevel] operator[SEP] identifier[ParserData] identifier[parserData] , Keyword[final] identifier[Level] identifier[newLevel] , Keyword[int] identifier[newIndentationLevel] operator[SEP] { identifier[parserData] operator[SEP] identifier[setIndentationLevel] operator[SEP] identifier[newIndentationLevel] operator[SEP] operator[SEP] identifier[parserData] operator[SEP] identifier[setCurrentLevel] operator[SEP] identifier[newLevel] operator[SEP] operator[SEP] }
public static String buildToolbar(String buttonString) { StringBuilder toolbar = new StringBuilder(); String[] buttons = buttonString.split("\\,"); String button; for (int i = 0; i < buttons.length; i++) { button = buttons[i]; toolbar.append(button + " "); } return toolbar.toString(); }
class class_name[name] begin[{] method[buildToolbar, return_type[type[String]], modifier[public static], parameter[buttonString]] begin[{] local_variable[type[StringBuilder], toolbar] local_variable[type[String], buttons] local_variable[type[String], button] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=button, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=buttons, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=button, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operator=+)], member=append, postfix_operators=[], prefix_operators=[], qualifier=toolbar, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=buttons, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[call[toolbar.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[buildToolbar] operator[SEP] identifier[String] identifier[buttonString] operator[SEP] { identifier[StringBuilder] identifier[toolbar] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[buttons] operator[=] identifier[buttonString] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[button] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[buttons] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[button] operator[=] identifier[buttons] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[toolbar] operator[SEP] identifier[append] operator[SEP] identifier[button] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[toolbar] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void processPacket(OggPacket packet) { SkeletonPacket skel = SkeletonPacketFactory.create(packet); // First packet must be the head if (packet.isBeginningOfStream()) { fishead = (SkeletonFishead)skel; } else if (skel instanceof SkeletonFisbone) { SkeletonFisbone bone = (SkeletonFisbone)skel; fisbones.add(bone); bonesByStream.put(bone.getSerialNumber(), bone); } else if (skel instanceof SkeletonKeyFramePacket) { keyFrames.add((SkeletonKeyFramePacket)skel); } else { throw new IllegalStateException("Unexpected Skeleton " + skel); } if (packet.isEndOfStream()) { hasWholeStream = true; } }
class class_name[name] begin[{] method[processPacket, return_type[void], modifier[public], parameter[packet]] begin[{] local_variable[type[SkeletonPacket], skel] if[call[packet.isBeginningOfStream, parameter[]]] begin[{] assign[member[.fishead], Cast(expression=MemberReference(member=skel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SkeletonFishead, sub_type=None))] else begin[{] if[binary_operation[member[.skel], instanceof, type[SkeletonFisbone]]] begin[{] local_variable[type[SkeletonFisbone], bone] call[fisbones.add, parameter[member[.bone]]] call[bonesByStream.put, parameter[call[bone.getSerialNumber, parameter[]], member[.bone]]] else begin[{] if[binary_operation[member[.skel], instanceof, type[SkeletonKeyFramePacket]]] begin[{] call[keyFrames.add, parameter[Cast(expression=MemberReference(member=skel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=SkeletonKeyFramePacket, sub_type=None))]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected Skeleton "), operandr=MemberReference(member=skel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) end[}] end[}] end[}] if[call[packet.isEndOfStream, parameter[]]] begin[{] assign[member[.hasWholeStream], literal[true]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[processPacket] operator[SEP] identifier[OggPacket] identifier[packet] operator[SEP] { identifier[SkeletonPacket] identifier[skel] operator[=] identifier[SkeletonPacketFactory] operator[SEP] identifier[create] operator[SEP] identifier[packet] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[packet] operator[SEP] identifier[isBeginningOfStream] operator[SEP] operator[SEP] operator[SEP] { identifier[fishead] operator[=] operator[SEP] identifier[SkeletonFishead] operator[SEP] identifier[skel] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[skel] Keyword[instanceof] identifier[SkeletonFisbone] operator[SEP] { identifier[SkeletonFisbone] identifier[bone] operator[=] operator[SEP] identifier[SkeletonFisbone] operator[SEP] identifier[skel] operator[SEP] identifier[fisbones] operator[SEP] identifier[add] operator[SEP] identifier[bone] operator[SEP] operator[SEP] identifier[bonesByStream] operator[SEP] identifier[put] operator[SEP] identifier[bone] operator[SEP] identifier[getSerialNumber] operator[SEP] operator[SEP] , identifier[bone] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[skel] Keyword[instanceof] identifier[SkeletonKeyFramePacket] operator[SEP] { identifier[keyFrames] operator[SEP] identifier[add] operator[SEP] operator[SEP] identifier[SkeletonKeyFramePacket] operator[SEP] identifier[skel] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[skel] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[packet] operator[SEP] identifier[isEndOfStream] operator[SEP] operator[SEP] operator[SEP] { identifier[hasWholeStream] operator[=] literal[boolean] operator[SEP] } }
public void generateDot(Model mo, String out, boolean fromLeftToRight) throws IOException { try (BufferedWriter dot = new BufferedWriter(new FileWriter(out))) { dot.append("digraph G {\n"); if (fromLeftToRight) { dot.append("rankdir=LR;\n"); } drawNodes(dot, NamingService.getNodeNames(mo)); drawSwitches(dot); drawLinks(dot); dot.append("}\n"); } }
class class_name[name] begin[{] method[generateDot, return_type[void], modifier[public], parameter[mo, out, fromLeftToRight]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="digraph G {\n")], member=append, postfix_operators=[], prefix_operators=[], qualifier=dot, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=fromLeftToRight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="rankdir=LR;\n")], member=append, postfix_operators=[], prefix_operators=[], qualifier=dot, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=mo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNodeNames, postfix_operators=[], prefix_operators=[], qualifier=NamingService, selectors=[], type_arguments=None)], member=drawNodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=drawSwitches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=drawLinks, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="}\n")], member=append, postfix_operators=[], prefix_operators=[], qualifier=dot, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=dot, type=ReferenceType(arguments=None, dimensions=[], name=BufferedWriter, sub_type=None), value=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=out, 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=FileWriter, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedWriter, sub_type=None)))]) end[}] END[}]
Keyword[public] Keyword[void] identifier[generateDot] operator[SEP] identifier[Model] identifier[mo] , identifier[String] identifier[out] , Keyword[boolean] identifier[fromLeftToRight] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] operator[SEP] identifier[BufferedWriter] identifier[dot] operator[=] Keyword[new] identifier[BufferedWriter] operator[SEP] Keyword[new] identifier[FileWriter] operator[SEP] identifier[out] operator[SEP] operator[SEP] operator[SEP] { identifier[dot] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fromLeftToRight] operator[SEP] { identifier[dot] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[drawNodes] operator[SEP] identifier[dot] , identifier[NamingService] operator[SEP] identifier[getNodeNames] operator[SEP] identifier[mo] operator[SEP] operator[SEP] operator[SEP] identifier[drawSwitches] operator[SEP] identifier[dot] operator[SEP] operator[SEP] identifier[drawLinks] operator[SEP] identifier[dot] operator[SEP] operator[SEP] identifier[dot] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
public final Profile getProfile(ProfileName name) { GetProfileRequest request = GetProfileRequest.newBuilder().setName(name == null ? null : name.toString()).build(); return getProfile(request); }
class class_name[name] begin[{] method[getProfile, return_type[type[Profile]], modifier[final public], parameter[name]] begin[{] local_variable[type[GetProfileRequest], request] return[call[.getProfile, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Profile] identifier[getProfile] operator[SEP] identifier[ProfileName] identifier[name] operator[SEP] { identifier[GetProfileRequest] identifier[request] operator[=] identifier[GetProfileRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setName] operator[SEP] identifier[name] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[name] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[getProfile] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
private static boolean isConstraint(Annotation annotation) { return annotation.annotationType().isAnnotationPresent(Constraint.class) || annotation.annotationType().equals(Valid.class); }
class class_name[name] begin[{] method[isConstraint, return_type[type[boolean]], modifier[private static], parameter[annotation]] begin[{] return[binary_operation[call[annotation.annotationType, parameter[]], ||, call[annotation.annotationType, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[isConstraint] operator[SEP] identifier[Annotation] identifier[annotation] operator[SEP] { Keyword[return] identifier[annotation] operator[SEP] identifier[annotationType] operator[SEP] operator[SEP] operator[SEP] identifier[isAnnotationPresent] operator[SEP] identifier[Constraint] operator[SEP] Keyword[class] operator[SEP] operator[||] identifier[annotation] operator[SEP] identifier[annotationType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Valid] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public AbstractHTMLElement addClass(String clazz) { String currentClass = this.getProperty("class"); if (currentClass != null) { currentClass += " " + clazz; } else { currentClass = clazz; } this.setProperty("class", currentClass); return this; }
class class_name[name] begin[{] method[addClass, return_type[type[AbstractHTMLElement]], modifier[public], parameter[clazz]] begin[{] local_variable[type[String], currentClass] if[binary_operation[member[.currentClass], !=, literal[null]]] begin[{] assign[member[.currentClass], binary_operation[literal[" "], +, member[.clazz]]] else begin[{] assign[member[.currentClass], member[.clazz]] end[}] THIS[call[None.setProperty, parameter[literal["class"], member[.currentClass]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[AbstractHTMLElement] identifier[addClass] operator[SEP] identifier[String] identifier[clazz] operator[SEP] { identifier[String] identifier[currentClass] operator[=] Keyword[this] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentClass] operator[!=] Other[null] operator[SEP] { identifier[currentClass] operator[+=] literal[String] operator[+] identifier[clazz] operator[SEP] } Keyword[else] { identifier[currentClass] operator[=] identifier[clazz] operator[SEP] } Keyword[this] operator[SEP] identifier[setProperty] operator[SEP] literal[String] , identifier[currentClass] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11") public void setModus(Uebertragung.Modus value) { this.modus = value; }
class class_name[name] begin[{] method[setModus, return_type[void], modifier[public], parameter[value]] begin[{] assign[THIS[member[None.modus]], member[.value]] end[}] END[}]
annotation[@] identifier[Generated] operator[SEP] identifier[value] operator[=] literal[String] , identifier[date] operator[=] literal[String] , identifier[comments] operator[=] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setModus] operator[SEP] identifier[Uebertragung] operator[SEP] identifier[Modus] identifier[value] operator[SEP] { Keyword[this] operator[SEP] identifier[modus] operator[=] identifier[value] operator[SEP] }
@Nullable // Since Bundle#getParcelableArrayList returns concrete ArrayList type, so this method follows that implementation. public static <T extends Parcelable> ArrayList<T> optParcelableArrayList(@Nullable Bundle bundle, @Nullable String key) { return optParcelableArrayList(bundle, key, new ArrayList<T>()); }
class class_name[name] begin[{] method[optParcelableArrayList, return_type[type[ArrayList]], modifier[public static], parameter[bundle, key]] begin[{] return[call[.optParcelableArrayList, parameter[member[.bundle], member[.key], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Parcelable] operator[>] identifier[ArrayList] operator[<] identifier[T] operator[>] identifier[optParcelableArrayList] operator[SEP] annotation[@] identifier[Nullable] identifier[Bundle] identifier[bundle] , annotation[@] identifier[Nullable] identifier[String] identifier[key] operator[SEP] { Keyword[return] identifier[optParcelableArrayList] operator[SEP] identifier[bundle] , identifier[key] , Keyword[new] identifier[ArrayList] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public PropertiesProxy joinByKey(String key) { String str = get(key); final PropertiesProxy me = this; if (!Strings.isBlank(str)) { String[] ss = Strings.splitIgnoreBlank(str, "\n"); for (String s : ss) { File f = Files.findFile(s); if (null == f) { throw Lang.makeThrow("Fail to found path '%s' in CLASSPATH or File System!", s); } // 如果是一个包,引用全部 Files if (f.isDirectory()) { Disks.visitFile(f, new FileVisitor() { public void visit(File f) { me.joinAndClose(Streams.fileInr(f)); } }, new FileFilter() { public boolean accept(File f) { if (f.isDirectory()) return !f.isHidden() && !f.getName().startsWith("."); return f.getName().endsWith(".properties"); } }); } // 否则引用单个文件 else if (f.isFile()) { this.joinAndClose(Streams.fileInr(f)); } } } return this; }
class class_name[name] begin[{] method[joinByKey, return_type[type[PropertiesProxy]], modifier[public], parameter[key]] begin[{] local_variable[type[String], str] local_variable[type[PropertiesProxy], me] if[call[Strings.isBlank, parameter[member[.str]]]] begin[{] local_variable[type[String], ss] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findFile, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None), name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Fail to found path '%s' in CLASSPATH or File System!"), MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=makeThrow, postfix_operators=[], prefix_operators=[], qualifier=Lang, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=isFile, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fileInr, postfix_operators=[], prefix_operators=[], qualifier=Streams, selectors=[], type_arguments=None)], member=joinAndClose, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fileInr, postfix_operators=[], prefix_operators=[], qualifier=Streams, selectors=[], type_arguments=None)], member=joinAndClose, postfix_operators=[], prefix_operators=[], qualifier=me, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=visit, parameters=[FormalParameter(annotations=[], modifiers=set(), name=f, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileVisitor, sub_type=None)), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[IfStatement(condition=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isHidden, postfix_operators=[], prefix_operators=['!'], qualifier=f, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=['!'], qualifier=f, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=startsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), label=None)), ReturnStatement(expression=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".properties")], member=endsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=accept, parameters=[FormalParameter(annotations=[], modifiers=set(), name=f, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileFilter, sub_type=None))], member=visitFile, postfix_operators=[], prefix_operators=[], qualifier=Disks, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=ss, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=s)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[PropertiesProxy] identifier[joinByKey] operator[SEP] identifier[String] identifier[key] operator[SEP] { identifier[String] identifier[str] operator[=] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[final] identifier[PropertiesProxy] identifier[me] operator[=] Keyword[this] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Strings] operator[SEP] identifier[isBlank] operator[SEP] identifier[str] operator[SEP] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[ss] operator[=] identifier[Strings] operator[SEP] identifier[splitIgnoreBlank] operator[SEP] identifier[str] , literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[s] operator[:] identifier[ss] operator[SEP] { identifier[File] identifier[f] operator[=] identifier[Files] operator[SEP] identifier[findFile] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[f] operator[SEP] { Keyword[throw] identifier[Lang] operator[SEP] identifier[makeThrow] operator[SEP] literal[String] , identifier[s] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[f] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[Disks] operator[SEP] identifier[visitFile] operator[SEP] identifier[f] , Keyword[new] identifier[FileVisitor] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[visit] operator[SEP] identifier[File] identifier[f] operator[SEP] { identifier[me] operator[SEP] identifier[joinAndClose] operator[SEP] identifier[Streams] operator[SEP] identifier[fileInr] operator[SEP] identifier[f] operator[SEP] operator[SEP] operator[SEP] } } , Keyword[new] identifier[FileFilter] operator[SEP] operator[SEP] { Keyword[public] Keyword[boolean] identifier[accept] operator[SEP] identifier[File] identifier[f] operator[SEP] { Keyword[if] operator[SEP] identifier[f] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[!] identifier[f] operator[SEP] identifier[isHidden] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[f] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[f] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[f] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[joinAndClose] operator[SEP] identifier[Streams] operator[SEP] identifier[fileInr] operator[SEP] identifier[f] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] Keyword[this] operator[SEP] }
public static boolean runCommand(final Process p, final OutputStream output) { return runCommand(p, output, output, new ArrayList<String>()); }
class class_name[name] begin[{] method[runCommand, return_type[type[boolean]], modifier[public static], parameter[p, output]] begin[{] return[call[.runCommand, parameter[member[.p], member[.output], member[.output], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[runCommand] operator[SEP] Keyword[final] identifier[Process] identifier[p] , Keyword[final] identifier[OutputStream] identifier[output] operator[SEP] { Keyword[return] identifier[runCommand] operator[SEP] identifier[p] , identifier[output] , identifier[output] , Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
static private void populateCache() { if (cacheIsPopulated) { return; } cacheIsPopulated = true; /* Schema: * * units{ * duration{ * day{ * one{"{0} ден"} * other{"{0} дена"} * } */ // Load the unit types. Use English, since we know that that is a superset. ICUResourceBundle rb1 = (ICUResourceBundle) UResourceBundle.getBundleInstance( ICUData.ICU_UNIT_BASE_NAME, "en"); rb1.getAllItemsWithFallback("units", new MeasureUnitSink()); // Load the currencies ICUResourceBundle rb2 = (ICUResourceBundle) UResourceBundle.getBundleInstance( ICUData.ICU_BASE_NAME, "currencyNumericCodes", ICUResourceBundle.ICU_DATA_CLASS_LOADER); rb2.getAllItemsWithFallback("codeMap", new CurrencyNumericCodeSink()); }
class class_name[name] begin[{] method[populateCache, return_type[void], modifier[private static], parameter[]] begin[{] if[member[.cacheIsPopulated]] begin[{] return[None] else begin[{] None end[}] assign[member[.cacheIsPopulated], literal[true]] local_variable[type[ICUResourceBundle], rb1] call[rb1.getAllItemsWithFallback, parameter[literal["units"], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MeasureUnitSink, sub_type=None))]] local_variable[type[ICUResourceBundle], rb2] call[rb2.getAllItemsWithFallback, parameter[literal["codeMap"], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CurrencyNumericCodeSink, sub_type=None))]] end[}] END[}]
Keyword[static] Keyword[private] Keyword[void] identifier[populateCache] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[cacheIsPopulated] operator[SEP] { Keyword[return] operator[SEP] } identifier[cacheIsPopulated] operator[=] literal[boolean] operator[SEP] identifier[ICUResourceBundle] identifier[rb1] operator[=] operator[SEP] identifier[ICUResourceBundle] operator[SEP] identifier[UResourceBundle] operator[SEP] identifier[getBundleInstance] operator[SEP] identifier[ICUData] operator[SEP] identifier[ICU_UNIT_BASE_NAME] , literal[String] operator[SEP] operator[SEP] identifier[rb1] operator[SEP] identifier[getAllItemsWithFallback] operator[SEP] literal[String] , Keyword[new] identifier[MeasureUnitSink] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ICUResourceBundle] identifier[rb2] operator[=] operator[SEP] identifier[ICUResourceBundle] operator[SEP] identifier[UResourceBundle] operator[SEP] identifier[getBundleInstance] operator[SEP] identifier[ICUData] operator[SEP] identifier[ICU_BASE_NAME] , literal[String] , identifier[ICUResourceBundle] operator[SEP] identifier[ICU_DATA_CLASS_LOADER] operator[SEP] operator[SEP] identifier[rb2] operator[SEP] identifier[getAllItemsWithFallback] operator[SEP] literal[String] , Keyword[new] identifier[CurrencyNumericCodeSink] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void updateWriter() { HdfsStreamWriter result = new HdfsStreamWriter(); String suffix = this.config.getTmpFileSuffix(); int suffixIndex = 0; boolean isFileSyncEachTime = this.config.isFileSyncEachTime(); boolean isSucceed = false; while (suffixIndex < TMP_MAX) { try { result.open(this.currentOutputUri + suffix, this.fileSystem, isFileSyncEachTime); isSucceed = true; break; } catch (IOException ex) { String logFormat = "Failed to HDFS file open. Skip and retry next file. : TargetUri={0}"; String logMessage = MessageFormat.format(logFormat, this.currentOutputUri + suffix); logger.warn(logMessage, ex); suffixIndex++; suffix = this.config.getTmpFileSuffix() + suffixIndex; } } if (isSucceed) { this.currentWriter = result; this.currentSuffix = suffix; } else { String logFormat = "HDFS file open failure is retry overed. Skip HDFS file open. : TargetUri={0}"; String logMessage = MessageFormat.format(logFormat, this.currentOutputUri + suffix); logger.warn(logMessage); } }
class class_name[name] begin[{] method[updateWriter, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[HdfsStreamWriter], result] local_variable[type[String], suffix] local_variable[type[int], suffixIndex] local_variable[type[boolean], isFileSyncEachTime] local_variable[type[boolean], isSucceed] while[binary_operation[member[.suffixIndex], <, member[.TMP_MAX]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=currentOutputUri, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=suffix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=fileSystem, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=isFileSyncEachTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=open, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isSucceed, 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)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to HDFS file open. Skip and retry next file. : TargetUri={0}"), name=logFormat)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=logFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=currentOutputUri, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=suffix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=format, postfix_operators=[], prefix_operators=[], qualifier=MessageFormat, selectors=[], type_arguments=None), name=logMessage)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=logMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=suffixIndex, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=suffix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=config, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getTmpFileSuffix, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operandr=MemberReference(member=suffixIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] if[member[.isSucceed]] begin[{] assign[THIS[member[None.currentWriter]], member[.result]] assign[THIS[member[None.currentSuffix]], member[.suffix]] else begin[{] local_variable[type[String], logFormat] local_variable[type[String], logMessage] call[logger.warn, parameter[member[.logMessage]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[updateWriter] operator[SEP] operator[SEP] { identifier[HdfsStreamWriter] identifier[result] operator[=] Keyword[new] identifier[HdfsStreamWriter] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[suffix] operator[=] Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[getTmpFileSuffix] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[suffixIndex] operator[=] Other[0] operator[SEP] Keyword[boolean] identifier[isFileSyncEachTime] operator[=] Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[isFileSyncEachTime] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[isSucceed] operator[=] literal[boolean] operator[SEP] Keyword[while] operator[SEP] identifier[suffixIndex] operator[<] identifier[TMP_MAX] operator[SEP] { Keyword[try] { identifier[result] operator[SEP] identifier[open] operator[SEP] Keyword[this] operator[SEP] identifier[currentOutputUri] operator[+] identifier[suffix] , Keyword[this] operator[SEP] identifier[fileSystem] , identifier[isFileSyncEachTime] operator[SEP] operator[SEP] identifier[isSucceed] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ex] operator[SEP] { identifier[String] identifier[logFormat] operator[=] literal[String] operator[SEP] identifier[String] identifier[logMessage] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] identifier[logFormat] , Keyword[this] operator[SEP] identifier[currentOutputUri] operator[+] identifier[suffix] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[warn] operator[SEP] identifier[logMessage] , identifier[ex] operator[SEP] operator[SEP] identifier[suffixIndex] operator[++] operator[SEP] identifier[suffix] operator[=] Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[getTmpFileSuffix] operator[SEP] operator[SEP] operator[+] identifier[suffixIndex] operator[SEP] } } Keyword[if] operator[SEP] identifier[isSucceed] operator[SEP] { Keyword[this] operator[SEP] identifier[currentWriter] operator[=] identifier[result] operator[SEP] Keyword[this] operator[SEP] identifier[currentSuffix] operator[=] identifier[suffix] operator[SEP] } Keyword[else] { identifier[String] identifier[logFormat] operator[=] literal[String] operator[SEP] identifier[String] identifier[logMessage] operator[=] identifier[MessageFormat] operator[SEP] identifier[format] operator[SEP] identifier[logFormat] , Keyword[this] operator[SEP] identifier[currentOutputUri] operator[+] identifier[suffix] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[warn] operator[SEP] identifier[logMessage] operator[SEP] operator[SEP] } }
public static boolean isValidInt(@Nullable final String integerStr, final int lowerBound, final int upperBound, final boolean includeLowerBound, final boolean includeUpperBound) { if (lowerBound > upperBound) { throw new IllegalArgumentException(ExceptionValues.INVALID_BOUNDS); } else if (!isValidInt(integerStr)) { return false; } final int aInteger = toInteger(integerStr); final boolean respectsLowerBound = includeLowerBound ? lowerBound <= aInteger : lowerBound < aInteger; final boolean respectsUpperBound = includeUpperBound ? aInteger <= upperBound : aInteger < upperBound; return respectsLowerBound && respectsUpperBound; }
class class_name[name] begin[{] method[isValidInt, return_type[type[boolean]], modifier[public static], parameter[integerStr, lowerBound, upperBound, includeLowerBound, includeUpperBound]] begin[{] if[binary_operation[member[.lowerBound], >, member[.upperBound]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=INVALID_BOUNDS, postfix_operators=[], prefix_operators=[], qualifier=ExceptionValues, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] if[call[.isValidInt, parameter[member[.integerStr]]]] begin[{] return[literal[false]] else begin[{] None end[}] end[}] local_variable[type[int], aInteger] local_variable[type[boolean], respectsLowerBound] local_variable[type[boolean], respectsUpperBound] return[binary_operation[member[.respectsLowerBound], &&, member[.respectsUpperBound]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isValidInt] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[String] identifier[integerStr] , Keyword[final] Keyword[int] identifier[lowerBound] , Keyword[final] Keyword[int] identifier[upperBound] , Keyword[final] Keyword[boolean] identifier[includeLowerBound] , Keyword[final] Keyword[boolean] identifier[includeUpperBound] operator[SEP] { Keyword[if] operator[SEP] identifier[lowerBound] operator[>] identifier[upperBound] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[ExceptionValues] operator[SEP] identifier[INVALID_BOUNDS] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[isValidInt] operator[SEP] identifier[integerStr] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[final] Keyword[int] identifier[aInteger] operator[=] identifier[toInteger] operator[SEP] identifier[integerStr] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[respectsLowerBound] operator[=] identifier[includeLowerBound] operator[?] identifier[lowerBound] operator[<=] identifier[aInteger] operator[:] identifier[lowerBound] operator[<] identifier[aInteger] operator[SEP] Keyword[final] Keyword[boolean] identifier[respectsUpperBound] operator[=] identifier[includeUpperBound] operator[?] identifier[aInteger] operator[<=] identifier[upperBound] operator[:] identifier[aInteger] operator[<] identifier[upperBound] operator[SEP] Keyword[return] identifier[respectsLowerBound] operator[&&] identifier[respectsUpperBound] operator[SEP] }
public void save(File file) throws IOException { DataOutputStream dout = new DataOutputStream(new FileOutputStream(file)); dout.writeUTF(name); for (int i=0;i<256;i++) { dout.writeBoolean(chars[i]); } dout.close(); }
class class_name[name] begin[{] method[save, return_type[void], modifier[public], parameter[file]] begin[{] local_variable[type[DataOutputStream], dout] call[dout.writeUTF, parameter[member[.name]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=chars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=writeBoolean, postfix_operators=[], prefix_operators=[], qualifier=dout, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=256), 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) call[dout.close, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[save] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] { identifier[DataOutputStream] identifier[dout] operator[=] Keyword[new] identifier[DataOutputStream] operator[SEP] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] identifier[dout] operator[SEP] identifier[writeUTF] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Other[256] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[dout] operator[SEP] identifier[writeBoolean] operator[SEP] identifier[chars] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[dout] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] }
public <C extends Controller> AbstractModule controller(Class<C> klass) { String name = klass.getName(); JSClosure constructor = JSClosure.create(new DefaultControllerConstructor<C>(name, klass)); ControllerDependencyInspector inspector = GWT.create(ControllerDependencyInspector.class); JSArray<String> dependencies = JSArray.create(inspector.inspect(klass)); dependencies.unshift("$scope"); ngo.controller(name, dependencies, constructor); return this; }
class class_name[name] begin[{] method[controller, return_type[type[AbstractModule]], modifier[public], parameter[klass]] begin[{] local_variable[type[String], name] local_variable[type[JSClosure], constructor] local_variable[type[ControllerDependencyInspector], inspector] local_variable[type[JSArray], dependencies] call[dependencies.unshift, parameter[literal["$scope"]]] call[ngo.controller, parameter[member[.name], member[.dependencies], member[.constructor]]] return[THIS[]] end[}] END[}]
Keyword[public] operator[<] identifier[C] Keyword[extends] identifier[Controller] operator[>] identifier[AbstractModule] identifier[controller] operator[SEP] identifier[Class] operator[<] identifier[C] operator[>] identifier[klass] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[klass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[JSClosure] identifier[constructor] operator[=] identifier[JSClosure] operator[SEP] identifier[create] operator[SEP] Keyword[new] identifier[DefaultControllerConstructor] operator[<] identifier[C] operator[>] operator[SEP] identifier[name] , identifier[klass] operator[SEP] operator[SEP] operator[SEP] identifier[ControllerDependencyInspector] identifier[inspector] operator[=] identifier[GWT] operator[SEP] identifier[create] operator[SEP] identifier[ControllerDependencyInspector] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[JSArray] operator[<] identifier[String] operator[>] identifier[dependencies] operator[=] identifier[JSArray] operator[SEP] identifier[create] operator[SEP] identifier[inspector] operator[SEP] identifier[inspect] operator[SEP] identifier[klass] operator[SEP] operator[SEP] operator[SEP] identifier[dependencies] operator[SEP] identifier[unshift] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ngo] operator[SEP] identifier[controller] operator[SEP] identifier[name] , identifier[dependencies] , identifier[constructor] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@SuppressWarnings("rawtypes") public static Hashtable parsePostData(ServletInputStream in, String encoding, boolean multireadPropertyEnabled) /* 157338 add throws */ throws IOException { int inputLen; byte[] postedBytes = null; String postedBody; if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) logger.logp(Level.FINE, CLASS_NAME,"parsePostData","parsing chunked post data. encoding = " + encoding); if (in == null) throw new IllegalArgumentException("post data inputstream is null"); try { // // Make sure we read the entire POSTed body. // ByteArrayOutputStream byteOS = new ByteArrayOutputStream(DEFAULT_BUFFER_SIZE); do { byte [] readInBytes = new byte[DEFAULT_BUFFER_SIZE]; inputLen = in.read(readInBytes, 0, DEFAULT_BUFFER_SIZE); if (inputLen > 0){ byteOS.write(readInBytes,0,inputLen); } } while (inputLen != -1); // MultiRead Start if (multireadPropertyEnabled) { in.close(); } // MultiRead End postedBytes = byteOS.toByteArray(); if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) logger.logp(Level.FINE, CLASS_NAME,"parsePostData","finished reading ["+postedBytes.length+"] bytes"); } catch (IOException e) { com.ibm.wsspi.webcontainer.util.FFDCWrapper.processException(e, "com.ibm.ws.webcontainer.servlet.RequestUtils.parsePostData", "598"); // begin 157338 throw e; //return new Hashtable(); // begin 157338 } // XXX we shouldn't assume that the only kind of POST body // is FORM data encoded using ASCII or ISO Latin/1 ... or // that the body should always be treated as FORM data. // try { postedBody = new String(postedBytes, encoding); } catch (UnsupportedEncodingException e) { com.ibm.wsspi.webcontainer.util.FFDCWrapper.processException(e, "com.ibm.ws.webcontainer.servlet.RequestUtils.parsePostData", "618"); postedBody = new String(postedBytes); } if (WCCustomProperties.PARSE_UTF8_POST_DATA && encoding.equalsIgnoreCase("UTF-8")) { for (byte nextByte : postedBytes) { if (nextByte < (byte)0 ) { encoding = "8859_1"; if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) logger.logp(Level.FINE, CLASS_NAME,"parsePostData","UTF8 post data, set encoing to 8859_1 to prevent futrther encoding"); break; } } } return parseQueryString(postedBody, encoding); }
class class_name[name] begin[{] method[parsePostData, return_type[type[Hashtable]], modifier[public static], parameter[in, encoding, multireadPropertyEnabled]] begin[{] local_variable[type[int], inputLen] local_variable[type[byte], postedBytes] local_variable[type[String], postedBody] if[binary_operation[call[com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[logger.isLoggable, parameter[member[Level.FINE]]]]] begin[{] call[logger.logp, parameter[member[Level.FINE], member[.CLASS_NAME], literal["parsePostData"], binary_operation[literal["parsing chunked post data. encoding = "], +, member[.encoding]]]] else begin[{] None end[}] if[binary_operation[member[.in], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="post data inputstream is null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=DEFAULT_BUFFER_SIZE, 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=ByteArrayOutputStream, sub_type=None)), name=byteOS)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayOutputStream, sub_type=None)), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberReference(member=DEFAULT_BUFFER_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=readInBytes)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=inputLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=readInBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=DEFAULT_BUFFER_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=inputLen, 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=readInBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=inputLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=byteOS, selectors=[], type_arguments=None), label=None)]))]), condition=BinaryOperation(operandl=MemberReference(member=inputLen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), label=None), IfStatement(condition=MemberReference(member=multireadPropertyEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=in, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=postedBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=byteOS, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ejs.ras.TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=FINE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[])], member=isLoggable, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FINE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="parsePostData"), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="finished reading ["), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=postedBytes, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] bytes"), operator=+)], member=logp, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.webcontainer.servlet.RequestUtils.parsePostData"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="598")], member=processException, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.wsspi.webcontainer.util.FFDCWrapper, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=postedBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=postedBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=encoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.webcontainer.servlet.RequestUtils.parsePostData"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="618")], member=processException, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.wsspi.webcontainer.util.FFDCWrapper, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=postedBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=postedBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['UnsupportedEncodingException']))], finally_block=None, label=None, resources=None) if[binary_operation[member[WCCustomProperties.PARSE_UTF8_POST_DATA], &&, call[encoding.equalsIgnoreCase, parameter[literal["UTF-8"]]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nextByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), type=BasicType(dimensions=[], name=byte)), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=encoding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="8859_1")), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=com.ibm.ejs.ras.TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=FINE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[])], member=isLoggable, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FINE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="parsePostData"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="UTF8 post data, set encoing to 8859_1 to prevent futrther encoding")], member=logp, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=postedBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=nextByte)], modifiers=set(), type=BasicType(dimensions=[], name=byte))), label=None) else begin[{] None end[}] return[call[.parseQueryString, parameter[member[.postedBody], member[.encoding]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[Hashtable] identifier[parsePostData] operator[SEP] identifier[ServletInputStream] identifier[in] , identifier[String] identifier[encoding] , Keyword[boolean] identifier[multireadPropertyEnabled] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[inputLen] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[postedBytes] operator[=] Other[null] operator[SEP] identifier[String] identifier[postedBody] operator[SEP] Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[logp] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , identifier[CLASS_NAME] , literal[String] , literal[String] operator[+] identifier[encoding] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[in] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[ByteArrayOutputStream] identifier[byteOS] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] identifier[DEFAULT_BUFFER_SIZE] operator[SEP] operator[SEP] Keyword[do] { Keyword[byte] operator[SEP] operator[SEP] identifier[readInBytes] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[DEFAULT_BUFFER_SIZE] operator[SEP] operator[SEP] identifier[inputLen] operator[=] identifier[in] operator[SEP] identifier[read] operator[SEP] identifier[readInBytes] , Other[0] , identifier[DEFAULT_BUFFER_SIZE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[inputLen] operator[>] Other[0] operator[SEP] { identifier[byteOS] operator[SEP] identifier[write] operator[SEP] identifier[readInBytes] , Other[0] , identifier[inputLen] operator[SEP] operator[SEP] } } Keyword[while] operator[SEP] identifier[inputLen] operator[!=] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[multireadPropertyEnabled] operator[SEP] { identifier[in] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } identifier[postedBytes] operator[=] identifier[byteOS] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[logp] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , identifier[CLASS_NAME] , literal[String] , literal[String] operator[+] identifier[postedBytes] operator[SEP] identifier[length] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[wsspi] operator[SEP] identifier[webcontainer] operator[SEP] identifier[util] operator[SEP] identifier[FFDCWrapper] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[try] { identifier[postedBody] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[postedBytes] , identifier[encoding] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[UnsupportedEncodingException] identifier[e] operator[SEP] { identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[wsspi] operator[SEP] identifier[webcontainer] operator[SEP] identifier[util] operator[SEP] identifier[FFDCWrapper] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[postedBody] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[postedBytes] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[WCCustomProperties] operator[SEP] identifier[PARSE_UTF8_POST_DATA] operator[&&] identifier[encoding] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[byte] identifier[nextByte] operator[:] identifier[postedBytes] operator[SEP] { Keyword[if] operator[SEP] identifier[nextByte] operator[<] operator[SEP] Keyword[byte] operator[SEP] Other[0] operator[SEP] { identifier[encoding] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[com] operator[SEP] identifier[ibm] operator[SEP] identifier[ejs] operator[SEP] identifier[ras] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[logger] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[logp] operator[SEP] identifier[Level] operator[SEP] identifier[FINE] , identifier[CLASS_NAME] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[return] identifier[parseQueryString] operator[SEP] identifier[postedBody] , identifier[encoding] operator[SEP] operator[SEP] }
@Indexable(type = IndexableType.DELETE) @Override public CPSpecificationOption deleteCPSpecificationOption( CPSpecificationOption cpSpecificationOption) throws PortalException { return cpSpecificationOptionPersistence.remove(cpSpecificationOption); }
class class_name[name] begin[{] method[deleteCPSpecificationOption, return_type[type[CPSpecificationOption]], modifier[public], parameter[cpSpecificationOption]] begin[{] return[call[cpSpecificationOptionPersistence.remove, parameter[member[.cpSpecificationOption]]]] end[}] END[}]
annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[DELETE] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CPSpecificationOption] identifier[deleteCPSpecificationOption] operator[SEP] identifier[CPSpecificationOption] identifier[cpSpecificationOption] operator[SEP] Keyword[throws] identifier[PortalException] { Keyword[return] identifier[cpSpecificationOptionPersistence] operator[SEP] identifier[remove] operator[SEP] identifier[cpSpecificationOption] operator[SEP] operator[SEP] }
protected synchronized void release(boolean userAccess) { SessionState.detachSession(); if (ThreadWithGarbageCleanup.currentThread() instanceof ThreadWithGarbageCleanup) { ThreadWithGarbageCleanup currentThread = (ThreadWithGarbageCleanup) ThreadWithGarbageCleanup.currentThread(); currentThread.cacheThreadLocalRawStore(); } if (userAccess) { lastAccessTime = System.currentTimeMillis(); } if (opHandleSet.isEmpty()) { lastIdleTime = System.currentTimeMillis(); } else { lastIdleTime = 0; } }
class class_name[name] begin[{] method[release, return_type[void], modifier[synchronized protected], parameter[userAccess]] begin[{] call[SessionState.detachSession, parameter[]] if[binary_operation[call[ThreadWithGarbageCleanup.currentThread, parameter[]], instanceof, type[ThreadWithGarbageCleanup]]] begin[{] local_variable[type[ThreadWithGarbageCleanup], currentThread] call[currentThread.cacheThreadLocalRawStore, parameter[]] else begin[{] None end[}] if[member[.userAccess]] begin[{] assign[member[.lastAccessTime], call[System.currentTimeMillis, parameter[]]] else begin[{] None end[}] if[call[opHandleSet.isEmpty, parameter[]]] begin[{] assign[member[.lastIdleTime], call[System.currentTimeMillis, parameter[]]] else begin[{] assign[member[.lastIdleTime], literal[0]] end[}] end[}] END[}]
Keyword[protected] Keyword[synchronized] Keyword[void] identifier[release] operator[SEP] Keyword[boolean] identifier[userAccess] operator[SEP] { identifier[SessionState] operator[SEP] identifier[detachSession] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ThreadWithGarbageCleanup] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] Keyword[instanceof] identifier[ThreadWithGarbageCleanup] operator[SEP] { identifier[ThreadWithGarbageCleanup] identifier[currentThread] operator[=] operator[SEP] identifier[ThreadWithGarbageCleanup] operator[SEP] identifier[ThreadWithGarbageCleanup] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[currentThread] operator[SEP] identifier[cacheThreadLocalRawStore] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[userAccess] operator[SEP] { identifier[lastAccessTime] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[opHandleSet] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[lastIdleTime] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[lastIdleTime] operator[=] Other[0] operator[SEP] } }
public Content getPackageName(PackageDoc packageDoc) { return packageDoc == null || packageDoc.name().length() == 0 ? defaultPackageLabel : getPackageLabel(packageDoc.name()); }
class class_name[name] begin[{] method[getPackageName, return_type[type[Content]], modifier[public], parameter[packageDoc]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=packageDoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=packageDoc, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=||), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=packageDoc, selectors=[], type_arguments=None)], member=getPackageLabel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_true=MemberReference(member=defaultPackageLabel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] identifier[Content] identifier[getPackageName] operator[SEP] identifier[PackageDoc] identifier[packageDoc] operator[SEP] { Keyword[return] identifier[packageDoc] operator[==] Other[null] operator[||] identifier[packageDoc] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[?] identifier[defaultPackageLabel] operator[:] identifier[getPackageLabel] operator[SEP] identifier[packageDoc] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private void RGBtoHSV(float red, float green, float blue) { float min = 0; float max = 0; float delta = 0; min = MIN(red, green, blue); max = MAX(red, green, blue); m_bri = max; // v delta = max - min; if (max != 0) { m_sat = delta / max; // s } else { m_sat = 0; m_hue = 0; return; } if (delta == 0) { m_hue = 0; return; } if (red == max) { m_hue = (green - blue) / delta; } else if (green == max) { m_hue = 2 + ((blue - red) / delta); } else { m_hue = 4 + ((red - green) / delta); } m_hue *= 60; if (m_hue < 0) { m_hue += 360; } }
class class_name[name] begin[{] method[RGBtoHSV, return_type[void], modifier[private], parameter[red, green, blue]] begin[{] local_variable[type[float], min] local_variable[type[float], max] local_variable[type[float], delta] assign[member[.min], call[.MIN, parameter[member[.red], member[.green], member[.blue]]]] assign[member[.max], call[.MAX, parameter[member[.red], member[.green], member[.blue]]]] assign[member[.m_bri], member[.max]] assign[member[.delta], binary_operation[member[.max], -, member[.min]]] if[binary_operation[member[.max], !=, literal[0]]] begin[{] assign[member[.m_sat], binary_operation[member[.delta], /, member[.max]]] else begin[{] assign[member[.m_sat], literal[0]] assign[member[.m_hue], literal[0]] return[None] end[}] if[binary_operation[member[.delta], ==, literal[0]]] begin[{] assign[member[.m_hue], literal[0]] return[None] else begin[{] None end[}] if[binary_operation[member[.red], ==, member[.max]]] begin[{] assign[member[.m_hue], binary_operation[binary_operation[member[.green], -, member[.blue]], /, member[.delta]]] else begin[{] if[binary_operation[member[.green], ==, member[.max]]] begin[{] assign[member[.m_hue], binary_operation[literal[2], +, binary_operation[binary_operation[member[.blue], -, member[.red]], /, member[.delta]]]] else begin[{] assign[member[.m_hue], binary_operation[literal[4], +, binary_operation[binary_operation[member[.red], -, member[.green]], /, member[.delta]]]] end[}] end[}] assign[member[.m_hue], literal[60]] if[binary_operation[member[.m_hue], <, literal[0]]] begin[{] assign[member[.m_hue], literal[360]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[RGBtoHSV] operator[SEP] Keyword[float] identifier[red] , Keyword[float] identifier[green] , Keyword[float] identifier[blue] operator[SEP] { Keyword[float] identifier[min] operator[=] Other[0] operator[SEP] Keyword[float] identifier[max] operator[=] Other[0] operator[SEP] Keyword[float] identifier[delta] operator[=] Other[0] operator[SEP] identifier[min] operator[=] identifier[MIN] operator[SEP] identifier[red] , identifier[green] , identifier[blue] operator[SEP] operator[SEP] identifier[max] operator[=] identifier[MAX] operator[SEP] identifier[red] , identifier[green] , identifier[blue] operator[SEP] operator[SEP] identifier[m_bri] operator[=] identifier[max] operator[SEP] identifier[delta] operator[=] identifier[max] operator[-] identifier[min] operator[SEP] Keyword[if] operator[SEP] identifier[max] operator[!=] Other[0] operator[SEP] { identifier[m_sat] operator[=] identifier[delta] operator[/] identifier[max] operator[SEP] } Keyword[else] { identifier[m_sat] operator[=] Other[0] operator[SEP] identifier[m_hue] operator[=] Other[0] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[delta] operator[==] Other[0] operator[SEP] { identifier[m_hue] operator[=] Other[0] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[red] operator[==] identifier[max] operator[SEP] { identifier[m_hue] operator[=] operator[SEP] identifier[green] operator[-] identifier[blue] operator[SEP] operator[/] identifier[delta] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[green] operator[==] identifier[max] operator[SEP] { identifier[m_hue] operator[=] Other[2] operator[+] operator[SEP] operator[SEP] identifier[blue] operator[-] identifier[red] operator[SEP] operator[/] identifier[delta] operator[SEP] operator[SEP] } Keyword[else] { identifier[m_hue] operator[=] Other[4] operator[+] operator[SEP] operator[SEP] identifier[red] operator[-] identifier[green] operator[SEP] operator[/] identifier[delta] operator[SEP] operator[SEP] } identifier[m_hue] operator[*=] Other[60] operator[SEP] Keyword[if] operator[SEP] identifier[m_hue] operator[<] Other[0] operator[SEP] { identifier[m_hue] operator[+=] Other[360] operator[SEP] } }
public static MessageBody fromSequenceData(List<List<Object>> sequenceData) { if(sequenceData == null || sequenceData.size() == 0 || sequenceData.size() > 1) { throw new IllegalArgumentException("Sequence data is null or has more than one collection in it."); } MessageBody body = new MessageBody(); body.bodyType = MessageBodyType.SEQUENCE; body.valueData = null; body.sequenceData = sequenceData; body.binaryData = null; return body; }
class class_name[name] begin[{] method[fromSequenceData, return_type[type[MessageBody]], modifier[public static], parameter[sequenceData]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.sequenceData], ==, literal[null]], ||, binary_operation[call[sequenceData.size, parameter[]], ==, literal[0]]], ||, binary_operation[call[sequenceData.size, parameter[]], >, literal[1]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Sequence data is null or has more than one collection in it.")], 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[MessageBody], body] assign[member[body.bodyType], member[MessageBodyType.SEQUENCE]] assign[member[body.valueData], literal[null]] assign[member[body.sequenceData], member[.sequenceData]] assign[member[body.binaryData], literal[null]] return[member[.body]] end[}] END[}]
Keyword[public] Keyword[static] identifier[MessageBody] identifier[fromSequenceData] operator[SEP] identifier[List] operator[<] identifier[List] operator[<] identifier[Object] operator[>] operator[>] identifier[sequenceData] operator[SEP] { Keyword[if] operator[SEP] identifier[sequenceData] operator[==] Other[null] operator[||] identifier[sequenceData] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[||] identifier[sequenceData] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[MessageBody] identifier[body] operator[=] Keyword[new] identifier[MessageBody] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] identifier[bodyType] operator[=] identifier[MessageBodyType] operator[SEP] identifier[SEQUENCE] operator[SEP] identifier[body] operator[SEP] identifier[valueData] operator[=] Other[null] operator[SEP] identifier[body] operator[SEP] identifier[sequenceData] operator[=] identifier[sequenceData] operator[SEP] identifier[body] operator[SEP] identifier[binaryData] operator[=] Other[null] operator[SEP] Keyword[return] identifier[body] operator[SEP] }
public boolean remove(String classname) { String pkgname; HashSet<String> names; classname = ClassPathTraversal.cleanUp(classname); pkgname = ClassPathTraversal.extractPackage(classname); names = m_NameCache.get(pkgname); if (names != null) return names.remove(classname); else return false; }
class class_name[name] begin[{] method[remove, return_type[type[boolean]], modifier[public], parameter[classname]] begin[{] local_variable[type[String], pkgname] local_variable[type[HashSet], names] assign[member[.classname], call[ClassPathTraversal.cleanUp, parameter[member[.classname]]]] assign[member[.pkgname], call[ClassPathTraversal.extractPackage, parameter[member[.classname]]]] assign[member[.names], call[m_NameCache.get, parameter[member[.pkgname]]]] if[binary_operation[member[.names], !=, literal[null]]] begin[{] return[call[names.remove, parameter[member[.classname]]]] else begin[{] return[literal[false]] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[remove] operator[SEP] identifier[String] identifier[classname] operator[SEP] { identifier[String] identifier[pkgname] operator[SEP] identifier[HashSet] operator[<] identifier[String] operator[>] identifier[names] operator[SEP] identifier[classname] operator[=] identifier[ClassPathTraversal] operator[SEP] identifier[cleanUp] operator[SEP] identifier[classname] operator[SEP] operator[SEP] identifier[pkgname] operator[=] identifier[ClassPathTraversal] operator[SEP] identifier[extractPackage] operator[SEP] identifier[classname] operator[SEP] operator[SEP] identifier[names] operator[=] identifier[m_NameCache] operator[SEP] identifier[get] operator[SEP] identifier[pkgname] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[names] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[names] operator[SEP] identifier[remove] operator[SEP] identifier[classname] operator[SEP] operator[SEP] Keyword[else] Keyword[return] literal[boolean] operator[SEP] }
@Override public void close() { if (isDefaultManager() && getClass().getClassLoader() == classLoader) { log.info("Closing default CacheManager"); } Iterable<Cache> _caches; synchronized (lock) { if (closing) { return; } _caches = cachesCopy(); closing = true; } logPhase("close"); List<Throwable> _suppressedExceptions = new ArrayList<Throwable>(); for (Cache c : _caches) { ((InternalCache) c).cancelTimerJobs(); } for (Cache c : _caches) { try { c.close(); } catch (Throwable t) { _suppressedExceptions.add(t); } } try { for (CacheManagerLifeCycleListener lc : cacheManagerLifeCycleListeners) { lc.managerDestroyed(this); } } catch (Throwable t) { _suppressedExceptions.add(t); } ((Cache2kCoreProviderImpl) PROVIDER).removeManager(this); synchronized (lock) { for (Cache c : cacheNames.values()) { log.warn("unable to close cache: " + c.getName()); } } eventuallyThrowException(_suppressedExceptions); cacheNames = null; }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[call[.isDefaultManager, parameter[]], &&, binary_operation[call[.getClass, parameter[]], ==, member[.classLoader]]]] begin[{] call[log.info, parameter[literal["Closing default CacheManager"]]] else begin[{] None end[}] local_variable[type[Iterable], _caches] SYNCHRONIZED[member[.lock]] BEGIN[{] if[member[.closing]] begin[{] return[None] else begin[{] None end[}] assign[member[._caches], call[.cachesCopy, parameter[]]] assign[member[.closing], literal[true]] END[}] call[.logPhase, parameter[literal["close"]]] local_variable[type[List], _suppressedExceptions] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InternalCache, sub_type=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=_caches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Cache, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=_suppressedExceptions, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=_caches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Cache, sub_type=None))), label=None) TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=managerDestroyed, postfix_operators=[], prefix_operators=[], qualifier=lc, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=cacheManagerLifeCycleListeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=lc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CacheManagerLifeCycleListener, sub_type=None))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=_suppressedExceptions, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) Cast(expression=MemberReference(member=PROVIDER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Cache2kCoreProviderImpl, sub_type=None)) SYNCHRONIZED[member[.lock]] BEGIN[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="unable to close cache: "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), operator=+)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=cacheNames, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Cache, sub_type=None))), label=None) END[}] call[.eventuallyThrowException, parameter[member[._suppressedExceptions]]] assign[member[.cacheNames], literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isDefaultManager] operator[SEP] operator[SEP] operator[&&] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[==] identifier[classLoader] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Iterable] operator[<] identifier[Cache] operator[>] identifier[_caches] operator[SEP] Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] { Keyword[if] operator[SEP] identifier[closing] operator[SEP] { Keyword[return] operator[SEP] } identifier[_caches] operator[=] identifier[cachesCopy] operator[SEP] operator[SEP] operator[SEP] identifier[closing] operator[=] literal[boolean] operator[SEP] } identifier[logPhase] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Throwable] operator[>] identifier[_suppressedExceptions] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Throwable] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Cache] identifier[c] operator[:] identifier[_caches] operator[SEP] { operator[SEP] operator[SEP] identifier[InternalCache] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[cancelTimerJobs] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Cache] identifier[c] operator[:] identifier[_caches] operator[SEP] { Keyword[try] { identifier[c] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[_suppressedExceptions] operator[SEP] identifier[add] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } Keyword[try] { Keyword[for] operator[SEP] identifier[CacheManagerLifeCycleListener] identifier[lc] operator[:] identifier[cacheManagerLifeCycleListeners] operator[SEP] { identifier[lc] operator[SEP] identifier[managerDestroyed] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[_suppressedExceptions] operator[SEP] identifier[add] operator[SEP] identifier[t] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[Cache2kCoreProviderImpl] operator[SEP] identifier[PROVIDER] operator[SEP] operator[SEP] identifier[removeManager] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] { Keyword[for] operator[SEP] identifier[Cache] identifier[c] operator[:] identifier[cacheNames] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[c] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[eventuallyThrowException] operator[SEP] identifier[_suppressedExceptions] operator[SEP] operator[SEP] identifier[cacheNames] operator[=] Other[null] operator[SEP] }
public static void removeAtomAndConnectedElectronContainers(IChemModel chemModel, IAtom atom) { ICrystal crystal = chemModel.getCrystal(); if (crystal != null) { if (crystal.contains(atom)) { crystal.removeAtom(atom); } return; } IAtomContainerSet moleculeSet = chemModel.getMoleculeSet(); if (moleculeSet != null) { MoleculeSetManipulator.removeAtomAndConnectedElectronContainers(moleculeSet, atom); } IReactionSet reactionSet = chemModel.getReactionSet(); if (reactionSet != null) { ReactionSetManipulator.removeAtomAndConnectedElectronContainers(reactionSet, atom); } }
class class_name[name] begin[{] method[removeAtomAndConnectedElectronContainers, return_type[void], modifier[public static], parameter[chemModel, atom]] begin[{] local_variable[type[ICrystal], crystal] if[binary_operation[member[.crystal], !=, literal[null]]] begin[{] if[call[crystal.contains, parameter[member[.atom]]]] begin[{] call[crystal.removeAtom, parameter[member[.atom]]] else begin[{] None end[}] return[None] else begin[{] None end[}] local_variable[type[IAtomContainerSet], moleculeSet] if[binary_operation[member[.moleculeSet], !=, literal[null]]] begin[{] call[MoleculeSetManipulator.removeAtomAndConnectedElectronContainers, parameter[member[.moleculeSet], member[.atom]]] else begin[{] None end[}] local_variable[type[IReactionSet], reactionSet] if[binary_operation[member[.reactionSet], !=, literal[null]]] begin[{] call[ReactionSetManipulator.removeAtomAndConnectedElectronContainers, parameter[member[.reactionSet], member[.atom]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[removeAtomAndConnectedElectronContainers] operator[SEP] identifier[IChemModel] identifier[chemModel] , identifier[IAtom] identifier[atom] operator[SEP] { identifier[ICrystal] identifier[crystal] operator[=] identifier[chemModel] operator[SEP] identifier[getCrystal] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[crystal] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[crystal] operator[SEP] identifier[contains] operator[SEP] identifier[atom] operator[SEP] operator[SEP] { identifier[crystal] operator[SEP] identifier[removeAtom] operator[SEP] identifier[atom] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } identifier[IAtomContainerSet] identifier[moleculeSet] operator[=] identifier[chemModel] operator[SEP] identifier[getMoleculeSet] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[moleculeSet] operator[!=] Other[null] operator[SEP] { identifier[MoleculeSetManipulator] operator[SEP] identifier[removeAtomAndConnectedElectronContainers] operator[SEP] identifier[moleculeSet] , identifier[atom] operator[SEP] operator[SEP] } identifier[IReactionSet] identifier[reactionSet] operator[=] identifier[chemModel] operator[SEP] identifier[getReactionSet] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[reactionSet] operator[!=] Other[null] operator[SEP] { identifier[ReactionSetManipulator] operator[SEP] identifier[removeAtomAndConnectedElectronContainers] operator[SEP] identifier[reactionSet] , identifier[atom] operator[SEP] operator[SEP] } }
public static boolean checkProperties( Map<String, String> postProp, String url, String method, String oauth_consumer_key, String oauth_consumer_secret) { OAuthMessage oam = new OAuthMessage(method, url, postProp.entrySet()); OAuthConsumer cons = new OAuthConsumer("about:blank", oauth_consumer_key, oauth_consumer_secret, null); OAuthValidator oav = new SimpleOAuthValidator(); OAuthAccessor acc = new OAuthAccessor(cons); String base_string = null; try { base_string = OAuthSignatureMethod.getBaseString(oam); } catch (Exception e) { M_log.warning(e.getLocalizedMessage()); base_string = null; return false; } try { oav.validateMessage(oam, acc); } catch (Exception e) { M_log.warning("Provider failed to validate message"); M_log.warning(e.getLocalizedMessage()); if (base_string != null) { M_log.warning(base_string); } return false; } return true; }
class class_name[name] begin[{] method[checkProperties, return_type[type[boolean]], modifier[public static], parameter[postProp, url, method, oauth_consumer_key, oauth_consumer_secret]] begin[{] local_variable[type[OAuthMessage], oam] local_variable[type[OAuthConsumer], cons] local_variable[type[OAuthValidator], oav] local_variable[type[OAuthAccessor], acc] local_variable[type[String], base_string] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=base_string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=oam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBaseString, postfix_operators=[], prefix_operators=[], qualifier=OAuthSignatureMethod, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=warning, postfix_operators=[], prefix_operators=[], qualifier=M_log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=base_string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=oam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=acc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=validateMessage, postfix_operators=[], prefix_operators=[], qualifier=oav, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Provider failed to validate message")], member=warning, postfix_operators=[], prefix_operators=[], qualifier=M_log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalizedMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=warning, postfix_operators=[], prefix_operators=[], qualifier=M_log, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=base_string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=base_string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warning, postfix_operators=[], prefix_operators=[], qualifier=M_log, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[checkProperties] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[postProp] , identifier[String] identifier[url] , identifier[String] identifier[method] , identifier[String] identifier[oauth_consumer_key] , identifier[String] identifier[oauth_consumer_secret] operator[SEP] { identifier[OAuthMessage] identifier[oam] operator[=] Keyword[new] identifier[OAuthMessage] operator[SEP] identifier[method] , identifier[url] , identifier[postProp] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[OAuthConsumer] identifier[cons] operator[=] Keyword[new] identifier[OAuthConsumer] operator[SEP] literal[String] , identifier[oauth_consumer_key] , identifier[oauth_consumer_secret] , Other[null] operator[SEP] operator[SEP] identifier[OAuthValidator] identifier[oav] operator[=] Keyword[new] identifier[SimpleOAuthValidator] operator[SEP] operator[SEP] operator[SEP] identifier[OAuthAccessor] identifier[acc] operator[=] Keyword[new] identifier[OAuthAccessor] operator[SEP] identifier[cons] operator[SEP] operator[SEP] identifier[String] identifier[base_string] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[base_string] operator[=] identifier[OAuthSignatureMethod] operator[SEP] identifier[getBaseString] operator[SEP] identifier[oam] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[M_log] operator[SEP] identifier[warning] operator[SEP] identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[base_string] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[try] { identifier[oav] operator[SEP] identifier[validateMessage] operator[SEP] identifier[oam] , identifier[acc] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[M_log] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[M_log] operator[SEP] identifier[warning] operator[SEP] identifier[e] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[base_string] operator[!=] Other[null] operator[SEP] { identifier[M_log] operator[SEP] identifier[warning] operator[SEP] identifier[base_string] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public String makeCaptureQueryUrl(String url) { WaybackRequest newWBR = wbRequest.clone(); newWBR.setCaptureQueryRequest(); newWBR.setRequestUrl(url); return newWBR.getAccessPoint().getQueryPrefix() + "query?" + newWBR.getQueryArguments(1); }
class class_name[name] begin[{] method[makeCaptureQueryUrl, return_type[type[String]], modifier[public], parameter[url]] begin[{] local_variable[type[WaybackRequest], newWBR] call[newWBR.setCaptureQueryRequest, parameter[]] call[newWBR.setRequestUrl, parameter[member[.url]]] return[binary_operation[binary_operation[call[newWBR.getAccessPoint, parameter[]], +, literal["query?"]], +, call[newWBR.getQueryArguments, parameter[literal[1]]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[makeCaptureQueryUrl] operator[SEP] identifier[String] identifier[url] operator[SEP] { identifier[WaybackRequest] identifier[newWBR] operator[=] identifier[wbRequest] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] identifier[newWBR] operator[SEP] identifier[setCaptureQueryRequest] operator[SEP] operator[SEP] operator[SEP] identifier[newWBR] operator[SEP] identifier[setRequestUrl] operator[SEP] identifier[url] operator[SEP] operator[SEP] Keyword[return] identifier[newWBR] operator[SEP] identifier[getAccessPoint] operator[SEP] operator[SEP] operator[SEP] identifier[getQueryPrefix] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[newWBR] operator[SEP] identifier[getQueryArguments] operator[SEP] Other[1] operator[SEP] operator[SEP] }
public static void generateExplorerTypesXml( Element startNode, List<CmsExplorerTypeSettings> explorerTypes, boolean module) { // we need the default access node later to check if the explorer type is an individual setting CmsExplorerTypeAccess defaultAccess = null; if (OpenCms.getWorkplaceManager() != null) { defaultAccess = OpenCms.getWorkplaceManager().getDefaultAccess(); } // get the menu rule translator to eliminate eventual legacy menu rules Iterator<CmsExplorerTypeSettings> i = explorerTypes.iterator(); while (i.hasNext()) { // create an explorer type node CmsExplorerTypeSettings settings = i.next(); if (settings.isAddititionalModuleExplorerType() == module) { Element explorerTypeElement = startNode.addElement(N_EXPLORERTYPE); explorerTypeElement.addAttribute(A_NAME, settings.getName()); explorerTypeElement.addAttribute(A_KEY, settings.getKey()); String originalIcon = settings.getOriginalIcon(); if (CmsStringUtil.isNotEmpty(originalIcon)) { explorerTypeElement.addAttribute(A_ICON, settings.getOriginalIcon()); } if (CmsStringUtil.isNotEmpty(settings.getBigIcon())) { explorerTypeElement.addAttribute(A_BIGICON, settings.getBigIcon()); } if (CmsStringUtil.isNotEmpty(settings.getSmallIconStyle())) { explorerTypeElement.addAttribute(A_SMALLICONSTYLE, settings.getSmallIconStyle()); } if (CmsStringUtil.isNotEmpty(settings.getBigIconStyle())) { explorerTypeElement.addAttribute(A_BIGICONSTYLE, settings.getBigIconStyle()); } if (settings.getReference() != null) { explorerTypeElement.addAttribute(A_REFERENCE, settings.getReference()); } if (settings.getElementView() != null) { explorerTypeElement.addAttribute(A_ELEMENTVIEW, settings.getElementView()); } if (settings.isView()) { explorerTypeElement.addAttribute(A_ISVIEW, "true"); } if (settings.getNamePattern() != null) { explorerTypeElement.addAttribute(A_NAME_PATTERN, settings.getNamePattern()); } if (settings.getViewOrder(false) != null) { explorerTypeElement.addAttribute(A_VIEW_ORDER, "" + settings.getViewOrder(false)); } // create subnode <newresource> Element newResElement = explorerTypeElement.addElement(N_NEWRESOURCE); newResElement.addAttribute(A_CREATABLE, String.valueOf(settings.isCreatable())); newResElement.addAttribute(A_ORDER, settings.getNewResourceOrder()); newResElement.addAttribute(A_AUTOSETNAVIGATION, String.valueOf(settings.isAutoSetNavigation())); newResElement.addAttribute(A_AUTOSETTITLE, String.valueOf(settings.isAutoSetTitle())); newResElement.addAttribute(A_INFO, settings.getInfo()); newResElement.addAttribute(A_KEY, settings.getTitleKey()); // create subnode <accesscontrol> CmsExplorerTypeAccess access = settings.getAccess(); if (access != defaultAccess) { // don't output the node if this is in fact the default access settings List<String> accessEntries = new ArrayList<String>(access.getAccessEntries().keySet()); // sort accessEntries Collections.sort(accessEntries); if (accessEntries.size() > 0) { Element accessControlElement = explorerTypeElement.addElement(N_ACCESSCONTROL); Iterator<String> k = accessEntries.iterator(); while (k.hasNext()) { String key = k.next(); String value = settings.getAccess().getAccessEntries().get(key); Element accessEntryElement = accessControlElement.addElement(N_ACCESSENTRY); accessEntryElement.addAttribute(A_PRINCIPAL, key); accessEntryElement.addAttribute(A_PERMISSIONS, value); } } } // create subnode <editoptions> if (settings.hasEditOptions()) { Element editOptionsElement = explorerTypeElement.addElement(N_EDITOPTIONS); Element defaultPropertiesElement = editOptionsElement.addElement(N_DEFAULTPROPERTIES); defaultPropertiesElement.addAttribute(A_ENABLED, String.valueOf(settings.isPropertiesEnabled())); defaultPropertiesElement.addAttribute( A_SHOWNAVIGATION, String.valueOf(settings.isShowNavigation())); Iterator<String> m = settings.getProperties().iterator(); while (m.hasNext()) { defaultPropertiesElement.addElement(N_DEFAULTPROPERTY).addAttribute(A_NAME, m.next()); } } Map<String, CmsIconRule> iconRules = settings.getIconRules(); if ((iconRules != null) && !iconRules.isEmpty()) { Element iconRulesElem = explorerTypeElement.addElement(N_ICONRULES); for (Map.Entry<String, CmsIconRule> entry : iconRules.entrySet()) { CmsIconRule rule = entry.getValue(); Element ruleElem = iconRulesElem.addElement(N_ICONRULE); String icon = rule.getIcon(); String bigIcon = rule.getBigIcon(); String extension = rule.getExtension(); ruleElem.addAttribute(A_EXTENSION, extension); if (icon != null) { ruleElem.addAttribute(A_ICON, icon); } if (bigIcon != null) { ruleElem.addAttribute(A_BIGICON, bigIcon); } if (rule.getSmallIconStyle() != null) { ruleElem.addAttribute(A_SMALLICONSTYLE, rule.getSmallIconStyle()); } if (rule.getBigIconStyle() != null) { ruleElem.addAttribute(A_BIGICONSTYLE, rule.getBigIconStyle()); } } } } } }
class class_name[name] begin[{] method[generateExplorerTypesXml, return_type[void], modifier[public static], parameter[startNode, explorerTypes, module]] begin[{] local_variable[type[CmsExplorerTypeAccess], defaultAccess] if[binary_operation[call[OpenCms.getWorkplaceManager, parameter[]], !=, literal[null]]] begin[{] assign[member[.defaultAccess], call[OpenCms.getWorkplaceManager, parameter[]]] else begin[{] None end[}] local_variable[type[Iterator], i] while[call[i.hasNext, parameter[]]] begin[{] local_variable[type[CmsExplorerTypeSettings], settings] if[binary_operation[call[settings.isAddititionalModuleExplorerType, parameter[]], ==, member[.module]]] begin[{] local_variable[type[Element], explorerTypeElement] call[explorerTypeElement.addAttribute, parameter[member[.A_NAME], call[settings.getName, parameter[]]]] call[explorerTypeElement.addAttribute, parameter[member[.A_KEY], call[settings.getKey, parameter[]]]] local_variable[type[String], originalIcon] if[call[CmsStringUtil.isNotEmpty, parameter[member[.originalIcon]]]] begin[{] call[explorerTypeElement.addAttribute, parameter[member[.A_ICON], call[settings.getOriginalIcon, parameter[]]]] else begin[{] None end[}] if[call[CmsStringUtil.isNotEmpty, parameter[call[settings.getBigIcon, parameter[]]]]] begin[{] call[explorerTypeElement.addAttribute, parameter[member[.A_BIGICON], call[settings.getBigIcon, parameter[]]]] else begin[{] None end[}] if[call[CmsStringUtil.isNotEmpty, parameter[call[settings.getSmallIconStyle, parameter[]]]]] begin[{] call[explorerTypeElement.addAttribute, parameter[member[.A_SMALLICONSTYLE], call[settings.getSmallIconStyle, parameter[]]]] else begin[{] None end[}] if[call[CmsStringUtil.isNotEmpty, parameter[call[settings.getBigIconStyle, parameter[]]]]] begin[{] call[explorerTypeElement.addAttribute, parameter[member[.A_BIGICONSTYLE], call[settings.getBigIconStyle, parameter[]]]] else begin[{] None end[}] if[binary_operation[call[settings.getReference, parameter[]], !=, literal[null]]] begin[{] call[explorerTypeElement.addAttribute, parameter[member[.A_REFERENCE], call[settings.getReference, parameter[]]]] else begin[{] None end[}] if[binary_operation[call[settings.getElementView, parameter[]], !=, literal[null]]] begin[{] call[explorerTypeElement.addAttribute, parameter[member[.A_ELEMENTVIEW], call[settings.getElementView, parameter[]]]] else begin[{] None end[}] if[call[settings.isView, parameter[]]] begin[{] call[explorerTypeElement.addAttribute, parameter[member[.A_ISVIEW], literal["true"]]] else begin[{] None end[}] if[binary_operation[call[settings.getNamePattern, parameter[]], !=, literal[null]]] begin[{] call[explorerTypeElement.addAttribute, parameter[member[.A_NAME_PATTERN], call[settings.getNamePattern, parameter[]]]] else begin[{] None end[}] if[binary_operation[call[settings.getViewOrder, parameter[literal[false]]], !=, literal[null]]] begin[{] call[explorerTypeElement.addAttribute, parameter[member[.A_VIEW_ORDER], binary_operation[literal[""], +, call[settings.getViewOrder, parameter[literal[false]]]]]] else begin[{] None end[}] local_variable[type[Element], newResElement] call[newResElement.addAttribute, parameter[member[.A_CREATABLE], call[String.valueOf, parameter[call[settings.isCreatable, parameter[]]]]]] call[newResElement.addAttribute, parameter[member[.A_ORDER], call[settings.getNewResourceOrder, parameter[]]]] call[newResElement.addAttribute, parameter[member[.A_AUTOSETNAVIGATION], call[String.valueOf, parameter[call[settings.isAutoSetNavigation, parameter[]]]]]] call[newResElement.addAttribute, parameter[member[.A_AUTOSETTITLE], call[String.valueOf, parameter[call[settings.isAutoSetTitle, parameter[]]]]]] call[newResElement.addAttribute, parameter[member[.A_INFO], call[settings.getInfo, parameter[]]]] call[newResElement.addAttribute, parameter[member[.A_KEY], call[settings.getTitleKey, parameter[]]]] local_variable[type[CmsExplorerTypeAccess], access] if[binary_operation[member[.access], !=, member[.defaultAccess]]] begin[{] local_variable[type[List], accessEntries] call[Collections.sort, parameter[member[.accessEntries]]] if[binary_operation[call[accessEntries.size, parameter[]], >, literal[0]]] begin[{] local_variable[type[Element], accessControlElement] local_variable[type[Iterator], k] while[call[k.hasNext, parameter[]]] begin[{] local_variable[type[String], key] local_variable[type[String], value] local_variable[type[Element], accessEntryElement] call[accessEntryElement.addAttribute, parameter[member[.A_PRINCIPAL], member[.key]]] call[accessEntryElement.addAttribute, parameter[member[.A_PERMISSIONS], member[.value]]] end[}] else begin[{] None end[}] else begin[{] None end[}] if[call[settings.hasEditOptions, parameter[]]] begin[{] local_variable[type[Element], editOptionsElement] local_variable[type[Element], defaultPropertiesElement] call[defaultPropertiesElement.addAttribute, parameter[member[.A_ENABLED], call[String.valueOf, parameter[call[settings.isPropertiesEnabled, parameter[]]]]]] call[defaultPropertiesElement.addAttribute, parameter[member[.A_SHOWNAVIGATION], call[String.valueOf, parameter[call[settings.isShowNavigation, parameter[]]]]]] local_variable[type[Iterator], m] while[call[m.hasNext, parameter[]]] begin[{] call[defaultPropertiesElement.addElement, parameter[member[.N_DEFAULTPROPERTY]]] end[}] else begin[{] None end[}] local_variable[type[Map], iconRules] if[binary_operation[binary_operation[member[.iconRules], !=, literal[null]], &&, call[iconRules.isEmpty, parameter[]]]] begin[{] local_variable[type[Element], iconRulesElem] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), name=rule)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsIconRule, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=N_ICONRULE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addElement, postfix_operators=[], prefix_operators=[], qualifier=iconRulesElem, selectors=[], type_arguments=None), name=ruleElem)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getIcon, postfix_operators=[], prefix_operators=[], qualifier=rule, selectors=[], type_arguments=None), name=icon)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getBigIcon, postfix_operators=[], prefix_operators=[], qualifier=rule, selectors=[], type_arguments=None), name=bigIcon)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getExtension, postfix_operators=[], prefix_operators=[], qualifier=rule, selectors=[], type_arguments=None), name=extension)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=A_EXTENSION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=extension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAttribute, postfix_operators=[], prefix_operators=[], qualifier=ruleElem, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=icon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=A_ICON, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=icon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAttribute, postfix_operators=[], prefix_operators=[], qualifier=ruleElem, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=bigIcon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=A_BIGICON, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bigIcon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addAttribute, postfix_operators=[], prefix_operators=[], qualifier=ruleElem, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getSmallIconStyle, postfix_operators=[], prefix_operators=[], qualifier=rule, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=A_SMALLICONSTYLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getSmallIconStyle, postfix_operators=[], prefix_operators=[], qualifier=rule, selectors=[], type_arguments=None)], member=addAttribute, postfix_operators=[], prefix_operators=[], qualifier=ruleElem, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getBigIconStyle, postfix_operators=[], prefix_operators=[], qualifier=rule, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=A_BIGICONSTYLE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getBigIconStyle, postfix_operators=[], prefix_operators=[], qualifier=rule, selectors=[], type_arguments=None)], member=addAttribute, postfix_operators=[], prefix_operators=[], qualifier=ruleElem, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=iconRules, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), 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=CmsIconRule, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) else begin[{] None end[}] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[generateExplorerTypesXml] operator[SEP] identifier[Element] identifier[startNode] , identifier[List] operator[<] identifier[CmsExplorerTypeSettings] operator[>] identifier[explorerTypes] , Keyword[boolean] identifier[module] operator[SEP] { identifier[CmsExplorerTypeAccess] identifier[defaultAccess] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[OpenCms] operator[SEP] identifier[getWorkplaceManager] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[defaultAccess] operator[=] identifier[OpenCms] operator[SEP] identifier[getWorkplaceManager] operator[SEP] operator[SEP] operator[SEP] identifier[getDefaultAccess] operator[SEP] operator[SEP] operator[SEP] } identifier[Iterator] operator[<] identifier[CmsExplorerTypeSettings] operator[>] identifier[i] operator[=] identifier[explorerTypes] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsExplorerTypeSettings] identifier[settings] operator[=] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[settings] operator[SEP] identifier[isAddititionalModuleExplorerType] operator[SEP] operator[SEP] operator[==] identifier[module] operator[SEP] { identifier[Element] identifier[explorerTypeElement] operator[=] identifier[startNode] operator[SEP] identifier[addElement] operator[SEP] identifier[N_EXPLORERTYPE] operator[SEP] operator[SEP] identifier[explorerTypeElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_NAME] , identifier[settings] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[explorerTypeElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_KEY] , identifier[settings] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[originalIcon] operator[=] identifier[settings] operator[SEP] identifier[getOriginalIcon] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[originalIcon] operator[SEP] operator[SEP] { identifier[explorerTypeElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_ICON] , identifier[settings] operator[SEP] identifier[getOriginalIcon] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[settings] operator[SEP] identifier[getBigIcon] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[explorerTypeElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_BIGICON] , identifier[settings] operator[SEP] identifier[getBigIcon] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[settings] operator[SEP] identifier[getSmallIconStyle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[explorerTypeElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_SMALLICONSTYLE] , identifier[settings] operator[SEP] identifier[getSmallIconStyle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[CmsStringUtil] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[settings] operator[SEP] identifier[getBigIconStyle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[explorerTypeElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_BIGICONSTYLE] , identifier[settings] operator[SEP] identifier[getBigIconStyle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[settings] operator[SEP] identifier[getReference] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[explorerTypeElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_REFERENCE] , identifier[settings] operator[SEP] identifier[getReference] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[settings] operator[SEP] identifier[getElementView] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[explorerTypeElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_ELEMENTVIEW] , identifier[settings] operator[SEP] identifier[getElementView] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[settings] operator[SEP] identifier[isView] operator[SEP] operator[SEP] operator[SEP] { identifier[explorerTypeElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_ISVIEW] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[settings] operator[SEP] identifier[getNamePattern] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[explorerTypeElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_NAME_PATTERN] , identifier[settings] operator[SEP] identifier[getNamePattern] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[settings] operator[SEP] identifier[getViewOrder] operator[SEP] literal[boolean] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[explorerTypeElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_VIEW_ORDER] , literal[String] operator[+] identifier[settings] operator[SEP] identifier[getViewOrder] operator[SEP] literal[boolean] operator[SEP] operator[SEP] operator[SEP] } identifier[Element] identifier[newResElement] operator[=] identifier[explorerTypeElement] operator[SEP] identifier[addElement] operator[SEP] identifier[N_NEWRESOURCE] operator[SEP] operator[SEP] identifier[newResElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_CREATABLE] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[settings] operator[SEP] identifier[isCreatable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newResElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_ORDER] , identifier[settings] operator[SEP] identifier[getNewResourceOrder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newResElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_AUTOSETNAVIGATION] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[settings] operator[SEP] identifier[isAutoSetNavigation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newResElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_AUTOSETTITLE] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[settings] operator[SEP] identifier[isAutoSetTitle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newResElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_INFO] , identifier[settings] operator[SEP] identifier[getInfo] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[newResElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_KEY] , identifier[settings] operator[SEP] identifier[getTitleKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[CmsExplorerTypeAccess] identifier[access] operator[=] identifier[settings] operator[SEP] identifier[getAccess] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[access] operator[!=] identifier[defaultAccess] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[accessEntries] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[access] operator[SEP] identifier[getAccessEntries] operator[SEP] operator[SEP] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[accessEntries] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[accessEntries] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[Element] identifier[accessControlElement] operator[=] identifier[explorerTypeElement] operator[SEP] identifier[addElement] operator[SEP] identifier[N_ACCESSCONTROL] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[k] operator[=] identifier[accessEntries] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[k] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[key] operator[=] identifier[k] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[value] operator[=] identifier[settings] operator[SEP] identifier[getAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getAccessEntries] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[Element] identifier[accessEntryElement] operator[=] identifier[accessControlElement] operator[SEP] identifier[addElement] operator[SEP] identifier[N_ACCESSENTRY] operator[SEP] operator[SEP] identifier[accessEntryElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_PRINCIPAL] , identifier[key] operator[SEP] operator[SEP] identifier[accessEntryElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_PERMISSIONS] , identifier[value] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[settings] operator[SEP] identifier[hasEditOptions] operator[SEP] operator[SEP] operator[SEP] { identifier[Element] identifier[editOptionsElement] operator[=] identifier[explorerTypeElement] operator[SEP] identifier[addElement] operator[SEP] identifier[N_EDITOPTIONS] operator[SEP] operator[SEP] identifier[Element] identifier[defaultPropertiesElement] operator[=] identifier[editOptionsElement] operator[SEP] identifier[addElement] operator[SEP] identifier[N_DEFAULTPROPERTIES] operator[SEP] operator[SEP] identifier[defaultPropertiesElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_ENABLED] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[settings] operator[SEP] identifier[isPropertiesEnabled] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[defaultPropertiesElement] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_SHOWNAVIGATION] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[settings] operator[SEP] identifier[isShowNavigation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[String] operator[>] identifier[m] operator[=] identifier[settings] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[m] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[defaultPropertiesElement] operator[SEP] identifier[addElement] operator[SEP] identifier[N_DEFAULTPROPERTY] operator[SEP] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_NAME] , identifier[m] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[Map] operator[<] identifier[String] , identifier[CmsIconRule] operator[>] identifier[iconRules] operator[=] identifier[settings] operator[SEP] identifier[getIconRules] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[iconRules] operator[!=] Other[null] operator[SEP] operator[&&] operator[!] identifier[iconRules] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Element] identifier[iconRulesElem] operator[=] identifier[explorerTypeElement] operator[SEP] identifier[addElement] operator[SEP] identifier[N_ICONRULES] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[CmsIconRule] operator[>] identifier[entry] operator[:] identifier[iconRules] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsIconRule] identifier[rule] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[Element] identifier[ruleElem] operator[=] identifier[iconRulesElem] operator[SEP] identifier[addElement] operator[SEP] identifier[N_ICONRULE] operator[SEP] operator[SEP] identifier[String] identifier[icon] operator[=] identifier[rule] operator[SEP] identifier[getIcon] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[bigIcon] operator[=] identifier[rule] operator[SEP] identifier[getBigIcon] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[extension] operator[=] identifier[rule] operator[SEP] identifier[getExtension] operator[SEP] operator[SEP] operator[SEP] identifier[ruleElem] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_EXTENSION] , identifier[extension] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[icon] operator[!=] Other[null] operator[SEP] { identifier[ruleElem] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_ICON] , identifier[icon] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[bigIcon] operator[!=] Other[null] operator[SEP] { identifier[ruleElem] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_BIGICON] , identifier[bigIcon] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[rule] operator[SEP] identifier[getSmallIconStyle] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[ruleElem] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_SMALLICONSTYLE] , identifier[rule] operator[SEP] identifier[getSmallIconStyle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[rule] operator[SEP] identifier[getBigIconStyle] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[ruleElem] operator[SEP] identifier[addAttribute] operator[SEP] identifier[A_BIGICONSTYLE] , identifier[rule] operator[SEP] identifier[getBigIconStyle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } } }
public double magnitude() { if (magnitude < 0) { double m = 0; for (double d : vector) m += d * d; magnitude = Math.sqrt(m); } return magnitude; }
class class_name[name] begin[{] method[magnitude, return_type[type[double]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.magnitude], <, literal[0]]] begin[{] local_variable[type[double], m] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)), label=None), control=EnhancedForControl(iterable=MemberReference(member=vector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=d)], modifiers=set(), type=BasicType(dimensions=[], name=double))), label=None) assign[member[.magnitude], call[Math.sqrt, parameter[member[.m]]]] else begin[{] None end[}] return[member[.magnitude]] end[}] END[}]
Keyword[public] Keyword[double] identifier[magnitude] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[magnitude] operator[<] Other[0] operator[SEP] { Keyword[double] identifier[m] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[double] identifier[d] operator[:] identifier[vector] operator[SEP] identifier[m] operator[+=] identifier[d] operator[*] identifier[d] operator[SEP] identifier[magnitude] operator[=] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] identifier[m] operator[SEP] operator[SEP] } Keyword[return] identifier[magnitude] operator[SEP] }
@Override public void createInputHandlersForPtoP() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createInputHandlersForPtoP", this); //Create a point to point input handler _baseDestinationHandler. setInputHandler(new PtoPInputHandler(_baseDestinationHandler, _remoteSupport.getTargetProtocolItemStream())); //TODO is this a good idea? //We don't yet know what type of InputHandler to create if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "createInputHandlersForPtoP"); }
class class_name[name] begin[{] method[createInputHandlersForPtoP, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["createInputHandlersForPtoP"], THIS[]]] else begin[{] None end[}] call[_baseDestinationHandler.setInputHandler, parameter[ClassCreator(arguments=[MemberReference(member=_baseDestinationHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getTargetProtocolItemStream, postfix_operators=[], prefix_operators=[], qualifier=_remoteSupport, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PtoPInputHandler, sub_type=None))]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["createInputHandlersForPtoP"]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[createInputHandlersForPtoP] 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[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[_baseDestinationHandler] operator[SEP] identifier[setInputHandler] operator[SEP] Keyword[new] identifier[PtoPInputHandler] operator[SEP] identifier[_baseDestinationHandler] , identifier[_remoteSupport] operator[SEP] identifier[getTargetProtocolItemStream] operator[SEP] operator[SEP] 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] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public final T first(T defaultValue) { if (this instanceof Callable) { return checkedCall((Callable<T>) this); } Iterator<T> it = iterator(); if (it.hasNext()) { return it.next(); } return defaultValue; }
class class_name[name] begin[{] method[first, return_type[type[T]], modifier[final public], parameter[defaultValue]] begin[{] if[binary_operation[THIS[], instanceof, type[Callable]]] begin[{] return[call[.checkedCall, parameter[Cast(expression=This(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=[], name=Callable, sub_type=None))]]] else begin[{] None end[}] local_variable[type[Iterator], it] if[call[it.hasNext, parameter[]]] begin[{] return[call[it.next, parameter[]]] else begin[{] None end[}] return[member[.defaultValue]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[T] identifier[first] operator[SEP] identifier[T] identifier[defaultValue] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] Keyword[instanceof] identifier[Callable] operator[SEP] { Keyword[return] identifier[checkedCall] operator[SEP] operator[SEP] identifier[Callable] operator[<] identifier[T] operator[>] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } identifier[Iterator] operator[<] identifier[T] operator[>] identifier[it] operator[=] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[defaultValue] operator[SEP] }
public static String lowCaseFirst(String s) { if (s == null || s.length() == 0) return (s); return (Character.toLowerCase(s.charAt(0)) + s.substring(1)); }
class class_name[name] begin[{] method[lowCaseFirst, return_type[type[String]], modifier[public static], parameter[s]] begin[{] if[binary_operation[binary_operation[member[.s], ==, literal[null]], ||, binary_operation[call[s.length, parameter[]], ==, literal[0]]]] begin[{] return[member[.s]] else begin[{] None end[}] return[binary_operation[call[Character.toLowerCase, parameter[call[s.charAt, parameter[literal[0]]]]], +, call[s.substring, parameter[literal[1]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[lowCaseFirst] operator[SEP] identifier[String] identifier[s] operator[SEP] { Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[||] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[Character] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[s] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[+] identifier[s] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] }
public static <T> EventStream<ListModification<? extends T>> simpleChangesOf(ObservableList<T> list) { return new EventStreamBase<ListModification<? extends T>>() { @Override protected Subscription observeInputs() { return LiveList.observeChanges(list, c -> { for(ListModification<? extends T> mod: c) { emit(mod); } }); } }; }
class class_name[name] begin[{] method[simpleChangesOf, return_type[type[EventStream]], modifier[public static], parameter[list]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), LambdaExpression(body=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=emit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=mod)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=ListModification, sub_type=None))), label=None)], parameters=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=observeChanges, postfix_operators=[], prefix_operators=[], qualifier=LiveList, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'protected'}, name=observeInputs, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Subscription, 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=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=ListModification, sub_type=None))], dimensions=None, name=EventStreamBase, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[EventStream] operator[<] identifier[ListModification] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] operator[>] identifier[simpleChangesOf] operator[SEP] identifier[ObservableList] operator[<] identifier[T] operator[>] identifier[list] operator[SEP] { Keyword[return] Keyword[new] identifier[EventStreamBase] operator[<] identifier[ListModification] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[protected] identifier[Subscription] identifier[observeInputs] operator[SEP] operator[SEP] { Keyword[return] identifier[LiveList] operator[SEP] identifier[observeChanges] operator[SEP] identifier[list] , identifier[c] operator[->] { Keyword[for] operator[SEP] identifier[ListModification] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[mod] operator[:] identifier[c] operator[SEP] { identifier[emit] operator[SEP] identifier[mod] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } } operator[SEP] }
private static ConcurrentMap<Locale, Strategy> getCache(final int field) { synchronized (caches) { if (caches[field] == null) { caches[field] = new ConcurrentHashMap<>(3); } return caches[field]; } }
class class_name[name] begin[{] method[getCache, return_type[type[ConcurrentMap]], modifier[private static], parameter[field]] begin[{] SYNCHRONIZED[member[.caches]] BEGIN[{] if[binary_operation[member[.caches], ==, literal[null]]] begin[{] assign[member[.caches], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ConcurrentHashMap, sub_type=None))] else begin[{] None end[}] return[member[.caches]] END[}] end[}] END[}]
Keyword[private] Keyword[static] identifier[ConcurrentMap] operator[<] identifier[Locale] , identifier[Strategy] operator[>] identifier[getCache] operator[SEP] Keyword[final] Keyword[int] identifier[field] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[caches] operator[SEP] { Keyword[if] operator[SEP] identifier[caches] operator[SEP] identifier[field] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[caches] operator[SEP] identifier[field] operator[SEP] operator[=] Keyword[new] identifier[ConcurrentHashMap] operator[<] operator[>] operator[SEP] Other[3] operator[SEP] operator[SEP] } Keyword[return] identifier[caches] operator[SEP] identifier[field] operator[SEP] operator[SEP] } }
private Recycler<ZipFileSliceReader, RuntimeException> newZipFileSliceReaderRecycler() { return new Recycler<ZipFileSliceReader, RuntimeException>() { /* (non-Javadoc) * @see nonapi.io.github.classgraph.concurrency.LazyReference#newInstance() */ @Override public ZipFileSliceReader newInstance() throws RuntimeException { return new ZipFileSliceReader(ZipFileSlice.this); } }; }
class class_name[name] begin[{] method[newZipFileSliceReaderRecycler, return_type[type[Recycler]], modifier[private], parameter[]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=ZipFileSlice, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ZipFileSliceReader, sub_type=None)), label=None)], documentation=None, modifiers={'public'}, name=newInstance, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=ZipFileSliceReader, sub_type=None), throws=['RuntimeException'], 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=ZipFileSliceReader, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=RuntimeException, sub_type=None))], dimensions=None, name=Recycler, sub_type=None))] end[}] END[}]
Keyword[private] identifier[Recycler] operator[<] identifier[ZipFileSliceReader] , identifier[RuntimeException] operator[>] identifier[newZipFileSliceReaderRecycler] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[Recycler] operator[<] identifier[ZipFileSliceReader] , identifier[RuntimeException] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[ZipFileSliceReader] identifier[newInstance] operator[SEP] operator[SEP] Keyword[throws] identifier[RuntimeException] { Keyword[return] Keyword[new] identifier[ZipFileSliceReader] operator[SEP] identifier[ZipFileSlice] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } } operator[SEP] }
public FunctionConfigurationEnvironment withResourceAccessPolicies(ResourceAccessPolicy... resourceAccessPolicies) { if (this.resourceAccessPolicies == null) { setResourceAccessPolicies(new java.util.ArrayList<ResourceAccessPolicy>(resourceAccessPolicies.length)); } for (ResourceAccessPolicy ele : resourceAccessPolicies) { this.resourceAccessPolicies.add(ele); } return this; }
class class_name[name] begin[{] method[withResourceAccessPolicies, return_type[type[FunctionConfigurationEnvironment]], modifier[public], parameter[resourceAccessPolicies]] begin[{] if[binary_operation[THIS[member[None.resourceAccessPolicies]], ==, literal[null]]] begin[{] call[.setResourceAccessPolicies, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=resourceAccessPolicies, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ResourceAccessPolicy, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=resourceAccessPolicies, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=resourceAccessPolicies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ResourceAccessPolicy, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[FunctionConfigurationEnvironment] identifier[withResourceAccessPolicies] operator[SEP] identifier[ResourceAccessPolicy] operator[...] identifier[resourceAccessPolicies] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resourceAccessPolicies] operator[==] Other[null] operator[SEP] { identifier[setResourceAccessPolicies] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[ResourceAccessPolicy] operator[>] operator[SEP] identifier[resourceAccessPolicies] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[ResourceAccessPolicy] identifier[ele] operator[:] identifier[resourceAccessPolicies] operator[SEP] { Keyword[this] operator[SEP] identifier[resourceAccessPolicies] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static void errorMessage(Exception exceptionMsg, boolean quiet) { /** * Display Jpanel Error messages any SQL Errors. Overloads * errorMessage(String e) */ Object[] options = { "OK", }; JOptionPane.showOptionDialog(null, exceptionMsg, messagerHeader, JOptionPane.DEFAULT_OPTION, JOptionPane.ERROR_MESSAGE, null, options, options[0]); if (!quiet) { exceptionMsg.printStackTrace(); } // DatabaseManagerSwing.StatusMessage(READY_STATUS); }
class class_name[name] begin[{] method[errorMessage, return_type[void], modifier[public static], parameter[exceptionMsg, quiet]] begin[{] local_variable[type[Object], options] call[JOptionPane.showOptionDialog, parameter[literal[null], member[.exceptionMsg], member[.messagerHeader], member[JOptionPane.DEFAULT_OPTION], member[JOptionPane.ERROR_MESSAGE], literal[null], member[.options], member[.options]]] if[member[.quiet]] begin[{] call[exceptionMsg.printStackTrace, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[errorMessage] operator[SEP] identifier[Exception] identifier[exceptionMsg] , Keyword[boolean] identifier[quiet] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[options] operator[=] { literal[String] , } operator[SEP] identifier[JOptionPane] operator[SEP] identifier[showOptionDialog] operator[SEP] Other[null] , identifier[exceptionMsg] , identifier[messagerHeader] , identifier[JOptionPane] operator[SEP] identifier[DEFAULT_OPTION] , identifier[JOptionPane] operator[SEP] identifier[ERROR_MESSAGE] , Other[null] , identifier[options] , identifier[options] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[quiet] operator[SEP] { identifier[exceptionMsg] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } }
public static <S extends Model> Object getAndRemovePrimaryKey(S model) { String fieldName = getPKField(model.getClass()); Object value = invokeMethod(model, getGetterName(fieldName), EMPTY_ARG); if (null != value) { invokeMethod(model, getSetterName(fieldName), NULL_ARG); } return value; }
class class_name[name] begin[{] method[getAndRemovePrimaryKey, return_type[type[Object]], modifier[public static], parameter[model]] begin[{] local_variable[type[String], fieldName] local_variable[type[Object], value] if[binary_operation[literal[null], !=, member[.value]]] begin[{] call[.invokeMethod, parameter[member[.model], call[.getSetterName, parameter[member[.fieldName]]], member[.NULL_ARG]]] else begin[{] None end[}] return[member[.value]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[S] Keyword[extends] identifier[Model] operator[>] identifier[Object] identifier[getAndRemovePrimaryKey] operator[SEP] identifier[S] identifier[model] operator[SEP] { identifier[String] identifier[fieldName] operator[=] identifier[getPKField] operator[SEP] identifier[model] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Object] identifier[value] operator[=] identifier[invokeMethod] operator[SEP] identifier[model] , identifier[getGetterName] operator[SEP] identifier[fieldName] operator[SEP] , identifier[EMPTY_ARG] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[value] operator[SEP] { identifier[invokeMethod] operator[SEP] identifier[model] , identifier[getSetterName] operator[SEP] identifier[fieldName] operator[SEP] , identifier[NULL_ARG] operator[SEP] operator[SEP] } Keyword[return] identifier[value] operator[SEP] }
public String getSqlFormatted(Map<String, String> dataMap) { StringBuilder keys = new StringBuilder(); StringBuilder values = new StringBuilder(); StringBuilder query = new StringBuilder(); for (String var : outTemplate) { if (keys.length() > 0) { keys.append(','); } if (values.length() > 0) { values.append(','); } keys.append(var); values.append(dataMap.get(var)); } return query.append(sqlStatement).append(" INTO ").append(schema).append(".") .append(tableName).append(" (").append(keys).append(") ").append("VALUES") .append(" (").append(values).append(");").toString(); }
class class_name[name] begin[{] method[getSqlFormatted, return_type[type[String]], modifier[public], parameter[dataMap]] begin[{] local_variable[type[StringBuilder], keys] local_variable[type[StringBuilder], values] local_variable[type[StringBuilder], query] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=keys, selectors=[], type_arguments=None), 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=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=',')], member=append, postfix_operators=[], prefix_operators=[], qualifier=keys, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), 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=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=',')], member=append, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=var, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=keys, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=var, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=dataMap, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=outTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=var)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[call[query.append, parameter[member[.sqlStatement]]]] end[}] END[}]
Keyword[public] identifier[String] identifier[getSqlFormatted] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[dataMap] operator[SEP] { identifier[StringBuilder] identifier[keys] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[values] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[query] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[var] operator[:] identifier[outTemplate] operator[SEP] { Keyword[if] operator[SEP] identifier[keys] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[keys] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[values] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[keys] operator[SEP] identifier[append] operator[SEP] identifier[var] operator[SEP] operator[SEP] identifier[values] operator[SEP] identifier[append] operator[SEP] identifier[dataMap] operator[SEP] identifier[get] operator[SEP] identifier[var] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[query] operator[SEP] identifier[append] operator[SEP] identifier[sqlStatement] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[schema] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[tableName] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[keys] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[values] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
private JsonEntityBean populateChildren( JsonEntityBean jsonBean, Iterator<IGroupMember> children) { while (children.hasNext()) { IGroupMember member = children.next(); // add the entity bean to the list of children JsonEntityBean jsonChild = getEntity(member); jsonBean.addChild(jsonChild); } // mark this entity bean as having had it's child list initialized jsonBean.setChildrenInitialized(true); return jsonBean; }
class class_name[name] begin[{] method[populateChildren, return_type[type[JsonEntityBean]], modifier[private], parameter[jsonBean, children]] begin[{] while[call[children.hasNext, parameter[]]] begin[{] local_variable[type[IGroupMember], member] local_variable[type[JsonEntityBean], jsonChild] call[jsonBean.addChild, parameter[member[.jsonChild]]] end[}] call[jsonBean.setChildrenInitialized, parameter[literal[true]]] return[member[.jsonBean]] end[}] END[}]
Keyword[private] identifier[JsonEntityBean] identifier[populateChildren] operator[SEP] identifier[JsonEntityBean] identifier[jsonBean] , identifier[Iterator] operator[<] identifier[IGroupMember] operator[>] identifier[children] operator[SEP] { Keyword[while] operator[SEP] identifier[children] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[IGroupMember] identifier[member] operator[=] identifier[children] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[JsonEntityBean] identifier[jsonChild] operator[=] identifier[getEntity] operator[SEP] identifier[member] operator[SEP] operator[SEP] identifier[jsonBean] operator[SEP] identifier[addChild] operator[SEP] identifier[jsonChild] operator[SEP] operator[SEP] } identifier[jsonBean] operator[SEP] identifier[setChildrenInitialized] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[jsonBean] operator[SEP] }
public static String exec(Session session, String cmd, Charset charset, OutputStream errStream) { if (null == charset) { charset = CharsetUtil.CHARSET_UTF_8; } ChannelExec channel = (ChannelExec) openChannel(session, ChannelType.EXEC); channel.setCommand(StrUtil.bytes(cmd, charset)); channel.setInputStream(null); channel.setErrStream(errStream); InputStream in = null; try { in = channel.getInputStream(); return IoUtil.read(in, CharsetUtil.CHARSET_UTF_8); } catch (IOException e) { throw new IORuntimeException(e); } finally { IoUtil.close(in); close(channel); } }
class class_name[name] begin[{] method[exec, return_type[type[String]], modifier[public static], parameter[session, cmd, charset, errStream]] begin[{] if[binary_operation[literal[null], ==, member[.charset]]] begin[{] assign[member[.charset], member[CharsetUtil.CHARSET_UTF_8]] else begin[{] None end[}] local_variable[type[ChannelExec], channel] call[channel.setCommand, parameter[call[StrUtil.bytes, parameter[member[.cmd], member[.charset]]]]] call[channel.setInputStream, parameter[literal[null]]] call[channel.setErrStream, parameter[member[.errStream]]] local_variable[type[InputStream], in] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=channel, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CHARSET_UTF_8, postfix_operators=[], prefix_operators=[], qualifier=CharsetUtil, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=IoUtil, 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=IORuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=close, postfix_operators=[], prefix_operators=[], qualifier=IoUtil, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=close, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[exec] operator[SEP] identifier[Session] identifier[session] , identifier[String] identifier[cmd] , identifier[Charset] identifier[charset] , identifier[OutputStream] identifier[errStream] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[charset] operator[SEP] { identifier[charset] operator[=] identifier[CharsetUtil] operator[SEP] identifier[CHARSET_UTF_8] operator[SEP] } identifier[ChannelExec] identifier[channel] operator[=] operator[SEP] identifier[ChannelExec] operator[SEP] identifier[openChannel] operator[SEP] identifier[session] , identifier[ChannelType] operator[SEP] identifier[EXEC] operator[SEP] operator[SEP] identifier[channel] operator[SEP] identifier[setCommand] operator[SEP] identifier[StrUtil] operator[SEP] identifier[bytes] operator[SEP] identifier[cmd] , identifier[charset] operator[SEP] operator[SEP] operator[SEP] identifier[channel] operator[SEP] identifier[setInputStream] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[channel] operator[SEP] identifier[setErrStream] operator[SEP] identifier[errStream] operator[SEP] operator[SEP] identifier[InputStream] identifier[in] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[in] operator[=] identifier[channel] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[IoUtil] operator[SEP] identifier[read] operator[SEP] identifier[in] , identifier[CharsetUtil] operator[SEP] identifier[CHARSET_UTF_8] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IORuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[IoUtil] operator[SEP] identifier[close] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[close] operator[SEP] identifier[channel] operator[SEP] operator[SEP] } }
public ServiceFuture<LoadBalancerInner> beginCreateOrUpdateAsync(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters, final ServiceCallback<LoadBalancerInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters), serviceCallback); }
class class_name[name] begin[{] method[beginCreateOrUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, loadBalancerName, parameters, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.beginCreateOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.loadBalancerName], member[.parameters]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[LoadBalancerInner] operator[>] identifier[beginCreateOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[loadBalancerName] , identifier[LoadBalancerInner] identifier[parameters] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[LoadBalancerInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[beginCreateOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[loadBalancerName] , identifier[parameters] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public final void transform(final InputStream in, String urlForBase, final PageSize size, final List hf, final Map properties, final OutputStream out) throws CConvertException { final List files = new ArrayList(); try { final Tidy tidy = this.getTidy(); final CShaniDomParser parser = this.getCShaniDomParser(); final _ITextRenderer renderer = this.getITextRenderer(); final Reader r = CXmlParser.getReader(in); final StringBuffer s = new StringBuffer(); final char[] buffer = new char[2048]; int inb = -1; while ((inb = r.read(buffer)) != -1) { s.append(buffer, 0, inb); } r.close(); ByteArrayOutputStream bout = new ByteArrayOutputStream(); tidy.parse( new ByteArrayInputStream(s.toString().getBytes("utf-8")), bout); final String result = CHtmlToPdfFlyingSaucerTransformer .removeScript(new String(bout.toByteArray(), "utf-8")); Document theDoc = parser .parse(new InputStreamReader(new ByteArrayInputStream( result.getBytes("utf-8")), "utf-8")); if (theDoc.toString().length() == 0) { theDoc = parser.parse(new StringReader( CHtmlToPdfFlyingSaucerTransformer.removeScript(s .toString()))); } this.convertInputToVisibleHTML(theDoc); this.convertComboboxToVisibleHTML(theDoc); this.convertTextAreaToVisibleHTML(theDoc); final NodeList styles = theDoc.getElementsByTagName("style"); for (int i = 0; i < styles.getLength(); i++) { final Node n = styles.item(i); final StringBuffer style = new StringBuffer(); while (n.getChildNodes().getLength() > 0) { final Node child = n.getChildNodes().item(0); if (child.getNodeType() == Node.COMMENT_NODE) { final Comment c = (Comment) child; style.append(c.getData()); } else if (child.getNodeType() == Node.TEXT_NODE) { final Text c = (Text) child; style.append(c.getData()); } else if (child.getNodeType() == Node.CDATA_SECTION_NODE) { final CDATASection c = (CDATASection) child; style.append(c.getData()); } n.removeChild(child); } final String content = style.toString().trim(); final Text start = theDoc.createTextNode("/*"); final CDATASection cd = theDoc.createCDATASection("*/\n" + content + "\n/*"); final Text end = theDoc.createTextNode("*/\n"); n.appendChild(start); n.appendChild(cd); n.appendChild(end); } final List toRemove = new ArrayList(); final NodeList tnl = theDoc.getChildNodes(); for (int i = 0; i < tnl.getLength(); i++) { final Node n = tnl.item(i); if (n != theDoc.getDocumentElement()) { toRemove.add(n); } } final Node title = theDoc.getDocumentElement() .getElementsByTagName("title").item(0); if ((title != null) && (properties.get(IHtmlToPdfTransformer.PDF_TITLE) == null)) { properties.put(IHtmlToPdfTransformer.PDF_TITLE, title .getTextContent()); } Node body = theDoc.getDocumentElement() .getElementsByTagName("body").item(0); Node head = theDoc.getDocumentElement() .getElementsByTagName("head").item(0); for (int i = 0; i < toRemove.size(); i++) { final Node n = (Node) toRemove.get(i); n.getParentNode().removeChild(n); if (n.getNodeType() == Node.TEXT_NODE) { final Text t = (Text) n; if (t.getData().trim().length() == 0) { continue; } } if ("link".equals(n.getNodeName()) || "style".equals(n.getNodeName())) { head.appendChild(n); } else { body.appendChild(n); } } final DocumentAndSize docs[] = CDocumentCut.cut(theDoc, size); for (int jj = 0; jj < docs.length; jj++) { Document mydoc = docs[jj].doc; body = mydoc.getDocumentElement().getElementsByTagName("body") .item(0); head = mydoc.getDocumentElement().getElementsByTagName("head") .item(0); try { String surlForBase = ((Element) mydoc.getElementsByTagName( "base").item(0)).getAttribute("href"); if ((surlForBase == null) || "".equals(surlForBase)) { surlForBase = null; } if (surlForBase != null) { urlForBase = surlForBase; } } catch (final Exception ignore) { } if (urlForBase != null) { ((ADocument) mydoc).setDocumentURI(urlForBase); } final NodeList nl = mydoc.getElementsByTagName("base"); if (nl.getLength() == 0) { final ADocument doc = (ADocument) mydoc; final Element base = doc.createElement("base"); base.setAttribute("href", urlForBase); if (head.getFirstChild() != null) { head.insertBefore(base, head.getFirstChild()); } // end if else { head.appendChild(base); } // end else } else { final Element base = (Element) nl.item(0); base.setAttribute("href", urlForBase); } final NodeList linknl = mydoc.getElementsByTagName("link"); for (int zi=0;zi<linknl.getLength();zi++) { try { Element e = (Element)linknl.item(zi); if ("stylesheet".equals(e.getAttribute("rel"))) { String url = normalizeLink(urlForBase, e.getAttribute("href")); InputStream iin = null; try { iin = new URL(url).openStream(); ByteArrayOutputStream bOut = new ByteArrayOutputStream(); int iNbByteRead = -1; byte bbuffer[] = new byte[16384]; while ((iNbByteRead = iin.read(bbuffer)) != -1) { bOut.write(bbuffer, 0, iNbByteRead); } // end while String document = new String(bOut.toByteArray(), "utf-8"); CSSStyleSheet sheet = CCSSParser.parse(document, null, null, url); if (sheet != null) { Element style = mydoc.createElement("style"); style.setAttribute("type", "text/css"); style.setTextContent(sheet.toString()); e.getParentNode().insertBefore(style, e); e.getParentNode().removeChild(e); } } // end try catch (final Throwable ignore) { } // end catch finally { try{iin.close();}catch(Throwable ignore){} } } } catch (Throwable ignore){} } final NumberFormat nf = NumberFormat.getInstance(Locale.US); nf.setMaximumFractionDigits(2); nf.setMinimumFractionDigits(0); final Element style = mydoc.createElement("style"); style.setAttribute("type", "text/css"); final double[] dsize = docs[jj].size.getCMSize(); final double[] dmargin = docs[jj].size.getCMMargin(); style.setTextContent("\n@page {\n" + "size: " + nf.format(dsize[0] / 2.54) + "in " + nf.format(dsize[1] / 2.54) + "in;\n" + "margin-left: " + nf.format(dmargin[0] / 2.54) + "in;\n" + "margin-right: " + nf.format(dmargin[1] / 2.54) + "in;\n" + "margin-bottom: " + nf.format(dmargin[2] / 2.54) + "in;\n" + "margin-top: " + nf.format(dmargin[3] / 2.54) + "in;\npadding: 0in;\n" + "}\n" ); head.appendChild(style); if (properties.get(IHtmlToPdfTransformer.FOP_TTF_FONT_PATH) != null) { final File dir = new File((String) properties .get(IHtmlToPdfTransformer.FOP_TTF_FONT_PATH)); if (dir.isDirectory()) { CHtmlToPdfFlyingSaucerTransformer.registerTTF(dir, renderer); } } ((ADocument) mydoc).setInputEncoding("utf-8"); ((ADocument) mydoc).setXmlEncoding("utf-8"); renderer.getSharedContext().setBaseURL(urlForBase); mydoc = parser.parse(new StringReader(mydoc.toString())); mydoc.getDomConfig().setParameter("entities", Boolean.FALSE ); mydoc.normalizeDocument(); renderer.setDocument(mydoc, urlForBase); renderer.layout(); final java.io.File f = java.io.File.createTempFile("pdf", "yahp"); files.add(f); final OutputStream fout = new BufferedOutputStream( new FileOutputStream(f)); renderer.createPDF(fout, true); fout.flush(); fout.close(); } final PageSize[] sizes = new PageSize[docs.length]; for (int i = 0; i < docs.length; i++) { sizes[i] = docs[i].size; } CDocumentReconstructor .reconstruct( files, properties, out, urlForBase, "Flying Saucer Renderer (https://xhtmlrenderer.dev.java.net/)", sizes, hf); } catch (final Throwable e) { CHtmlToPdfFlyingSaucerTransformer.log.error(e); throw new CConvertException( "ERROR: An unhandled exception occured: " + e.getMessage(), e); } finally { try { out.flush(); } catch (final Exception ignore) { } for (final Iterator it = files.iterator(); it.hasNext();) { final java.io.File f = (File) it.next(); try { f.delete(); } // end try catch (final Exception ignore) { } } // end for } }
class class_name[name] begin[{] method[transform, return_type[void], modifier[final public], parameter[in, urlForBase, size, hf, properties, out]] begin[{] local_variable[type[List], files] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getTidy, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=tidy)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Tidy, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getCShaniDomParser, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=parser)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=CShaniDomParser, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getITextRenderer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=renderer)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=_ITextRenderer, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getReader, postfix_operators=[], prefix_operators=[], qualifier=CXmlParser, selectors=[], type_arguments=None), name=r)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Reader, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=s)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2048)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=char)), name=buffer)], modifiers={'final'}, type=BasicType(dimensions=[None], name=char)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), name=inb)], modifiers=set(), type=BasicType(dimensions=[], name=int)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=inb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=inb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=r, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayOutputStream, sub_type=None)), name=bout)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayOutputStream, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="utf-8")], member=getBytes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None)), MemberReference(member=bout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=tidy, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=bout, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="utf-8")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))], member=removeScript, postfix_operators=[], prefix_operators=[], qualifier=CHtmlToPdfFlyingSaucerTransformer, selectors=[], type_arguments=None), name=result)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassCreator(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="utf-8")], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="utf-8")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamReader, sub_type=None))], member=parse, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None), name=theDoc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Document, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=theDoc, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=theDoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None)], member=removeScript, postfix_operators=[], prefix_operators=[], qualifier=CHtmlToPdfFlyingSaucerTransformer, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringReader, sub_type=None))], member=parse, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=theDoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertInputToVisibleHTML, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=theDoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertComboboxToVisibleHTML, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=theDoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertTextAreaToVisibleHTML, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="style")], member=getElementsByTagName, postfix_operators=[], prefix_operators=[], qualifier=theDoc, selectors=[], type_arguments=None), name=styles)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=NodeList, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=styles, selectors=[], type_arguments=None), name=n)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None)), name=style)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=StringBuffer, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getChildNodes, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=child)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNodeType, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None), operandr=MemberReference(member=COMMENT_NODE, postfix_operators=[], prefix_operators=[], qualifier=Node, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNodeType, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None), operandr=MemberReference(member=TEXT_NODE, postfix_operators=[], prefix_operators=[], qualifier=Node, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNodeType, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None), operandr=MemberReference(member=CDATA_SECTION_NODE, postfix_operators=[], prefix_operators=[], qualifier=Node, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CDATASection, sub_type=None)), name=c)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=CDATASection, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getData, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Text, sub_type=None)), name=c)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Text, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getData, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Comment, sub_type=None)), name=c)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Comment, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getData, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeChild, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getChildNodes, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[MethodInvocation(arguments=[], member=getLength, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=content)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/*")], member=createTextNode, postfix_operators=[], prefix_operators=[], qualifier=theDoc, selectors=[], type_arguments=None), name=start)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Text, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="*/\n"), operandr=MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n/*"), operator=+)], member=createCDATASection, postfix_operators=[], prefix_operators=[], qualifier=theDoc, selectors=[], type_arguments=None), name=cd)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=CDATASection, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="*/\n")], member=createTextNode, postfix_operators=[], prefix_operators=[], qualifier=theDoc, selectors=[], type_arguments=None), name=end)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Text, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendChild, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendChild, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendChild, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=styles, 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), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArrayList, sub_type=None)), name=toRemove)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=List, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getChildNodes, postfix_operators=[], prefix_operators=[], qualifier=theDoc, selectors=[], type_arguments=None), name=tnl)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=NodeList, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=tnl, selectors=[], type_arguments=None), name=n)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getDocumentElement, postfix_operators=[], prefix_operators=[], qualifier=theDoc, selectors=[], type_arguments=None), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=toRemove, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=tnl, 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), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDocumentElement, postfix_operators=[], prefix_operators=[], qualifier=theDoc, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="title")], member=getElementsByTagName, 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=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=title)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=title, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=PDF_TITLE, postfix_operators=[], prefix_operators=[], qualifier=IHtmlToPdfTransformer, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PDF_TITLE, postfix_operators=[], prefix_operators=[], qualifier=IHtmlToPdfTransformer, selectors=[]), MethodInvocation(arguments=[], member=getTextContent, postfix_operators=[], prefix_operators=[], qualifier=title, selectors=[], type_arguments=None)], member=put, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDocumentElement, postfix_operators=[], prefix_operators=[], qualifier=theDoc, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="body")], member=getElementsByTagName, 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=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=body)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDocumentElement, postfix_operators=[], prefix_operators=[], qualifier=theDoc, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="head")], member=getElementsByTagName, 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=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=head)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=toRemove, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), name=n)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getParentNode, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeChild, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNodeType, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[], type_arguments=None), operandr=MemberReference(member=TEXT_NODE, postfix_operators=[], prefix_operators=[], qualifier=Node, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Text, sub_type=None)), name=t)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Text, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getData, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)]))])), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNodeName, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="link"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNodeName, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="style"), operator=||), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendChild, postfix_operators=[], prefix_operators=[], qualifier=body, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendChild, postfix_operators=[], prefix_operators=[], qualifier=head, 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=toRemove, 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), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[None], initializer=MethodInvocation(arguments=[MemberReference(member=theDoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=cut, postfix_operators=[], prefix_operators=[], qualifier=CDocumentCut, selectors=[], type_arguments=None), name=docs)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=DocumentAndSize, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=docs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=jj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=doc, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), name=mydoc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Document, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=body, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getDocumentElement, postfix_operators=[], prefix_operators=[], qualifier=mydoc, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="body")], member=getElementsByTagName, 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=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=head, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getDocumentElement, postfix_operators=[], prefix_operators=[], qualifier=mydoc, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="head")], member=getElementsByTagName, 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=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="base")], member=getElementsByTagName, postfix_operators=[], prefix_operators=[], qualifier=mydoc, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=item, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), name=surlForBase)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=surlForBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=surlForBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value=""), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=surlForBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=surlForBase, 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=urlForBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=surlForBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['Exception']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=urlForBase, 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=Cast(expression=MemberReference(member=mydoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ADocument, sub_type=None)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="base")], member=getElementsByTagName, postfix_operators=[], prefix_operators=[], qualifier=mydoc, selectors=[], type_arguments=None), name=nl)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=NodeList, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=nl, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=item, postfix_operators=[], prefix_operators=[], qualifier=nl, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), name=base)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="href"), MemberReference(member=urlForBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=base, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=mydoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ADocument, sub_type=None)), name=doc)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ADocument, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="base")], member=createElement, postfix_operators=[], prefix_operators=[], qualifier=doc, selectors=[], type_arguments=None), name=base)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="href"), MemberReference(member=urlForBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=base, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getFirstChild, postfix_operators=[], prefix_operators=[], qualifier=head, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendChild, postfix_operators=[], prefix_operators=[], qualifier=head, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getFirstChild, postfix_operators=[], prefix_operators=[], qualifier=head, selectors=[], type_arguments=None)], member=insertBefore, postfix_operators=[], prefix_operators=[], qualifier=head, selectors=[], type_arguments=None), label=None)]))])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="link")], member=getElementsByTagName, postfix_operators=[], prefix_operators=[], qualifier=mydoc, selectors=[], type_arguments=None), name=linknl)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=NodeList, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=zi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=linknl, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="rel")], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="stylesheet"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=urlForBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="href")], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=normalizeLink, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=url)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=iin)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=iin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=openStream, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=URL, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayOutputStream, sub_type=None)), name=bOut)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayOutputStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), name=iNbByteRead)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[None], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16384)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=bbuffer)], modifiers=set(), type=BasicType(dimensions=[], name=byte)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bbuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=iNbByteRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bOut, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=iNbByteRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=bbuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=iin, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=bOut, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="utf-8")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), name=document)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=document, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=CCSSParser, selectors=[], type_arguments=None), name=sheet)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CSSStyleSheet, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sheet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="style")], member=createElement, postfix_operators=[], prefix_operators=[], qualifier=mydoc, selectors=[], type_arguments=None), name=style)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="type"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="text/css")], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sheet, selectors=[], type_arguments=None)], member=setTextContent, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getParentNode, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[MemberReference(member=style, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=insertBefore, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getParentNode, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removeChild, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['Throwable']))], finally_block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=iin, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['Throwable']))], finally_block=None, label=None, resources=None)], label=None, resources=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['Throwable']))], finally_block=None, label=None, resources=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=zi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=linknl, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=zi)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=zi, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=US, postfix_operators=[], prefix_operators=[], qualifier=Locale, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=NumberFormat, selectors=[], type_arguments=None), name=nf)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=NumberFormat, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=setMaximumFractionDigits, postfix_operators=[], prefix_operators=[], qualifier=nf, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=setMinimumFractionDigits, postfix_operators=[], prefix_operators=[], qualifier=nf, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="style")], member=createElement, postfix_operators=[], prefix_operators=[], qualifier=mydoc, selectors=[], type_arguments=None), name=style)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="type"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="text/css")], member=setAttribute, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=docs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=jj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getCMSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=dsize)], modifiers={'final'}, type=BasicType(dimensions=[None], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=docs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=jj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getCMMargin, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=dmargin)], modifiers={'final'}, type=BasicType(dimensions=[None], name=double)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n@page {\n"), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="size: "), operator=+), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=dsize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.54), operator=/)], member=format, postfix_operators=[], prefix_operators=[], qualifier=nf, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="in "), operator=+), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=dsize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.54), operator=/)], member=format, postfix_operators=[], prefix_operators=[], qualifier=nf, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="in;\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="margin-left: "), operator=+), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=dmargin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.54), operator=/)], member=format, postfix_operators=[], prefix_operators=[], qualifier=nf, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="in;\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="margin-right: "), operator=+), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=dmargin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.54), operator=/)], member=format, postfix_operators=[], prefix_operators=[], qualifier=nf, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="in;\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="margin-bottom: "), operator=+), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=dmargin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.54), operator=/)], member=format, postfix_operators=[], prefix_operators=[], qualifier=nf, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="in;\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="margin-top: "), operator=+), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=dmargin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.54), operator=/)], member=format, postfix_operators=[], prefix_operators=[], qualifier=nf, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="in;\npadding: 0in;\n"), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="}\n"), operator=+)], member=setTextContent, postfix_operators=[], prefix_operators=[], qualifier=style, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=style, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendChild, postfix_operators=[], prefix_operators=[], qualifier=head, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=FOP_TTF_FONT_PATH, postfix_operators=[], prefix_operators=[], qualifier=IHtmlToPdfTransformer, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Cast(expression=MethodInvocation(arguments=[MemberReference(member=FOP_TTF_FONT_PATH, postfix_operators=[], prefix_operators=[], qualifier=IHtmlToPdfTransformer, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)), name=dir)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=dir, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=renderer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=registerTTF, postfix_operators=[], prefix_operators=[], qualifier=CHtmlToPdfFlyingSaucerTransformer, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=Cast(expression=MemberReference(member=mydoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ADocument, sub_type=None)), label=None), StatementExpression(expression=Cast(expression=MemberReference(member=mydoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ADocument, sub_type=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getSharedContext, postfix_operators=[], prefix_operators=[], qualifier=renderer, selectors=[MethodInvocation(arguments=[MemberReference(member=urlForBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setBaseURL, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=mydoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=mydoc, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringReader, sub_type=None))], member=parse, postfix_operators=[], prefix_operators=[], qualifier=parser, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getDomConfig, postfix_operators=[], prefix_operators=[], qualifier=mydoc, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="entities"), MemberReference(member=FALSE, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[])], member=setParameter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=normalizeDocument, postfix_operators=[], prefix_operators=[], qualifier=mydoc, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mydoc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=urlForBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setDocument, postfix_operators=[], prefix_operators=[], qualifier=renderer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=layout, postfix_operators=[], prefix_operators=[], qualifier=renderer, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="pdf"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="yahp")], member=createTempFile, postfix_operators=[], prefix_operators=[], qualifier=java.io.File, selectors=[], type_arguments=None), name=f)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)))), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=files, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=f, 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=FileOutputStream, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedOutputStream, sub_type=None)), name=fout)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=OutputStream, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=createPDF, postfix_operators=[], prefix_operators=[], qualifier=renderer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=fout, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=fout, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=jj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=docs, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=jj)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=jj, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=docs, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PageSize, sub_type=None)), name=sizes)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[None], name=PageSize, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sizes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=docs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=docs, 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), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=properties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=urlForBase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Flying Saucer Renderer (https://xhtmlrenderer.dev.java.net/)"), MemberReference(member=sizes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reconstruct, postfix_operators=[], prefix_operators=[], qualifier=CDocumentReconstructor, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=CHtmlToPdfFlyingSaucerTransformer.log, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ERROR: An unhandled exception occured: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CConvertException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['Exception']))], finally_block=None, label=None, resources=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=it, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), name=f)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=io, sub_type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None)))), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=delete, postfix_operators=[], prefix_operators=[], qualifier=f, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['Exception']))], finally_block=None, label=None, resources=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=iterator, postfix_operators=[], prefix_operators=[], qualifier=files, selectors=[], type_arguments=None), name=it)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Iterator, sub_type=None)), update=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[transform] operator[SEP] Keyword[final] identifier[InputStream] identifier[in] , identifier[String] identifier[urlForBase] , Keyword[final] identifier[PageSize] identifier[size] , Keyword[final] identifier[List] identifier[hf] , Keyword[final] identifier[Map] identifier[properties] , Keyword[final] identifier[OutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[CConvertException] { Keyword[final] identifier[List] identifier[files] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[final] identifier[Tidy] identifier[tidy] operator[=] Keyword[this] operator[SEP] identifier[getTidy] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[CShaniDomParser] identifier[parser] operator[=] Keyword[this] operator[SEP] identifier[getCShaniDomParser] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[_ITextRenderer] identifier[renderer] operator[=] Keyword[this] operator[SEP] identifier[getITextRenderer] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Reader] identifier[r] operator[=] identifier[CXmlParser] operator[SEP] identifier[getReader] operator[SEP] identifier[in] operator[SEP] operator[SEP] Keyword[final] identifier[StringBuffer] identifier[s] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[buffer] operator[=] Keyword[new] Keyword[char] operator[SEP] Other[2048] operator[SEP] operator[SEP] Keyword[int] identifier[inb] operator[=] operator[-] Other[1] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[inb] operator[=] identifier[r] operator[SEP] identifier[read] operator[SEP] identifier[buffer] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { identifier[s] operator[SEP] identifier[append] operator[SEP] identifier[buffer] , Other[0] , identifier[inb] operator[SEP] operator[SEP] } identifier[r] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[ByteArrayOutputStream] identifier[bout] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[tidy] operator[SEP] identifier[parse] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[s] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] literal[String] operator[SEP] operator[SEP] , identifier[bout] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[result] operator[=] identifier[CHtmlToPdfFlyingSaucerTransformer] operator[SEP] identifier[removeScript] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[bout] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[Document] identifier[theDoc] operator[=] identifier[parser] operator[SEP] identifier[parse] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[result] operator[SEP] identifier[getBytes] operator[SEP] literal[String] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[theDoc] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[theDoc] operator[=] identifier[parser] operator[SEP] identifier[parse] operator[SEP] Keyword[new] identifier[StringReader] operator[SEP] identifier[CHtmlToPdfFlyingSaucerTransformer] operator[SEP] identifier[removeScript] operator[SEP] identifier[s] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[convertInputToVisibleHTML] operator[SEP] identifier[theDoc] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[convertComboboxToVisibleHTML] operator[SEP] identifier[theDoc] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[convertTextAreaToVisibleHTML] operator[SEP] identifier[theDoc] operator[SEP] operator[SEP] Keyword[final] identifier[NodeList] identifier[styles] operator[=] identifier[theDoc] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[styles] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[Node] identifier[n] operator[=] identifier[styles] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[final] identifier[StringBuffer] identifier[style] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[n] operator[SEP] identifier[getChildNodes] operator[SEP] operator[SEP] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[final] identifier[Node] identifier[child] operator[=] identifier[n] operator[SEP] identifier[getChildNodes] operator[SEP] operator[SEP] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[child] operator[SEP] identifier[getNodeType] operator[SEP] operator[SEP] operator[==] identifier[Node] operator[SEP] identifier[COMMENT_NODE] operator[SEP] { Keyword[final] identifier[Comment] identifier[c] operator[=] operator[SEP] identifier[Comment] operator[SEP] identifier[child] operator[SEP] identifier[style] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[child] operator[SEP] identifier[getNodeType] operator[SEP] operator[SEP] operator[==] identifier[Node] operator[SEP] identifier[TEXT_NODE] operator[SEP] { Keyword[final] identifier[Text] identifier[c] operator[=] operator[SEP] identifier[Text] operator[SEP] identifier[child] operator[SEP] identifier[style] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[child] operator[SEP] identifier[getNodeType] operator[SEP] operator[SEP] operator[==] identifier[Node] operator[SEP] identifier[CDATA_SECTION_NODE] operator[SEP] { Keyword[final] identifier[CDATASection] identifier[c] operator[=] operator[SEP] identifier[CDATASection] operator[SEP] identifier[child] operator[SEP] identifier[style] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[n] operator[SEP] identifier[removeChild] operator[SEP] identifier[child] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[content] operator[=] identifier[style] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Text] identifier[start] operator[=] identifier[theDoc] operator[SEP] identifier[createTextNode] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[CDATASection] identifier[cd] operator[=] identifier[theDoc] operator[SEP] identifier[createCDATASection] operator[SEP] literal[String] operator[+] identifier[content] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[Text] identifier[end] operator[=] identifier[theDoc] operator[SEP] identifier[createTextNode] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[n] operator[SEP] identifier[appendChild] operator[SEP] identifier[start] operator[SEP] operator[SEP] identifier[n] operator[SEP] identifier[appendChild] operator[SEP] identifier[cd] operator[SEP] operator[SEP] identifier[n] operator[SEP] identifier[appendChild] operator[SEP] identifier[end] operator[SEP] operator[SEP] } Keyword[final] identifier[List] identifier[toRemove] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[NodeList] identifier[tnl] operator[=] identifier[theDoc] operator[SEP] identifier[getChildNodes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[tnl] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[Node] identifier[n] operator[=] identifier[tnl] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[!=] identifier[theDoc] operator[SEP] identifier[getDocumentElement] operator[SEP] operator[SEP] operator[SEP] { identifier[toRemove] operator[SEP] identifier[add] operator[SEP] identifier[n] operator[SEP] operator[SEP] } } Keyword[final] identifier[Node] identifier[title] operator[=] identifier[theDoc] operator[SEP] identifier[getDocumentElement] operator[SEP] operator[SEP] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[title] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[properties] operator[SEP] identifier[get] operator[SEP] identifier[IHtmlToPdfTransformer] operator[SEP] identifier[PDF_TITLE] operator[SEP] operator[==] Other[null] operator[SEP] operator[SEP] { identifier[properties] operator[SEP] identifier[put] operator[SEP] identifier[IHtmlToPdfTransformer] operator[SEP] identifier[PDF_TITLE] , identifier[title] operator[SEP] identifier[getTextContent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Node] identifier[body] operator[=] identifier[theDoc] operator[SEP] identifier[getDocumentElement] operator[SEP] operator[SEP] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[Node] identifier[head] operator[=] identifier[theDoc] operator[SEP] identifier[getDocumentElement] operator[SEP] operator[SEP] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[toRemove] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] identifier[Node] identifier[n] operator[=] operator[SEP] identifier[Node] operator[SEP] identifier[toRemove] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[n] operator[SEP] identifier[getParentNode] operator[SEP] operator[SEP] operator[SEP] identifier[removeChild] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[SEP] identifier[getNodeType] operator[SEP] operator[SEP] operator[==] identifier[Node] operator[SEP] identifier[TEXT_NODE] operator[SEP] { Keyword[final] identifier[Text] identifier[t] operator[=] operator[SEP] identifier[Text] operator[SEP] identifier[n] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[continue] operator[SEP] } } Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[n] operator[SEP] identifier[getNodeName] operator[SEP] operator[SEP] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[n] operator[SEP] identifier[getNodeName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[head] operator[SEP] identifier[appendChild] operator[SEP] identifier[n] operator[SEP] operator[SEP] } Keyword[else] { identifier[body] operator[SEP] identifier[appendChild] operator[SEP] identifier[n] operator[SEP] operator[SEP] } } Keyword[final] identifier[DocumentAndSize] identifier[docs] operator[SEP] operator[SEP] operator[=] identifier[CDocumentCut] operator[SEP] identifier[cut] operator[SEP] identifier[theDoc] , identifier[size] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[jj] operator[=] Other[0] operator[SEP] identifier[jj] operator[<] identifier[docs] operator[SEP] identifier[length] operator[SEP] identifier[jj] operator[++] operator[SEP] { identifier[Document] identifier[mydoc] operator[=] identifier[docs] operator[SEP] identifier[jj] operator[SEP] operator[SEP] identifier[doc] operator[SEP] identifier[body] operator[=] identifier[mydoc] operator[SEP] identifier[getDocumentElement] operator[SEP] operator[SEP] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[head] operator[=] identifier[mydoc] operator[SEP] identifier[getDocumentElement] operator[SEP] operator[SEP] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[surlForBase] operator[=] operator[SEP] operator[SEP] identifier[Element] operator[SEP] identifier[mydoc] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[surlForBase] operator[==] Other[null] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[surlForBase] operator[SEP] operator[SEP] { identifier[surlForBase] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[surlForBase] operator[!=] Other[null] operator[SEP] { identifier[urlForBase] operator[=] identifier[surlForBase] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[ignore] operator[SEP] { } Keyword[if] operator[SEP] identifier[urlForBase] operator[!=] Other[null] operator[SEP] { operator[SEP] operator[SEP] identifier[ADocument] operator[SEP] identifier[mydoc] operator[SEP] operator[SEP] identifier[setDocumentURI] operator[SEP] identifier[urlForBase] operator[SEP] operator[SEP] } Keyword[final] identifier[NodeList] identifier[nl] operator[=] identifier[mydoc] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nl] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[final] identifier[ADocument] identifier[doc] operator[=] operator[SEP] identifier[ADocument] operator[SEP] identifier[mydoc] operator[SEP] Keyword[final] identifier[Element] identifier[base] operator[=] identifier[doc] operator[SEP] identifier[createElement] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[base] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[urlForBase] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[head] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[head] operator[SEP] identifier[insertBefore] operator[SEP] identifier[base] , identifier[head] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[head] operator[SEP] identifier[appendChild] operator[SEP] identifier[base] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[final] identifier[Element] identifier[base] operator[=] operator[SEP] identifier[Element] operator[SEP] identifier[nl] operator[SEP] identifier[item] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[base] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[urlForBase] operator[SEP] operator[SEP] } Keyword[final] identifier[NodeList] identifier[linknl] operator[=] identifier[mydoc] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[zi] operator[=] Other[0] operator[SEP] identifier[zi] operator[<] identifier[linknl] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[zi] operator[++] operator[SEP] { Keyword[try] { identifier[Element] identifier[e] operator[=] operator[SEP] identifier[Element] operator[SEP] identifier[linknl] operator[SEP] identifier[item] operator[SEP] identifier[zi] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[e] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[url] operator[=] identifier[normalizeLink] operator[SEP] identifier[urlForBase] , identifier[e] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[InputStream] identifier[iin] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[iin] operator[=] Keyword[new] identifier[URL] operator[SEP] identifier[url] operator[SEP] operator[SEP] identifier[openStream] operator[SEP] operator[SEP] operator[SEP] identifier[ByteArrayOutputStream] identifier[bOut] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[iNbByteRead] operator[=] operator[-] Other[1] operator[SEP] Keyword[byte] identifier[bbuffer] operator[SEP] operator[SEP] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[16384] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[iNbByteRead] operator[=] identifier[iin] operator[SEP] identifier[read] operator[SEP] identifier[bbuffer] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { identifier[bOut] operator[SEP] identifier[write] operator[SEP] identifier[bbuffer] , Other[0] , identifier[iNbByteRead] operator[SEP] operator[SEP] } identifier[String] identifier[document] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[bOut] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[CSSStyleSheet] identifier[sheet] operator[=] identifier[CCSSParser] operator[SEP] identifier[parse] operator[SEP] identifier[document] , Other[null] , Other[null] , identifier[url] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sheet] operator[!=] Other[null] operator[SEP] { identifier[Element] identifier[style] operator[=] identifier[mydoc] operator[SEP] identifier[createElement] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[style] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[style] operator[SEP] identifier[setTextContent] operator[SEP] identifier[sheet] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[getParentNode] operator[SEP] operator[SEP] operator[SEP] identifier[insertBefore] operator[SEP] identifier[style] , identifier[e] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[getParentNode] operator[SEP] operator[SEP] operator[SEP] identifier[removeChild] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[Throwable] identifier[ignore] operator[SEP] { } Keyword[finally] { Keyword[try] { identifier[iin] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[ignore] operator[SEP] { } } } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[ignore] operator[SEP] { } } Keyword[final] identifier[NumberFormat] identifier[nf] operator[=] identifier[NumberFormat] operator[SEP] identifier[getInstance] operator[SEP] identifier[Locale] operator[SEP] identifier[US] operator[SEP] operator[SEP] identifier[nf] operator[SEP] identifier[setMaximumFractionDigits] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[nf] operator[SEP] identifier[setMinimumFractionDigits] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[final] identifier[Element] identifier[style] operator[=] identifier[mydoc] operator[SEP] identifier[createElement] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[style] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[dsize] operator[=] identifier[docs] operator[SEP] identifier[jj] operator[SEP] operator[SEP] identifier[size] operator[SEP] identifier[getCMSize] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[dmargin] operator[=] identifier[docs] operator[SEP] identifier[jj] operator[SEP] operator[SEP] identifier[size] operator[SEP] identifier[getCMMargin] operator[SEP] operator[SEP] operator[SEP] identifier[style] operator[SEP] identifier[setTextContent] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[nf] operator[SEP] identifier[format] operator[SEP] identifier[dsize] operator[SEP] Other[0] operator[SEP] operator[/] literal[Float] operator[SEP] operator[+] literal[String] operator[+] identifier[nf] operator[SEP] identifier[format] operator[SEP] identifier[dsize] operator[SEP] Other[1] operator[SEP] operator[/] literal[Float] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[nf] operator[SEP] identifier[format] operator[SEP] identifier[dmargin] operator[SEP] Other[0] operator[SEP] operator[/] literal[Float] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[nf] operator[SEP] identifier[format] operator[SEP] identifier[dmargin] operator[SEP] Other[1] operator[SEP] operator[/] literal[Float] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[nf] operator[SEP] identifier[format] operator[SEP] identifier[dmargin] operator[SEP] Other[2] operator[SEP] operator[/] literal[Float] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[nf] operator[SEP] identifier[format] operator[SEP] identifier[dmargin] operator[SEP] Other[3] operator[SEP] operator[/] literal[Float] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] identifier[head] operator[SEP] identifier[appendChild] operator[SEP] identifier[style] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[properties] operator[SEP] identifier[get] operator[SEP] identifier[IHtmlToPdfTransformer] operator[SEP] identifier[FOP_TTF_FONT_PATH] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[File] identifier[dir] operator[=] Keyword[new] identifier[File] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[properties] operator[SEP] identifier[get] operator[SEP] identifier[IHtmlToPdfTransformer] operator[SEP] identifier[FOP_TTF_FONT_PATH] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dir] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[CHtmlToPdfFlyingSaucerTransformer] operator[SEP] identifier[registerTTF] operator[SEP] identifier[dir] , identifier[renderer] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[ADocument] operator[SEP] identifier[mydoc] operator[SEP] operator[SEP] identifier[setInputEncoding] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ADocument] operator[SEP] identifier[mydoc] operator[SEP] operator[SEP] identifier[setXmlEncoding] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[renderer] operator[SEP] identifier[getSharedContext] operator[SEP] operator[SEP] operator[SEP] identifier[setBaseURL] operator[SEP] identifier[urlForBase] operator[SEP] operator[SEP] identifier[mydoc] operator[=] identifier[parser] operator[SEP] identifier[parse] operator[SEP] Keyword[new] identifier[StringReader] operator[SEP] identifier[mydoc] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[mydoc] operator[SEP] identifier[getDomConfig] operator[SEP] operator[SEP] operator[SEP] identifier[setParameter] operator[SEP] literal[String] , identifier[Boolean] operator[SEP] identifier[FALSE] operator[SEP] operator[SEP] identifier[mydoc] operator[SEP] identifier[normalizeDocument] operator[SEP] operator[SEP] operator[SEP] identifier[renderer] operator[SEP] identifier[setDocument] operator[SEP] identifier[mydoc] , identifier[urlForBase] operator[SEP] operator[SEP] identifier[renderer] operator[SEP] identifier[layout] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[File] identifier[f] operator[=] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[File] operator[SEP] identifier[createTempFile] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[files] operator[SEP] identifier[add] operator[SEP] identifier[f] operator[SEP] operator[SEP] Keyword[final] identifier[OutputStream] identifier[fout] operator[=] Keyword[new] identifier[BufferedOutputStream] operator[SEP] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[f] operator[SEP] operator[SEP] operator[SEP] identifier[renderer] operator[SEP] identifier[createPDF] operator[SEP] identifier[fout] , literal[boolean] operator[SEP] operator[SEP] identifier[fout] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[fout] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[PageSize] operator[SEP] operator[SEP] identifier[sizes] operator[=] Keyword[new] identifier[PageSize] operator[SEP] identifier[docs] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[docs] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[sizes] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[docs] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[size] operator[SEP] } identifier[CDocumentReconstructor] operator[SEP] identifier[reconstruct] operator[SEP] identifier[files] , identifier[properties] , identifier[out] , identifier[urlForBase] , literal[String] , identifier[sizes] , identifier[hf] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Throwable] identifier[e] operator[SEP] { identifier[CHtmlToPdfFlyingSaucerTransformer] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CConvertException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[try] { identifier[out] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[ignore] operator[SEP] { } Keyword[for] operator[SEP] Keyword[final] identifier[Iterator] identifier[it] operator[=] identifier[files] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[File] identifier[f] operator[=] operator[SEP] identifier[File] operator[SEP] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[f] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[Exception] identifier[ignore] operator[SEP] { } } } }
public void setDataType(String type) { addField(ConfigureNodeFields.type, FormField.Type.text_single); setAnswer(ConfigureNodeFields.type.getFieldName(), type); }
class class_name[name] begin[{] method[setDataType, return_type[void], modifier[public], parameter[type]] begin[{] call[.addField, parameter[member[ConfigureNodeFields.type], member[FormField.Type.text_single]]] call[.setAnswer, parameter[call[ConfigureNodeFields.type.getFieldName, parameter[]], member[.type]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setDataType] operator[SEP] identifier[String] identifier[type] operator[SEP] { identifier[addField] operator[SEP] identifier[ConfigureNodeFields] operator[SEP] identifier[type] , identifier[FormField] operator[SEP] identifier[Type] operator[SEP] identifier[text_single] operator[SEP] operator[SEP] identifier[setAnswer] operator[SEP] identifier[ConfigureNodeFields] operator[SEP] identifier[type] operator[SEP] identifier[getFieldName] operator[SEP] operator[SEP] , identifier[type] operator[SEP] operator[SEP] }
public static String getBundle (String qualifiedKey) { if (!qualifiedKey.startsWith(QUAL_PREFIX)) { throw new IllegalArgumentException( qualifiedKey + " is not a fully qualified message key."); } int qsidx = qualifiedKey.indexOf(QUAL_SEP); if (qsidx == -1) { throw new IllegalArgumentException( qualifiedKey + " is not a valid fully qualified key."); } return qualifiedKey.substring(QUAL_PREFIX.length(), qsidx); }
class class_name[name] begin[{] method[getBundle, return_type[type[String]], modifier[public static], parameter[qualifiedKey]] begin[{] if[call[qualifiedKey.startsWith, parameter[member[.QUAL_PREFIX]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=qualifiedKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is not a fully qualified message key."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], qsidx] if[binary_operation[member[.qsidx], ==, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=qualifiedKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is not a valid fully qualified key."), 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[}] return[call[qualifiedKey.substring, parameter[call[QUAL_PREFIX.length, parameter[]], member[.qsidx]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getBundle] operator[SEP] identifier[String] identifier[qualifiedKey] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[qualifiedKey] operator[SEP] identifier[startsWith] operator[SEP] identifier[QUAL_PREFIX] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[qualifiedKey] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[int] identifier[qsidx] operator[=] identifier[qualifiedKey] operator[SEP] identifier[indexOf] operator[SEP] identifier[QUAL_SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[qsidx] operator[==] operator[-] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[qualifiedKey] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[qualifiedKey] operator[SEP] identifier[substring] operator[SEP] identifier[QUAL_PREFIX] operator[SEP] identifier[length] operator[SEP] operator[SEP] , identifier[qsidx] operator[SEP] operator[SEP] }
public void copy(final DisambiguatedAlchemyEntity disambiguatedAlchemyEntity) { if(disambiguatedAlchemyEntity != null) { Iterator<String> subtypes = disambiguatedAlchemyEntity.subtypeIterator(); while(subtypes.hasNext()) { addSubtype(subtypes.next()); } setName(disambiguatedAlchemyEntity.getName()); setCensus(disambiguatedAlchemyEntity.getCensus()); setCIAFactbook(disambiguatedAlchemyEntity.getCIAFactbook()); setCrunchbase(disambiguatedAlchemyEntity.getCrunchbase()); setDBPedia(disambiguatedAlchemyEntity.getDBPedia()); setFreebase(disambiguatedAlchemyEntity.getFreebase()); setGeo(disambiguatedAlchemyEntity.getGeo()); setGeonames(disambiguatedAlchemyEntity.getGeonames()); setMusicBrainz(disambiguatedAlchemyEntity.getMusicBrainz()); setOpencyc(disambiguatedAlchemyEntity.getOpencyc()); setSemanticCrunchbase(disambiguatedAlchemyEntity.getSemanticCrunchbase()); setUmbel(disambiguatedAlchemyEntity.getUmbel()); setWebsite(disambiguatedAlchemyEntity.getWebsite()); setYago(disambiguatedAlchemyEntity.getYago()); } }
class class_name[name] begin[{] method[copy, return_type[void], modifier[public], parameter[disambiguatedAlchemyEntity]] begin[{] if[binary_operation[member[.disambiguatedAlchemyEntity], !=, literal[null]]] begin[{] local_variable[type[Iterator], subtypes] while[call[subtypes.hasNext, parameter[]]] begin[{] call[.addSubtype, parameter[call[subtypes.next, parameter[]]]] end[}] call[.setName, parameter[call[disambiguatedAlchemyEntity.getName, parameter[]]]] call[.setCensus, parameter[call[disambiguatedAlchemyEntity.getCensus, parameter[]]]] call[.setCIAFactbook, parameter[call[disambiguatedAlchemyEntity.getCIAFactbook, parameter[]]]] call[.setCrunchbase, parameter[call[disambiguatedAlchemyEntity.getCrunchbase, parameter[]]]] call[.setDBPedia, parameter[call[disambiguatedAlchemyEntity.getDBPedia, parameter[]]]] call[.setFreebase, parameter[call[disambiguatedAlchemyEntity.getFreebase, parameter[]]]] call[.setGeo, parameter[call[disambiguatedAlchemyEntity.getGeo, parameter[]]]] call[.setGeonames, parameter[call[disambiguatedAlchemyEntity.getGeonames, parameter[]]]] call[.setMusicBrainz, parameter[call[disambiguatedAlchemyEntity.getMusicBrainz, parameter[]]]] call[.setOpencyc, parameter[call[disambiguatedAlchemyEntity.getOpencyc, parameter[]]]] call[.setSemanticCrunchbase, parameter[call[disambiguatedAlchemyEntity.getSemanticCrunchbase, parameter[]]]] call[.setUmbel, parameter[call[disambiguatedAlchemyEntity.getUmbel, parameter[]]]] call[.setWebsite, parameter[call[disambiguatedAlchemyEntity.getWebsite, parameter[]]]] call[.setYago, parameter[call[disambiguatedAlchemyEntity.getYago, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[copy] operator[SEP] Keyword[final] identifier[DisambiguatedAlchemyEntity] identifier[disambiguatedAlchemyEntity] operator[SEP] { Keyword[if] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[!=] Other[null] operator[SEP] { identifier[Iterator] operator[<] identifier[String] operator[>] identifier[subtypes] operator[=] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[subtypeIterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[subtypes] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[addSubtype] operator[SEP] identifier[subtypes] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[setName] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setCensus] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getCensus] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setCIAFactbook] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getCIAFactbook] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setCrunchbase] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getCrunchbase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setDBPedia] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getDBPedia] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setFreebase] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getFreebase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setGeo] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getGeo] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setGeonames] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getGeonames] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setMusicBrainz] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getMusicBrainz] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setOpencyc] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getOpencyc] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setSemanticCrunchbase] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getSemanticCrunchbase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setUmbel] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getUmbel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setWebsite] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getWebsite] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setYago] operator[SEP] identifier[disambiguatedAlchemyEntity] operator[SEP] identifier[getYago] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public boolean removeRelation( TemporalExtendedPropositionDefinition lhsRule, TemporalExtendedPropositionDefinition rhsRule) { List<TemporalExtendedPropositionDefinition> key = Arrays.asList( lhsRule, rhsRule); if (defPairsMap.remove(key) != null) { return true; } else { return false; } }
class class_name[name] begin[{] method[removeRelation, return_type[type[boolean]], modifier[public], parameter[lhsRule, rhsRule]] begin[{] local_variable[type[List], key] if[binary_operation[call[defPairsMap.remove, parameter[member[.key]]], !=, literal[null]]] begin[{] return[literal[true]] else begin[{] return[literal[false]] end[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[removeRelation] operator[SEP] identifier[TemporalExtendedPropositionDefinition] identifier[lhsRule] , identifier[TemporalExtendedPropositionDefinition] identifier[rhsRule] operator[SEP] { identifier[List] operator[<] identifier[TemporalExtendedPropositionDefinition] operator[>] identifier[key] operator[=] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[lhsRule] , identifier[rhsRule] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[defPairsMap] operator[SEP] identifier[remove] operator[SEP] identifier[key] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
public InputStream getIndexFile(String filePath) throws RepositoryException { try { return new RemoteInputStream(filePath); } catch (SecurityException e) { throw new RepositoryException(e); } catch (RPCException e) { throw new RepositoryException(e); } }
class class_name[name] begin[{] method[getIndexFile, return_type[type[InputStream]], modifier[public], parameter[filePath]] begin[{] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=filePath, 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=RemoteInputStream, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RepositoryException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SecurityException'])), 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=RepositoryException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RPCException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[InputStream] identifier[getIndexFile] operator[SEP] identifier[String] identifier[filePath] operator[SEP] Keyword[throws] identifier[RepositoryException] { Keyword[try] { Keyword[return] Keyword[new] identifier[RemoteInputStream] operator[SEP] identifier[filePath] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SecurityException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RepositoryException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RPCException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RepositoryException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public ContentPackageBuilder thumbnailImage(InputStream is) throws IOException { metadata.setThumbnailImage(IOUtils.toByteArray(is)); return this; }
class class_name[name] begin[{] method[thumbnailImage, return_type[type[ContentPackageBuilder]], modifier[public], parameter[is]] begin[{] call[metadata.setThumbnailImage, parameter[call[IOUtils.toByteArray, parameter[member[.is]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[ContentPackageBuilder] identifier[thumbnailImage] operator[SEP] identifier[InputStream] identifier[is] operator[SEP] Keyword[throws] identifier[IOException] { identifier[metadata] operator[SEP] identifier[setThumbnailImage] operator[SEP] identifier[IOUtils] operator[SEP] identifier[toByteArray] operator[SEP] identifier[is] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static String getDescriptor(final Class<?> clazz) { StringBuilder stringBuilder = new StringBuilder(); appendDescriptor(stringBuilder, clazz); return stringBuilder.toString(); }
class class_name[name] begin[{] method[getDescriptor, return_type[type[String]], modifier[public static], parameter[clazz]] begin[{] local_variable[type[StringBuilder], stringBuilder] call[.appendDescriptor, parameter[member[.stringBuilder], member[.clazz]]] return[call[stringBuilder.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getDescriptor] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] { identifier[StringBuilder] identifier[stringBuilder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[appendDescriptor] operator[SEP] identifier[stringBuilder] , identifier[clazz] operator[SEP] operator[SEP] Keyword[return] identifier[stringBuilder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public LayerType toDto(Class<? extends com.vividsolutions.jts.geom.Geometry> geometryClass) { if (geometryClass == LineString.class) { return LayerType.LINESTRING; } else if (geometryClass == MultiLineString.class) { return LayerType.MULTILINESTRING; } else if (geometryClass == Point.class) { return LayerType.POINT; } else if (geometryClass == MultiPoint.class) { return LayerType.MULTIPOINT; } else if (geometryClass == Polygon.class) { return LayerType.POLYGON; } else if (geometryClass == MultiPolygon.class) { return LayerType.MULTIPOLYGON; } else { return LayerType.GEOMETRY; } }
class class_name[name] begin[{] method[toDto, return_type[type[LayerType]], modifier[public], parameter[geometryClass]] begin[{] if[binary_operation[member[.geometryClass], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LineString, sub_type=None))]] begin[{] return[member[LayerType.LINESTRING]] else begin[{] if[binary_operation[member[.geometryClass], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MultiLineString, sub_type=None))]] begin[{] return[member[LayerType.MULTILINESTRING]] else begin[{] if[binary_operation[member[.geometryClass], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Point, sub_type=None))]] begin[{] return[member[LayerType.POINT]] else begin[{] if[binary_operation[member[.geometryClass], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MultiPoint, sub_type=None))]] begin[{] return[member[LayerType.MULTIPOINT]] else begin[{] if[binary_operation[member[.geometryClass], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Polygon, sub_type=None))]] begin[{] return[member[LayerType.POLYGON]] else begin[{] if[binary_operation[member[.geometryClass], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MultiPolygon, sub_type=None))]] begin[{] return[member[LayerType.MULTIPOLYGON]] else begin[{] return[member[LayerType.GEOMETRY]] end[}] end[}] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[public] identifier[LayerType] identifier[toDto] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[com] operator[SEP] identifier[vividsolutions] operator[SEP] identifier[jts] operator[SEP] identifier[geom] operator[SEP] identifier[Geometry] operator[>] identifier[geometryClass] operator[SEP] { Keyword[if] operator[SEP] identifier[geometryClass] operator[==] identifier[LineString] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] identifier[LayerType] operator[SEP] identifier[LINESTRING] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[geometryClass] operator[==] identifier[MultiLineString] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] identifier[LayerType] operator[SEP] identifier[MULTILINESTRING] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[geometryClass] operator[==] identifier[Point] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] identifier[LayerType] operator[SEP] identifier[POINT] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[geometryClass] operator[==] identifier[MultiPoint] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] identifier[LayerType] operator[SEP] identifier[MULTIPOINT] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[geometryClass] operator[==] identifier[Polygon] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] identifier[LayerType] operator[SEP] identifier[POLYGON] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[geometryClass] operator[==] identifier[MultiPolygon] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] identifier[LayerType] operator[SEP] identifier[MULTIPOLYGON] operator[SEP] } Keyword[else] { Keyword[return] identifier[LayerType] operator[SEP] identifier[GEOMETRY] operator[SEP] } }
@SuppressWarnings("GuardedByChecker") Map<K, V> expireAfterWriteOrder(int limit, Function<V, V> transformer, boolean oldest) { Supplier<Iterator<Node<K, V>>> iteratorSupplier = () -> oldest ? writeOrderDeque().iterator() : writeOrderDeque().descendingIterator(); return fixedSnapshot(iteratorSupplier, limit, transformer); }
class class_name[name] begin[{] method[expireAfterWriteOrder, return_type[type[Map]], modifier[default], parameter[limit, transformer, oldest]] begin[{] local_variable[type[Supplier], iteratorSupplier] return[call[.fixedSnapshot, parameter[member[.iteratorSupplier], member[.limit], member[.transformer]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[expireAfterWriteOrder] operator[SEP] Keyword[int] identifier[limit] , identifier[Function] operator[<] identifier[V] , identifier[V] operator[>] identifier[transformer] , Keyword[boolean] identifier[oldest] operator[SEP] { identifier[Supplier] operator[<] identifier[Iterator] operator[<] identifier[Node] operator[<] identifier[K] , identifier[V] operator[>] operator[>] operator[>] identifier[iteratorSupplier] operator[=] operator[SEP] operator[SEP] operator[->] identifier[oldest] operator[?] identifier[writeOrderDeque] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[:] identifier[writeOrderDeque] operator[SEP] operator[SEP] operator[SEP] identifier[descendingIterator] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[fixedSnapshot] operator[SEP] identifier[iteratorSupplier] , identifier[limit] , identifier[transformer] operator[SEP] operator[SEP] }
public boolean removeAll(final ObjectHashSet<T> coll) { boolean acc = false; for (final T value : coll.values) { if (value != MISSING_VALUE) { acc |= remove(value); } } return acc; }
class class_name[name] begin[{] method[removeAll, return_type[type[boolean]], modifier[public], parameter[coll]] begin[{] local_variable[type[boolean], acc] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MISSING_VALUE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=acc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=|=, value=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=coll, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=value)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))), label=None) return[member[.acc]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[removeAll] operator[SEP] Keyword[final] identifier[ObjectHashSet] operator[<] identifier[T] operator[>] identifier[coll] operator[SEP] { Keyword[boolean] identifier[acc] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[T] identifier[value] operator[:] identifier[coll] operator[SEP] identifier[values] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[!=] identifier[MISSING_VALUE] operator[SEP] { identifier[acc] operator[|=] identifier[remove] operator[SEP] identifier[value] operator[SEP] operator[SEP] } } Keyword[return] identifier[acc] operator[SEP] }
protected String statBase(final AbstractStatRequest request) throws AbstractCosException { request.check_param(); String url = buildUrl(request); long signExpired = System.currentTimeMillis() / 1000 + this.config.getSignExpired(); String sign = Sign.getPeriodEffectiveSign(request.getBucketName(),request.getCosPath(), this.cred, signExpired); HttpRequest httpRequest = new HttpRequest(); httpRequest.setUrl(url); httpRequest.addHeader(RequestHeaderKey.Authorization, sign); httpRequest.addHeader(RequestHeaderKey.USER_AGENT, this.config.getUserAgent()); httpRequest.addParam(RequestBodyKey.OP, RequestBodyValue.OP.STAT); httpRequest.setMethod(HttpMethod.GET); return httpClient.sendHttpRequest(httpRequest); }
class class_name[name] begin[{] method[statBase, return_type[type[String]], modifier[protected], parameter[request]] begin[{] call[request.check_param, parameter[]] local_variable[type[String], url] local_variable[type[long], signExpired] local_variable[type[String], sign] local_variable[type[HttpRequest], httpRequest] call[httpRequest.setUrl, parameter[member[.url]]] call[httpRequest.addHeader, parameter[member[RequestHeaderKey.Authorization], member[.sign]]] call[httpRequest.addHeader, parameter[member[RequestHeaderKey.USER_AGENT], THIS[member[None.config]call[None.getUserAgent, parameter[]]]]] call[httpRequest.addParam, parameter[member[RequestBodyKey.OP], member[RequestBodyValue.OP.STAT]]] call[httpRequest.setMethod, parameter[member[HttpMethod.GET]]] return[call[httpClient.sendHttpRequest, parameter[member[.httpRequest]]]] end[}] END[}]
Keyword[protected] identifier[String] identifier[statBase] operator[SEP] Keyword[final] identifier[AbstractStatRequest] identifier[request] operator[SEP] Keyword[throws] identifier[AbstractCosException] { identifier[request] operator[SEP] identifier[check_param] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[url] operator[=] identifier[buildUrl] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[long] identifier[signExpired] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[/] Other[1000] operator[+] Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[getSignExpired] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[sign] operator[=] identifier[Sign] operator[SEP] identifier[getPeriodEffectiveSign] operator[SEP] identifier[request] operator[SEP] identifier[getBucketName] operator[SEP] operator[SEP] , identifier[request] operator[SEP] identifier[getCosPath] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[cred] , identifier[signExpired] operator[SEP] operator[SEP] identifier[HttpRequest] identifier[httpRequest] operator[=] Keyword[new] identifier[HttpRequest] operator[SEP] operator[SEP] operator[SEP] identifier[httpRequest] operator[SEP] identifier[setUrl] operator[SEP] identifier[url] operator[SEP] operator[SEP] identifier[httpRequest] operator[SEP] identifier[addHeader] operator[SEP] identifier[RequestHeaderKey] operator[SEP] identifier[Authorization] , identifier[sign] operator[SEP] operator[SEP] identifier[httpRequest] operator[SEP] identifier[addHeader] operator[SEP] identifier[RequestHeaderKey] operator[SEP] identifier[USER_AGENT] , Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[getUserAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[httpRequest] operator[SEP] identifier[addParam] operator[SEP] identifier[RequestBodyKey] operator[SEP] identifier[OP] , identifier[RequestBodyValue] operator[SEP] identifier[OP] operator[SEP] identifier[STAT] operator[SEP] operator[SEP] identifier[httpRequest] operator[SEP] identifier[setMethod] operator[SEP] identifier[HttpMethod] operator[SEP] identifier[GET] operator[SEP] operator[SEP] Keyword[return] identifier[httpClient] operator[SEP] identifier[sendHttpRequest] operator[SEP] identifier[httpRequest] operator[SEP] operator[SEP] }
private void markUnusedParameters(Node paramList, Scope fparamScope) { for (Node param = paramList.getFirstChild(); param != null; param = param.getNext()) { if (param.isUnusedParameter()) { continue; } Node lValue = nameOfParam(param); if (lValue == null) { continue; } VarInfo varInfo = traverseNameNode(lValue, fparamScope); if (varInfo.isRemovable()) { param.setUnusedParameter(true); compiler.reportChangeToEnclosingScope(paramList); } } }
class class_name[name] begin[{] method[markUnusedParameters, return_type[void], modifier[private], parameter[paramList, fparamScope]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isUnusedParameter, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=nameOfParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=lValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lValue, 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=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=lValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fparamScope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=traverseNameNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=varInfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=VarInfo, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isRemovable, postfix_operators=[], prefix_operators=[], qualifier=varInfo, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setUnusedParameter, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=paramList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportChangeToEnclosingScope, postfix_operators=[], prefix_operators=[], qualifier=compiler, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=getFirstChild, postfix_operators=[], prefix_operators=[], qualifier=paramList, selectors=[], type_arguments=None), name=param)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getNext, postfix_operators=[], prefix_operators=[], qualifier=param, selectors=[], type_arguments=None))]), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[markUnusedParameters] operator[SEP] identifier[Node] identifier[paramList] , identifier[Scope] identifier[fparamScope] operator[SEP] { Keyword[for] operator[SEP] identifier[Node] identifier[param] operator[=] identifier[paramList] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] identifier[param] operator[!=] Other[null] operator[SEP] identifier[param] operator[=] identifier[param] operator[SEP] identifier[getNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[param] operator[SEP] identifier[isUnusedParameter] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[Node] identifier[lValue] operator[=] identifier[nameOfParam] operator[SEP] identifier[param] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lValue] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } identifier[VarInfo] identifier[varInfo] operator[=] identifier[traverseNameNode] operator[SEP] identifier[lValue] , identifier[fparamScope] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[varInfo] operator[SEP] identifier[isRemovable] operator[SEP] operator[SEP] operator[SEP] { identifier[param] operator[SEP] identifier[setUnusedParameter] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[compiler] operator[SEP] identifier[reportChangeToEnclosingScope] operator[SEP] identifier[paramList] operator[SEP] operator[SEP] } } }
static String getClassSignature(String[] interfaces, String className, String apiName) { StringBuilder signature; signature = new StringBuilder("<Z::" + XsdSupportingStructure.elementTypeDesc + ">" + JAVA_OBJECT_DESC); if (interfaces != null){ for (String anInterface : interfaces) { signature.append("L") .append(getFullClassTypeName(anInterface, apiName)) .append("<L") .append(getFullClassTypeName(className, apiName)) .append("<TZ;>;TZ;>;"); } } return signature.toString(); }
class class_name[name] begin[{] method[getClassSignature, return_type[type[String]], modifier[static], parameter[interfaces, className, apiName]] begin[{] local_variable[type[StringBuilder], signature] assign[member[.signature], ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<Z::"), operandr=MemberReference(member=elementTypeDesc, postfix_operators=[], prefix_operators=[], qualifier=XsdSupportingStructure, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=">"), operator=+), operandr=MemberReference(member=JAVA_OBJECT_DESC, 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=StringBuilder, sub_type=None))] if[binary_operation[member[.interfaces], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="L")], member=append, postfix_operators=[], prefix_operators=[], qualifier=signature, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=anInterface, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=apiName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFullClassTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<L")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=apiName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFullClassTypeName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<TZ;>;TZ;>;")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=interfaces, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=anInterface)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] return[call[signature.toString, parameter[]]] end[}] END[}]
Keyword[static] identifier[String] identifier[getClassSignature] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[interfaces] , identifier[String] identifier[className] , identifier[String] identifier[apiName] operator[SEP] { identifier[StringBuilder] identifier[signature] operator[SEP] identifier[signature] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] literal[String] operator[+] identifier[XsdSupportingStructure] operator[SEP] identifier[elementTypeDesc] operator[+] literal[String] operator[+] identifier[JAVA_OBJECT_DESC] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[interfaces] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[anInterface] operator[:] identifier[interfaces] operator[SEP] { identifier[signature] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[getFullClassTypeName] operator[SEP] identifier[anInterface] , identifier[apiName] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[getFullClassTypeName] operator[SEP] identifier[className] , identifier[apiName] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[return] identifier[signature] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public GISModel getModel () throws java.io.IOException { checkModelType(); int correctionConstant = getCorrectionConstant(); double correctionParam = getCorrectionParameter(); String[] outcomeLabels = getOutcomes(); int[][] outcomePatterns = getOutcomePatterns(); String[] predLabels = getPredicates(); Context[] params = getParameters(outcomePatterns); return new GISModel(params, predLabels, outcomeLabels, correctionConstant, correctionParam); }
class class_name[name] begin[{] method[getModel, return_type[type[GISModel]], modifier[public], parameter[]] begin[{] call[.checkModelType, parameter[]] local_variable[type[int], correctionConstant] local_variable[type[double], correctionParam] local_variable[type[String], outcomeLabels] local_variable[type[int], outcomePatterns] local_variable[type[String], predLabels] local_variable[type[Context], params] return[ClassCreator(arguments=[MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=predLabels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outcomeLabels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=correctionConstant, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=correctionParam, 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=GISModel, sub_type=None))] end[}] END[}]
Keyword[public] identifier[GISModel] identifier[getModel] operator[SEP] operator[SEP] Keyword[throws] identifier[java] operator[SEP] identifier[io] operator[SEP] identifier[IOException] { identifier[checkModelType] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[correctionConstant] operator[=] identifier[getCorrectionConstant] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[correctionParam] operator[=] identifier[getCorrectionParameter] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[outcomeLabels] operator[=] identifier[getOutcomes] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[outcomePatterns] operator[=] identifier[getOutcomePatterns] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[predLabels] operator[=] identifier[getPredicates] operator[SEP] operator[SEP] operator[SEP] identifier[Context] operator[SEP] operator[SEP] identifier[params] operator[=] identifier[getParameters] operator[SEP] identifier[outcomePatterns] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[GISModel] operator[SEP] identifier[params] , identifier[predLabels] , identifier[outcomeLabels] , identifier[correctionConstant] , identifier[correctionParam] operator[SEP] operator[SEP] }
public boolean removeAfter(Node node) { if (node == null || node.next == null) { return false; } if (node.next == last) { last = node; } node.next = node.next.next; return true; }
class class_name[name] begin[{] method[removeAfter, return_type[type[boolean]], modifier[public], parameter[node]] begin[{] if[binary_operation[binary_operation[member[.node], ==, literal[null]], ||, binary_operation[member[node.next], ==, literal[null]]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[member[node.next], ==, member[.last]]] begin[{] assign[member[.last], member[.node]] else begin[{] None end[}] assign[member[node.next], member[node.next.next]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[removeAfter] operator[SEP] identifier[Node] identifier[node] operator[SEP] { Keyword[if] operator[SEP] identifier[node] operator[==] Other[null] operator[||] identifier[node] operator[SEP] identifier[next] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[next] operator[==] identifier[last] operator[SEP] { identifier[last] operator[=] identifier[node] operator[SEP] } identifier[node] operator[SEP] identifier[next] operator[=] identifier[node] operator[SEP] identifier[next] operator[SEP] identifier[next] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
@Override public Output render(TemplateContentData templateContentData, Map<String, Object> dataMap) throws TemplateRendererException { byte[] contentBytes = templateContentData.getTemplateContent(); try (Reader reader = new InputStreamReader(new ByteArrayInputStream(contentBytes), STANDARD_CHARSET); ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); Writer writer = new OutputStreamWriter(byteArrayOutputStream, STANDARD_CHARSET)) { updateLoadingConfig(templateContentData); Template template = new Template(templateContentData.getIdentifier(), reader, configuration); template.process(dataMap, writer); return unmarshaller.unmarshall(byteArrayOutputStream.toByteArray()).get().getUnmarshalledRequest(); } catch (IOException e) { String exceptionMsg = "Unable to process invalid template"; throw throwException(exceptionMsg, e, templateContentData, dataMap); } catch (TemplateException e) { String exceptionMsg = "Unable to process template"; throw throwException(exceptionMsg, e, templateContentData, dataMap); } catch (AskSdkException e) { String exceptionMsg = "Unable to unmarshall template"; throw throwException(exceptionMsg, e, templateContentData, dataMap); } }
class class_name[name] begin[{] method[render, return_type[type[Output]], modifier[public], parameter[templateContentData, dataMap]] begin[{] local_variable[type[byte], contentBytes] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=templateContentData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateLoadingConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getIdentifier, postfix_operators=[], prefix_operators=[], qualifier=templateContentData, selectors=[], type_arguments=None), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configuration, 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=Template, sub_type=None)), name=template)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Template, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dataMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=writer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=process, postfix_operators=[], prefix_operators=[], qualifier=template, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toByteArray, postfix_operators=[], prefix_operators=[], qualifier=byteArrayOutputStream, selectors=[], type_arguments=None)], member=unmarshall, postfix_operators=[], prefix_operators=[], qualifier=unmarshaller, selectors=[MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getUnmarshalledRequest, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to process invalid template"), name=exceptionMsg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=exceptionMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=templateContentData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dataMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=throwException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to process template"), name=exceptionMsg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=exceptionMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=templateContentData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dataMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=throwException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['TemplateException'])), CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to unmarshall template"), name=exceptionMsg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=exceptionMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=templateContentData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dataMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=throwException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['AskSdkException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=reader, type=ReferenceType(arguments=None, dimensions=[], name=Reader, sub_type=None), value=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=contentBytes, 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=ByteArrayInputStream, sub_type=None)), MemberReference(member=STANDARD_CHARSET, 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=InputStreamReader, sub_type=None))), TryResource(annotations=[], modifiers=set(), name=byteArrayOutputStream, type=ReferenceType(arguments=None, dimensions=[], name=ByteArrayOutputStream, sub_type=None), value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayOutputStream, sub_type=None))), TryResource(annotations=[], modifiers=set(), name=writer, type=ReferenceType(arguments=None, dimensions=[], name=Writer, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=byteArrayOutputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=STANDARD_CHARSET, 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=OutputStreamWriter, sub_type=None)))]) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Output] identifier[render] operator[SEP] identifier[TemplateContentData] identifier[templateContentData] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[dataMap] operator[SEP] Keyword[throws] identifier[TemplateRendererException] { Keyword[byte] operator[SEP] operator[SEP] identifier[contentBytes] operator[=] identifier[templateContentData] operator[SEP] identifier[getTemplateContent] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[Reader] identifier[reader] operator[=] Keyword[new] identifier[InputStreamReader] operator[SEP] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[contentBytes] operator[SEP] , identifier[STANDARD_CHARSET] operator[SEP] operator[SEP] identifier[ByteArrayOutputStream] identifier[byteArrayOutputStream] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[Writer] identifier[writer] operator[=] Keyword[new] identifier[OutputStreamWriter] operator[SEP] identifier[byteArrayOutputStream] , identifier[STANDARD_CHARSET] operator[SEP] operator[SEP] { identifier[updateLoadingConfig] operator[SEP] identifier[templateContentData] operator[SEP] operator[SEP] identifier[Template] identifier[template] operator[=] Keyword[new] identifier[Template] operator[SEP] identifier[templateContentData] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] , identifier[reader] , identifier[configuration] operator[SEP] operator[SEP] identifier[template] operator[SEP] identifier[process] operator[SEP] identifier[dataMap] , identifier[writer] operator[SEP] operator[SEP] Keyword[return] identifier[unmarshaller] operator[SEP] identifier[unmarshall] operator[SEP] identifier[byteArrayOutputStream] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getUnmarshalledRequest] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[String] identifier[exceptionMsg] operator[=] literal[String] operator[SEP] Keyword[throw] identifier[throwException] operator[SEP] identifier[exceptionMsg] , identifier[e] , identifier[templateContentData] , identifier[dataMap] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[TemplateException] identifier[e] operator[SEP] { identifier[String] identifier[exceptionMsg] operator[=] literal[String] operator[SEP] Keyword[throw] identifier[throwException] operator[SEP] identifier[exceptionMsg] , identifier[e] , identifier[templateContentData] , identifier[dataMap] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[AskSdkException] identifier[e] operator[SEP] { identifier[String] identifier[exceptionMsg] operator[=] literal[String] operator[SEP] Keyword[throw] identifier[throwException] operator[SEP] identifier[exceptionMsg] , identifier[e] , identifier[templateContentData] , identifier[dataMap] operator[SEP] operator[SEP] } }