code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static void print(PrintStream out , DMatrix mat , String format ) { if( format.toLowerCase().equals("matlab")) { printMatlab(out, mat); } else if( format.toLowerCase().equals("java")) { printJava(out,mat,format); } else { printTypeSize(out, mat); format += " "; for (int row = 0; row < mat.getNumRows(); row++) { for (int col = 0; col < mat.getNumCols(); col++) { out.printf(format, mat.get(row, col)); } out.println(); } } }
class class_name[name] begin[{] method[print, return_type[void], modifier[public static], parameter[out, mat, format]] begin[{] if[call[format.toLowerCase, parameter[]]] begin[{] call[.printMatlab, parameter[member[.out], member[.mat]]] else begin[{] if[call[format.toLowerCase, parameter[]]] begin[{] call[.printJava, parameter[member[.out], member[.mat], member[.format]]] else begin[{] call[.printTypeSize, parameter[member[.out], member[.mat]]] assign[member[.format], literal[" "]] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=mat, selectors=[], type_arguments=None)], member=printf, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getNumCols, postfix_operators=[], prefix_operators=[], qualifier=mat, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=col)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=col, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getNumRows, postfix_operators=[], prefix_operators=[], qualifier=mat, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=row)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=row, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[print] operator[SEP] identifier[PrintStream] identifier[out] , identifier[DMatrix] identifier[mat] , identifier[String] identifier[format] operator[SEP] { Keyword[if] operator[SEP] identifier[format] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[printMatlab] operator[SEP] identifier[out] , identifier[mat] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[format] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[printJava] operator[SEP] identifier[out] , identifier[mat] , identifier[format] operator[SEP] operator[SEP] } Keyword[else] { identifier[printTypeSize] operator[SEP] identifier[out] , identifier[mat] operator[SEP] operator[SEP] identifier[format] operator[+=] literal[String] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[row] operator[=] Other[0] operator[SEP] identifier[row] operator[<] identifier[mat] operator[SEP] identifier[getNumRows] operator[SEP] operator[SEP] operator[SEP] identifier[row] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[col] operator[=] Other[0] operator[SEP] identifier[col] operator[<] identifier[mat] operator[SEP] identifier[getNumCols] operator[SEP] operator[SEP] operator[SEP] identifier[col] operator[++] operator[SEP] { identifier[out] operator[SEP] identifier[printf] operator[SEP] identifier[format] , identifier[mat] operator[SEP] identifier[get] operator[SEP] identifier[row] , identifier[col] operator[SEP] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] } } }
private JSONObject errorForUnwrappedException(Exception e, JmxRequest pJmxReq) { Throwable cause = e.getCause(); int code = cause instanceof IllegalArgumentException ? 400 : cause instanceof SecurityException ? 403 : 500; return getErrorJSON(code,cause, pJmxReq); }
class class_name[name] begin[{] method[errorForUnwrappedException, return_type[type[JSONObject]], modifier[private], parameter[e, pJmxReq]] begin[{] local_variable[type[Throwable], cause] local_variable[type[int], code] return[call[.getErrorJSON, parameter[member[.code], member[.cause], member[.pJmxReq]]]] end[}] END[}]
Keyword[private] identifier[JSONObject] identifier[errorForUnwrappedException] operator[SEP] identifier[Exception] identifier[e] , identifier[JmxRequest] identifier[pJmxReq] operator[SEP] { identifier[Throwable] identifier[cause] operator[=] identifier[e] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[code] operator[=] identifier[cause] Keyword[instanceof] identifier[IllegalArgumentException] operator[?] Other[400] operator[:] identifier[cause] Keyword[instanceof] identifier[SecurityException] operator[?] Other[403] operator[:] Other[500] operator[SEP] Keyword[return] identifier[getErrorJSON] operator[SEP] identifier[code] , identifier[cause] , identifier[pJmxReq] operator[SEP] operator[SEP] }
public com.google.privacy.dlp.v2.DatastoreKeyOrBuilder getDatastoreKeyOrBuilder() { if (typeCase_ == 2) { return (com.google.privacy.dlp.v2.DatastoreKey) type_; } return com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance(); }
class class_name[name] begin[{] method[getDatastoreKeyOrBuilder, return_type[type[com]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.typeCase_], ==, literal[2]]] begin[{] return[Cast(expression=MemberReference(member=type_, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=google, sub_type=ReferenceType(arguments=None, dimensions=None, name=privacy, sub_type=ReferenceType(arguments=None, dimensions=None, name=dlp, sub_type=ReferenceType(arguments=None, dimensions=None, name=v2, sub_type=ReferenceType(arguments=None, dimensions=None, name=DatastoreKey, sub_type=None)))))))] else begin[{] None end[}] return[call[com.google.privacy.dlp.v2.DatastoreKey.getDefaultInstance, parameter[]]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[privacy] operator[SEP] identifier[dlp] operator[SEP] identifier[v2] operator[SEP] identifier[DatastoreKeyOrBuilder] identifier[getDatastoreKeyOrBuilder] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[typeCase_] operator[==] Other[2] operator[SEP] { Keyword[return] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[privacy] operator[SEP] identifier[dlp] operator[SEP] identifier[v2] operator[SEP] identifier[DatastoreKey] operator[SEP] identifier[type_] operator[SEP] } Keyword[return] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[privacy] operator[SEP] identifier[dlp] operator[SEP] identifier[v2] operator[SEP] identifier[DatastoreKey] operator[SEP] identifier[getDefaultInstance] operator[SEP] operator[SEP] operator[SEP] }
public Response invokeSignedRequest(Client apiClient, String accessKey, String secretKey, String httpMethod, String endpointURL, String reqPath, Map<String, String> headers, MultivaluedMap<String, String> params, Entity<?> entity) { byte[] jsonEntity = null; if (entity != null) { try { jsonEntity = ParaObjectUtils.getJsonWriter().writeValueAsBytes(entity.getEntity()); } catch (JsonProcessingException ex) { jsonEntity = null; logger.error(null, ex); } } return invokeSignedRequest(apiClient, accessKey, secretKey, httpMethod, endpointURL, reqPath, headers, params, jsonEntity); }
class class_name[name] begin[{] method[invokeSignedRequest, return_type[type[Response]], modifier[public], parameter[apiClient, accessKey, secretKey, httpMethod, endpointURL, reqPath, headers, params, entity]] begin[{] local_variable[type[byte], jsonEntity] if[binary_operation[member[.entity], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jsonEntity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getJsonWriter, postfix_operators=[], prefix_operators=[], qualifier=ParaObjectUtils, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEntity, postfix_operators=[], prefix_operators=[], qualifier=entity, selectors=[], type_arguments=None)], member=writeValueAsBytes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=jsonEntity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), 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=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['JsonProcessingException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[call[.invokeSignedRequest, parameter[member[.apiClient], member[.accessKey], member[.secretKey], member[.httpMethod], member[.endpointURL], member[.reqPath], member[.headers], member[.params], member[.jsonEntity]]]] end[}] END[}]
Keyword[public] identifier[Response] identifier[invokeSignedRequest] operator[SEP] identifier[Client] identifier[apiClient] , identifier[String] identifier[accessKey] , identifier[String] identifier[secretKey] , identifier[String] identifier[httpMethod] , identifier[String] identifier[endpointURL] , identifier[String] identifier[reqPath] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[headers] , identifier[MultivaluedMap] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] , identifier[Entity] operator[<] operator[?] operator[>] identifier[entity] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[jsonEntity] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[entity] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[jsonEntity] operator[=] identifier[ParaObjectUtils] operator[SEP] identifier[getJsonWriter] operator[SEP] operator[SEP] operator[SEP] identifier[writeValueAsBytes] operator[SEP] identifier[entity] operator[SEP] identifier[getEntity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JsonProcessingException] identifier[ex] operator[SEP] { identifier[jsonEntity] operator[=] Other[null] operator[SEP] identifier[logger] operator[SEP] identifier[error] operator[SEP] Other[null] , identifier[ex] operator[SEP] operator[SEP] } } Keyword[return] identifier[invokeSignedRequest] operator[SEP] identifier[apiClient] , identifier[accessKey] , identifier[secretKey] , identifier[httpMethod] , identifier[endpointURL] , identifier[reqPath] , identifier[headers] , identifier[params] , identifier[jsonEntity] operator[SEP] operator[SEP] }
public static <S> List<S> of(List<? extends S> left, List<? extends S> right) { List<S> list = new ArrayList<S>(left.size() + right.size()); list.addAll(left); list.addAll(right); return list; }
class class_name[name] begin[{] method[of, return_type[type[List]], modifier[public static], parameter[left, right]] begin[{] local_variable[type[List], list] call[list.addAll, parameter[member[.left]]] call[list.addAll, parameter[member[.right]]] return[member[.list]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[S] operator[>] identifier[List] operator[<] identifier[S] operator[>] identifier[of] operator[SEP] identifier[List] operator[<] operator[?] Keyword[extends] identifier[S] operator[>] identifier[left] , identifier[List] operator[<] operator[?] Keyword[extends] identifier[S] operator[>] identifier[right] operator[SEP] { identifier[List] operator[<] identifier[S] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[S] operator[>] operator[SEP] identifier[left] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] identifier[right] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[addAll] operator[SEP] identifier[left] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[addAll] operator[SEP] identifier[right] operator[SEP] operator[SEP] Keyword[return] identifier[list] operator[SEP] }
private void addPostParams(final Request request) { if (attributes != null) { request.addPostParam("Attributes", attributes); } if (dateCreated != null) { request.addPostParam("DateCreated", dateCreated.toString()); } if (dateUpdated != null) { request.addPostParam("DateUpdated", dateUpdated.toString()); } }
class class_name[name] begin[{] method[addPostParams, return_type[void], modifier[private], parameter[request]] begin[{] if[binary_operation[member[.attributes], !=, literal[null]]] begin[{] call[request.addPostParam, parameter[literal["Attributes"], member[.attributes]]] else begin[{] None end[}] if[binary_operation[member[.dateCreated], !=, literal[null]]] begin[{] call[request.addPostParam, parameter[literal["DateCreated"], call[dateCreated.toString, parameter[]]]] else begin[{] None end[}] if[binary_operation[member[.dateUpdated], !=, literal[null]]] begin[{] call[request.addPostParam, parameter[literal["DateUpdated"], call[dateUpdated.toString, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addPostParams] operator[SEP] Keyword[final] identifier[Request] identifier[request] operator[SEP] { Keyword[if] operator[SEP] identifier[attributes] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[addPostParam] operator[SEP] literal[String] , identifier[attributes] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[dateCreated] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[addPostParam] operator[SEP] literal[String] , identifier[dateCreated] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[dateUpdated] operator[!=] Other[null] operator[SEP] { identifier[request] operator[SEP] identifier[addPostParam] operator[SEP] literal[String] , identifier[dateUpdated] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private TextWatcher createTextChangeListener() { return new TextWatcher() { @Override public final void beforeTextChanged(final CharSequence s, final int start, final int count, final int after) { } @Override public final void onTextChanged(final CharSequence s, final int start, final int before, final int count) { } @Override public final void afterTextChanged(final Editable s) { if (isValidatedOnValueChange()) { validate(); } adaptMaxNumberOfCharactersMessage(); } }; }
class class_name[name] begin[{] method[createTextChangeListener, return_type[type[TextWatcher]], modifier[private], parameter[]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[], documentation=None, modifiers={'final', 'public'}, name=beforeTextChanged, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=s, type=ReferenceType(arguments=None, dimensions=[], name=CharSequence, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=start, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=count, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=after, type=BasicType(dimensions=[], name=int), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[], documentation=None, modifiers={'final', 'public'}, name=onTextChanged, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=s, type=ReferenceType(arguments=None, dimensions=[], name=CharSequence, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=start, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=before, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers={'final'}, name=count, type=BasicType(dimensions=[], name=int), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=MethodInvocation(arguments=[], member=isValidatedOnValueChange, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=validate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=adaptMaxNumberOfCharactersMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'final', 'public'}, name=afterTextChanged, parameters=[FormalParameter(annotations=[], modifiers={'final'}, name=s, type=ReferenceType(arguments=None, dimensions=[], name=Editable, 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=TextWatcher, sub_type=None))] end[}] END[}]
Keyword[private] identifier[TextWatcher] identifier[createTextChangeListener] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[TextWatcher] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[beforeTextChanged] operator[SEP] Keyword[final] identifier[CharSequence] identifier[s] , Keyword[final] Keyword[int] identifier[start] , Keyword[final] Keyword[int] identifier[count] , Keyword[final] Keyword[int] identifier[after] operator[SEP] { } annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[onTextChanged] operator[SEP] Keyword[final] identifier[CharSequence] identifier[s] , Keyword[final] Keyword[int] identifier[start] , Keyword[final] Keyword[int] identifier[before] , Keyword[final] Keyword[int] identifier[count] operator[SEP] { } annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[afterTextChanged] operator[SEP] Keyword[final] identifier[Editable] identifier[s] operator[SEP] { Keyword[if] operator[SEP] identifier[isValidatedOnValueChange] operator[SEP] operator[SEP] operator[SEP] { identifier[validate] operator[SEP] operator[SEP] operator[SEP] } identifier[adaptMaxNumberOfCharactersMessage] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] }
public SDVariable min(String name, boolean keepDims, int... dimensions){ return sameDiff.min(name, this, keepDims, dimensions); }
class class_name[name] begin[{] method[min, return_type[type[SDVariable]], modifier[public], parameter[name, keepDims, dimensions]] begin[{] return[call[sameDiff.min, parameter[member[.name], THIS[], member[.keepDims], member[.dimensions]]]] end[}] END[}]
Keyword[public] identifier[SDVariable] identifier[min] operator[SEP] identifier[String] identifier[name] , Keyword[boolean] identifier[keepDims] , Keyword[int] operator[...] identifier[dimensions] operator[SEP] { Keyword[return] identifier[sameDiff] operator[SEP] identifier[min] operator[SEP] identifier[name] , Keyword[this] , identifier[keepDims] , identifier[dimensions] operator[SEP] operator[SEP] }
@EmbeddedId @AttributeOverrides({ @AttributeOverride(name = "createdDate", column = @Column(name = "EMBEDDED_ID_CREATED_DATE")), @AttributeOverride(name = "page", column = @Column(name = "EMBEDDED_ID_PAGE")) }) public ApplicationActionEventPagePeriodSummaryEmbeddedId getEmbeddedId() { return embeddedId; }
class class_name[name] begin[{] method[getEmbeddedId, return_type[type[ApplicationActionEventPagePeriodSummaryEmbeddedId]], modifier[public], parameter[]] begin[{] return[member[.embeddedId]] end[}] END[}]
annotation[@] identifier[EmbeddedId] annotation[@] identifier[AttributeOverrides] operator[SEP] { annotation[@] identifier[AttributeOverride] operator[SEP] identifier[name] operator[=] literal[String] , identifier[column] operator[=] annotation[@] identifier[Column] operator[SEP] identifier[name] operator[=] literal[String] operator[SEP] operator[SEP] , annotation[@] identifier[AttributeOverride] operator[SEP] identifier[name] operator[=] literal[String] , identifier[column] operator[=] annotation[@] identifier[Column] operator[SEP] identifier[name] operator[=] literal[String] operator[SEP] operator[SEP] } operator[SEP] Keyword[public] identifier[ApplicationActionEventPagePeriodSummaryEmbeddedId] identifier[getEmbeddedId] operator[SEP] operator[SEP] { Keyword[return] identifier[embeddedId] operator[SEP] }
public void put( K key, Refresher<? super K,? extends V,? extends E> refresher, V value ) { put(key, refresher, new Result<V,E>(value)); }
class class_name[name] begin[{] method[put, return_type[void], modifier[public], parameter[key, refresher, value]] begin[{] call[.put, parameter[member[.key], member[.refresher], ClassCreator(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=E, sub_type=None))], dimensions=None, name=Result, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[put] operator[SEP] identifier[K] identifier[key] , identifier[Refresher] operator[<] operator[?] Keyword[super] identifier[K] , operator[?] Keyword[extends] identifier[V] , operator[?] Keyword[extends] identifier[E] operator[>] identifier[refresher] , identifier[V] identifier[value] operator[SEP] { identifier[put] operator[SEP] identifier[key] , identifier[refresher] , Keyword[new] identifier[Result] operator[<] identifier[V] , identifier[E] operator[>] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] }
@Override public CreateTagOptionResult createTagOption(CreateTagOptionRequest request) { request = beforeClientExecution(request); return executeCreateTagOption(request); }
class class_name[name] begin[{] method[createTagOption, return_type[type[CreateTagOptionResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeCreateTagOption, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CreateTagOptionResult] identifier[createTagOption] operator[SEP] identifier[CreateTagOptionRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeCreateTagOption] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public Set<Terminal> get(Construction construction) { if (construction.isTerminal()) { Set<Terminal> result = new LinkedHashSet<Terminal>(); result.add((Terminal) construction); return result; } return firstGrammar.get(construction.getName()); }
class class_name[name] begin[{] method[get, return_type[type[Set]], modifier[public], parameter[construction]] begin[{] if[call[construction.isTerminal, parameter[]]] begin[{] local_variable[type[Set], result] call[result.add, parameter[Cast(expression=MemberReference(member=construction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Terminal, sub_type=None))]] return[member[.result]] else begin[{] None end[}] return[call[firstGrammar.get, parameter[call[construction.getName, parameter[]]]]] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[Terminal] operator[>] identifier[get] operator[SEP] identifier[Construction] identifier[construction] operator[SEP] { Keyword[if] operator[SEP] identifier[construction] operator[SEP] identifier[isTerminal] operator[SEP] operator[SEP] operator[SEP] { identifier[Set] operator[<] identifier[Terminal] operator[>] identifier[result] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] identifier[Terminal] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[add] operator[SEP] operator[SEP] identifier[Terminal] operator[SEP] identifier[construction] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] } Keyword[return] identifier[firstGrammar] operator[SEP] identifier[get] operator[SEP] identifier[construction] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static HostsFileEntries parseSilently(Charset... charsets) { File hostsFile = locateHostsFile(); try { return parse(hostsFile, charsets); } catch (IOException e) { if (logger.isWarnEnabled()) { logger.warn("Failed to load and parse hosts file at " + hostsFile.getPath(), e); } return HostsFileEntries.EMPTY; } }
class class_name[name] begin[{] method[parseSilently, return_type[type[HostsFileEntries]], modifier[public static], parameter[charsets]] begin[{] local_variable[type[File], hostsFile] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=hostsFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=charsets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isWarnEnabled, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to load and parse hosts file at "), operandr=MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=hostsFile, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)])), ReturnStatement(expression=MemberReference(member=EMPTY, postfix_operators=[], prefix_operators=[], qualifier=HostsFileEntries, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[HostsFileEntries] identifier[parseSilently] operator[SEP] identifier[Charset] operator[...] identifier[charsets] operator[SEP] { identifier[File] identifier[hostsFile] operator[=] identifier[locateHostsFile] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[parse] operator[SEP] identifier[hostsFile] , identifier[charsets] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isWarnEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[hostsFile] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[HostsFileEntries] operator[SEP] identifier[EMPTY] operator[SEP] } }
public Postcard withBundle(@Nullable String key, @Nullable Bundle value) { mBundle.putBundle(key, value); return this; }
class class_name[name] begin[{] method[withBundle, return_type[type[Postcard]], modifier[public], parameter[key, value]] begin[{] call[mBundle.putBundle, parameter[member[.key], member[.value]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Postcard] identifier[withBundle] operator[SEP] annotation[@] identifier[Nullable] identifier[String] identifier[key] , annotation[@] identifier[Nullable] identifier[Bundle] identifier[value] operator[SEP] { identifier[mBundle] operator[SEP] identifier[putBundle] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public boolean isElementPresent() { logger.entering(); boolean returnValue = false; try { if (getElement() != null) { returnValue = true; } } catch (NoSuchElementException e) { returnValue = false; } logger.exiting(returnValue); return returnValue; }
class class_name[name] begin[{] method[isElementPresent, return_type[type[boolean]], modifier[public], parameter[]] begin[{] call[logger.entering, parameter[]] local_variable[type[boolean], returnValue] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=returnValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=returnValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoSuchElementException']))], finally_block=None, label=None, resources=None) call[logger.exiting, parameter[member[.returnValue]]] return[member[.returnValue]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isElementPresent] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[entering] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[returnValue] operator[=] literal[boolean] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[returnValue] operator[=] literal[boolean] operator[SEP] } } Keyword[catch] operator[SEP] identifier[NoSuchElementException] identifier[e] operator[SEP] { identifier[returnValue] operator[=] literal[boolean] operator[SEP] } identifier[logger] operator[SEP] identifier[exiting] operator[SEP] identifier[returnValue] operator[SEP] operator[SEP] Keyword[return] identifier[returnValue] operator[SEP] }
public OvhCallDiagnostics billingAccount_service_serviceName_voiceConsumption_consumptionId_callDiagnostics_GET(String billingAccount, String serviceName, Long consumptionId) throws IOException { String qPath = "/telephony/{billingAccount}/service/{serviceName}/voiceConsumption/{consumptionId}/callDiagnostics"; StringBuilder sb = path(qPath, billingAccount, serviceName, consumptionId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhCallDiagnostics.class); }
class class_name[name] begin[{] method[billingAccount_service_serviceName_voiceConsumption_consumptionId_callDiagnostics_GET, return_type[type[OvhCallDiagnostics]], modifier[public], parameter[billingAccount, serviceName, consumptionId]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] 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=OvhCallDiagnostics, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhCallDiagnostics] identifier[billingAccount_service_serviceName_voiceConsumption_consumptionId_callDiagnostics_GET] operator[SEP] identifier[String] identifier[billingAccount] , identifier[String] identifier[serviceName] , identifier[Long] identifier[consumptionId] 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[billingAccount] , identifier[serviceName] , identifier[consumptionId] 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] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[convertTo] operator[SEP] identifier[resp] , identifier[OvhCallDiagnostics] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public ServiceFuture<VirtualNetworkInner> beginCreateOrUpdateAsync(String resourceGroupName, String virtualNetworkName, VirtualNetworkInner parameters, final ServiceCallback<VirtualNetworkInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, virtualNetworkName, parameters), serviceCallback); }
class class_name[name] begin[{] method[beginCreateOrUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, virtualNetworkName, parameters, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.beginCreateOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.virtualNetworkName], member[.parameters]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[VirtualNetworkInner] operator[>] identifier[beginCreateOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualNetworkName] , identifier[VirtualNetworkInner] identifier[parameters] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[VirtualNetworkInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[beginCreateOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[virtualNetworkName] , identifier[parameters] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public static void writeStringCached(DataOutput out, String entityName) throws IOException { byte[] name = getByteNameWithCaching(entityName); // name should never be null at this point if (name == null) { throw new RuntimeException("Cannot retrieve class name"); } out.write(name, 0, name.length); }
class class_name[name] begin[{] method[writeStringCached, return_type[void], modifier[public static], parameter[out, entityName]] begin[{] local_variable[type[byte], name] if[binary_operation[member[.name], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot retrieve class name")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] None end[}] call[out.write, parameter[member[.name], literal[0], member[name.length]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[writeStringCached] operator[SEP] identifier[DataOutput] identifier[out] , identifier[String] identifier[entityName] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[name] operator[=] identifier[getByteNameWithCaching] operator[SEP] identifier[entityName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[name] , Other[0] , identifier[name] operator[SEP] identifier[length] operator[SEP] operator[SEP] }
public static void log (@Nonnull final Class <?> aLoggingClass, @Nonnull final IHasErrorLevel aErrorLevelProvider, @Nonnull final Supplier <String> aMsgSupplier) { log (aLoggingClass, aErrorLevelProvider.getErrorLevel (), aMsgSupplier, null); }
class class_name[name] begin[{] method[log, return_type[void], modifier[public static], parameter[aLoggingClass, aErrorLevelProvider, aMsgSupplier]] begin[{] call[.log, parameter[member[.aLoggingClass], call[aErrorLevelProvider.getErrorLevel, parameter[]], member[.aMsgSupplier], literal[null]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[log] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[aLoggingClass] , annotation[@] identifier[Nonnull] Keyword[final] identifier[IHasErrorLevel] identifier[aErrorLevelProvider] , annotation[@] identifier[Nonnull] Keyword[final] identifier[Supplier] operator[<] identifier[String] operator[>] identifier[aMsgSupplier] operator[SEP] { identifier[log] operator[SEP] identifier[aLoggingClass] , identifier[aErrorLevelProvider] operator[SEP] identifier[getErrorLevel] operator[SEP] operator[SEP] , identifier[aMsgSupplier] , Other[null] operator[SEP] operator[SEP] }
public void requestSmsVerificationCode(boolean androidSmsRetrieverSupported, Optional<String> captchaToken) throws IOException { this.pushServiceSocket.requestSmsVerificationCode(androidSmsRetrieverSupported, captchaToken); }
class class_name[name] begin[{] method[requestSmsVerificationCode, return_type[void], modifier[public], parameter[androidSmsRetrieverSupported, captchaToken]] begin[{] THIS[member[None.pushServiceSocket]call[None.requestSmsVerificationCode, parameter[member[.androidSmsRetrieverSupported], member[.captchaToken]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[requestSmsVerificationCode] operator[SEP] Keyword[boolean] identifier[androidSmsRetrieverSupported] , identifier[Optional] operator[<] identifier[String] operator[>] identifier[captchaToken] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[this] operator[SEP] identifier[pushServiceSocket] operator[SEP] identifier[requestSmsVerificationCode] operator[SEP] identifier[androidSmsRetrieverSupported] , identifier[captchaToken] operator[SEP] operator[SEP] }
protected int extractNumeral() { int val = 0; final int topLeft = getTotalGridElements() - gridWidth; int shift = 0; // -2 because the top and bottom rows have 2 unusable bits (the first and last) for(int i = 1; i < gridWidth - 1; i++) { final int idx = topLeft + i; val |= classified[idx] << shift; //System.out.println("val |= classified[" + idx + "] << " + shift + ";"); shift++; } // Don't do the first or last row, handled above and below - special cases for(int ii = 1; ii < gridWidth - 1; ii++) { for(int i = 0; i < gridWidth; i++) { final int idx = getTotalGridElements() - (gridWidth * (ii + 1)) + i; val |= classified[idx] << shift; // System.out.println("val |= classified[" + idx + "] << " + shift + ";"); shift++; } } // The last row for(int i = 1; i < gridWidth - 1; i++) { val |= classified[i] << shift; //System.out.println("val |= classified[" + i + "] << " + shift + ";"); shift++; } return val; }
class class_name[name] begin[{] method[extractNumeral, return_type[type[int]], modifier[protected], parameter[]] begin[{] local_variable[type[int], val] local_variable[type[int], topLeft] local_variable[type[int], shift] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=topLeft, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=idx)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=|=, value=BinaryOperation(operandl=MemberReference(member=classified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=shift, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<<)), label=None), StatementExpression(expression=MemberReference(member=shift, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=gridWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTotalGridElements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=gridWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=ii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operator=*), operator=-), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=idx)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=|=, value=BinaryOperation(operandl=MemberReference(member=classified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=idx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=shift, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<<)), label=None), StatementExpression(expression=MemberReference(member=shift, 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=gridWidth, 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=ii, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=gridWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=ii)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=ii, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=val, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=|=, value=BinaryOperation(operandl=MemberReference(member=classified, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=shift, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<<)), label=None), StatementExpression(expression=MemberReference(member=shift, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=gridWidth, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.val]] end[}] END[}]
Keyword[protected] Keyword[int] identifier[extractNumeral] operator[SEP] operator[SEP] { Keyword[int] identifier[val] operator[=] Other[0] operator[SEP] Keyword[final] Keyword[int] identifier[topLeft] operator[=] identifier[getTotalGridElements] operator[SEP] operator[SEP] operator[-] identifier[gridWidth] operator[SEP] Keyword[int] identifier[shift] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[gridWidth] operator[-] Other[1] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[int] identifier[idx] operator[=] identifier[topLeft] operator[+] identifier[i] operator[SEP] identifier[val] operator[|=] identifier[classified] operator[SEP] identifier[idx] operator[SEP] operator[<<] identifier[shift] operator[SEP] identifier[shift] operator[++] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[ii] operator[=] Other[1] operator[SEP] identifier[ii] operator[<] identifier[gridWidth] operator[-] Other[1] operator[SEP] identifier[ii] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[gridWidth] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[int] identifier[idx] operator[=] identifier[getTotalGridElements] operator[SEP] operator[SEP] operator[-] operator[SEP] identifier[gridWidth] operator[*] operator[SEP] identifier[ii] operator[+] Other[1] operator[SEP] operator[SEP] operator[+] identifier[i] operator[SEP] identifier[val] operator[|=] identifier[classified] operator[SEP] identifier[idx] operator[SEP] operator[<<] identifier[shift] operator[SEP] identifier[shift] operator[++] operator[SEP] } } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[gridWidth] operator[-] Other[1] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[val] operator[|=] identifier[classified] operator[SEP] identifier[i] operator[SEP] operator[<<] identifier[shift] operator[SEP] identifier[shift] operator[++] operator[SEP] } Keyword[return] identifier[val] operator[SEP] }
public boolean createNewFile() throws IOException { synchronized (LOCK) { if (! exists()) { clearStatusCache(); WriteStreamOld s = openWrite(); s.close(); return true; } } return false; }
class class_name[name] begin[{] method[createNewFile, return_type[type[boolean]], modifier[public], parameter[]] begin[{] SYNCHRONIZED[member[.LOCK]] BEGIN[{] if[call[.exists, parameter[]]] begin[{] call[.clearStatusCache, parameter[]] local_variable[type[WriteStreamOld], s] call[s.close, parameter[]] return[literal[true]] else begin[{] None end[}] END[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[createNewFile] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[synchronized] operator[SEP] identifier[LOCK] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[clearStatusCache] operator[SEP] operator[SEP] operator[SEP] identifier[WriteStreamOld] identifier[s] operator[=] identifier[openWrite] operator[SEP] operator[SEP] operator[SEP] identifier[s] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public TaskInner beginUpdate(String resourceGroupName, String registryName, String taskName, TaskUpdateParameters taskUpdateParameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, registryName, taskName, taskUpdateParameters).toBlocking().single().body(); }
class class_name[name] begin[{] method[beginUpdate, return_type[type[TaskInner]], modifier[public], parameter[resourceGroupName, registryName, taskName, taskUpdateParameters]] begin[{] return[call[.beginUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.registryName], member[.taskName], member[.taskUpdateParameters]]]] end[}] END[}]
Keyword[public] identifier[TaskInner] identifier[beginUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[registryName] , identifier[String] identifier[taskName] , identifier[TaskUpdateParameters] identifier[taskUpdateParameters] operator[SEP] { Keyword[return] identifier[beginUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[registryName] , identifier[taskName] , identifier[taskUpdateParameters] 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] }
static private ArrayStructure sectionArrayStructure(ParsedSectionSpec child, ArrayStructure innerData, StructureMembers.Member m) throws IOException, InvalidRangeException { StructureMembers membersw = new StructureMembers(m.getStructureMembers()); // no data arrays get propagated ArrayStructureW result = new ArrayStructureW(membersw, child.section.getShape()); int count = 0; Section.Iterator iter = child.section.getIterator(child.v.getShape()); while (iter.hasNext()) { int recno = iter.next(null); StructureData sd = innerData.getStructureData(recno); result.setStructureData(sd, count++); } return result; }
class class_name[name] begin[{] method[sectionArrayStructure, return_type[type[ArrayStructure]], modifier[private static], parameter[child, innerData, m]] begin[{] local_variable[type[StructureMembers], membersw] local_variable[type[ArrayStructureW], result] local_variable[type[int], count] local_variable[type[Section], iter] while[call[iter.hasNext, parameter[]]] begin[{] local_variable[type[int], recno] local_variable[type[StructureData], sd] call[result.setStructureData, parameter[member[.sd], member[.count]]] end[}] return[member[.result]] end[}] END[}]
Keyword[static] Keyword[private] identifier[ArrayStructure] identifier[sectionArrayStructure] operator[SEP] identifier[ParsedSectionSpec] identifier[child] , identifier[ArrayStructure] identifier[innerData] , identifier[StructureMembers] operator[SEP] identifier[Member] identifier[m] operator[SEP] Keyword[throws] identifier[IOException] , identifier[InvalidRangeException] { identifier[StructureMembers] identifier[membersw] operator[=] Keyword[new] identifier[StructureMembers] operator[SEP] identifier[m] operator[SEP] identifier[getStructureMembers] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayStructureW] identifier[result] operator[=] Keyword[new] identifier[ArrayStructureW] operator[SEP] identifier[membersw] , identifier[child] operator[SEP] identifier[section] operator[SEP] identifier[getShape] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] identifier[Section] operator[SEP] identifier[Iterator] identifier[iter] operator[=] identifier[child] operator[SEP] identifier[section] operator[SEP] identifier[getIterator] operator[SEP] identifier[child] operator[SEP] identifier[v] operator[SEP] identifier[getShape] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[recno] operator[=] identifier[iter] operator[SEP] identifier[next] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[StructureData] identifier[sd] operator[=] identifier[innerData] operator[SEP] identifier[getStructureData] operator[SEP] identifier[recno] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[setStructureData] operator[SEP] identifier[sd] , identifier[count] operator[++] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public WnsNotificationResponse pushToast(String channelUri, WnsToast toast) throws WnsException { return this.pushToast(channelUri, null, toast); }
class class_name[name] begin[{] method[pushToast, return_type[type[WnsNotificationResponse]], modifier[public], parameter[channelUri, toast]] begin[{] return[THIS[call[None.pushToast, parameter[member[.channelUri], literal[null], member[.toast]]]]] end[}] END[}]
Keyword[public] identifier[WnsNotificationResponse] identifier[pushToast] operator[SEP] identifier[String] identifier[channelUri] , identifier[WnsToast] identifier[toast] operator[SEP] Keyword[throws] identifier[WnsException] { Keyword[return] Keyword[this] operator[SEP] identifier[pushToast] operator[SEP] identifier[channelUri] , Other[null] , identifier[toast] operator[SEP] operator[SEP] }
public static void fail(boolean expression, String messageFormat, Object... args) { assertTrue(!expression, messageFormat, args); }
class class_name[name] begin[{] method[fail, return_type[void], modifier[public static], parameter[expression, messageFormat, args]] begin[{] call[.assertTrue, parameter[member[.expression], member[.messageFormat], member[.args]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[fail] operator[SEP] Keyword[boolean] identifier[expression] , identifier[String] identifier[messageFormat] , identifier[Object] operator[...] identifier[args] operator[SEP] { identifier[assertTrue] operator[SEP] operator[!] identifier[expression] , identifier[messageFormat] , identifier[args] operator[SEP] operator[SEP] }
public Optional<JobExecutionInfo> queryByJobId(String id) throws RemoteInvocationException { JobExecutionQuery query = new JobExecutionQuery(); query.setIdType(QueryIdTypeEnum.JOB_ID); query.setId(JobExecutionQuery.Id.create(id)); query.setLimit(1); List<JobExecutionInfo> results = executeQuery(query); return getFirstFromQueryResults(results); }
class class_name[name] begin[{] method[queryByJobId, return_type[type[Optional]], modifier[public], parameter[id]] begin[{] local_variable[type[JobExecutionQuery], query] call[query.setIdType, parameter[member[QueryIdTypeEnum.JOB_ID]]] call[query.setId, parameter[call[JobExecutionQuery.Id.create, parameter[member[.id]]]]] call[query.setLimit, parameter[literal[1]]] local_variable[type[List], results] return[call[.getFirstFromQueryResults, parameter[member[.results]]]] end[}] END[}]
Keyword[public] identifier[Optional] operator[<] identifier[JobExecutionInfo] operator[>] identifier[queryByJobId] operator[SEP] identifier[String] identifier[id] operator[SEP] Keyword[throws] identifier[RemoteInvocationException] { identifier[JobExecutionQuery] identifier[query] operator[=] Keyword[new] identifier[JobExecutionQuery] operator[SEP] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[setIdType] operator[SEP] identifier[QueryIdTypeEnum] operator[SEP] identifier[JOB_ID] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[setId] operator[SEP] identifier[JobExecutionQuery] operator[SEP] identifier[Id] operator[SEP] identifier[create] operator[SEP] identifier[id] operator[SEP] operator[SEP] operator[SEP] identifier[query] operator[SEP] identifier[setLimit] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[JobExecutionInfo] operator[>] identifier[results] operator[=] identifier[executeQuery] operator[SEP] identifier[query] operator[SEP] operator[SEP] Keyword[return] identifier[getFirstFromQueryResults] operator[SEP] identifier[results] operator[SEP] operator[SEP] }
protected boolean addDependencies(DependencyContainer container) { /* XXX: if (_classPath instanceof JarPath) { container.add(_depend); return false; } else */ if (_hasJNIReload) { container.add(this); return true; } else if (_sourcePath == null) { container.add(_depend); return false; } else { container.add(this); return true; } }
class class_name[name] begin[{] method[addDependencies, return_type[type[boolean]], modifier[protected], parameter[container]] begin[{] if[member[._hasJNIReload]] begin[{] call[container.add, parameter[THIS[]]] return[literal[true]] else begin[{] if[binary_operation[member[._sourcePath], ==, literal[null]]] begin[{] call[container.add, parameter[member[._depend]]] return[literal[false]] else begin[{] call[container.add, parameter[THIS[]]] return[literal[true]] end[}] end[}] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[addDependencies] operator[SEP] identifier[DependencyContainer] identifier[container] operator[SEP] { Keyword[if] operator[SEP] identifier[_hasJNIReload] operator[SEP] { identifier[container] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[_sourcePath] operator[==] Other[null] operator[SEP] { identifier[container] operator[SEP] identifier[add] operator[SEP] identifier[_depend] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { identifier[container] operator[SEP] identifier[add] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } }
public static <A> Will<A> forFuture(Future<A> future) { return new Of<A>(JdkFutureAdapters.listenInPoolThread(future)); }
class class_name[name] begin[{] method[forFuture, return_type[type[Will]], modifier[public static], parameter[future]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=future, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=listenInPoolThread, postfix_operators=[], prefix_operators=[], qualifier=JdkFutureAdapters, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=A, sub_type=None))], dimensions=None, name=Of, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[A] operator[>] identifier[Will] operator[<] identifier[A] operator[>] identifier[forFuture] operator[SEP] identifier[Future] operator[<] identifier[A] operator[>] identifier[future] operator[SEP] { Keyword[return] Keyword[new] identifier[Of] operator[<] identifier[A] operator[>] operator[SEP] identifier[JdkFutureAdapters] operator[SEP] identifier[listenInPoolThread] operator[SEP] identifier[future] operator[SEP] operator[SEP] operator[SEP] }
@Override public void setMonitorEnabled(boolean enabled) { if(enabled) { // create and start background monitor if (monitor == null) { monitor = new AdcGpioProviderBase.ADCMonitor(); monitor.start(); } } else{ try { // if a monitor is running, then shut it down now if (monitor != null) { // shutdown monitoring thread monitor.shutdown(); monitor = null; } } catch (Exception e) { throw new RuntimeException(e); } } }
class class_name[name] begin[{] method[setMonitorEnabled, return_type[void], modifier[public], parameter[enabled]] begin[{] if[member[.enabled]] begin[{] if[binary_operation[member[.monitor], ==, literal[null]]] begin[{] assign[member[.monitor], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AdcGpioProviderBase, sub_type=ReferenceType(arguments=None, dimensions=None, name=ADCMonitor, sub_type=None)))] call[monitor.start, parameter[]] else begin[{] None end[}] else begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=monitor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=shutdown, postfix_operators=[], prefix_operators=[], qualifier=monitor, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=monitor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setMonitorEnabled] operator[SEP] Keyword[boolean] identifier[enabled] operator[SEP] { Keyword[if] operator[SEP] identifier[enabled] operator[SEP] { Keyword[if] operator[SEP] identifier[monitor] operator[==] Other[null] operator[SEP] { identifier[monitor] operator[=] Keyword[new] identifier[AdcGpioProviderBase] operator[SEP] identifier[ADCMonitor] operator[SEP] operator[SEP] operator[SEP] identifier[monitor] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[try] { Keyword[if] operator[SEP] identifier[monitor] operator[!=] Other[null] operator[SEP] { identifier[monitor] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] identifier[monitor] operator[=] Other[null] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } }
public ArtifactoryDependenciesClient createArtifactoryDependenciesClient(String userName, String password, ProxyConfiguration proxyConfiguration, TaskListener listener) { ArtifactoryDependenciesClient client = new ArtifactoryDependenciesClient(url, userName, password, new JenkinsBuildInfoLog(listener)); client.setConnectionTimeout(timeout); setRetryParams(client); if (!bypassProxy && proxyConfiguration != null) { client.setProxyConfiguration(proxyConfiguration.host, proxyConfiguration.port, proxyConfiguration.username, proxyConfiguration.password); } return client; }
class class_name[name] begin[{] method[createArtifactoryDependenciesClient, return_type[type[ArtifactoryDependenciesClient]], modifier[public], parameter[userName, password, proxyConfiguration, listener]] begin[{] local_variable[type[ArtifactoryDependenciesClient], client] call[client.setConnectionTimeout, parameter[member[.timeout]]] call[.setRetryParams, parameter[member[.client]]] if[binary_operation[member[.bypassProxy], &&, binary_operation[member[.proxyConfiguration], !=, literal[null]]]] begin[{] call[client.setProxyConfiguration, parameter[member[proxyConfiguration.host], member[proxyConfiguration.port], member[proxyConfiguration.username], member[proxyConfiguration.password]]] else begin[{] None end[}] return[member[.client]] end[}] END[}]
Keyword[public] identifier[ArtifactoryDependenciesClient] identifier[createArtifactoryDependenciesClient] operator[SEP] identifier[String] identifier[userName] , identifier[String] identifier[password] , identifier[ProxyConfiguration] identifier[proxyConfiguration] , identifier[TaskListener] identifier[listener] operator[SEP] { identifier[ArtifactoryDependenciesClient] identifier[client] operator[=] Keyword[new] identifier[ArtifactoryDependenciesClient] operator[SEP] identifier[url] , identifier[userName] , identifier[password] , Keyword[new] identifier[JenkinsBuildInfoLog] operator[SEP] identifier[listener] operator[SEP] operator[SEP] operator[SEP] identifier[client] operator[SEP] identifier[setConnectionTimeout] operator[SEP] identifier[timeout] operator[SEP] operator[SEP] identifier[setRetryParams] operator[SEP] identifier[client] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[bypassProxy] operator[&&] identifier[proxyConfiguration] operator[!=] Other[null] operator[SEP] { identifier[client] operator[SEP] identifier[setProxyConfiguration] operator[SEP] identifier[proxyConfiguration] operator[SEP] identifier[host] , identifier[proxyConfiguration] operator[SEP] identifier[port] , identifier[proxyConfiguration] operator[SEP] identifier[username] , identifier[proxyConfiguration] operator[SEP] identifier[password] operator[SEP] operator[SEP] } Keyword[return] identifier[client] operator[SEP] }
public static int getStyleId(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes){ TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.ThemableView, defStyleAttr, defStyleRes); int styleId = a.getResourceId(R.styleable.ThemableView_v_styleId, 0); a.recycle(); return styleId; }
class class_name[name] begin[{] method[getStyleId, return_type[type[int]], modifier[public static], parameter[context, attrs, defStyleAttr, defStyleRes]] begin[{] local_variable[type[TypedArray], a] local_variable[type[int], styleId] call[a.recycle, parameter[]] return[member[.styleId]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[getStyleId] operator[SEP] identifier[Context] identifier[context] , identifier[AttributeSet] identifier[attrs] , Keyword[int] identifier[defStyleAttr] , Keyword[int] identifier[defStyleRes] operator[SEP] { identifier[TypedArray] identifier[a] operator[=] identifier[context] operator[SEP] identifier[obtainStyledAttributes] operator[SEP] identifier[attrs] , identifier[R] operator[SEP] identifier[styleable] operator[SEP] identifier[ThemableView] , identifier[defStyleAttr] , identifier[defStyleRes] operator[SEP] operator[SEP] Keyword[int] identifier[styleId] operator[=] identifier[a] operator[SEP] identifier[getResourceId] operator[SEP] identifier[R] operator[SEP] identifier[styleable] operator[SEP] identifier[ThemableView_v_styleId] , Other[0] operator[SEP] operator[SEP] identifier[a] operator[SEP] identifier[recycle] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[styleId] operator[SEP] }
public void removePositionUpdateListener(@NonNull PositionUpdateListener listener) { if (iteratingListeners) { listenersToRemove.add(listener); } else { listeners.remove(listener); } }
class class_name[name] begin[{] method[removePositionUpdateListener, return_type[void], modifier[public], parameter[listener]] begin[{] if[member[.iteratingListeners]] begin[{] call[listenersToRemove.add, parameter[member[.listener]]] else begin[{] call[listeners.remove, parameter[member[.listener]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[removePositionUpdateListener] operator[SEP] annotation[@] identifier[NonNull] identifier[PositionUpdateListener] identifier[listener] operator[SEP] { Keyword[if] operator[SEP] identifier[iteratingListeners] operator[SEP] { identifier[listenersToRemove] operator[SEP] identifier[add] operator[SEP] identifier[listener] operator[SEP] operator[SEP] } Keyword[else] { identifier[listeners] operator[SEP] identifier[remove] operator[SEP] identifier[listener] operator[SEP] operator[SEP] } }
@Nonnull public UserDetails loadUserByUsername(String idOrFullName) throws UsernameNotFoundException, DataAccessException, ExecutionException { Boolean exists = existenceCache.getIfPresent(idOrFullName); if(exists != null && !exists) { throw new UsernameNotFoundException(String.format("\"%s\" does not exist", idOrFullName)); } else { try { return detailsCache.get(idOrFullName, new Retriever(idOrFullName)); } catch (ExecutionException | UncheckedExecutionException e) { if (e.getCause() instanceof UsernameNotFoundException) { throw ((UsernameNotFoundException)e.getCause()); } else if (e.getCause() instanceof DataAccessException) { throw ((DataAccessException)e.getCause()); } else { throw e; } } } }
class class_name[name] begin[{] method[loadUserByUsername, return_type[type[UserDetails]], modifier[public], parameter[idOrFullName]] begin[{] local_variable[type[Boolean], exists] if[binary_operation[binary_operation[member[.exists], !=, literal[null]], &&, member[.exists]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\"%s\" does not exist"), MemberReference(member=idOrFullName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UsernameNotFoundException, sub_type=None)), label=None) else begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=idOrFullName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=idOrFullName, 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=Retriever, sub_type=None))], member=get, postfix_operators=[], prefix_operators=[], qualifier=detailsCache, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operandr=ReferenceType(arguments=None, dimensions=[], name=UsernameNotFoundException, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operandr=ReferenceType(arguments=None, dimensions=[], name=DataAccessException, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=Cast(expression=MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=DataAccessException, sub_type=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=Cast(expression=MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=UsernameNotFoundException, sub_type=None)), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ExecutionException', 'UncheckedExecutionException']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] identifier[UserDetails] identifier[loadUserByUsername] operator[SEP] identifier[String] identifier[idOrFullName] operator[SEP] Keyword[throws] identifier[UsernameNotFoundException] , identifier[DataAccessException] , identifier[ExecutionException] { identifier[Boolean] identifier[exists] operator[=] identifier[existenceCache] operator[SEP] identifier[getIfPresent] operator[SEP] identifier[idOrFullName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[exists] operator[!=] Other[null] operator[&&] operator[!] identifier[exists] operator[SEP] { Keyword[throw] Keyword[new] identifier[UsernameNotFoundException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[idOrFullName] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[try] { Keyword[return] identifier[detailsCache] operator[SEP] identifier[get] operator[SEP] identifier[idOrFullName] , Keyword[new] identifier[Retriever] operator[SEP] identifier[idOrFullName] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ExecutionException] operator[|] identifier[UncheckedExecutionException] identifier[e] operator[SEP] { Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] Keyword[instanceof] identifier[UsernameNotFoundException] operator[SEP] { Keyword[throw] operator[SEP] operator[SEP] identifier[UsernameNotFoundException] operator[SEP] identifier[e] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[e] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] Keyword[instanceof] identifier[DataAccessException] operator[SEP] { Keyword[throw] operator[SEP] operator[SEP] identifier[DataAccessException] operator[SEP] identifier[e] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] identifier[e] operator[SEP] } } } }
@SuppressWarnings("unchecked") public <S extends io.sarl.lang.core.Space> S getOrCreateSpaceWithSpec(SpaceID spaceID, Class<? extends SpaceSpecification<S>> spec, Object... creationParams) { synchronized (getSpaceRepositoryMutex()) { final Collection<SpaceID> ispaces = this.spacesBySpec.get(spec); final S firstSpace; if (ispaces == null || ispaces.isEmpty()) { firstSpace = createSpaceInstance(spec, spaceID, true, creationParams); } else { firstSpace = (S) this.spaces.get(ispaces.iterator().next()); } assert firstSpace != null; return firstSpace; } }
class class_name[name] begin[{] method[getOrCreateSpaceWithSpec, return_type[type[S]], modifier[public], parameter[spaceID, spec, creationParams]] begin[{] SYNCHRONIZED[call[.getSpaceRepositoryMutex, parameter[]]] BEGIN[{] local_variable[type[Collection], ispaces] local_variable[type[S], firstSpace] if[binary_operation[binary_operation[member[.ispaces], ==, literal[null]], ||, call[ispaces.isEmpty, parameter[]]]] begin[{] assign[member[.firstSpace], call[.createSpaceInstance, parameter[member[.spec], member[.spaceID], literal[true], member[.creationParams]]]] else begin[{] assign[member[.firstSpace], Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=spaces, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=ispaces, selectors=[MethodInvocation(arguments=[], member=next, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=S, sub_type=None))] end[}] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=firstSpace, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) return[member[.firstSpace]] END[}] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] operator[<] identifier[S] Keyword[extends] identifier[io] operator[SEP] identifier[sarl] operator[SEP] identifier[lang] operator[SEP] identifier[core] operator[SEP] identifier[Space] operator[>] identifier[S] identifier[getOrCreateSpaceWithSpec] operator[SEP] identifier[SpaceID] identifier[spaceID] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[SpaceSpecification] operator[<] identifier[S] operator[>] operator[>] identifier[spec] , identifier[Object] operator[...] identifier[creationParams] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[getSpaceRepositoryMutex] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[Collection] operator[<] identifier[SpaceID] operator[>] identifier[ispaces] operator[=] Keyword[this] operator[SEP] identifier[spacesBySpec] operator[SEP] identifier[get] operator[SEP] identifier[spec] operator[SEP] operator[SEP] Keyword[final] identifier[S] identifier[firstSpace] operator[SEP] Keyword[if] operator[SEP] identifier[ispaces] operator[==] Other[null] operator[||] identifier[ispaces] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[firstSpace] operator[=] identifier[createSpaceInstance] operator[SEP] identifier[spec] , identifier[spaceID] , literal[boolean] , identifier[creationParams] operator[SEP] operator[SEP] } Keyword[else] { identifier[firstSpace] operator[=] operator[SEP] identifier[S] operator[SEP] Keyword[this] operator[SEP] identifier[spaces] operator[SEP] identifier[get] operator[SEP] identifier[ispaces] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[assert] identifier[firstSpace] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[firstSpace] operator[SEP] } }
public HttpRequestBuilder addHeader(String name, String value) { if (value != null) { reqHeaders.put(name, value); } return this; }
class class_name[name] begin[{] method[addHeader, return_type[type[HttpRequestBuilder]], modifier[public], parameter[name, value]] begin[{] if[binary_operation[member[.value], !=, literal[null]]] begin[{] call[reqHeaders.put, parameter[member[.name], member[.value]]] else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[HttpRequestBuilder] identifier[addHeader] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[reqHeaders] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public java.lang.String getCoords() { return (java.lang.String) getStateHelper().eval(PropertyKeys.coords); }
class class_name[name] begin[{] method[getCoords, return_type[type[java]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[], member=getStateHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=coords, postfix_operators=[], prefix_operators=[], qualifier=PropertyKeys, selectors=[])], member=eval, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=lang, sub_type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))))] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[getCoords] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] identifier[getStateHelper] operator[SEP] operator[SEP] operator[SEP] identifier[eval] operator[SEP] identifier[PropertyKeys] operator[SEP] identifier[coords] operator[SEP] operator[SEP] }
public int compare(Vector3 o1, Vector3 o2) { int ans = 0; if (o1 != null && o2 != null) { Vector3 d1 = o1; Vector3 d2 = o2; if (d1.x > d2.x) return 1; if (d1.x < d2.x) return -1; // x1 == x2 if (d1.y > d2.y) return 1; if (d1.y < d2.y) return -1; } else { if (o1 == null && o2 == null) return 0; if (o1 == null && o2 != null) return 1; if (o1 != null && o2 == null) return -1; } return ans; }
class class_name[name] begin[{] method[compare, return_type[type[int]], modifier[public], parameter[o1, o2]] begin[{] local_variable[type[int], ans] if[binary_operation[binary_operation[member[.o1], !=, literal[null]], &&, binary_operation[member[.o2], !=, literal[null]]]] begin[{] local_variable[type[Vector3], d1] local_variable[type[Vector3], d2] if[binary_operation[member[d1.x], >, member[d2.x]]] begin[{] return[literal[1]] else begin[{] None end[}] if[binary_operation[member[d1.x], <, member[d2.x]]] begin[{] return[literal[1]] else begin[{] None end[}] if[binary_operation[member[d1.y], >, member[d2.y]]] begin[{] return[literal[1]] else begin[{] None end[}] if[binary_operation[member[d1.y], <, member[d2.y]]] begin[{] return[literal[1]] else begin[{] None end[}] else begin[{] if[binary_operation[binary_operation[member[.o1], ==, literal[null]], &&, binary_operation[member[.o2], ==, literal[null]]]] begin[{] return[literal[0]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.o1], ==, literal[null]], &&, binary_operation[member[.o2], !=, literal[null]]]] begin[{] return[literal[1]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.o1], !=, literal[null]], &&, binary_operation[member[.o2], ==, literal[null]]]] begin[{] return[literal[1]] else begin[{] None end[}] end[}] return[member[.ans]] end[}] END[}]
Keyword[public] Keyword[int] identifier[compare] operator[SEP] identifier[Vector3] identifier[o1] , identifier[Vector3] identifier[o2] operator[SEP] { Keyword[int] identifier[ans] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[o1] operator[!=] Other[null] operator[&&] identifier[o2] operator[!=] Other[null] operator[SEP] { identifier[Vector3] identifier[d1] operator[=] identifier[o1] operator[SEP] identifier[Vector3] identifier[d2] operator[=] identifier[o2] operator[SEP] Keyword[if] operator[SEP] identifier[d1] operator[SEP] identifier[x] operator[>] identifier[d2] operator[SEP] identifier[x] operator[SEP] Keyword[return] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[d1] operator[SEP] identifier[x] operator[<] identifier[d2] operator[SEP] identifier[x] operator[SEP] Keyword[return] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[d1] operator[SEP] identifier[y] operator[>] identifier[d2] operator[SEP] identifier[y] operator[SEP] Keyword[return] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[d1] operator[SEP] identifier[y] operator[<] identifier[d2] operator[SEP] identifier[y] operator[SEP] Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[o1] operator[==] Other[null] operator[&&] identifier[o2] operator[==] Other[null] operator[SEP] Keyword[return] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[o1] operator[==] Other[null] operator[&&] identifier[o2] operator[!=] Other[null] operator[SEP] Keyword[return] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[o1] operator[!=] Other[null] operator[&&] identifier[o2] operator[==] Other[null] operator[SEP] Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[return] identifier[ans] operator[SEP] }
private static final Object serializeFromProtobufEntity(Message protoBuf, Class<?> pojoClazz) throws JException { final ProtobufEntity protoBufEntity = ProtobufSerializerUtils.getProtobufEntity(pojoClazz); if (protoBufEntity == null) { return protoBuf; } return new ProtobufSerializer().fromProtobuf(protoBuf, pojoClazz); }
class class_name[name] begin[{] method[serializeFromProtobufEntity, return_type[type[Object]], modifier[final private static], parameter[protoBuf, pojoClazz]] begin[{] local_variable[type[ProtobufEntity], protoBufEntity] if[binary_operation[member[.protoBufEntity], ==, literal[null]]] begin[{] return[member[.protoBuf]] else begin[{] None end[}] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=protoBuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pojoClazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromProtobuf, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=ProtobufSerializer, sub_type=None))] end[}] END[}]
Keyword[private] Keyword[static] Keyword[final] identifier[Object] identifier[serializeFromProtobufEntity] operator[SEP] identifier[Message] identifier[protoBuf] , identifier[Class] operator[<] operator[?] operator[>] identifier[pojoClazz] operator[SEP] Keyword[throws] identifier[JException] { Keyword[final] identifier[ProtobufEntity] identifier[protoBufEntity] operator[=] identifier[ProtobufSerializerUtils] operator[SEP] identifier[getProtobufEntity] operator[SEP] identifier[pojoClazz] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[protoBufEntity] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[protoBuf] operator[SEP] } Keyword[return] Keyword[new] identifier[ProtobufSerializer] operator[SEP] operator[SEP] operator[SEP] identifier[fromProtobuf] operator[SEP] identifier[protoBuf] , identifier[pojoClazz] operator[SEP] operator[SEP] }
@Override public <V> V getMinimum(ChronoElement<V> element) { if (this.timestamp.contains(element)) { return this.timestamp.getMinimum(element); } else { return this.moment.getMinimum(element); } }
class class_name[name] begin[{] method[getMinimum, return_type[type[V]], modifier[public], parameter[element]] begin[{] if[THIS[member[None.timestamp]call[None.contains, parameter[member[.element]]]]] begin[{] return[THIS[member[None.timestamp]call[None.getMinimum, parameter[member[.element]]]]] else begin[{] return[THIS[member[None.moment]call[None.getMinimum, parameter[member[.element]]]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[V] operator[>] identifier[V] identifier[getMinimum] operator[SEP] identifier[ChronoElement] operator[<] identifier[V] operator[>] identifier[element] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[timestamp] operator[SEP] identifier[contains] operator[SEP] identifier[element] operator[SEP] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[timestamp] operator[SEP] identifier[getMinimum] operator[SEP] identifier[element] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Keyword[this] operator[SEP] identifier[moment] operator[SEP] identifier[getMinimum] operator[SEP] identifier[element] operator[SEP] operator[SEP] } }
public static <Q> Object getPropertyValue(Q bean, String propertyName) { return ObjectUtils.getPropertyValue(bean, propertyName, Object.class); }
class class_name[name] begin[{] method[getPropertyValue, return_type[type[Object]], modifier[public static], parameter[bean, propertyName]] begin[{] return[call[ObjectUtils.getPropertyValue, parameter[member[.bean], member[.propertyName], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[Q] operator[>] identifier[Object] identifier[getPropertyValue] operator[SEP] identifier[Q] identifier[bean] , identifier[String] identifier[propertyName] operator[SEP] { Keyword[return] identifier[ObjectUtils] operator[SEP] identifier[getPropertyValue] operator[SEP] identifier[bean] , identifier[propertyName] , identifier[Object] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public boolean containsReturnValue(ValueNumberFactory factory) { for (int i = 0; i + 1 < array.length; i += 2) { int valueNumber = array[i]; if (valueNumber < 0) { break; } int lockCount = array[i + 1]; if (lockCount > 0 && factory.forNumber(valueNumber).hasFlag(ValueNumber.RETURN_VALUE)) { return true; } } return false; }
class class_name[name] begin[{] method[containsReturnValue, return_type[type[boolean]], modifier[public], parameter[factory]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=valueNumber)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=valueNumber, 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=[BreakStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))]), name=lockCount)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=lockCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), operandr=MethodInvocation(arguments=[MemberReference(member=valueNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forNumber, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[MethodInvocation(arguments=[MemberReference(member=RETURN_VALUE, postfix_operators=[], prefix_operators=[], qualifier=ValueNumber, selectors=[])], member=hasFlag, 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=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), 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=1), operator=+), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=array, 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=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), label=None) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[containsReturnValue] operator[SEP] identifier[ValueNumberFactory] identifier[factory] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[+] Other[1] operator[<] identifier[array] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[+=] Other[2] operator[SEP] { Keyword[int] identifier[valueNumber] operator[=] identifier[array] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[valueNumber] operator[<] Other[0] operator[SEP] { Keyword[break] operator[SEP] } Keyword[int] identifier[lockCount] operator[=] identifier[array] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lockCount] operator[>] Other[0] operator[&&] identifier[factory] operator[SEP] identifier[forNumber] operator[SEP] identifier[valueNumber] operator[SEP] operator[SEP] identifier[hasFlag] operator[SEP] identifier[ValueNumber] operator[SEP] identifier[RETURN_VALUE] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public long getNumberOfQueuedMessages() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getNumberOfQueuedMessages"); long total = 0; try { total = referenceItemStream.getStatistics().getTotalItemCount(); } catch (MessageStoreException e) { FFDCFilter.processException( e, "com.ibm.ws.sib.processor.runtime.LocalSubscriptionControl.getNumberOfQueuedMessages", "1:422:1.36", this); SibTr.exception(tc, e); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getNumberOfQueuedMessages", new Long(total)); return total; }
class class_name[name] begin[{] method[getNumberOfQueuedMessages, return_type[type[long]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["getNumberOfQueuedMessages"]]] else begin[{] None end[}] local_variable[type[long], total] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=total, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getStatistics, postfix_operators=[], prefix_operators=[], qualifier=referenceItemStream, selectors=[MethodInvocation(arguments=[], member=getTotalItemCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.runtime.LocalSubscriptionControl.getNumberOfQueuedMessages"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:422:1.36"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MessageStoreException']))], finally_block=None, label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["getNumberOfQueuedMessages"], ClassCreator(arguments=[MemberReference(member=total, 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=Long, sub_type=None))]] else begin[{] None end[}] return[member[.total]] end[}] END[}]
Keyword[public] Keyword[long] identifier[getNumberOfQueuedMessages] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[long] identifier[total] operator[=] Other[0] operator[SEP] Keyword[try] { identifier[total] operator[=] identifier[referenceItemStream] operator[SEP] identifier[getStatistics] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalItemCount] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MessageStoreException] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] identifier[tc] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Long] operator[SEP] identifier[total] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[total] operator[SEP] }
@Override public ListAccountsResult listAccounts(ListAccountsRequest request) { request = beforeClientExecution(request); return executeListAccounts(request); }
class class_name[name] begin[{] method[listAccounts, return_type[type[ListAccountsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeListAccounts, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ListAccountsResult] identifier[listAccounts] operator[SEP] identifier[ListAccountsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeListAccounts] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public String parse(String argument) throws CommandLineException { File file = new File(argument); try { Assert.isTrue(file.exists(), "File '" + file + "' does not exist"); Assert.isFalse(file.isDirectory(), "File '" + file + "' is a directory"); Assert.isTrue(file.canRead(), "File '" + file + "' cannot be read"); } catch (IllegalArgumentException e) { throw new CommandLineException(e.getMessage()); } return file.getAbsolutePath(); }
class class_name[name] begin[{] method[parse, return_type[type[String]], modifier[public], parameter[argument]] begin[{] local_variable[type[File], file] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="File '"), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' does not exist"), operator=+)], member=isTrue, postfix_operators=[], prefix_operators=[], qualifier=Assert, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="File '"), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is a directory"), operator=+)], member=isFalse, postfix_operators=[], prefix_operators=[], qualifier=Assert, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=canRead, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="File '"), operandr=MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' cannot be read"), operator=+)], member=isTrue, postfix_operators=[], prefix_operators=[], qualifier=Assert, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommandLineException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalArgumentException']))], finally_block=None, label=None, resources=None) return[call[file.getAbsolutePath, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[parse] operator[SEP] identifier[String] identifier[argument] operator[SEP] Keyword[throws] identifier[CommandLineException] { identifier[File] identifier[file] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[argument] operator[SEP] operator[SEP] Keyword[try] { identifier[Assert] operator[SEP] identifier[isTrue] operator[SEP] identifier[file] operator[SEP] identifier[exists] operator[SEP] operator[SEP] , literal[String] operator[+] identifier[file] operator[+] literal[String] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[isFalse] operator[SEP] identifier[file] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] , literal[String] operator[+] identifier[file] operator[+] literal[String] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[isTrue] operator[SEP] identifier[file] operator[SEP] identifier[canRead] operator[SEP] operator[SEP] , literal[String] operator[+] identifier[file] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CommandLineException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[file] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[SEP] }
private String getCategoryTerm(String scheme) { List<Category> categories = entry.getCategories(scheme); if (categories.isEmpty()) { return null; } else { return categories.get(0).getTerm(); } }
class class_name[name] begin[{] method[getCategoryTerm, return_type[type[String]], modifier[private], parameter[scheme]] begin[{] local_variable[type[List], categories] if[call[categories.isEmpty, parameter[]]] begin[{] return[literal[null]] else begin[{] return[call[categories.get, parameter[literal[0]]]] end[}] end[}] END[}]
Keyword[private] identifier[String] identifier[getCategoryTerm] operator[SEP] identifier[String] identifier[scheme] operator[SEP] { identifier[List] operator[<] identifier[Category] operator[>] identifier[categories] operator[=] identifier[entry] operator[SEP] identifier[getCategories] operator[SEP] identifier[scheme] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[categories] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[else] { Keyword[return] identifier[categories] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getTerm] operator[SEP] operator[SEP] operator[SEP] } }
public SystemInputDefBuilder has( String name, Object value) { systemInputDef_.setAnnotation( name, Objects.toString( value, null)); return this; }
class class_name[name] begin[{] method[has, return_type[type[SystemInputDefBuilder]], modifier[public], parameter[name, value]] begin[{] call[systemInputDef_.setAnnotation, parameter[member[.name], call[Objects.toString, parameter[member[.value], literal[null]]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[SystemInputDefBuilder] identifier[has] operator[SEP] identifier[String] identifier[name] , identifier[Object] identifier[value] operator[SEP] { identifier[systemInputDef_] operator[SEP] identifier[setAnnotation] operator[SEP] identifier[name] , identifier[Objects] operator[SEP] identifier[toString] operator[SEP] identifier[value] , Other[null] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
protected int randomIntInWindow(int begin, int windowSize, int n, Set<Integer> excludeSet) { final int size = Math.min(windowSize, n); if (size <= 0) { return -1; } int adjustment = 0; for (Integer v: excludeSet) { int vindex = (v.intValue() - begin + n) % n; if (vindex < size) { adjustment++; // calculates excluded elements within window } } if (adjustment >= size) { return -1; } int rindex = r.nextInt(size - adjustment); // ith element is chosen int iterator = begin; for (int i = 0; i <= rindex; i++) { while (excludeSet.contains(iterator)) { iterator = (iterator + 1) % n; } if (i != rindex) { iterator = (iterator + 1) % n; } } return iterator; }
class class_name[name] begin[{] method[randomIntInWindow, return_type[type[int]], modifier[protected], parameter[begin, windowSize, n, excludeSet]] begin[{] local_variable[type[int], size] if[binary_operation[member[.size], <=, literal[0]]] begin[{] return[literal[1]] else begin[{] None end[}] local_variable[type[int], adjustment] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=intValue, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), operandr=MemberReference(member=begin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=%), name=vindex)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=vindex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=adjustment, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=excludeSet, 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=Integer, sub_type=None))), label=None) if[binary_operation[member[.adjustment], >=, member[.size]]] begin[{] return[literal[1]] else begin[{] None end[}] local_variable[type[int], rindex] local_variable[type[int], iterator] ForStatement(body=BlockStatement(label=None, statements=[WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=iterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=iterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=%)), label=None)]), condition=MethodInvocation(arguments=[MemberReference(member=iterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=excludeSet, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rindex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=iterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=iterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=%)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rindex, 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[member[.iterator]] end[}] END[}]
Keyword[protected] Keyword[int] identifier[randomIntInWindow] operator[SEP] Keyword[int] identifier[begin] , Keyword[int] identifier[windowSize] , Keyword[int] identifier[n] , identifier[Set] operator[<] identifier[Integer] operator[>] identifier[excludeSet] operator[SEP] { Keyword[final] Keyword[int] identifier[size] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[windowSize] , identifier[n] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[size] operator[<=] Other[0] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[int] identifier[adjustment] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Integer] identifier[v] operator[:] identifier[excludeSet] operator[SEP] { Keyword[int] identifier[vindex] operator[=] operator[SEP] identifier[v] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[-] identifier[begin] operator[+] identifier[n] operator[SEP] operator[%] identifier[n] operator[SEP] Keyword[if] operator[SEP] identifier[vindex] operator[<] identifier[size] operator[SEP] { identifier[adjustment] operator[++] operator[SEP] } } Keyword[if] operator[SEP] identifier[adjustment] operator[>=] identifier[size] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[int] identifier[rindex] operator[=] identifier[r] operator[SEP] identifier[nextInt] operator[SEP] identifier[size] operator[-] identifier[adjustment] operator[SEP] operator[SEP] Keyword[int] identifier[iterator] operator[=] identifier[begin] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<=] identifier[rindex] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[while] operator[SEP] identifier[excludeSet] operator[SEP] identifier[contains] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] { identifier[iterator] operator[=] operator[SEP] identifier[iterator] operator[+] Other[1] operator[SEP] operator[%] identifier[n] operator[SEP] } Keyword[if] operator[SEP] identifier[i] operator[!=] identifier[rindex] operator[SEP] { identifier[iterator] operator[=] operator[SEP] identifier[iterator] operator[+] Other[1] operator[SEP] operator[%] identifier[n] operator[SEP] } } Keyword[return] identifier[iterator] operator[SEP] }
public static String getAttrVal(final NamedNodeMap nnm, final String name) { Node nmAttr = nnm.getNamedItem(name); if ((nmAttr == null) || (absent(nmAttr.getNodeValue()))) { return null; } return nmAttr.getNodeValue(); }
class class_name[name] begin[{] method[getAttrVal, return_type[type[String]], modifier[public static], parameter[nnm, name]] begin[{] local_variable[type[Node], nmAttr] if[binary_operation[binary_operation[member[.nmAttr], ==, literal[null]], ||, call[.absent, parameter[call[nmAttr.getNodeValue, parameter[]]]]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[nmAttr.getNodeValue, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getAttrVal] operator[SEP] Keyword[final] identifier[NamedNodeMap] identifier[nnm] , Keyword[final] identifier[String] identifier[name] operator[SEP] { identifier[Node] identifier[nmAttr] operator[=] identifier[nnm] operator[SEP] identifier[getNamedItem] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[nmAttr] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[absent] operator[SEP] identifier[nmAttr] operator[SEP] identifier[getNodeValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[nmAttr] operator[SEP] identifier[getNodeValue] operator[SEP] operator[SEP] operator[SEP] }
public static double getDouble(Cursor cursor, String columnName) { if (cursor == null) { return -1; } return cursor.getDouble(cursor.getColumnIndex(columnName)); }
class class_name[name] begin[{] method[getDouble, return_type[type[double]], modifier[public static], parameter[cursor, columnName]] begin[{] if[binary_operation[member[.cursor], ==, literal[null]]] begin[{] return[literal[1]] else begin[{] None end[}] return[call[cursor.getDouble, parameter[call[cursor.getColumnIndex, parameter[member[.columnName]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[getDouble] operator[SEP] identifier[Cursor] identifier[cursor] , identifier[String] identifier[columnName] operator[SEP] { Keyword[if] operator[SEP] identifier[cursor] operator[==] Other[null] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[return] identifier[cursor] operator[SEP] identifier[getDouble] operator[SEP] identifier[cursor] operator[SEP] identifier[getColumnIndex] operator[SEP] identifier[columnName] operator[SEP] operator[SEP] operator[SEP] }
public boolean parseMoreData(final EncodedImage encodedImage) { if (mParserState == NOT_A_JPEG) { return false; } final int dataBufferSize = encodedImage.getSize(); // Is there any new data to parse? // mBytesParsed might be greater than size of dataBuffer - that happens when // we skip more data than is available to read inside doParseMoreData method if (dataBufferSize <= mBytesParsed) { return false; } final InputStream bufferedDataStream = new PooledByteArrayBufferedInputStream( encodedImage.getInputStream(), mByteArrayPool.get(BUFFER_SIZE), mByteArrayPool); try { StreamUtil.skip(bufferedDataStream, mBytesParsed); return doParseMoreData(bufferedDataStream); } catch (IOException ioe) { // Does not happen - streams returned by PooledByteBuffers do not throw IOExceptions Throwables.propagate(ioe); return false; } finally { Closeables.closeQuietly(bufferedDataStream); } }
class class_name[name] begin[{] method[parseMoreData, return_type[type[boolean]], modifier[public], parameter[encodedImage]] begin[{] if[binary_operation[member[.mParserState], ==, member[.NOT_A_JPEG]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[int], dataBufferSize] if[binary_operation[member[.dataBufferSize], <=, member[.mBytesParsed]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[InputStream], bufferedDataStream] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bufferedDataStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mBytesParsed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=skip, postfix_operators=[], prefix_operators=[], qualifier=StreamUtil, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=bufferedDataStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doParseMoreData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ioe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=propagate, postfix_operators=[], prefix_operators=[], qualifier=Throwables, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bufferedDataStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=Closeables, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[boolean] identifier[parseMoreData] operator[SEP] Keyword[final] identifier[EncodedImage] identifier[encodedImage] operator[SEP] { Keyword[if] operator[SEP] identifier[mParserState] operator[==] identifier[NOT_A_JPEG] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[final] Keyword[int] identifier[dataBufferSize] operator[=] identifier[encodedImage] operator[SEP] identifier[getSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dataBufferSize] operator[<=] identifier[mBytesParsed] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[final] identifier[InputStream] identifier[bufferedDataStream] operator[=] Keyword[new] identifier[PooledByteArrayBufferedInputStream] operator[SEP] identifier[encodedImage] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] , identifier[mByteArrayPool] operator[SEP] identifier[get] operator[SEP] identifier[BUFFER_SIZE] operator[SEP] , identifier[mByteArrayPool] operator[SEP] operator[SEP] Keyword[try] { identifier[StreamUtil] operator[SEP] identifier[skip] operator[SEP] identifier[bufferedDataStream] , identifier[mBytesParsed] operator[SEP] operator[SEP] Keyword[return] identifier[doParseMoreData] operator[SEP] identifier[bufferedDataStream] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { identifier[Throwables] operator[SEP] identifier[propagate] operator[SEP] identifier[ioe] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[finally] { identifier[Closeables] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[bufferedDataStream] operator[SEP] operator[SEP] } }
@SuppressWarnings("unchecked") public BaseBo setAttributes(JsonNode attrs) { if (attrs == null || attrs instanceof NullNode || attrs instanceof MissingNode) { return setAttributes((Map<String, Object>) null); } if (attrs instanceof ObjectNode) { return setAttributes(SerializationUtils.fromJson(attrs, Map.class)); } throw new IllegalArgumentException( "Argument must be of type NullNode, MissingNode or ObjectNode"); }
class class_name[name] begin[{] method[setAttributes, return_type[type[BaseBo]], modifier[public], parameter[attrs]] begin[{] if[binary_operation[binary_operation[binary_operation[member[.attrs], ==, literal[null]], ||, binary_operation[member[.attrs], instanceof, type[NullNode]]], ||, binary_operation[member[.attrs], instanceof, type[MissingNode]]]] begin[{] return[call[.setAttributes, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None))]]] else begin[{] None end[}] if[binary_operation[member[.attrs], instanceof, type[ObjectNode]]] begin[{] return[call[.setAttributes, parameter[call[SerializationUtils.fromJson, parameter[member[.attrs], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Map, sub_type=None))]]]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Argument must be of type NullNode, MissingNode or ObjectNode")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[BaseBo] identifier[setAttributes] operator[SEP] identifier[JsonNode] identifier[attrs] operator[SEP] { Keyword[if] operator[SEP] identifier[attrs] operator[==] Other[null] operator[||] identifier[attrs] Keyword[instanceof] identifier[NullNode] operator[||] identifier[attrs] Keyword[instanceof] identifier[MissingNode] operator[SEP] { Keyword[return] identifier[setAttributes] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] Other[null] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[attrs] Keyword[instanceof] identifier[ObjectNode] operator[SEP] { Keyword[return] identifier[setAttributes] operator[SEP] identifier[SerializationUtils] operator[SEP] identifier[fromJson] operator[SEP] identifier[attrs] , identifier[Map] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public static String getFromMimeType (String mimeType, Supplier<String> notFound) { mimeType = mimeType.toLowerCase (); return mimeTypeRemappings.containsKey (mimeType) ? mimeTypeRemappings.get (mimeType) : notFound.get (); }
class class_name[name] begin[{] method[getFromMimeType, return_type[type[String]], modifier[public static], parameter[mimeType, notFound]] begin[{] assign[member[.mimeType], call[mimeType.toLowerCase, parameter[]]] return[TernaryExpression(condition=MethodInvocation(arguments=[MemberReference(member=mimeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=mimeTypeRemappings, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=notFound, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MemberReference(member=mimeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=mimeTypeRemappings, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getFromMimeType] operator[SEP] identifier[String] identifier[mimeType] , identifier[Supplier] operator[<] identifier[String] operator[>] identifier[notFound] operator[SEP] { identifier[mimeType] operator[=] identifier[mimeType] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[mimeTypeRemappings] operator[SEP] identifier[containsKey] operator[SEP] identifier[mimeType] operator[SEP] operator[?] identifier[mimeTypeRemappings] operator[SEP] identifier[get] operator[SEP] identifier[mimeType] operator[SEP] operator[:] identifier[notFound] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] }
public Object getProperty(final String iName) { return properties.get(iName.toLowerCase(Locale.ENGLISH)); }
class class_name[name] begin[{] method[getProperty, return_type[type[Object]], modifier[public], parameter[iName]] begin[{] return[call[properties.get, parameter[call[iName.toLowerCase, parameter[member[Locale.ENGLISH]]]]]] end[}] END[}]
Keyword[public] identifier[Object] identifier[getProperty] operator[SEP] Keyword[final] identifier[String] identifier[iName] operator[SEP] { Keyword[return] identifier[properties] operator[SEP] identifier[get] operator[SEP] identifier[iName] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[ENGLISH] operator[SEP] operator[SEP] operator[SEP] }
public static void deactivateApp(Context context, String applicationId) { if (context == null || applicationId == null) { throw new IllegalArgumentException("Both context and applicationId must be non-null"); } resetSourceApplication(); final AppEventsLogger logger = new AppEventsLogger(context, applicationId, null); final long eventTime = System.currentTimeMillis(); backgroundExecutor.execute(new Runnable() { @Override public void run() { logger.logAppSessionSuspendEvent(eventTime); } }); }
class class_name[name] begin[{] method[deactivateApp, return_type[void], modifier[public static], parameter[context, applicationId]] begin[{] if[binary_operation[binary_operation[member[.context], ==, literal[null]], ||, binary_operation[member[.applicationId], ==, literal[null]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Both context and applicationId must be non-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[}] call[.resetSourceApplication, parameter[]] local_variable[type[AppEventsLogger], logger] local_variable[type[long], eventTime] call[backgroundExecutor.execute, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=eventTime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logAppSessionSuspendEvent, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[deactivateApp] operator[SEP] identifier[Context] identifier[context] , identifier[String] identifier[applicationId] operator[SEP] { Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[||] identifier[applicationId] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[resetSourceApplication] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[AppEventsLogger] identifier[logger] operator[=] Keyword[new] identifier[AppEventsLogger] operator[SEP] identifier[context] , identifier[applicationId] , Other[null] operator[SEP] operator[SEP] Keyword[final] Keyword[long] identifier[eventTime] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[backgroundExecutor] operator[SEP] identifier[execute] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[logAppSessionSuspendEvent] operator[SEP] identifier[eventTime] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public List<TablePrivilege> getTablePrivileges(final String catalog, final String schemaPattern, final String tableNamePattern) throws SQLException { final List<TablePrivilege> list = new ArrayList<>(); try (ResultSet results = databaseMetadata.getTablePrivileges(catalog, schemaPattern, tableNamePattern)) { if (results != null) { bind(results, TablePrivilege.class, list); } } return list; }
class class_name[name] begin[{] method[getTablePrivileges, return_type[type[List]], modifier[public], parameter[catalog, schemaPattern, tableNamePattern]] begin[{] local_variable[type[List], list] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=results, 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=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TablePrivilege, sub_type=None)), MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=bind, postfix_operators=[], prefix_operators=[], qualifier=, 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=[MemberReference(member=catalog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=schemaPattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tableNamePattern, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTablePrivileges, postfix_operators=[], prefix_operators=[], qualifier=databaseMetadata, selectors=[], type_arguments=None))]) return[member[.list]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[TablePrivilege] operator[>] identifier[getTablePrivileges] operator[SEP] Keyword[final] identifier[String] identifier[catalog] , Keyword[final] identifier[String] identifier[schemaPattern] , Keyword[final] identifier[String] identifier[tableNamePattern] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[final] identifier[List] operator[<] identifier[TablePrivilege] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[ResultSet] identifier[results] operator[=] identifier[databaseMetadata] operator[SEP] identifier[getTablePrivileges] operator[SEP] identifier[catalog] , identifier[schemaPattern] , identifier[tableNamePattern] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[results] operator[!=] Other[null] operator[SEP] { identifier[bind] operator[SEP] identifier[results] , identifier[TablePrivilege] operator[SEP] Keyword[class] , identifier[list] operator[SEP] operator[SEP] } } Keyword[return] identifier[list] operator[SEP] }
public static GenericColor valueOf(String color) { Objects.requireNonNull(color, "color"); Color namedColor = Color.fromName(color); if (namedColor != null) { return valueOf(namedColor); } int length = color.length(); Throwable cause = null; try { // "#RRGGBB" / #AARRGGBB Color hexColor = Color.parseHexString(color); if (hexColor != null) { return valueOf(hexColor); } // "rgb(1,1,1)" = 10 if (length >= 7) { String model = BasicHelper.toUpperCase(color.substring(0, 3)); ColorModel colorModel = ColorModel.valueOf(model); int index = 3; boolean hasAlpha = false; char c = Character.toLowerCase(color.charAt(index)); if (c == 'a') { hasAlpha = true; index++; c = color.charAt(index); } if (c == '(') { index++; int endIndex = color.indexOf(',', index); if (endIndex > 0) { String firstSegment = color.substring(index, endIndex).trim(); index = endIndex + 1; endIndex = color.indexOf(',', index); if (endIndex > 0) { String secondSegment = color.substring(index, endIndex).trim(); index = endIndex + 1; if (hasAlpha) { endIndex = color.indexOf(',', index); } else { endIndex = length - 1; } if (endIndex > 0) { String thirdSegment = color.substring(index, endIndex).trim(); Alpha alpha; if (hasAlpha) { alpha = new Alpha(color.substring(endIndex + 1, length - 1)); } else { alpha = Alpha.OPAQUE; } switch (colorModel) { case RGB: return valueOf(new Red(firstSegment), new Green(secondSegment), new Blue(thirdSegment), alpha); case HSL: return valueOf(new Hue(firstSegment), new Saturation(secondSegment), new Lightness(thirdSegment), alpha); case HSV: case HSB: return valueOf(new Hue(firstSegment), new Saturation(secondSegment), new Brightness(thirdSegment), alpha); default : throw new IllegalStateException("" + colorModel); } } } } } } } catch (RuntimeException e) { cause = e; } throw new IllegalArgumentException(color, cause); }
class class_name[name] begin[{] method[valueOf, return_type[type[GenericColor]], modifier[public static], parameter[color]] begin[{] call[Objects.requireNonNull, parameter[member[.color], literal["color"]]] local_variable[type[Color], namedColor] if[binary_operation[member[.namedColor], !=, literal[null]]] begin[{] return[call[.valueOf, parameter[member[.namedColor]]]] else begin[{] None end[}] local_variable[type[int], length] local_variable[type[Throwable], cause] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=color, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseHexString, postfix_operators=[], prefix_operators=[], qualifier=Color, selectors=[], type_arguments=None), name=hexColor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Color, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=hexColor, 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=MethodInvocation(arguments=[MemberReference(member=hexColor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=7), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[], type_arguments=None)], member=toUpperCase, postfix_operators=[], prefix_operators=[], qualifier=BasicHelper, selectors=[], type_arguments=None), name=model)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=model, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=ColorModel, selectors=[], type_arguments=None), name=colorModel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ColorModel, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=hasAlpha)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[], type_arguments=None)], member=toLowerCase, postfix_operators=[], prefix_operators=[], qualifier=Character, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='a'), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=hasAlpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='('), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=','), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[], type_arguments=None), name=endIndex)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=endIndex, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=firstSegment)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=endIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=endIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=','), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=endIndex, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=secondSegment)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=endIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None), IfStatement(condition=MemberReference(member=hasAlpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=endIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=length, 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=endIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=','), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=endIndex, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=thirdSegment)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=alpha)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Alpha, sub_type=None)), IfStatement(condition=MemberReference(member=hasAlpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=OPAQUE, postfix_operators=[], prefix_operators=[], qualifier=Alpha, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=endIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=color, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Alpha, sub_type=None))), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=['RGB'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=firstSegment, 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=Red, sub_type=None)), ClassCreator(arguments=[MemberReference(member=secondSegment, 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=Green, sub_type=None)), ClassCreator(arguments=[MemberReference(member=thirdSegment, 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=Blue, sub_type=None)), MemberReference(member=alpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['HSL'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=firstSegment, 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=Hue, sub_type=None)), ClassCreator(arguments=[MemberReference(member=secondSegment, 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=Saturation, sub_type=None)), ClassCreator(arguments=[MemberReference(member=thirdSegment, 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=Lightness, sub_type=None)), MemberReference(member=alpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['HSV', 'HSB'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=firstSegment, 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=Hue, sub_type=None)), ClassCreator(arguments=[MemberReference(member=secondSegment, 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=Saturation, sub_type=None)), ClassCreator(arguments=[MemberReference(member=thirdSegment, 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=Brightness, sub_type=None)), MemberReference(member=alpha, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), operandr=MemberReference(member=colorModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)])], expression=MemberReference(member=colorModel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))]))]))]))], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=cause, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RuntimeException']))], finally_block=None, label=None, resources=None) ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=color, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cause, 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=IllegalArgumentException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[GenericColor] identifier[valueOf] operator[SEP] identifier[String] identifier[color] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[color] , literal[String] operator[SEP] operator[SEP] identifier[Color] identifier[namedColor] operator[=] identifier[Color] operator[SEP] identifier[fromName] operator[SEP] identifier[color] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[namedColor] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[valueOf] operator[SEP] identifier[namedColor] operator[SEP] operator[SEP] } Keyword[int] identifier[length] operator[=] identifier[color] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[Throwable] identifier[cause] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[Color] identifier[hexColor] operator[=] identifier[Color] operator[SEP] identifier[parseHexString] operator[SEP] identifier[color] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[hexColor] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[valueOf] operator[SEP] identifier[hexColor] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[length] operator[>=] Other[7] operator[SEP] { identifier[String] identifier[model] operator[=] identifier[BasicHelper] operator[SEP] identifier[toUpperCase] operator[SEP] identifier[color] operator[SEP] identifier[substring] operator[SEP] Other[0] , Other[3] operator[SEP] operator[SEP] operator[SEP] identifier[ColorModel] identifier[colorModel] operator[=] identifier[ColorModel] operator[SEP] identifier[valueOf] operator[SEP] identifier[model] operator[SEP] operator[SEP] Keyword[int] identifier[index] operator[=] Other[3] operator[SEP] Keyword[boolean] identifier[hasAlpha] operator[=] literal[boolean] operator[SEP] Keyword[char] identifier[c] operator[=] identifier[Character] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[color] operator[SEP] identifier[charAt] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[hasAlpha] operator[=] literal[boolean] operator[SEP] identifier[index] operator[++] operator[SEP] identifier[c] operator[=] identifier[color] operator[SEP] identifier[charAt] operator[SEP] identifier[index] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { identifier[index] operator[++] operator[SEP] Keyword[int] identifier[endIndex] operator[=] identifier[color] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[endIndex] operator[>] Other[0] operator[SEP] { identifier[String] identifier[firstSegment] operator[=] identifier[color] operator[SEP] identifier[substring] operator[SEP] identifier[index] , identifier[endIndex] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[index] operator[=] identifier[endIndex] operator[+] Other[1] operator[SEP] identifier[endIndex] operator[=] identifier[color] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[endIndex] operator[>] Other[0] operator[SEP] { identifier[String] identifier[secondSegment] operator[=] identifier[color] operator[SEP] identifier[substring] operator[SEP] identifier[index] , identifier[endIndex] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[index] operator[=] identifier[endIndex] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[hasAlpha] operator[SEP] { identifier[endIndex] operator[=] identifier[color] operator[SEP] identifier[indexOf] operator[SEP] literal[String] , identifier[index] operator[SEP] operator[SEP] } Keyword[else] { identifier[endIndex] operator[=] identifier[length] operator[-] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[endIndex] operator[>] Other[0] operator[SEP] { identifier[String] identifier[thirdSegment] operator[=] identifier[color] operator[SEP] identifier[substring] operator[SEP] identifier[index] , identifier[endIndex] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[Alpha] identifier[alpha] operator[SEP] Keyword[if] operator[SEP] identifier[hasAlpha] operator[SEP] { identifier[alpha] operator[=] Keyword[new] identifier[Alpha] operator[SEP] identifier[color] operator[SEP] identifier[substring] operator[SEP] identifier[endIndex] operator[+] Other[1] , identifier[length] operator[-] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[alpha] operator[=] identifier[Alpha] operator[SEP] identifier[OPAQUE] operator[SEP] } Keyword[switch] operator[SEP] identifier[colorModel] operator[SEP] { Keyword[case] identifier[RGB] operator[:] Keyword[return] identifier[valueOf] operator[SEP] Keyword[new] identifier[Red] operator[SEP] identifier[firstSegment] operator[SEP] , Keyword[new] identifier[Green] operator[SEP] identifier[secondSegment] operator[SEP] , Keyword[new] identifier[Blue] operator[SEP] identifier[thirdSegment] operator[SEP] , identifier[alpha] operator[SEP] operator[SEP] Keyword[case] identifier[HSL] operator[:] Keyword[return] identifier[valueOf] operator[SEP] Keyword[new] identifier[Hue] operator[SEP] identifier[firstSegment] operator[SEP] , Keyword[new] identifier[Saturation] operator[SEP] identifier[secondSegment] operator[SEP] , Keyword[new] identifier[Lightness] operator[SEP] identifier[thirdSegment] operator[SEP] , identifier[alpha] operator[SEP] operator[SEP] Keyword[case] identifier[HSV] operator[:] Keyword[case] identifier[HSB] operator[:] Keyword[return] identifier[valueOf] operator[SEP] Keyword[new] identifier[Hue] operator[SEP] identifier[firstSegment] operator[SEP] , Keyword[new] identifier[Saturation] operator[SEP] identifier[secondSegment] operator[SEP] , Keyword[new] identifier[Brightness] operator[SEP] identifier[thirdSegment] operator[SEP] , identifier[alpha] operator[SEP] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[colorModel] operator[SEP] operator[SEP] } } } } } } } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[e] operator[SEP] { identifier[cause] operator[=] identifier[e] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[color] , identifier[cause] operator[SEP] operator[SEP] }
public void applyQTran( DMatrixRBlock B ) { int minDimen = Math.min(dataA.numCols,dataA.numRows); DSubmatrixD1 subB = new DSubmatrixD1(B); W.col0 = W.row0 = 0; Y.row1 = W.row1 = dataA.numRows; WTA.row0 = WTA.col0 = 0; // (Q3^T * (Q2^T * (Q1^t * A))) for( int i = 0; i < minDimen; i += blockLength ) { Y.col0 = i; Y.col1 = Math.min(Y.col0+blockLength,dataA.numCols); Y.row0 = i; subB.row0 = i; // subB.row1 = B.numRows; // subB.col0 = 0; // subB.col1 = B.numCols; setW(); // W.original.reshape(W.row1,W.col1,false); WTA.row0 = 0; WTA.col0 = 0; WTA.row1 = W.col1-W.col0; WTA.col1 = subB.col1-subB.col0; WTA.original.reshape(WTA.row1,WTA.col1,false); // Compute W matrix from reflectors stored in Y if( !saveW ) BlockHouseHolder_DDRB.computeW_Column(blockLength,Y,W,temp, gammas,Y.col0); // Apply the Qi to Q MatrixMult_DDRB.multTransA(blockLength,W,subB,WTA); BlockHouseHolder_DDRB.multAdd_zeros(blockLength,Y,WTA,subB); } }
class class_name[name] begin[{] method[applyQTran, return_type[void], modifier[public], parameter[B]] begin[{] local_variable[type[int], minDimen] local_variable[type[DSubmatrixD1], subB] assign[member[W.col0], assign[member[W.row0], literal[0]]] assign[member[Y.row1], assign[member[W.row1], member[dataA.numRows]]] assign[member[WTA.row0], assign[member[WTA.col0], literal[0]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=col0, postfix_operators=[], prefix_operators=[], qualifier=Y, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=col1, postfix_operators=[], prefix_operators=[], qualifier=Y, selectors=[]), type==, value=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=col0, postfix_operators=[], prefix_operators=[], qualifier=Y, selectors=[]), operandr=MemberReference(member=blockLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=numCols, postfix_operators=[], prefix_operators=[], qualifier=dataA, selectors=[])], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=row0, postfix_operators=[], prefix_operators=[], qualifier=Y, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=row0, postfix_operators=[], prefix_operators=[], qualifier=subB, selectors=[]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=setW, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=row0, postfix_operators=[], prefix_operators=[], qualifier=WTA, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=col0, postfix_operators=[], prefix_operators=[], qualifier=WTA, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=row1, postfix_operators=[], prefix_operators=[], qualifier=WTA, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=col1, postfix_operators=[], prefix_operators=[], qualifier=W, selectors=[]), operandr=MemberReference(member=col0, postfix_operators=[], prefix_operators=[], qualifier=W, selectors=[]), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=col1, postfix_operators=[], prefix_operators=[], qualifier=WTA, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=col1, postfix_operators=[], prefix_operators=[], qualifier=subB, selectors=[]), operandr=MemberReference(member=col0, postfix_operators=[], prefix_operators=[], qualifier=subB, selectors=[]), operator=-)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=row1, postfix_operators=[], prefix_operators=[], qualifier=WTA, selectors=[]), MemberReference(member=col1, postfix_operators=[], prefix_operators=[], qualifier=WTA, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=reshape, postfix_operators=[], prefix_operators=[], qualifier=WTA.original, selectors=[], type_arguments=None), label=None), IfStatement(condition=MemberReference(member=saveW, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=blockLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=Y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=W, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=gammas, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=col0, postfix_operators=[], prefix_operators=[], qualifier=Y, selectors=[])], member=computeW_Column, postfix_operators=[], prefix_operators=[], qualifier=BlockHouseHolder_DDRB, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=blockLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=W, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=subB, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=WTA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=multTransA, postfix_operators=[], prefix_operators=[], qualifier=MatrixMult_DDRB, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=blockLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=Y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=WTA, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=subB, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=multAdd_zeros, postfix_operators=[], prefix_operators=[], qualifier=BlockHouseHolder_DDRB, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=minDimen, 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=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=blockLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[applyQTran] operator[SEP] identifier[DMatrixRBlock] identifier[B] operator[SEP] { Keyword[int] identifier[minDimen] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[dataA] operator[SEP] identifier[numCols] , identifier[dataA] operator[SEP] identifier[numRows] operator[SEP] operator[SEP] identifier[DSubmatrixD1] identifier[subB] operator[=] Keyword[new] identifier[DSubmatrixD1] operator[SEP] identifier[B] operator[SEP] operator[SEP] identifier[W] operator[SEP] identifier[col0] operator[=] identifier[W] operator[SEP] identifier[row0] operator[=] Other[0] operator[SEP] identifier[Y] operator[SEP] identifier[row1] operator[=] identifier[W] operator[SEP] identifier[row1] operator[=] identifier[dataA] operator[SEP] identifier[numRows] operator[SEP] identifier[WTA] operator[SEP] identifier[row0] operator[=] identifier[WTA] operator[SEP] identifier[col0] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[minDimen] operator[SEP] identifier[i] operator[+=] identifier[blockLength] operator[SEP] { identifier[Y] operator[SEP] identifier[col0] operator[=] identifier[i] operator[SEP] identifier[Y] operator[SEP] identifier[col1] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[Y] operator[SEP] identifier[col0] operator[+] identifier[blockLength] , identifier[dataA] operator[SEP] identifier[numCols] operator[SEP] operator[SEP] identifier[Y] operator[SEP] identifier[row0] operator[=] identifier[i] operator[SEP] identifier[subB] operator[SEP] identifier[row0] operator[=] identifier[i] operator[SEP] identifier[setW] operator[SEP] operator[SEP] operator[SEP] identifier[WTA] operator[SEP] identifier[row0] operator[=] Other[0] operator[SEP] identifier[WTA] operator[SEP] identifier[col0] operator[=] Other[0] operator[SEP] identifier[WTA] operator[SEP] identifier[row1] operator[=] identifier[W] operator[SEP] identifier[col1] operator[-] identifier[W] operator[SEP] identifier[col0] operator[SEP] identifier[WTA] operator[SEP] identifier[col1] operator[=] identifier[subB] operator[SEP] identifier[col1] operator[-] identifier[subB] operator[SEP] identifier[col0] operator[SEP] identifier[WTA] operator[SEP] identifier[original] operator[SEP] identifier[reshape] operator[SEP] identifier[WTA] operator[SEP] identifier[row1] , identifier[WTA] operator[SEP] identifier[col1] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[saveW] operator[SEP] identifier[BlockHouseHolder_DDRB] operator[SEP] identifier[computeW_Column] operator[SEP] identifier[blockLength] , identifier[Y] , identifier[W] , identifier[temp] , identifier[gammas] , identifier[Y] operator[SEP] identifier[col0] operator[SEP] operator[SEP] identifier[MatrixMult_DDRB] operator[SEP] identifier[multTransA] operator[SEP] identifier[blockLength] , identifier[W] , identifier[subB] , identifier[WTA] operator[SEP] operator[SEP] identifier[BlockHouseHolder_DDRB] operator[SEP] identifier[multAdd_zeros] operator[SEP] identifier[blockLength] , identifier[Y] , identifier[WTA] , identifier[subB] operator[SEP] operator[SEP] } }
public static void run(ProcessBuilder builder, Writer output, Writer error) { try { Process process = builder.start(); consume(process, output, error); int result = process.waitFor(); if (result != 0) { String msg = "process %s exited with value %d"; throw new ProcessException(String.format(msg, builder.command(), result)); } } catch (InterruptedException e) { throw new ProcessException(e); } catch (IOException e) { throw new ProcessException(e); } }
class class_name[name] begin[{] method[run, return_type[void], modifier[public static], parameter[builder, output, error]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=start, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), name=process)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Process, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=process, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=consume, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=waitFor, postfix_operators=[], prefix_operators=[], qualifier=process, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=result, 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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="process %s exited with value %d"), name=msg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=msg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=command, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProcessException, sub_type=None)), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProcessException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProcessException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[run] operator[SEP] identifier[ProcessBuilder] identifier[builder] , identifier[Writer] identifier[output] , identifier[Writer] identifier[error] operator[SEP] { Keyword[try] { identifier[Process] identifier[process] operator[=] identifier[builder] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] identifier[consume] operator[SEP] identifier[process] , identifier[output] , identifier[error] operator[SEP] operator[SEP] Keyword[int] identifier[result] operator[=] identifier[process] operator[SEP] identifier[waitFor] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[0] operator[SEP] { identifier[String] identifier[msg] operator[=] literal[String] operator[SEP] Keyword[throw] Keyword[new] identifier[ProcessException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] identifier[msg] , identifier[builder] operator[SEP] identifier[command] operator[SEP] operator[SEP] , identifier[result] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProcessException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProcessException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
@Override public void clearCache(CPDefinitionOptionRel cpDefinitionOptionRel) { entityCache.removeResult(CPDefinitionOptionRelModelImpl.ENTITY_CACHE_ENABLED, CPDefinitionOptionRelImpl.class, cpDefinitionOptionRel.getPrimaryKey()); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION); finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION); clearUniqueFindersCache((CPDefinitionOptionRelModelImpl)cpDefinitionOptionRel, true); }
class class_name[name] begin[{] method[clearCache, return_type[void], modifier[public], parameter[cpDefinitionOptionRel]] begin[{] call[entityCache.removeResult, parameter[member[CPDefinitionOptionRelModelImpl.ENTITY_CACHE_ENABLED], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CPDefinitionOptionRelImpl, sub_type=None)), call[cpDefinitionOptionRel.getPrimaryKey, parameter[]]]] call[finderCache.clearCache, parameter[member[.FINDER_CLASS_NAME_LIST_WITH_PAGINATION]]] call[finderCache.clearCache, parameter[member[.FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION]]] call[.clearUniqueFindersCache, parameter[Cast(expression=MemberReference(member=cpDefinitionOptionRel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CPDefinitionOptionRelModelImpl, sub_type=None)), literal[true]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[clearCache] operator[SEP] identifier[CPDefinitionOptionRel] identifier[cpDefinitionOptionRel] operator[SEP] { identifier[entityCache] operator[SEP] identifier[removeResult] operator[SEP] identifier[CPDefinitionOptionRelModelImpl] operator[SEP] identifier[ENTITY_CACHE_ENABLED] , identifier[CPDefinitionOptionRelImpl] operator[SEP] Keyword[class] , identifier[cpDefinitionOptionRel] operator[SEP] identifier[getPrimaryKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[finderCache] operator[SEP] identifier[clearCache] operator[SEP] identifier[FINDER_CLASS_NAME_LIST_WITH_PAGINATION] operator[SEP] operator[SEP] identifier[finderCache] operator[SEP] identifier[clearCache] operator[SEP] identifier[FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION] operator[SEP] operator[SEP] identifier[clearUniqueFindersCache] operator[SEP] operator[SEP] identifier[CPDefinitionOptionRelModelImpl] operator[SEP] identifier[cpDefinitionOptionRel] , literal[boolean] operator[SEP] operator[SEP] }
public void unsetDirty(final Object iPojo) { if (iPojo == null) return; final ODocument record = getRecordByUserObject(iPojo, false); if (record == null) return; ORecordInternal.unsetDirty(record); }
class class_name[name] begin[{] method[unsetDirty, return_type[void], modifier[public], parameter[iPojo]] begin[{] if[binary_operation[member[.iPojo], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[ODocument], record] if[binary_operation[member[.record], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[ORecordInternal.unsetDirty, parameter[member[.record]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[unsetDirty] operator[SEP] Keyword[final] identifier[Object] identifier[iPojo] operator[SEP] { Keyword[if] operator[SEP] identifier[iPojo] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] Keyword[final] identifier[ODocument] identifier[record] operator[=] identifier[getRecordByUserObject] operator[SEP] identifier[iPojo] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[record] operator[==] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[ORecordInternal] operator[SEP] identifier[unsetDirty] operator[SEP] identifier[record] operator[SEP] operator[SEP] }
@TargetApi(Build.VERSION_CODES.FROYO) @Nullable public static CharSequence[] optCharSequenceArray(@Nullable Bundle bundle, @Nullable String key) { return optCharSequenceArray(bundle, key, new CharSequence[0]); }
class class_name[name] begin[{] method[optCharSequenceArray, return_type[type[CharSequence]], modifier[public static], parameter[bundle, key]] begin[{] return[call[.optCharSequenceArray, parameter[member[.bundle], member[.key], ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CharSequence, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[FROYO] operator[SEP] annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[CharSequence] operator[SEP] operator[SEP] identifier[optCharSequenceArray] operator[SEP] annotation[@] identifier[Nullable] identifier[Bundle] identifier[bundle] , annotation[@] identifier[Nullable] identifier[String] identifier[key] operator[SEP] { Keyword[return] identifier[optCharSequenceArray] operator[SEP] identifier[bundle] , identifier[key] , Keyword[new] identifier[CharSequence] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] }
public Observable<Page<AgreementTermsInner>> listAsync() { return listWithServiceResponseAsync().map(new Func1<ServiceResponse<List<AgreementTermsInner>>, Page<AgreementTermsInner>>() { @Override public Page<AgreementTermsInner> call(ServiceResponse<List<AgreementTermsInner>> response) { PageImpl<AgreementTermsInner> page = new PageImpl<>(); page.setItems(response.body()); return page; } }); }
class class_name[name] begin[{] method[listAsync, return_type[type[Observable]], modifier[public], parameter[]] begin[{] return[call[.listWithServiceResponseAsync, parameter[]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[AgreementTermsInner] operator[>] operator[>] identifier[listAsync] operator[SEP] operator[SEP] { Keyword[return] identifier[listWithServiceResponseAsync] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[AgreementTermsInner] operator[>] operator[>] , identifier[Page] operator[<] identifier[AgreementTermsInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[AgreementTermsInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[AgreementTermsInner] operator[>] operator[>] identifier[response] operator[SEP] { identifier[PageImpl] operator[<] identifier[AgreementTermsInner] operator[>] identifier[page] operator[=] Keyword[new] identifier[PageImpl] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[page] operator[SEP] identifier[setItems] operator[SEP] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[page] operator[SEP] } } operator[SEP] operator[SEP] }
final boolean isForeignSecuredProxy() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) { SibTr.entry(tc, "isForeignSecuredProxy"); SibTr.exit(tc, "isForeignSecuredProxy", new Boolean(_foreignSecuredProxy)); } return _foreignSecuredProxy; }
class class_name[name] begin[{] method[isForeignSecuredProxy, return_type[type[boolean]], modifier[final], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["isForeignSecuredProxy"]]] call[SibTr.exit, parameter[member[.tc], literal["isForeignSecuredProxy"], ClassCreator(arguments=[MemberReference(member=_foreignSecuredProxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Boolean, sub_type=None))]] else begin[{] None end[}] return[member[._foreignSecuredProxy]] end[}] END[}]
Keyword[final] Keyword[boolean] identifier[isForeignSecuredProxy] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Boolean] operator[SEP] identifier[_foreignSecuredProxy] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[_foreignSecuredProxy] operator[SEP] }
@Override public void setRequestHeader(Header header) { Header[] headers = getRequestHeaderGroup().getHeaders(header.getName()); for (int i = 0; i < headers.length; i++) { getRequestHeaderGroup().removeHeader(headers[i]); } getRequestHeaderGroup().addHeader(header); }
class class_name[name] begin[{] method[setRequestHeader, return_type[void], modifier[public], parameter[header]] begin[{] local_variable[type[Header], headers] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getRequestHeaderGroup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=headers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=removeHeader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=headers, 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) call[.getRequestHeaderGroup, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setRequestHeader] operator[SEP] identifier[Header] identifier[header] operator[SEP] { identifier[Header] operator[SEP] operator[SEP] identifier[headers] operator[=] identifier[getRequestHeaderGroup] operator[SEP] operator[SEP] operator[SEP] identifier[getHeaders] operator[SEP] identifier[header] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[headers] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[getRequestHeaderGroup] operator[SEP] operator[SEP] operator[SEP] identifier[removeHeader] operator[SEP] identifier[headers] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[getRequestHeaderGroup] operator[SEP] operator[SEP] operator[SEP] identifier[addHeader] operator[SEP] identifier[header] operator[SEP] operator[SEP] }
public boolean isOnline() { LOG.debug("Checking online status for {} at {}", getName(), getURL()); try { return client .execute(new HttpHead(toURI(getURL()))) .getStatusLine() .getStatusCode() != 404; } catch (Exception e) { return false; } }
class class_name[name] begin[{] method[isOnline, return_type[type[boolean]], modifier[public], parameter[]] begin[{] call[LOG.debug, parameter[literal["Checking online status for {} at {}"], call[.getName, parameter[]], call[.getURL, parameter[]]]] TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getURL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=toURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HttpHead, sub_type=None))], member=execute, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[MethodInvocation(arguments=[], member=getStatusLine, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getStatusCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=404), operator=!=), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isOnline] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[getName] operator[SEP] operator[SEP] , identifier[getURL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[client] operator[SEP] identifier[execute] operator[SEP] Keyword[new] identifier[HttpHead] operator[SEP] identifier[toURI] operator[SEP] identifier[getURL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getStatusLine] operator[SEP] operator[SEP] operator[SEP] identifier[getStatusCode] operator[SEP] operator[SEP] operator[!=] Other[404] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } }
public Collection getAllUploadFile(HttpServletRequest request) { Collection uploadList = null; try { HttpSession session = request.getSession(); if (session != null) { uploadList = (Collection) session.getAttribute(PIC_NAME_PACKAGE); } } catch (Exception ex) { Debug.logError("[JdonFramework] not found the upload files in session" + ex, module); } return uploadList; }
class class_name[name] begin[{] method[getAllUploadFile, return_type[type[Collection]], modifier[public], parameter[request]] begin[{] local_variable[type[Collection], uploadList] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSession, postfix_operators=[], prefix_operators=[], qualifier=request, selectors=[], type_arguments=None), name=session)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HttpSession, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=uploadList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=PIC_NAME_PACKAGE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=session, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Collection, sub_type=None))), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="[JdonFramework] not found the upload files in session"), operandr=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=module, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logError, postfix_operators=[], prefix_operators=[], qualifier=Debug, 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) return[member[.uploadList]] end[}] END[}]
Keyword[public] identifier[Collection] identifier[getAllUploadFile] operator[SEP] identifier[HttpServletRequest] identifier[request] operator[SEP] { identifier[Collection] identifier[uploadList] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[HttpSession] identifier[session] operator[=] identifier[request] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[session] operator[!=] Other[null] operator[SEP] { identifier[uploadList] operator[=] operator[SEP] identifier[Collection] operator[SEP] identifier[session] operator[SEP] identifier[getAttribute] operator[SEP] identifier[PIC_NAME_PACKAGE] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[Debug] operator[SEP] identifier[logError] operator[SEP] literal[String] operator[+] identifier[ex] , identifier[module] operator[SEP] operator[SEP] } Keyword[return] identifier[uploadList] operator[SEP] }
public int readLine(final byte[] array, final int off, final int len, final EnumSet<LineTerminator> terminators) throws IOException { ByteArrays.ensureOffsetLength(array ,off, len); if (len == 0) return 0; // 0-length reads always return 0 if (noMoreCharacters()) return -1; int i, k = 0, remaining = len, read = 0; // The number of bytes still to be read for(;;) { for(i = 0; i < avail && i < remaining && (k = buffer[pos + i]) != '\n' && k != '\r' ; i++); System.arraycopy(buffer, pos, array, off + read, i); pos += i; avail -= i; read += i; remaining -= i; if (remaining == 0) { readBytes += read; return read; // We did not stop because of a terminator } if (avail > 0) { // We met a terminator if (k == '\n') { // LF first pos++; avail--; if (terminators.contains(LineTerminator.LF)) { readBytes += read + 1; return read; } else { array[off + read++] = '\n'; remaining--; } } else if (k == '\r') { // CR first pos++; avail--; if (terminators.contains(LineTerminator.CR_LF)) { if (avail > 0) { if (buffer[pos] == '\n') { // CR/LF with LF already in the buffer. pos ++; avail--; readBytes += read + 2; return read; } } else { // We must search for the LF. if (noMoreCharacters()) { // Not found a matching LF because of end of file, will return CR in buffer if not a terminator if (! terminators.contains(LineTerminator.CR)) { array[off + read++] = '\r'; remaining--; readBytes += read; } else readBytes += read + 1; return read; } if (buffer[0] == '\n') { // Found matching LF, won't return terminators in the buffer pos++; avail--; readBytes += read + 2; return read; } } } if (terminators.contains(LineTerminator.CR)) { readBytes += read + 1; return read; } array[off + read++] = '\r'; remaining--; } } else if (noMoreCharacters()) { readBytes += read; return read; } } }
class class_name[name] begin[{] method[readLine, return_type[type[int]], modifier[public], parameter[array, off, len, terminators]] begin[{] call[ByteArrays.ensureOffsetLength, parameter[member[.array], member[.off], member[.len]]] if[binary_operation[member[.len], ==, literal[0]]] begin[{] return[literal[0]] else begin[{] None end[}] if[call[.noMoreCharacters, parameter[]]] begin[{] return[literal[1]] else begin[{] None end[}] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=Statement(label=None), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=avail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=remaining, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), operandr=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))])), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n'), operator=!=), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r'), operator=!=), operator=&&), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=avail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=remaining, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=remaining, 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=readBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), ReturnStatement(expression=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=avail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=noMoreCharacters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=readBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), ReturnStatement(expression=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n'), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r'), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=pos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=avail, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=CR_LF, postfix_operators=[], prefix_operators=[], qualifier=LineTerminator, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=terminators, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=avail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=noMoreCharacters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=CR, postfix_operators=[], prefix_operators=[], qualifier=LineTerminator, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=terminators, selectors=[], type_arguments=None), else_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=readBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=read, 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=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=read, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r')), label=None), StatementExpression(expression=MemberReference(member=remaining, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=readBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), ReturnStatement(expression=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n'), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=pos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=avail, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=readBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+)), label=None), ReturnStatement(expression=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n'), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=pos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=avail, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=readBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=+)), label=None), ReturnStatement(expression=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=CR, postfix_operators=[], prefix_operators=[], qualifier=LineTerminator, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=terminators, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=readBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None), ReturnStatement(expression=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=read, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\r')), label=None), StatementExpression(expression=MemberReference(member=remaining, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=pos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MemberReference(member=avail, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=LF, postfix_operators=[], prefix_operators=[], qualifier=LineTerminator, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=terminators, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=read, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\n')), label=None), StatementExpression(expression=MemberReference(member=remaining, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=readBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None), ReturnStatement(expression=MemberReference(member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))]))]), control=ForControl(condition=None, init=None, update=None), label=None) end[}] END[}]
Keyword[public] Keyword[int] identifier[readLine] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[array] , Keyword[final] Keyword[int] identifier[off] , Keyword[final] Keyword[int] identifier[len] , Keyword[final] identifier[EnumSet] operator[<] identifier[LineTerminator] operator[>] identifier[terminators] operator[SEP] Keyword[throws] identifier[IOException] { identifier[ByteArrays] operator[SEP] identifier[ensureOffsetLength] operator[SEP] identifier[array] , identifier[off] , identifier[len] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[len] operator[==] Other[0] operator[SEP] Keyword[return] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[noMoreCharacters] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[-] Other[1] operator[SEP] Keyword[int] identifier[i] , identifier[k] operator[=] Other[0] , identifier[remaining] operator[=] identifier[len] , identifier[read] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[avail] operator[&&] identifier[i] operator[<] identifier[remaining] operator[&&] operator[SEP] identifier[k] operator[=] identifier[buffer] operator[SEP] identifier[pos] operator[+] identifier[i] operator[SEP] operator[SEP] operator[!=] literal[String] operator[&&] identifier[k] operator[!=] literal[String] operator[SEP] identifier[i] operator[++] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[buffer] , identifier[pos] , identifier[array] , identifier[off] operator[+] identifier[read] , identifier[i] operator[SEP] operator[SEP] identifier[pos] operator[+=] identifier[i] operator[SEP] identifier[avail] operator[-=] identifier[i] operator[SEP] identifier[read] operator[+=] identifier[i] operator[SEP] identifier[remaining] operator[-=] identifier[i] operator[SEP] Keyword[if] operator[SEP] identifier[remaining] operator[==] Other[0] operator[SEP] { identifier[readBytes] operator[+=] identifier[read] operator[SEP] Keyword[return] identifier[read] operator[SEP] } Keyword[if] operator[SEP] identifier[avail] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[k] operator[==] literal[String] operator[SEP] { identifier[pos] operator[++] operator[SEP] identifier[avail] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[terminators] operator[SEP] identifier[contains] operator[SEP] identifier[LineTerminator] operator[SEP] identifier[LF] operator[SEP] operator[SEP] { identifier[readBytes] operator[+=] identifier[read] operator[+] Other[1] operator[SEP] Keyword[return] identifier[read] operator[SEP] } Keyword[else] { identifier[array] operator[SEP] identifier[off] operator[+] identifier[read] operator[++] operator[SEP] operator[=] literal[String] operator[SEP] identifier[remaining] operator[--] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[k] operator[==] literal[String] operator[SEP] { identifier[pos] operator[++] operator[SEP] identifier[avail] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[terminators] operator[SEP] identifier[contains] operator[SEP] identifier[LineTerminator] operator[SEP] identifier[CR_LF] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[avail] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[buffer] operator[SEP] identifier[pos] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[pos] operator[++] operator[SEP] identifier[avail] operator[--] operator[SEP] identifier[readBytes] operator[+=] identifier[read] operator[+] Other[2] operator[SEP] Keyword[return] identifier[read] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[noMoreCharacters] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[terminators] operator[SEP] identifier[contains] operator[SEP] identifier[LineTerminator] operator[SEP] identifier[CR] operator[SEP] operator[SEP] { identifier[array] operator[SEP] identifier[off] operator[+] identifier[read] operator[++] operator[SEP] operator[=] literal[String] operator[SEP] identifier[remaining] operator[--] operator[SEP] identifier[readBytes] operator[+=] identifier[read] operator[SEP] } Keyword[else] identifier[readBytes] operator[+=] identifier[read] operator[+] Other[1] operator[SEP] Keyword[return] identifier[read] operator[SEP] } Keyword[if] operator[SEP] identifier[buffer] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[pos] operator[++] operator[SEP] identifier[avail] operator[--] operator[SEP] identifier[readBytes] operator[+=] identifier[read] operator[+] Other[2] operator[SEP] Keyword[return] identifier[read] operator[SEP] } } } Keyword[if] operator[SEP] identifier[terminators] operator[SEP] identifier[contains] operator[SEP] identifier[LineTerminator] operator[SEP] identifier[CR] operator[SEP] operator[SEP] { identifier[readBytes] operator[+=] identifier[read] operator[+] Other[1] operator[SEP] Keyword[return] identifier[read] operator[SEP] } identifier[array] operator[SEP] identifier[off] operator[+] identifier[read] operator[++] operator[SEP] operator[=] literal[String] operator[SEP] identifier[remaining] operator[--] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[noMoreCharacters] operator[SEP] operator[SEP] operator[SEP] { identifier[readBytes] operator[+=] identifier[read] operator[SEP] Keyword[return] identifier[read] operator[SEP] } } }
public NetworkInterfaceInner getVirtualMachineScaleSetNetworkInterface(String resourceGroupName, String virtualMachineScaleSetName, String virtualmachineIndex, String networkInterfaceName, String expand) { return getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync(resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand).toBlocking().single().body(); }
class class_name[name] begin[{] method[getVirtualMachineScaleSetNetworkInterface, return_type[type[NetworkInterfaceInner]], modifier[public], parameter[resourceGroupName, virtualMachineScaleSetName, virtualmachineIndex, networkInterfaceName, expand]] begin[{] return[call[.getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.virtualMachineScaleSetName], member[.virtualmachineIndex], member[.networkInterfaceName], member[.expand]]]] end[}] END[}]
Keyword[public] identifier[NetworkInterfaceInner] identifier[getVirtualMachineScaleSetNetworkInterface] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[virtualMachineScaleSetName] , identifier[String] identifier[virtualmachineIndex] , identifier[String] identifier[networkInterfaceName] , identifier[String] identifier[expand] operator[SEP] { Keyword[return] identifier[getVirtualMachineScaleSetNetworkInterfaceWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[virtualMachineScaleSetName] , identifier[virtualmachineIndex] , identifier[networkInterfaceName] , identifier[expand] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public static authenticationradiuspolicy_systemglobal_binding[] get(nitro_service service, String name) throws Exception{ authenticationradiuspolicy_systemglobal_binding obj = new authenticationradiuspolicy_systemglobal_binding(); obj.set_name(name); authenticationradiuspolicy_systemglobal_binding response[] = (authenticationradiuspolicy_systemglobal_binding[]) obj.get_resources(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[authenticationradiuspolicy_systemglobal_binding]], modifier[public static], parameter[service, name]] begin[{] local_variable[type[authenticationradiuspolicy_systemglobal_binding], obj] call[obj.set_name, parameter[member[.name]]] local_variable[type[authenticationradiuspolicy_systemglobal_binding], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[authenticationradiuspolicy_systemglobal_binding] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[Exception] { identifier[authenticationradiuspolicy_systemglobal_binding] identifier[obj] operator[=] Keyword[new] identifier[authenticationradiuspolicy_systemglobal_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[set_name] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[authenticationradiuspolicy_systemglobal_binding] identifier[response] operator[SEP] operator[SEP] operator[=] operator[SEP] identifier[authenticationradiuspolicy_systemglobal_binding] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[get_resources] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public void createStreamFailed(String scope, String streamName) { DYNAMIC_LOGGER.incCounterValue(globalMetricName(CREATE_STREAM_FAILED), 1); DYNAMIC_LOGGER.incCounterValue(CREATE_STREAM_FAILED, 1, streamTags(scope, streamName)); }
class class_name[name] begin[{] method[createStreamFailed, return_type[void], modifier[public], parameter[scope, streamName]] begin[{] call[DYNAMIC_LOGGER.incCounterValue, parameter[call[.globalMetricName, parameter[member[.CREATE_STREAM_FAILED]]], literal[1]]] call[DYNAMIC_LOGGER.incCounterValue, parameter[member[.CREATE_STREAM_FAILED], literal[1], call[.streamTags, parameter[member[.scope], member[.streamName]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[createStreamFailed] operator[SEP] identifier[String] identifier[scope] , identifier[String] identifier[streamName] operator[SEP] { identifier[DYNAMIC_LOGGER] operator[SEP] identifier[incCounterValue] operator[SEP] identifier[globalMetricName] operator[SEP] identifier[CREATE_STREAM_FAILED] operator[SEP] , Other[1] operator[SEP] operator[SEP] identifier[DYNAMIC_LOGGER] operator[SEP] identifier[incCounterValue] operator[SEP] identifier[CREATE_STREAM_FAILED] , Other[1] , identifier[streamTags] operator[SEP] identifier[scope] , identifier[streamName] operator[SEP] operator[SEP] operator[SEP] }
private int importTables(Referenceable databaseReferenceable, String databaseName, final boolean failOnError) throws Exception { int tablesImported = 0; List<String> hiveTables = hiveClient.getAllTables(databaseName); LOG.info("Importing tables {} for db {}", hiveTables.toString(), databaseName); for (String tableName : hiveTables) { int imported = importTable(databaseReferenceable, databaseName, tableName, failOnError); tablesImported += imported; } if (tablesImported == hiveTables.size()) { LOG.info("Successfully imported all {} tables from {} ", tablesImported, databaseName); } else { LOG.error("Able to import {} tables out of {} tables from {}. Please check logs for import errors", tablesImported, hiveTables.size(), databaseName); } return tablesImported; }
class class_name[name] begin[{] method[importTables, return_type[type[int]], modifier[private], parameter[databaseReferenceable, databaseName, failOnError]] begin[{] local_variable[type[int], tablesImported] local_variable[type[List], hiveTables] call[LOG.info, parameter[literal["Importing tables {} for db {}"], call[hiveTables.toString, parameter[]], member[.databaseName]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=databaseReferenceable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=databaseName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=failOnError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=importTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=imported)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=tablesImported, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=imported, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=hiveTables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=tableName)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) if[binary_operation[member[.tablesImported], ==, call[hiveTables.size, parameter[]]]] begin[{] call[LOG.info, parameter[literal["Successfully imported all {} tables from {} "], member[.tablesImported], member[.databaseName]]] else begin[{] call[LOG.error, parameter[literal["Able to import {} tables out of {} tables from {}. Please check logs for import errors"], member[.tablesImported], call[hiveTables.size, parameter[]], member[.databaseName]]] end[}] return[member[.tablesImported]] end[}] END[}]
Keyword[private] Keyword[int] identifier[importTables] operator[SEP] identifier[Referenceable] identifier[databaseReferenceable] , identifier[String] identifier[databaseName] , Keyword[final] Keyword[boolean] identifier[failOnError] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[int] identifier[tablesImported] operator[=] Other[0] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[hiveTables] operator[=] identifier[hiveClient] operator[SEP] identifier[getAllTables] operator[SEP] identifier[databaseName] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[hiveTables] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[databaseName] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[tableName] operator[:] identifier[hiveTables] operator[SEP] { Keyword[int] identifier[imported] operator[=] identifier[importTable] operator[SEP] identifier[databaseReferenceable] , identifier[databaseName] , identifier[tableName] , identifier[failOnError] operator[SEP] operator[SEP] identifier[tablesImported] operator[+=] identifier[imported] operator[SEP] } Keyword[if] operator[SEP] identifier[tablesImported] operator[==] identifier[hiveTables] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[tablesImported] , identifier[databaseName] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[tablesImported] , identifier[hiveTables] operator[SEP] identifier[size] operator[SEP] operator[SEP] , identifier[databaseName] operator[SEP] operator[SEP] } Keyword[return] identifier[tablesImported] operator[SEP] }
protected void createConsumer(ConsumerConnectionContext context, String messageSelector) throws JMSException { if (context == null) { throw new IllegalStateException("The context is null"); } Session session = context.getSession(); if (session == null) { throw new IllegalStateException("The context had a null session"); } Destination dest = context.getDestination(); if (dest == null) { throw new IllegalStateException("The context had a null destination"); } MessageConsumer consumer = session.createConsumer(dest, messageSelector); context.setMessageConsumer(consumer); }
class class_name[name] begin[{] method[createConsumer, return_type[void], modifier[protected], parameter[context, messageSelector]] begin[{] if[binary_operation[member[.context], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The context is null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Session], session] if[binary_operation[member[.session], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The context had a null session")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Destination], dest] if[binary_operation[member[.dest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The context had a null destination")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[MessageConsumer], consumer] call[context.setMessageConsumer, parameter[member[.consumer]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[createConsumer] operator[SEP] identifier[ConsumerConnectionContext] identifier[context] , identifier[String] identifier[messageSelector] operator[SEP] Keyword[throws] identifier[JMSException] { Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Session] identifier[session] operator[=] identifier[context] operator[SEP] identifier[getSession] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[session] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Destination] identifier[dest] operator[=] identifier[context] operator[SEP] identifier[getDestination] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[MessageConsumer] identifier[consumer] operator[=] identifier[session] operator[SEP] identifier[createConsumer] operator[SEP] identifier[dest] , identifier[messageSelector] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[setMessageConsumer] operator[SEP] identifier[consumer] operator[SEP] operator[SEP] }
public void addAttribute(Attribute attribute, Object value, int beginIndex, int endIndex) { if (attribute == null) { throw new NullPointerException(); } if (beginIndex < 0 || endIndex > length() || beginIndex >= endIndex) { throw new IllegalArgumentException("Invalid substring range"); } addAttributeImpl(attribute, value, beginIndex, endIndex); }
class class_name[name] begin[{] method[addAttribute, return_type[void], modifier[public], parameter[attribute, value, beginIndex, endIndex]] begin[{] if[binary_operation[member[.attribute], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[member[.beginIndex], <, literal[0]], ||, binary_operation[member[.endIndex], >, call[.length, parameter[]]]], ||, binary_operation[member[.beginIndex], >=, member[.endIndex]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid substring range")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[.addAttributeImpl, parameter[member[.attribute], member[.value], member[.beginIndex], member[.endIndex]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addAttribute] operator[SEP] identifier[Attribute] identifier[attribute] , identifier[Object] identifier[value] , Keyword[int] identifier[beginIndex] , Keyword[int] identifier[endIndex] operator[SEP] { Keyword[if] operator[SEP] identifier[attribute] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[beginIndex] operator[<] Other[0] operator[||] identifier[endIndex] operator[>] identifier[length] operator[SEP] operator[SEP] operator[||] identifier[beginIndex] operator[>=] identifier[endIndex] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[addAttributeImpl] operator[SEP] identifier[attribute] , identifier[value] , identifier[beginIndex] , identifier[endIndex] operator[SEP] operator[SEP] }
public final Trace warn(Class<?> c, String message) { return _trace.warn(c, message); }
class class_name[name] begin[{] method[warn, return_type[type[Trace]], modifier[final public], parameter[c, message]] begin[{] return[call[_trace.warn, parameter[member[.c], member[.message]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Trace] identifier[warn] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[c] , identifier[String] identifier[message] operator[SEP] { Keyword[return] identifier[_trace] operator[SEP] identifier[warn] operator[SEP] identifier[c] , identifier[message] operator[SEP] operator[SEP] }
public static <R> Mono<R> zip(Function<? super Object[], ? extends R> combinator, Mono<?>... monos) { if (monos.length == 0) { return empty(); } if (monos.length == 1) { return monos[0].map(d -> combinator.apply(new Object[]{d})); } return onAssembly(new MonoZip<>(false, combinator, monos)); }
class class_name[name] begin[{] method[zip, return_type[type[Mono]], modifier[public static], parameter[combinator, monos]] begin[{] if[binary_operation[member[monos.length], ==, literal[0]]] begin[{] return[call[.empty, parameter[]]] else begin[{] None end[}] if[binary_operation[member[monos.length], ==, literal[1]]] begin[{] return[member[.monos]] else begin[{] None end[}] return[call[.onAssembly, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=combinator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=monos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=MonoZip, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[Mono] operator[<] identifier[R] operator[>] identifier[zip] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[Object] operator[SEP] operator[SEP] , operator[?] Keyword[extends] identifier[R] operator[>] identifier[combinator] , identifier[Mono] operator[<] operator[?] operator[>] operator[...] identifier[monos] operator[SEP] { Keyword[if] operator[SEP] identifier[monos] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[empty] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[monos] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] { Keyword[return] identifier[monos] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[d] operator[->] identifier[combinator] operator[SEP] identifier[apply] operator[SEP] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[d] } operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[onAssembly] operator[SEP] Keyword[new] identifier[MonoZip] operator[<] operator[>] operator[SEP] literal[boolean] , identifier[combinator] , identifier[monos] operator[SEP] operator[SEP] operator[SEP] }
protected void invokeDelegate( RenderFilter delegate, RenderRequest request, RenderResponse response, FilterChain filterChain) throws PortletException, IOException { delegate.doFilter(request, response, filterChain); }
class class_name[name] begin[{] method[invokeDelegate, return_type[void], modifier[protected], parameter[delegate, request, response, filterChain]] begin[{] call[delegate.doFilter, parameter[member[.request], member[.response], member[.filterChain]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[invokeDelegate] operator[SEP] identifier[RenderFilter] identifier[delegate] , identifier[RenderRequest] identifier[request] , identifier[RenderResponse] identifier[response] , identifier[FilterChain] identifier[filterChain] operator[SEP] Keyword[throws] identifier[PortletException] , identifier[IOException] { identifier[delegate] operator[SEP] identifier[doFilter] operator[SEP] identifier[request] , identifier[response] , identifier[filterChain] operator[SEP] operator[SEP] }
static int encodedBufferSize(int len, boolean breakLines) { // Cast len to long to prevent overflow long len43 = ((long) len << 2) / 3; // Account for padding long ret = (len43 + 3) & ~3; if (breakLines) { ret += len43 / MAX_LINE_LENGTH; } return ret < Integer.MAX_VALUE ? (int) ret : Integer.MAX_VALUE; }
class class_name[name] begin[{] method[encodedBufferSize, return_type[type[int]], modifier[static], parameter[len, breakLines]] begin[{] local_variable[type[long], len43] local_variable[type[long], ret] if[member[.breakLines]] begin[{] assign[member[.ret], binary_operation[member[.len43], /, member[.MAX_LINE_LENGTH]]] else begin[{] None end[}] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=ret, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[]), operator=<), if_false=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[]), if_true=Cast(expression=MemberReference(member=ret, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)))] end[}] END[}]
Keyword[static] Keyword[int] identifier[encodedBufferSize] operator[SEP] Keyword[int] identifier[len] , Keyword[boolean] identifier[breakLines] operator[SEP] { Keyword[long] identifier[len43] operator[=] operator[SEP] operator[SEP] Keyword[long] operator[SEP] identifier[len] operator[<<] Other[2] operator[SEP] operator[/] Other[3] operator[SEP] Keyword[long] identifier[ret] operator[=] operator[SEP] identifier[len43] operator[+] Other[3] operator[SEP] operator[&] operator[~] Other[3] operator[SEP] Keyword[if] operator[SEP] identifier[breakLines] operator[SEP] { identifier[ret] operator[+=] identifier[len43] operator[/] identifier[MAX_LINE_LENGTH] operator[SEP] } Keyword[return] identifier[ret] operator[<] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[?] operator[SEP] Keyword[int] operator[SEP] identifier[ret] operator[:] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] }
public static HttpResponse request(HttpRequest request, String body, String contentType) { return request.contentType(contentType).body(body).contentLength(body.length()).execute(); }
class class_name[name] begin[{] method[request, return_type[type[HttpResponse]], modifier[public static], parameter[request, body, contentType]] begin[{] return[call[request.contentType, parameter[member[.contentType]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HttpResponse] identifier[request] operator[SEP] identifier[HttpRequest] identifier[request] , identifier[String] identifier[body] , identifier[String] identifier[contentType] operator[SEP] { Keyword[return] identifier[request] operator[SEP] identifier[contentType] operator[SEP] identifier[contentType] operator[SEP] operator[SEP] identifier[body] operator[SEP] identifier[body] operator[SEP] operator[SEP] identifier[contentLength] operator[SEP] identifier[body] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] }
@Override protected ControllerEntityLinks createInstance() { Collection<Class<?>> controllerTypes = new HashSet<>(); for (Class<?> controllerType : getBeanTypesWithAnnotation(annotation)) { if (AnnotationUtils.findAnnotation(controllerType, ExposesResourceFor.class) != null) { controllerTypes.add(controllerType); } } return new ControllerEntityLinks(controllerTypes, linkBuilderFactory); }
class class_name[name] begin[{] method[createInstance, return_type[type[ControllerEntityLinks]], modifier[protected], parameter[]] begin[{] local_variable[type[Collection], controllerTypes] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=controllerType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ExposesResourceFor, sub_type=None))], member=findAnnotation, postfix_operators=[], prefix_operators=[], qualifier=AnnotationUtils, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=controllerType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=controllerTypes, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=annotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getBeanTypesWithAnnotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=controllerType)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None) return[ClassCreator(arguments=[MemberReference(member=controllerTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=linkBuilderFactory, 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=ControllerEntityLinks, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[ControllerEntityLinks] identifier[createInstance] operator[SEP] operator[SEP] { identifier[Collection] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[controllerTypes] operator[=] Keyword[new] identifier[HashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[controllerType] operator[:] identifier[getBeanTypesWithAnnotation] operator[SEP] identifier[annotation] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[AnnotationUtils] operator[SEP] identifier[findAnnotation] operator[SEP] identifier[controllerType] , identifier[ExposesResourceFor] operator[SEP] Keyword[class] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[controllerTypes] operator[SEP] identifier[add] operator[SEP] identifier[controllerType] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[ControllerEntityLinks] operator[SEP] identifier[controllerTypes] , identifier[linkBuilderFactory] operator[SEP] operator[SEP] }
public int getIdByTag(String tag) { Integer value = (Integer) table.getValueByKey(tag); if (value == null) LoggerFactory.getDefaultLogger().error( "** " + this.getClass().getName() + ": Tag '" + tag + "' is not defined. **"); return value.intValue(); }
class class_name[name] begin[{] method[getIdByTag, return_type[type[int]], modifier[public], parameter[tag]] begin[{] local_variable[type[Integer], value] if[binary_operation[member[.value], ==, literal[null]]] begin[{] call[LoggerFactory.getDefaultLogger, parameter[]] else begin[{] None end[}] return[call[value.intValue, parameter[]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getIdByTag] operator[SEP] identifier[String] identifier[tag] operator[SEP] { identifier[Integer] identifier[value] operator[=] operator[SEP] identifier[Integer] operator[SEP] identifier[table] operator[SEP] identifier[getValueByKey] operator[SEP] identifier[tag] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] identifier[LoggerFactory] operator[SEP] identifier[getDefaultLogger] operator[SEP] operator[SEP] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] Keyword[this] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[tag] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] }
@Override public void delete() { LOGGER.debug("Deleting {}", this); Path path = file.file().toPath(); if (Files.exists(path)) { try { Files.delete(file.file().toPath()); } catch (IOException e) { } } }
class class_name[name] begin[{] method[delete, return_type[void], modifier[public], parameter[]] begin[{] call[LOGGER.debug, parameter[literal["Deleting {}"], THIS[]]] local_variable[type[Path], path] if[call[Files.exists, parameter[member[.path]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=file, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[MethodInvocation(arguments=[], member=toPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=delete, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[delete] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[Path] identifier[path] operator[=] identifier[file] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] identifier[toPath] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Files] operator[SEP] identifier[exists] operator[SEP] identifier[path] operator[SEP] operator[SEP] { Keyword[try] { identifier[Files] operator[SEP] identifier[delete] operator[SEP] identifier[file] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] identifier[toPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { } } }
public Object getObject(FactHandle handle) { // the handle might have been disconnected, so reconnect if it has if ( ((InternalFactHandle)handle).isDisconnected() ) { handle = this.defaultEntryPoint.getObjectStore().reconnect( (InternalFactHandle)handle ); } return this.defaultEntryPoint.getObject(handle); }
class class_name[name] begin[{] method[getObject, return_type[type[Object]], modifier[public], parameter[handle]] begin[{] if[Cast(expression=MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InternalFactHandle, sub_type=None))] begin[{] assign[member[.handle], THIS[member[None.defaultEntryPoint]call[None.getObjectStore, parameter[]]call[None.reconnect, parameter[Cast(expression=MemberReference(member=handle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InternalFactHandle, sub_type=None))]]]] else begin[{] None end[}] return[THIS[member[None.defaultEntryPoint]call[None.getObject, parameter[member[.handle]]]]] end[}] END[}]
Keyword[public] identifier[Object] identifier[getObject] operator[SEP] identifier[FactHandle] identifier[handle] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] operator[SEP] identifier[InternalFactHandle] operator[SEP] identifier[handle] operator[SEP] operator[SEP] identifier[isDisconnected] operator[SEP] operator[SEP] operator[SEP] { identifier[handle] operator[=] Keyword[this] operator[SEP] identifier[defaultEntryPoint] operator[SEP] identifier[getObjectStore] operator[SEP] operator[SEP] operator[SEP] identifier[reconnect] operator[SEP] operator[SEP] identifier[InternalFactHandle] operator[SEP] identifier[handle] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] identifier[defaultEntryPoint] operator[SEP] identifier[getObject] operator[SEP] identifier[handle] operator[SEP] operator[SEP] }
public static Map<?, ?> convertToMap(Collection<?> coll, String keyProperty, String valueProperty) { Map<Object, Object> map = newHashMap(); for (Object obj : coll) { Object key = PropertyUtils.getProperty(obj, keyProperty); Object value = PropertyUtils.getProperty(obj, valueProperty); if (null != key) map.put(key, value); } return map; }
class class_name[name] begin[{] method[convertToMap, return_type[type[Map]], modifier[public static], parameter[coll, keyProperty, valueProperty]] begin[{] local_variable[type[Map], map] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=keyProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=PropertyUtils, selectors=[], type_arguments=None), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=valueProperty, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=PropertyUtils, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=coll, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=obj)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) return[member[.map]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] operator[<] operator[?] , operator[?] operator[>] identifier[convertToMap] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] identifier[coll] , identifier[String] identifier[keyProperty] , identifier[String] identifier[valueProperty] operator[SEP] { identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[map] operator[=] identifier[newHashMap] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[obj] operator[:] identifier[coll] operator[SEP] { identifier[Object] identifier[key] operator[=] identifier[PropertyUtils] operator[SEP] identifier[getProperty] operator[SEP] identifier[obj] , identifier[keyProperty] operator[SEP] operator[SEP] identifier[Object] identifier[value] operator[=] identifier[PropertyUtils] operator[SEP] identifier[getProperty] operator[SEP] identifier[obj] , identifier[valueProperty] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[key] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } Keyword[return] identifier[map] operator[SEP] }
@com.fasterxml.jackson.annotation.JsonProperty("FieldName") public void setFieldName(String fieldName) { this.fieldName = fieldName; }
class class_name[name] begin[{] method[setFieldName, return_type[void], modifier[public], parameter[fieldName]] begin[{] assign[THIS[member[None.fieldName]], member[.fieldName]] end[}] END[}]
annotation[@] identifier[com] operator[SEP] identifier[fasterxml] operator[SEP] identifier[jackson] operator[SEP] identifier[annotation] operator[SEP] identifier[JsonProperty] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[void] identifier[setFieldName] operator[SEP] identifier[String] identifier[fieldName] operator[SEP] { Keyword[this] operator[SEP] identifier[fieldName] operator[=] identifier[fieldName] operator[SEP] }
@Override public void setHeader(String hdr, String value) { if (null == value) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { Tr.debug(tc, "setHeader(" + hdr + ", null), removing header"); } this.response.removeHeader(hdr); } else { this.response.setHeader(hdr, value); } }
class class_name[name] begin[{] method[setHeader, return_type[void], modifier[public], parameter[hdr, value]] begin[{] if[binary_operation[literal[null], ==, member[.value]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], binary_operation[binary_operation[literal["setHeader("], +, member[.hdr]], +, literal[", null), removing header"]]]] else begin[{] None end[}] THIS[member[None.response]call[None.removeHeader, parameter[member[.hdr]]]] else begin[{] THIS[member[None.response]call[None.setHeader, parameter[member[.hdr], member[.value]]]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setHeader] operator[SEP] identifier[String] identifier[hdr] , identifier[String] identifier[value] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[value] 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[hdr] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[response] operator[SEP] identifier[removeHeader] operator[SEP] identifier[hdr] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[response] operator[SEP] identifier[setHeader] operator[SEP] identifier[hdr] , identifier[value] operator[SEP] operator[SEP] } }
public final static <T, R> Stream<R> flatMapOptional(final Stream<T> stream, final Function<? super T, Optional<? extends R>> fn) { return stream.flatMap(in -> Streams.optionalToStream(fn.apply(in))); }
class class_name[name] begin[{] method[flatMapOptional, return_type[type[Stream]], modifier[final public static], parameter[stream, fn]] begin[{] return[call[stream.flatMap, parameter[LambdaExpression(body=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=fn, selectors=[], type_arguments=None)], member=optionalToStream, postfix_operators=[], prefix_operators=[], qualifier=Streams, selectors=[], type_arguments=None), parameters=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[static] operator[<] identifier[T] , identifier[R] operator[>] identifier[Stream] operator[<] identifier[R] operator[>] identifier[flatMapOptional] operator[SEP] Keyword[final] identifier[Stream] operator[<] identifier[T] operator[>] identifier[stream] , Keyword[final] identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , identifier[Optional] operator[<] operator[?] Keyword[extends] identifier[R] operator[>] operator[>] identifier[fn] operator[SEP] { Keyword[return] identifier[stream] operator[SEP] identifier[flatMap] operator[SEP] identifier[in] operator[->] identifier[Streams] operator[SEP] identifier[optionalToStream] operator[SEP] identifier[fn] operator[SEP] identifier[apply] operator[SEP] identifier[in] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void loadForward(String query, Long afterSortKey, int limit, ListEngineDisplayLoadCallback<T> callback) { storageActor.send(new AsyncStorageActor.LoadForward<T>(query, afterSortKey, limit, callback)); }
class class_name[name] begin[{] method[loadForward, return_type[void], modifier[public], parameter[query, afterSortKey, limit, callback]] begin[{] call[storageActor.send, parameter[ClassCreator(arguments=[MemberReference(member=query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=afterSortKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=limit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=callback, 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=AsyncStorageActor, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=LoadForward, sub_type=None)))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[loadForward] operator[SEP] identifier[String] identifier[query] , identifier[Long] identifier[afterSortKey] , Keyword[int] identifier[limit] , identifier[ListEngineDisplayLoadCallback] operator[<] identifier[T] operator[>] identifier[callback] operator[SEP] { identifier[storageActor] operator[SEP] identifier[send] operator[SEP] Keyword[new] identifier[AsyncStorageActor] operator[SEP] identifier[LoadForward] operator[<] identifier[T] operator[>] operator[SEP] identifier[query] , identifier[afterSortKey] , identifier[limit] , identifier[callback] operator[SEP] operator[SEP] operator[SEP] }
private void parseLine__singleLineMode(String line) throws SyntaxErrorException { // reset setPropertyNameStart(POSITION__NOT_SET); setPropertyNameEnd(POSITION__NOT_SET); setRestOfLineStart(POSITION__NOT_SET); int _nextStateIndex = 0; State _currentState = null; char[] _nextChar = new char[1]; for (int _i = 0; _i <= line.length(); _i++) { setCurrentChar(_i); _currentState = getAutomaton()[_nextStateIndex]; _currentState.execute(); if (line.length() == _i || !_currentState.isFollowable()) break; _nextChar[0] = line.charAt(_i); String _charToParse = new String(_nextChar); try { _nextStateIndex = _currentState.chooseNext(_charToParse); } catch (SyntaxErrorException _exception) { throw new SyntaxErrorException("Error at pos " + _i + " in line :'" + line + "'"); } } // sanity check : final state and not error if (null == _currentState || !_currentState.isFinal()) { throw new SyntaxErrorException("Undefined error at pos in line :'" + line + "'"); } // do the thing. if (null != getParserOutcome()) { if (isParserOutcomeSingleLine()) { boolean _leftTrim = (FinalState.IS_SINGLE_LINE_LEFT_TRIM == getParserOutcome()); parseLine__extractSingleLineProperty(line, _leftTrim); } else if (isParserOutcomeMultipleLine()) { String _propertyName = line.substring(getPropertyNameStart(), getPropertyNameEnd()); setMultipleLinePropertyName(_propertyName); setMultipleLinePropertyValue(new ArrayList<String>()); String _endTag = line.substring(getRestOfLineStart()).trim(); if (!getEndTagChecker().matcher(_endTag).matches()) { throw new SyntaxErrorException( "End tag MUST match the rule : '" + CharacterPattern.END_TAG + "', got '" + _endTag + "'"); } setMultipleLineEndTag(_endTag); } } }
class class_name[name] begin[{] method[parseLine__singleLineMode, return_type[void], modifier[private], parameter[line]] begin[{] call[.setPropertyNameStart, parameter[member[.POSITION__NOT_SET]]] call[.setPropertyNameEnd, parameter[member[.POSITION__NOT_SET]]] call[.setRestOfLineStart, parameter[member[.POSITION__NOT_SET]]] local_variable[type[int], _nextStateIndex] local_variable[type[State], _currentState] local_variable[type[char], _nextChar] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=_i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setCurrentChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_currentState, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getAutomaton, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=_nextStateIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=execute, postfix_operators=[], prefix_operators=[], qualifier=_currentState, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operandr=MemberReference(member=_i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=MethodInvocation(arguments=[], member=isFollowable, postfix_operators=[], prefix_operators=['!'], qualifier=_currentState, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BreakStatement(goto=None, label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=_nextChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=MethodInvocation(arguments=[MemberReference(member=_i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=_nextChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), name=_charToParse)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_nextStateIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=_charToParse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=chooseNext, postfix_operators=[], prefix_operators=[], qualifier=_currentState, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error at pos "), operandr=MemberReference(member=_i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" in line :'"), operator=+), operandr=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SyntaxErrorException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=_exception, types=['SyntaxErrorException']))], finally_block=None, label=None, resources=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=line, selectors=[], type_arguments=None), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=_i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=_i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[binary_operation[literal[null], ==, member[._currentState]], ||, call[_currentState.isFinal, parameter[]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Undefined error at pos in line :'"), operandr=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SyntaxErrorException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[literal[null], !=, call[.getParserOutcome, parameter[]]]] begin[{] if[call[.isParserOutcomeSingleLine, parameter[]]] begin[{] local_variable[type[boolean], _leftTrim] call[.parseLine__extractSingleLineProperty, parameter[member[.line], member[._leftTrim]]] else begin[{] if[call[.isParserOutcomeMultipleLine, parameter[]]] begin[{] local_variable[type[String], _propertyName] call[.setMultipleLinePropertyName, parameter[member[._propertyName]]] call[.setMultipleLinePropertyValue, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))]] local_variable[type[String], _endTag] if[call[.getEndTagChecker, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="End tag MUST match the rule : '"), operandr=MemberReference(member=END_TAG, postfix_operators=[], prefix_operators=[], qualifier=CharacterPattern, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="', got '"), operator=+), operandr=MemberReference(member=_endTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SyntaxErrorException, sub_type=None)), label=None) else begin[{] None end[}] call[.setMultipleLineEndTag, parameter[member[._endTag]]] else begin[{] None end[}] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[parseLine__singleLineMode] operator[SEP] identifier[String] identifier[line] operator[SEP] Keyword[throws] identifier[SyntaxErrorException] { identifier[setPropertyNameStart] operator[SEP] identifier[POSITION__NOT_SET] operator[SEP] operator[SEP] identifier[setPropertyNameEnd] operator[SEP] identifier[POSITION__NOT_SET] operator[SEP] operator[SEP] identifier[setRestOfLineStart] operator[SEP] identifier[POSITION__NOT_SET] operator[SEP] operator[SEP] Keyword[int] identifier[_nextStateIndex] operator[=] Other[0] operator[SEP] identifier[State] identifier[_currentState] operator[=] Other[null] operator[SEP] Keyword[char] operator[SEP] operator[SEP] identifier[_nextChar] operator[=] Keyword[new] Keyword[char] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[_i] operator[=] Other[0] operator[SEP] identifier[_i] operator[<=] identifier[line] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[_i] operator[++] operator[SEP] { identifier[setCurrentChar] operator[SEP] identifier[_i] operator[SEP] operator[SEP] identifier[_currentState] operator[=] identifier[getAutomaton] operator[SEP] operator[SEP] operator[SEP] identifier[_nextStateIndex] operator[SEP] operator[SEP] identifier[_currentState] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] identifier[_i] operator[||] operator[!] identifier[_currentState] operator[SEP] identifier[isFollowable] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] identifier[_nextChar] operator[SEP] Other[0] operator[SEP] operator[=] identifier[line] operator[SEP] identifier[charAt] operator[SEP] identifier[_i] operator[SEP] operator[SEP] identifier[String] identifier[_charToParse] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[_nextChar] operator[SEP] operator[SEP] Keyword[try] { identifier[_nextStateIndex] operator[=] identifier[_currentState] operator[SEP] identifier[chooseNext] operator[SEP] identifier[_charToParse] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SyntaxErrorException] identifier[_exception] operator[SEP] { Keyword[throw] Keyword[new] identifier[SyntaxErrorException] operator[SEP] literal[String] operator[+] identifier[_i] operator[+] literal[String] operator[+] identifier[line] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] Other[null] operator[==] identifier[_currentState] operator[||] operator[!] identifier[_currentState] operator[SEP] identifier[isFinal] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[SyntaxErrorException] operator[SEP] literal[String] operator[+] identifier[line] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[!=] identifier[getParserOutcome] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[isParserOutcomeSingleLine] operator[SEP] operator[SEP] operator[SEP] { Keyword[boolean] identifier[_leftTrim] operator[=] operator[SEP] identifier[FinalState] operator[SEP] identifier[IS_SINGLE_LINE_LEFT_TRIM] operator[==] identifier[getParserOutcome] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[parseLine__extractSingleLineProperty] operator[SEP] identifier[line] , identifier[_leftTrim] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[isParserOutcomeMultipleLine] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[_propertyName] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] identifier[getPropertyNameStart] operator[SEP] operator[SEP] , identifier[getPropertyNameEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setMultipleLinePropertyName] operator[SEP] identifier[_propertyName] operator[SEP] operator[SEP] identifier[setMultipleLinePropertyValue] operator[SEP] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[_endTag] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] identifier[getRestOfLineStart] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[getEndTagChecker] operator[SEP] operator[SEP] operator[SEP] identifier[matcher] operator[SEP] identifier[_endTag] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[SyntaxErrorException] operator[SEP] literal[String] operator[+] identifier[CharacterPattern] operator[SEP] identifier[END_TAG] operator[+] literal[String] operator[+] identifier[_endTag] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[setMultipleLineEndTag] operator[SEP] identifier[_endTag] operator[SEP] operator[SEP] } } }
private static IChemObjectBuilder findBuilder() { if (BUILDER != null) return BUILDER; for (String name : new String[]{ "org.openscience.cdk.silent.SilentChemObjectBuilder", "org.openscience.cdk.DefaultChemObjectBuilder" }) { try { Class<?> cls = Class.forName(name); Method method = cls.getMethod("getInstance"); return BUILDER = (IChemObjectBuilder) method.invoke(cls); } catch (Exception ex) { // ignored } } return null; }
class class_name[name] begin[{] method[findBuilder, return_type[type[IChemObjectBuilder]], modifier[private static], parameter[]] begin[{] if[binary_operation[member[.BUILDER], !=, literal[null]]] begin[{] return[member[.BUILDER]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=cls)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getInstance")], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=cls, selectors=[], type_arguments=None), name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), ReturnStatement(expression=Assignment(expressionl=MemberReference(member=BUILDER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[MemberReference(member=cls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=IChemObjectBuilder, sub_type=None))), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.openscience.cdk.silent.SilentChemObjectBuilder"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.openscience.cdk.DefaultChemObjectBuilder")]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] identifier[IChemObjectBuilder] identifier[findBuilder] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[BUILDER] operator[!=] Other[null] operator[SEP] Keyword[return] identifier[BUILDER] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[name] operator[:] Keyword[new] identifier[String] operator[SEP] operator[SEP] { literal[String] , literal[String] } operator[SEP] { Keyword[try] { identifier[Class] operator[<] operator[?] operator[>] identifier[cls] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[Method] identifier[method] operator[=] identifier[cls] operator[SEP] identifier[getMethod] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[BUILDER] operator[=] operator[SEP] identifier[IChemObjectBuilder] operator[SEP] identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[cls] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { } } Keyword[return] Other[null] operator[SEP] }
public TResult queryForAll() { TResult result = userDb.query(getTableName(), table.getColumnNames(), null, null, null, null, null); prepareResult(result); return result; }
class class_name[name] begin[{] method[queryForAll, return_type[type[TResult]], modifier[public], parameter[]] begin[{] local_variable[type[TResult], result] call[.prepareResult, parameter[member[.result]]] return[member[.result]] end[}] END[}]
Keyword[public] identifier[TResult] identifier[queryForAll] operator[SEP] operator[SEP] { identifier[TResult] identifier[result] operator[=] identifier[userDb] operator[SEP] identifier[query] operator[SEP] identifier[getTableName] operator[SEP] operator[SEP] , identifier[table] operator[SEP] identifier[getColumnNames] operator[SEP] operator[SEP] , Other[null] , Other[null] , Other[null] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[prepareResult] operator[SEP] identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static byte[] decryptWithPrivateKey(String base64PrivateKeyData, byte[] encryptedData, String cipherTransformation) throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, IOException { RSAPrivateKey privateKey = buildPrivateKey(base64PrivateKeyData); return decrypt(privateKey, encryptedData, cipherTransformation); }
class class_name[name] begin[{] method[decryptWithPrivateKey, return_type[type[byte]], modifier[public static], parameter[base64PrivateKeyData, encryptedData, cipherTransformation]] begin[{] local_variable[type[RSAPrivateKey], privateKey] return[call[.decrypt, parameter[member[.privateKey], member[.encryptedData], member[.cipherTransformation]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[decryptWithPrivateKey] operator[SEP] identifier[String] identifier[base64PrivateKeyData] , Keyword[byte] operator[SEP] operator[SEP] identifier[encryptedData] , identifier[String] identifier[cipherTransformation] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] , identifier[InvalidKeySpecException] , identifier[InvalidKeyException] , identifier[NoSuchPaddingException] , identifier[IllegalBlockSizeException] , identifier[BadPaddingException] , identifier[IOException] { identifier[RSAPrivateKey] identifier[privateKey] operator[=] identifier[buildPrivateKey] operator[SEP] identifier[base64PrivateKeyData] operator[SEP] operator[SEP] Keyword[return] identifier[decrypt] operator[SEP] identifier[privateKey] , identifier[encryptedData] , identifier[cipherTransformation] operator[SEP] operator[SEP] }
public synchronized @Nullable CloseableReference<Bitmap> getDecodedFrame(int index) { if (mDecodedFrames != null) { return CloseableReference.cloneOrNull(mDecodedFrames.get(index)); } return null; }
class class_name[name] begin[{] method[getDecodedFrame, return_type[type[CloseableReference]], modifier[synchronized public], parameter[index]] begin[{] if[binary_operation[member[.mDecodedFrames], !=, literal[null]]] begin[{] return[call[CloseableReference.cloneOrNull, parameter[call[mDecodedFrames.get, parameter[member[.index]]]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[synchronized] annotation[@] identifier[Nullable] identifier[CloseableReference] operator[<] identifier[Bitmap] operator[>] identifier[getDecodedFrame] operator[SEP] Keyword[int] identifier[index] operator[SEP] { Keyword[if] operator[SEP] identifier[mDecodedFrames] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[CloseableReference] operator[SEP] identifier[cloneOrNull] operator[SEP] identifier[mDecodedFrames] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public Bundle withSupportedPlatforms(InstancePlatform... supportedPlatforms) { java.util.ArrayList<String> supportedPlatformsCopy = new java.util.ArrayList<String>(supportedPlatforms.length); for (InstancePlatform value : supportedPlatforms) { supportedPlatformsCopy.add(value.toString()); } if (getSupportedPlatforms() == null) { setSupportedPlatforms(supportedPlatformsCopy); } else { getSupportedPlatforms().addAll(supportedPlatformsCopy); } return this; }
class class_name[name] begin[{] method[withSupportedPlatforms, return_type[type[Bundle]], modifier[public], parameter[supportedPlatforms]] begin[{] local_variable[type[java], supportedPlatformsCopy] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=value, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=supportedPlatformsCopy, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=supportedPlatforms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InstancePlatform, sub_type=None))), label=None) if[binary_operation[call[.getSupportedPlatforms, parameter[]], ==, literal[null]]] begin[{] call[.setSupportedPlatforms, parameter[member[.supportedPlatformsCopy]]] else begin[{] call[.getSupportedPlatforms, parameter[]] end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Bundle] identifier[withSupportedPlatforms] operator[SEP] identifier[InstancePlatform] operator[...] identifier[supportedPlatforms] operator[SEP] { identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[supportedPlatformsCopy] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[supportedPlatforms] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[InstancePlatform] identifier[value] operator[:] identifier[supportedPlatforms] operator[SEP] { identifier[supportedPlatformsCopy] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getSupportedPlatforms] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { identifier[setSupportedPlatforms] operator[SEP] identifier[supportedPlatformsCopy] operator[SEP] operator[SEP] } Keyword[else] { identifier[getSupportedPlatforms] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] identifier[supportedPlatformsCopy] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
@Override void completeCandidates(CommandContext ctx, String buffer, int cursor, List<String> candidates) { if (candidates.isEmpty()) { if (buffer.startsWith("\"") && buffer.length() >= 2) { // Quotes are added back by super class. buffer = buffer.substring(1); } if (buffer.length() == 2 && buffer.endsWith(":")) { candidates.add(buffer + File.separator); } } }
class class_name[name] begin[{] method[completeCandidates, return_type[void], modifier[default], parameter[ctx, buffer, cursor, candidates]] begin[{] if[call[candidates.isEmpty, parameter[]]] begin[{] if[binary_operation[call[buffer.startsWith, parameter[literal["\""]]], &&, binary_operation[call[buffer.length, parameter[]], >=, literal[2]]]] begin[{] assign[member[.buffer], call[buffer.substring, parameter[literal[1]]]] else begin[{] None end[}] if[binary_operation[binary_operation[call[buffer.length, parameter[]], ==, literal[2]], &&, call[buffer.endsWith, parameter[literal[":"]]]]] begin[{] call[candidates.add, parameter[binary_operation[member[.buffer], +, member[File.separator]]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[void] identifier[completeCandidates] operator[SEP] identifier[CommandContext] identifier[ctx] , identifier[String] identifier[buffer] , Keyword[int] identifier[cursor] , identifier[List] operator[<] identifier[String] operator[>] identifier[candidates] operator[SEP] { Keyword[if] operator[SEP] identifier[candidates] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[buffer] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[&&] identifier[buffer] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>=] Other[2] operator[SEP] { identifier[buffer] operator[=] identifier[buffer] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[buffer] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[2] operator[&&] identifier[buffer] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[candidates] operator[SEP] identifier[add] operator[SEP] identifier[buffer] operator[+] identifier[File] operator[SEP] identifier[separator] operator[SEP] operator[SEP] } } }
public static boolean isPresentAll(Optional<?>... optionals) { for (Optional<?> optional : optionals) if (!optional.isPresent()) return false; return true; }
class class_name[name] begin[{] method[isPresentAll, return_type[type[boolean]], modifier[public static], parameter[optionals]] begin[{] ForStatement(body=IfStatement(condition=MethodInvocation(arguments=[], member=isPresent, postfix_operators=[], prefix_operators=['!'], qualifier=optional, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)), control=EnhancedForControl(iterable=MemberReference(member=optionals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=optional)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Optional, sub_type=None))), label=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isPresentAll] operator[SEP] identifier[Optional] operator[<] operator[?] operator[>] operator[...] identifier[optionals] operator[SEP] { Keyword[for] operator[SEP] identifier[Optional] operator[<] operator[?] operator[>] identifier[optional] operator[:] identifier[optionals] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[optional] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public static Update updatePojo(Object pojo) { Objects.requireNonNull(pojo, "Pojo cannot be null"); ObjectNode set = JsonNodeFactory.instance.objectNode(); JsonNode pojoAsJson = JSON.toJsonNode(pojo); if (!(pojoAsJson instanceof ObjectNode)) { throw new IllegalArgumentException(pojo+" is not a pojo!"); } set.set("$set", pojoAsJson); return new Update(set); }
class class_name[name] begin[{] method[updatePojo, return_type[type[Update]], modifier[public static], parameter[pojo]] begin[{] call[Objects.requireNonNull, parameter[member[.pojo], literal["Pojo cannot be null"]]] local_variable[type[ObjectNode], set] local_variable[type[JsonNode], pojoAsJson] if[binary_operation[member[.pojoAsJson], instanceof, type[ObjectNode]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=pojo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is not a pojo!"), 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[}] call[set.set, parameter[literal["$set"], member[.pojoAsJson]]] return[ClassCreator(arguments=[MemberReference(member=set, 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=Update, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Update] identifier[updatePojo] operator[SEP] identifier[Object] identifier[pojo] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[pojo] , literal[String] operator[SEP] operator[SEP] identifier[ObjectNode] identifier[set] operator[=] identifier[JsonNodeFactory] operator[SEP] identifier[instance] operator[SEP] identifier[objectNode] operator[SEP] operator[SEP] operator[SEP] identifier[JsonNode] identifier[pojoAsJson] operator[=] identifier[JSON] operator[SEP] identifier[toJsonNode] operator[SEP] identifier[pojo] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[pojoAsJson] Keyword[instanceof] identifier[ObjectNode] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[pojo] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[set] operator[SEP] identifier[set] operator[SEP] literal[String] , identifier[pojoAsJson] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Update] operator[SEP] identifier[set] operator[SEP] operator[SEP] }
protected static byte[] getData(byte[] data, int size) { if (data == null) { return NO_DATA; } if (data.length <= size) { return data; } byte[] newData = new byte[size]; System.arraycopy(data, 0, newData, 0, size); return newData; }
class class_name[name] begin[{] method[getData, return_type[type[byte]], modifier[static protected], parameter[data, size]] begin[{] if[binary_operation[member[.data], ==, literal[null]]] begin[{] return[member[.NO_DATA]] else begin[{] None end[}] if[binary_operation[member[data.length], <=, member[.size]]] begin[{] return[member[.data]] else begin[{] None end[}] local_variable[type[byte], newData] call[System.arraycopy, parameter[member[.data], literal[0], member[.newData], literal[0], member[.size]]] return[member[.newData]] end[}] END[}]
Keyword[protected] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[getData] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] , Keyword[int] identifier[size] operator[SEP] { Keyword[if] operator[SEP] identifier[data] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[NO_DATA] operator[SEP] } Keyword[if] operator[SEP] identifier[data] operator[SEP] identifier[length] operator[<=] identifier[size] operator[SEP] { Keyword[return] identifier[data] operator[SEP] } Keyword[byte] operator[SEP] operator[SEP] identifier[newData] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[size] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[data] , Other[0] , identifier[newData] , Other[0] , identifier[size] operator[SEP] operator[SEP] Keyword[return] identifier[newData] operator[SEP] }
public PortletPreferencesType<PortletType<T>> getOrCreatePortletPreferences() { Node node = childNode.getOrCreate("portlet-preferences"); PortletPreferencesType<PortletType<T>> portletPreferences = new PortletPreferencesTypeImpl<PortletType<T>>(this, "portlet-preferences", childNode, node); return portletPreferences; }
class class_name[name] begin[{] method[getOrCreatePortletPreferences, return_type[type[PortletPreferencesType]], modifier[public], parameter[]] begin[{] local_variable[type[Node], node] local_variable[type[PortletPreferencesType], portletPreferences] return[member[.portletPreferences]] end[}] END[}]
Keyword[public] identifier[PortletPreferencesType] operator[<] identifier[PortletType] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreatePortletPreferences] operator[SEP] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[childNode] operator[SEP] identifier[getOrCreate] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[PortletPreferencesType] operator[<] identifier[PortletType] operator[<] identifier[T] operator[>] operator[>] identifier[portletPreferences] operator[=] Keyword[new] identifier[PortletPreferencesTypeImpl] operator[<] identifier[PortletType] operator[<] identifier[T] operator[>] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[childNode] , identifier[node] operator[SEP] operator[SEP] Keyword[return] identifier[portletPreferences] operator[SEP] }
public static void scale(InputStream srcStream, OutputStream destStream, int width, int height, Color fixedColor) throws IORuntimeException { scale(read(srcStream), getImageOutputStream(destStream), width, height, fixedColor); }
class class_name[name] begin[{] method[scale, return_type[void], modifier[public static], parameter[srcStream, destStream, width, height, fixedColor]] begin[{] call[.scale, parameter[call[.read, parameter[member[.srcStream]]], call[.getImageOutputStream, parameter[member[.destStream]]], member[.width], member[.height], member[.fixedColor]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[scale] operator[SEP] identifier[InputStream] identifier[srcStream] , identifier[OutputStream] identifier[destStream] , Keyword[int] identifier[width] , Keyword[int] identifier[height] , identifier[Color] identifier[fixedColor] operator[SEP] Keyword[throws] identifier[IORuntimeException] { identifier[scale] operator[SEP] identifier[read] operator[SEP] identifier[srcStream] operator[SEP] , identifier[getImageOutputStream] operator[SEP] identifier[destStream] operator[SEP] , identifier[width] , identifier[height] , identifier[fixedColor] operator[SEP] operator[SEP] }