code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public S betns(String left, String right) { return betn(left, right).late(); }
class class_name[name] begin[{] method[betns, return_type[type[S]], modifier[public], parameter[left, right]] begin[{] return[call[.betn, parameter[member[.left], member[.right]]]] end[}] END[}]
Keyword[public] identifier[S] identifier[betns] operator[SEP] identifier[String] identifier[left] , identifier[String] identifier[right] operator[SEP] { Keyword[return] identifier[betn] operator[SEP] identifier[left] , identifier[right] operator[SEP] operator[SEP] identifier[late] operator[SEP] operator[SEP] operator[SEP] }
public void addPartial(final String key, final String name) { notNull(key); notNull(name); View view = this.getView(); if (view != null && view instanceof MustacheView) { // First try to not pollute view model object final MustacheView mustacheView = (MustacheView) view; mustacheView.addAlias(key, name); } else { // Otherwise, add partials to model object final Map<String, String> currentPartials = getPartials(); currentPartials.put(key, name); super.addObject(MustacheSettings.PARTIALS_KEY, currentPartials); } }
class class_name[name] begin[{] method[addPartial, return_type[void], modifier[public], parameter[key, name]] begin[{] call[.notNull, parameter[member[.key]]] call[.notNull, parameter[member[.name]]] local_variable[type[View], view] if[binary_operation[binary_operation[member[.view], !=, literal[null]], &&, binary_operation[member[.view], instanceof, type[MustacheView]]]] begin[{] local_variable[type[MustacheView], mustacheView] call[mustacheView.addAlias, parameter[member[.key], member[.name]]] else begin[{] local_variable[type[Map], currentPartials] call[currentPartials.put, parameter[member[.key], member[.name]]] SuperMethodInvocation(arguments=[MemberReference(member=PARTIALS_KEY, postfix_operators=[], prefix_operators=[], qualifier=MustacheSettings, selectors=[]), MemberReference(member=currentPartials, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addObject, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addPartial] operator[SEP] Keyword[final] identifier[String] identifier[key] , Keyword[final] identifier[String] identifier[name] operator[SEP] { identifier[notNull] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[notNull] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[View] identifier[view] operator[=] Keyword[this] operator[SEP] identifier[getView] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[view] operator[!=] Other[null] operator[&&] identifier[view] Keyword[instanceof] identifier[MustacheView] operator[SEP] { Keyword[final] identifier[MustacheView] identifier[mustacheView] operator[=] operator[SEP] identifier[MustacheView] operator[SEP] identifier[view] operator[SEP] identifier[mustacheView] operator[SEP] identifier[addAlias] operator[SEP] identifier[key] , identifier[name] operator[SEP] operator[SEP] } Keyword[else] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[currentPartials] operator[=] identifier[getPartials] operator[SEP] operator[SEP] operator[SEP] identifier[currentPartials] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[name] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[addObject] operator[SEP] identifier[MustacheSettings] operator[SEP] identifier[PARTIALS_KEY] , identifier[currentPartials] operator[SEP] operator[SEP] } }
public JobInner update(String resourceGroupName, String accountName, String transformName, String jobName, JobInner parameters) { return updateWithServiceResponseAsync(resourceGroupName, accountName, transformName, jobName, parameters).toBlocking().single().body(); }
class class_name[name] begin[{] method[update, return_type[type[JobInner]], modifier[public], parameter[resourceGroupName, accountName, transformName, jobName, parameters]] begin[{] return[call[.updateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.accountName], member[.transformName], member[.jobName], member[.parameters]]]] end[}] END[}]
Keyword[public] identifier[JobInner] identifier[update] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[accountName] , identifier[String] identifier[transformName] , identifier[String] identifier[jobName] , identifier[JobInner] identifier[parameters] operator[SEP] { Keyword[return] identifier[updateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[accountName] , identifier[transformName] , identifier[jobName] , identifier[parameters] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
@Override public void saveRequest(HttpServletRequest request, HttpServletResponse response) { if (anyRequestMatcher.matches(request) && !ajaxRequestMatcher.matches(request)) { DefaultSavedRequest savedRequest = new DefaultSavedRequest(request, portResolver); HttpUtils.setStateParam(Config.RETURNTO_COOKIE, Utils.base64enc(savedRequest.getRedirectUrl().getBytes()), request, response); } }
class class_name[name] begin[{] method[saveRequest, return_type[void], modifier[public], parameter[request, response]] begin[{] if[binary_operation[call[anyRequestMatcher.matches, parameter[member[.request]]], &&, call[ajaxRequestMatcher.matches, parameter[member[.request]]]]] begin[{] local_variable[type[DefaultSavedRequest], savedRequest] call[HttpUtils.setStateParam, parameter[member[Config.RETURNTO_COOKIE], call[Utils.base64enc, parameter[call[savedRequest.getRedirectUrl, parameter[]]]], member[.request], member[.response]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[saveRequest] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator[SEP] { Keyword[if] operator[SEP] identifier[anyRequestMatcher] operator[SEP] identifier[matches] operator[SEP] identifier[request] operator[SEP] operator[&&] operator[!] identifier[ajaxRequestMatcher] operator[SEP] identifier[matches] operator[SEP] identifier[request] operator[SEP] operator[SEP] { identifier[DefaultSavedRequest] identifier[savedRequest] operator[=] Keyword[new] identifier[DefaultSavedRequest] operator[SEP] identifier[request] , identifier[portResolver] operator[SEP] operator[SEP] identifier[HttpUtils] operator[SEP] identifier[setStateParam] operator[SEP] identifier[Config] operator[SEP] identifier[RETURNTO_COOKIE] , identifier[Utils] operator[SEP] identifier[base64enc] operator[SEP] identifier[savedRequest] operator[SEP] identifier[getRedirectUrl] operator[SEP] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] , identifier[request] , identifier[response] operator[SEP] operator[SEP] } }
public JavaDoubleRDD scoreExamples(JavaRDD<DataSet> data, boolean includeRegularizationTerms, int batchSize) { return data.mapPartitionsToDouble(new ScoreExamplesFunction(sc.broadcast(network.params()), sc.broadcast(conf.toJson()), includeRegularizationTerms, batchSize)); }
class class_name[name] begin[{] method[scoreExamples, return_type[type[JavaDoubleRDD]], modifier[public], parameter[data, includeRegularizationTerms, batchSize]] begin[{] return[call[data.mapPartitionsToDouble, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=params, postfix_operators=[], prefix_operators=[], qualifier=network, selectors=[], type_arguments=None)], member=broadcast, postfix_operators=[], prefix_operators=[], qualifier=sc, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toJson, postfix_operators=[], prefix_operators=[], qualifier=conf, selectors=[], type_arguments=None)], member=broadcast, postfix_operators=[], prefix_operators=[], qualifier=sc, selectors=[], type_arguments=None), MemberReference(member=includeRegularizationTerms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=batchSize, 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=ScoreExamplesFunction, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[JavaDoubleRDD] identifier[scoreExamples] operator[SEP] identifier[JavaRDD] operator[<] identifier[DataSet] operator[>] identifier[data] , Keyword[boolean] identifier[includeRegularizationTerms] , Keyword[int] identifier[batchSize] operator[SEP] { Keyword[return] identifier[data] operator[SEP] identifier[mapPartitionsToDouble] operator[SEP] Keyword[new] identifier[ScoreExamplesFunction] operator[SEP] identifier[sc] operator[SEP] identifier[broadcast] operator[SEP] identifier[network] operator[SEP] identifier[params] operator[SEP] operator[SEP] operator[SEP] , identifier[sc] operator[SEP] identifier[broadcast] operator[SEP] identifier[conf] operator[SEP] identifier[toJson] operator[SEP] operator[SEP] operator[SEP] , identifier[includeRegularizationTerms] , identifier[batchSize] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unused") private int findEndOfNowikiGreedy (int startBlock) { // NOTE: this method could step back one char from startBlock position int nextBlock=startBlock-3; do { do { nextBlock=wikiText.indexOf("{{{", nextBlock+3); } while (nextBlock>0 && wikiChars[nextBlock-1]=='~'); if (nextBlock<0) nextBlock=wikiLength; int endBlock=wikiText.lastIndexOf("}}}", nextBlock); if (endBlock>=startBlock && wikiChars[endBlock-1]!='~') return endBlock; } while (nextBlock<wikiLength); return wikiLength; }
class class_name[name] begin[{] method[findEndOfNowikiGreedy, return_type[type[int]], modifier[private], parameter[startBlock]] begin[{] local_variable[type[int], nextBlock] do[binary_operation[member[.nextBlock], <, member[.wikiLength]]] begin[{] do[binary_operation[binary_operation[member[.nextBlock], >, literal[0]], &&, binary_operation[member[.wikiChars], ==, literal['~']]]] begin[{] assign[member[.nextBlock], call[wikiText.indexOf, parameter[literal["{{{"], binary_operation[member[.nextBlock], +, literal[3]]]]] end[}] if[binary_operation[member[.nextBlock], <, literal[0]]] begin[{] assign[member[.nextBlock], member[.wikiLength]] else begin[{] None end[}] local_variable[type[int], endBlock] if[binary_operation[binary_operation[member[.endBlock], >=, member[.startBlock]], &&, binary_operation[member[.wikiChars], !=, literal['~']]]] begin[{] return[member[.endBlock]] else begin[{] None end[}] end[}] return[member[.wikiLength]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[int] identifier[findEndOfNowikiGreedy] operator[SEP] Keyword[int] identifier[startBlock] operator[SEP] { Keyword[int] identifier[nextBlock] operator[=] identifier[startBlock] operator[-] Other[3] operator[SEP] Keyword[do] { Keyword[do] { identifier[nextBlock] operator[=] identifier[wikiText] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , identifier[nextBlock] operator[+] Other[3] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[nextBlock] operator[>] Other[0] operator[&&] identifier[wikiChars] operator[SEP] identifier[nextBlock] operator[-] Other[1] operator[SEP] operator[==] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nextBlock] operator[<] Other[0] operator[SEP] identifier[nextBlock] operator[=] identifier[wikiLength] operator[SEP] Keyword[int] identifier[endBlock] operator[=] identifier[wikiText] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] , identifier[nextBlock] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[endBlock] operator[>=] identifier[startBlock] operator[&&] identifier[wikiChars] operator[SEP] identifier[endBlock] operator[-] Other[1] operator[SEP] operator[!=] literal[String] operator[SEP] Keyword[return] identifier[endBlock] operator[SEP] } Keyword[while] operator[SEP] identifier[nextBlock] operator[<] identifier[wikiLength] operator[SEP] operator[SEP] Keyword[return] identifier[wikiLength] operator[SEP] }
public static <T> Union<T> unionAll(SubQueryExpression<T>... sq) { return new SQLQuery<Void>().unionAll(sq); }
class class_name[name] begin[{] method[unionAll, return_type[type[Union]], modifier[public static], parameter[sq]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=sq, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unionAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Void, sub_type=None))], dimensions=None, name=SQLQuery, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Union] operator[<] identifier[T] operator[>] identifier[unionAll] operator[SEP] identifier[SubQueryExpression] operator[<] identifier[T] operator[>] operator[...] identifier[sq] operator[SEP] { Keyword[return] Keyword[new] identifier[SQLQuery] operator[<] identifier[Void] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[unionAll] operator[SEP] identifier[sq] operator[SEP] operator[SEP] }
public OvhTask organizationName_service_exchangeService_account_primaryEmailAddress_archive_POST(String organizationName, String exchangeService, String primaryEmailAddress, Long quota) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/account/{primaryEmailAddress}/archive"; StringBuilder sb = path(qPath, organizationName, exchangeService, primaryEmailAddress); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "quota", quota); String resp = exec(qPath, "POST", sb.toString(), o); return convertTo(resp, OvhTask.class); }
class class_name[name] begin[{] method[organizationName_service_exchangeService_account_primaryEmailAddress_archive_POST, return_type[type[OvhTask]], modifier[public], parameter[organizationName, exchangeService, primaryEmailAddress, quota]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[HashMap], o] call[.addBody, parameter[member[.o], literal["quota"], member[.quota]]] local_variable[type[String], resp] return[call[.convertTo, parameter[member[.resp], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OvhTask, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhTask] identifier[organizationName_service_exchangeService_account_primaryEmailAddress_archive_POST] operator[SEP] identifier[String] identifier[organizationName] , identifier[String] identifier[exchangeService] , identifier[String] identifier[primaryEmailAddress] , identifier[Long] identifier[quota] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[organizationName] , identifier[exchangeService] , identifier[primaryEmailAddress] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] identifier[o] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[addBody] operator[SEP] identifier[o] , literal[String] , identifier[quota] operator[SEP] operator[SEP] identifier[String] identifier[resp] operator[=] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[o] operator[SEP] operator[SEP] Keyword[return] identifier[convertTo] operator[SEP] identifier[resp] , identifier[OvhTask] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public IfcCurtainWallTypeEnum createIfcCurtainWallTypeEnumFromString(EDataType eDataType, String initialValue) { IfcCurtainWallTypeEnum result = IfcCurtainWallTypeEnum.get(initialValue); if (result == null) throw new IllegalArgumentException( "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; }
class class_name[name] begin[{] method[createIfcCurtainWallTypeEnumFromString, return_type[type[IfcCurtainWallTypeEnum]], modifier[public], parameter[eDataType, initialValue]] begin[{] local_variable[type[IfcCurtainWallTypeEnum], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The value '"), operandr=MemberReference(member=initialValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not a valid enumerator of '"), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=eDataType, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[IfcCurtainWallTypeEnum] identifier[createIfcCurtainWallTypeEnumFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] { identifier[IfcCurtainWallTypeEnum] identifier[result] operator[=] identifier[IfcCurtainWallTypeEnum] operator[SEP] identifier[get] operator[SEP] identifier[initialValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[initialValue] operator[+] literal[String] operator[+] identifier[eDataType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public void evaluateAnalogies(Matrix projection, String inputFileName, String outputFileName) { try { Scanner sc = new Scanner(new File(inputFileName)); PrintStream out = new PrintStream(new FileOutputStream(outputFileName)); while (sc.hasNext()) { String analogy = sc.next(); if (!isAnalogyFormat(analogy,true)) { System.err.println("\"" + analogy + "\" not in proper format."); continue; } double cosineVal = computeCosineSimilarity(analogy, projection); //does the actual cosine value calculations and comparisons out.println(analogy + " = " + cosineVal); } sc.close(); out.close(); } catch (Exception e) { System.err.println("Could not read file."); } }
class class_name[name] begin[{] method[evaluateAnalogies, return_type[void], modifier[public], parameter[projection, inputFileName, outputFileName]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=inputFileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Scanner, sub_type=None)), name=sc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Scanner, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=outputFileName, 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=PrintStream, sub_type=None)), name=out)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PrintStream, sub_type=None)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=sc, selectors=[], type_arguments=None), name=analogy)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=analogy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=isAnalogyFormat, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\""), operandr=MemberReference(member=analogy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\" not in proper format."), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, selectors=[], type_arguments=None), label=None), ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=analogy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=projection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=computeCosineSimilarity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=cosineVal)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=analogy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" = "), operator=+), operandr=MemberReference(member=cosineVal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=hasNext, postfix_operators=[], prefix_operators=[], qualifier=sc, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=sc, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not read file.")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.err, 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) end[}] END[}]
Keyword[public] Keyword[void] identifier[evaluateAnalogies] operator[SEP] identifier[Matrix] identifier[projection] , identifier[String] identifier[inputFileName] , identifier[String] identifier[outputFileName] operator[SEP] { Keyword[try] { identifier[Scanner] identifier[sc] operator[=] Keyword[new] identifier[Scanner] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[inputFileName] operator[SEP] operator[SEP] operator[SEP] identifier[PrintStream] identifier[out] operator[=] Keyword[new] identifier[PrintStream] operator[SEP] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[outputFileName] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[sc] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[analogy] operator[=] identifier[sc] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isAnalogyFormat] operator[SEP] identifier[analogy] , literal[boolean] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[analogy] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] } Keyword[double] identifier[cosineVal] operator[=] identifier[computeCosineSimilarity] operator[SEP] identifier[analogy] , identifier[projection] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[analogy] operator[+] literal[String] operator[+] identifier[cosineVal] operator[SEP] operator[SEP] } identifier[sc] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[System] operator[SEP] identifier[err] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } }
@Deprecated @Override public StringBuffer format(final Calendar calendar, final StringBuffer buf) { return printer.format(calendar, buf); }
class class_name[name] begin[{] method[format, return_type[type[StringBuffer]], modifier[public], parameter[calendar, buf]] begin[{] return[call[printer.format, parameter[member[.calendar], member[.buf]]]] end[}] END[}]
annotation[@] identifier[Deprecated] annotation[@] identifier[Override] Keyword[public] identifier[StringBuffer] identifier[format] operator[SEP] Keyword[final] identifier[Calendar] identifier[calendar] , Keyword[final] identifier[StringBuffer] identifier[buf] operator[SEP] { Keyword[return] identifier[printer] operator[SEP] identifier[format] operator[SEP] identifier[calendar] , identifier[buf] operator[SEP] operator[SEP] }
public final void readLELongs(long lbuf[], int n) throws IOException { int nLeft = n; int lCount = 0; int nToRead = kLongs; while (nLeft > 0) { if (nToRead > nLeft) nToRead = nLeft; readFully(byteWorkSpace, 0, 8 * nToRead); int j = 0; for (int i = 0; i < nToRead; i++) { lbuf[lCount++] = (long) (byteWorkSpace[j] & 0xff) | (long) (byteWorkSpace[j + 1] & 0xff) << 8 | (long) (byteWorkSpace[j + 2] & 0xff) << 16 | (long) (byteWorkSpace[j + 3] & 0xff) << 24 | (long) (byteWorkSpace[j + 4] & 0xff) << 32 | (long) (byteWorkSpace[j + 5] & 0xff) << 40 | (long) (byteWorkSpace[j + 6] & 0xff) << 48 | (long) (byteWorkSpace[j + 7] & 0xff) << 56; j += 8; } nLeft -= nToRead; } }
class class_name[name] begin[{] method[readLELongs, return_type[void], modifier[final public], parameter[lbuf, n]] begin[{] local_variable[type[int], nLeft] local_variable[type[int], lCount] local_variable[type[int], nToRead] while[binary_operation[member[.nLeft], >, literal[0]]] begin[{] if[binary_operation[member[.nToRead], >, member[.nLeft]]] begin[{] assign[member[.nToRead], member[.nLeft]] else begin[{] None end[}] call[.readFully, parameter[member[.byteWorkSpace], literal[0], binary_operation[literal[8], *, member[.nToRead]]]] local_variable[type[int], j] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lbuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=lCount, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Cast(expression=BinaryOperation(operandl=MemberReference(member=byteWorkSpace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=long)), operandr=BinaryOperation(operandl=Cast(expression=BinaryOperation(operandl=MemberReference(member=byteWorkSpace, 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=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=long)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operator=|), operandr=BinaryOperation(operandl=Cast(expression=BinaryOperation(operandl=MemberReference(member=byteWorkSpace, 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=2), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=long)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=<<), operator=|), operandr=BinaryOperation(operandl=Cast(expression=BinaryOperation(operandl=MemberReference(member=byteWorkSpace, 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=3), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=long)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=<<), operator=|), operandr=BinaryOperation(operandl=Cast(expression=BinaryOperation(operandl=MemberReference(member=byteWorkSpace, 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=4), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=long)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), operator=<<), operator=|), operandr=BinaryOperation(operandl=Cast(expression=BinaryOperation(operandl=MemberReference(member=byteWorkSpace, 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=5), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=long)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=40), operator=<<), operator=|), operandr=BinaryOperation(operandl=Cast(expression=BinaryOperation(operandl=MemberReference(member=byteWorkSpace, 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=6), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=long)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=48), operator=<<), operator=|), operandr=BinaryOperation(operandl=Cast(expression=BinaryOperation(operandl=MemberReference(member=byteWorkSpace, 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=7), operator=+))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), type=BasicType(dimensions=[], name=long)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=56), operator=<<), operator=|)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=nToRead, 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) assign[member[.nLeft], member[.nToRead]] end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[readLELongs] operator[SEP] Keyword[long] identifier[lbuf] operator[SEP] operator[SEP] , Keyword[int] identifier[n] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[nLeft] operator[=] identifier[n] operator[SEP] Keyword[int] identifier[lCount] operator[=] Other[0] operator[SEP] Keyword[int] identifier[nToRead] operator[=] identifier[kLongs] operator[SEP] Keyword[while] operator[SEP] identifier[nLeft] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[nToRead] operator[>] identifier[nLeft] operator[SEP] identifier[nToRead] operator[=] identifier[nLeft] operator[SEP] identifier[readFully] operator[SEP] identifier[byteWorkSpace] , Other[0] , Other[8] operator[*] identifier[nToRead] operator[SEP] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[nToRead] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[lbuf] operator[SEP] identifier[lCount] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[byteWorkSpace] operator[SEP] identifier[j] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[|] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[byteWorkSpace] operator[SEP] identifier[j] operator[+] Other[1] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[8] operator[|] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[byteWorkSpace] operator[SEP] identifier[j] operator[+] Other[2] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[16] operator[|] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[byteWorkSpace] operator[SEP] identifier[j] operator[+] Other[3] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[24] operator[|] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[byteWorkSpace] operator[SEP] identifier[j] operator[+] Other[4] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[32] operator[|] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[byteWorkSpace] operator[SEP] identifier[j] operator[+] Other[5] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[40] operator[|] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[byteWorkSpace] operator[SEP] identifier[j] operator[+] Other[6] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[48] operator[|] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[byteWorkSpace] operator[SEP] identifier[j] operator[+] Other[7] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[<<] Other[56] operator[SEP] identifier[j] operator[+=] Other[8] operator[SEP] } identifier[nLeft] operator[-=] identifier[nToRead] operator[SEP] } }
@XmlElementDecl(namespace = "", name = "besichtigungstermin_2") @XmlJavaTypeAdapter(Adapter4 .class) public JAXBElement<Calendar> createBesichtigungstermin2(Calendar value) { return new JAXBElement<Calendar>(_Besichtigungstermin2_QNAME, Calendar.class, null, value); }
class class_name[name] begin[{] method[createBesichtigungstermin2, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_Besichtigungstermin2_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Calendar, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Calendar, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] operator[SEP] annotation[@] identifier[XmlJavaTypeAdapter] operator[SEP] identifier[Adapter4] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[Calendar] operator[>] identifier[createBesichtigungstermin2] operator[SEP] identifier[Calendar] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[Calendar] operator[>] operator[SEP] identifier[_Besichtigungstermin2_QNAME] , identifier[Calendar] operator[SEP] Keyword[class] , Other[null] , identifier[value] operator[SEP] operator[SEP] }
private RtfHeaderFooterGroup convertHeaderFooter(HeaderFooter hf, int type) { if(hf != null) { if(hf instanceof RtfHeaderFooterGroup) { return new RtfHeaderFooterGroup(this.document, (RtfHeaderFooterGroup) hf, type); } else if(hf instanceof RtfHeaderFooter) { return new RtfHeaderFooterGroup(this.document, (RtfHeaderFooter) hf, type); } else { return new RtfHeaderFooterGroup(this.document, hf, type); } } else { return new RtfHeaderFooterGroup(this.document, type); } }
class class_name[name] begin[{] method[convertHeaderFooter, return_type[type[RtfHeaderFooterGroup]], modifier[private], parameter[hf, type]] begin[{] if[binary_operation[member[.hf], !=, literal[null]]] begin[{] if[binary_operation[member[.hf], instanceof, type[RtfHeaderFooterGroup]]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=document, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), Cast(expression=MemberReference(member=hf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RtfHeaderFooterGroup, sub_type=None)), MemberReference(member=type, 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=RtfHeaderFooterGroup, sub_type=None))] else begin[{] if[binary_operation[member[.hf], instanceof, type[RtfHeaderFooter]]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=document, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), Cast(expression=MemberReference(member=hf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RtfHeaderFooter, sub_type=None)), MemberReference(member=type, 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=RtfHeaderFooterGroup, sub_type=None))] else begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=document, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=hf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, 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=RtfHeaderFooterGroup, sub_type=None))] end[}] end[}] else begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=document, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=type, 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=RtfHeaderFooterGroup, sub_type=None))] end[}] end[}] END[}]
Keyword[private] identifier[RtfHeaderFooterGroup] identifier[convertHeaderFooter] operator[SEP] identifier[HeaderFooter] identifier[hf] , Keyword[int] identifier[type] operator[SEP] { Keyword[if] operator[SEP] identifier[hf] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[hf] Keyword[instanceof] identifier[RtfHeaderFooterGroup] operator[SEP] { Keyword[return] Keyword[new] identifier[RtfHeaderFooterGroup] operator[SEP] Keyword[this] operator[SEP] identifier[document] , operator[SEP] identifier[RtfHeaderFooterGroup] operator[SEP] identifier[hf] , identifier[type] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[hf] Keyword[instanceof] identifier[RtfHeaderFooter] operator[SEP] { Keyword[return] Keyword[new] identifier[RtfHeaderFooterGroup] operator[SEP] Keyword[this] operator[SEP] identifier[document] , operator[SEP] identifier[RtfHeaderFooter] operator[SEP] identifier[hf] , identifier[type] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[new] identifier[RtfHeaderFooterGroup] operator[SEP] Keyword[this] operator[SEP] identifier[document] , identifier[hf] , identifier[type] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] Keyword[new] identifier[RtfHeaderFooterGroup] operator[SEP] Keyword[this] operator[SEP] identifier[document] , identifier[type] operator[SEP] operator[SEP] } }
public void marshall(GetDeviceDefinitionVersionRequest getDeviceDefinitionVersionRequest, ProtocolMarshaller protocolMarshaller) { if (getDeviceDefinitionVersionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getDeviceDefinitionVersionRequest.getDeviceDefinitionId(), DEVICEDEFINITIONID_BINDING); protocolMarshaller.marshall(getDeviceDefinitionVersionRequest.getDeviceDefinitionVersionId(), DEVICEDEFINITIONVERSIONID_BINDING); protocolMarshaller.marshall(getDeviceDefinitionVersionRequest.getNextToken(), NEXTTOKEN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[getDeviceDefinitionVersionRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.getDeviceDefinitionVersionRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDeviceDefinitionId, postfix_operators=[], prefix_operators=[], qualifier=getDeviceDefinitionVersionRequest, selectors=[], type_arguments=None), MemberReference(member=DEVICEDEFINITIONID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDeviceDefinitionVersionId, postfix_operators=[], prefix_operators=[], qualifier=getDeviceDefinitionVersionRequest, selectors=[], type_arguments=None), MemberReference(member=DEVICEDEFINITIONVERSIONID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=getDeviceDefinitionVersionRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetDeviceDefinitionVersionRequest] identifier[getDeviceDefinitionVersionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[getDeviceDefinitionVersionRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[getDeviceDefinitionVersionRequest] operator[SEP] identifier[getDeviceDefinitionId] operator[SEP] operator[SEP] , identifier[DEVICEDEFINITIONID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[getDeviceDefinitionVersionRequest] operator[SEP] identifier[getDeviceDefinitionVersionId] operator[SEP] operator[SEP] , identifier[DEVICEDEFINITIONVERSIONID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[getDeviceDefinitionVersionRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public void write(Writer writer) throws IOException { BufferedWriter bw = new BufferedWriter(writer); if (vtzlines != null) { for (String line : vtzlines) { if (line.startsWith(ICAL_TZURL + COLON)) { if (tzurl != null) { bw.write(ICAL_TZURL); bw.write(COLON); bw.write(tzurl); bw.write(NEWLINE); } } else if (line.startsWith(ICAL_LASTMOD + COLON)) { if (lastmod != null) { bw.write(ICAL_LASTMOD); bw.write(COLON); bw.write(getUTCDateTimeString(lastmod.getTime())); bw.write(NEWLINE); } } else { bw.write(line); bw.write(NEWLINE); } } bw.flush(); } else { String[] customProperties = null; if (olsonzid != null && ICU_TZVERSION != null) { customProperties = new String[1]; customProperties[0] = ICU_TZINFO_PROP + COLON + olsonzid + "[" + ICU_TZVERSION + "]"; } writeZone(writer, tz, customProperties); } }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[writer]] begin[{] local_variable[type[BufferedWriter], bw] if[binary_operation[member[.vtzlines], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=ICAL_TZURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COLON, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=ICAL_LASTMOD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=COLON, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bw, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NEWLINE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bw, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lastmod, 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=ICAL_LASTMOD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bw, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=COLON, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bw, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTime, postfix_operators=[], prefix_operators=[], qualifier=lastmod, selectors=[], type_arguments=None)], member=getUTCDateTimeString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=write, postfix_operators=[], prefix_operators=[], qualifier=bw, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NEWLINE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bw, selectors=[], type_arguments=None), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=tzurl, 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=ICAL_TZURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bw, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=COLON, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bw, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tzurl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bw, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NEWLINE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=bw, selectors=[], type_arguments=None), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=vtzlines, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=line)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) call[bw.flush, parameter[]] else begin[{] local_variable[type[String], customProperties] if[binary_operation[binary_operation[member[.olsonzid], !=, literal[null]], &&, binary_operation[member[.ICU_TZVERSION], !=, literal[null]]]] begin[{] assign[member[.customProperties], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] assign[member[.customProperties], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[member[.ICU_TZINFO_PROP], +, member[.COLON]], +, member[.olsonzid]], +, literal["["]], +, member[.ICU_TZVERSION]], +, literal["]"]]] else begin[{] None end[}] call[.writeZone, parameter[member[.writer], member[.tz], member[.customProperties]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[Writer] identifier[writer] operator[SEP] Keyword[throws] identifier[IOException] { identifier[BufferedWriter] identifier[bw] operator[=] Keyword[new] identifier[BufferedWriter] operator[SEP] identifier[writer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[vtzlines] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[line] operator[:] identifier[vtzlines] operator[SEP] { Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[startsWith] operator[SEP] identifier[ICAL_TZURL] operator[+] identifier[COLON] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tzurl] operator[!=] Other[null] operator[SEP] { identifier[bw] operator[SEP] identifier[write] operator[SEP] identifier[ICAL_TZURL] operator[SEP] operator[SEP] identifier[bw] operator[SEP] identifier[write] operator[SEP] identifier[COLON] operator[SEP] operator[SEP] identifier[bw] operator[SEP] identifier[write] operator[SEP] identifier[tzurl] operator[SEP] operator[SEP] identifier[bw] operator[SEP] identifier[write] operator[SEP] identifier[NEWLINE] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[startsWith] operator[SEP] identifier[ICAL_LASTMOD] operator[+] identifier[COLON] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[lastmod] operator[!=] Other[null] operator[SEP] { identifier[bw] operator[SEP] identifier[write] operator[SEP] identifier[ICAL_LASTMOD] operator[SEP] operator[SEP] identifier[bw] operator[SEP] identifier[write] operator[SEP] identifier[COLON] operator[SEP] operator[SEP] identifier[bw] operator[SEP] identifier[write] operator[SEP] identifier[getUTCDateTimeString] operator[SEP] identifier[lastmod] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bw] operator[SEP] identifier[write] operator[SEP] identifier[NEWLINE] operator[SEP] operator[SEP] } } Keyword[else] { identifier[bw] operator[SEP] identifier[write] operator[SEP] identifier[line] operator[SEP] operator[SEP] identifier[bw] operator[SEP] identifier[write] operator[SEP] identifier[NEWLINE] operator[SEP] operator[SEP] } } identifier[bw] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[String] operator[SEP] operator[SEP] identifier[customProperties] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[olsonzid] operator[!=] Other[null] operator[&&] identifier[ICU_TZVERSION] operator[!=] Other[null] operator[SEP] { identifier[customProperties] operator[=] Keyword[new] identifier[String] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[customProperties] operator[SEP] Other[0] operator[SEP] operator[=] identifier[ICU_TZINFO_PROP] operator[+] identifier[COLON] operator[+] identifier[olsonzid] operator[+] literal[String] operator[+] identifier[ICU_TZVERSION] operator[+] literal[String] operator[SEP] } identifier[writeZone] operator[SEP] identifier[writer] , identifier[tz] , identifier[customProperties] operator[SEP] operator[SEP] } }
public Bundle saveInstanceState(@Nullable Bundle savedInstanceState, String prefix) { // handle our extensions for (IAdapterExtension<Item> ext : mExtensions.values()) { ext.saveInstanceState(savedInstanceState, prefix); } return savedInstanceState; }
class class_name[name] begin[{] method[saveInstanceState, return_type[type[Bundle]], modifier[public], parameter[savedInstanceState, prefix]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=savedInstanceState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=prefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=saveInstanceState, postfix_operators=[], prefix_operators=[], qualifier=ext, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=mExtensions, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ext)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Item, sub_type=None))], dimensions=[], name=IAdapterExtension, sub_type=None))), label=None) return[member[.savedInstanceState]] end[}] END[}]
Keyword[public] identifier[Bundle] identifier[saveInstanceState] operator[SEP] annotation[@] identifier[Nullable] identifier[Bundle] identifier[savedInstanceState] , identifier[String] identifier[prefix] operator[SEP] { Keyword[for] operator[SEP] identifier[IAdapterExtension] operator[<] identifier[Item] operator[>] identifier[ext] operator[:] identifier[mExtensions] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[ext] operator[SEP] identifier[saveInstanceState] operator[SEP] identifier[savedInstanceState] , identifier[prefix] operator[SEP] operator[SEP] } Keyword[return] identifier[savedInstanceState] operator[SEP] }
public void setValueTypes(List<ValueType<?>> valueTypes) { Validate.noNullElements(valueTypes); this.sqlExecutor.setValueTypes(valueTypes); this.callExecutor.setValueTypes(valueTypes); }
class class_name[name] begin[{] method[setValueTypes, return_type[void], modifier[public], parameter[valueTypes]] begin[{] call[Validate.noNullElements, parameter[member[.valueTypes]]] THIS[member[None.sqlExecutor]call[None.setValueTypes, parameter[member[.valueTypes]]]] THIS[member[None.callExecutor]call[None.setValueTypes, parameter[member[.valueTypes]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setValueTypes] operator[SEP] identifier[List] operator[<] identifier[ValueType] operator[<] operator[?] operator[>] operator[>] identifier[valueTypes] operator[SEP] { identifier[Validate] operator[SEP] identifier[noNullElements] operator[SEP] identifier[valueTypes] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[sqlExecutor] operator[SEP] identifier[setValueTypes] operator[SEP] identifier[valueTypes] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[callExecutor] operator[SEP] identifier[setValueTypes] operator[SEP] identifier[valueTypes] operator[SEP] operator[SEP] }
public SortedMap<String,Table> getTables() throws SQLException { synchronized(getTablesLock) { if(getTablesCache==null) { SortedMap<String,Table> newTables = new TreeMap<>(DatabaseMetaData.getCollator()); try (ResultSet results = catalog.getMetaData().getMetaData().getTables(catalog.getName(), name, null, null)) { while(results.next()) { Table newTable = new Table(this, results.getString("TABLE_NAME"), results.getString("TABLE_TYPE")); if(newTables.put(newTable.getName(), newTable)!=null) throw new AssertionError("Duplicate table: "+newTable); } } getTablesCache = AoCollections.optimalUnmodifiableSortedMap(newTables); } return getTablesCache; } }
class class_name[name] begin[{] method[getTables, return_type[type[SortedMap]], modifier[public], parameter[]] begin[{] SYNCHRONIZED[member[.getTablesLock]] BEGIN[{] if[binary_operation[member[.getTablesCache], ==, literal[null]]] begin[{] local_variable[type[SortedMap], newTables] TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TABLE_NAME")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TABLE_TYPE")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Table, sub_type=None)), name=newTable)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Table, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=newTable, selectors=[], type_arguments=None), MemberReference(member=newTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=newTables, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Duplicate table: "), operandr=MemberReference(member=newTable, 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=AssertionError, sub_type=None)), label=None))]), condition=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=results, type=ReferenceType(arguments=None, dimensions=[], name=ResultSet, sub_type=None), value=MethodInvocation(arguments=[], member=getMetaData, postfix_operators=[], prefix_operators=[], qualifier=catalog, selectors=[MethodInvocation(arguments=[], member=getMetaData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=catalog, selectors=[], type_arguments=None), MemberReference(member=name, 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)], member=getTables, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None))]) assign[member[.getTablesCache], call[AoCollections.optimalUnmodifiableSortedMap, parameter[member[.newTables]]]] else begin[{] None end[}] return[member[.getTablesCache]] END[}] end[}] END[}]
Keyword[public] identifier[SortedMap] operator[<] identifier[String] , identifier[Table] operator[>] identifier[getTables] operator[SEP] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[synchronized] operator[SEP] identifier[getTablesLock] operator[SEP] { Keyword[if] operator[SEP] identifier[getTablesCache] operator[==] Other[null] operator[SEP] { identifier[SortedMap] operator[<] identifier[String] , identifier[Table] operator[>] identifier[newTables] operator[=] Keyword[new] identifier[TreeMap] operator[<] operator[>] operator[SEP] identifier[DatabaseMetaData] operator[SEP] identifier[getCollator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[ResultSet] identifier[results] operator[=] identifier[catalog] operator[SEP] identifier[getMetaData] operator[SEP] operator[SEP] operator[SEP] identifier[getMetaData] operator[SEP] operator[SEP] operator[SEP] identifier[getTables] operator[SEP] identifier[catalog] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[name] , Other[null] , Other[null] operator[SEP] operator[SEP] { Keyword[while] operator[SEP] identifier[results] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] { identifier[Table] identifier[newTable] operator[=] Keyword[new] identifier[Table] operator[SEP] Keyword[this] , identifier[results] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] , identifier[results] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newTables] operator[SEP] identifier[put] operator[SEP] identifier[newTable] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[newTable] operator[SEP] operator[!=] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[AssertionError] operator[SEP] literal[String] operator[+] identifier[newTable] operator[SEP] operator[SEP] } } identifier[getTablesCache] operator[=] identifier[AoCollections] operator[SEP] identifier[optimalUnmodifiableSortedMap] operator[SEP] identifier[newTables] operator[SEP] operator[SEP] } Keyword[return] identifier[getTablesCache] operator[SEP] } }
public static ResourceRecordSet<SSHFPData> sshfp(String name, String sshfpdata) { return new SSHFPBuilder().name(name).add(sshfpdata).build(); }
class class_name[name] begin[{] method[sshfp, return_type[type[ResourceRecordSet]], modifier[public static], parameter[name, sshfpdata]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=sshfpdata, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=SSHFPBuilder, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ResourceRecordSet] operator[<] identifier[SSHFPData] operator[>] identifier[sshfp] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[sshfpdata] operator[SEP] { Keyword[return] Keyword[new] identifier[SSHFPBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[sshfpdata] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
private HttpUriRequest makeRequest(URI uri, final String requestBody) { HttpPost post = new HttpPost(uri); post.setEntity(new StringEntity(requestBody, m_contentType)); return post; }
class class_name[name] begin[{] method[makeRequest, return_type[type[HttpUriRequest]], modifier[private], parameter[uri, requestBody]] begin[{] local_variable[type[HttpPost], post] call[post.setEntity, parameter[ClassCreator(arguments=[MemberReference(member=requestBody, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=m_contentType, 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=StringEntity, sub_type=None))]] return[member[.post]] end[}] END[}]
Keyword[private] identifier[HttpUriRequest] identifier[makeRequest] operator[SEP] identifier[URI] identifier[uri] , Keyword[final] identifier[String] identifier[requestBody] operator[SEP] { identifier[HttpPost] identifier[post] operator[=] Keyword[new] identifier[HttpPost] operator[SEP] identifier[uri] operator[SEP] operator[SEP] identifier[post] operator[SEP] identifier[setEntity] operator[SEP] Keyword[new] identifier[StringEntity] operator[SEP] identifier[requestBody] , identifier[m_contentType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[post] operator[SEP] }
private void readFromStream(InputStream in) throws IOException { document = DocumentFactory.newDocument(Json.read(in)); }
class class_name[name] begin[{] method[readFromStream, return_type[void], modifier[private], parameter[in]] begin[{] assign[member[.document], call[DocumentFactory.newDocument, parameter[call[Json.read, parameter[member[.in]]]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[readFromStream] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] { identifier[document] operator[=] identifier[DocumentFactory] operator[SEP] identifier[newDocument] operator[SEP] identifier[Json] operator[SEP] identifier[read] operator[SEP] identifier[in] operator[SEP] operator[SEP] operator[SEP] }
private String getRespData(BroadcastResponse resp) { StringBuilder respdata = new StringBuilder(400); if (resp != null) { Status status = resp.getStatus(); if (null != status) { respdata.append(status.name()); respdata.append("-"); respdata.append(status.getNumber()); } String info = resp.getInfo(); if (null != info && !info.isEmpty()) { if (respdata.length() > 0) { respdata.append(", "); } respdata.append("Additional information: ").append(info); } } return respdata.toString(); }
class class_name[name] begin[{] method[getRespData, return_type[type[String]], modifier[private], parameter[resp]] begin[{] local_variable[type[StringBuilder], respdata] if[binary_operation[member[.resp], !=, literal[null]]] begin[{] local_variable[type[Status], status] if[binary_operation[literal[null], !=, member[.status]]] begin[{] call[respdata.append, parameter[call[status.name, parameter[]]]] call[respdata.append, parameter[literal["-"]]] call[respdata.append, parameter[call[status.getNumber, parameter[]]]] else begin[{] None end[}] local_variable[type[String], info] if[binary_operation[binary_operation[literal[null], !=, member[.info]], &&, call[info.isEmpty, parameter[]]]] begin[{] if[binary_operation[call[respdata.length, parameter[]], >, literal[0]]] begin[{] call[respdata.append, parameter[literal[", "]]] else begin[{] None end[}] call[respdata.append, parameter[literal["Additional information: "]]] else begin[{] None end[}] else begin[{] None end[}] return[call[respdata.toString, parameter[]]] end[}] END[}]
Keyword[private] identifier[String] identifier[getRespData] operator[SEP] identifier[BroadcastResponse] identifier[resp] operator[SEP] { identifier[StringBuilder] identifier[respdata] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[400] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resp] operator[!=] Other[null] operator[SEP] { identifier[Status] identifier[status] operator[=] identifier[resp] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[status] operator[SEP] { identifier[respdata] operator[SEP] identifier[append] operator[SEP] identifier[status] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[respdata] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[respdata] operator[SEP] identifier[append] operator[SEP] identifier[status] operator[SEP] identifier[getNumber] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[info] operator[=] identifier[resp] operator[SEP] identifier[getInfo] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[info] operator[&&] operator[!] identifier[info] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[respdata] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[respdata] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[respdata] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[info] operator[SEP] operator[SEP] } } Keyword[return] identifier[respdata] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public final Cache2kBuilder<K, V> with(ConfigurationSectionBuilder<? extends ConfigurationSection>... sectionBuilders) { for (ConfigurationSectionBuilder<? extends ConfigurationSection> b : sectionBuilders) { config().getSections().add(b.buildConfigurationSection()); } return this; }
class class_name[name] begin[{] method[with, return_type[type[Cache2kBuilder]], modifier[final public], parameter[sectionBuilders]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSections, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=buildConfigurationSection, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None)], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=sectionBuilders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=b)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=ConfigurationSection, sub_type=None))], dimensions=[], name=ConfigurationSectionBuilder, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Cache2kBuilder] operator[<] identifier[K] , identifier[V] operator[>] identifier[with] operator[SEP] identifier[ConfigurationSectionBuilder] operator[<] operator[?] Keyword[extends] identifier[ConfigurationSection] operator[>] operator[...] identifier[sectionBuilders] operator[SEP] { Keyword[for] operator[SEP] identifier[ConfigurationSectionBuilder] operator[<] operator[?] Keyword[extends] identifier[ConfigurationSection] operator[>] identifier[b] operator[:] identifier[sectionBuilders] operator[SEP] { identifier[config] operator[SEP] operator[SEP] operator[SEP] identifier[getSections] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[b] operator[SEP] identifier[buildConfigurationSection] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
@SuppressWarnings("deprecation") public Credential createAndStoreCredential(TokenResponse response, String userId) throws IOException { Credential credential = newCredential(userId).setFromTokenResponse(response); if (credentialStore != null) { credentialStore.store(userId, credential); } if (credentialDataStore != null) { credentialDataStore.set(userId, new StoredCredential(credential)); } if (credentialCreatedListener != null) { credentialCreatedListener.onCredentialCreated(credential, response); } return credential; }
class class_name[name] begin[{] method[createAndStoreCredential, return_type[type[Credential]], modifier[public], parameter[response, userId]] begin[{] local_variable[type[Credential], credential] if[binary_operation[member[.credentialStore], !=, literal[null]]] begin[{] call[credentialStore.store, parameter[member[.userId], member[.credential]]] else begin[{] None end[}] if[binary_operation[member[.credentialDataStore], !=, literal[null]]] begin[{] call[credentialDataStore.set, parameter[member[.userId], ClassCreator(arguments=[MemberReference(member=credential, 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=StoredCredential, sub_type=None))]] else begin[{] None end[}] if[binary_operation[member[.credentialCreatedListener], !=, literal[null]]] begin[{] call[credentialCreatedListener.onCredentialCreated, parameter[member[.credential], member[.response]]] else begin[{] None end[}] return[member[.credential]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[Credential] identifier[createAndStoreCredential] operator[SEP] identifier[TokenResponse] identifier[response] , identifier[String] identifier[userId] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Credential] identifier[credential] operator[=] identifier[newCredential] operator[SEP] identifier[userId] operator[SEP] operator[SEP] identifier[setFromTokenResponse] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[credentialStore] operator[!=] Other[null] operator[SEP] { identifier[credentialStore] operator[SEP] identifier[store] operator[SEP] identifier[userId] , identifier[credential] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[credentialDataStore] operator[!=] Other[null] operator[SEP] { identifier[credentialDataStore] operator[SEP] identifier[set] operator[SEP] identifier[userId] , Keyword[new] identifier[StoredCredential] operator[SEP] identifier[credential] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[credentialCreatedListener] operator[!=] Other[null] operator[SEP] { identifier[credentialCreatedListener] operator[SEP] identifier[onCredentialCreated] operator[SEP] identifier[credential] , identifier[response] operator[SEP] operator[SEP] } Keyword[return] identifier[credential] operator[SEP] }
public Vector<Object> updateReference(Vector<Object> oldReferenceParams, Vector<Object> newReferenceParams) { try { Reference oldReference = XmlRpcDataMarshaller.toReference( oldReferenceParams ); Reference newReference = XmlRpcDataMarshaller.toReference( newReferenceParams ); newReference = service.updateReference( oldReference, newReference ); log.debug( "Updated Reference: " + newReference.getRequirement().getName() + "," + newReference.getSpecification().getName() ); return newReference.marshallize(); } catch (Exception e) { return errorAsVector( e, REFERENCE_UPDATE_FAILED ); } }
class class_name[name] begin[{] method[updateReference, return_type[type[Vector]], modifier[public], parameter[oldReferenceParams, newReferenceParams]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=oldReferenceParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toReference, postfix_operators=[], prefix_operators=[], qualifier=XmlRpcDataMarshaller, selectors=[], type_arguments=None), name=oldReference)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Reference, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=newReferenceParams, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toReference, postfix_operators=[], prefix_operators=[], qualifier=XmlRpcDataMarshaller, selectors=[], type_arguments=None), name=newReference)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Reference, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=newReference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=oldReference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newReference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateReference, postfix_operators=[], prefix_operators=[], qualifier=service, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Updated Reference: "), operandr=MethodInvocation(arguments=[], member=getRequirement, postfix_operators=[], prefix_operators=[], qualifier=newReference, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=","), operator=+), operandr=MethodInvocation(arguments=[], member=getSpecification, postfix_operators=[], prefix_operators=[], qualifier=newReference, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=marshallize, postfix_operators=[], prefix_operators=[], qualifier=newReference, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=REFERENCE_UPDATE_FAILED, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=errorAsVector, postfix_operators=[], prefix_operators=[], qualifier=, 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) end[}] END[}]
Keyword[public] identifier[Vector] operator[<] identifier[Object] operator[>] identifier[updateReference] operator[SEP] identifier[Vector] operator[<] identifier[Object] operator[>] identifier[oldReferenceParams] , identifier[Vector] operator[<] identifier[Object] operator[>] identifier[newReferenceParams] operator[SEP] { Keyword[try] { identifier[Reference] identifier[oldReference] operator[=] identifier[XmlRpcDataMarshaller] operator[SEP] identifier[toReference] operator[SEP] identifier[oldReferenceParams] operator[SEP] operator[SEP] identifier[Reference] identifier[newReference] operator[=] identifier[XmlRpcDataMarshaller] operator[SEP] identifier[toReference] operator[SEP] identifier[newReferenceParams] operator[SEP] operator[SEP] identifier[newReference] operator[=] identifier[service] operator[SEP] identifier[updateReference] operator[SEP] identifier[oldReference] , identifier[newReference] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[newReference] operator[SEP] identifier[getRequirement] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[newReference] operator[SEP] identifier[getSpecification] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[newReference] operator[SEP] identifier[marshallize] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] identifier[errorAsVector] operator[SEP] identifier[e] , identifier[REFERENCE_UPDATE_FAILED] operator[SEP] operator[SEP] } }
private void setupBranchingEnumerators() { //Getting required sequence of differences (mutations) final byte[] bSequence = branchingSequences[branchingSequenceIndex]; //Ensure number of branching enumerators ensureCapacity(bSequence.length); //Setting up initial branching enumerators byte previous = -1, current; for (int i = 0; i < bSequence.length; ++i) { current = bSequence[i]; boolean autoMove1 = (previous == 1 && current == 2); // prevents insertion right after deletion if (parameters.isGreedy()) { // prevent some other 'redundant' cases autoMove1 = autoMove1 || (previous == 2 && current == 1) || // prevents deletion right after insertion (previous == 2 && current == 0); // prevents mismatch right after insertion } branchingEnumerators[i].setup(current, autoMove1); previous = bSequence[i]; } branchingEnumerators[0].reset(0, root); lastEnumerator = bSequence.length - 1; }
class class_name[name] begin[{] method[setupBranchingEnumerators, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[byte], bSequence] call[.ensureCapacity, parameter[member[bSequence.length]]] local_variable[type[byte], previous] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=bSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=previous, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), operandr=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator===), operator=&&), name=autoMove1)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MethodInvocation(arguments=[], member=isGreedy, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=autoMove1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=autoMove1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=previous, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator===), operandr=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator===), operator=&&), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=previous, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator===), operandr=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=&&), operator=||)), label=None)])), StatementExpression(expression=MemberReference(member=branchingEnumerators, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=autoMove1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setup, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=previous, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=bSequence, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=bSequence, 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) member[.branchingEnumerators] assign[member[.lastEnumerator], binary_operation[member[bSequence.length], -, literal[1]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setupBranchingEnumerators] operator[SEP] operator[SEP] { Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[bSequence] operator[=] identifier[branchingSequences] operator[SEP] identifier[branchingSequenceIndex] operator[SEP] operator[SEP] identifier[ensureCapacity] operator[SEP] identifier[bSequence] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[byte] identifier[previous] operator[=] operator[-] Other[1] , identifier[current] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[bSequence] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[current] operator[=] identifier[bSequence] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[boolean] identifier[autoMove1] operator[=] operator[SEP] identifier[previous] operator[==] Other[1] operator[&&] identifier[current] operator[==] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parameters] operator[SEP] identifier[isGreedy] operator[SEP] operator[SEP] operator[SEP] { identifier[autoMove1] operator[=] identifier[autoMove1] operator[||] operator[SEP] identifier[previous] operator[==] Other[2] operator[&&] identifier[current] operator[==] Other[1] operator[SEP] operator[||] operator[SEP] identifier[previous] operator[==] Other[2] operator[&&] identifier[current] operator[==] Other[0] operator[SEP] operator[SEP] } identifier[branchingEnumerators] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[setup] operator[SEP] identifier[current] , identifier[autoMove1] operator[SEP] operator[SEP] identifier[previous] operator[=] identifier[bSequence] operator[SEP] identifier[i] operator[SEP] operator[SEP] } identifier[branchingEnumerators] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[reset] operator[SEP] Other[0] , identifier[root] operator[SEP] operator[SEP] identifier[lastEnumerator] operator[=] identifier[bSequence] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] }
public String getStringValue() { if (value == null) { return null; } if (value.contains("`")) { return value.replaceAll("\\\\`", "`"); } return value; }
class class_name[name] begin[{] method[getStringValue, return_type[type[String]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[call[value.contains, parameter[literal["`"]]]] begin[{] return[call[value.replaceAll, parameter[literal["\\\\`"], literal["`"]]]] else begin[{] None end[}] return[member[.value]] end[}] END[}]
Keyword[public] identifier[String] identifier[getStringValue] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[value] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[value] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[value] operator[SEP] }
@Override public PersistentTreeMap<K,V> without(K key) { Box<Node<K,V>> found = new Box<>(null); Node<K,V> t = remove(tree, key, found); if (t == null) { //null == doesn't contain key if (found.val == null) { return this; } //empty return new PersistentTreeMap<>(comp, null, 0); } return new PersistentTreeMap<>(comp, t.blacken(), size - 1); }
class class_name[name] begin[{] method[without, return_type[type[PersistentTreeMap]], modifier[public], parameter[key]] begin[{] local_variable[type[Box], found] local_variable[type[Node], t] if[binary_operation[member[.t], ==, literal[null]]] begin[{] if[binary_operation[member[found.val], ==, literal[null]]] begin[{] return[THIS[]] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=comp, 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=0)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=PersistentTreeMap, sub_type=None))] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=comp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=blacken, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[], type_arguments=None), BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=PersistentTreeMap, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[PersistentTreeMap] operator[<] identifier[K] , identifier[V] operator[>] identifier[without] operator[SEP] identifier[K] identifier[key] operator[SEP] { identifier[Box] operator[<] identifier[Node] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[found] operator[=] Keyword[new] identifier[Box] operator[<] operator[>] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[Node] operator[<] identifier[K] , identifier[V] operator[>] identifier[t] operator[=] identifier[remove] operator[SEP] identifier[tree] , identifier[key] , identifier[found] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[found] operator[SEP] identifier[val] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } Keyword[return] Keyword[new] identifier[PersistentTreeMap] operator[<] operator[>] operator[SEP] identifier[comp] , Other[null] , Other[0] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[PersistentTreeMap] operator[<] operator[>] operator[SEP] identifier[comp] , identifier[t] operator[SEP] identifier[blacken] operator[SEP] operator[SEP] , identifier[size] operator[-] Other[1] operator[SEP] operator[SEP] }
public void writeTransactionIdFileToStorage(long txid, FSImage image) throws IOException { // Write txid marker in all storage directories List<StorageDirectory> badSDs = new ArrayList<StorageDirectory>(); for (StorageDirectory sd : storageDirs) { try { writeTransactionIdFile(sd, txid); } catch(IOException e) { // Close any edits stream associated with this dir and remove directory LOG.warn("writeTransactionIdToStorage failed on " + sd, e); badSDs.add(sd); } } reportErrorsOnDirectories(badSDs, image); if (image != null) { } }
class class_name[name] begin[{] method[writeTransactionIdFileToStorage, return_type[void], modifier[public], parameter[txid, image]] begin[{] local_variable[type[List], badSDs] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=txid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeTransactionIdFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="writeTransactionIdToStorage failed on "), operandr=MemberReference(member=sd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=badSDs, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=storageDirs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sd)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StorageDirectory, sub_type=None))), label=None) call[.reportErrorsOnDirectories, parameter[member[.badSDs], member[.image]]] if[binary_operation[member[.image], !=, literal[null]]] begin[{] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[writeTransactionIdFileToStorage] operator[SEP] Keyword[long] identifier[txid] , identifier[FSImage] identifier[image] operator[SEP] Keyword[throws] identifier[IOException] { identifier[List] operator[<] identifier[StorageDirectory] operator[>] identifier[badSDs] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[StorageDirectory] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[StorageDirectory] identifier[sd] operator[:] identifier[storageDirs] operator[SEP] { Keyword[try] { identifier[writeTransactionIdFile] operator[SEP] identifier[sd] , identifier[txid] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[sd] , identifier[e] operator[SEP] operator[SEP] identifier[badSDs] operator[SEP] identifier[add] operator[SEP] identifier[sd] operator[SEP] operator[SEP] } } identifier[reportErrorsOnDirectories] operator[SEP] identifier[badSDs] , identifier[image] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[image] operator[!=] Other[null] operator[SEP] { } }
public boolean init(String[] args) throws ParseException { CommandLine cliParser = new GnuParser().parse(jstormClientContext.opts, args); if (cliParser.hasOption(JOYConstants.HELP)) { printUsage(); return false; } jstormClientContext.appName = cliParser.getOptionValue(JOYConstants.APP_NAME_KEY, JOYConstants.CLIIENT_CLASS); jstormClientContext.amPriority = Integer.parseInt(cliParser.getOptionValue(JOYConstants.PRIORITY, JOYConstants.DEFAULT_PRIORITY)); jstormClientContext.amQueue = cliParser.getOptionValue(JOYConstants.QUEUE, JOYConstants.QUEUE_NAME); jstormClientContext.amMemory = Integer.parseInt(cliParser.getOptionValue(JOYConstants.MASTER_MEMORY, JOYConstants.DEFAULT_MASTER_MEMORY)); jstormClientContext.amVCores = Integer.parseInt(cliParser.getOptionValue(JOYConstants.MASTER_VCORES, JOYConstants.DEFAULT_MASTER_VCORES)); jstormClientContext.appMasterJar = cliParser.getOptionValue(JOYConstants.JAR); jstormClientContext.libJars = cliParser.getOptionValue(JOYConstants.LIB_JAR); jstormClientContext.homeDir = cliParser.getOptionValue(JOYConstants.HOME_DIR); jstormClientContext.confFile = cliParser.getOptionValue(JOYConstants.CONF_FILE); jstormClientContext.rmHost = cliParser.getOptionValue(JOYConstants.RM_ADDRESS, JOYConstants.EMPTY); jstormClientContext.nameNodeHost = cliParser.getOptionValue(JOYConstants.NN_ADDRESS, JOYConstants.EMPTY); jstormClientContext.deployPath = cliParser.getOptionValue(JOYConstants.DEPLOY_PATH, JOYConstants.EMPTY); jstormClientContext.hadoopConfDir = cliParser.getOptionValue(JOYConstants.HADOOP_CONF_DIR, JOYConstants.EMPTY); jstormClientContext.instanceName = cliParser.getOptionValue(JOYConstants.INSTANCE_NAME, JOYConstants.EMPTY); JstormYarnUtils.checkAndSetOptions(cliParser, jstormClientContext); return true; }
class class_name[name] begin[{] method[init, return_type[type[boolean]], modifier[public], parameter[args]] begin[{] local_variable[type[CommandLine], cliParser] if[call[cliParser.hasOption, parameter[member[JOYConstants.HELP]]]] begin[{] call[.printUsage, parameter[]] return[literal[false]] else begin[{] None end[}] assign[member[jstormClientContext.appName], call[cliParser.getOptionValue, parameter[member[JOYConstants.APP_NAME_KEY], member[JOYConstants.CLIIENT_CLASS]]]] assign[member[jstormClientContext.amPriority], call[Integer.parseInt, parameter[call[cliParser.getOptionValue, parameter[member[JOYConstants.PRIORITY], member[JOYConstants.DEFAULT_PRIORITY]]]]]] assign[member[jstormClientContext.amQueue], call[cliParser.getOptionValue, parameter[member[JOYConstants.QUEUE], member[JOYConstants.QUEUE_NAME]]]] assign[member[jstormClientContext.amMemory], call[Integer.parseInt, parameter[call[cliParser.getOptionValue, parameter[member[JOYConstants.MASTER_MEMORY], member[JOYConstants.DEFAULT_MASTER_MEMORY]]]]]] assign[member[jstormClientContext.amVCores], call[Integer.parseInt, parameter[call[cliParser.getOptionValue, parameter[member[JOYConstants.MASTER_VCORES], member[JOYConstants.DEFAULT_MASTER_VCORES]]]]]] assign[member[jstormClientContext.appMasterJar], call[cliParser.getOptionValue, parameter[member[JOYConstants.JAR]]]] assign[member[jstormClientContext.libJars], call[cliParser.getOptionValue, parameter[member[JOYConstants.LIB_JAR]]]] assign[member[jstormClientContext.homeDir], call[cliParser.getOptionValue, parameter[member[JOYConstants.HOME_DIR]]]] assign[member[jstormClientContext.confFile], call[cliParser.getOptionValue, parameter[member[JOYConstants.CONF_FILE]]]] assign[member[jstormClientContext.rmHost], call[cliParser.getOptionValue, parameter[member[JOYConstants.RM_ADDRESS], member[JOYConstants.EMPTY]]]] assign[member[jstormClientContext.nameNodeHost], call[cliParser.getOptionValue, parameter[member[JOYConstants.NN_ADDRESS], member[JOYConstants.EMPTY]]]] assign[member[jstormClientContext.deployPath], call[cliParser.getOptionValue, parameter[member[JOYConstants.DEPLOY_PATH], member[JOYConstants.EMPTY]]]] assign[member[jstormClientContext.hadoopConfDir], call[cliParser.getOptionValue, parameter[member[JOYConstants.HADOOP_CONF_DIR], member[JOYConstants.EMPTY]]]] assign[member[jstormClientContext.instanceName], call[cliParser.getOptionValue, parameter[member[JOYConstants.INSTANCE_NAME], member[JOYConstants.EMPTY]]]] call[JstormYarnUtils.checkAndSetOptions, parameter[member[.cliParser], member[.jstormClientContext]]] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[init] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[ParseException] { identifier[CommandLine] identifier[cliParser] operator[=] Keyword[new] identifier[GnuParser] operator[SEP] operator[SEP] operator[SEP] identifier[parse] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[opts] , identifier[args] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cliParser] operator[SEP] identifier[hasOption] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[HELP] operator[SEP] operator[SEP] { identifier[printUsage] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[jstormClientContext] operator[SEP] identifier[appName] operator[=] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[APP_NAME_KEY] , identifier[JOYConstants] operator[SEP] identifier[CLIIENT_CLASS] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[amPriority] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[PRIORITY] , identifier[JOYConstants] operator[SEP] identifier[DEFAULT_PRIORITY] operator[SEP] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[amQueue] operator[=] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[QUEUE] , identifier[JOYConstants] operator[SEP] identifier[QUEUE_NAME] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[amMemory] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[MASTER_MEMORY] , identifier[JOYConstants] operator[SEP] identifier[DEFAULT_MASTER_MEMORY] operator[SEP] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[amVCores] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[MASTER_VCORES] , identifier[JOYConstants] operator[SEP] identifier[DEFAULT_MASTER_VCORES] operator[SEP] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[appMasterJar] operator[=] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[JAR] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[libJars] operator[=] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[LIB_JAR] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[homeDir] operator[=] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[HOME_DIR] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[confFile] operator[=] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[CONF_FILE] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[rmHost] operator[=] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[RM_ADDRESS] , identifier[JOYConstants] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[nameNodeHost] operator[=] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[NN_ADDRESS] , identifier[JOYConstants] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[deployPath] operator[=] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[DEPLOY_PATH] , identifier[JOYConstants] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[hadoopConfDir] operator[=] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[HADOOP_CONF_DIR] , identifier[JOYConstants] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] identifier[jstormClientContext] operator[SEP] identifier[instanceName] operator[=] identifier[cliParser] operator[SEP] identifier[getOptionValue] operator[SEP] identifier[JOYConstants] operator[SEP] identifier[INSTANCE_NAME] , identifier[JOYConstants] operator[SEP] identifier[EMPTY] operator[SEP] operator[SEP] identifier[JstormYarnUtils] operator[SEP] identifier[checkAndSetOptions] operator[SEP] identifier[cliParser] , identifier[jstormClientContext] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public void skipIgnored(int options) { if ((options & SKIP_WHITESPACE) != 0) { for (;;) { int a = _current(); if (!PatternProps.isWhiteSpace(a)) break; _advance(UTF16.getCharCount(a)); } } }
class class_name[name] begin[{] method[skipIgnored, return_type[void], modifier[public], parameter[options]] begin[{] if[binary_operation[binary_operation[member[.options], &, member[.SKIP_WHITESPACE]], !=, literal[0]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=_current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=a)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isWhiteSpace, postfix_operators=[], prefix_operators=['!'], qualifier=PatternProps, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BreakStatement(goto=None, label=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCharCount, postfix_operators=[], prefix_operators=[], qualifier=UTF16, selectors=[], type_arguments=None)], member=_advance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=None, init=None, update=None), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[skipIgnored] operator[SEP] Keyword[int] identifier[options] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[options] operator[&] identifier[SKIP_WHITESPACE] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[a] operator[=] identifier[_current] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[PatternProps] operator[SEP] identifier[isWhiteSpace] operator[SEP] identifier[a] operator[SEP] operator[SEP] Keyword[break] operator[SEP] identifier[_advance] operator[SEP] identifier[UTF16] operator[SEP] identifier[getCharCount] operator[SEP] identifier[a] operator[SEP] operator[SEP] operator[SEP] } } }
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); response.setHeader("Pragma", "no-cache"); PrintWriter out = response.getWriter(); out.println("<html><head><title>OJB Distributed Locking Servlet Status Page</title>"); out.println("</head><body><h1>OJB Distributed Locking Servlet</h1>"); out.println("The servlet is running.<p>"); if(lastError == null) { out.println("The LockServer is running.<p>"); out.println("LockManager info: " + lockmanager.getLockInfo() + "<p>"); out.println("Processed Lock Request: " + numRequests + "<p>"); } else { out.println("<h2>The LockServer has a problem!</h2>"); out.println("The error message is:<p>"); out.println(lastError.getMessage() + "<p>"); lastError.printStackTrace(out); lastError = null; } out.println("</body></html>"); }
class class_name[name] begin[{] method[doGet, return_type[void], modifier[protected], parameter[request, response]] begin[{] call[response.setContentType, parameter[literal["text/html"]]] call[response.setHeader, parameter[literal["Pragma"], literal["no-cache"]]] local_variable[type[PrintWriter], out] call[out.println, parameter[literal["<html><head><title>OJB Distributed Locking Servlet Status Page</title>"]]] call[out.println, parameter[literal["</head><body><h1>OJB Distributed Locking Servlet</h1>"]]] call[out.println, parameter[literal["The servlet is running.<p>"]]] if[binary_operation[member[.lastError], ==, literal[null]]] begin[{] call[out.println, parameter[literal["The LockServer is running.<p>"]]] call[out.println, parameter[binary_operation[binary_operation[literal["LockManager info: "], +, call[lockmanager.getLockInfo, parameter[]]], +, literal["<p>"]]]] call[out.println, parameter[binary_operation[binary_operation[literal["Processed Lock Request: "], +, member[.numRequests]], +, literal["<p>"]]]] else begin[{] call[out.println, parameter[literal["<h2>The LockServer has a problem!</h2>"]]] call[out.println, parameter[literal["The error message is:<p>"]]] call[out.println, parameter[binary_operation[call[lastError.getMessage, parameter[]], +, literal["<p>"]]]] call[lastError.printStackTrace, parameter[member[.out]]] assign[member[.lastError], literal[null]] end[}] call[out.println, parameter[literal["</body></html>"]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[doGet] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator[SEP] Keyword[throws] identifier[ServletException] , identifier[IOException] { identifier[response] operator[SEP] identifier[setContentType] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[response] operator[SEP] identifier[setHeader] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[PrintWriter] identifier[out] operator[=] identifier[response] operator[SEP] identifier[getWriter] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lastError] operator[==] Other[null] operator[SEP] { identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[lockmanager] operator[SEP] identifier[getLockInfo] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[numRequests] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[lastError] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[lastError] operator[SEP] identifier[printStackTrace] operator[SEP] identifier[out] operator[SEP] operator[SEP] identifier[lastError] operator[=] Other[null] operator[SEP] } identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public boolean inCache() { boolean inCache = false; synchronized (ivBucket) { // Non-negative pin value indicates the object is in the cache. if (pinned >= 0) { ((WrapperBucket) ivBucket).ivWrapperCache.touch(this); inCache = true; } } if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "touch: inCache = " + inCache + ", " + ivBeanId); return inCache; }
class class_name[name] begin[{] method[inCache, return_type[type[boolean]], modifier[public], parameter[]] begin[{] local_variable[type[boolean], inCache] SYNCHRONIZED[member[.ivBucket]] BEGIN[{] if[binary_operation[member[.pinned], >=, literal[0]]] begin[{] Cast(expression=MemberReference(member=ivBucket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=WrapperBucket, sub_type=None)) assign[member[.inCache], literal[true]] else begin[{] None end[}] END[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[binary_operation[literal["touch: inCache = "], +, member[.inCache]], +, literal[", "]], +, member[.ivBeanId]]]] else begin[{] None end[}] return[member[.inCache]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[inCache] operator[SEP] operator[SEP] { Keyword[boolean] identifier[inCache] operator[=] literal[boolean] operator[SEP] Keyword[synchronized] operator[SEP] identifier[ivBucket] operator[SEP] { Keyword[if] operator[SEP] identifier[pinned] operator[>=] Other[0] operator[SEP] { operator[SEP] operator[SEP] identifier[WrapperBucket] operator[SEP] identifier[ivBucket] operator[SEP] operator[SEP] identifier[ivWrapperCache] operator[SEP] identifier[touch] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[inCache] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[inCache] operator[+] literal[String] operator[+] identifier[ivBeanId] operator[SEP] operator[SEP] Keyword[return] identifier[inCache] operator[SEP] }
public void copyMetaDataFrom(EncodedImage encodedImage) { mImageFormat = encodedImage.getImageFormat(); mWidth = encodedImage.getWidth(); mHeight = encodedImage.getHeight(); mRotationAngle = encodedImage.getRotationAngle(); mExifOrientation = encodedImage.getExifOrientation(); mSampleSize = encodedImage.getSampleSize(); mStreamSize = encodedImage.getSize(); mBytesRange = encodedImage.getBytesRange(); mColorSpace = encodedImage.getColorSpace(); }
class class_name[name] begin[{] method[copyMetaDataFrom, return_type[void], modifier[public], parameter[encodedImage]] begin[{] assign[member[.mImageFormat], call[encodedImage.getImageFormat, parameter[]]] assign[member[.mWidth], call[encodedImage.getWidth, parameter[]]] assign[member[.mHeight], call[encodedImage.getHeight, parameter[]]] assign[member[.mRotationAngle], call[encodedImage.getRotationAngle, parameter[]]] assign[member[.mExifOrientation], call[encodedImage.getExifOrientation, parameter[]]] assign[member[.mSampleSize], call[encodedImage.getSampleSize, parameter[]]] assign[member[.mStreamSize], call[encodedImage.getSize, parameter[]]] assign[member[.mBytesRange], call[encodedImage.getBytesRange, parameter[]]] assign[member[.mColorSpace], call[encodedImage.getColorSpace, parameter[]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[copyMetaDataFrom] operator[SEP] identifier[EncodedImage] identifier[encodedImage] operator[SEP] { identifier[mImageFormat] operator[=] identifier[encodedImage] operator[SEP] identifier[getImageFormat] operator[SEP] operator[SEP] operator[SEP] identifier[mWidth] operator[=] identifier[encodedImage] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] identifier[mHeight] operator[=] identifier[encodedImage] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] identifier[mRotationAngle] operator[=] identifier[encodedImage] operator[SEP] identifier[getRotationAngle] operator[SEP] operator[SEP] operator[SEP] identifier[mExifOrientation] operator[=] identifier[encodedImage] operator[SEP] identifier[getExifOrientation] operator[SEP] operator[SEP] operator[SEP] identifier[mSampleSize] operator[=] identifier[encodedImage] operator[SEP] identifier[getSampleSize] operator[SEP] operator[SEP] operator[SEP] identifier[mStreamSize] operator[=] identifier[encodedImage] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] identifier[mBytesRange] operator[=] identifier[encodedImage] operator[SEP] identifier[getBytesRange] operator[SEP] operator[SEP] operator[SEP] identifier[mColorSpace] operator[=] identifier[encodedImage] operator[SEP] identifier[getColorSpace] operator[SEP] operator[SEP] operator[SEP] }
public Pager<Namespace> getNamespaces(int itemsPerPage) throws GitLabApiException { return (new Pager<Namespace>(this, Namespace.class, itemsPerPage, null, "namespaces")); }
class class_name[name] begin[{] method[getNamespaces, return_type[type[Pager]], modifier[public], parameter[itemsPerPage]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Namespace, sub_type=None)), MemberReference(member=itemsPerPage, 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="namespaces")], 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=Namespace, sub_type=None))], dimensions=None, name=Pager, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Pager] operator[<] identifier[Namespace] operator[>] identifier[getNamespaces] operator[SEP] Keyword[int] identifier[itemsPerPage] operator[SEP] Keyword[throws] identifier[GitLabApiException] { Keyword[return] operator[SEP] Keyword[new] identifier[Pager] operator[<] identifier[Namespace] operator[>] operator[SEP] Keyword[this] , identifier[Namespace] operator[SEP] Keyword[class] , identifier[itemsPerPage] , Other[null] , literal[String] operator[SEP] operator[SEP] operator[SEP] }
RuleReturnScope invoke(Parser parser) throws Exception { assert parser != null; return (RuleReturnScope)method.invoke(parser, arguments); }
class class_name[name] begin[{] method[invoke, return_type[type[RuleReturnScope]], modifier[default], parameter[parser]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=parser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=parser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=RuleReturnScope, sub_type=None))] end[}] END[}]
identifier[RuleReturnScope] identifier[invoke] operator[SEP] identifier[Parser] identifier[parser] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[assert] identifier[parser] operator[!=] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[RuleReturnScope] operator[SEP] identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[parser] , identifier[arguments] operator[SEP] operator[SEP] }
private Map /* String, String */ parseHeaders(String headerPart) { final int len = headerPart.length(); Map<String, String> headers = new HashMap<String, String>(); int start = 0; for (; ;) { int end = parseEndOfLine(headerPart, start); if (start == end) { break; } String header = headerPart.substring(start, end); start = end + 2; while (start < len) { int nonWs = start; while (nonWs < len) { char c = headerPart.charAt(nonWs); if (c != ' ' && c != '\t') { break; } ++nonWs; } if (nonWs == start) { break; } // Continuation line found end = parseEndOfLine(headerPart, nonWs); header += " " + headerPart.substring(nonWs, end); start = end + 2; } parseHeaderLine(headers, header); } return headers; }
class class_name[name] begin[{] method[parseHeaders, return_type[type[Map]], modifier[private], parameter[headerPart]] begin[{] local_variable[type[int], len] local_variable[type[Map], headers] local_variable[type[int], start] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=headerPart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseEndOfLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=end)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=headerPart, selectors=[], type_arguments=None), name=header)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+)), label=None), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=nonWs)], modifiers=set(), type=BasicType(dimensions=[], name=int)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=nonWs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=headerPart, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\t'), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), StatementExpression(expression=MemberReference(member=nonWs, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=nonWs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nonWs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=headerPart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=nonWs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseEndOfLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=header, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" "), operandr=MethodInvocation(arguments=[MemberReference(member=nonWs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=headerPart, selectors=[], type_arguments=None), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+)), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=headers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=header, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseHeaderLine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=None, init=None, update=None), label=None) return[member[.headers]] end[}] END[}]
Keyword[private] identifier[Map] identifier[parseHeaders] operator[SEP] identifier[String] identifier[headerPart] operator[SEP] { Keyword[final] Keyword[int] identifier[len] operator[=] identifier[headerPart] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[headers] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[start] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[end] operator[=] identifier[parseEndOfLine] operator[SEP] identifier[headerPart] , identifier[start] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[start] operator[==] identifier[end] operator[SEP] { Keyword[break] operator[SEP] } identifier[String] identifier[header] operator[=] identifier[headerPart] operator[SEP] identifier[substring] operator[SEP] identifier[start] , identifier[end] operator[SEP] operator[SEP] identifier[start] operator[=] identifier[end] operator[+] Other[2] operator[SEP] Keyword[while] operator[SEP] identifier[start] operator[<] identifier[len] operator[SEP] { Keyword[int] identifier[nonWs] operator[=] identifier[start] operator[SEP] Keyword[while] operator[SEP] identifier[nonWs] operator[<] identifier[len] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[headerPart] operator[SEP] identifier[charAt] operator[SEP] identifier[nonWs] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[!=] literal[String] operator[&&] identifier[c] operator[!=] literal[String] operator[SEP] { Keyword[break] operator[SEP] } operator[++] identifier[nonWs] operator[SEP] } Keyword[if] operator[SEP] identifier[nonWs] operator[==] identifier[start] operator[SEP] { Keyword[break] operator[SEP] } identifier[end] operator[=] identifier[parseEndOfLine] operator[SEP] identifier[headerPart] , identifier[nonWs] operator[SEP] operator[SEP] identifier[header] operator[+=] literal[String] operator[+] identifier[headerPart] operator[SEP] identifier[substring] operator[SEP] identifier[nonWs] , identifier[end] operator[SEP] operator[SEP] identifier[start] operator[=] identifier[end] operator[+] Other[2] operator[SEP] } identifier[parseHeaderLine] operator[SEP] identifier[headers] , identifier[header] operator[SEP] operator[SEP] } Keyword[return] identifier[headers] operator[SEP] }
public static Source source(File file) throws FileNotFoundException { if (file == null) throw new IllegalArgumentException("file == null"); return source(new FileInputStream(file)); }
class class_name[name] begin[{] method[source, return_type[type[Source]], modifier[public static], parameter[file]] begin[{] if[binary_operation[member[.file], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="file == 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[}] return[call[.source, parameter[ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileInputStream, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Source] identifier[source] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[FileNotFoundException] { Keyword[if] operator[SEP] identifier[file] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[source] operator[SEP] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] }
public static void configure(TokenBasedAuthConfiguration configuration) { encryptor.setPoolSize(configuration.getPoolSize()); // This would be a good value for a 4-core system if (configuration.getServerPassword().equals("auto")) { encryptor.setPassword(UUID.randomUUID().toString()); } else { encryptor.setPassword(configuration.getServerPassword()); } encryptor.setAlgorithm(configuration.getAlgorithm()); encryptor.initialize(); BasicToken.defaultMaxAge = configuration.getMaxage(); //Create cache for permissions. cache = CacheBuilder.newBuilder() .expireAfterAccess(defaultMaxAge, TimeUnit.SECONDS) .expireAfterWrite(defaultMaxAge, TimeUnit.SECONDS) .build(); }
class class_name[name] begin[{] method[configure, return_type[void], modifier[public static], parameter[configuration]] begin[{] call[encryptor.setPoolSize, parameter[call[configuration.getPoolSize, parameter[]]]] if[call[configuration.getServerPassword, parameter[]]] begin[{] call[encryptor.setPassword, parameter[call[UUID.randomUUID, parameter[]]]] else begin[{] call[encryptor.setPassword, parameter[call[configuration.getServerPassword, parameter[]]]] end[}] call[encryptor.setAlgorithm, parameter[call[configuration.getAlgorithm, parameter[]]]] call[encryptor.initialize, parameter[]] assign[member[BasicToken.defaultMaxAge], call[configuration.getMaxage, parameter[]]] assign[member[.cache], call[CacheBuilder.newBuilder, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[configure] operator[SEP] identifier[TokenBasedAuthConfiguration] identifier[configuration] operator[SEP] { identifier[encryptor] operator[SEP] identifier[setPoolSize] operator[SEP] identifier[configuration] operator[SEP] identifier[getPoolSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[configuration] operator[SEP] identifier[getServerPassword] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[encryptor] operator[SEP] identifier[setPassword] operator[SEP] identifier[UUID] operator[SEP] identifier[randomUUID] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[encryptor] operator[SEP] identifier[setPassword] operator[SEP] identifier[configuration] operator[SEP] identifier[getServerPassword] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[encryptor] operator[SEP] identifier[setAlgorithm] operator[SEP] identifier[configuration] operator[SEP] identifier[getAlgorithm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[encryptor] operator[SEP] identifier[initialize] operator[SEP] operator[SEP] operator[SEP] identifier[BasicToken] operator[SEP] identifier[defaultMaxAge] operator[=] identifier[configuration] operator[SEP] identifier[getMaxage] operator[SEP] operator[SEP] operator[SEP] identifier[cache] operator[=] identifier[CacheBuilder] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[expireAfterAccess] operator[SEP] identifier[defaultMaxAge] , identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SEP] operator[SEP] identifier[expireAfterWrite] operator[SEP] identifier[defaultMaxAge] , identifier[TimeUnit] operator[SEP] identifier[SECONDS] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public void addForbiddenInjectionPrefix(String prefix) { if (!Strings.isEmpty(prefix)) { final String real = prefix.endsWith(".") ? prefix.substring(0, prefix.length() - 1) : prefix; //$NON-NLS-1$ this.forbiddenInjectionPrefixes.add(real); } }
class class_name[name] begin[{] method[addForbiddenInjectionPrefix, return_type[void], modifier[public], parameter[prefix]] begin[{] if[call[Strings.isEmpty, parameter[member[.prefix]]]] begin[{] local_variable[type[String], real] THIS[member[None.forbiddenInjectionPrefixes]call[None.add, parameter[member[.real]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addForbiddenInjectionPrefix] operator[SEP] identifier[String] identifier[prefix] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[Strings] operator[SEP] identifier[isEmpty] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[real] operator[=] identifier[prefix] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[?] identifier[prefix] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[prefix] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] operator[:] identifier[prefix] operator[SEP] Keyword[this] operator[SEP] identifier[forbiddenInjectionPrefixes] operator[SEP] identifier[add] operator[SEP] identifier[real] operator[SEP] operator[SEP] } }
private synchronized ZNames loadTimeZoneNames(String tzID) { ZNames tznames = _tzNamesMap.get(tzID); if (tznames == null) { ZNamesLoader loader = new ZNamesLoader(); loader.loadTimeZone(_zoneStrings, tzID); tznames = ZNames.createTimeZoneAndPutInCache(_tzNamesMap, loader.getNames(), tzID); } return tznames; }
class class_name[name] begin[{] method[loadTimeZoneNames, return_type[type[ZNames]], modifier[synchronized private], parameter[tzID]] begin[{] local_variable[type[ZNames], tznames] if[binary_operation[member[.tznames], ==, literal[null]]] begin[{] local_variable[type[ZNamesLoader], loader] call[loader.loadTimeZone, parameter[member[._zoneStrings], member[.tzID]]] assign[member[.tznames], call[ZNames.createTimeZoneAndPutInCache, parameter[member[._tzNamesMap], call[loader.getNames, parameter[]], member[.tzID]]]] else begin[{] None end[}] return[member[.tznames]] end[}] END[}]
Keyword[private] Keyword[synchronized] identifier[ZNames] identifier[loadTimeZoneNames] operator[SEP] identifier[String] identifier[tzID] operator[SEP] { identifier[ZNames] identifier[tznames] operator[=] identifier[_tzNamesMap] operator[SEP] identifier[get] operator[SEP] identifier[tzID] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tznames] operator[==] Other[null] operator[SEP] { identifier[ZNamesLoader] identifier[loader] operator[=] Keyword[new] identifier[ZNamesLoader] operator[SEP] operator[SEP] operator[SEP] identifier[loader] operator[SEP] identifier[loadTimeZone] operator[SEP] identifier[_zoneStrings] , identifier[tzID] operator[SEP] operator[SEP] identifier[tznames] operator[=] identifier[ZNames] operator[SEP] identifier[createTimeZoneAndPutInCache] operator[SEP] identifier[_tzNamesMap] , identifier[loader] operator[SEP] identifier[getNames] operator[SEP] operator[SEP] , identifier[tzID] operator[SEP] operator[SEP] } Keyword[return] identifier[tznames] operator[SEP] }
protected void checkLPSEnablement() { if (tc.isEntryEnabled()) Tr.entry(tc, "checkLPSEnablement"); // If this is in a tran enabled for LPS via beginLPSEnabledTx return without // checking for LPS enablement if (_LPSEnabledTx) { if (tc.isEntryEnabled()) Tr.exit(tc, "checkLPSEnablement - LPSEnabledTx"); return; } final boolean debug = tc.isDebugEnabled(); // If we are not debugging and LPS is disabled, return immediately. if (!debug) { if (_LPSProhibited) { if (tc.isEntryEnabled()) Tr.exit(tc, "checkLPSEnablement"); return; } } final boolean isLPSEnabled = _transaction._configProvider.getRuntimeMetaDataProvider().isHeuristicHazardAccepted(); if (debug) Tr.debug(tc, "LPSEnabled", isLPSEnabled); // If this application does not allow the LPS function then ensure that we record // this fact. This flag will remain false until the first application that does // not allow LPS drives an enlist. At this point it will be set to true and is // not changed back to false. if (!isLPSEnabled) { _LPSProhibited = true; } if (tc.isEntryEnabled()) Tr.exit(tc, "checkLPSEnablement : LPSEnabled=" + isLPSEnabled + " LPSProhibited=" + _LPSProhibited); }
class class_name[name] begin[{] method[checkLPSEnablement, return_type[void], modifier[protected], parameter[]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["checkLPSEnablement"]]] else begin[{] None end[}] if[member[._LPSEnabledTx]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["checkLPSEnablement - LPSEnabledTx"]]] else begin[{] None end[}] return[None] else begin[{] None end[}] local_variable[type[boolean], debug] if[member[.debug]] begin[{] if[member[._LPSProhibited]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["checkLPSEnablement"]]] else begin[{] None end[}] return[None] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[boolean], isLPSEnabled] if[member[.debug]] begin[{] call[Tr.debug, parameter[member[.tc], literal["LPSEnabled"], member[.isLPSEnabled]]] else begin[{] None end[}] if[member[.isLPSEnabled]] begin[{] assign[member[._LPSProhibited], literal[true]] else begin[{] None end[}] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.exit, parameter[member[.tc], binary_operation[binary_operation[binary_operation[literal["checkLPSEnablement : LPSEnabled="], +, member[.isLPSEnabled]], +, literal[" LPSProhibited="]], +, member[._LPSProhibited]]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[checkLPSEnablement] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_LPSEnabledTx] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[final] Keyword[boolean] identifier[debug] operator[=] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[debug] operator[SEP] { Keyword[if] operator[SEP] identifier[_LPSProhibited] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } } Keyword[final] Keyword[boolean] identifier[isLPSEnabled] operator[=] identifier[_transaction] operator[SEP] identifier[_configProvider] operator[SEP] identifier[getRuntimeMetaDataProvider] operator[SEP] operator[SEP] operator[SEP] identifier[isHeuristicHazardAccepted] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[debug] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , identifier[isLPSEnabled] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isLPSEnabled] operator[SEP] { identifier[_LPSProhibited] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[isLPSEnabled] operator[+] literal[String] operator[+] identifier[_LPSProhibited] operator[SEP] operator[SEP] }
protected static final BeanContextChild getChildBeanContextChild(Object child) { if (child instanceof BeanContextChild) { if (child instanceof BeanContextProxy) { throw new IllegalArgumentException(Messages.getString("beans.6C")); } return (BeanContextChild) child; } if (child instanceof BeanContextProxy) { if (child instanceof BeanContextChild) { throw new IllegalArgumentException(Messages.getString("beans.6C")); } return ((BeanContextProxy) child).getBeanContextProxy(); } return null; }
class class_name[name] begin[{] method[getChildBeanContextChild, return_type[type[BeanContextChild]], modifier[final static protected], parameter[child]] begin[{] if[binary_operation[member[.child], instanceof, type[BeanContextChild]]] begin[{] if[binary_operation[member[.child], instanceof, type[BeanContextProxy]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="beans.6C")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BeanContextChild, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.child], instanceof, type[BeanContextProxy]]] begin[{] if[binary_operation[member[.child], instanceof, type[BeanContextChild]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="beans.6C")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[Cast(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BeanContextProxy, sub_type=None))] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[protected] Keyword[static] Keyword[final] identifier[BeanContextChild] identifier[getChildBeanContextChild] operator[SEP] identifier[Object] identifier[child] operator[SEP] { Keyword[if] operator[SEP] identifier[child] Keyword[instanceof] identifier[BeanContextChild] operator[SEP] { Keyword[if] operator[SEP] identifier[child] Keyword[instanceof] identifier[BeanContextProxy] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[Messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[BeanContextChild] operator[SEP] identifier[child] operator[SEP] } Keyword[if] operator[SEP] identifier[child] Keyword[instanceof] identifier[BeanContextProxy] operator[SEP] { Keyword[if] operator[SEP] identifier[child] Keyword[instanceof] identifier[BeanContextChild] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[Messages] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] operator[SEP] identifier[BeanContextProxy] operator[SEP] identifier[child] operator[SEP] operator[SEP] identifier[getBeanContextProxy] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public void addAllGroups(Collection<TimelineGroup> groups) { if (groups == null) { groups = new ArrayList<>(); } groups.addAll(groups); }
class class_name[name] begin[{] method[addAllGroups, return_type[void], modifier[public], parameter[groups]] begin[{] if[binary_operation[member[.groups], ==, literal[null]]] begin[{] assign[member[.groups], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] call[groups.addAll, parameter[member[.groups]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addAllGroups] operator[SEP] identifier[Collection] operator[<] identifier[TimelineGroup] operator[>] identifier[groups] operator[SEP] { Keyword[if] operator[SEP] identifier[groups] operator[==] Other[null] operator[SEP] { identifier[groups] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] } identifier[groups] operator[SEP] identifier[addAll] operator[SEP] identifier[groups] operator[SEP] operator[SEP] }
public final Condition beginsWith(final V value) { return new Condition().withComparisonOperator(BEGINS_WITH).withAttributeValueList(convert(value)); }
class class_name[name] begin[{] method[beginsWith, return_type[type[Condition]], modifier[final public], parameter[value]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=BEGINS_WITH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withComparisonOperator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convert, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=withAttributeValueList, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Condition, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[final] identifier[Condition] identifier[beginsWith] operator[SEP] Keyword[final] identifier[V] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[Condition] operator[SEP] operator[SEP] operator[SEP] identifier[withComparisonOperator] operator[SEP] identifier[BEGINS_WITH] operator[SEP] operator[SEP] identifier[withAttributeValueList] operator[SEP] identifier[convert] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] }
public static void cleanIneligibleKeys(Map<ByteArray, Map<Value, Set<ClusterNode>>> keyVersionNodeSetMap, int requiredWrite) { Set<ByteArray> keysToDelete = new HashSet<ByteArray>(); for (Map.Entry<ByteArray, Map<Value, Set<ClusterNode>>> entry : keyVersionNodeSetMap.entrySet()) { Set<Value> valuesToDelete = new HashSet<Value>(); ByteArray key = entry.getKey(); Map<Value, Set<ClusterNode>> valueNodeSetMap = entry.getValue(); // mark version for deletion if not enough writes for (Map.Entry<Value, Set<ClusterNode>> versionNodeSetEntry : valueNodeSetMap.entrySet()) { Set<ClusterNode> nodeSet = versionNodeSetEntry.getValue(); if (nodeSet.size() < requiredWrite) { valuesToDelete.add(versionNodeSetEntry.getKey()); } } // delete versions for (Value v : valuesToDelete) { valueNodeSetMap.remove(v); } // mark key for deletion if no versions left if (valueNodeSetMap.size() == 0) { keysToDelete.add(key); } } // delete keys for (ByteArray k : keysToDelete) { keyVersionNodeSetMap.remove(k); } }
class class_name[name] begin[{] method[cleanIneligibleKeys, return_type[void], modifier[public static], parameter[keyVersionNodeSetMap, requiredWrite]] begin[{] local_variable[type[Set], keysToDelete] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Value, sub_type=None))], dimensions=None, name=HashSet, sub_type=None)), name=valuesToDelete)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Value, sub_type=None))], dimensions=[], name=Set, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArray, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), name=valueNodeSetMap)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Value, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ClusterNode, sub_type=None))], dimensions=[], name=Set, sub_type=None))], dimensions=[], name=Map, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=versionNodeSetEntry, selectors=[], type_arguments=None), name=nodeSet)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ClusterNode, sub_type=None))], dimensions=[], name=Set, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=nodeSet, selectors=[], type_arguments=None), operandr=MemberReference(member=requiredWrite, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=versionNodeSetEntry, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=valuesToDelete, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=valueNodeSetMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=versionNodeSetEntry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Value, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ClusterNode, sub_type=None))], dimensions=[], name=Set, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=valueNodeSetMap, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=valuesToDelete, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=v)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Value, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=valueNodeSetMap, 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=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=keysToDelete, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=keyVersionNodeSetMap, 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=ByteArray, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Value, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ClusterNode, sub_type=None))], dimensions=[], name=Set, sub_type=None))], dimensions=[], name=Map, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=keyVersionNodeSetMap, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=keysToDelete, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=k)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ByteArray, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[cleanIneligibleKeys] operator[SEP] identifier[Map] operator[<] identifier[ByteArray] , identifier[Map] operator[<] identifier[Value] , identifier[Set] operator[<] identifier[ClusterNode] operator[>] operator[>] operator[>] identifier[keyVersionNodeSetMap] , Keyword[int] identifier[requiredWrite] operator[SEP] { identifier[Set] operator[<] identifier[ByteArray] operator[>] identifier[keysToDelete] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[ByteArray] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[ByteArray] , identifier[Map] operator[<] identifier[Value] , identifier[Set] operator[<] identifier[ClusterNode] operator[>] operator[>] operator[>] identifier[entry] operator[:] identifier[keyVersionNodeSetMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[Set] operator[<] identifier[Value] operator[>] identifier[valuesToDelete] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[Value] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ByteArray] identifier[key] operator[=] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[Value] , identifier[Set] operator[<] identifier[ClusterNode] operator[>] operator[>] identifier[valueNodeSetMap] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Value] , identifier[Set] operator[<] identifier[ClusterNode] operator[>] operator[>] identifier[versionNodeSetEntry] operator[:] identifier[valueNodeSetMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[Set] operator[<] identifier[ClusterNode] operator[>] identifier[nodeSet] operator[=] identifier[versionNodeSetEntry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nodeSet] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] identifier[requiredWrite] operator[SEP] { identifier[valuesToDelete] operator[SEP] identifier[add] operator[SEP] identifier[versionNodeSetEntry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[Value] identifier[v] operator[:] identifier[valuesToDelete] operator[SEP] { identifier[valueNodeSetMap] operator[SEP] identifier[remove] operator[SEP] identifier[v] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[valueNodeSetMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[keysToDelete] operator[SEP] identifier[add] operator[SEP] identifier[key] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] identifier[ByteArray] identifier[k] operator[:] identifier[keysToDelete] operator[SEP] { identifier[keyVersionNodeSetMap] operator[SEP] identifier[remove] operator[SEP] identifier[k] operator[SEP] operator[SEP] } }
public static String toUnicode(String str, boolean isSkipAscii) { if (StrUtil.isEmpty(str)) { return str; } final int len = str.length(); final StrBuilder unicode = StrBuilder.create(str.length() * 6); char c; for (int i = 0; i < len; i++) { c = str.charAt(i); if(isSkipAscii && CharUtil.isAsciiPrintable(c) ) { unicode.append(c); }else { unicode.append(HexUtil.toUnicodeHex(c)); } } return unicode.toString(); }
class class_name[name] begin[{] method[toUnicode, return_type[type[String]], modifier[public static], parameter[str, isSkipAscii]] begin[{] if[call[StrUtil.isEmpty, parameter[member[.str]]]] begin[{] return[member[.str]] else begin[{] None end[}] local_variable[type[int], len] local_variable[type[StrBuilder], unicode] local_variable[type[char], c] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=isSkipAscii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAsciiPrintable, postfix_operators=[], prefix_operators=[], qualifier=CharUtil, selectors=[], type_arguments=None), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toUnicodeHex, postfix_operators=[], prefix_operators=[], qualifier=HexUtil, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=unicode, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=unicode, 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) return[call[unicode.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[toUnicode] operator[SEP] identifier[String] identifier[str] , Keyword[boolean] identifier[isSkipAscii] operator[SEP] { Keyword[if] operator[SEP] identifier[StrUtil] operator[SEP] identifier[isEmpty] operator[SEP] identifier[str] operator[SEP] operator[SEP] { Keyword[return] identifier[str] operator[SEP] } Keyword[final] Keyword[int] identifier[len] operator[=] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[StrBuilder] identifier[unicode] operator[=] identifier[StrBuilder] operator[SEP] identifier[create] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[*] Other[6] operator[SEP] operator[SEP] Keyword[char] identifier[c] 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] { identifier[c] operator[=] identifier[str] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isSkipAscii] operator[&&] identifier[CharUtil] operator[SEP] identifier[isAsciiPrintable] operator[SEP] identifier[c] operator[SEP] operator[SEP] { identifier[unicode] operator[SEP] identifier[append] operator[SEP] identifier[c] operator[SEP] operator[SEP] } Keyword[else] { identifier[unicode] operator[SEP] identifier[append] operator[SEP] identifier[HexUtil] operator[SEP] identifier[toUnicodeHex] operator[SEP] identifier[c] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[unicode] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
private Drawable getActivityIconWithCache(ComponentName component) { // First check the icon cache String componentIconKey = component.flattenToShortString(); // Using containsKey() since we also store null values. if (mOutsideDrawablesCache.containsKey(componentIconKey)) { Drawable.ConstantState cached = mOutsideDrawablesCache.get(componentIconKey); return cached == null ? null : cached.newDrawable(mProviderContext.getResources()); } // Then try the activity or application icon Drawable drawable = getActivityIcon(component); // Stick it in the cache so we don't do this lookup again. Drawable.ConstantState toCache = drawable == null ? null : drawable.getConstantState(); mOutsideDrawablesCache.put(componentIconKey, toCache); return drawable; }
class class_name[name] begin[{] method[getActivityIconWithCache, return_type[type[Drawable]], modifier[private], parameter[component]] begin[{] local_variable[type[String], componentIconKey] if[call[mOutsideDrawablesCache.containsKey, parameter[member[.componentIconKey]]]] begin[{] local_variable[type[Drawable], cached] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=cached, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getResources, postfix_operators=[], prefix_operators=[], qualifier=mProviderContext, selectors=[], type_arguments=None)], member=newDrawable, postfix_operators=[], prefix_operators=[], qualifier=cached, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] else begin[{] None end[}] local_variable[type[Drawable], drawable] local_variable[type[Drawable], toCache] call[mOutsideDrawablesCache.put, parameter[member[.componentIconKey], member[.toCache]]] return[member[.drawable]] end[}] END[}]
Keyword[private] identifier[Drawable] identifier[getActivityIconWithCache] operator[SEP] identifier[ComponentName] identifier[component] operator[SEP] { identifier[String] identifier[componentIconKey] operator[=] identifier[component] operator[SEP] identifier[flattenToShortString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mOutsideDrawablesCache] operator[SEP] identifier[containsKey] operator[SEP] identifier[componentIconKey] operator[SEP] operator[SEP] { identifier[Drawable] operator[SEP] identifier[ConstantState] identifier[cached] operator[=] identifier[mOutsideDrawablesCache] operator[SEP] identifier[get] operator[SEP] identifier[componentIconKey] operator[SEP] operator[SEP] Keyword[return] identifier[cached] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[cached] operator[SEP] identifier[newDrawable] operator[SEP] identifier[mProviderContext] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Drawable] identifier[drawable] operator[=] identifier[getActivityIcon] operator[SEP] identifier[component] operator[SEP] operator[SEP] identifier[Drawable] operator[SEP] identifier[ConstantState] identifier[toCache] operator[=] identifier[drawable] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[drawable] operator[SEP] identifier[getConstantState] operator[SEP] operator[SEP] operator[SEP] identifier[mOutsideDrawablesCache] operator[SEP] identifier[put] operator[SEP] identifier[componentIconKey] , identifier[toCache] operator[SEP] operator[SEP] Keyword[return] identifier[drawable] operator[SEP] }
public final void entryRuleAssignableAlternatives() throws RecognitionException { try { // InternalXtext.g:971:1: ( ruleAssignableAlternatives EOF ) // InternalXtext.g:972:1: ruleAssignableAlternatives EOF { before(grammarAccess.getAssignableAlternativesRule()); pushFollow(FollowSets000.FOLLOW_1); ruleAssignableAlternatives(); state._fsp--; after(grammarAccess.getAssignableAlternativesRule()); match(input,EOF,FollowSets000.FOLLOW_2); } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return ; }
class class_name[name] begin[{] method[entryRuleAssignableAlternatives, return_type[void], modifier[final public], parameter[]] begin[{] TryStatement(block=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAssignableAlternativesRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=before, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_1, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=ruleAssignableAlternatives, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAssignableAlternativesRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=after, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=EOF, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=FollowSets000, selectors=[])], member=match, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[None] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[entryRuleAssignableAlternatives] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[try] { { identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getAssignableAlternativesRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pushFollow] operator[SEP] identifier[FollowSets000] operator[SEP] identifier[FOLLOW_1] operator[SEP] operator[SEP] identifier[ruleAssignableAlternatives] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] identifier[after] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getAssignableAlternativesRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[match] operator[SEP] identifier[input] , identifier[EOF] , identifier[FollowSets000] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] operator[SEP] }
private void createDictionaries(String file, String conllFormat) throws IOException { long start = System.currentTimeMillis(); logger.debug("Creating dictionariesSet ... "); dictionariesSet.setCounters(); DependencyReader reader = DependencyReader.createDependencyReader(conllFormat); reader.startReading(file); DependencyInstance dependencyInstance = reader.nextInstance(); while (dependencyInstance != null) { //This loop sets values in dictionariesSet for later use dependencyInstance.setInstIds(dictionariesSet, coarseMap, conjWord); dependencyInstance = reader.nextInstance(); } reader.close(); dictionariesSet.closeCounters(); synFactory.setTokenStart(dictionariesSet.lookupIndex(POS, "#TOKEN_START#")); synFactory.setTokenEnd(dictionariesSet.lookupIndex(POS, "#TOKEN_END#")); synFactory.setTokenMid(dictionariesSet.lookupIndex(POS, "#TOKEN_MID#")); dictionariesSet.stopGrowth(DEP_LABEL); dictionariesSet.stopGrowth(POS); dictionariesSet.stopGrowth(WORD); synFactory.setWordNumBits(Utils.log2((long) dictionariesSet.getDictionarySize(WORD) + 1)); synFactory.setTagNumBits(Utils.log2((long) dictionariesSet.getDictionarySize(POS) + 1)); synFactory.setDepNumBits(Utils.log2((long) dictionariesSet.getDictionarySize(DEP_LABEL) + 1)); synFactory.setFlagBits(2*synFactory.getDepNumBits() + 4); types = new String[dictionariesSet.getDictionarySize(DEP_LABEL)]; Dictionary labelDict = dictionariesSet.getDictionary(DEP_LABEL); Object[] keys = labelDict.toArray(); for (Object key : keys) { int id = labelDict.lookupIndex(key); types[id - 1] = (String) key; } if(logger.isDebugEnabled()) { logger.debug(String.format("%d %d %n", NUM_WORD_FEAT_BITS, NUM_ARC_FEAT_BITS)); logger.debug(String.format("Lexical items: %d (%d bits)%n", dictionariesSet.getDictionarySize(WORD), synFactory.getWordNumBits())); logger.debug(String.format("Tag/label items: %d (%d bits) %d (%d bits)%n", dictionariesSet.getDictionarySize(POS), synFactory.getTagNumBits(), dictionariesSet.getDictionarySize(DEP_LABEL), synFactory.getDepNumBits())); logger.debug(String.format("Flag Bits: %d%n", synFactory.getFlagBits())); logger.debug(String.format("Creation took [%d ms]%n", System.currentTimeMillis() - start)); } }
class class_name[name] begin[{] method[createDictionaries, return_type[void], modifier[private], parameter[file, conllFormat]] begin[{] local_variable[type[long], start] call[logger.debug, parameter[literal["Creating dictionariesSet ... "]]] call[dictionariesSet.setCounters, parameter[]] local_variable[type[DependencyReader], reader] call[reader.startReading, parameter[member[.file]]] local_variable[type[DependencyInstance], dependencyInstance] while[binary_operation[member[.dependencyInstance], !=, literal[null]]] begin[{] call[dependencyInstance.setInstIds, parameter[member[.dictionariesSet], member[.coarseMap], member[.conjWord]]] assign[member[.dependencyInstance], call[reader.nextInstance, parameter[]]] end[}] call[reader.close, parameter[]] call[dictionariesSet.closeCounters, parameter[]] call[synFactory.setTokenStart, parameter[call[dictionariesSet.lookupIndex, parameter[member[.POS], literal["#TOKEN_START#"]]]]] call[synFactory.setTokenEnd, parameter[call[dictionariesSet.lookupIndex, parameter[member[.POS], literal["#TOKEN_END#"]]]]] call[synFactory.setTokenMid, parameter[call[dictionariesSet.lookupIndex, parameter[member[.POS], literal["#TOKEN_MID#"]]]]] call[dictionariesSet.stopGrowth, parameter[member[.DEP_LABEL]]] call[dictionariesSet.stopGrowth, parameter[member[.POS]]] call[dictionariesSet.stopGrowth, parameter[member[.WORD]]] call[synFactory.setWordNumBits, parameter[call[Utils.log2, parameter[binary_operation[Cast(expression=MethodInvocation(arguments=[MemberReference(member=WORD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDictionarySize, postfix_operators=[], prefix_operators=[], qualifier=dictionariesSet, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=long)), +, literal[1]]]]]] call[synFactory.setTagNumBits, parameter[call[Utils.log2, parameter[binary_operation[Cast(expression=MethodInvocation(arguments=[MemberReference(member=POS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDictionarySize, postfix_operators=[], prefix_operators=[], qualifier=dictionariesSet, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=long)), +, literal[1]]]]]] call[synFactory.setDepNumBits, parameter[call[Utils.log2, parameter[binary_operation[Cast(expression=MethodInvocation(arguments=[MemberReference(member=DEP_LABEL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDictionarySize, postfix_operators=[], prefix_operators=[], qualifier=dictionariesSet, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=long)), +, literal[1]]]]]] call[synFactory.setFlagBits, parameter[binary_operation[binary_operation[literal[2], *, call[synFactory.getDepNumBits, parameter[]]], +, literal[4]]]] assign[member[.types], ArrayCreator(dimensions=[MethodInvocation(arguments=[MemberReference(member=DEP_LABEL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDictionarySize, postfix_operators=[], prefix_operators=[], qualifier=dictionariesSet, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] local_variable[type[Dictionary], labelDict] local_variable[type[Object], keys] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=lookupIndex, postfix_operators=[], prefix_operators=[], qualifier=labelDict, selectors=[], type_arguments=None), name=id)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), type==, value=Cast(expression=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) if[call[logger.isDebugEnabled, parameter[]]] begin[{] call[logger.debug, parameter[call[String.format, parameter[literal["%d %d %n"], member[.NUM_WORD_FEAT_BITS], member[.NUM_ARC_FEAT_BITS]]]]] call[logger.debug, parameter[call[String.format, parameter[literal["Lexical items: %d (%d bits)%n"], call[dictionariesSet.getDictionarySize, parameter[member[.WORD]]], call[synFactory.getWordNumBits, parameter[]]]]]] call[logger.debug, parameter[call[String.format, parameter[literal["Tag/label items: %d (%d bits) %d (%d bits)%n"], call[dictionariesSet.getDictionarySize, parameter[member[.POS]]], call[synFactory.getTagNumBits, parameter[]], call[dictionariesSet.getDictionarySize, parameter[member[.DEP_LABEL]]], call[synFactory.getDepNumBits, parameter[]]]]]] call[logger.debug, parameter[call[String.format, parameter[literal["Flag Bits: %d%n"], call[synFactory.getFlagBits, parameter[]]]]]] call[logger.debug, parameter[call[String.format, parameter[literal["Creation took [%d ms]%n"], binary_operation[call[System.currentTimeMillis, parameter[]], -, member[.start]]]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[createDictionaries] operator[SEP] identifier[String] identifier[file] , identifier[String] identifier[conllFormat] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[long] identifier[start] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[setCounters] operator[SEP] operator[SEP] operator[SEP] identifier[DependencyReader] identifier[reader] operator[=] identifier[DependencyReader] operator[SEP] identifier[createDependencyReader] operator[SEP] identifier[conllFormat] operator[SEP] operator[SEP] identifier[reader] operator[SEP] identifier[startReading] operator[SEP] identifier[file] operator[SEP] operator[SEP] identifier[DependencyInstance] identifier[dependencyInstance] operator[=] identifier[reader] operator[SEP] identifier[nextInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[dependencyInstance] operator[!=] Other[null] operator[SEP] { identifier[dependencyInstance] operator[SEP] identifier[setInstIds] operator[SEP] identifier[dictionariesSet] , identifier[coarseMap] , identifier[conjWord] operator[SEP] operator[SEP] identifier[dependencyInstance] operator[=] identifier[reader] operator[SEP] identifier[nextInstance] operator[SEP] operator[SEP] operator[SEP] } identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[closeCounters] operator[SEP] operator[SEP] operator[SEP] identifier[synFactory] operator[SEP] identifier[setTokenStart] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[lookupIndex] operator[SEP] identifier[POS] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[synFactory] operator[SEP] identifier[setTokenEnd] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[lookupIndex] operator[SEP] identifier[POS] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[synFactory] operator[SEP] identifier[setTokenMid] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[lookupIndex] operator[SEP] identifier[POS] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[stopGrowth] operator[SEP] identifier[DEP_LABEL] operator[SEP] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[stopGrowth] operator[SEP] identifier[POS] operator[SEP] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[stopGrowth] operator[SEP] identifier[WORD] operator[SEP] operator[SEP] identifier[synFactory] operator[SEP] identifier[setWordNumBits] operator[SEP] identifier[Utils] operator[SEP] identifier[log2] operator[SEP] operator[SEP] Keyword[long] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[getDictionarySize] operator[SEP] identifier[WORD] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[synFactory] operator[SEP] identifier[setTagNumBits] operator[SEP] identifier[Utils] operator[SEP] identifier[log2] operator[SEP] operator[SEP] Keyword[long] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[getDictionarySize] operator[SEP] identifier[POS] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[synFactory] operator[SEP] identifier[setDepNumBits] operator[SEP] identifier[Utils] operator[SEP] identifier[log2] operator[SEP] operator[SEP] Keyword[long] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[getDictionarySize] operator[SEP] identifier[DEP_LABEL] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[synFactory] operator[SEP] identifier[setFlagBits] operator[SEP] Other[2] operator[*] identifier[synFactory] operator[SEP] identifier[getDepNumBits] operator[SEP] operator[SEP] operator[+] Other[4] operator[SEP] operator[SEP] identifier[types] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[dictionariesSet] operator[SEP] identifier[getDictionarySize] operator[SEP] identifier[DEP_LABEL] operator[SEP] operator[SEP] operator[SEP] identifier[Dictionary] identifier[labelDict] operator[=] identifier[dictionariesSet] operator[SEP] identifier[getDictionary] operator[SEP] identifier[DEP_LABEL] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[keys] operator[=] identifier[labelDict] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[key] operator[:] identifier[keys] operator[SEP] { Keyword[int] identifier[id] operator[=] identifier[labelDict] operator[SEP] identifier[lookupIndex] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[types] operator[SEP] identifier[id] operator[-] Other[1] operator[SEP] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[key] operator[SEP] } Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[NUM_WORD_FEAT_BITS] , identifier[NUM_ARC_FEAT_BITS] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[dictionariesSet] operator[SEP] identifier[getDictionarySize] operator[SEP] identifier[WORD] operator[SEP] , identifier[synFactory] operator[SEP] identifier[getWordNumBits] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[dictionariesSet] operator[SEP] identifier[getDictionarySize] operator[SEP] identifier[POS] operator[SEP] , identifier[synFactory] operator[SEP] identifier[getTagNumBits] operator[SEP] operator[SEP] , identifier[dictionariesSet] operator[SEP] identifier[getDictionarySize] operator[SEP] identifier[DEP_LABEL] operator[SEP] , identifier[synFactory] operator[SEP] identifier[getDepNumBits] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[synFactory] operator[SEP] identifier[getFlagBits] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[-] identifier[start] operator[SEP] operator[SEP] operator[SEP] } }
private void buildMethodFieldModifiers(ClassContext classContext) { FieldModifier fm = new FieldModifier(); fm.visitClassContext(classContext); methodFieldModifiers = fm.getMethodFieldModifiers(); }
class class_name[name] begin[{] method[buildMethodFieldModifiers, return_type[void], modifier[private], parameter[classContext]] begin[{] local_variable[type[FieldModifier], fm] call[fm.visitClassContext, parameter[member[.classContext]]] assign[member[.methodFieldModifiers], call[fm.getMethodFieldModifiers, parameter[]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[buildMethodFieldModifiers] operator[SEP] identifier[ClassContext] identifier[classContext] operator[SEP] { identifier[FieldModifier] identifier[fm] operator[=] Keyword[new] identifier[FieldModifier] operator[SEP] operator[SEP] operator[SEP] identifier[fm] operator[SEP] identifier[visitClassContext] operator[SEP] identifier[classContext] operator[SEP] operator[SEP] identifier[methodFieldModifiers] operator[=] identifier[fm] operator[SEP] identifier[getMethodFieldModifiers] operator[SEP] operator[SEP] operator[SEP] }
@Override public IoBuffer getKeyframe() { IoBuffer result = IoBuffer.allocate(1024); result.setAutoExpand(true); // Header result.put((byte) (FLV_FRAME_KEY | VideoCodec.SCREEN_VIDEO.getId())); // Frame size result.putShort((short) this.widthInfo); result.putShort((short) this.heightInfo); // Get compressed blocks byte[] tmpData = new byte[this.blockDataSize]; int pos = 0; for (int idx = 0; idx < this.blockCount; idx++) { int size = this.blockSize[idx]; if (size == 0) { // this should not happen: no data for this block return null; } result.putShort((short) size); System.arraycopy(this.blockData, pos, tmpData, 0, size); result.put(tmpData, 0, size); pos += this.blockDataSize; } result.rewind(); return result; }
class class_name[name] begin[{] method[getKeyframe, return_type[type[IoBuffer]], modifier[public], parameter[]] begin[{] local_variable[type[IoBuffer], result] call[result.setAutoExpand, parameter[literal[true]]] call[result.put, parameter[Cast(expression=BinaryOperation(operandl=MemberReference(member=FLV_FRAME_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=VideoCodec.SCREEN_VIDEO, selectors=[], type_arguments=None), operator=|), type=BasicType(dimensions=[], name=byte))]] call[result.putShort, parameter[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=widthInfo, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type=BasicType(dimensions=[], name=short))]] call[result.putShort, parameter[Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=heightInfo, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type=BasicType(dimensions=[], name=short))]] local_variable[type[byte], tmpData] local_variable[type[int], pos] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=blockSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=size)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=short))], member=putShort, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=blockData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tmpData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tmpData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=blockDataSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=blockCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=idx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=idx, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[result.rewind, parameter[]] return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[IoBuffer] identifier[getKeyframe] operator[SEP] operator[SEP] { identifier[IoBuffer] identifier[result] operator[=] identifier[IoBuffer] operator[SEP] identifier[allocate] operator[SEP] Other[1024] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setAutoExpand] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[put] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[FLV_FRAME_KEY] operator[|] identifier[VideoCodec] operator[SEP] identifier[SCREEN_VIDEO] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[putShort] operator[SEP] operator[SEP] Keyword[short] operator[SEP] Keyword[this] operator[SEP] identifier[widthInfo] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[putShort] operator[SEP] operator[SEP] Keyword[short] operator[SEP] Keyword[this] operator[SEP] identifier[heightInfo] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[tmpData] operator[=] Keyword[new] Keyword[byte] operator[SEP] Keyword[this] operator[SEP] identifier[blockDataSize] operator[SEP] operator[SEP] Keyword[int] identifier[pos] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[idx] operator[=] Other[0] operator[SEP] identifier[idx] operator[<] Keyword[this] operator[SEP] identifier[blockCount] operator[SEP] identifier[idx] operator[++] operator[SEP] { Keyword[int] identifier[size] operator[=] Keyword[this] operator[SEP] identifier[blockSize] operator[SEP] identifier[idx] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[==] Other[0] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[result] operator[SEP] identifier[putShort] operator[SEP] operator[SEP] Keyword[short] operator[SEP] identifier[size] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] Keyword[this] operator[SEP] identifier[blockData] , identifier[pos] , identifier[tmpData] , Other[0] , identifier[size] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[put] operator[SEP] identifier[tmpData] , Other[0] , identifier[size] operator[SEP] operator[SEP] identifier[pos] operator[+=] Keyword[this] operator[SEP] identifier[blockDataSize] operator[SEP] } identifier[result] operator[SEP] identifier[rewind] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static <T> Procedure1<T> andThen(final Procedure1<? super T> before, final Procedure1<? super T> after) { if (after == null) throw new NullPointerException("after"); if (before == null) throw new NullPointerException("before"); return new Procedures.Procedure1<T>() { @Override public void apply(T p) { before.apply(p); after.apply(p); } }; }
class class_name[name] begin[{] method[andThen, return_type[type[Procedure1]], modifier[public static], parameter[before, after]] begin[{] if[binary_operation[member[.after], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="after")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.before], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="before")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=before, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=after, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=apply, parameters=[FormalParameter(annotations=[], modifiers=set(), name=p, type=ReferenceType(arguments=None, dimensions=[], name=T, 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=Procedures, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=Procedure1, sub_type=None)))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Procedure1] operator[<] identifier[T] operator[>] identifier[andThen] operator[SEP] Keyword[final] identifier[Procedure1] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[before] , Keyword[final] identifier[Procedure1] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[after] operator[SEP] { Keyword[if] operator[SEP] identifier[after] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[before] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Procedures] operator[SEP] identifier[Procedure1] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[apply] operator[SEP] identifier[T] identifier[p] operator[SEP] { identifier[before] operator[SEP] identifier[apply] operator[SEP] identifier[p] operator[SEP] operator[SEP] identifier[after] operator[SEP] identifier[apply] operator[SEP] identifier[p] operator[SEP] operator[SEP] } } operator[SEP] }
public static ntp_param[] get_filtered(nitro_service service, String filter) throws Exception { ntp_param obj = new ntp_param(); options option = new options(); option.set_filter(filter); ntp_param[] response = (ntp_param[]) obj.getfiltered(service, option); return response; }
class class_name[name] begin[{] method[get_filtered, return_type[type[ntp_param]], modifier[public static], parameter[service, filter]] begin[{] local_variable[type[ntp_param], obj] local_variable[type[options], option] call[option.set_filter, parameter[member[.filter]]] local_variable[type[ntp_param], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ntp_param] operator[SEP] operator[SEP] identifier[get_filtered] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[filter] operator[SEP] Keyword[throws] identifier[Exception] { identifier[ntp_param] identifier[obj] operator[=] Keyword[new] identifier[ntp_param] operator[SEP] operator[SEP] operator[SEP] identifier[options] identifier[option] operator[=] Keyword[new] identifier[options] operator[SEP] operator[SEP] operator[SEP] identifier[option] operator[SEP] identifier[set_filter] operator[SEP] identifier[filter] operator[SEP] operator[SEP] identifier[ntp_param] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[ntp_param] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[getfiltered] operator[SEP] identifier[service] , identifier[option] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
protected ResponseEntity buildNotFoundResponseEntity(final String message) { return new ResponseEntity<>(CollectionUtils.wrap("message", message), HttpStatus.NOT_FOUND); }
class class_name[name] begin[{] method[buildNotFoundResponseEntity, return_type[type[ResponseEntity]], modifier[protected], parameter[message]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="message"), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=wrap, postfix_operators=[], prefix_operators=[], qualifier=CollectionUtils, selectors=[], type_arguments=None), MemberReference(member=NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=HttpStatus, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ResponseEntity, sub_type=None))] end[}] END[}]
Keyword[protected] identifier[ResponseEntity] identifier[buildNotFoundResponseEntity] operator[SEP] Keyword[final] identifier[String] identifier[message] operator[SEP] { Keyword[return] Keyword[new] identifier[ResponseEntity] operator[<] operator[>] operator[SEP] identifier[CollectionUtils] operator[SEP] identifier[wrap] operator[SEP] literal[String] , identifier[message] operator[SEP] , identifier[HttpStatus] operator[SEP] identifier[NOT_FOUND] operator[SEP] operator[SEP] }
protected void addBranchesAsChildren( Git git, CallSpecification spec, DocumentWriter writer ) throws GitAPIException { Set<String> remoteBranchPrefixes = remoteBranchPrefixes(); if (remoteBranchPrefixes.isEmpty()) { // Generate the child references to the LOCAL branches, which will be sorted by name ... ListBranchCommand command = git.branchList(); List<Ref> branches = command.call(); // Reverse the sort of the branch names, since they might be version numbers ... Collections.sort(branches, REVERSE_REF_COMPARATOR); for (Ref ref : branches) { String name = ref.getName(); name = name.replace(GitFunction.LOCAL_BRANCH_PREFIX, ""); writer.addChild(spec.childId(name), name); } return; } // There is at least one REMOTE branch, so generate the child references to the REMOTE branches, // which will be sorted by name (by the command)... ListBranchCommand command = git.branchList(); command.setListMode(ListMode.REMOTE); List<Ref> branches = command.call(); // Reverse the sort of the branch names, since they might be version numbers ... Collections.sort(branches, REVERSE_REF_COMPARATOR); Set<String> uniqueNames = new HashSet<String>(); for (Ref ref : branches) { String name = ref.getName(); if (uniqueNames.contains(name)) continue; // We only want the branch if it matches one of the listed remotes ... boolean skip = false; for (String remoteBranchPrefix : remoteBranchPrefixes) { if (name.startsWith(remoteBranchPrefix)) { // Remove the prefix ... name = name.replaceFirst(remoteBranchPrefix, ""); break; } // Otherwise, it's a remote branch from a different remote that we don't want ... skip = true; } if (skip) continue; if (uniqueNames.add(name)) writer.addChild(spec.childId(name), name); } }
class class_name[name] begin[{] method[addBranchesAsChildren, return_type[void], modifier[protected], parameter[git, spec, writer]] begin[{] local_variable[type[Set], remoteBranchPrefixes] if[call[remoteBranchPrefixes.isEmpty, parameter[]]] begin[{] local_variable[type[ListBranchCommand], command] local_variable[type[List], branches] call[Collections.sort, parameter[member[.branches], member[.REVERSE_REF_COMPARATOR]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=ref, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=LOCAL_BRANCH_PREFIX, postfix_operators=[], prefix_operators=[], qualifier=GitFunction, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=replace, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=childId, postfix_operators=[], prefix_operators=[], qualifier=spec, selectors=[], type_arguments=None), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addChild, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=branches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ref)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Ref, sub_type=None))), label=None) return[None] else begin[{] None end[}] local_variable[type[ListBranchCommand], command] call[command.setListMode, parameter[member[ListMode.REMOTE]]] local_variable[type[List], branches] call[Collections.sort, parameter[member[.branches], member[.REVERSE_REF_COMPARATOR]]] local_variable[type[Set], uniqueNames] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=ref, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=uniqueNames, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=skip)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=remoteBranchPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=remoteBranchPrefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=replaceFirst, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=skip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=remoteBranchPrefixes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=remoteBranchPrefix)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=skip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=uniqueNames, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=childId, postfix_operators=[], prefix_operators=[], qualifier=spec, selectors=[], type_arguments=None), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addChild, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=branches, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ref)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Ref, sub_type=None))), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[addBranchesAsChildren] operator[SEP] identifier[Git] identifier[git] , identifier[CallSpecification] identifier[spec] , identifier[DocumentWriter] identifier[writer] operator[SEP] Keyword[throws] identifier[GitAPIException] { identifier[Set] operator[<] identifier[String] operator[>] identifier[remoteBranchPrefixes] operator[=] identifier[remoteBranchPrefixes] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[remoteBranchPrefixes] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[ListBranchCommand] identifier[command] operator[=] identifier[git] operator[SEP] identifier[branchList] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Ref] operator[>] identifier[branches] operator[=] identifier[command] operator[SEP] identifier[call] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[branches] , identifier[REVERSE_REF_COMPARATOR] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Ref] identifier[ref] operator[:] identifier[branches] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[ref] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[=] identifier[name] operator[SEP] identifier[replace] operator[SEP] identifier[GitFunction] operator[SEP] identifier[LOCAL_BRANCH_PREFIX] , literal[String] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[addChild] operator[SEP] identifier[spec] operator[SEP] identifier[childId] operator[SEP] identifier[name] operator[SEP] , identifier[name] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] } identifier[ListBranchCommand] identifier[command] operator[=] identifier[git] operator[SEP] identifier[branchList] operator[SEP] operator[SEP] operator[SEP] identifier[command] operator[SEP] identifier[setListMode] operator[SEP] identifier[ListMode] operator[SEP] identifier[REMOTE] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Ref] operator[>] identifier[branches] operator[=] identifier[command] operator[SEP] identifier[call] operator[SEP] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[branches] , identifier[REVERSE_REF_COMPARATOR] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[uniqueNames] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Ref] identifier[ref] operator[:] identifier[branches] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[ref] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[uniqueNames] operator[SEP] identifier[contains] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] Keyword[boolean] identifier[skip] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[remoteBranchPrefix] operator[:] identifier[remoteBranchPrefixes] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[startsWith] operator[SEP] identifier[remoteBranchPrefix] operator[SEP] operator[SEP] { identifier[name] operator[=] identifier[name] operator[SEP] identifier[replaceFirst] operator[SEP] identifier[remoteBranchPrefix] , literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[skip] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[skip] operator[SEP] Keyword[continue] operator[SEP] Keyword[if] operator[SEP] identifier[uniqueNames] operator[SEP] identifier[add] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[addChild] operator[SEP] identifier[spec] operator[SEP] identifier[childId] operator[SEP] identifier[name] operator[SEP] , identifier[name] operator[SEP] operator[SEP] } }
public Charset getCharsetParameter() { String value = getParameter("charset"); return value == null ? null : Charset.forName(value); }
class class_name[name] begin[{] method[getCharsetParameter, return_type[type[Charset]], modifier[public], parameter[]] begin[{] local_variable[type[String], value] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Charset, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] identifier[Charset] identifier[getCharsetParameter] operator[SEP] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[getParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[Charset] operator[SEP] identifier[forName] operator[SEP] identifier[value] operator[SEP] operator[SEP] }
public static <A, B> B safeLookup(Map<A, B> map, A key) { if (map == null) { return null; } return map.get(key); }
class class_name[name] begin[{] method[safeLookup, return_type[type[B]], modifier[public static], parameter[map, key]] begin[{] if[binary_operation[member[.map], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[map.get, parameter[member[.key]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[A] , identifier[B] operator[>] identifier[B] identifier[safeLookup] operator[SEP] identifier[Map] operator[<] identifier[A] , identifier[B] operator[>] identifier[map] , identifier[A] identifier[key] operator[SEP] { Keyword[if] operator[SEP] identifier[map] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] }
protected final PrcPrepaymentFromCopy<RS> createPutPrcPrepaymentFromCopy( final Map<String, Object> pAddParam) throws Exception { PrcPrepaymentFromCopy<RS> proc = new PrcPrepaymentFromCopy<RS>(); @SuppressWarnings("unchecked") IEntityProcessor<PrepaymentFrom, Long> procDlg = (IEntityProcessor<PrepaymentFrom, Long>) lazyGetPrcAccEntityPbWithSubaccCopy(pAddParam); proc.setPrcAccEntityPbWithSubaccCopy(procDlg); proc.setSrvTypeCode(getSrvTypeCode()); //assigning fully initialized object: this.processorsMap.put(PrcPrepaymentFromCopy.class.getSimpleName(), proc); return proc; }
class class_name[name] begin[{] method[createPutPrcPrepaymentFromCopy, return_type[type[PrcPrepaymentFromCopy]], modifier[final protected], parameter[pAddParam]] begin[{] local_variable[type[PrcPrepaymentFromCopy], proc] local_variable[type[IEntityProcessor], procDlg] call[proc.setPrcAccEntityPbWithSubaccCopy, parameter[member[.procDlg]]] call[proc.setSrvTypeCode, parameter[call[.getSrvTypeCode, parameter[]]]] THIS[member[None.processorsMap]call[None.put, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=PrcPrepaymentFromCopy, sub_type=None)), member[.proc]]]] return[member[.proc]] end[}] END[}]
Keyword[protected] Keyword[final] identifier[PrcPrepaymentFromCopy] operator[<] identifier[RS] operator[>] identifier[createPutPrcPrepaymentFromCopy] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] operator[SEP] Keyword[throws] identifier[Exception] { identifier[PrcPrepaymentFromCopy] operator[<] identifier[RS] operator[>] identifier[proc] operator[=] Keyword[new] identifier[PrcPrepaymentFromCopy] operator[<] identifier[RS] operator[>] operator[SEP] operator[SEP] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[IEntityProcessor] operator[<] identifier[PrepaymentFrom] , identifier[Long] operator[>] identifier[procDlg] operator[=] operator[SEP] identifier[IEntityProcessor] operator[<] identifier[PrepaymentFrom] , identifier[Long] operator[>] operator[SEP] identifier[lazyGetPrcAccEntityPbWithSubaccCopy] operator[SEP] identifier[pAddParam] operator[SEP] operator[SEP] identifier[proc] operator[SEP] identifier[setPrcAccEntityPbWithSubaccCopy] operator[SEP] identifier[procDlg] operator[SEP] operator[SEP] identifier[proc] operator[SEP] identifier[setSrvTypeCode] operator[SEP] identifier[getSrvTypeCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[processorsMap] operator[SEP] identifier[put] operator[SEP] identifier[PrcPrepaymentFromCopy] operator[SEP] Keyword[class] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] , identifier[proc] operator[SEP] operator[SEP] Keyword[return] identifier[proc] operator[SEP] }
@Override public Result call(Route route, RequestContext context) throws Exception { if (getMembers().isEmpty()) { return context.proceed(); } else { return super.call(route, context); } }
class class_name[name] begin[{] method[call, return_type[type[Result]], modifier[public], parameter[route, context]] begin[{] if[call[.getMembers, parameter[]]] begin[{] return[call[context.proceed, parameter[]]] else begin[{] return[SuperMethodInvocation(arguments=[MemberReference(member=route, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=call, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Result] identifier[call] operator[SEP] identifier[Route] identifier[route] , identifier[RequestContext] identifier[context] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[getMembers] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[context] operator[SEP] identifier[proceed] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[super] operator[SEP] identifier[call] operator[SEP] identifier[route] , identifier[context] operator[SEP] operator[SEP] } }
public ServiceFuture<VaultExtendedInfoResourceInner> updateAsync(String resourceGroupName, String vaultName, VaultExtendedInfoResourceInner resourceResourceExtendedInfoDetails, final ServiceCallback<VaultExtendedInfoResourceInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, vaultName, resourceResourceExtendedInfoDetails), serviceCallback); }
class class_name[name] begin[{] method[updateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, vaultName, resourceResourceExtendedInfoDetails, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.updateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.vaultName], member[.resourceResourceExtendedInfoDetails]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[VaultExtendedInfoResourceInner] operator[>] identifier[updateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[vaultName] , identifier[VaultExtendedInfoResourceInner] identifier[resourceResourceExtendedInfoDetails] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[VaultExtendedInfoResourceInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[updateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[vaultName] , identifier[resourceResourceExtendedInfoDetails] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
@CheckReturnValue @NonNull @BackpressureSupport(BackpressureKind.FULL) @SchedulerSupport(SchedulerSupport.NONE) public final Flowable<T> mergeWith(@NonNull MaybeSource<? extends T> other) { ObjectHelper.requireNonNull(other, "other is null"); return RxJavaPlugins.onAssembly(new FlowableMergeWithMaybe<T>(this, other)); }
class class_name[name] begin[{] method[mergeWith, return_type[type[Flowable]], modifier[final public], parameter[other]] begin[{] call[ObjectHelper.requireNonNull, parameter[member[.other], literal["other is null"]]] return[call[RxJavaPlugins.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=other, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=FlowableMergeWithMaybe, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[NonNull] annotation[@] identifier[BackpressureSupport] operator[SEP] identifier[BackpressureKind] operator[SEP] identifier[FULL] operator[SEP] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] identifier[Flowable] operator[<] identifier[T] operator[>] identifier[mergeWith] operator[SEP] annotation[@] identifier[NonNull] identifier[MaybeSource] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[other] operator[SEP] { identifier[ObjectHelper] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[other] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[RxJavaPlugins] operator[SEP] identifier[onAssembly] operator[SEP] Keyword[new] identifier[FlowableMergeWithMaybe] operator[<] identifier[T] operator[>] operator[SEP] Keyword[this] , identifier[other] operator[SEP] operator[SEP] operator[SEP] }
public void elemAdd(VTensor other) { checkEqualSize(this, other); for (int c = 0; c < this.size(); c++) { addValue(c, other.getValue(c)); } }
class class_name[name] begin[{] method[elemAdd, return_type[void], modifier[public], parameter[other]] begin[{] call[.checkEqualSize, parameter[THIS[], member[.other]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=other, selectors=[], type_arguments=None)], member=addValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=c, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[elemAdd] operator[SEP] identifier[VTensor] identifier[other] operator[SEP] { identifier[checkEqualSize] operator[SEP] Keyword[this] , identifier[other] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[c] operator[=] Other[0] operator[SEP] identifier[c] operator[<] Keyword[this] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[++] operator[SEP] { identifier[addValue] operator[SEP] identifier[c] , identifier[other] operator[SEP] identifier[getValue] operator[SEP] identifier[c] operator[SEP] operator[SEP] operator[SEP] } }
@Override public String writeSingle(String spaceId, String chunkChecksum, ChunkInputStream chunk, Map<String, String> properties) throws NotFoundException { AddContentResult result = writeContent(spaceId, chunk.getChunkId(), chunk, chunk.getChunkSize(), properties); String finalChecksum = chunk.getMD5(); if (chunkChecksum != null && chunk.md5Preserved()) { if (!chunkChecksum.equals(finalChecksum)) { result.setState(AddContentResult.State.ERROR); } } result.setMd5(finalChecksum); return finalChecksum; }
class class_name[name] begin[{] method[writeSingle, return_type[type[String]], modifier[public], parameter[spaceId, chunkChecksum, chunk, properties]] begin[{] local_variable[type[AddContentResult], result] local_variable[type[String], finalChecksum] if[binary_operation[binary_operation[member[.chunkChecksum], !=, literal[null]], &&, call[chunk.md5Preserved, parameter[]]]] begin[{] if[call[chunkChecksum.equals, parameter[member[.finalChecksum]]]] begin[{] call[result.setState, parameter[member[AddContentResult.State.ERROR]]] else begin[{] None end[}] else begin[{] None end[}] call[result.setMd5, parameter[member[.finalChecksum]]] return[member[.finalChecksum]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[writeSingle] operator[SEP] identifier[String] identifier[spaceId] , identifier[String] identifier[chunkChecksum] , identifier[ChunkInputStream] identifier[chunk] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[properties] operator[SEP] Keyword[throws] identifier[NotFoundException] { identifier[AddContentResult] identifier[result] operator[=] identifier[writeContent] operator[SEP] identifier[spaceId] , identifier[chunk] operator[SEP] identifier[getChunkId] operator[SEP] operator[SEP] , identifier[chunk] , identifier[chunk] operator[SEP] identifier[getChunkSize] operator[SEP] operator[SEP] , identifier[properties] operator[SEP] operator[SEP] identifier[String] identifier[finalChecksum] operator[=] identifier[chunk] operator[SEP] identifier[getMD5] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[chunkChecksum] operator[!=] Other[null] operator[&&] identifier[chunk] operator[SEP] identifier[md5Preserved] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[chunkChecksum] operator[SEP] identifier[equals] operator[SEP] identifier[finalChecksum] operator[SEP] operator[SEP] { identifier[result] operator[SEP] identifier[setState] operator[SEP] identifier[AddContentResult] operator[SEP] identifier[State] operator[SEP] identifier[ERROR] operator[SEP] operator[SEP] } } identifier[result] operator[SEP] identifier[setMd5] operator[SEP] identifier[finalChecksum] operator[SEP] operator[SEP] Keyword[return] identifier[finalChecksum] operator[SEP] }
public com.google.rpc.Help.Link getLinks(int index) { return links_.get(index); }
class class_name[name] begin[{] method[getLinks, return_type[type[com]], modifier[public], parameter[index]] begin[{] return[call[links_.get, parameter[member[.index]]]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[rpc] operator[SEP] identifier[Help] operator[SEP] identifier[Link] identifier[getLinks] operator[SEP] Keyword[int] identifier[index] operator[SEP] { Keyword[return] identifier[links_] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] }
void log(Level level, String msg, Exception e) { if (e != null) logger.log(level, msg, e); }
class class_name[name] begin[{] method[log, return_type[void], modifier[default], parameter[level, msg, e]] begin[{] if[binary_operation[member[.e], !=, literal[null]]] begin[{] call[logger.log, parameter[member[.level], member[.msg], member[.e]]] else begin[{] None end[}] end[}] END[}]
Keyword[void] identifier[log] operator[SEP] identifier[Level] identifier[level] , identifier[String] identifier[msg] , identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[e] operator[!=] Other[null] operator[SEP] identifier[logger] operator[SEP] identifier[log] operator[SEP] identifier[level] , identifier[msg] , identifier[e] operator[SEP] operator[SEP] }
protected Node getFolderNode() throws EFapsException, RepositoryException { Node ret = getSession().getRootNode(); if (getProperties().containsKey(JCRStoreResource.PROPERTY_BASEFOLDER)) { if (ret.hasNode(getProperties().get(JCRStoreResource.PROPERTY_BASEFOLDER))) { ret = ret.getNode(getProperties().get(JCRStoreResource.PROPERTY_BASEFOLDER)); } else { ret = ret.addNode(getProperties().get(JCRStoreResource.PROPERTY_BASEFOLDER), NodeType.NT_FOLDER); } } final String subFolder = new DateTime().toString("yyyy-MM"); if (ret.hasNode(subFolder)) { ret = ret.getNode(subFolder); } else { ret = ret.addNode(subFolder, NodeType.NT_FOLDER); } return ret; }
class class_name[name] begin[{] method[getFolderNode, return_type[type[Node]], modifier[protected], parameter[]] begin[{] local_variable[type[Node], ret] if[call[.getProperties, parameter[]]] begin[{] if[call[ret.hasNode, parameter[call[.getProperties, parameter[]]]]] begin[{] assign[member[.ret], call[ret.getNode, parameter[call[.getProperties, parameter[]]]]] else begin[{] assign[member[.ret], call[ret.addNode, parameter[call[.getProperties, parameter[]], member[NodeType.NT_FOLDER]]]] end[}] else begin[{] None end[}] local_variable[type[String], subFolder] if[call[ret.hasNode, parameter[member[.subFolder]]]] begin[{] assign[member[.ret], call[ret.getNode, parameter[member[.subFolder]]]] else begin[{] assign[member[.ret], call[ret.addNode, parameter[member[.subFolder], member[NodeType.NT_FOLDER]]]] end[}] return[member[.ret]] end[}] END[}]
Keyword[protected] identifier[Node] identifier[getFolderNode] operator[SEP] operator[SEP] Keyword[throws] identifier[EFapsException] , identifier[RepositoryException] { identifier[Node] identifier[ret] operator[=] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] identifier[getRootNode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[JCRStoreResource] operator[SEP] identifier[PROPERTY_BASEFOLDER] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ret] operator[SEP] identifier[hasNode] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[JCRStoreResource] operator[SEP] identifier[PROPERTY_BASEFOLDER] operator[SEP] operator[SEP] operator[SEP] { identifier[ret] operator[=] identifier[ret] operator[SEP] identifier[getNode] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[JCRStoreResource] operator[SEP] identifier[PROPERTY_BASEFOLDER] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[ret] operator[=] identifier[ret] operator[SEP] identifier[addNode] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[JCRStoreResource] operator[SEP] identifier[PROPERTY_BASEFOLDER] operator[SEP] , identifier[NodeType] operator[SEP] identifier[NT_FOLDER] operator[SEP] operator[SEP] } } Keyword[final] identifier[String] identifier[subFolder] operator[=] Keyword[new] identifier[DateTime] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ret] operator[SEP] identifier[hasNode] operator[SEP] identifier[subFolder] operator[SEP] operator[SEP] { identifier[ret] operator[=] identifier[ret] operator[SEP] identifier[getNode] operator[SEP] identifier[subFolder] operator[SEP] operator[SEP] } Keyword[else] { identifier[ret] operator[=] identifier[ret] operator[SEP] identifier[addNode] operator[SEP] identifier[subFolder] , identifier[NodeType] operator[SEP] identifier[NT_FOLDER] operator[SEP] operator[SEP] } Keyword[return] identifier[ret] operator[SEP] }
public ServiceFuture<SecurityRuleInner> getAsync(String resourceGroupName, String networkSecurityGroupName, String securityRuleName, final ServiceCallback<SecurityRuleInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, networkSecurityGroupName, securityRuleName), serviceCallback); }
class class_name[name] begin[{] method[getAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, networkSecurityGroupName, securityRuleName, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.getWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.networkSecurityGroupName], member[.securityRuleName]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[SecurityRuleInner] operator[>] identifier[getAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[networkSecurityGroupName] , identifier[String] identifier[securityRuleName] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[SecurityRuleInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[getWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[networkSecurityGroupName] , identifier[securityRuleName] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
protected SSLContext getSSLContextForLink(VirtualConnection vc, String host, String port, String endPoint, Boolean isZWebContainerChain, SSLConnectionLink link) throws ChannelException { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "host=" + host + " port=" + port + " endPoint=" + endPoint); } // Set up the parameters needed to call into the JSSEHelper to extract official SSL Props. String direction = (getConfig().isInbound()) ? Constants.DIRECTION_INBOUND : Constants.DIRECTION_OUTBOUND; final Map<String, Object> connectionInfo = new HashMap<String, Object>(); connectionInfo.put(Constants.CONNECTION_INFO_DIRECTION, direction); connectionInfo.put(Constants.CONNECTION_INFO_REMOTE_HOST, host); connectionInfo.put(Constants.CONNECTION_INFO_REMOTE_PORT, port); connectionInfo.put(Constants.CONNECTION_INFO_ENDPOINT_NAME, endPoint); // PK40641 - handle channel props that do not need JSSEHelper Properties props = null; boolean useJSSEHelper = (null != this.alias); if (!useJSSEHelper) { // 436920 - check for ssl properties put programmatically on the thread. // Calling into JSSEHelper.getProperties() does this same action try { props = AccessController.doPrivileged(new PrivilegedExceptionAction<Properties>() { @Override public Properties run() throws Exception { return jsseHelper.getSSLPropertiesOnThread(); } }); } catch (Exception e) { // no ffdc required if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Caught exception looking for on-thread props; e=" + e); } } if (null == props || 0 == props.size()) { // if alias is null, then if keystore and truststore are found then // simply use the existing config properties. If either one is // missing, call into the jssehelper for the default repertoire (null alias) props = null; useJSSEHelper = !getConfig().getProperties().containsKey(Constants.SSLPROP_KEY_STORE) || !getConfig().getProperties().containsKey(Constants.SSLPROP_TRUST_STORE); } else { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Found on-thread ssl properties"); } } } if (useJSSEHelper) { try { // Extract the official SSL props based on config information. final String aliasFinal = this.alias; if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Querying security service for alias=[" + aliasFinal + "]"); } props = AccessController.doPrivileged(new PrivilegedExceptionAction<Properties>() { @Override public Properties run() throws Exception { return jsseHelper.getProperties(aliasFinal, connectionInfo, null); } }); } catch ( Exception e) { // no FFDC required if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Exception getting SSL properties from alias: " + this.alias); } throw new ChannelException(e); } } // at this point, we have a set of properties to use, which might be // repertoire based or on-thread config... merge the channel props into // them without overwriting any if (null != props) { Enumeration<?> names = getConfig().getProperties().propertyNames(); String key = null; String value = null; while (names.hasMoreElements()) { key = (String) names.nextElement(); value = getConfig().getStringProperty(key); if (null != value && !props.containsKey(key)) { props.put(key, value); } } } else { // otherwise we just use the channel config props = getConfig().getProperties(); } // "SSSL" is a zOS repertoire type that is not supported by SSLChannel // We only support "JSSE" String sslType = (String) props.get(Constants.SSLPROP_SSLTYPE); if (null != sslType) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "SSLConfig type: " + sslType); } if (sslType.equals("SSSL")) { throw new ChannelException("Invalid SSLConfig type: " + sslType); } } // if debug is enabled, print out the properties we're going to use if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "SSL configuration <null value means non-string>:"); Enumeration<?> names = props.propertyNames(); while (names.hasMoreElements()) { String key = (String) names.nextElement(); String value = props.getProperty(key); if (-1 == key.toLowerCase().indexOf("password")) { Tr.debug(tc, "\t" + key + " = " + value); } else { // for nicer debug... print 1 * per character in the password StringBuilder output = new StringBuilder(4 + key.length() + value.length()); output.append("\t").append(key).append(" = "); for (int i = 0; i < value.length(); i++) { output.append("*"); } Tr.debug(tc, output.toString()); } } } SSLContext context = null; try { SSLConfig config = new SSLConfig(props); context = this.jsseProvider.getSSLContext(connectionInfo, config); SSLLinkConfig linkConfig = new SSLLinkConfig(props); if (null == link) { // discrimination path vc.getStateMap().put(SSLConnectionLink.LINKCONFIG, linkConfig); } else { link.setLinkConfig(linkConfig); } } catch (Exception e) { // no FFDC required if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "Exception getting SSLContext from properties.", new Object[] { e }); } throw new ChannelException(e); } return context; }
class class_name[name] begin[{] method[getSSLContextForLink, return_type[type[SSLContext]], modifier[protected], parameter[vc, host, port, endPoint, isZWebContainerChain, link]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["host="], +, member[.host]], +, literal[" port="]], +, member[.port]], +, literal[" endPoint="]], +, member[.endPoint]]]] else begin[{] None end[}] local_variable[type[String], direction] local_variable[type[Map], connectionInfo] call[connectionInfo.put, parameter[member[Constants.CONNECTION_INFO_DIRECTION], member[.direction]]] call[connectionInfo.put, parameter[member[Constants.CONNECTION_INFO_REMOTE_HOST], member[.host]]] call[connectionInfo.put, parameter[member[Constants.CONNECTION_INFO_REMOTE_PORT], member[.port]]] call[connectionInfo.put, parameter[member[Constants.CONNECTION_INFO_ENDPOINT_NAME], member[.endPoint]]] local_variable[type[Properties], props] local_variable[type[boolean], useJSSEHelper] if[member[.useJSSEHelper]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=props, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getSSLPropertiesOnThread, postfix_operators=[], prefix_operators=[], qualifier=jsseHelper, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Properties, sub_type=None), throws=['Exception'], 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=Properties, sub_type=None))], dimensions=None, name=PrivilegedExceptionAction, sub_type=None))], member=doPrivileged, postfix_operators=[], prefix_operators=[], qualifier=AccessController, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[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=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Caught exception looking for on-thread props; e="), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, 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) if[binary_operation[binary_operation[literal[null], ==, member[.props]], ||, binary_operation[literal[0], ==, call[props.size, parameter[]]]]] begin[{] assign[member[.props], literal[null]] assign[member[.useJSSEHelper], binary_operation[call[.getConfig, parameter[]], ||, call[.getConfig, parameter[]]]] else begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], literal["Found on-thread ssl properties"]]] else begin[{] None end[}] end[}] else begin[{] None end[}] if[member[.useJSSEHelper]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=alias, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), name=aliasFinal)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=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=[]), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Querying security service for alias=["), operandr=MemberReference(member=aliasFinal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="]"), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=props, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=aliasFinal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=connectionInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getProperties, postfix_operators=[], prefix_operators=[], qualifier=jsseHelper, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Properties, sub_type=None), throws=['Exception'], 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=Properties, sub_type=None))], dimensions=None, name=PrivilegedExceptionAction, sub_type=None))], member=doPrivileged, postfix_operators=[], prefix_operators=[], qualifier=AccessController, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[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=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception getting SSL properties from alias: "), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=alias, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), 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=ChannelException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] if[binary_operation[literal[null], !=, member[.props]]] begin[{] local_variable[type[Enumeration], names] local_variable[type[String], key] local_variable[type[String], value] while[call[names.hasMoreElements, parameter[]]] begin[{] assign[member[.key], Cast(expression=MethodInvocation(arguments=[], member=nextElement, postfix_operators=[], prefix_operators=[], qualifier=names, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))] assign[member[.value], call[.getConfig, parameter[]]] if[binary_operation[binary_operation[literal[null], !=, member[.value]], &&, call[props.containsKey, parameter[member[.key]]]]] begin[{] call[props.put, parameter[member[.key], member[.value]]] else begin[{] None end[}] end[}] else begin[{] assign[member[.props], call[.getConfig, parameter[]]] end[}] local_variable[type[String], sslType] if[binary_operation[literal[null], !=, member[.sslType]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[literal["SSLConfig type: "], +, member[.sslType]]]] else begin[{] None end[}] if[call[sslType.equals, parameter[literal["SSSL"]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid SSLConfig type: "), operandr=MemberReference(member=sslType, 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=ChannelException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], literal["SSL configuration <null value means non-string>:"]]] local_variable[type[Enumeration], names] while[call[names.hasMoreElements, parameter[]]] begin[{] local_variable[type[String], key] local_variable[type[String], value] if[binary_operation[literal[1], ==, call[key.toLowerCase, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[binary_operation[literal["\t"], +, member[.key]], +, literal[" = "]], +, member[.value]]]] else begin[{] local_variable[type[StringBuilder], output] call[output.append, parameter[literal["\t"]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="*")], member=append, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=value, 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) call[Tr.debug, parameter[member[.tc], call[output.toString, parameter[]]]] end[}] end[}] else begin[{] None end[}] local_variable[type[SSLContext], context] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=props, 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=SSLConfig, sub_type=None)), name=config)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SSLConfig, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=jsseProvider, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=connectionInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSSLContext, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=props, 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=SSLLinkConfig, sub_type=None)), name=linkConfig)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SSLLinkConfig, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=link, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=linkConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setLinkConfig, postfix_operators=[], prefix_operators=[], qualifier=link, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getStateMap, postfix_operators=[], prefix_operators=[], qualifier=vc, selectors=[MethodInvocation(arguments=[MemberReference(member=LINKCONFIG, postfix_operators=[], prefix_operators=[], qualifier=SSLConnectionLink, selectors=[]), MemberReference(member=linkConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], catches=[CatchClause(block=[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=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Exception getting SSLContext from properties."), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=debug, postfix_operators=[], prefix_operators=[], qualifier=Tr, selectors=[], type_arguments=None), label=None)])), 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=ChannelException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.context]] end[}] END[}]
Keyword[protected] identifier[SSLContext] identifier[getSSLContextForLink] operator[SEP] identifier[VirtualConnection] identifier[vc] , identifier[String] identifier[host] , identifier[String] identifier[port] , identifier[String] identifier[endPoint] , identifier[Boolean] identifier[isZWebContainerChain] , identifier[SSLConnectionLink] identifier[link] operator[SEP] Keyword[throws] identifier[ChannelException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[host] operator[+] literal[String] operator[+] identifier[port] operator[+] literal[String] operator[+] identifier[endPoint] operator[SEP] operator[SEP] } identifier[String] identifier[direction] operator[=] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[isInbound] operator[SEP] operator[SEP] operator[SEP] operator[?] identifier[Constants] operator[SEP] identifier[DIRECTION_INBOUND] operator[:] identifier[Constants] operator[SEP] identifier[DIRECTION_OUTBOUND] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[connectionInfo] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[connectionInfo] operator[SEP] identifier[put] operator[SEP] identifier[Constants] operator[SEP] identifier[CONNECTION_INFO_DIRECTION] , identifier[direction] operator[SEP] operator[SEP] identifier[connectionInfo] operator[SEP] identifier[put] operator[SEP] identifier[Constants] operator[SEP] identifier[CONNECTION_INFO_REMOTE_HOST] , identifier[host] operator[SEP] operator[SEP] identifier[connectionInfo] operator[SEP] identifier[put] operator[SEP] identifier[Constants] operator[SEP] identifier[CONNECTION_INFO_REMOTE_PORT] , identifier[port] operator[SEP] operator[SEP] identifier[connectionInfo] operator[SEP] identifier[put] operator[SEP] identifier[Constants] operator[SEP] identifier[CONNECTION_INFO_ENDPOINT_NAME] , identifier[endPoint] operator[SEP] operator[SEP] identifier[Properties] identifier[props] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[useJSSEHelper] operator[=] operator[SEP] Other[null] operator[!=] Keyword[this] operator[SEP] identifier[alias] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[useJSSEHelper] operator[SEP] { Keyword[try] { identifier[props] operator[=] identifier[AccessController] operator[SEP] identifier[doPrivileged] operator[SEP] Keyword[new] identifier[PrivilegedExceptionAction] operator[<] identifier[Properties] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Properties] identifier[run] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[return] identifier[jsseHelper] operator[SEP] identifier[getSSLPropertiesOnThread] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[e] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] Other[null] operator[==] identifier[props] operator[||] Other[0] operator[==] identifier[props] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { identifier[props] operator[=] Other[null] operator[SEP] identifier[useJSSEHelper] operator[=] operator[!] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[Constants] operator[SEP] identifier[SSLPROP_KEY_STORE] operator[SEP] operator[||] operator[!] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[containsKey] operator[SEP] identifier[Constants] operator[SEP] identifier[SSLPROP_TRUST_STORE] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[useJSSEHelper] operator[SEP] { Keyword[try] { Keyword[final] identifier[String] identifier[aliasFinal] operator[=] Keyword[this] operator[SEP] identifier[alias] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[aliasFinal] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[props] operator[=] identifier[AccessController] operator[SEP] identifier[doPrivileged] operator[SEP] Keyword[new] identifier[PrivilegedExceptionAction] operator[<] identifier[Properties] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Properties] identifier[run] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[return] identifier[jsseHelper] operator[SEP] identifier[getProperties] operator[SEP] identifier[aliasFinal] , identifier[connectionInfo] , Other[null] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] Keyword[this] operator[SEP] identifier[alias] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[ChannelException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] Other[null] operator[!=] identifier[props] operator[SEP] { identifier[Enumeration] operator[<] operator[?] operator[>] identifier[names] operator[=] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] identifier[propertyNames] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[key] operator[=] Other[null] operator[SEP] identifier[String] identifier[value] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] identifier[names] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[key] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[names] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getStringProperty] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[value] operator[&&] operator[!] identifier[props] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] { identifier[props] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[props] operator[=] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[sslType] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[props] operator[SEP] identifier[get] operator[SEP] identifier[Constants] operator[SEP] identifier[SSLPROP_SSLTYPE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[sslType] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[sslType] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[sslType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ChannelException] operator[SEP] literal[String] operator[+] identifier[sslType] 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] , literal[String] operator[SEP] operator[SEP] identifier[Enumeration] operator[<] operator[?] operator[>] identifier[names] operator[=] identifier[props] operator[SEP] identifier[propertyNames] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[names] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[key] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[names] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[value] operator[=] identifier[props] operator[SEP] identifier[getProperty] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[-] Other[1] operator[==] identifier[key] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[+] identifier[key] operator[+] literal[String] operator[+] identifier[value] operator[SEP] operator[SEP] } Keyword[else] { identifier[StringBuilder] identifier[output] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[4] operator[+] identifier[key] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] identifier[value] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[output] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[append] 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[value] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[output] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , identifier[output] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } identifier[SSLContext] identifier[context] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[SSLConfig] identifier[config] operator[=] Keyword[new] identifier[SSLConfig] operator[SEP] identifier[props] operator[SEP] operator[SEP] identifier[context] operator[=] Keyword[this] operator[SEP] identifier[jsseProvider] operator[SEP] identifier[getSSLContext] operator[SEP] identifier[connectionInfo] , identifier[config] operator[SEP] operator[SEP] identifier[SSLLinkConfig] identifier[linkConfig] operator[=] Keyword[new] identifier[SSLLinkConfig] operator[SEP] identifier[props] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[link] operator[SEP] { identifier[vc] operator[SEP] identifier[getStateMap] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[SSLConnectionLink] operator[SEP] identifier[LINKCONFIG] , identifier[linkConfig] operator[SEP] operator[SEP] } Keyword[else] { identifier[link] operator[SEP] identifier[setLinkConfig] operator[SEP] identifier[linkConfig] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[e] } operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[ChannelException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[context] operator[SEP] }
public static void createTemplate(RestClient client, String template, boolean force) throws Exception { String json = TemplateSettingsReader.readTemplate(template); createTemplateWithJson(client, template, json, force); }
class class_name[name] begin[{] method[createTemplate, return_type[void], modifier[public static], parameter[client, template, force]] begin[{] local_variable[type[String], json] call[.createTemplateWithJson, parameter[member[.client], member[.template], member[.json], member[.force]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[createTemplate] operator[SEP] identifier[RestClient] identifier[client] , identifier[String] identifier[template] , Keyword[boolean] identifier[force] operator[SEP] Keyword[throws] identifier[Exception] { identifier[String] identifier[json] operator[=] identifier[TemplateSettingsReader] operator[SEP] identifier[readTemplate] operator[SEP] identifier[template] operator[SEP] operator[SEP] identifier[createTemplateWithJson] operator[SEP] identifier[client] , identifier[template] , identifier[json] , identifier[force] operator[SEP] operator[SEP] }
public ListAppStreamsResponse listAppStreams(ListAppStreamsRequest request) { checkNotNull(request, "The parameter request should NOT be null."); checkStringNotEmpty(request.getApp(), "The parameter app should NOT be null or empty string."); InternalRequest internalRequest = createRequest(HttpMethodName.GET, request, LIVE_APP, request.getApp(), LIVE_SESSION); if (request.getStatus() != null) { internalRequest.addParameter("status", request.getStatus()); } return invokeHttpClient(internalRequest, ListAppStreamsResponse.class); }
class class_name[name] begin[{] method[listAppStreams, return_type[type[ListAppStreamsResponse]], modifier[public], parameter[request]] begin[{] call[.checkNotNull, parameter[member[.request], literal["The parameter request should NOT be null."]]] call[.checkStringNotEmpty, parameter[call[request.getApp, parameter[]], literal["The parameter app should NOT be null or empty string."]]] local_variable[type[InternalRequest], internalRequest] if[binary_operation[call[request.getStatus, parameter[]], !=, literal[null]]] begin[{] call[internalRequest.addParameter, parameter[literal["status"], call[request.getStatus, parameter[]]]] else begin[{] None end[}] return[call[.invokeHttpClient, parameter[member[.internalRequest], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ListAppStreamsResponse, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[ListAppStreamsResponse] identifier[listAppStreams] operator[SEP] identifier[ListAppStreamsRequest] identifier[request] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[request] , literal[String] operator[SEP] operator[SEP] identifier[checkStringNotEmpty] operator[SEP] identifier[request] operator[SEP] identifier[getApp] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[InternalRequest] identifier[internalRequest] operator[=] identifier[createRequest] operator[SEP] identifier[HttpMethodName] operator[SEP] identifier[GET] , identifier[request] , identifier[LIVE_APP] , identifier[request] operator[SEP] identifier[getApp] operator[SEP] operator[SEP] , identifier[LIVE_SESSION] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[request] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[internalRequest] operator[SEP] identifier[addParameter] operator[SEP] literal[String] , identifier[request] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[invokeHttpClient] operator[SEP] identifier[internalRequest] , identifier[ListAppStreamsResponse] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public JvmOperation getElement() { if (element != null && element.eIsProxy()) { InternalEObject oldElement = (InternalEObject)element; element = (JvmOperation)eResolveProxy(oldElement); if (element != oldElement) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, XAnnotationsPackage.XANNOTATION_ELEMENT_VALUE_PAIR__ELEMENT, oldElement, element)); } } return element; }
class class_name[name] begin[{] method[getElement, return_type[type[JvmOperation]], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[member[.element], !=, literal[null]], &&, call[element.eIsProxy, parameter[]]]] begin[{] local_variable[type[InternalEObject], oldElement] assign[member[.element], Cast(expression=MethodInvocation(arguments=[MemberReference(member=oldElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eResolveProxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=JvmOperation, sub_type=None))] if[binary_operation[member[.element], !=, member[.oldElement]]] begin[{] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=RESOLVE, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=XANNOTATION_ELEMENT_VALUE_PAIR__ELEMENT, postfix_operators=[], prefix_operators=[], qualifier=XAnnotationsPackage, selectors=[]), MemberReference(member=oldElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=element, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] return[member[.element]] end[}] END[}]
Keyword[public] identifier[JvmOperation] identifier[getElement] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[element] operator[!=] Other[null] operator[&&] identifier[element] operator[SEP] identifier[eIsProxy] operator[SEP] operator[SEP] operator[SEP] { identifier[InternalEObject] identifier[oldElement] operator[=] operator[SEP] identifier[InternalEObject] operator[SEP] identifier[element] operator[SEP] identifier[element] operator[=] operator[SEP] identifier[JvmOperation] operator[SEP] identifier[eResolveProxy] operator[SEP] identifier[oldElement] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[element] operator[!=] identifier[oldElement] operator[SEP] { Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[RESOLVE] , identifier[XAnnotationsPackage] operator[SEP] identifier[XANNOTATION_ELEMENT_VALUE_PAIR__ELEMENT] , identifier[oldElement] , identifier[element] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[element] operator[SEP] }
public static long queryNumEntries(SQLiteDatabase db, String table, String selection, String[] selectionArgs) { String s = (!TextUtils.isEmpty(selection)) ? " where " + selection : ""; return longForQuery(db, "select count(*) from " + table + s, selectionArgs); }
class class_name[name] begin[{] method[queryNumEntries, return_type[type[long]], modifier[public static], parameter[db, table, selection, selectionArgs]] begin[{] local_variable[type[String], s] return[call[.longForQuery, parameter[member[.db], binary_operation[binary_operation[literal["select count(*) from "], +, member[.table]], +, member[.s]], member[.selectionArgs]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[queryNumEntries] operator[SEP] identifier[SQLiteDatabase] identifier[db] , identifier[String] identifier[table] , identifier[String] identifier[selection] , identifier[String] operator[SEP] operator[SEP] identifier[selectionArgs] operator[SEP] { identifier[String] identifier[s] operator[=] operator[SEP] operator[!] identifier[TextUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[selection] operator[SEP] operator[SEP] operator[?] literal[String] operator[+] identifier[selection] operator[:] literal[String] operator[SEP] Keyword[return] identifier[longForQuery] operator[SEP] identifier[db] , literal[String] operator[+] identifier[table] operator[+] identifier[s] , identifier[selectionArgs] operator[SEP] operator[SEP] }
public void setSizeConstraints(java.util.Collection<SizeConstraint> sizeConstraints) { if (sizeConstraints == null) { this.sizeConstraints = null; return; } this.sizeConstraints = new java.util.ArrayList<SizeConstraint>(sizeConstraints); }
class class_name[name] begin[{] method[setSizeConstraints, return_type[void], modifier[public], parameter[sizeConstraints]] begin[{] if[binary_operation[member[.sizeConstraints], ==, literal[null]]] begin[{] assign[THIS[member[None.sizeConstraints]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.sizeConstraints]], ClassCreator(arguments=[MemberReference(member=sizeConstraints, 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SizeConstraint, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setSizeConstraints] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[SizeConstraint] operator[>] identifier[sizeConstraints] operator[SEP] { Keyword[if] operator[SEP] identifier[sizeConstraints] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[sizeConstraints] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[sizeConstraints] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[SizeConstraint] operator[>] operator[SEP] identifier[sizeConstraints] operator[SEP] operator[SEP] }
public boolean ping(Jid jid, long pingTimeout) throws NotConnectedException, NoResponseException, InterruptedException { final XMPPConnection connection = connection(); // Packet collector for IQs needs an connection that was at least authenticated once, // otherwise the client JID will be null causing an NPE if (!connection.isAuthenticated()) { throw new NotConnectedException(); } Ping ping = new Ping(jid); try { connection.createStanzaCollectorAndSend(ping).nextResultOrThrow(pingTimeout); } catch (XMPPErrorException e) { return isValidErrorPong(jid, e); } return true; }
class class_name[name] begin[{] method[ping, return_type[type[boolean]], modifier[public], parameter[jid, pingTimeout]] begin[{] local_variable[type[XMPPConnection], connection] if[call[connection.isAuthenticated, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NotConnectedException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Ping], ping] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ping, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createStanzaCollectorAndSend, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[MethodInvocation(arguments=[MemberReference(member=pingTimeout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=nextResultOrThrow, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=jid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isValidErrorPong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['XMPPErrorException']))], finally_block=None, label=None, resources=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[ping] operator[SEP] identifier[Jid] identifier[jid] , Keyword[long] identifier[pingTimeout] operator[SEP] Keyword[throws] identifier[NotConnectedException] , identifier[NoResponseException] , identifier[InterruptedException] { Keyword[final] identifier[XMPPConnection] identifier[connection] operator[=] identifier[connection] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[connection] operator[SEP] identifier[isAuthenticated] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[NotConnectedException] operator[SEP] operator[SEP] operator[SEP] } identifier[Ping] identifier[ping] operator[=] Keyword[new] identifier[Ping] operator[SEP] identifier[jid] operator[SEP] operator[SEP] Keyword[try] { identifier[connection] operator[SEP] identifier[createStanzaCollectorAndSend] operator[SEP] identifier[ping] operator[SEP] operator[SEP] identifier[nextResultOrThrow] operator[SEP] identifier[pingTimeout] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[XMPPErrorException] identifier[e] operator[SEP] { Keyword[return] identifier[isValidErrorPong] operator[SEP] identifier[jid] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
private ResourceIterator<Node> singlePropertyIdFindEntities(GraphDatabaseService executionEngine, EntityKey[] keys) { Object[] paramsValues = new Object[keys.length]; for ( int i = 0; i < keys.length; i++ ) { paramsValues[i] = keys[i].getColumnValues()[0]; } Map<String, Object> params = Collections.singletonMap( "0", (Object) paramsValues ); Result result = executionEngine.execute( multiGetQuery, params ); return result.columnAs( ENTITY_ALIAS ); }
class class_name[name] begin[{] method[singlePropertyIdFindEntities, return_type[type[ResourceIterator]], modifier[private], parameter[executionEngine, keys]] begin[{] local_variable[type[Object], paramsValues] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=paramsValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getColumnValues, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), 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=keys, 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) local_variable[type[Map], params] local_variable[type[Result], result] return[call[result.columnAs, parameter[member[.ENTITY_ALIAS]]]] end[}] END[}]
Keyword[private] identifier[ResourceIterator] operator[<] identifier[Node] operator[>] identifier[singlePropertyIdFindEntities] operator[SEP] identifier[GraphDatabaseService] identifier[executionEngine] , identifier[EntityKey] operator[SEP] operator[SEP] identifier[keys] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[paramsValues] operator[=] Keyword[new] identifier[Object] operator[SEP] identifier[keys] 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[keys] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[paramsValues] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[keys] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getColumnValues] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[params] operator[=] identifier[Collections] operator[SEP] identifier[singletonMap] operator[SEP] literal[String] , operator[SEP] identifier[Object] operator[SEP] identifier[paramsValues] operator[SEP] operator[SEP] identifier[Result] identifier[result] operator[=] identifier[executionEngine] operator[SEP] identifier[execute] operator[SEP] identifier[multiGetQuery] , identifier[params] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] identifier[columnAs] operator[SEP] identifier[ENTITY_ALIAS] operator[SEP] operator[SEP] }
@Override public void configure(final String name, final Object value, final Logger logger) { if (ROOT.equals(name)) { if (value instanceof String) { root = (String) value; logger.logInfo("Configured root DN for directory server: " + root); } } else if (OBJECT_CLASSES.equals(name)) { if (value instanceof String[]) { objectClasses = (String[]) value; logger.logInfo("Configured object classes for root DN: " + objectClasses); } } else if (AUTH_DN.equals(name)) { if (value instanceof String) { authDn = (String) value; logger.logInfo("Configured admin identity for directory server: " + authDn); } } else if (PASSWD.equals(name)) { if (value instanceof String) { passwd = (String) value; logger.logInfo("Configured admin credentials for directory server: " + passwd); } } else if (WORK_DIR.equals(name)) { if (value instanceof File) { workingDirectory = (File) value; logger.logInfo("Configured working directory for directory server: " + workingDirectory); } } else if (LDIF_FILE.equals(name)) { if (value instanceof File) { ldifFile = (File) value; logger.logInfo("Configured LDIF seed data source for directory server: " + ldifFile); } } else if (LDAP_PORT.equals(name)) { if (value instanceof Integer) { serverPort = (Integer) value; logger.logInfo("Configured TCP port for directory server: " + serverPort); } } }
class class_name[name] begin[{] method[configure, return_type[void], modifier[public], parameter[name, value, logger]] begin[{] if[call[ROOT.equals, parameter[member[.name]]]] begin[{] if[binary_operation[member[.value], instanceof, type[String]]] begin[{] assign[member[.root], Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))] call[logger.logInfo, parameter[binary_operation[literal["Configured root DN for directory server: "], +, member[.root]]]] else begin[{] None end[}] else begin[{] if[call[OBJECT_CLASSES.equals, parameter[member[.name]]]] begin[{] if[binary_operation[member[.value], instanceof, type[String]]] begin[{] assign[member[.objectClasses], Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None))] call[logger.logInfo, parameter[binary_operation[literal["Configured object classes for root DN: "], +, member[.objectClasses]]]] else begin[{] None end[}] else begin[{] if[call[AUTH_DN.equals, parameter[member[.name]]]] begin[{] if[binary_operation[member[.value], instanceof, type[String]]] begin[{] assign[member[.authDn], Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))] call[logger.logInfo, parameter[binary_operation[literal["Configured admin identity for directory server: "], +, member[.authDn]]]] else begin[{] None end[}] else begin[{] if[call[PASSWD.equals, parameter[member[.name]]]] begin[{] if[binary_operation[member[.value], instanceof, type[String]]] begin[{] assign[member[.passwd], Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))] call[logger.logInfo, parameter[binary_operation[literal["Configured admin credentials for directory server: "], +, member[.passwd]]]] else begin[{] None end[}] else begin[{] if[call[WORK_DIR.equals, parameter[member[.name]]]] begin[{] if[binary_operation[member[.value], instanceof, type[File]]] begin[{] assign[member[.workingDirectory], Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))] call[logger.logInfo, parameter[binary_operation[literal["Configured working directory for directory server: "], +, member[.workingDirectory]]]] else begin[{] None end[}] else begin[{] if[call[LDIF_FILE.equals, parameter[member[.name]]]] begin[{] if[binary_operation[member[.value], instanceof, type[File]]] begin[{] assign[member[.ldifFile], Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))] call[logger.logInfo, parameter[binary_operation[literal["Configured LDIF seed data source for directory server: "], +, member[.ldifFile]]]] else begin[{] None end[}] else begin[{] if[call[LDAP_PORT.equals, parameter[member[.name]]]] begin[{] if[binary_operation[member[.value], instanceof, type[Integer]]] begin[{] assign[member[.serverPort], Cast(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None))] call[logger.logInfo, parameter[binary_operation[literal["Configured TCP port for directory server: "], +, member[.serverPort]]]] else begin[{] None end[}] else begin[{] None end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[configure] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[Object] identifier[value] , Keyword[final] identifier[Logger] identifier[logger] operator[SEP] { Keyword[if] operator[SEP] identifier[ROOT] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] { identifier[root] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[value] operator[SEP] identifier[logger] operator[SEP] identifier[logInfo] operator[SEP] literal[String] operator[+] identifier[root] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[OBJECT_CLASSES] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] operator[SEP] operator[SEP] { identifier[objectClasses] operator[=] operator[SEP] identifier[String] operator[SEP] operator[SEP] operator[SEP] identifier[value] operator[SEP] identifier[logger] operator[SEP] identifier[logInfo] operator[SEP] literal[String] operator[+] identifier[objectClasses] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[AUTH_DN] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] { identifier[authDn] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[value] operator[SEP] identifier[logger] operator[SEP] identifier[logInfo] operator[SEP] literal[String] operator[+] identifier[authDn] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[PASSWD] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] { identifier[passwd] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[value] operator[SEP] identifier[logger] operator[SEP] identifier[logInfo] operator[SEP] literal[String] operator[+] identifier[passwd] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[WORK_DIR] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[File] operator[SEP] { identifier[workingDirectory] operator[=] operator[SEP] identifier[File] operator[SEP] identifier[value] operator[SEP] identifier[logger] operator[SEP] identifier[logInfo] operator[SEP] literal[String] operator[+] identifier[workingDirectory] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[LDIF_FILE] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[File] operator[SEP] { identifier[ldifFile] operator[=] operator[SEP] identifier[File] operator[SEP] identifier[value] operator[SEP] identifier[logger] operator[SEP] identifier[logInfo] operator[SEP] literal[String] operator[+] identifier[ldifFile] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[LDAP_PORT] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[Integer] operator[SEP] { identifier[serverPort] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[value] operator[SEP] identifier[logger] operator[SEP] identifier[logInfo] operator[SEP] literal[String] operator[+] identifier[serverPort] operator[SEP] operator[SEP] } } }
public Time getTime(int columnIndex, Calendar cal) throws SQLException { TimeData t = (TimeData) getColumnInType(columnIndex, Type.SQL_TIME); if (t == null) { return null; } long millis = t.getSeconds() * 1000; if (resultMetaData.columnTypes[--columnIndex] .isDateTimeTypeWithZone()) {} else { // UTC - calZO == (UTC - sessZO) + (sessionZO - calZO) if (cal != null) { int zoneOffset = HsqlDateTime.getZoneMillis(cal, millis); millis += session.getZoneSeconds() * 1000 - zoneOffset; } } return new Time(millis); }
class class_name[name] begin[{] method[getTime, return_type[type[Time]], modifier[public], parameter[columnIndex, cal]] begin[{] local_variable[type[TimeData], t] if[binary_operation[member[.t], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[long], millis] if[member[resultMetaData.columnTypes]] begin[{] else begin[{] if[binary_operation[member[.cal], !=, literal[null]]] begin[{] local_variable[type[int], zoneOffset] assign[member[.millis], binary_operation[binary_operation[call[session.getZoneSeconds, parameter[]], *, literal[1000]], -, member[.zoneOffset]]] else begin[{] None end[}] end[}] return[ClassCreator(arguments=[MemberReference(member=millis, 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=Time, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Time] identifier[getTime] operator[SEP] Keyword[int] identifier[columnIndex] , identifier[Calendar] identifier[cal] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[TimeData] identifier[t] operator[=] operator[SEP] identifier[TimeData] operator[SEP] identifier[getColumnInType] operator[SEP] identifier[columnIndex] , identifier[Type] operator[SEP] identifier[SQL_TIME] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[long] identifier[millis] operator[=] identifier[t] operator[SEP] identifier[getSeconds] operator[SEP] operator[SEP] operator[*] Other[1000] operator[SEP] Keyword[if] operator[SEP] identifier[resultMetaData] operator[SEP] identifier[columnTypes] operator[SEP] operator[--] identifier[columnIndex] operator[SEP] operator[SEP] identifier[isDateTimeTypeWithZone] operator[SEP] operator[SEP] operator[SEP] { } Keyword[else] { Keyword[if] operator[SEP] identifier[cal] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[zoneOffset] operator[=] identifier[HsqlDateTime] operator[SEP] identifier[getZoneMillis] operator[SEP] identifier[cal] , identifier[millis] operator[SEP] operator[SEP] identifier[millis] operator[+=] identifier[session] operator[SEP] identifier[getZoneSeconds] operator[SEP] operator[SEP] operator[*] Other[1000] operator[-] identifier[zoneOffset] operator[SEP] } } Keyword[return] Keyword[new] identifier[Time] operator[SEP] identifier[millis] operator[SEP] operator[SEP] }
private ElementUI getVisibleChild(boolean first) { int count = getChildCount(); int start = first ? 0 : count - 1; int inc = first ? 1 : -1; for (int i = start; i >= 0 && i < count; i += inc) { ElementUI child = (ElementUI) getChild(i); if (child.isVisible()) { return child; } } return null; }
class class_name[name] begin[{] method[getVisibleChild, return_type[type[ElementUI]], modifier[private], parameter[first]] begin[{] local_variable[type[int], count] local_variable[type[int], start] local_variable[type[int], inc] 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=getChild, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=ElementUI, sub_type=None)), name=child)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ElementUI, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=isVisible, postfix_operators=[], prefix_operators=[], qualifier=child, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=child, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=inc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), label=None) return[literal[null]] end[}] END[}]
Keyword[private] identifier[ElementUI] identifier[getVisibleChild] operator[SEP] Keyword[boolean] identifier[first] operator[SEP] { Keyword[int] identifier[count] operator[=] identifier[getChildCount] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[start] operator[=] identifier[first] operator[?] Other[0] operator[:] identifier[count] operator[-] Other[1] operator[SEP] Keyword[int] identifier[inc] operator[=] identifier[first] operator[?] Other[1] operator[:] operator[-] Other[1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[start] operator[SEP] identifier[i] operator[>=] Other[0] operator[&&] identifier[i] operator[<] identifier[count] operator[SEP] identifier[i] operator[+=] identifier[inc] operator[SEP] { identifier[ElementUI] identifier[child] operator[=] operator[SEP] identifier[ElementUI] operator[SEP] identifier[getChild] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[child] operator[SEP] identifier[isVisible] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[child] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public void downLoadFile(String fullFilename, OutputStream outputStream) { TrackerServer trackerServer = null; StorageClient1 storageClient1 = null; try { trackerServer = fastDfsClientPool.borrowObject(); String suffx = fullFilename.substring(fullFilename.lastIndexOf(EXT_SEPERATOR)); File file = filePool.createFile(suffx); storageClient1 = new StorageClient1(trackerServer, null); storageClient1.downloadFile1(fullFilename, file.getAbsolutePath()); Streams.writeAndClose(outputStream, new FileInputStream(file)); } catch (Exception e) { throw Lang.makeThrow("[FastdfsService] download file error : %s", e.getMessage()); } finally { if (trackerServer != null) fastDfsClientPool.returnObject(trackerServer); storageClient1 = null; } }
class class_name[name] begin[{] method[downLoadFile, return_type[void], modifier[public], parameter[fullFilename, outputStream]] begin[{] local_variable[type[TrackerServer], trackerServer] local_variable[type[StorageClient1], storageClient1] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=trackerServer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=borrowObject, postfix_operators=[], prefix_operators=[], qualifier=fastDfsClientPool, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=EXT_SEPERATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=fullFilename, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=fullFilename, selectors=[], type_arguments=None), name=suffx)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=suffx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createFile, postfix_operators=[], prefix_operators=[], qualifier=filePool, selectors=[], type_arguments=None), name=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=storageClient1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=trackerServer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StorageClient1, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fullFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None)], member=downloadFile1, postfix_operators=[], prefix_operators=[], qualifier=storageClient1, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=outputStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileInputStream, sub_type=None))], member=writeAndClose, postfix_operators=[], prefix_operators=[], qualifier=Streams, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[FastdfsService] download file error : %s"), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], member=makeThrow, postfix_operators=[], prefix_operators=[], qualifier=Lang, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=trackerServer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=trackerServer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=returnObject, postfix_operators=[], prefix_operators=[], qualifier=fastDfsClientPool, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=storageClient1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[downLoadFile] operator[SEP] identifier[String] identifier[fullFilename] , identifier[OutputStream] identifier[outputStream] operator[SEP] { identifier[TrackerServer] identifier[trackerServer] operator[=] Other[null] operator[SEP] identifier[StorageClient1] identifier[storageClient1] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[trackerServer] operator[=] identifier[fastDfsClientPool] operator[SEP] identifier[borrowObject] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[suffx] operator[=] identifier[fullFilename] operator[SEP] identifier[substring] operator[SEP] identifier[fullFilename] operator[SEP] identifier[lastIndexOf] operator[SEP] identifier[EXT_SEPERATOR] operator[SEP] operator[SEP] operator[SEP] identifier[File] identifier[file] operator[=] identifier[filePool] operator[SEP] identifier[createFile] operator[SEP] identifier[suffx] operator[SEP] operator[SEP] identifier[storageClient1] operator[=] Keyword[new] identifier[StorageClient1] operator[SEP] identifier[trackerServer] , Other[null] operator[SEP] operator[SEP] identifier[storageClient1] operator[SEP] identifier[downloadFile1] operator[SEP] identifier[fullFilename] , identifier[file] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Streams] operator[SEP] identifier[writeAndClose] operator[SEP] identifier[outputStream] , Keyword[new] identifier[FileInputStream] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] identifier[Lang] operator[SEP] identifier[makeThrow] operator[SEP] literal[String] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[trackerServer] operator[!=] Other[null] operator[SEP] identifier[fastDfsClientPool] operator[SEP] identifier[returnObject] operator[SEP] identifier[trackerServer] operator[SEP] operator[SEP] identifier[storageClient1] operator[=] Other[null] operator[SEP] } }
public void addClientNotificationListener(RESTRequest request, NotificationRegistration notificationRegistration, JSONConverter converter) { String objectNameStr = notificationRegistration.objectName.getCanonicalName(); NotificationTargetInformation nti = toNotificationTargetInformation(request, objectNameStr); // Get the listener ClientNotificationListener listener = listeners.get(nti); if (listener == null) { listener = new ClientNotificationListener(this); ClientNotificationListener mapListener = listeners.putIfAbsent(nti, listener); if (mapListener != null) { listener = mapListener; } } // Grab the wrapper filter which will be registered in the MBeanServer NotificationFilter filter = listener.getClientWrapperFilter(); // Check whether the producer of the notification is local or remote. if (nti.getRoutingInformation() == null) { // Add the notification in the MBeanServer MBeanServerHelper.addClientNotification(notificationRegistration.objectName, listener, filter, null, converter); } else { // Add the notification listener to the Target-Client Manager through EventAdmin MBeanRoutedNotificationHelper helper = MBeanRoutedNotificationHelper.getMBeanRoutedNotificationHelper(); helper.addRoutedNotificationListener(nti, listener, converter); } // Add the filters to the listener listener.addClientNotification(notificationRegistration.filters); }
class class_name[name] begin[{] method[addClientNotificationListener, return_type[void], modifier[public], parameter[request, notificationRegistration, converter]] begin[{] local_variable[type[String], objectNameStr] local_variable[type[NotificationTargetInformation], nti] local_variable[type[ClientNotificationListener], listener] if[binary_operation[member[.listener], ==, literal[null]]] begin[{] assign[member[.listener], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClientNotificationListener, sub_type=None))] local_variable[type[ClientNotificationListener], mapListener] if[binary_operation[member[.mapListener], !=, literal[null]]] begin[{] assign[member[.listener], member[.mapListener]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[NotificationFilter], filter] if[binary_operation[call[nti.getRoutingInformation, parameter[]], ==, literal[null]]] begin[{] call[MBeanServerHelper.addClientNotification, parameter[member[notificationRegistration.objectName], member[.listener], member[.filter], literal[null], member[.converter]]] else begin[{] local_variable[type[MBeanRoutedNotificationHelper], helper] call[helper.addRoutedNotificationListener, parameter[member[.nti], member[.listener], member[.converter]]] end[}] call[listener.addClientNotification, parameter[member[notificationRegistration.filters]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addClientNotificationListener] operator[SEP] identifier[RESTRequest] identifier[request] , identifier[NotificationRegistration] identifier[notificationRegistration] , identifier[JSONConverter] identifier[converter] operator[SEP] { identifier[String] identifier[objectNameStr] operator[=] identifier[notificationRegistration] operator[SEP] identifier[objectName] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[SEP] identifier[NotificationTargetInformation] identifier[nti] operator[=] identifier[toNotificationTargetInformation] operator[SEP] identifier[request] , identifier[objectNameStr] operator[SEP] operator[SEP] identifier[ClientNotificationListener] identifier[listener] operator[=] identifier[listeners] operator[SEP] identifier[get] operator[SEP] identifier[nti] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[listener] operator[==] Other[null] operator[SEP] { identifier[listener] operator[=] Keyword[new] identifier[ClientNotificationListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[ClientNotificationListener] identifier[mapListener] operator[=] identifier[listeners] operator[SEP] identifier[putIfAbsent] operator[SEP] identifier[nti] , identifier[listener] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mapListener] operator[!=] Other[null] operator[SEP] { identifier[listener] operator[=] identifier[mapListener] operator[SEP] } } identifier[NotificationFilter] identifier[filter] operator[=] identifier[listener] operator[SEP] identifier[getClientWrapperFilter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nti] operator[SEP] identifier[getRoutingInformation] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[MBeanServerHelper] operator[SEP] identifier[addClientNotification] operator[SEP] identifier[notificationRegistration] operator[SEP] identifier[objectName] , identifier[listener] , identifier[filter] , Other[null] , identifier[converter] operator[SEP] operator[SEP] } Keyword[else] { identifier[MBeanRoutedNotificationHelper] identifier[helper] operator[=] identifier[MBeanRoutedNotificationHelper] operator[SEP] identifier[getMBeanRoutedNotificationHelper] operator[SEP] operator[SEP] operator[SEP] identifier[helper] operator[SEP] identifier[addRoutedNotificationListener] operator[SEP] identifier[nti] , identifier[listener] , identifier[converter] operator[SEP] operator[SEP] } identifier[listener] operator[SEP] identifier[addClientNotification] operator[SEP] identifier[notificationRegistration] operator[SEP] identifier[filters] operator[SEP] operator[SEP] }
private static boolean supportsTransform3d() { if (transform == null) { return false; } String rotate = "rotateY(1deg)"; divStyle.setProperty(transform, rotate); rotate = divStyle.getProperty(transform); return rotate != null && !rotate.isEmpty(); }
class class_name[name] begin[{] method[supportsTransform3d, return_type[type[boolean]], modifier[private static], parameter[]] begin[{] if[binary_operation[member[.transform], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[String], rotate] call[divStyle.setProperty, parameter[member[.transform], member[.rotate]]] assign[member[.rotate], call[divStyle.getProperty, parameter[member[.transform]]]] return[binary_operation[binary_operation[member[.rotate], !=, literal[null]], &&, call[rotate.isEmpty, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[supportsTransform3d] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[transform] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[String] identifier[rotate] operator[=] literal[String] operator[SEP] identifier[divStyle] operator[SEP] identifier[setProperty] operator[SEP] identifier[transform] , identifier[rotate] operator[SEP] operator[SEP] identifier[rotate] operator[=] identifier[divStyle] operator[SEP] identifier[getProperty] operator[SEP] identifier[transform] operator[SEP] operator[SEP] Keyword[return] identifier[rotate] operator[!=] Other[null] operator[&&] operator[!] identifier[rotate] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] }
public Sbgn createSBGN(Model model) { assert model.getLevel().equals(BioPAXLevel.L3) : "This method only supports L3 graphs"; glyphMap = new HashMap<String, Glyph>(); compartmentMap = new HashMap<String, Glyph>(); arcMap = new HashMap<String, Arc>(); ubiqueSet = new HashSet<Glyph>(); int n = 0; //approximate number of SBGN nodes // Create glyphs for Physical Entities for (Entity entity : model.getObjects(Entity.class)) { if (needsToBeCreatedInitially(entity)) { createGlyph(entity); ++n; } } // Create glyph for conversions and link with arcs for (Interaction interaction : model.getObjects(Interaction.class)) { if(interaction.getParticipant().isEmpty()) continue; // For each conversion we check if we need to create a left-to-right and/or right-to-left process. if(interaction instanceof Conversion) { Conversion conv = (Conversion) interaction; if (conv.getConversionDirection() == null || conv.getConversionDirection().equals(ConversionDirectionType.LEFT_TO_RIGHT) || (conv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE) && useTwoGlyphsForReversibleConversion)) { createProcessAndConnections(conv, ConversionDirectionType.LEFT_TO_RIGHT); } else if (conv.getConversionDirection() != null && (conv.getConversionDirection().equals(ConversionDirectionType.RIGHT_TO_LEFT) || (conv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE)) && useTwoGlyphsForReversibleConversion)) { createProcessAndConnections(conv, ConversionDirectionType.RIGHT_TO_LEFT); } else if (conv.getConversionDirection() != null && conv.getConversionDirection().equals(ConversionDirectionType.REVERSIBLE) && !useTwoGlyphsForReversibleConversion) { createProcessAndConnections(conv, ConversionDirectionType.REVERSIBLE); } } else if(interaction instanceof TemplateReaction) { createProcessAndConnections((TemplateReaction) interaction); } else if(interaction instanceof MolecularInteraction) { createBasicProcess(interaction); } else if(interaction instanceof GeneticInteraction) { createGiProcess((GeneticInteraction) interaction); } else if(!(interaction instanceof Control)) { createBasicProcess(interaction); } else { //a Control special case, because these are normally added inside the methods in cases above Control control = (Control) interaction; //Control without any controlled process but with controller and controlledOf if(control.getControlled()==null || control.getControlled().isEmpty()) { Glyph g = createControlStructure(control); processControllers(control.getControlledOf(), g); }//else - do nothing - as it's converted anyway when the controlled interactions are processed } ++n; } // Register created objects into sbgn construct final Sbgn sbgn = factory.createSbgn(); org.sbgn.bindings.Map map = new org.sbgn.bindings.Map(); sbgn.setMap(map); map.setLanguage(Language.PD.toString()); map.getGlyph().addAll(getRootGlyphs(glyphMap.values())); map.getGlyph().addAll(getRootGlyphs(ubiqueSet)); map.getGlyph().addAll(compartmentMap.values()); map.getArc().addAll(arcMap.values()); // //Store some metadata within the standard SBGN-ML extension element: Notes // biopaxMetaDoc.setDocumentURI(model.getUri()); //can be null // SBGNBase.Notes modelNotes = new SBGNBase.Notes(); // sbgn.setNotes(modelNotes); // Element elt = biopaxMetaDoc.createElementNS("","metadata"); // elt.setTextContent(String.format("{name:\"%s\",uri:\"%s\"}", model.getName(), model.getUri()) // .replaceAll("null","")); // modelNotes.getAny().add(elt); final boolean layout = doLayout && n < this.maxNodes && !arcMap.isEmpty(); try { //Must call this, although actual layout might never run; //in some real data tests, skipping createLayout method //led to malformed SBGN model, unfortunately... (new SBGNLayoutManager()).createLayout(sbgn, layout); } catch (Exception e) { throw new RuntimeException("SBGN Layout of " + model.getXmlBase() + ((model.getName()==null) ? "" : model.getName()) + " failed.", e); } if(!layout) log.warn(String.format("No layout, for either " + "it's disabled: %s, or ~ no. nodes > %s: %s, or - no edges: %s", !doLayout, maxNodes, n>maxNodes, arcMap.isEmpty())); return sbgn; //modified sbgn (even when no layout is run) }
class class_name[name] begin[{] method[createSBGN, return_type[type[Sbgn]], modifier[public], parameter[model]] begin[{] AssertStatement(condition=MethodInvocation(arguments=[], member=getLevel, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[MethodInvocation(arguments=[MemberReference(member=L3, postfix_operators=[], prefix_operators=[], qualifier=BioPAXLevel, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="This method only supports L3 graphs")) assign[member[.glyphMap], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Glyph, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] assign[member[.compartmentMap], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Glyph, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] assign[member[.arcMap], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Arc, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] assign[member[.ubiqueSet], 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=Glyph, sub_type=None))], dimensions=None, name=HashSet, sub_type=None))] local_variable[type[int], n] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=needsToBeCreatedInitially, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createGlyph, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=n, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Entity, sub_type=None))], member=getObjects, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entity)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Entity, sub_type=None))), label=None) ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getParticipant, postfix_operators=[], prefix_operators=[], qualifier=interaction, selectors=[MethodInvocation(arguments=[], member=isEmpty, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=ContinueStatement(goto=None, label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=interaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Conversion, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=interaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=TemplateReaction, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=interaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=MolecularInteraction, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=interaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=GeneticInteraction, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=interaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Control, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=interaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Control, sub_type=None)), name=control)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Control, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getControlled, postfix_operators=[], prefix_operators=[], qualifier=control, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=getControlled, postfix_operators=[], prefix_operators=[], qualifier=control, selectors=[MethodInvocation(arguments=[], member=isEmpty, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=control, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createControlStructure, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=g)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Glyph, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getControlledOf, postfix_operators=[], prefix_operators=[], qualifier=control, selectors=[], type_arguments=None), MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processControllers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=interaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createBasicProcess, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=interaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=GeneticInteraction, sub_type=None))], member=createGiProcess, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=interaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createBasicProcess, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=interaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=TemplateReaction, sub_type=None))], member=createProcessAndConnections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=interaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Conversion, sub_type=None)), name=conv)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Conversion, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getConversionDirection, postfix_operators=[], prefix_operators=[], qualifier=conv, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[], member=getConversionDirection, postfix_operators=[], prefix_operators=[], qualifier=conv, selectors=[MethodInvocation(arguments=[MemberReference(member=LEFT_TO_RIGHT, postfix_operators=[], prefix_operators=[], qualifier=ConversionDirectionType, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=||), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getConversionDirection, postfix_operators=[], prefix_operators=[], qualifier=conv, selectors=[MethodInvocation(arguments=[MemberReference(member=REVERSIBLE, postfix_operators=[], prefix_operators=[], qualifier=ConversionDirectionType, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MemberReference(member=useTwoGlyphsForReversibleConversion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getConversionDirection, postfix_operators=[], prefix_operators=[], qualifier=conv, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getConversionDirection, postfix_operators=[], prefix_operators=[], qualifier=conv, selectors=[MethodInvocation(arguments=[MemberReference(member=RIGHT_TO_LEFT, postfix_operators=[], prefix_operators=[], qualifier=ConversionDirectionType, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getConversionDirection, postfix_operators=[], prefix_operators=[], qualifier=conv, selectors=[], type_arguments=None), operandr=MemberReference(member=useTwoGlyphsForReversibleConversion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), operator=||), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getConversionDirection, postfix_operators=[], prefix_operators=[], qualifier=conv, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=getConversionDirection, postfix_operators=[], prefix_operators=[], qualifier=conv, selectors=[MethodInvocation(arguments=[MemberReference(member=REVERSIBLE, postfix_operators=[], prefix_operators=[], qualifier=ConversionDirectionType, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), operandr=MemberReference(member=useTwoGlyphsForReversibleConversion, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=REVERSIBLE, postfix_operators=[], prefix_operators=[], qualifier=ConversionDirectionType, selectors=[])], member=createProcessAndConnections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=RIGHT_TO_LEFT, postfix_operators=[], prefix_operators=[], qualifier=ConversionDirectionType, selectors=[])], member=createProcessAndConnections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=LEFT_TO_RIGHT, postfix_operators=[], prefix_operators=[], qualifier=ConversionDirectionType, selectors=[])], member=createProcessAndConnections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=MemberReference(member=n, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Interaction, sub_type=None))], member=getObjects, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=interaction)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Interaction, sub_type=None))), label=None) local_variable[type[Sbgn], sbgn] local_variable[type[org], map] call[sbgn.setMap, parameter[member[.map]]] call[map.setLanguage, parameter[call[Language.PD.toString, parameter[]]]] call[map.getGlyph, parameter[]] call[map.getGlyph, parameter[]] call[map.getGlyph, parameter[]] call[map.getArc, parameter[]] local_variable[type[boolean], layout] TryStatement(block=[StatementExpression(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=sbgn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=layout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createLayout, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=SBGNLayoutManager, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SBGN Layout of "), operandr=MethodInvocation(arguments=[], member=getXmlBase, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), operator=+), operandr=TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=model, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" failed."), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[member[.layout]] begin[{] call[log.warn, parameter[call[String.format, parameter[binary_operation[literal["No layout, for either "], +, literal["it's disabled: %s, or ~ no. nodes > %s: %s, or - no edges: %s"]], member[.doLayout], member[.maxNodes], binary_operation[member[.n], >, member[.maxNodes]], call[arcMap.isEmpty, parameter[]]]]]] else begin[{] None end[}] return[member[.sbgn]] end[}] END[}]
Keyword[public] identifier[Sbgn] identifier[createSBGN] operator[SEP] identifier[Model] identifier[model] operator[SEP] { Keyword[assert] identifier[model] operator[SEP] identifier[getLevel] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[BioPAXLevel] operator[SEP] identifier[L3] operator[SEP] operator[:] literal[String] operator[SEP] identifier[glyphMap] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Glyph] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[compartmentMap] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Glyph] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[arcMap] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Arc] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ubiqueSet] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[Glyph] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[n] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Entity] identifier[entity] operator[:] identifier[model] operator[SEP] identifier[getObjects] operator[SEP] identifier[Entity] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[needsToBeCreatedInitially] operator[SEP] identifier[entity] operator[SEP] operator[SEP] { identifier[createGlyph] operator[SEP] identifier[entity] operator[SEP] operator[SEP] operator[++] identifier[n] operator[SEP] } } Keyword[for] operator[SEP] identifier[Interaction] identifier[interaction] operator[:] identifier[model] operator[SEP] identifier[getObjects] operator[SEP] identifier[Interaction] operator[SEP] Keyword[class] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[interaction] operator[SEP] identifier[getParticipant] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[continue] operator[SEP] Keyword[if] operator[SEP] identifier[interaction] Keyword[instanceof] identifier[Conversion] operator[SEP] { identifier[Conversion] identifier[conv] operator[=] operator[SEP] identifier[Conversion] operator[SEP] identifier[interaction] operator[SEP] Keyword[if] operator[SEP] identifier[conv] operator[SEP] identifier[getConversionDirection] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[conv] operator[SEP] identifier[getConversionDirection] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[ConversionDirectionType] operator[SEP] identifier[LEFT_TO_RIGHT] operator[SEP] operator[||] operator[SEP] identifier[conv] operator[SEP] identifier[getConversionDirection] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[ConversionDirectionType] operator[SEP] identifier[REVERSIBLE] operator[SEP] operator[&&] identifier[useTwoGlyphsForReversibleConversion] operator[SEP] operator[SEP] { identifier[createProcessAndConnections] operator[SEP] identifier[conv] , identifier[ConversionDirectionType] operator[SEP] identifier[LEFT_TO_RIGHT] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[conv] operator[SEP] identifier[getConversionDirection] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[SEP] identifier[conv] operator[SEP] identifier[getConversionDirection] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[ConversionDirectionType] operator[SEP] identifier[RIGHT_TO_LEFT] operator[SEP] operator[||] operator[SEP] identifier[conv] operator[SEP] identifier[getConversionDirection] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[ConversionDirectionType] operator[SEP] identifier[REVERSIBLE] operator[SEP] operator[SEP] operator[&&] identifier[useTwoGlyphsForReversibleConversion] operator[SEP] operator[SEP] { identifier[createProcessAndConnections] operator[SEP] identifier[conv] , identifier[ConversionDirectionType] operator[SEP] identifier[RIGHT_TO_LEFT] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[conv] operator[SEP] identifier[getConversionDirection] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[conv] operator[SEP] identifier[getConversionDirection] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[ConversionDirectionType] operator[SEP] identifier[REVERSIBLE] operator[SEP] operator[&&] operator[!] identifier[useTwoGlyphsForReversibleConversion] operator[SEP] { identifier[createProcessAndConnections] operator[SEP] identifier[conv] , identifier[ConversionDirectionType] operator[SEP] identifier[REVERSIBLE] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[interaction] Keyword[instanceof] identifier[TemplateReaction] operator[SEP] { identifier[createProcessAndConnections] operator[SEP] operator[SEP] identifier[TemplateReaction] operator[SEP] identifier[interaction] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[interaction] Keyword[instanceof] identifier[MolecularInteraction] operator[SEP] { identifier[createBasicProcess] operator[SEP] identifier[interaction] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[interaction] Keyword[instanceof] identifier[GeneticInteraction] operator[SEP] { identifier[createGiProcess] operator[SEP] operator[SEP] identifier[GeneticInteraction] operator[SEP] identifier[interaction] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[interaction] Keyword[instanceof] identifier[Control] operator[SEP] operator[SEP] { identifier[createBasicProcess] operator[SEP] identifier[interaction] operator[SEP] operator[SEP] } Keyword[else] { identifier[Control] identifier[control] operator[=] operator[SEP] identifier[Control] operator[SEP] identifier[interaction] operator[SEP] Keyword[if] operator[SEP] identifier[control] operator[SEP] identifier[getControlled] operator[SEP] operator[SEP] operator[==] Other[null] operator[||] identifier[control] operator[SEP] identifier[getControlled] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[Glyph] identifier[g] operator[=] identifier[createControlStructure] operator[SEP] identifier[control] operator[SEP] operator[SEP] identifier[processControllers] operator[SEP] identifier[control] operator[SEP] identifier[getControlledOf] operator[SEP] operator[SEP] , identifier[g] operator[SEP] operator[SEP] } } operator[++] identifier[n] operator[SEP] } Keyword[final] identifier[Sbgn] identifier[sbgn] operator[=] identifier[factory] operator[SEP] identifier[createSbgn] operator[SEP] operator[SEP] operator[SEP] identifier[org] operator[SEP] identifier[sbgn] operator[SEP] identifier[bindings] operator[SEP] identifier[Map] identifier[map] operator[=] Keyword[new] identifier[org] operator[SEP] identifier[sbgn] operator[SEP] identifier[bindings] operator[SEP] identifier[Map] operator[SEP] operator[SEP] operator[SEP] identifier[sbgn] operator[SEP] identifier[setMap] operator[SEP] identifier[map] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[setLanguage] operator[SEP] identifier[Language] operator[SEP] identifier[PD] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[getGlyph] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[getRootGlyphs] operator[SEP] identifier[glyphMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[getGlyph] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[getRootGlyphs] operator[SEP] identifier[ubiqueSet] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[getGlyph] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[compartmentMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[getArc] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[arcMap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[layout] operator[=] identifier[doLayout] operator[&&] identifier[n] operator[<] Keyword[this] operator[SEP] identifier[maxNodes] operator[&&] operator[!] identifier[arcMap] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { operator[SEP] Keyword[new] identifier[SBGNLayoutManager] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[createLayout] operator[SEP] identifier[sbgn] , identifier[layout] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[model] operator[SEP] identifier[getXmlBase] operator[SEP] operator[SEP] operator[+] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] operator[?] literal[String] operator[:] identifier[model] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[layout] operator[SEP] identifier[log] operator[SEP] identifier[warn] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] operator[+] literal[String] , operator[!] identifier[doLayout] , identifier[maxNodes] , identifier[n] operator[>] identifier[maxNodes] , identifier[arcMap] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[sbgn] operator[SEP] }
public static void main( String[] args ) throws Exception { ChatServer chatserver = new ChatServer( 8887 ); // Firefox does allow multible ssl connection only via port 443 //tested on FF16 // load up the key store String STORETYPE = "JKS"; String KEYSTORE = "keystore.jks"; String STOREPASSWORD = "storepassword"; String KEYPASSWORD = "keypassword"; KeyStore ks = KeyStore.getInstance( STORETYPE ); File kf = new File( KEYSTORE ); ks.load( new FileInputStream( kf ), STOREPASSWORD.toCharArray() ); KeyManagerFactory kmf = KeyManagerFactory.getInstance( "SunX509" ); kmf.init( ks, KEYPASSWORD.toCharArray() ); TrustManagerFactory tmf = TrustManagerFactory.getInstance( "SunX509" ); tmf.init( ks ); SSLContext sslContext = null; sslContext = SSLContext.getInstance( "TLS" ); sslContext.init( kmf.getKeyManagers(), tmf.getTrustManagers(), null ); chatserver.setWebSocketFactory( new DefaultSSLWebSocketServerFactory( sslContext ) ); chatserver.start(); }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] local_variable[type[ChatServer], chatserver] local_variable[type[String], STORETYPE] local_variable[type[String], KEYSTORE] local_variable[type[String], STOREPASSWORD] local_variable[type[String], KEYPASSWORD] local_variable[type[KeyStore], ks] local_variable[type[File], kf] call[ks.load, parameter[ClassCreator(arguments=[MemberReference(member=kf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileInputStream, sub_type=None)), call[STOREPASSWORD.toCharArray, parameter[]]]] local_variable[type[KeyManagerFactory], kmf] call[kmf.init, parameter[member[.ks], call[KEYPASSWORD.toCharArray, parameter[]]]] local_variable[type[TrustManagerFactory], tmf] call[tmf.init, parameter[member[.ks]]] local_variable[type[SSLContext], sslContext] assign[member[.sslContext], call[SSLContext.getInstance, parameter[literal["TLS"]]]] call[sslContext.init, parameter[call[kmf.getKeyManagers, parameter[]], call[tmf.getTrustManagers, parameter[]], literal[null]]] call[chatserver.setWebSocketFactory, parameter[ClassCreator(arguments=[MemberReference(member=sslContext, 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=DefaultSSLWebSocketServerFactory, sub_type=None))]] call[chatserver.start, parameter[]] 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[Exception] { identifier[ChatServer] identifier[chatserver] operator[=] Keyword[new] identifier[ChatServer] operator[SEP] Other[8887] operator[SEP] operator[SEP] identifier[String] identifier[STORETYPE] operator[=] literal[String] operator[SEP] identifier[String] identifier[KEYSTORE] operator[=] literal[String] operator[SEP] identifier[String] identifier[STOREPASSWORD] operator[=] literal[String] operator[SEP] identifier[String] identifier[KEYPASSWORD] operator[=] literal[String] operator[SEP] identifier[KeyStore] identifier[ks] operator[=] identifier[KeyStore] operator[SEP] identifier[getInstance] operator[SEP] identifier[STORETYPE] operator[SEP] operator[SEP] identifier[File] identifier[kf] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[KEYSTORE] operator[SEP] operator[SEP] identifier[ks] operator[SEP] identifier[load] operator[SEP] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[kf] operator[SEP] , identifier[STOREPASSWORD] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[KeyManagerFactory] identifier[kmf] operator[=] identifier[KeyManagerFactory] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[kmf] operator[SEP] identifier[init] operator[SEP] identifier[ks] , identifier[KEYPASSWORD] operator[SEP] identifier[toCharArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[TrustManagerFactory] identifier[tmf] operator[=] identifier[TrustManagerFactory] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[tmf] operator[SEP] identifier[init] operator[SEP] identifier[ks] operator[SEP] operator[SEP] identifier[SSLContext] identifier[sslContext] operator[=] Other[null] operator[SEP] identifier[sslContext] operator[=] identifier[SSLContext] operator[SEP] identifier[getInstance] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sslContext] operator[SEP] identifier[init] operator[SEP] identifier[kmf] operator[SEP] identifier[getKeyManagers] operator[SEP] operator[SEP] , identifier[tmf] operator[SEP] identifier[getTrustManagers] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] identifier[chatserver] operator[SEP] identifier[setWebSocketFactory] operator[SEP] Keyword[new] identifier[DefaultSSLWebSocketServerFactory] operator[SEP] identifier[sslContext] operator[SEP] operator[SEP] operator[SEP] identifier[chatserver] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] }
public static void pruneMenus(BaseComponent parent) { while (parent != null && parent instanceof BaseMenuComponent) { if (parent.getChildren().isEmpty()) { BaseComponent newParent = parent.getParent(); parent.destroy(); parent = newParent; } else { break; } } }
class class_name[name] begin[{] method[pruneMenus, return_type[void], modifier[public static], parameter[parent]] begin[{] while[binary_operation[binary_operation[member[.parent], !=, literal[null]], &&, binary_operation[member[.parent], instanceof, type[BaseMenuComponent]]]] begin[{] if[call[parent.getChildren, parameter[]]] begin[{] local_variable[type[BaseComponent], newParent] call[parent.destroy, parameter[]] assign[member[.parent], member[.newParent]] else begin[{] BreakStatement(goto=None, label=None) end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[pruneMenus] operator[SEP] identifier[BaseComponent] identifier[parent] operator[SEP] { Keyword[while] operator[SEP] identifier[parent] operator[!=] Other[null] operator[&&] identifier[parent] Keyword[instanceof] identifier[BaseMenuComponent] operator[SEP] { Keyword[if] operator[SEP] identifier[parent] operator[SEP] identifier[getChildren] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[BaseComponent] identifier[newParent] operator[=] identifier[parent] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] identifier[parent] operator[SEP] identifier[destroy] operator[SEP] operator[SEP] operator[SEP] identifier[parent] operator[=] identifier[newParent] operator[SEP] } Keyword[else] { Keyword[break] operator[SEP] } } }
public static void visit(File directory, Predicate<File> predicate, Visitor<File> visitor) { if (directory.exists()) { List<File> files = visit(directory, predicate); for (File file : files) { visitor.visit(file); } } }
class class_name[name] begin[{] method[visit, return_type[void], modifier[public static], parameter[directory, predicate, visitor]] begin[{] if[call[directory.exists, parameter[]]] begin[{] local_variable[type[List], files] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=visit, postfix_operators=[], prefix_operators=[], qualifier=visitor, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[visit] operator[SEP] identifier[File] identifier[directory] , identifier[Predicate] operator[<] identifier[File] operator[>] identifier[predicate] , identifier[Visitor] operator[<] identifier[File] operator[>] identifier[visitor] operator[SEP] { Keyword[if] operator[SEP] identifier[directory] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[File] operator[>] identifier[files] operator[=] identifier[visit] operator[SEP] identifier[directory] , identifier[predicate] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[File] identifier[file] operator[:] identifier[files] operator[SEP] { identifier[visitor] operator[SEP] identifier[visit] operator[SEP] identifier[file] operator[SEP] operator[SEP] } } }
public final void clear() { for (int i = 0; i < subMaps.length; i++) { synchronized (subMaps[i]) { subMaps[i].clear(); } // synchronized (subMaps[i]). } }
class class_name[name] begin[{] method[clear, return_type[void], modifier[final public], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[SynchronizedStatement(block=[StatementExpression(expression=MemberReference(member=subMaps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=clear, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], label=None, lock=MemberReference(member=subMaps, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=subMaps, 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[final] Keyword[void] identifier[clear] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[subMaps] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[subMaps] operator[SEP] identifier[i] operator[SEP] operator[SEP] { identifier[subMaps] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } } }
public byte[] getRL2Image( Geometry geom, String geomEpsg, int width, int height ) throws Exception { String sql; String rasterName = getName(); if (geomEpsg != null) { sql = "select GetMapImageFromRaster('" + rasterName + "', ST_Transform(ST_GeomFromText('" + geom.toText() + "', " + geomEpsg + "), " + srid + ") , " + width + " , " + height + ", 'default', 'image/png', '#ffffff', 0, 80, 1 )"; } else { sql = "select GetMapImageFromRaster('" + rasterName + "', ST_GeomFromText('" + geom.toText() + "') , " + width + " , " + height + ", 'default', 'image/png', '#ffffff', 0, 80, 1 )"; } return database.execOnConnection(mConn -> { try (IHMStatement stmt = mConn.createStatement()) { IHMResultSet resultSet = stmt.executeQuery(sql); if (resultSet.next()) { byte[] bytes = resultSet.getBytes(1); return bytes; } } return null; }); }
class class_name[name] begin[{] method[getRL2Image, return_type[type[byte]], modifier[public], parameter[geom, geomEpsg, width, height]] begin[{] local_variable[type[String], sql] local_variable[type[String], rasterName] if[binary_operation[member[.geomEpsg], !=, literal[null]]] begin[{] assign[member[.sql], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["select GetMapImageFromRaster('"], +, member[.rasterName]], +, literal["', ST_Transform(ST_GeomFromText('"]], +, call[geom.toText, parameter[]]], +, literal["', "]], +, member[.geomEpsg]], +, literal["), "]], +, member[.srid]], +, literal[") , "]], +, member[.width]], +, literal[" , "]], +, member[.height]], +, literal[", 'default', 'image/png', '#ffffff', 0, 80, 1 )"]]] else begin[{] assign[member[.sql], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["select GetMapImageFromRaster('"], +, member[.rasterName]], +, literal["', ST_GeomFromText('"]], +, call[geom.toText, parameter[]]], +, literal["') , "]], +, member[.width]], +, literal[" , "]], +, member[.height]], +, literal[", 'default', 'image/png', '#ffffff', 0, 80, 1 )"]]] end[}] return[call[database.execOnConnection, parameter[LambdaExpression(body=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=sql, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=executeQuery, postfix_operators=[], prefix_operators=[], qualifier=stmt, selectors=[], type_arguments=None), name=resultSet)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IHMResultSet, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=next, postfix_operators=[], prefix_operators=[], qualifier=resultSet, 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=getBytes, postfix_operators=[], prefix_operators=[], qualifier=resultSet, selectors=[], type_arguments=None), name=bytes)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), ReturnStatement(expression=MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=stmt, type=ReferenceType(arguments=None, dimensions=[], name=IHMStatement, sub_type=None), value=MethodInvocation(arguments=[], member=createStatement, postfix_operators=[], prefix_operators=[], qualifier=mConn, selectors=[], type_arguments=None))]), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], parameters=[MemberReference(member=mConn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[getRL2Image] operator[SEP] identifier[Geometry] identifier[geom] , identifier[String] identifier[geomEpsg] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] Keyword[throws] identifier[Exception] { identifier[String] identifier[sql] operator[SEP] identifier[String] identifier[rasterName] operator[=] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[geomEpsg] operator[!=] Other[null] operator[SEP] { identifier[sql] operator[=] literal[String] operator[+] identifier[rasterName] operator[+] literal[String] operator[+] identifier[geom] operator[SEP] identifier[toText] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[geomEpsg] operator[+] literal[String] operator[+] identifier[srid] operator[+] literal[String] operator[+] identifier[width] operator[+] literal[String] operator[+] identifier[height] operator[+] literal[String] operator[SEP] } Keyword[else] { identifier[sql] operator[=] literal[String] operator[+] identifier[rasterName] operator[+] literal[String] operator[+] identifier[geom] operator[SEP] identifier[toText] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[width] operator[+] literal[String] operator[+] identifier[height] operator[+] literal[String] operator[SEP] } Keyword[return] identifier[database] operator[SEP] identifier[execOnConnection] operator[SEP] identifier[mConn] operator[->] { Keyword[try] operator[SEP] identifier[IHMStatement] identifier[stmt] operator[=] identifier[mConn] operator[SEP] identifier[createStatement] operator[SEP] operator[SEP] operator[SEP] { identifier[IHMResultSet] identifier[resultSet] operator[=] identifier[stmt] operator[SEP] identifier[executeQuery] operator[SEP] identifier[sql] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resultSet] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[resultSet] operator[SEP] identifier[getBytes] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[return] identifier[bytes] operator[SEP] } } Keyword[return] Other[null] operator[SEP] } operator[SEP] operator[SEP] }
public static Class<?> findGenericClass(final Class<?> mainClass, final Class<?>[] excludedClasses) { final boolean excludeMode = excludedClasses.length > 1; // Retrieve the generic super class Parameterized type final ParameterizedType paramType = (ParameterizedType) mainClass.getGenericSuperclass(); Class<?> genericClass = null; Class<?> tempClass = null; for (int i = 0; genericClass == null && i < paramType.getActualTypeArguments().length; i++) { tempClass = getClassFromType(paramType.getActualTypeArguments()[i]); if (!excludeMode && excludedClasses[0].isAssignableFrom(tempClass)) { genericClass = tempClass; } if (excludeMode) { boolean excludeIt = false; for (final Class<?> excludeClass : excludedClasses) { if (excludeClass.isAssignableFrom(tempClass)) { excludeIt = true; } } if (!excludeIt) { genericClass = tempClass; } } } return genericClass; }
class class_name[name] begin[{] method[findGenericClass, return_type[type[Class]], modifier[public static], parameter[mainClass, excludedClasses]] begin[{] local_variable[type[boolean], excludeMode] local_variable[type[ParameterizedType], paramType] local_variable[type[Class], genericClass] local_variable[type[Class], tempClass] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=tempClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getActualTypeArguments, postfix_operators=[], prefix_operators=[], qualifier=paramType, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], type_arguments=None)], member=getClassFromType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=excludeMode, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=MemberReference(member=excludedClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MethodInvocation(arguments=[MemberReference(member=tempClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=genericClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=tempClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), IfStatement(condition=MemberReference(member=excludeMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=excludeIt)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=tempClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignableFrom, postfix_operators=[], prefix_operators=[], qualifier=excludeClass, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=excludeIt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=excludedClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=excludeClass)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=excludeIt, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=genericClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=tempClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=genericClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getActualTypeArguments, postfix_operators=[], prefix_operators=[], qualifier=paramType, selectors=[MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operator=<), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.genericClass]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Class] operator[<] operator[?] operator[>] identifier[findGenericClass] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[mainClass] , Keyword[final] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[excludedClasses] operator[SEP] { Keyword[final] Keyword[boolean] identifier[excludeMode] operator[=] identifier[excludedClasses] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] Keyword[final] identifier[ParameterizedType] identifier[paramType] operator[=] operator[SEP] identifier[ParameterizedType] operator[SEP] identifier[mainClass] operator[SEP] identifier[getGenericSuperclass] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[genericClass] operator[=] Other[null] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[tempClass] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[genericClass] operator[==] Other[null] operator[&&] identifier[i] operator[<] identifier[paramType] operator[SEP] identifier[getActualTypeArguments] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[tempClass] operator[=] identifier[getClassFromType] operator[SEP] identifier[paramType] operator[SEP] identifier[getActualTypeArguments] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[excludeMode] operator[&&] identifier[excludedClasses] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[tempClass] operator[SEP] operator[SEP] { identifier[genericClass] operator[=] identifier[tempClass] operator[SEP] } Keyword[if] operator[SEP] identifier[excludeMode] operator[SEP] { Keyword[boolean] identifier[excludeIt] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[excludeClass] operator[:] identifier[excludedClasses] operator[SEP] { Keyword[if] operator[SEP] identifier[excludeClass] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[tempClass] operator[SEP] operator[SEP] { identifier[excludeIt] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[excludeIt] operator[SEP] { identifier[genericClass] operator[=] identifier[tempClass] operator[SEP] } } } Keyword[return] identifier[genericClass] operator[SEP] }
public List<CorporationMemberTrackingResponse> getCorporationsCorporationIdMembertracking(Integer corporationId, String datasource, String ifNoneMatch, String token) throws ApiException { ApiResponse<List<CorporationMemberTrackingResponse>> resp = getCorporationsCorporationIdMembertrackingWithHttpInfo( corporationId, datasource, ifNoneMatch, token); return resp.getData(); }
class class_name[name] begin[{] method[getCorporationsCorporationIdMembertracking, return_type[type[List]], modifier[public], parameter[corporationId, datasource, ifNoneMatch, token]] begin[{] local_variable[type[ApiResponse], resp] return[call[resp.getData, parameter[]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[CorporationMemberTrackingResponse] operator[>] identifier[getCorporationsCorporationIdMembertracking] operator[SEP] identifier[Integer] identifier[corporationId] , identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] , identifier[String] identifier[token] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ApiResponse] operator[<] identifier[List] operator[<] identifier[CorporationMemberTrackingResponse] operator[>] operator[>] identifier[resp] operator[=] identifier[getCorporationsCorporationIdMembertrackingWithHttpInfo] operator[SEP] identifier[corporationId] , identifier[datasource] , identifier[ifNoneMatch] , identifier[token] operator[SEP] operator[SEP] Keyword[return] identifier[resp] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] }
@Pure public static <T> int indexOf(List<T> list, Comparator<? super T> comparator, T elt) { try { assert comparator != null; assert list != null; if (elt == null) { return -1; } int first = 0; int last = list.size() - 1; while (last >= first) { int center = (first + last) / 2; final T indata = list.get(center); final int cmp = comparator.compare(elt, indata); if (cmp == 0) { do { --center; } while (center >= 0 && comparator.compare(elt, list.get(center)) == 0); return center + 1; } else if (cmp < 0) { last = center - 1; } else { first = center + 1; } } } catch (AssertionError e) { throw e; } catch (Throwable exception) { // } return -1; }
class class_name[name] begin[{] method[indexOf, return_type[type[int]], modifier[public static], parameter[list, comparator, elt]] begin[{] TryStatement(block=[AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=comparator, 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=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=elt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=first)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), name=last)], modifiers=set(), type=BasicType(dimensions=[], name=int)), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=/), name=center)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), name=indata)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=elt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=indata, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compare, postfix_operators=[], prefix_operators=[], qualifier=comparator, selectors=[], type_arguments=None), name=cmp)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cmp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[DoStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=center, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), label=None)]), condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=elt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None)], member=compare, postfix_operators=[], prefix_operators=[], qualifier=comparator, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operator=&&), label=None), ReturnStatement(expression=BinaryOperation(operandl=MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), label=None)]))]), condition=BinaryOperation(operandl=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=first, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['AssertionError'])), CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exception, types=['Throwable']))], finally_block=None, label=None, resources=None) return[literal[1]] end[}] END[}]
annotation[@] identifier[Pure] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[int] identifier[indexOf] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[list] , identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[comparator] , identifier[T] identifier[elt] operator[SEP] { Keyword[try] { Keyword[assert] identifier[comparator] operator[!=] Other[null] operator[SEP] Keyword[assert] identifier[list] operator[!=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[elt] operator[==] Other[null] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[int] identifier[first] operator[=] Other[0] operator[SEP] Keyword[int] identifier[last] operator[=] identifier[list] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] Keyword[while] operator[SEP] identifier[last] operator[>=] identifier[first] operator[SEP] { Keyword[int] identifier[center] operator[=] operator[SEP] identifier[first] operator[+] identifier[last] operator[SEP] operator[/] Other[2] operator[SEP] Keyword[final] identifier[T] identifier[indata] operator[=] identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[center] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[cmp] operator[=] identifier[comparator] operator[SEP] identifier[compare] operator[SEP] identifier[elt] , identifier[indata] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cmp] operator[==] Other[0] operator[SEP] { Keyword[do] { operator[--] identifier[center] operator[SEP] } Keyword[while] operator[SEP] identifier[center] operator[>=] Other[0] operator[&&] identifier[comparator] operator[SEP] identifier[compare] operator[SEP] identifier[elt] , identifier[list] operator[SEP] identifier[get] operator[SEP] identifier[center] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[center] operator[+] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cmp] operator[<] Other[0] operator[SEP] { identifier[last] operator[=] identifier[center] operator[-] Other[1] operator[SEP] } Keyword[else] { identifier[first] operator[=] identifier[center] operator[+] Other[1] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[AssertionError] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[exception] operator[SEP] { } Keyword[return] operator[-] Other[1] operator[SEP] }
public Object callWithDomain(Object securityDomain, Context cx, final Callable callable, Scriptable scope, final Scriptable thisObj, final Object[] args) { return execWithDomain(cx, scope, new Script() { @Override public Object exec(Context cx, Scriptable scope) { return callable.call(cx, scope, thisObj, args); } }, securityDomain); }
class class_name[name] begin[{] method[callWithDomain, return_type[type[Object]], modifier[public], parameter[securityDomain, cx, callable, scope, thisObj, args]] begin[{] return[call[.execWithDomain, parameter[member[.cx], member[.scope], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=cx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=scope, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=thisObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=call, postfix_operators=[], prefix_operators=[], qualifier=callable, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=exec, parameters=[FormalParameter(annotations=[], modifiers=set(), name=cx, type=ReferenceType(arguments=None, dimensions=[], name=Context, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=scope, type=ReferenceType(arguments=None, dimensions=[], name=Scriptable, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Script, sub_type=None)), member[.securityDomain]]]] end[}] END[}]
Keyword[public] identifier[Object] identifier[callWithDomain] operator[SEP] identifier[Object] identifier[securityDomain] , identifier[Context] identifier[cx] , Keyword[final] identifier[Callable] identifier[callable] , identifier[Scriptable] identifier[scope] , Keyword[final] identifier[Scriptable] identifier[thisObj] , Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[args] operator[SEP] { Keyword[return] identifier[execWithDomain] operator[SEP] identifier[cx] , identifier[scope] , Keyword[new] identifier[Script] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[exec] operator[SEP] identifier[Context] identifier[cx] , identifier[Scriptable] identifier[scope] operator[SEP] { Keyword[return] identifier[callable] operator[SEP] identifier[call] operator[SEP] identifier[cx] , identifier[scope] , identifier[thisObj] , identifier[args] operator[SEP] operator[SEP] } } , identifier[securityDomain] operator[SEP] operator[SEP] }
public AwsSecurityFindingFilters withResourceAwsEc2InstanceType(StringFilter... resourceAwsEc2InstanceType) { if (this.resourceAwsEc2InstanceType == null) { setResourceAwsEc2InstanceType(new java.util.ArrayList<StringFilter>(resourceAwsEc2InstanceType.length)); } for (StringFilter ele : resourceAwsEc2InstanceType) { this.resourceAwsEc2InstanceType.add(ele); } return this; }
class class_name[name] begin[{] method[withResourceAwsEc2InstanceType, return_type[type[AwsSecurityFindingFilters]], modifier[public], parameter[resourceAwsEc2InstanceType]] begin[{] if[binary_operation[THIS[member[None.resourceAwsEc2InstanceType]], ==, literal[null]]] begin[{] call[.setResourceAwsEc2InstanceType, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=resourceAwsEc2InstanceType, 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=StringFilter, 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=resourceAwsEc2InstanceType, 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=resourceAwsEc2InstanceType, 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=StringFilter, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[AwsSecurityFindingFilters] identifier[withResourceAwsEc2InstanceType] operator[SEP] identifier[StringFilter] operator[...] identifier[resourceAwsEc2InstanceType] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[resourceAwsEc2InstanceType] operator[==] Other[null] operator[SEP] { identifier[setResourceAwsEc2InstanceType] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[StringFilter] operator[>] operator[SEP] identifier[resourceAwsEc2InstanceType] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[StringFilter] identifier[ele] operator[:] identifier[resourceAwsEc2InstanceType] operator[SEP] { Keyword[this] operator[SEP] identifier[resourceAwsEc2InstanceType] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
private void join(ParserRuleContext ctx, Class<? extends Join> type) { QueryNode left = relationChain.get(relationIdx); QueryNode right = relationChain.get(relationIdx+1); try { Constructor<? extends Join> c = type.getConstructor(QueryNode.class); Join newJoin = c.newInstance(right); left.addOutgoingJoin(addParsedLocation(ctx, newJoin)); } catch (NoSuchMethodException ex) { log.error(null, ex); } catch (InstantiationException ex) { log.error(null, ex); } catch (IllegalAccessException ex) { log.error(null, ex); } catch (InvocationTargetException ex) { log.error(null, ex); } }
class class_name[name] begin[{] method[join, return_type[void], modifier[private], parameter[ctx, type]] begin[{] local_variable[type[QueryNode], left] local_variable[type[QueryNode], right] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QueryNode, sub_type=None))], member=getConstructor, postfix_operators=[], prefix_operators=[], qualifier=type, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=Join, sub_type=None))], dimensions=[], name=Constructor, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=right, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), name=newJoin)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Join, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=ctx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newJoin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addParsedLocation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addOutgoingJoin, postfix_operators=[], prefix_operators=[], qualifier=left, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['NoSuchMethodException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['InstantiationException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IllegalAccessException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['InvocationTargetException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[join] operator[SEP] identifier[ParserRuleContext] identifier[ctx] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Join] operator[>] identifier[type] operator[SEP] { identifier[QueryNode] identifier[left] operator[=] identifier[relationChain] operator[SEP] identifier[get] operator[SEP] identifier[relationIdx] operator[SEP] operator[SEP] identifier[QueryNode] identifier[right] operator[=] identifier[relationChain] operator[SEP] identifier[get] operator[SEP] identifier[relationIdx] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[try] { identifier[Constructor] operator[<] operator[?] Keyword[extends] identifier[Join] operator[>] identifier[c] operator[=] identifier[type] operator[SEP] identifier[getConstructor] operator[SEP] identifier[QueryNode] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[Join] identifier[newJoin] operator[=] identifier[c] operator[SEP] identifier[newInstance] operator[SEP] identifier[right] operator[SEP] operator[SEP] identifier[left] operator[SEP] identifier[addOutgoingJoin] operator[SEP] identifier[addParsedLocation] operator[SEP] identifier[ctx] , identifier[newJoin] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] identifier[ex] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] Other[null] , identifier[ex] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InstantiationException] identifier[ex] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] Other[null] , identifier[ex] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[ex] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] Other[null] , identifier[ex] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvocationTargetException] identifier[ex] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] Other[null] , identifier[ex] operator[SEP] operator[SEP] } }
private synchronized void fetchCredentials() { if (!needsToLoadCredentials()) return; JsonNode accessKey; JsonNode secretKey; JsonNode node; JsonNode token; try { lastInstanceProfileCheck = new Date(); String credentialsResponse = EC2CredentialsUtils.getInstance().readResource(credentailsEndpointProvider.getCredentialsEndpoint(), credentailsEndpointProvider.getRetryPolicy()); node = Jackson.jsonNodeOf(credentialsResponse); accessKey = node.get(ACCESS_KEY_ID); secretKey = node.get(SECRET_ACCESS_KEY); token = node.get(TOKEN); if (null == accessKey || null == secretKey) { throw new SdkClientException("Unable to load credentials."); } if (null != token) { credentials = new BasicSessionCredentials(accessKey.asText(), secretKey.asText(), token.asText()); } else { credentials = new BasicAWSCredentials(accessKey.asText(), secretKey.asText()); } JsonNode expirationJsonNode = node.get("Expiration"); if (null != expirationJsonNode) { /* * TODO: The expiration string comes in a different format * than what we deal with in other parts of the SDK, so we * have to convert it to the ISO8601 syntax we expect. */ String expiration = expirationJsonNode.asText(); expiration = expiration.replaceAll("\\+0000$", "Z"); try { credentialsExpiration = DateUtils.parseISO8601Date(expiration); } catch(Exception ex) { handleError("Unable to parse credentials expiration date from Amazon EC2 instance", ex); } } } catch (JsonMappingException e) { handleError("Unable to parse response returned from service endpoint", e); } catch (IOException e) { handleError("Unable to load credentials from service endpoint", e); } catch (URISyntaxException e) { handleError("Unable to load credentials from service endpoint", e); } }
class class_name[name] begin[{] method[fetchCredentials, return_type[void], modifier[synchronized private], parameter[]] begin[{] if[call[.needsToLoadCredentials, parameter[]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[JsonNode], accessKey] local_variable[type[JsonNode], secretKey] local_variable[type[JsonNode], node] local_variable[type[JsonNode], token] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastInstanceProfileCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=EC2CredentialsUtils, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCredentialsEndpoint, postfix_operators=[], prefix_operators=[], qualifier=credentailsEndpointProvider, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getRetryPolicy, postfix_operators=[], prefix_operators=[], qualifier=credentailsEndpointProvider, selectors=[], type_arguments=None)], member=readResource, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=credentialsResponse)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=credentialsResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=jsonNodeOf, postfix_operators=[], prefix_operators=[], qualifier=Jackson, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=accessKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=ACCESS_KEY_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=secretKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=SECRET_ACCESS_KEY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=TOKEN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=accessKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=secretKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to load credentials.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=token, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=credentials, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=asText, postfix_operators=[], prefix_operators=[], qualifier=accessKey, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=asText, postfix_operators=[], prefix_operators=[], qualifier=secretKey, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BasicAWSCredentials, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=credentials, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=asText, postfix_operators=[], prefix_operators=[], qualifier=accessKey, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=asText, postfix_operators=[], prefix_operators=[], qualifier=secretKey, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=asText, postfix_operators=[], prefix_operators=[], qualifier=token, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BasicSessionCredentials, sub_type=None))), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expiration")], member=get, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), name=expirationJsonNode)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonNode, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=expirationJsonNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=asText, postfix_operators=[], prefix_operators=[], qualifier=expirationJsonNode, selectors=[], type_arguments=None), name=expiration)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=expiration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\\+0000$"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Z")], member=replaceAll, postfix_operators=[], prefix_operators=[], qualifier=expiration, selectors=[], type_arguments=None)), label=None), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=credentialsExpiration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=expiration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseISO8601Date, postfix_operators=[], prefix_operators=[], qualifier=DateUtils, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to parse credentials expiration date from Amazon EC2 instance"), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to parse response returned from service endpoint"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JsonMappingException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to load credentials from service endpoint"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleError, 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=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to load credentials from service endpoint"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handleError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['URISyntaxException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[synchronized] Keyword[void] identifier[fetchCredentials] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[needsToLoadCredentials] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[JsonNode] identifier[accessKey] operator[SEP] identifier[JsonNode] identifier[secretKey] operator[SEP] identifier[JsonNode] identifier[node] operator[SEP] identifier[JsonNode] identifier[token] operator[SEP] Keyword[try] { identifier[lastInstanceProfileCheck] operator[=] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[credentialsResponse] operator[=] identifier[EC2CredentialsUtils] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[readResource] operator[SEP] identifier[credentailsEndpointProvider] operator[SEP] identifier[getCredentialsEndpoint] operator[SEP] operator[SEP] , identifier[credentailsEndpointProvider] operator[SEP] identifier[getRetryPolicy] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[node] operator[=] identifier[Jackson] operator[SEP] identifier[jsonNodeOf] operator[SEP] identifier[credentialsResponse] operator[SEP] operator[SEP] identifier[accessKey] operator[=] identifier[node] operator[SEP] identifier[get] operator[SEP] identifier[ACCESS_KEY_ID] operator[SEP] operator[SEP] identifier[secretKey] operator[=] identifier[node] operator[SEP] identifier[get] operator[SEP] identifier[SECRET_ACCESS_KEY] operator[SEP] operator[SEP] identifier[token] operator[=] identifier[node] operator[SEP] identifier[get] operator[SEP] identifier[TOKEN] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[accessKey] operator[||] Other[null] operator[==] identifier[secretKey] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[!=] identifier[token] operator[SEP] { identifier[credentials] operator[=] Keyword[new] identifier[BasicSessionCredentials] operator[SEP] identifier[accessKey] operator[SEP] identifier[asText] operator[SEP] operator[SEP] , identifier[secretKey] operator[SEP] identifier[asText] operator[SEP] operator[SEP] , identifier[token] operator[SEP] identifier[asText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[credentials] operator[=] Keyword[new] identifier[BasicAWSCredentials] operator[SEP] identifier[accessKey] operator[SEP] identifier[asText] operator[SEP] operator[SEP] , identifier[secretKey] operator[SEP] identifier[asText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[JsonNode] identifier[expirationJsonNode] operator[=] identifier[node] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[expirationJsonNode] operator[SEP] { identifier[String] identifier[expiration] operator[=] identifier[expirationJsonNode] operator[SEP] identifier[asText] operator[SEP] operator[SEP] operator[SEP] identifier[expiration] operator[=] identifier[expiration] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[credentialsExpiration] operator[=] identifier[DateUtils] operator[SEP] identifier[parseISO8601Date] operator[SEP] identifier[expiration] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[handleError] operator[SEP] literal[String] , identifier[ex] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[JsonMappingException] identifier[e] operator[SEP] { identifier[handleError] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[handleError] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[URISyntaxException] identifier[e] operator[SEP] { identifier[handleError] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
private BufferedImage resample(BufferedImage pSource, BufferedImage pDest, InterpolationFilter pFilter) { final int dstWidth = pDest.getWidth(); final int dstHeight = pDest.getHeight(); final int srcWidth = pSource.getWidth(); final int srcHeight = pSource.getHeight(); /* create intermediate column to hold horizontal dst column zoom */ final ColorModel cm = pSource.getColorModel(); // final WritableRaster work = cm.createCompatibleWritableRaster(1, srcHeight); final WritableRaster work = ImageUtil.createCompatibleWritableRaster(pSource, cm, 1, srcHeight); double xscale = (double) dstWidth / (double) srcWidth; double yscale = (double) dstHeight / (double) srcHeight; ContributorList[] contribY = new ContributorList[dstHeight]; for (int i = 0; i < contribY.length; i++) { contribY[i] = new ContributorList(); } // TODO: What to do when fwidth > srcHeight or dstHeight double fwidth = pFilter.support(); if (yscale < 1.0) { double width = fwidth / yscale; double fscale = 1.0 / yscale; if (width <= .5) { // Reduce to point sampling. width = .5 + 1.0e-6; fscale = 1.0; } for (int i = 0; i < dstHeight; i++) { //contribY[i].n = 0; contribY[i].p = new Contributor[(int) (width * 2.0 + 1 + 0.5)]; double center = (double) i / yscale; int left = (int) Math.ceil(center - width); int right = (int) Math.floor(center + width); double density = 0.0; for (int j = left; j <= right; j++) { double weight = center - (double) j; weight = pFilter.filter(weight / fscale) / fscale; int n; if (j < 0) { n = -j; } else if (j >= srcHeight) { n = (srcHeight - j) + srcHeight - 1; } else { n = j; } /**/ if (n >= srcHeight) { n = n % srcHeight; } else if (n < 0) { n = srcHeight - 1; } /**/ int k = contribY[i].n++; contribY[i].p[k] = new Contributor(); contribY[i].p[k].pixel = n; contribY[i].p[k].weight = weight; density += weight; } if ((density != 0.0) && (density != 1.0)) { //Normalize. density = 1.0 / density; for (int k = 0; k < contribY[i].n; k++) { contribY[i].p[k].weight *= density; } } } } else { for (int i = 0; i < dstHeight; ++i) { //contribY[i].n = 0; contribY[i].p = new Contributor[(int) (fwidth * 2 + 1 + 0.5)]; double center = (double) i / yscale; double left = Math.ceil(center - fwidth); double right = Math.floor(center + fwidth); for (int j = (int) left; j <= right; ++j) { double weight = center - (double) j; weight = pFilter.filter(weight); int n; if (j < 0) { n = -j; } else if (j >= srcHeight) { n = (srcHeight - j) + srcHeight - 1; } else { n = j; } /**/ if (n >= srcHeight) { n = n % srcHeight; } else if (n < 0) { n = srcHeight - 1; } /**/ int k = contribY[i].n++; contribY[i].p[k] = new Contributor(); contribY[i].p[k].pixel = n; contribY[i].p[k].weight = weight; } } } final Raster raster = pSource.getRaster(); final WritableRaster out = pDest.getRaster(); // TODO: This is not optimal for non-byte-packed rasters... // (What? Maybe I implemented the fix, but forgot to remove the TODO?) final int numChannels = raster.getNumBands(); final int[] channelMax = new int[numChannels]; for (int k = 0; k < numChannels; k++) { channelMax[k] = (1 << pSource.getColorModel().getComponentSize(k)) - 1; } for (int xx = 0; xx < dstWidth; xx++) { ContributorList contribX = calcXContrib(xscale, fwidth, srcWidth, pFilter, xx); /* Apply horiz filter to make dst column in tmp. */ for (int k = 0; k < srcHeight; k++) { for (int channel = 0; channel < numChannels; channel++) { double weight = 0.0; boolean bPelDelta = false; // TODO: This line throws index out of bounds, if the image // is smaller than filter.support() double pel = raster.getSample(contribX.p[0].pixel, k, channel); for (int j = 0; j < contribX.n; j++) { double pel2 = j == 0 ? pel : raster.getSample(contribX.p[j].pixel, k, channel); if (pel2 != pel) { bPelDelta = true; } weight += pel2 * contribX.p[j].weight; } weight = bPelDelta ? round(weight) : pel; if (weight < 0) { weight = 0; } else if (weight > channelMax[channel]) { weight = channelMax[channel]; } work.setSample(0, k, channel, weight); } }/* next row in temp column */ /* The temp column has been built. Now stretch it vertically into dst column. */ for (int i = 0; i < dstHeight; i++) { for (int channel = 0; channel < numChannels; channel++) { double weight = 0.0; boolean bPelDelta = false; double pel = work.getSample(0, contribY[i].p[0].pixel, channel); for (int j = 0; j < contribY[i].n; j++) { // TODO: This line throws index out of bounds, if the image // is smaller than filter.support() double pel2 = j == 0 ? pel : work.getSample(0, contribY[i].p[j].pixel, channel); if (pel2 != pel) { bPelDelta = true; } weight += pel2 * contribY[i].p[j].weight; } weight = bPelDelta ? round(weight) : pel; if (weight < 0) { weight = 0; } else if (weight > channelMax[channel]) { weight = channelMax[channel]; } out.setSample(xx, i, channel, weight); } }/* next dst row */ }/* next dst column */ return pDest; }
class class_name[name] begin[{] method[resample, return_type[type[BufferedImage]], modifier[private], parameter[pSource, pDest, pFilter]] begin[{] local_variable[type[int], dstWidth] local_variable[type[int], dstHeight] local_variable[type[int], srcWidth] local_variable[type[int], srcHeight] local_variable[type[ColorModel], cm] local_variable[type[WritableRaster], work] local_variable[type[double], xscale] local_variable[type[double], yscale] local_variable[type[ContributorList], contribY] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ContributorList, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=contribY, 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) local_variable[type[double], fwidth] if[binary_operation[member[.yscale], <, literal[1.0]]] begin[{] local_variable[type[double], width] local_variable[type[double], fscale] if[binary_operation[member[.width], <=, literal[.5]]] begin[{] assign[member[.width], binary_operation[literal[.5], +, literal[1.0e-6]]] assign[member[.fscale], literal[1.0]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=ArrayCreator(dimensions=[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5), operator=+), type=BasicType(dimensions=[], name=int))], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Contributor, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Cast(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=double)), operandr=MemberReference(member=yscale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), name=center)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=ceil, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int)), name=left)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=floor, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int)), name=right)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), name=density)], modifiers=set(), type=BasicType(dimensions=[], name=double)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Cast(expression=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=double)), operator=-), name=weight)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=fscale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)], member=filter, postfix_operators=[], prefix_operators=[], qualifier=pFilter, selectors=[], type_arguments=None), operandr=MemberReference(member=fscale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=j, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[])), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, 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=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=%)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=contribY, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=n, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Contributor, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=pixel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=weight, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=density, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=weight, 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=right, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=density, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=density, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0), operator=!=), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=density, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0), operandr=MemberReference(member=density, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/)), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=weight, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type=*=, value=MemberReference(member=density, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=n, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, 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=dstHeight, 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[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=ArrayCreator(dimensions=[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=fwidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5), operator=+), type=BasicType(dimensions=[], name=int))], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Contributor, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Cast(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=double)), operandr=MemberReference(member=yscale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), name=center)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=fwidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=ceil, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), name=left)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=fwidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=floor, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), name=right)], modifiers=set(), type=BasicType(dimensions=[], name=double)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=center, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Cast(expression=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=double)), operator=-), name=weight)], modifiers=set(), type=BasicType(dimensions=[], name=double)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=filter, postfix_operators=[], prefix_operators=[], qualifier=pFilter, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=j, postfix_operators=[], prefix_operators=['-'], qualifier=, selectors=[])), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, 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=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=%)), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=contribY, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=n, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Contributor, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=pixel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=weight, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=weight, 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=right, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Cast(expression=MemberReference(member=left, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dstHeight, 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[}] local_variable[type[Raster], raster] local_variable[type[WritableRaster], out] local_variable[type[int], numChannels] local_variable[type[int], channelMax] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=channelMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=MethodInvocation(arguments=[], member=getColorModel, postfix_operators=[], prefix_operators=[], qualifier=pSource, selectors=[MethodInvocation(arguments=[MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getComponentSize, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=<<), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numChannels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=xscale, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fwidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=srcWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pFilter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=xx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=calcXContrib, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=contribX)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ContributorList, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), name=weight)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=bPelDelta)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=contribX, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=pixel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSample, postfix_operators=[], prefix_operators=[], qualifier=raster, selectors=[], type_arguments=None), name=pel)], modifiers=set(), type=BasicType(dimensions=[], name=double)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=contribX, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=pixel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSample, postfix_operators=[], prefix_operators=[], qualifier=raster, selectors=[], type_arguments=None), if_true=MemberReference(member=pel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), name=pel2)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pel2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=pel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bPelDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=pel2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=contribX, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=weight, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=*)), 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=contribX, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=MemberReference(member=bPelDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=pel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=round, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=channelMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=channelMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSample, postfix_operators=[], prefix_operators=[], qualifier=work, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numChannels, 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=channel)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=channel, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=srcHeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0), name=weight)], modifiers=set(), type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=bPelDelta)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=pixel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSample, postfix_operators=[], prefix_operators=[], qualifier=work, selectors=[], type_arguments=None), name=pel)], modifiers=set(), type=BasicType(dimensions=[], name=double)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=pixel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSample, postfix_operators=[], prefix_operators=[], qualifier=work, selectors=[], type_arguments=None), if_true=MemberReference(member=pel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), name=pel2)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pel2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=pel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bPelDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=pel2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=p, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=weight, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=contribY, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=n, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=MemberReference(member=bPelDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MemberReference(member=pel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=round, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=channelMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=channelMax, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=xx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=weight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSample, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=channel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numChannels, 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=channel)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=channel, 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=dstHeight, 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)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=xx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=dstWidth, 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=xx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=xx, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.pDest]] end[}] END[}]
Keyword[private] identifier[BufferedImage] identifier[resample] operator[SEP] identifier[BufferedImage] identifier[pSource] , identifier[BufferedImage] identifier[pDest] , identifier[InterpolationFilter] identifier[pFilter] operator[SEP] { Keyword[final] Keyword[int] identifier[dstWidth] operator[=] identifier[pDest] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[dstHeight] operator[=] identifier[pDest] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[srcWidth] operator[=] identifier[pSource] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[srcHeight] operator[=] identifier[pSource] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ColorModel] identifier[cm] operator[=] identifier[pSource] operator[SEP] identifier[getColorModel] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[WritableRaster] identifier[work] operator[=] identifier[ImageUtil] operator[SEP] identifier[createCompatibleWritableRaster] operator[SEP] identifier[pSource] , identifier[cm] , Other[1] , identifier[srcHeight] operator[SEP] operator[SEP] Keyword[double] identifier[xscale] operator[=] operator[SEP] Keyword[double] operator[SEP] identifier[dstWidth] operator[/] operator[SEP] Keyword[double] operator[SEP] identifier[srcWidth] operator[SEP] Keyword[double] identifier[yscale] operator[=] operator[SEP] Keyword[double] operator[SEP] identifier[dstHeight] operator[/] operator[SEP] Keyword[double] operator[SEP] identifier[srcHeight] operator[SEP] identifier[ContributorList] operator[SEP] operator[SEP] identifier[contribY] operator[=] Keyword[new] identifier[ContributorList] operator[SEP] identifier[dstHeight] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[contribY] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[ContributorList] operator[SEP] operator[SEP] operator[SEP] } Keyword[double] identifier[fwidth] operator[=] identifier[pFilter] operator[SEP] identifier[support] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[yscale] operator[<] literal[Float] operator[SEP] { Keyword[double] identifier[width] operator[=] identifier[fwidth] operator[/] identifier[yscale] operator[SEP] Keyword[double] identifier[fscale] operator[=] literal[Float] operator[/] identifier[yscale] operator[SEP] Keyword[if] operator[SEP] identifier[width] operator[<=] literal[Float] operator[SEP] { identifier[width] operator[=] literal[Float] operator[+] literal[Float] operator[SEP] identifier[fscale] operator[=] literal[Float] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[dstHeight] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[=] Keyword[new] identifier[Contributor] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[width] operator[*] literal[Float] operator[+] Other[1] operator[+] literal[Float] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[center] operator[=] operator[SEP] Keyword[double] operator[SEP] identifier[i] operator[/] identifier[yscale] operator[SEP] Keyword[int] identifier[left] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[ceil] operator[SEP] identifier[center] operator[-] identifier[width] operator[SEP] operator[SEP] Keyword[int] identifier[right] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[floor] operator[SEP] identifier[center] operator[+] identifier[width] operator[SEP] operator[SEP] Keyword[double] identifier[density] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[left] operator[SEP] identifier[j] operator[<=] identifier[right] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[double] identifier[weight] operator[=] identifier[center] operator[-] operator[SEP] Keyword[double] operator[SEP] identifier[j] operator[SEP] identifier[weight] operator[=] identifier[pFilter] operator[SEP] identifier[filter] operator[SEP] identifier[weight] operator[/] identifier[fscale] operator[SEP] operator[/] identifier[fscale] operator[SEP] Keyword[int] identifier[n] operator[SEP] Keyword[if] operator[SEP] identifier[j] operator[<] Other[0] operator[SEP] { identifier[n] operator[=] operator[-] identifier[j] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[j] operator[>=] identifier[srcHeight] operator[SEP] { identifier[n] operator[=] operator[SEP] identifier[srcHeight] operator[-] identifier[j] operator[SEP] operator[+] identifier[srcHeight] operator[-] Other[1] operator[SEP] } Keyword[else] { identifier[n] operator[=] identifier[j] operator[SEP] } Keyword[if] operator[SEP] identifier[n] operator[>=] identifier[srcHeight] operator[SEP] { identifier[n] operator[=] identifier[n] operator[%] identifier[srcHeight] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[n] operator[<] Other[0] operator[SEP] { identifier[n] operator[=] identifier[srcHeight] operator[-] Other[1] operator[SEP] } Keyword[int] identifier[k] operator[=] identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[n] operator[++] operator[SEP] identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[k] operator[SEP] operator[=] Keyword[new] identifier[Contributor] operator[SEP] operator[SEP] operator[SEP] identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[pixel] operator[=] identifier[n] operator[SEP] identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[weight] operator[=] identifier[weight] operator[SEP] identifier[density] operator[+=] identifier[weight] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[density] operator[!=] literal[Float] operator[SEP] operator[&&] operator[SEP] identifier[density] operator[!=] literal[Float] operator[SEP] operator[SEP] { identifier[density] operator[=] literal[Float] operator[/] identifier[density] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[n] operator[SEP] identifier[k] operator[++] operator[SEP] { identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[weight] operator[*=] identifier[density] operator[SEP] } } } } Keyword[else] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[dstHeight] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[=] Keyword[new] identifier[Contributor] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[fwidth] operator[*] Other[2] operator[+] Other[1] operator[+] literal[Float] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[center] operator[=] operator[SEP] Keyword[double] operator[SEP] identifier[i] operator[/] identifier[yscale] operator[SEP] Keyword[double] identifier[left] operator[=] identifier[Math] operator[SEP] identifier[ceil] operator[SEP] identifier[center] operator[-] identifier[fwidth] operator[SEP] operator[SEP] Keyword[double] identifier[right] operator[=] identifier[Math] operator[SEP] identifier[floor] operator[SEP] identifier[center] operator[+] identifier[fwidth] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[left] operator[SEP] identifier[j] operator[<=] identifier[right] operator[SEP] operator[++] identifier[j] operator[SEP] { Keyword[double] identifier[weight] operator[=] identifier[center] operator[-] operator[SEP] Keyword[double] operator[SEP] identifier[j] operator[SEP] identifier[weight] operator[=] identifier[pFilter] operator[SEP] identifier[filter] operator[SEP] identifier[weight] operator[SEP] operator[SEP] Keyword[int] identifier[n] operator[SEP] Keyword[if] operator[SEP] identifier[j] operator[<] Other[0] operator[SEP] { identifier[n] operator[=] operator[-] identifier[j] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[j] operator[>=] identifier[srcHeight] operator[SEP] { identifier[n] operator[=] operator[SEP] identifier[srcHeight] operator[-] identifier[j] operator[SEP] operator[+] identifier[srcHeight] operator[-] Other[1] operator[SEP] } Keyword[else] { identifier[n] operator[=] identifier[j] operator[SEP] } Keyword[if] operator[SEP] identifier[n] operator[>=] identifier[srcHeight] operator[SEP] { identifier[n] operator[=] identifier[n] operator[%] identifier[srcHeight] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[n] operator[<] Other[0] operator[SEP] { identifier[n] operator[=] identifier[srcHeight] operator[-] Other[1] operator[SEP] } Keyword[int] identifier[k] operator[=] identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[n] operator[++] operator[SEP] identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[k] operator[SEP] operator[=] Keyword[new] identifier[Contributor] operator[SEP] operator[SEP] operator[SEP] identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[pixel] operator[=] identifier[n] operator[SEP] identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[k] operator[SEP] operator[SEP] identifier[weight] operator[=] identifier[weight] operator[SEP] } } } Keyword[final] identifier[Raster] identifier[raster] operator[=] identifier[pSource] operator[SEP] identifier[getRaster] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[WritableRaster] identifier[out] operator[=] identifier[pDest] operator[SEP] identifier[getRaster] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[numChannels] operator[=] identifier[raster] operator[SEP] identifier[getNumBands] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[channelMax] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[numChannels] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[numChannels] operator[SEP] identifier[k] operator[++] operator[SEP] { identifier[channelMax] operator[SEP] identifier[k] operator[SEP] operator[=] operator[SEP] Other[1] operator[<<] identifier[pSource] operator[SEP] identifier[getColorModel] operator[SEP] operator[SEP] operator[SEP] identifier[getComponentSize] operator[SEP] identifier[k] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[xx] operator[=] Other[0] operator[SEP] identifier[xx] operator[<] identifier[dstWidth] operator[SEP] identifier[xx] operator[++] operator[SEP] { identifier[ContributorList] identifier[contribX] operator[=] identifier[calcXContrib] operator[SEP] identifier[xscale] , identifier[fwidth] , identifier[srcWidth] , identifier[pFilter] , identifier[xx] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[srcHeight] operator[SEP] identifier[k] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[channel] operator[=] Other[0] operator[SEP] identifier[channel] operator[<] identifier[numChannels] operator[SEP] identifier[channel] operator[++] operator[SEP] { Keyword[double] identifier[weight] operator[=] literal[Float] operator[SEP] Keyword[boolean] identifier[bPelDelta] operator[=] literal[boolean] operator[SEP] Keyword[double] identifier[pel] operator[=] identifier[raster] operator[SEP] identifier[getSample] operator[SEP] identifier[contribX] operator[SEP] identifier[p] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[pixel] , identifier[k] , identifier[channel] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[contribX] operator[SEP] identifier[n] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[double] identifier[pel2] operator[=] identifier[j] operator[==] Other[0] operator[?] identifier[pel] operator[:] identifier[raster] operator[SEP] identifier[getSample] operator[SEP] identifier[contribX] operator[SEP] identifier[p] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[pixel] , identifier[k] , identifier[channel] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pel2] operator[!=] identifier[pel] operator[SEP] { identifier[bPelDelta] operator[=] literal[boolean] operator[SEP] } identifier[weight] operator[+=] identifier[pel2] operator[*] identifier[contribX] operator[SEP] identifier[p] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[weight] operator[SEP] } identifier[weight] operator[=] identifier[bPelDelta] operator[?] identifier[round] operator[SEP] identifier[weight] operator[SEP] operator[:] identifier[pel] operator[SEP] Keyword[if] operator[SEP] identifier[weight] operator[<] Other[0] operator[SEP] { identifier[weight] operator[=] Other[0] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[weight] operator[>] identifier[channelMax] operator[SEP] identifier[channel] operator[SEP] operator[SEP] { identifier[weight] operator[=] identifier[channelMax] operator[SEP] identifier[channel] operator[SEP] operator[SEP] } identifier[work] operator[SEP] identifier[setSample] operator[SEP] Other[0] , identifier[k] , identifier[channel] , identifier[weight] operator[SEP] operator[SEP] } } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[dstHeight] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[channel] operator[=] Other[0] operator[SEP] identifier[channel] operator[<] identifier[numChannels] operator[SEP] identifier[channel] operator[++] operator[SEP] { Keyword[double] identifier[weight] operator[=] literal[Float] operator[SEP] Keyword[boolean] identifier[bPelDelta] operator[=] literal[boolean] operator[SEP] Keyword[double] identifier[pel] operator[=] identifier[work] operator[SEP] identifier[getSample] operator[SEP] Other[0] , identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[pixel] , identifier[channel] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[n] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[double] identifier[pel2] operator[=] identifier[j] operator[==] Other[0] operator[?] identifier[pel] operator[:] identifier[work] operator[SEP] identifier[getSample] operator[SEP] Other[0] , identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[pixel] , identifier[channel] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pel2] operator[!=] identifier[pel] operator[SEP] { identifier[bPelDelta] operator[=] literal[boolean] operator[SEP] } identifier[weight] operator[+=] identifier[pel2] operator[*] identifier[contribY] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[j] operator[SEP] operator[SEP] identifier[weight] operator[SEP] } identifier[weight] operator[=] identifier[bPelDelta] operator[?] identifier[round] operator[SEP] identifier[weight] operator[SEP] operator[:] identifier[pel] operator[SEP] Keyword[if] operator[SEP] identifier[weight] operator[<] Other[0] operator[SEP] { identifier[weight] operator[=] Other[0] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[weight] operator[>] identifier[channelMax] operator[SEP] identifier[channel] operator[SEP] operator[SEP] { identifier[weight] operator[=] identifier[channelMax] operator[SEP] identifier[channel] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[setSample] operator[SEP] identifier[xx] , identifier[i] , identifier[channel] , identifier[weight] operator[SEP] operator[SEP] } } } Keyword[return] identifier[pDest] operator[SEP] }
@Override public CoOccurrenceWeight<T> nextObject() { String line = iterator.nextSentence(); if (line == null || line.isEmpty()) { return null; } String[] strings = line.split(" "); CoOccurrenceWeight<T> object = new CoOccurrenceWeight<>(); object.setElement1(vocabCache.elementAtIndex(Integer.valueOf(strings[0]))); object.setElement2(vocabCache.elementAtIndex(Integer.valueOf(strings[1]))); object.setWeight(Double.parseDouble(strings[2])); return object; }
class class_name[name] begin[{] method[nextObject, return_type[type[CoOccurrenceWeight]], modifier[public], parameter[]] begin[{] local_variable[type[String], line] if[binary_operation[binary_operation[member[.line], ==, literal[null]], ||, call[line.isEmpty, parameter[]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], strings] local_variable[type[CoOccurrenceWeight], object] call[object.setElement1, parameter[call[vocabCache.elementAtIndex, parameter[call[Integer.valueOf, parameter[member[.strings]]]]]]] call[object.setElement2, parameter[call[vocabCache.elementAtIndex, parameter[call[Integer.valueOf, parameter[member[.strings]]]]]]] call[object.setWeight, parameter[call[Double.parseDouble, parameter[member[.strings]]]]] return[member[.object]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CoOccurrenceWeight] operator[<] identifier[T] operator[>] identifier[nextObject] operator[SEP] operator[SEP] { identifier[String] identifier[line] operator[=] identifier[iterator] operator[SEP] identifier[nextSentence] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[line] operator[==] Other[null] operator[||] identifier[line] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[String] operator[SEP] operator[SEP] identifier[strings] operator[=] identifier[line] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[CoOccurrenceWeight] operator[<] identifier[T] operator[>] identifier[object] operator[=] Keyword[new] identifier[CoOccurrenceWeight] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[object] operator[SEP] identifier[setElement1] operator[SEP] identifier[vocabCache] operator[SEP] identifier[elementAtIndex] operator[SEP] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[strings] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[object] operator[SEP] identifier[setElement2] operator[SEP] identifier[vocabCache] operator[SEP] identifier[elementAtIndex] operator[SEP] identifier[Integer] operator[SEP] identifier[valueOf] operator[SEP] identifier[strings] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[object] operator[SEP] identifier[setWeight] operator[SEP] identifier[Double] operator[SEP] identifier[parseDouble] operator[SEP] identifier[strings] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[object] operator[SEP] }
protected synchronized Date getBuildTimestamp() throws IOException { Date now = (Date) getPluginContext().get(CONTEXT_KEY_BUILD_TIMESTAMP); if (now == null) { now = getReferenceDate(); getPluginContext().put(CONTEXT_KEY_BUILD_TIMESTAMP,now); } return now; }
class class_name[name] begin[{] method[getBuildTimestamp, return_type[type[Date]], modifier[synchronized protected], parameter[]] begin[{] local_variable[type[Date], now] if[binary_operation[member[.now], ==, literal[null]]] begin[{] assign[member[.now], call[.getReferenceDate, parameter[]]] call[.getPluginContext, parameter[]] else begin[{] None end[}] return[member[.now]] end[}] END[}]
Keyword[protected] Keyword[synchronized] identifier[Date] identifier[getBuildTimestamp] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Date] identifier[now] operator[=] operator[SEP] identifier[Date] operator[SEP] identifier[getPluginContext] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[CONTEXT_KEY_BUILD_TIMESTAMP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[now] operator[==] Other[null] operator[SEP] { identifier[now] operator[=] identifier[getReferenceDate] operator[SEP] operator[SEP] operator[SEP] identifier[getPluginContext] operator[SEP] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[CONTEXT_KEY_BUILD_TIMESTAMP] , identifier[now] operator[SEP] operator[SEP] } Keyword[return] identifier[now] operator[SEP] }
private boolean isSupported(Class<?> t) { if (Boolean.class.equals(t) || boolean.class.equals(t) || Byte.class.equals(t) || byte.class.equals(t) || Short.class.equals(t) || short.class.equals(t) || Integer.class.equals(t) || int.class.equals(t) || Long.class.equals(t) || long.class.equals(t) || Float.class.equals(t) || float.class.equals(t) || Double.class.equals(t) || double.class.equals(t) || Character.class.equals(t) || char.class.equals(t) || String.class.equals(t)) return true; return false; }
class class_name[name] begin[{] method[isSupported, return_type[type[boolean]], modifier[private], parameter[t]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Boolean, sub_type=None)), ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[], name=boolean))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Byte, sub_type=None))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[], name=byte))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Short, sub_type=None))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[], name=short))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Integer, sub_type=None))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[], name=int))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Long, sub_type=None))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[], name=long))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Float, sub_type=None))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[], name=float))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[], name=double))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Character, sub_type=None))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=BasicType(dimensions=[], name=char))], ||, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]] begin[{] return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isSupported] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[t] operator[SEP] { Keyword[if] operator[SEP] identifier[Boolean] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] Keyword[boolean] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] identifier[Byte] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] Keyword[byte] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] identifier[Short] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] Keyword[short] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] identifier[Integer] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] Keyword[int] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] identifier[Long] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] Keyword[long] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] identifier[Float] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] Keyword[float] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] identifier[Double] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] Keyword[double] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] identifier[Character] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] Keyword[char] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[||] identifier[String] operator[SEP] Keyword[class] operator[SEP] identifier[equals] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }