code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public Image getRemoteImage (String url, int width, int height) { Exception error = new Exception( "Remote image loading not yet supported: " + url + "@" + width + "x" + height); ImageImpl image = createImage(false, width, height, url); image.fail(error); return image; }
class class_name[name] begin[{] method[getRemoteImage, return_type[type[Image]], modifier[public], parameter[url, width, height]] begin[{] local_variable[type[Exception], error] local_variable[type[ImageImpl], image] call[image.fail, parameter[member[.error]]] return[member[.image]] end[}] END[}]
Keyword[public] identifier[Image] identifier[getRemoteImage] operator[SEP] identifier[String] identifier[url] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] { identifier[Exception] identifier[error] operator[=] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[url] operator[+] literal[String] operator[+] identifier[width] operator[+] literal[String] operator[+] identifier[height] operator[SEP] operator[SEP] identifier[ImageImpl] identifier[image] operator[=] identifier[createImage] operator[SEP] literal[boolean] , identifier[width] , identifier[height] , identifier[url] operator[SEP] operator[SEP] identifier[image] operator[SEP] identifier[fail] operator[SEP] identifier[error] operator[SEP] operator[SEP] Keyword[return] identifier[image] operator[SEP] }
private String validateFilename(String filename) { // if its an external filename, use it directly if (isExternal(filename)) { return filename; } // check if this resource name does already exist // if so add a postfix to the name int postfix = 1; boolean found = true; String validFilename = filename; // if we are not in overwrite mode, we must find a valid, non-existing filename // otherwise we will use the current translated name if (!m_overwrite) { while (found) { try { // get the translated name, this one only contains valid chars in OpenCms validFilename = m_cmsObject.getRequestContext().getFileTranslator().translateResource( validFilename); // try to read the file..... found = true; // first try to read it form the fileIndex of already processed files if (!m_fileIndex.containsValue(validFilename.replace('\\', '/'))) { found = false; } if (!found) { found = true; // there was no entry in the fileIndex, so try to read from the VFS m_cmsObject.readResource(validFilename, CmsResourceFilter.ALL); } // ....it's there, so add a postfix and try again String path = filename.substring(0, filename.lastIndexOf("/") + 1); String name = filename.substring(filename.lastIndexOf("/") + 1, filename.length()); validFilename = path; if (name.lastIndexOf(".") > 0) { validFilename += name.substring(0, name.lastIndexOf(".")); } else { validFilename += name; } validFilename += "_" + postfix; if (name.lastIndexOf(".") > 0) { validFilename += name.substring(name.lastIndexOf("."), name.length()); } postfix++; } catch (CmsException e) { // the file does not exist, so we can use this filename found = false; } } } else { validFilename = validFilename.replace('\\', '/'); } return OpenCms.getResourceManager().getFileTranslator().translateResource(validFilename); }
class class_name[name] begin[{] method[validateFilename, return_type[type[String]], modifier[private], parameter[filename]] begin[{] if[call[.isExternal, parameter[member[.filename]]]] begin[{] return[member[.filename]] else begin[{] None end[}] local_variable[type[int], postfix] local_variable[type[boolean], found] local_variable[type[String], validFilename] if[member[.m_overwrite]] begin[{] while[member[.found]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=validFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getRequestContext, postfix_operators=[], prefix_operators=[], qualifier=m_cmsObject, selectors=[MethodInvocation(arguments=[], member=getFileTranslator, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=validFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=translateResource, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='/')], member=replace, postfix_operators=[], prefix_operators=[], qualifier=validFilename, selectors=[], type_arguments=None)], member=containsValue, postfix_operators=[], prefix_operators=['!'], qualifier=m_fileIndex, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)])), IfStatement(condition=MemberReference(member=found, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=found, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=validFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL, postfix_operators=[], prefix_operators=[], qualifier=CmsResourceFilter, selectors=[])], member=readResource, postfix_operators=[], prefix_operators=[], qualifier=m_cmsObject, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=filename, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=filename, selectors=[], type_arguments=None), name=path)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=filename, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=filename, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=filename, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=validFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=validFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=validFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=validFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="_"), operandr=MemberReference(member=postfix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=validFilename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MemberReference(member=postfix, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=found, 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=['CmsException']))], finally_block=None, label=None, resources=None) end[}] else begin[{] assign[member[.validFilename], call[validFilename.replace, parameter[literal['\\'], literal['/']]]] end[}] return[call[OpenCms.getResourceManager, parameter[]]] end[}] END[}]
Keyword[private] identifier[String] identifier[validateFilename] operator[SEP] identifier[String] identifier[filename] operator[SEP] { Keyword[if] operator[SEP] identifier[isExternal] operator[SEP] identifier[filename] operator[SEP] operator[SEP] { Keyword[return] identifier[filename] operator[SEP] } Keyword[int] identifier[postfix] operator[=] Other[1] operator[SEP] Keyword[boolean] identifier[found] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[validFilename] operator[=] identifier[filename] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[m_overwrite] operator[SEP] { Keyword[while] operator[SEP] identifier[found] operator[SEP] { Keyword[try] { identifier[validFilename] operator[=] identifier[m_cmsObject] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getFileTranslator] operator[SEP] operator[SEP] operator[SEP] identifier[translateResource] operator[SEP] identifier[validFilename] operator[SEP] operator[SEP] identifier[found] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[m_fileIndex] operator[SEP] identifier[containsValue] operator[SEP] identifier[validFilename] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] { identifier[found] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[found] operator[SEP] { identifier[found] operator[=] literal[boolean] operator[SEP] identifier[m_cmsObject] operator[SEP] identifier[readResource] operator[SEP] identifier[validFilename] , identifier[CmsResourceFilter] operator[SEP] identifier[ALL] operator[SEP] operator[SEP] } identifier[String] identifier[path] operator[=] identifier[filename] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[filename] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] identifier[String] identifier[name] operator[=] identifier[filename] operator[SEP] identifier[substring] operator[SEP] identifier[filename] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[+] Other[1] , identifier[filename] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[validFilename] operator[=] identifier[path] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[validFilename] operator[+=] identifier[name] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[name] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[validFilename] operator[+=] identifier[name] operator[SEP] } identifier[validFilename] operator[+=] literal[String] operator[+] identifier[postfix] operator[SEP] Keyword[if] operator[SEP] identifier[name] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[validFilename] operator[+=] identifier[name] operator[SEP] identifier[substring] operator[SEP] identifier[name] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] , identifier[name] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[postfix] operator[++] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmsException] identifier[e] operator[SEP] { identifier[found] operator[=] literal[boolean] operator[SEP] } } } Keyword[else] { identifier[validFilename] operator[=] identifier[validFilename] operator[SEP] identifier[replace] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[OpenCms] operator[SEP] identifier[getResourceManager] operator[SEP] operator[SEP] operator[SEP] identifier[getFileTranslator] operator[SEP] operator[SEP] operator[SEP] identifier[translateResource] operator[SEP] identifier[validFilename] operator[SEP] operator[SEP] }
public void marshall(GetHostnameSuggestionRequest getHostnameSuggestionRequest, ProtocolMarshaller protocolMarshaller) { if (getHostnameSuggestionRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getHostnameSuggestionRequest.getLayerId(), LAYERID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[getHostnameSuggestionRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.getHostnameSuggestionRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLayerId, postfix_operators=[], prefix_operators=[], qualifier=getHostnameSuggestionRequest, selectors=[], type_arguments=None), MemberReference(member=LAYERID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[GetHostnameSuggestionRequest] identifier[getHostnameSuggestionRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[getHostnameSuggestionRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[getHostnameSuggestionRequest] operator[SEP] identifier[getLayerId] operator[SEP] operator[SEP] , identifier[LAYERID_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@DoesServiceRequest public ArrayList<FileRange> downloadFileRanges(final AccessCondition accessCondition, FileRequestOptions options, OperationContext opContext) throws StorageException { if (opContext == null) { opContext = new OperationContext(); } options = FileRequestOptions.populateAndApplyDefaults(options, this.fileServiceClient); return ExecutionEngine.executeWithRetry(this.fileServiceClient, this, this.downloadFileRangesImpl(accessCondition, options), options.getRetryPolicyFactory(), opContext); }
class class_name[name] begin[{] method[downloadFileRanges, return_type[type[ArrayList]], modifier[public], parameter[accessCondition, options, opContext]] begin[{] if[binary_operation[member[.opContext], ==, literal[null]]] begin[{] assign[member[.opContext], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OperationContext, sub_type=None))] else begin[{] None end[}] assign[member[.options], call[FileRequestOptions.populateAndApplyDefaults, parameter[member[.options], THIS[member[None.fileServiceClient]]]]] return[call[ExecutionEngine.executeWithRetry, parameter[THIS[member[None.fileServiceClient]], THIS[], THIS[call[None.downloadFileRangesImpl, parameter[member[.accessCondition], member[.options]]]], call[options.getRetryPolicyFactory, parameter[]], member[.opContext]]]] end[}] END[}]
annotation[@] identifier[DoesServiceRequest] Keyword[public] identifier[ArrayList] operator[<] identifier[FileRange] operator[>] identifier[downloadFileRanges] operator[SEP] Keyword[final] identifier[AccessCondition] identifier[accessCondition] , identifier[FileRequestOptions] identifier[options] , identifier[OperationContext] identifier[opContext] operator[SEP] Keyword[throws] identifier[StorageException] { Keyword[if] operator[SEP] identifier[opContext] operator[==] Other[null] operator[SEP] { identifier[opContext] operator[=] Keyword[new] identifier[OperationContext] operator[SEP] operator[SEP] operator[SEP] } identifier[options] operator[=] identifier[FileRequestOptions] operator[SEP] identifier[populateAndApplyDefaults] operator[SEP] identifier[options] , Keyword[this] operator[SEP] identifier[fileServiceClient] operator[SEP] operator[SEP] Keyword[return] identifier[ExecutionEngine] operator[SEP] identifier[executeWithRetry] operator[SEP] Keyword[this] operator[SEP] identifier[fileServiceClient] , Keyword[this] , Keyword[this] operator[SEP] identifier[downloadFileRangesImpl] operator[SEP] identifier[accessCondition] , identifier[options] operator[SEP] , identifier[options] operator[SEP] identifier[getRetryPolicyFactory] operator[SEP] operator[SEP] , identifier[opContext] operator[SEP] operator[SEP] }
public Pager<Project> getForks(Object projectIdOrPath, int itemsPerPage) throws GitLabApiException { return new Pager<Project>(this, Project.class, itemsPerPage, null, "projects", getProjectIdOrPath(projectIdOrPath), "forks"); }
class class_name[name] begin[{] method[getForks, return_type[type[Pager]], modifier[public], parameter[projectIdOrPath, itemsPerPage]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Project, sub_type=None)), MemberReference(member=itemsPerPage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="projects"), MethodInvocation(arguments=[MemberReference(member=projectIdOrPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProjectIdOrPath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="forks")], 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=Project, sub_type=None))], dimensions=None, name=Pager, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Pager] operator[<] identifier[Project] operator[>] identifier[getForks] operator[SEP] identifier[Object] identifier[projectIdOrPath] , Keyword[int] identifier[itemsPerPage] operator[SEP] Keyword[throws] identifier[GitLabApiException] { Keyword[return] Keyword[new] identifier[Pager] operator[<] identifier[Project] operator[>] operator[SEP] Keyword[this] , identifier[Project] operator[SEP] Keyword[class] , identifier[itemsPerPage] , Other[null] , literal[String] , identifier[getProjectIdOrPath] operator[SEP] identifier[projectIdOrPath] operator[SEP] , literal[String] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") public static List<LbConfig> unwrapLoadBalancingConfigList(List<Map<String, ?>> list) { ArrayList<LbConfig> result = new ArrayList<>(); for (Map<String, ?> rawChildPolicy : list) { result.add(unwrapLoadBalancingConfig(rawChildPolicy)); } return Collections.unmodifiableList(result); }
class class_name[name] begin[{] method[unwrapLoadBalancingConfigList, return_type[type[List]], modifier[public static], parameter[list]] begin[{] local_variable[type[ArrayList], result] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=rawChildPolicy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unwrapLoadBalancingConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=rawChildPolicy)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Map, sub_type=None))), label=None) return[call[Collections.unmodifiableList, parameter[member[.result]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] identifier[List] operator[<] identifier[LbConfig] operator[>] identifier[unwrapLoadBalancingConfigList] operator[SEP] identifier[List] operator[<] identifier[Map] operator[<] identifier[String] , operator[?] operator[>] operator[>] identifier[list] operator[SEP] { identifier[ArrayList] operator[<] identifier[LbConfig] operator[>] identifier[result] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[<] identifier[String] , operator[?] operator[>] identifier[rawChildPolicy] operator[:] identifier[list] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[unwrapLoadBalancingConfig] operator[SEP] identifier[rawChildPolicy] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[Collections] operator[SEP] identifier[unmodifiableList] operator[SEP] identifier[result] operator[SEP] operator[SEP] }
public static Table setPadding (final Padding padding, final Table table) { table.pad(padding.getTop(), padding.getLeft(), padding.getBottom(), padding.getRight()); return table; }
class class_name[name] begin[{] method[setPadding, return_type[type[Table]], modifier[public static], parameter[padding, table]] begin[{] call[table.pad, parameter[call[padding.getTop, parameter[]], call[padding.getLeft, parameter[]], call[padding.getBottom, parameter[]], call[padding.getRight, parameter[]]]] return[member[.table]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Table] identifier[setPadding] operator[SEP] Keyword[final] identifier[Padding] identifier[padding] , Keyword[final] identifier[Table] identifier[table] operator[SEP] { identifier[table] operator[SEP] identifier[pad] operator[SEP] identifier[padding] operator[SEP] identifier[getTop] operator[SEP] operator[SEP] , identifier[padding] operator[SEP] identifier[getLeft] operator[SEP] operator[SEP] , identifier[padding] operator[SEP] identifier[getBottom] operator[SEP] operator[SEP] , identifier[padding] operator[SEP] identifier[getRight] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[table] operator[SEP] }
public boolean isToday() { Validate.notNull(getValue(), getClass().getSimpleName() + " contains null value"); return DateUtils.isSameDay(new Date(), getValue()); }
class class_name[name] begin[{] method[isToday, return_type[type[boolean]], modifier[public], parameter[]] begin[{] call[Validate.notNull, parameter[call[.getValue, parameter[]], binary_operation[call[.getClass, parameter[]], +, literal[" contains null value"]]]] return[call[DateUtils.isSameDay, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None)), call[.getValue, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isToday] operator[SEP] operator[SEP] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[DateUtils] operator[SEP] identifier[isSameDay] operator[SEP] Keyword[new] identifier[Date] operator[SEP] operator[SEP] , identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public LRResult getObtainJSONData(String requestID, Boolean byResourceID, Boolean byDocID, Boolean idsOnly) throws LRException { return getObtainJSONData(requestID, byResourceID, byDocID, idsOnly, null); }
class class_name[name] begin[{] method[getObtainJSONData, return_type[type[LRResult]], modifier[public], parameter[requestID, byResourceID, byDocID, idsOnly]] begin[{] return[call[.getObtainJSONData, parameter[member[.requestID], member[.byResourceID], member[.byDocID], member[.idsOnly], literal[null]]]] end[}] END[}]
Keyword[public] identifier[LRResult] identifier[getObtainJSONData] operator[SEP] identifier[String] identifier[requestID] , identifier[Boolean] identifier[byResourceID] , identifier[Boolean] identifier[byDocID] , identifier[Boolean] identifier[idsOnly] operator[SEP] Keyword[throws] identifier[LRException] { Keyword[return] identifier[getObtainJSONData] operator[SEP] identifier[requestID] , identifier[byResourceID] , identifier[byDocID] , identifier[idsOnly] , Other[null] operator[SEP] operator[SEP] }
@RequiresPermission(Manifest.permission.INTERNET) protected static Observable<Boolean> observeInternetConnectivity( final InternetObservingStrategy strategy, final int initialIntervalInMs, final int intervalInMs, final String host, final int port, final int timeoutInMs, final int httpResponse, final ErrorHandler errorHandler) { checkStrategyIsNotNull(strategy); return strategy.observeInternetConnectivity(initialIntervalInMs, intervalInMs, host, port, timeoutInMs, httpResponse, errorHandler); }
class class_name[name] begin[{] method[observeInternetConnectivity, return_type[type[Observable]], modifier[static protected], parameter[strategy, initialIntervalInMs, intervalInMs, host, port, timeoutInMs, httpResponse, errorHandler]] begin[{] call[.checkStrategyIsNotNull, parameter[member[.strategy]]] return[call[strategy.observeInternetConnectivity, parameter[member[.initialIntervalInMs], member[.intervalInMs], member[.host], member[.port], member[.timeoutInMs], member[.httpResponse], member[.errorHandler]]]] end[}] END[}]
annotation[@] identifier[RequiresPermission] operator[SEP] identifier[Manifest] operator[SEP] identifier[permission] operator[SEP] identifier[INTERNET] operator[SEP] Keyword[protected] Keyword[static] identifier[Observable] operator[<] identifier[Boolean] operator[>] identifier[observeInternetConnectivity] operator[SEP] Keyword[final] identifier[InternetObservingStrategy] identifier[strategy] , Keyword[final] Keyword[int] identifier[initialIntervalInMs] , Keyword[final] Keyword[int] identifier[intervalInMs] , Keyword[final] identifier[String] identifier[host] , Keyword[final] Keyword[int] identifier[port] , Keyword[final] Keyword[int] identifier[timeoutInMs] , Keyword[final] Keyword[int] identifier[httpResponse] , Keyword[final] identifier[ErrorHandler] identifier[errorHandler] operator[SEP] { identifier[checkStrategyIsNotNull] operator[SEP] identifier[strategy] operator[SEP] operator[SEP] Keyword[return] identifier[strategy] operator[SEP] identifier[observeInternetConnectivity] operator[SEP] identifier[initialIntervalInMs] , identifier[intervalInMs] , identifier[host] , identifier[port] , identifier[timeoutInMs] , identifier[httpResponse] , identifier[errorHandler] operator[SEP] operator[SEP] }
public static int dataCompare(final Bits left, final Bits right) { for (int i = 0; i < left.bytes.length; i++) { if (right.bytes.length <= i) { return 1; } final int a = left.bytes[i] & 0xFF; final int b = right.bytes[i] & 0xFF; if (a < b) { return -1; } if (a > b) { return 1; } } if (left.bitLength < right.bitLength) { return -1; } if (left.bitLength > right.bitLength) { return 1; } return 0; }
class class_name[name] begin[{] method[dataCompare, return_type[type[int]], modifier[public static], parameter[left, right]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=right.bytes, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=left, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&), name=a)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=right, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&), name=b)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=left.bytes, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[member[left.bitLength], <, member[right.bitLength]]] begin[{] return[literal[1]] else begin[{] None end[}] if[binary_operation[member[left.bitLength], >, member[right.bitLength]]] begin[{] return[literal[1]] else begin[{] None end[}] return[literal[0]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[dataCompare] operator[SEP] Keyword[final] identifier[Bits] identifier[left] , Keyword[final] identifier[Bits] identifier[right] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[left] operator[SEP] identifier[bytes] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[right] operator[SEP] identifier[bytes] operator[SEP] identifier[length] operator[<=] identifier[i] operator[SEP] { Keyword[return] Other[1] operator[SEP] } Keyword[final] Keyword[int] identifier[a] operator[=] identifier[left] operator[SEP] identifier[bytes] operator[SEP] identifier[i] operator[SEP] operator[&] literal[Integer] operator[SEP] Keyword[final] Keyword[int] identifier[b] operator[=] identifier[right] operator[SEP] identifier[bytes] operator[SEP] identifier[i] operator[SEP] operator[&] literal[Integer] operator[SEP] Keyword[if] operator[SEP] identifier[a] operator[<] identifier[b] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[a] operator[>] identifier[b] operator[SEP] { Keyword[return] Other[1] operator[SEP] } } Keyword[if] operator[SEP] identifier[left] operator[SEP] identifier[bitLength] operator[<] identifier[right] operator[SEP] identifier[bitLength] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[if] operator[SEP] identifier[left] operator[SEP] identifier[bitLength] operator[>] identifier[right] operator[SEP] identifier[bitLength] operator[SEP] { Keyword[return] Other[1] operator[SEP] } Keyword[return] Other[0] operator[SEP] }
private BufferedImage getImage(String url) throws Exception { HttpGet get = null; LOGGER.info("ImageManipulation: GET " + url); try { DefaultHttpClient client = new DefaultHttpClient(cManager); client.getParams().setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 20000); get = new HttpGet(url); client.getParams().setBooleanParameter(ClientPNames.HANDLE_REDIRECTS, true); HttpResponse response = client.execute(get); int resultCode = response.getStatusLine().getStatusCode(); if (resultCode != 200) { throw new ServletException("Could not load image: " + url + ". Errorcode " + resultCode + " from remote server."); } LOGGER.info("ImageManipulation: STATUS " + resultCode); inputMimeType = response.getFirstHeader(HttpHeaders.CONTENT_TYPE).getValue(); LOGGER.info("ImageManipulation: Content-Type " + inputMimeType); if (inputMimeType.equals("image/gif") || inputMimeType.equals("image/jpeg") || inputMimeType.equals("image/tiff") || inputMimeType.equals("image/bmp") || inputMimeType.equals("image/x-ms-bmp") || inputMimeType.equals("image/x-bitmap") || inputMimeType.equals("image/png")) { if (inputMimeType.endsWith("p")) { inputMimeType = "image/bmp"; // windows bitmaps are most } // commonly supported with this // mime type, even though it's not // an IANA-registered image type return JAI.create("stream", new MemoryCacheSeekableStream(response .getEntity().getContent())) .getAsBufferedImage(); } else { throw new ServletException("Source image was not a gif, png, " + "bmp, tiff, or jpg."); } } catch (Exception e) { LOGGER.log(Level.SEVERE, e.getMessage(), e); throw e; } finally { if (get != null) { get.releaseConnection(); } } }
class class_name[name] begin[{] method[getImage, return_type[type[BufferedImage]], modifier[private], parameter[url]] begin[{] local_variable[type[HttpGet], get] call[LOGGER.info, parameter[binary_operation[literal["ImageManipulation: GET "], +, member[.url]]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=cManager, 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=DefaultHttpClient, sub_type=None)), name=client)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DefaultHttpClient, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=getParams, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[MethodInvocation(arguments=[MemberReference(member=CONNECTION_TIMEOUT, postfix_operators=[], prefix_operators=[], qualifier=CoreConnectionPNames, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=20000)], member=setIntParameter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HttpGet, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getParams, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[MethodInvocation(arguments=[MemberReference(member=HANDLE_REDIRECTS, postfix_operators=[], prefix_operators=[], qualifier=ClientPNames, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setBooleanParameter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=execute, postfix_operators=[], prefix_operators=[], qualifier=client, selectors=[], type_arguments=None), name=response)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HttpResponse, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getStatusLine, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[MethodInvocation(arguments=[], member=getStatusCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=resultCode)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=resultCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=200), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not load image: "), operandr=MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=". Errorcode "), operator=+), operandr=MemberReference(member=resultCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" from remote server."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServletException, sub_type=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ImageManipulation: STATUS "), operandr=MemberReference(member=resultCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=inputMimeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=CONTENT_TYPE, postfix_operators=[], prefix_operators=[], qualifier=HttpHeaders, selectors=[])], member=getFirstHeader, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[MethodInvocation(arguments=[], member=getValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ImageManipulation: Content-Type "), operandr=MemberReference(member=inputMimeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="image/gif")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=inputMimeType, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="image/jpeg")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=inputMimeType, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="image/tiff")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=inputMimeType, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="image/bmp")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=inputMimeType, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="image/x-ms-bmp")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=inputMimeType, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="image/x-bitmap")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=inputMimeType, selectors=[], type_arguments=None), operator=||), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="image/png")], member=equals, postfix_operators=[], prefix_operators=[], qualifier=inputMimeType, selectors=[], type_arguments=None), operator=||), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Source image was not a gif, png, "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="bmp, tiff, or jpg."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServletException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="p")], member=endsWith, postfix_operators=[], prefix_operators=[], qualifier=inputMimeType, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=inputMimeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="image/bmp")), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="stream"), ClassCreator(arguments=[MethodInvocation(arguments=[], member=getEntity, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[MethodInvocation(arguments=[], member=getContent, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MemoryCacheSeekableStream, sub_type=None))], member=create, postfix_operators=[], prefix_operators=[], qualifier=JAI, selectors=[MethodInvocation(arguments=[], member=getAsBufferedImage, 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=SEVERE, postfix_operators=[], prefix_operators=[], qualifier=Level, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=log, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=get, 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=releaseConnection, postfix_operators=[], prefix_operators=[], qualifier=get, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
Keyword[private] identifier[BufferedImage] identifier[getImage] operator[SEP] identifier[String] identifier[url] operator[SEP] Keyword[throws] identifier[Exception] { identifier[HttpGet] identifier[get] operator[=] Other[null] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[url] operator[SEP] operator[SEP] Keyword[try] { identifier[DefaultHttpClient] identifier[client] operator[=] Keyword[new] identifier[DefaultHttpClient] operator[SEP] identifier[cManager] operator[SEP] operator[SEP] identifier[client] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] identifier[setIntParameter] operator[SEP] identifier[CoreConnectionPNames] operator[SEP] identifier[CONNECTION_TIMEOUT] , Other[20000] operator[SEP] operator[SEP] identifier[get] operator[=] Keyword[new] identifier[HttpGet] operator[SEP] identifier[url] operator[SEP] operator[SEP] identifier[client] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] identifier[setBooleanParameter] operator[SEP] identifier[ClientPNames] operator[SEP] identifier[HANDLE_REDIRECTS] , literal[boolean] operator[SEP] operator[SEP] identifier[HttpResponse] identifier[response] operator[=] identifier[client] operator[SEP] identifier[execute] operator[SEP] identifier[get] operator[SEP] operator[SEP] Keyword[int] identifier[resultCode] operator[=] identifier[response] operator[SEP] identifier[getStatusLine] operator[SEP] operator[SEP] operator[SEP] identifier[getStatusCode] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resultCode] operator[!=] Other[200] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServletException] operator[SEP] literal[String] operator[+] identifier[url] operator[+] literal[String] operator[+] identifier[resultCode] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[resultCode] operator[SEP] operator[SEP] identifier[inputMimeType] operator[=] identifier[response] operator[SEP] identifier[getFirstHeader] operator[SEP] identifier[HttpHeaders] operator[SEP] identifier[CONTENT_TYPE] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[LOGGER] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[inputMimeType] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[inputMimeType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[inputMimeType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[inputMimeType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[inputMimeType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[inputMimeType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[inputMimeType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[inputMimeType] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[inputMimeType] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[inputMimeType] operator[=] literal[String] operator[SEP] } Keyword[return] identifier[JAI] operator[SEP] identifier[create] operator[SEP] literal[String] , Keyword[new] identifier[MemoryCacheSeekableStream] operator[SEP] identifier[response] operator[SEP] identifier[getEntity] operator[SEP] operator[SEP] operator[SEP] identifier[getContent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getAsBufferedImage] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[ServletException] operator[SEP] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[log] operator[SEP] identifier[Level] operator[SEP] identifier[SEVERE] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[get] operator[!=] Other[null] operator[SEP] { identifier[get] operator[SEP] identifier[releaseConnection] operator[SEP] operator[SEP] operator[SEP] } } }
public SufficientStatistics train(ParametricFactorGraph bn, SufficientStatistics initialParameters, List<DynamicAssignment> trainingData) { ExpectationMaximization em = new ExpectationMaximization(numIterations, log); EmFactorGraphOracle oracle = new EmFactorGraphOracle(bn, marginalCalculator, initialParameters); return em.train(oracle, initialParameters, trainingData); }
class class_name[name] begin[{] method[train, return_type[type[SufficientStatistics]], modifier[public], parameter[bn, initialParameters, trainingData]] begin[{] local_variable[type[ExpectationMaximization], em] local_variable[type[EmFactorGraphOracle], oracle] return[call[em.train, parameter[member[.oracle], member[.initialParameters], member[.trainingData]]]] end[}] END[}]
Keyword[public] identifier[SufficientStatistics] identifier[train] operator[SEP] identifier[ParametricFactorGraph] identifier[bn] , identifier[SufficientStatistics] identifier[initialParameters] , identifier[List] operator[<] identifier[DynamicAssignment] operator[>] identifier[trainingData] operator[SEP] { identifier[ExpectationMaximization] identifier[em] operator[=] Keyword[new] identifier[ExpectationMaximization] operator[SEP] identifier[numIterations] , identifier[log] operator[SEP] operator[SEP] identifier[EmFactorGraphOracle] identifier[oracle] operator[=] Keyword[new] identifier[EmFactorGraphOracle] operator[SEP] identifier[bn] , identifier[marginalCalculator] , identifier[initialParameters] operator[SEP] operator[SEP] Keyword[return] identifier[em] operator[SEP] identifier[train] operator[SEP] identifier[oracle] , identifier[initialParameters] , identifier[trainingData] operator[SEP] operator[SEP] }
public void setDeclaredParam(JvmFormalParameter newDeclaredParam) { if (newDeclaredParam != declaredParam) { NotificationChain msgs = null; if (declaredParam != null) msgs = ((InternalEObject)declaredParam).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - XbasePackage.XCATCH_CLAUSE__DECLARED_PARAM, null, msgs); if (newDeclaredParam != null) msgs = ((InternalEObject)newDeclaredParam).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - XbasePackage.XCATCH_CLAUSE__DECLARED_PARAM, null, msgs); msgs = basicSetDeclaredParam(newDeclaredParam, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, XbasePackage.XCATCH_CLAUSE__DECLARED_PARAM, newDeclaredParam, newDeclaredParam)); }
class class_name[name] begin[{] method[setDeclaredParam, return_type[void], modifier[public], parameter[newDeclaredParam]] begin[{] if[binary_operation[member[.newDeclaredParam], !=, member[.declaredParam]]] begin[{] local_variable[type[NotificationChain], msgs] if[binary_operation[member[.declaredParam], !=, literal[null]]] begin[{] assign[member[.msgs], Cast(expression=MemberReference(member=declaredParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InternalEObject, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.newDeclaredParam], !=, literal[null]]] begin[{] assign[member[.msgs], Cast(expression=MemberReference(member=newDeclaredParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=InternalEObject, sub_type=None))] else begin[{] None end[}] assign[member[.msgs], call[.basicSetDeclaredParam, parameter[member[.newDeclaredParam], member[.msgs]]]] if[binary_operation[member[.msgs], !=, literal[null]]] begin[{] call[msgs.dispatch, parameter[]] else begin[{] None end[}] else begin[{] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=XCATCH_CLAUSE__DECLARED_PARAM, postfix_operators=[], prefix_operators=[], qualifier=XbasePackage, selectors=[]), MemberReference(member=newDeclaredParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newDeclaredParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ENotificationImpl, sub_type=None))]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setDeclaredParam] operator[SEP] identifier[JvmFormalParameter] identifier[newDeclaredParam] operator[SEP] { Keyword[if] operator[SEP] identifier[newDeclaredParam] operator[!=] identifier[declaredParam] operator[SEP] { identifier[NotificationChain] identifier[msgs] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[declaredParam] operator[!=] Other[null] operator[SEP] identifier[msgs] operator[=] operator[SEP] operator[SEP] identifier[InternalEObject] operator[SEP] identifier[declaredParam] operator[SEP] operator[SEP] identifier[eInverseRemove] operator[SEP] Keyword[this] , identifier[EOPPOSITE_FEATURE_BASE] operator[-] identifier[XbasePackage] operator[SEP] identifier[XCATCH_CLAUSE__DECLARED_PARAM] , Other[null] , identifier[msgs] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newDeclaredParam] operator[!=] Other[null] operator[SEP] identifier[msgs] operator[=] operator[SEP] operator[SEP] identifier[InternalEObject] operator[SEP] identifier[newDeclaredParam] operator[SEP] operator[SEP] identifier[eInverseAdd] operator[SEP] Keyword[this] , identifier[EOPPOSITE_FEATURE_BASE] operator[-] identifier[XbasePackage] operator[SEP] identifier[XCATCH_CLAUSE__DECLARED_PARAM] , Other[null] , identifier[msgs] operator[SEP] operator[SEP] identifier[msgs] operator[=] identifier[basicSetDeclaredParam] operator[SEP] identifier[newDeclaredParam] , identifier[msgs] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[msgs] operator[!=] Other[null] operator[SEP] identifier[msgs] operator[SEP] identifier[dispatch] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[SET] , identifier[XbasePackage] operator[SEP] identifier[XCATCH_CLAUSE__DECLARED_PARAM] , identifier[newDeclaredParam] , identifier[newDeclaredParam] operator[SEP] operator[SEP] operator[SEP] }
private void fireMultipleLinePropertyParsedEvent(String name, String[] value) { MultipleLinePropertyParsedEvent _event = new MultipleLinePropertyParsedEvent(name, value); for (PropertiesParsingListener _listener : getListeners()) { _listener.onMultipleLinePropertyParsed(_event); } }
class class_name[name] begin[{] method[fireMultipleLinePropertyParsedEvent, return_type[void], modifier[private], parameter[name, value]] begin[{] local_variable[type[MultipleLinePropertyParsedEvent], _event] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=_event, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onMultipleLinePropertyParsed, postfix_operators=[], prefix_operators=[], qualifier=_listener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getListeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=_listener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PropertiesParsingListener, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[fireMultipleLinePropertyParsedEvent] operator[SEP] identifier[String] identifier[name] , identifier[String] operator[SEP] operator[SEP] identifier[value] operator[SEP] { identifier[MultipleLinePropertyParsedEvent] identifier[_event] operator[=] Keyword[new] identifier[MultipleLinePropertyParsedEvent] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[PropertiesParsingListener] identifier[_listener] operator[:] identifier[getListeners] operator[SEP] operator[SEP] operator[SEP] { identifier[_listener] operator[SEP] identifier[onMultipleLinePropertyParsed] operator[SEP] identifier[_event] operator[SEP] operator[SEP] } }
@Override public CommerceCurrency[] findByUuid_PrevAndNext(long commerceCurrencyId, String uuid, OrderByComparator<CommerceCurrency> orderByComparator) throws NoSuchCurrencyException { CommerceCurrency commerceCurrency = findByPrimaryKey(commerceCurrencyId); Session session = null; try { session = openSession(); CommerceCurrency[] array = new CommerceCurrencyImpl[3]; array[0] = getByUuid_PrevAndNext(session, commerceCurrency, uuid, orderByComparator, true); array[1] = commerceCurrency; array[2] = getByUuid_PrevAndNext(session, commerceCurrency, uuid, orderByComparator, false); return array; } catch (Exception e) { throw processException(e); } finally { closeSession(session); } }
class class_name[name] begin[{] method[findByUuid_PrevAndNext, return_type[type[CommerceCurrency]], modifier[public], parameter[commerceCurrencyId, uuid, orderByComparator]] begin[{] local_variable[type[CommerceCurrency], commerceCurrency] local_variable[type[Session], session] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=openSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CommerceCurrencyImpl, sub_type=None)), name=array)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=CommerceCurrency, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))]), type==, value=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=commerceCurrency, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=uuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=orderByComparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=getByUuid_PrevAndNext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]), type==, value=MemberReference(member=commerceCurrency, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), type==, value=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=commerceCurrency, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=uuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=orderByComparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=getByUuid_PrevAndNext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=session, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[CommerceCurrency] operator[SEP] operator[SEP] identifier[findByUuid_PrevAndNext] operator[SEP] Keyword[long] identifier[commerceCurrencyId] , identifier[String] identifier[uuid] , identifier[OrderByComparator] operator[<] identifier[CommerceCurrency] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[NoSuchCurrencyException] { identifier[CommerceCurrency] identifier[commerceCurrency] operator[=] identifier[findByPrimaryKey] operator[SEP] identifier[commerceCurrencyId] operator[SEP] operator[SEP] identifier[Session] identifier[session] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[session] operator[=] identifier[openSession] operator[SEP] operator[SEP] operator[SEP] identifier[CommerceCurrency] operator[SEP] operator[SEP] identifier[array] operator[=] Keyword[new] identifier[CommerceCurrencyImpl] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[array] operator[SEP] Other[0] operator[SEP] operator[=] identifier[getByUuid_PrevAndNext] operator[SEP] identifier[session] , identifier[commerceCurrency] , identifier[uuid] , identifier[orderByComparator] , literal[boolean] operator[SEP] operator[SEP] identifier[array] operator[SEP] Other[1] operator[SEP] operator[=] identifier[commerceCurrency] operator[SEP] identifier[array] operator[SEP] Other[2] operator[SEP] operator[=] identifier[getByUuid_PrevAndNext] operator[SEP] identifier[session] , identifier[commerceCurrency] , identifier[uuid] , identifier[orderByComparator] , literal[boolean] operator[SEP] operator[SEP] Keyword[return] identifier[array] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] identifier[processException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { identifier[closeSession] operator[SEP] identifier[session] operator[SEP] operator[SEP] } }
public SourceFile findSourceFile(String packageName, String fileName) throws IOException { // On windows the fileName specification is different between a file in // a directory tree, and a // file in a zip file. In a directory tree the separator used is '\', // while in a zip it's '/' // Therefore for each repository figure out what kind it is and use the // appropriate separator. // In all practicality, this code could just use the hardcoded '/' char, // as windows can open // files with this separator, but to allow for the mythical 'other' // platform that uses an // alternate separator, make a distinction String platformName = getPlatformName(packageName, fileName); String canonicalName = getCanonicalName(packageName, fileName); // Is the file in the cache already? Always cache it with the canonical // name SourceFile sourceFile = cache.get(canonicalName); if (sourceFile != null) { return sourceFile; } // Find this source file, add its data to the cache if (DEBUG) { System.out.println("Trying " + fileName + " in package " + packageName + "..."); } // Query each element of the source path to find the requested source // file for (SourceRepository repos : repositoryList) { if (repos instanceof BlockingSourceRepository && !((BlockingSourceRepository) repos).isReady()) { continue; } fileName = repos.isPlatformDependent() ? platformName : canonicalName; if (DEBUG) { System.out.println("Looking in " + repos + " for " + fileName); } if (repos.contains(fileName)) { // Found it sourceFile = new SourceFile(repos.getDataSource(fileName)); cache.put(canonicalName, sourceFile); // always cache with // canonicalName return sourceFile; } } throw new FileNotFoundException("Can't find source file " + fileName); }
class class_name[name] begin[{] method[findSourceFile, return_type[type[SourceFile]], modifier[public], parameter[packageName, fileName]] begin[{] local_variable[type[String], platformName] local_variable[type[String], canonicalName] local_variable[type[SourceFile], sourceFile] if[binary_operation[member[.sourceFile], !=, literal[null]]] begin[{] return[member[.sourceFile]] else begin[{] None end[}] if[member[.DEBUG]] begin[{] call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[literal["Trying "], +, member[.fileName]], +, literal[" in package "]], +, member[.packageName]], +, literal["..."]]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=repos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=BlockingSourceRepository, sub_type=None), operator=instanceof), operandr=Cast(expression=MemberReference(member=repos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BlockingSourceRepository, sub_type=None)), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=MethodInvocation(arguments=[], member=isPlatformDependent, postfix_operators=[], prefix_operators=[], qualifier=repos, selectors=[], type_arguments=None), if_false=MemberReference(member=canonicalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=platformName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))), label=None), IfStatement(condition=MemberReference(member=DEBUG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Looking in "), operandr=MemberReference(member=repos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" for "), operator=+), operandr=MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=repos, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sourceFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=fileName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDataSource, postfix_operators=[], prefix_operators=[], qualifier=repos, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SourceFile, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=canonicalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sourceFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=cache, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=sourceFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=repositoryList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=repos)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SourceRepository, sub_type=None))), label=None) ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can't find source file "), operandr=MemberReference(member=fileName, 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=FileNotFoundException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] identifier[SourceFile] identifier[findSourceFile] operator[SEP] identifier[String] identifier[packageName] , identifier[String] identifier[fileName] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[platformName] operator[=] identifier[getPlatformName] operator[SEP] identifier[packageName] , identifier[fileName] operator[SEP] operator[SEP] identifier[String] identifier[canonicalName] operator[=] identifier[getCanonicalName] operator[SEP] identifier[packageName] , identifier[fileName] operator[SEP] operator[SEP] identifier[SourceFile] identifier[sourceFile] operator[=] identifier[cache] operator[SEP] identifier[get] operator[SEP] identifier[canonicalName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sourceFile] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[sourceFile] operator[SEP] } Keyword[if] operator[SEP] identifier[DEBUG] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[fileName] operator[+] literal[String] operator[+] identifier[packageName] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[SourceRepository] identifier[repos] operator[:] identifier[repositoryList] operator[SEP] { Keyword[if] operator[SEP] identifier[repos] Keyword[instanceof] identifier[BlockingSourceRepository] operator[&&] operator[!] operator[SEP] operator[SEP] identifier[BlockingSourceRepository] operator[SEP] identifier[repos] operator[SEP] operator[SEP] identifier[isReady] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[fileName] operator[=] identifier[repos] operator[SEP] identifier[isPlatformDependent] operator[SEP] operator[SEP] operator[?] identifier[platformName] operator[:] identifier[canonicalName] operator[SEP] Keyword[if] operator[SEP] identifier[DEBUG] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[repos] operator[+] literal[String] operator[+] identifier[fileName] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[repos] operator[SEP] identifier[contains] operator[SEP] identifier[fileName] operator[SEP] operator[SEP] { identifier[sourceFile] operator[=] Keyword[new] identifier[SourceFile] operator[SEP] identifier[repos] operator[SEP] identifier[getDataSource] operator[SEP] identifier[fileName] operator[SEP] operator[SEP] operator[SEP] identifier[cache] operator[SEP] identifier[put] operator[SEP] identifier[canonicalName] , identifier[sourceFile] operator[SEP] operator[SEP] Keyword[return] identifier[sourceFile] operator[SEP] } } Keyword[throw] Keyword[new] identifier[FileNotFoundException] operator[SEP] literal[String] operator[+] identifier[fileName] operator[SEP] operator[SEP] }
protected void appendCyclicObject(final StringBuffer buffer, final String fieldName, final Object value) { ObjectUtils.identityToString(buffer, value); }
class class_name[name] begin[{] method[appendCyclicObject, return_type[void], modifier[protected], parameter[buffer, fieldName, value]] begin[{] call[ObjectUtils.identityToString, parameter[member[.buffer], member[.value]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[appendCyclicObject] operator[SEP] Keyword[final] identifier[StringBuffer] identifier[buffer] , Keyword[final] identifier[String] identifier[fieldName] , Keyword[final] identifier[Object] identifier[value] operator[SEP] { identifier[ObjectUtils] operator[SEP] identifier[identityToString] operator[SEP] identifier[buffer] , identifier[value] operator[SEP] operator[SEP] }
protected void initPage() throws DocumentException { // the pagenumber is incremented pageN++; // initialization of some page objects annotationsImp.resetAnnotations(); pageResources = new PageResources(); writer.resetContent(); graphics = new PdfContentByte(writer); text = new PdfContentByte(writer); text.reset(); text.beginText(); textEmptySize = text.size(); markPoint = 0; setNewPageSizeAndMargins(); imageEnd = -1; indentation.imageIndentRight = 0; indentation.imageIndentLeft = 0; indentation.indentBottom = 0; indentation.indentTop = 0; currentHeight = 0; // backgroundcolors, etc... thisBoxSize = new HashMap(boxSize); if (pageSize.getBackgroundColor() != null || pageSize.hasBorders() || pageSize.getBorderColor() != null) { add(pageSize); } float oldleading = leading; int oldAlignment = alignment; // if there is a footer, the footer is added doFooter(); // we move to the left/top position of the page text.moveText(left(), top()); doHeader(); pageEmpty = true; // if there is an image waiting to be drawn, draw it try { if (imageWait != null) { add(imageWait); imageWait = null; } } catch(Exception e) { throw new ExceptionConverter(e); } leading = oldleading; alignment = oldAlignment; carriageReturn(); PdfPageEvent pageEvent = writer.getPageEvent(); if (pageEvent != null) { if (firstPageEvent) { pageEvent.onOpenDocument(writer, this); } pageEvent.onStartPage(writer, this); } firstPageEvent = false; }
class class_name[name] begin[{] method[initPage, return_type[void], modifier[protected], parameter[]] begin[{] member[.pageN] call[annotationsImp.resetAnnotations, parameter[]] assign[member[.pageResources], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PageResources, sub_type=None))] call[writer.resetContent, parameter[]] assign[member[.graphics], ClassCreator(arguments=[MemberReference(member=writer, 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=PdfContentByte, sub_type=None))] assign[member[.text], ClassCreator(arguments=[MemberReference(member=writer, 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=PdfContentByte, sub_type=None))] call[text.reset, parameter[]] call[text.beginText, parameter[]] assign[member[.textEmptySize], call[text.size, parameter[]]] assign[member[.markPoint], literal[0]] call[.setNewPageSizeAndMargins, parameter[]] assign[member[.imageEnd], literal[1]] assign[member[indentation.imageIndentRight], literal[0]] assign[member[indentation.imageIndentLeft], literal[0]] assign[member[indentation.indentBottom], literal[0]] assign[member[indentation.indentTop], literal[0]] assign[member[.currentHeight], literal[0]] assign[member[.thisBoxSize], ClassCreator(arguments=[MemberReference(member=boxSize, 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=HashMap, sub_type=None))] if[binary_operation[binary_operation[binary_operation[call[pageSize.getBackgroundColor, parameter[]], !=, literal[null]], ||, call[pageSize.hasBorders, parameter[]]], ||, binary_operation[call[pageSize.getBorderColor, parameter[]], !=, literal[null]]]] begin[{] call[.add, parameter[member[.pageSize]]] else begin[{] None end[}] local_variable[type[float], oldleading] local_variable[type[int], oldAlignment] call[.doFooter, parameter[]] call[text.moveText, parameter[call[.left, parameter[]], call[.top, parameter[]]]] call[.doHeader, parameter[]] assign[member[.pageEmpty], literal[true]] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=imageWait, 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=imageWait, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=imageWait, 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=ExceptionConverter, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) assign[member[.leading], member[.oldleading]] assign[member[.alignment], member[.oldAlignment]] call[.carriageReturn, parameter[]] local_variable[type[PdfPageEvent], pageEvent] if[binary_operation[member[.pageEvent], !=, literal[null]]] begin[{] if[member[.firstPageEvent]] begin[{] call[pageEvent.onOpenDocument, parameter[member[.writer], THIS[]]] else begin[{] None end[}] call[pageEvent.onStartPage, parameter[member[.writer], THIS[]]] else begin[{] None end[}] assign[member[.firstPageEvent], literal[false]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[initPage] operator[SEP] operator[SEP] Keyword[throws] identifier[DocumentException] { identifier[pageN] operator[++] operator[SEP] identifier[annotationsImp] operator[SEP] identifier[resetAnnotations] operator[SEP] operator[SEP] operator[SEP] identifier[pageResources] operator[=] Keyword[new] identifier[PageResources] operator[SEP] operator[SEP] operator[SEP] identifier[writer] operator[SEP] identifier[resetContent] operator[SEP] operator[SEP] operator[SEP] identifier[graphics] operator[=] Keyword[new] identifier[PdfContentByte] operator[SEP] identifier[writer] operator[SEP] operator[SEP] identifier[text] operator[=] Keyword[new] identifier[PdfContentByte] operator[SEP] identifier[writer] operator[SEP] operator[SEP] identifier[text] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[text] operator[SEP] identifier[beginText] operator[SEP] operator[SEP] operator[SEP] identifier[textEmptySize] operator[=] identifier[text] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[markPoint] operator[=] Other[0] operator[SEP] identifier[setNewPageSizeAndMargins] operator[SEP] operator[SEP] operator[SEP] identifier[imageEnd] operator[=] operator[-] Other[1] operator[SEP] identifier[indentation] operator[SEP] identifier[imageIndentRight] operator[=] Other[0] operator[SEP] identifier[indentation] operator[SEP] identifier[imageIndentLeft] operator[=] Other[0] operator[SEP] identifier[indentation] operator[SEP] identifier[indentBottom] operator[=] Other[0] operator[SEP] identifier[indentation] operator[SEP] identifier[indentTop] operator[=] Other[0] operator[SEP] identifier[currentHeight] operator[=] Other[0] operator[SEP] identifier[thisBoxSize] operator[=] Keyword[new] identifier[HashMap] operator[SEP] identifier[boxSize] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pageSize] operator[SEP] identifier[getBackgroundColor] operator[SEP] operator[SEP] operator[!=] Other[null] operator[||] identifier[pageSize] operator[SEP] identifier[hasBorders] operator[SEP] operator[SEP] operator[||] identifier[pageSize] operator[SEP] identifier[getBorderColor] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[add] operator[SEP] identifier[pageSize] operator[SEP] operator[SEP] } Keyword[float] identifier[oldleading] operator[=] identifier[leading] operator[SEP] Keyword[int] identifier[oldAlignment] operator[=] identifier[alignment] operator[SEP] identifier[doFooter] operator[SEP] operator[SEP] operator[SEP] identifier[text] operator[SEP] identifier[moveText] operator[SEP] identifier[left] operator[SEP] operator[SEP] , identifier[top] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[doHeader] operator[SEP] operator[SEP] operator[SEP] identifier[pageEmpty] operator[=] literal[boolean] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[imageWait] operator[!=] Other[null] operator[SEP] { identifier[add] operator[SEP] identifier[imageWait] operator[SEP] operator[SEP] identifier[imageWait] operator[=] Other[null] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ExceptionConverter] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[leading] operator[=] identifier[oldleading] operator[SEP] identifier[alignment] operator[=] identifier[oldAlignment] operator[SEP] identifier[carriageReturn] operator[SEP] operator[SEP] operator[SEP] identifier[PdfPageEvent] identifier[pageEvent] operator[=] identifier[writer] operator[SEP] identifier[getPageEvent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pageEvent] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[firstPageEvent] operator[SEP] { identifier[pageEvent] operator[SEP] identifier[onOpenDocument] operator[SEP] identifier[writer] , Keyword[this] operator[SEP] operator[SEP] } identifier[pageEvent] operator[SEP] identifier[onStartPage] operator[SEP] identifier[writer] , Keyword[this] operator[SEP] operator[SEP] } identifier[firstPageEvent] operator[=] literal[boolean] operator[SEP] }
@Override public final <T> int retrieveAndWriteEntities( final Map<String, Object> pAddParam, final Class<T> pEntityClass, final Writer pWriter) throws Exception { //e.g. "limit 20 offset 19": //e.g. "where (ITSID>0 and IDDATABASEBIRTH=2135) limit 20 offset 19": String conditions = (String) pAddParam.get("conditions"); int requestingDatabaseVersion = Integer .parseInt((String) pAddParam.get("requestingDatabaseVersion")); int databaseVersion = this.srvDatabase.getVersionDatabase(); List<T> entities = null; int entitiesCount = 0; DatabaseInfo di; if (requestingDatabaseVersion == databaseVersion) { try { this.srvDatabase.setIsAutocommit(false); this.srvDatabase. setTransactionIsolation(ISrvDatabase.TRANSACTION_READ_UNCOMMITTED); this.srvDatabase.beginTransaction(); di = getSrvOrm() .retrieveEntityWithConditions(pAddParam, DatabaseInfo.class, ""); String requestedDatabaseIdStr = (String) pAddParam .get("requestedDatabaseId"); if (requestedDatabaseIdStr != null) { int requestedDatabaseId = Integer.parseInt(requestedDatabaseIdStr); if (requestedDatabaseId != di.getDatabaseId()) { String error = "Different requested database ID! required/is: " + requestedDatabaseId + "/" + di.getDatabaseId(); this.logger.error(null, DatabaseWriterXml.class, error); pWriter.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); pWriter.write("<message error=\"" + error + "\">\n"); pWriter.write("</message>\n"); return entitiesCount; } } if (conditions == null) { entities = getSrvOrm().retrieveList(pAddParam, pEntityClass); } else { entities = getSrvOrm() .retrieveListWithConditions(pAddParam, pEntityClass, conditions); } entitiesCount = entities.size(); this.srvDatabase.commitTransaction(); } catch (Exception ex) { this.srvDatabase.rollBackTransaction(); throw ex; } finally { this.srvDatabase.releaseResources(); } this.logger.info(null, DatabaseWriterXml.class, "Start write entities of " + pEntityClass.getCanonicalName() + " count=" + entitiesCount); pWriter.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); pWriter.write("<message databaseId=\"" + di.getDatabaseId() + "\" databaseVersion=\"" + di.getDatabaseVersion() + "\" description=\"" + di.getDescription() + "\" entitiesCount=\"" + entitiesCount + "\">\n"); for (T entity : entities) { this.srvEntityWriter.write(pAddParam, entity, pWriter); } pWriter.write("</message>\n"); this.logger.info(null, DatabaseWriterXml.class, "Entities has been wrote"); } else { this.logger.error(null, DatabaseWriterXml.class, "Send error message - Different database version!"); pWriter.write("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); pWriter.write("<message error=\"Different database version!\">\n"); pWriter.write("</message>\n"); } return entitiesCount; }
class class_name[name] begin[{] method[retrieveAndWriteEntities, return_type[type[int]], modifier[final public], parameter[pAddParam, pEntityClass, pWriter]] begin[{] local_variable[type[String], conditions] local_variable[type[int], requestingDatabaseVersion] local_variable[type[int], databaseVersion] local_variable[type[List], entities] local_variable[type[int], entitiesCount] local_variable[type[DatabaseInfo], di] if[binary_operation[member[.requestingDatabaseVersion], ==, member[.databaseVersion]]] begin[{] TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=srvDatabase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setIsAutocommit, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=srvDatabase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=TRANSACTION_READ_UNCOMMITTED, postfix_operators=[], prefix_operators=[], qualifier=ISrvDatabase, selectors=[])], member=setTransactionIsolation, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=srvDatabase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=beginTransaction, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=di, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getSrvOrm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=pAddParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatabaseInfo, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=retrieveEntityWithConditions, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="requestedDatabaseId")], member=get, postfix_operators=[], prefix_operators=[], qualifier=pAddParam, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=requestedDatabaseIdStr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=requestedDatabaseIdStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=requestedDatabaseIdStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), name=requestedDatabaseId)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=requestedDatabaseId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getDatabaseId, postfix_operators=[], prefix_operators=[], qualifier=di, selectors=[], type_arguments=None), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Different requested database ID! required/is: "), operandr=MemberReference(member=requestedDatabaseId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+), operandr=MethodInvocation(arguments=[], member=getDatabaseId, postfix_operators=[], prefix_operators=[], qualifier=di, selectors=[], type_arguments=None), operator=+), name=error)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=logger, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatabaseWriterXml, sub_type=None)), MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")], member=write, postfix_operators=[], prefix_operators=[], qualifier=pWriter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="<message error=\""), operandr=MemberReference(member=error, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\">\n"), operator=+)], member=write, postfix_operators=[], prefix_operators=[], qualifier=pWriter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="</message>\n")], member=write, postfix_operators=[], prefix_operators=[], qualifier=pWriter, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=entitiesCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=conditions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=entities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getSrvOrm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=pAddParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pEntityClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=conditions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=retrieveListWithConditions, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=entities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getSrvOrm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=pAddParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pEntityClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=retrieveList, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=entitiesCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=entities, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=srvDatabase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=commitTransaction, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=srvDatabase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=rollBackTransaction, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=srvDatabase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=releaseResources, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], label=None, resources=None) THIS[member[None.logger]call[None.info, parameter[literal[null], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatabaseWriterXml, sub_type=None)), binary_operation[binary_operation[binary_operation[literal["Start write entities of "], +, call[pEntityClass.getCanonicalName, parameter[]]], +, literal[" count="]], +, member[.entitiesCount]]]]] call[pWriter.write, parameter[literal["<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"]]] call[pWriter.write, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["<message databaseId=\""], +, call[di.getDatabaseId, parameter[]]], +, literal["\" databaseVersion=\""]], +, call[di.getDatabaseVersion, parameter[]]], +, literal["\" description=\""]], +, call[di.getDescription, parameter[]]], +, literal["\" entitiesCount=\""]], +, member[.entitiesCount]], +, literal["\">\n"]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=srvEntityWriter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=pAddParam, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pWriter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=entities, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entity)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))), label=None) call[pWriter.write, parameter[literal["</message>\n"]]] THIS[member[None.logger]call[None.info, parameter[literal[null], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatabaseWriterXml, sub_type=None)), literal["Entities has been wrote"]]]] else begin[{] THIS[member[None.logger]call[None.error, parameter[literal[null], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DatabaseWriterXml, sub_type=None)), literal["Send error message - Different database version!"]]]] call[pWriter.write, parameter[literal["<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"]]] call[pWriter.write, parameter[literal["<message error=\"Different database version!\">\n"]]] call[pWriter.write, parameter[literal["</message>\n"]]] end[}] return[member[.entitiesCount]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] operator[<] identifier[T] operator[>] Keyword[int] identifier[retrieveAndWriteEntities] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pAddParam] , Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[pEntityClass] , Keyword[final] identifier[Writer] identifier[pWriter] operator[SEP] Keyword[throws] identifier[Exception] { identifier[String] identifier[conditions] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[pAddParam] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[requestingDatabaseVersion] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[pAddParam] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[databaseVersion] operator[=] Keyword[this] operator[SEP] identifier[srvDatabase] operator[SEP] identifier[getVersionDatabase] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[entities] operator[=] Other[null] operator[SEP] Keyword[int] identifier[entitiesCount] operator[=] Other[0] operator[SEP] identifier[DatabaseInfo] identifier[di] operator[SEP] Keyword[if] operator[SEP] identifier[requestingDatabaseVersion] operator[==] identifier[databaseVersion] operator[SEP] { Keyword[try] { Keyword[this] operator[SEP] identifier[srvDatabase] operator[SEP] identifier[setIsAutocommit] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[srvDatabase] operator[SEP] identifier[setTransactionIsolation] operator[SEP] identifier[ISrvDatabase] operator[SEP] identifier[TRANSACTION_READ_UNCOMMITTED] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[srvDatabase] operator[SEP] identifier[beginTransaction] operator[SEP] operator[SEP] operator[SEP] identifier[di] operator[=] identifier[getSrvOrm] operator[SEP] operator[SEP] operator[SEP] identifier[retrieveEntityWithConditions] operator[SEP] identifier[pAddParam] , identifier[DatabaseInfo] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[String] identifier[requestedDatabaseIdStr] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[pAddParam] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[requestedDatabaseIdStr] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[requestedDatabaseId] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[requestedDatabaseIdStr] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[requestedDatabaseId] operator[!=] identifier[di] operator[SEP] identifier[getDatabaseId] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[error] operator[=] literal[String] operator[+] identifier[requestedDatabaseId] operator[+] literal[String] operator[+] identifier[di] operator[SEP] identifier[getDatabaseId] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[error] operator[SEP] Other[null] , identifier[DatabaseWriterXml] operator[SEP] Keyword[class] , identifier[error] operator[SEP] operator[SEP] identifier[pWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[pWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[error] operator[+] literal[String] operator[SEP] operator[SEP] identifier[pWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[entitiesCount] operator[SEP] } } Keyword[if] operator[SEP] identifier[conditions] operator[==] Other[null] operator[SEP] { identifier[entities] operator[=] identifier[getSrvOrm] operator[SEP] operator[SEP] operator[SEP] identifier[retrieveList] operator[SEP] identifier[pAddParam] , identifier[pEntityClass] operator[SEP] operator[SEP] } Keyword[else] { identifier[entities] operator[=] identifier[getSrvOrm] operator[SEP] operator[SEP] operator[SEP] identifier[retrieveListWithConditions] operator[SEP] identifier[pAddParam] , identifier[pEntityClass] , identifier[conditions] operator[SEP] operator[SEP] } identifier[entitiesCount] operator[=] identifier[entities] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[srvDatabase] operator[SEP] identifier[commitTransaction] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[this] operator[SEP] identifier[srvDatabase] operator[SEP] identifier[rollBackTransaction] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] identifier[ex] operator[SEP] } Keyword[finally] { Keyword[this] operator[SEP] identifier[srvDatabase] operator[SEP] identifier[releaseResources] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] Other[null] , identifier[DatabaseWriterXml] operator[SEP] Keyword[class] , literal[String] operator[+] identifier[pEntityClass] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[entitiesCount] operator[SEP] operator[SEP] identifier[pWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[pWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[+] identifier[di] operator[SEP] identifier[getDatabaseId] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[di] operator[SEP] identifier[getDatabaseVersion] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[di] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[entitiesCount] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[T] identifier[entity] operator[:] identifier[entities] operator[SEP] { Keyword[this] operator[SEP] identifier[srvEntityWriter] operator[SEP] identifier[write] operator[SEP] identifier[pAddParam] , identifier[entity] , identifier[pWriter] operator[SEP] operator[SEP] } identifier[pWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] Other[null] , identifier[DatabaseWriterXml] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[logger] operator[SEP] identifier[error] operator[SEP] Other[null] , identifier[DatabaseWriterXml] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[pWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[pWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[pWriter] operator[SEP] identifier[write] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[entitiesCount] operator[SEP] }
public EEnum getIfcProjectOrderTypeEnum() { if (ifcProjectOrderTypeEnumEEnum == null) { ifcProjectOrderTypeEnumEEnum = (EEnum) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(875); } return ifcProjectOrderTypeEnumEEnum; }
class class_name[name] begin[{] method[getIfcProjectOrderTypeEnum, return_type[type[EEnum]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcProjectOrderTypeEnumEEnum], ==, literal[null]]] begin[{] assign[member[.ifcProjectOrderTypeEnumEEnum], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc2x3tc1Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=875)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EEnum, sub_type=None))] else begin[{] None end[}] return[member[.ifcProjectOrderTypeEnumEEnum]] end[}] END[}]
Keyword[public] identifier[EEnum] identifier[getIfcProjectOrderTypeEnum] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcProjectOrderTypeEnumEEnum] operator[==] Other[null] operator[SEP] { identifier[ifcProjectOrderTypeEnumEEnum] operator[=] operator[SEP] identifier[EEnum] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc2x3tc1Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[875] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcProjectOrderTypeEnumEEnum] operator[SEP] }
@SuppressFBWarnings(value = "GC_UNRELATED_TYPES", justification = "Cross-comparison is intended") public Class<?> find(ClassLoader classLoader, T key) { ConcurrentMap<T, Reference<Class<?>>> storage = cache.get(new LookupKey(classLoader)); if (storage == null) { return NOT_FOUND; } else { Reference<Class<?>> reference = storage.get(key); if (reference == null) { return NOT_FOUND; } else { return reference.get(); } } }
class class_name[name] begin[{] method[find, return_type[type[Class]], modifier[public], parameter[classLoader, key]] begin[{] local_variable[type[ConcurrentMap], storage] if[binary_operation[member[.storage], ==, literal[null]]] begin[{] return[member[.NOT_FOUND]] else begin[{] local_variable[type[Reference], reference] if[binary_operation[member[.reference], ==, literal[null]]] begin[{] return[member[.NOT_FOUND]] else begin[{] return[call[reference.get, parameter[]]] end[}] end[}] end[}] END[}]
annotation[@] identifier[SuppressFBWarnings] operator[SEP] identifier[value] operator[=] literal[String] , identifier[justification] operator[=] literal[String] operator[SEP] Keyword[public] identifier[Class] operator[<] operator[?] operator[>] identifier[find] operator[SEP] identifier[ClassLoader] identifier[classLoader] , identifier[T] identifier[key] operator[SEP] { identifier[ConcurrentMap] operator[<] identifier[T] , identifier[Reference] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] operator[>] identifier[storage] operator[=] identifier[cache] operator[SEP] identifier[get] operator[SEP] Keyword[new] identifier[LookupKey] operator[SEP] identifier[classLoader] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[storage] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[NOT_FOUND] operator[SEP] } Keyword[else] { identifier[Reference] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[reference] operator[=] identifier[storage] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[reference] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[NOT_FOUND] operator[SEP] } Keyword[else] { Keyword[return] identifier[reference] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] } } }
void write(ObjectOutputStream out) throws IOException { PutField fields = out.putFields(); fields.put(CONTEXT, threadContextDescriptor.serialize()); fields.put(EXEC_PROPS, threadContextDescriptor.getExecutionProperties()); fields.put(INTERNAL_PROP_NAMES, internalPropNames); ByteArrayOutputStream bout = new ByteArrayOutputStream(); ObjectOutputStream oout = new ObjectOutputStream(bout); oout.writeObject(object); oout.flush(); fields.put(OBJECT, bout.toByteArray()); oout.close(); out.writeFields(); }
class class_name[name] begin[{] method[write, return_type[void], modifier[default], parameter[out]] begin[{] local_variable[type[PutField], fields] call[fields.put, parameter[member[.CONTEXT], call[threadContextDescriptor.serialize, parameter[]]]] call[fields.put, parameter[member[.EXEC_PROPS], call[threadContextDescriptor.getExecutionProperties, parameter[]]]] call[fields.put, parameter[member[.INTERNAL_PROP_NAMES], member[.internalPropNames]]] local_variable[type[ByteArrayOutputStream], bout] local_variable[type[ObjectOutputStream], oout] call[oout.writeObject, parameter[member[.object]]] call[oout.flush, parameter[]] call[fields.put, parameter[member[.OBJECT], call[bout.toByteArray, parameter[]]]] call[oout.close, parameter[]] call[out.writeFields, parameter[]] end[}] END[}]
Keyword[void] identifier[write] operator[SEP] identifier[ObjectOutputStream] identifier[out] operator[SEP] Keyword[throws] identifier[IOException] { identifier[PutField] identifier[fields] operator[=] identifier[out] operator[SEP] identifier[putFields] operator[SEP] operator[SEP] operator[SEP] identifier[fields] operator[SEP] identifier[put] operator[SEP] identifier[CONTEXT] , identifier[threadContextDescriptor] operator[SEP] identifier[serialize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fields] operator[SEP] identifier[put] operator[SEP] identifier[EXEC_PROPS] , identifier[threadContextDescriptor] operator[SEP] identifier[getExecutionProperties] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fields] operator[SEP] identifier[put] operator[SEP] identifier[INTERNAL_PROP_NAMES] , identifier[internalPropNames] operator[SEP] operator[SEP] identifier[ByteArrayOutputStream] identifier[bout] operator[=] Keyword[new] identifier[ByteArrayOutputStream] operator[SEP] operator[SEP] operator[SEP] identifier[ObjectOutputStream] identifier[oout] operator[=] Keyword[new] identifier[ObjectOutputStream] operator[SEP] identifier[bout] operator[SEP] operator[SEP] identifier[oout] operator[SEP] identifier[writeObject] operator[SEP] identifier[object] operator[SEP] operator[SEP] identifier[oout] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] identifier[fields] operator[SEP] identifier[put] operator[SEP] identifier[OBJECT] , identifier[bout] operator[SEP] identifier[toByteArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[oout] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[writeFields] operator[SEP] operator[SEP] operator[SEP] }
@Override public ScheduledFuture<?> schedule(Runnable task, Date startTime) { long initialDelay = startTime.getTime() - System.currentTimeMillis(); try { return this.scheduledExecutor.schedule(decorateTask(task, false), initialDelay, TimeUnit.MILLISECONDS); } catch (RejectedExecutionException ex) { throw new TaskRejectedException("Executor [" + this.scheduledExecutor + "] did not accept task: " + task, ex); } }
class class_name[name] begin[{] method[schedule, return_type[type[ScheduledFuture]], modifier[public], parameter[task, startTime]] begin[{] local_variable[type[long], initialDelay] TryStatement(block=[ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=scheduledExecutor, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=decorateTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=initialDelay, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MILLISECONDS, postfix_operators=[], prefix_operators=[], qualifier=TimeUnit, selectors=[])], member=schedule, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Executor ["), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=scheduledExecutor, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] did not accept task: "), operator=+), operandr=MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TaskRejectedException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['RejectedExecutionException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ScheduledFuture] operator[<] operator[?] operator[>] identifier[schedule] operator[SEP] identifier[Runnable] identifier[task] , identifier[Date] identifier[startTime] operator[SEP] { Keyword[long] identifier[initialDelay] operator[=] identifier[startTime] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[-] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] Keyword[this] operator[SEP] identifier[scheduledExecutor] operator[SEP] identifier[schedule] operator[SEP] identifier[decorateTask] operator[SEP] identifier[task] , literal[boolean] operator[SEP] , identifier[initialDelay] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RejectedExecutionException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[TaskRejectedException] operator[SEP] literal[String] operator[+] Keyword[this] operator[SEP] identifier[scheduledExecutor] operator[+] literal[String] operator[+] identifier[task] , identifier[ex] operator[SEP] operator[SEP] } }
private void check() throws CouchbaseLiteException { synchronized (lock) { if (c4query != null) { return; } database = (Database) from.getSource(); final String json = encodeAsJson(); Log.v(DOMAIN, "Query encoded as %s", json); if (json == null) { throw new CouchbaseLiteException("Failed to generate JSON query."); } if (columnNames == null) { columnNames = generateColumnNames(); } try { c4query = database.getC4Database().createQuery(json); } catch (LiteCoreException e) { throw CBLStatus.convertException(e); } } }
class class_name[name] begin[{] method[check, return_type[void], modifier[private], parameter[]] begin[{] SYNCHRONIZED[member[.lock]] BEGIN[{] if[binary_operation[member[.c4query], !=, literal[null]]] begin[{] return[None] else begin[{] None end[}] assign[member[.database], Cast(expression=MethodInvocation(arguments=[], member=getSource, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Database, sub_type=None))] local_variable[type[String], json] call[Log.v, parameter[member[.DOMAIN], literal["Query encoded as %s"], member[.json]]] if[binary_operation[member[.json], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to generate JSON query.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CouchbaseLiteException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.columnNames], ==, literal[null]]] begin[{] assign[member[.columnNames], call[.generateColumnNames, parameter[]]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c4query, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getC4Database, postfix_operators=[], prefix_operators=[], qualifier=database, selectors=[MethodInvocation(arguments=[MemberReference(member=json, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createQuery, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convertException, postfix_operators=[], prefix_operators=[], qualifier=CBLStatus, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['LiteCoreException']))], finally_block=None, label=None, resources=None) END[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[check] operator[SEP] operator[SEP] Keyword[throws] identifier[CouchbaseLiteException] { Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] { Keyword[if] operator[SEP] identifier[c4query] operator[!=] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[database] operator[=] operator[SEP] identifier[Database] operator[SEP] identifier[from] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[json] operator[=] identifier[encodeAsJson] operator[SEP] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[v] operator[SEP] identifier[DOMAIN] , literal[String] , identifier[json] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[json] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[CouchbaseLiteException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[columnNames] operator[==] Other[null] operator[SEP] { identifier[columnNames] operator[=] identifier[generateColumnNames] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[c4query] operator[=] identifier[database] operator[SEP] identifier[getC4Database] operator[SEP] operator[SEP] operator[SEP] identifier[createQuery] operator[SEP] identifier[json] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[LiteCoreException] identifier[e] operator[SEP] { Keyword[throw] identifier[CBLStatus] operator[SEP] identifier[convertException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } }
@Override public EClass getIfcAdvancedFace() { if (ifcAdvancedFaceEClass == null) { ifcAdvancedFaceEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(9); } return ifcAdvancedFaceEClass; }
class class_name[name] begin[{] method[getIfcAdvancedFace, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcAdvancedFaceEClass], ==, literal[null]]] begin[{] assign[member[.ifcAdvancedFaceEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcAdvancedFaceEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcAdvancedFace] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcAdvancedFaceEClass] operator[==] Other[null] operator[SEP] { identifier[ifcAdvancedFaceEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[9] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcAdvancedFaceEClass] operator[SEP] }
public static <T extends ImageBase<T>> void rectifyImages(T distortedLeft, T distortedRight, Se3_F64 leftToRight, CameraPinholeBrown intrinsicLeft, CameraPinholeBrown intrinsicRight, T rectifiedLeft, T rectifiedRight, GrayU8 rectifiedMask, DMatrixRMaj rectifiedK, DMatrixRMaj rectifiedR) { RectifyCalibrated rectifyAlg = RectifyImageOps.createCalibrated(); // original camera calibration matrices DMatrixRMaj K1 = PerspectiveOps.pinholeToMatrix(intrinsicLeft, (DMatrixRMaj)null); DMatrixRMaj K2 = PerspectiveOps.pinholeToMatrix(intrinsicRight, (DMatrixRMaj)null); rectifyAlg.process(K1, new Se3_F64(), K2, leftToRight); // rectification matrix for each image DMatrixRMaj rect1 = rectifyAlg.getRect1(); DMatrixRMaj rect2 = rectifyAlg.getRect2(); rectifiedR.set(rectifyAlg.getRectifiedRotation()); // New calibration matrix, rectifiedK.set(rectifyAlg.getCalibrationMatrix()); // Adjust the rectification to make the view area more useful RectifyImageOps.fullViewLeft(intrinsicLeft, rect1, rect2, rectifiedK); // undistorted and rectify images FMatrixRMaj rect1_F32 = new FMatrixRMaj(3,3); FMatrixRMaj rect2_F32 = new FMatrixRMaj(3,3); ConvertMatrixData.convert(rect1, rect1_F32); ConvertMatrixData.convert(rect2, rect2_F32); // Extending the image prevents a harsh edge reducing false matches at the image border // SKIP is another option, possibly a tinny bit faster, but has a harsh edge which will need to be filtered ImageDistort<T,T> distortLeft = RectifyImageOps.rectifyImage(intrinsicLeft, rect1_F32, BorderType.EXTENDED, distortedLeft.getImageType()); ImageDistort<T,T> distortRight = RectifyImageOps.rectifyImage(intrinsicRight, rect2_F32, BorderType.EXTENDED, distortedRight.getImageType()); distortLeft.apply(distortedLeft, rectifiedLeft,rectifiedMask); distortRight.apply(distortedRight, rectifiedRight); }
class class_name[name] begin[{] method[rectifyImages, return_type[void], modifier[public static], parameter[distortedLeft, distortedRight, leftToRight, intrinsicLeft, intrinsicRight, rectifiedLeft, rectifiedRight, rectifiedMask, rectifiedK, rectifiedR]] begin[{] local_variable[type[RectifyCalibrated], rectifyAlg] local_variable[type[DMatrixRMaj], K1] local_variable[type[DMatrixRMaj], K2] call[rectifyAlg.process, parameter[member[.K1], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Se3_F64, sub_type=None)), member[.K2], member[.leftToRight]]] local_variable[type[DMatrixRMaj], rect1] local_variable[type[DMatrixRMaj], rect2] call[rectifiedR.set, parameter[call[rectifyAlg.getRectifiedRotation, parameter[]]]] call[rectifiedK.set, parameter[call[rectifyAlg.getCalibrationMatrix, parameter[]]]] call[RectifyImageOps.fullViewLeft, parameter[member[.intrinsicLeft], member[.rect1], member[.rect2], member[.rectifiedK]]] local_variable[type[FMatrixRMaj], rect1_F32] local_variable[type[FMatrixRMaj], rect2_F32] call[ConvertMatrixData.convert, parameter[member[.rect1], member[.rect1_F32]]] call[ConvertMatrixData.convert, parameter[member[.rect2], member[.rect2_F32]]] local_variable[type[ImageDistort], distortLeft] local_variable[type[ImageDistort], distortRight] call[distortLeft.apply, parameter[member[.distortedLeft], member[.rectifiedLeft], member[.rectifiedMask]]] call[distortRight.apply, parameter[member[.distortedRight], member[.rectifiedRight]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[ImageBase] operator[<] identifier[T] operator[>] operator[>] Keyword[void] identifier[rectifyImages] operator[SEP] identifier[T] identifier[distortedLeft] , identifier[T] identifier[distortedRight] , identifier[Se3_F64] identifier[leftToRight] , identifier[CameraPinholeBrown] identifier[intrinsicLeft] , identifier[CameraPinholeBrown] identifier[intrinsicRight] , identifier[T] identifier[rectifiedLeft] , identifier[T] identifier[rectifiedRight] , identifier[GrayU8] identifier[rectifiedMask] , identifier[DMatrixRMaj] identifier[rectifiedK] , identifier[DMatrixRMaj] identifier[rectifiedR] operator[SEP] { identifier[RectifyCalibrated] identifier[rectifyAlg] operator[=] identifier[RectifyImageOps] operator[SEP] identifier[createCalibrated] operator[SEP] operator[SEP] operator[SEP] identifier[DMatrixRMaj] identifier[K1] operator[=] identifier[PerspectiveOps] operator[SEP] identifier[pinholeToMatrix] operator[SEP] identifier[intrinsicLeft] , operator[SEP] identifier[DMatrixRMaj] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[DMatrixRMaj] identifier[K2] operator[=] identifier[PerspectiveOps] operator[SEP] identifier[pinholeToMatrix] operator[SEP] identifier[intrinsicRight] , operator[SEP] identifier[DMatrixRMaj] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[rectifyAlg] operator[SEP] identifier[process] operator[SEP] identifier[K1] , Keyword[new] identifier[Se3_F64] operator[SEP] operator[SEP] , identifier[K2] , identifier[leftToRight] operator[SEP] operator[SEP] identifier[DMatrixRMaj] identifier[rect1] operator[=] identifier[rectifyAlg] operator[SEP] identifier[getRect1] operator[SEP] operator[SEP] operator[SEP] identifier[DMatrixRMaj] identifier[rect2] operator[=] identifier[rectifyAlg] operator[SEP] identifier[getRect2] operator[SEP] operator[SEP] operator[SEP] identifier[rectifiedR] operator[SEP] identifier[set] operator[SEP] identifier[rectifyAlg] operator[SEP] identifier[getRectifiedRotation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[rectifiedK] operator[SEP] identifier[set] operator[SEP] identifier[rectifyAlg] operator[SEP] identifier[getCalibrationMatrix] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[RectifyImageOps] operator[SEP] identifier[fullViewLeft] operator[SEP] identifier[intrinsicLeft] , identifier[rect1] , identifier[rect2] , identifier[rectifiedK] operator[SEP] operator[SEP] identifier[FMatrixRMaj] identifier[rect1_F32] operator[=] Keyword[new] identifier[FMatrixRMaj] operator[SEP] Other[3] , Other[3] operator[SEP] operator[SEP] identifier[FMatrixRMaj] identifier[rect2_F32] operator[=] Keyword[new] identifier[FMatrixRMaj] operator[SEP] Other[3] , Other[3] operator[SEP] operator[SEP] identifier[ConvertMatrixData] operator[SEP] identifier[convert] operator[SEP] identifier[rect1] , identifier[rect1_F32] operator[SEP] operator[SEP] identifier[ConvertMatrixData] operator[SEP] identifier[convert] operator[SEP] identifier[rect2] , identifier[rect2_F32] operator[SEP] operator[SEP] identifier[ImageDistort] operator[<] identifier[T] , identifier[T] operator[>] identifier[distortLeft] operator[=] identifier[RectifyImageOps] operator[SEP] identifier[rectifyImage] operator[SEP] identifier[intrinsicLeft] , identifier[rect1_F32] , identifier[BorderType] operator[SEP] identifier[EXTENDED] , identifier[distortedLeft] operator[SEP] identifier[getImageType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ImageDistort] operator[<] identifier[T] , identifier[T] operator[>] identifier[distortRight] operator[=] identifier[RectifyImageOps] operator[SEP] identifier[rectifyImage] operator[SEP] identifier[intrinsicRight] , identifier[rect2_F32] , identifier[BorderType] operator[SEP] identifier[EXTENDED] , identifier[distortedRight] operator[SEP] identifier[getImageType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[distortLeft] operator[SEP] identifier[apply] operator[SEP] identifier[distortedLeft] , identifier[rectifiedLeft] , identifier[rectifiedMask] operator[SEP] operator[SEP] identifier[distortRight] operator[SEP] identifier[apply] operator[SEP] identifier[distortedRight] , identifier[rectifiedRight] operator[SEP] operator[SEP] }
protected Map<String, String> initialize(final Map<String, Object> attributes) { val cachedAttributesToEncode = new HashMap<String, String>(); removeAttributeAndCacheForEncoding(attributes, cachedAttributesToEncode, CasViewConstants.MODEL_ATTRIBUTE_NAME_PRINCIPAL_CREDENTIAL); removeAttributeAndCacheForEncoding(attributes, cachedAttributesToEncode, CasViewConstants.MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET); removeAttributeAndCacheForEncoding(attributes, cachedAttributesToEncode, CasViewConstants.MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET_IOU); return cachedAttributesToEncode; }
class class_name[name] begin[{] method[initialize, return_type[type[Map]], modifier[protected], parameter[attributes]] begin[{] local_variable[type[val], cachedAttributesToEncode] call[.removeAttributeAndCacheForEncoding, parameter[member[.attributes], member[.cachedAttributesToEncode], member[CasViewConstants.MODEL_ATTRIBUTE_NAME_PRINCIPAL_CREDENTIAL]]] call[.removeAttributeAndCacheForEncoding, parameter[member[.attributes], member[.cachedAttributesToEncode], member[CasViewConstants.MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET]]] call[.removeAttributeAndCacheForEncoding, parameter[member[.attributes], member[.cachedAttributesToEncode], member[CasViewConstants.MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET_IOU]]] return[member[.cachedAttributesToEncode]] end[}] END[}]
Keyword[protected] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[initialize] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[attributes] operator[SEP] { identifier[val] identifier[cachedAttributesToEncode] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[removeAttributeAndCacheForEncoding] operator[SEP] identifier[attributes] , identifier[cachedAttributesToEncode] , identifier[CasViewConstants] operator[SEP] identifier[MODEL_ATTRIBUTE_NAME_PRINCIPAL_CREDENTIAL] operator[SEP] operator[SEP] identifier[removeAttributeAndCacheForEncoding] operator[SEP] identifier[attributes] , identifier[cachedAttributesToEncode] , identifier[CasViewConstants] operator[SEP] identifier[MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET] operator[SEP] operator[SEP] identifier[removeAttributeAndCacheForEncoding] operator[SEP] identifier[attributes] , identifier[cachedAttributesToEncode] , identifier[CasViewConstants] operator[SEP] identifier[MODEL_ATTRIBUTE_NAME_PROXY_GRANTING_TICKET_IOU] operator[SEP] operator[SEP] Keyword[return] identifier[cachedAttributesToEncode] operator[SEP] }
public void update(final HllSketch sketch) { gadget.hllSketchImpl = unionImpl(sketch.hllSketchImpl, gadget.hllSketchImpl, lgMaxK); }
class class_name[name] begin[{] method[update, return_type[void], modifier[public], parameter[sketch]] begin[{] assign[member[gadget.hllSketchImpl], call[.unionImpl, parameter[member[sketch.hllSketchImpl], member[gadget.hllSketchImpl], member[.lgMaxK]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[update] operator[SEP] Keyword[final] identifier[HllSketch] identifier[sketch] operator[SEP] { identifier[gadget] operator[SEP] identifier[hllSketchImpl] operator[=] identifier[unionImpl] operator[SEP] identifier[sketch] operator[SEP] identifier[hllSketchImpl] , identifier[gadget] operator[SEP] identifier[hllSketchImpl] , identifier[lgMaxK] operator[SEP] operator[SEP] }
public void addBlockMeta(BlockMeta blockMeta) throws WorkerOutOfSpaceException, BlockAlreadyExistsException { Preconditions.checkNotNull(blockMeta, "blockMeta"); long blockId = blockMeta.getBlockId(); long blockSize = blockMeta.getBlockSize(); if (getAvailableBytes() < blockSize) { throw new WorkerOutOfSpaceException(ExceptionMessage.NO_SPACE_FOR_BLOCK_META, blockId, blockSize, getAvailableBytes(), blockMeta.getBlockLocation().tierAlias()); } if (hasBlockMeta(blockId)) { throw new BlockAlreadyExistsException(ExceptionMessage.ADD_EXISTING_BLOCK, blockId, blockMeta .getBlockLocation().tierAlias()); } mBlockIdToBlockMap.put(blockId, blockMeta); reserveSpace(blockSize, true); }
class class_name[name] begin[{] method[addBlockMeta, return_type[void], modifier[public], parameter[blockMeta]] begin[{] call[Preconditions.checkNotNull, parameter[member[.blockMeta], literal["blockMeta"]]] local_variable[type[long], blockId] local_variable[type[long], blockSize] if[binary_operation[call[.getAvailableBytes, parameter[]], <, member[.blockSize]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=NO_SPACE_FOR_BLOCK_META, postfix_operators=[], prefix_operators=[], qualifier=ExceptionMessage, selectors=[]), MemberReference(member=blockId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=blockSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getAvailableBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getBlockLocation, postfix_operators=[], prefix_operators=[], qualifier=blockMeta, selectors=[MethodInvocation(arguments=[], member=tierAlias, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=WorkerOutOfSpaceException, sub_type=None)), label=None) else begin[{] None end[}] if[call[.hasBlockMeta, parameter[member[.blockId]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ADD_EXISTING_BLOCK, postfix_operators=[], prefix_operators=[], qualifier=ExceptionMessage, selectors=[]), MemberReference(member=blockId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getBlockLocation, postfix_operators=[], prefix_operators=[], qualifier=blockMeta, selectors=[MethodInvocation(arguments=[], member=tierAlias, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BlockAlreadyExistsException, sub_type=None)), label=None) else begin[{] None end[}] call[mBlockIdToBlockMap.put, parameter[member[.blockId], member[.blockMeta]]] call[.reserveSpace, parameter[member[.blockSize], literal[true]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addBlockMeta] operator[SEP] identifier[BlockMeta] identifier[blockMeta] operator[SEP] Keyword[throws] identifier[WorkerOutOfSpaceException] , identifier[BlockAlreadyExistsException] { identifier[Preconditions] operator[SEP] identifier[checkNotNull] operator[SEP] identifier[blockMeta] , literal[String] operator[SEP] operator[SEP] Keyword[long] identifier[blockId] operator[=] identifier[blockMeta] operator[SEP] identifier[getBlockId] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[blockSize] operator[=] identifier[blockMeta] operator[SEP] identifier[getBlockSize] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[getAvailableBytes] operator[SEP] operator[SEP] operator[<] identifier[blockSize] operator[SEP] { Keyword[throw] Keyword[new] identifier[WorkerOutOfSpaceException] operator[SEP] identifier[ExceptionMessage] operator[SEP] identifier[NO_SPACE_FOR_BLOCK_META] , identifier[blockId] , identifier[blockSize] , identifier[getAvailableBytes] operator[SEP] operator[SEP] , identifier[blockMeta] operator[SEP] identifier[getBlockLocation] operator[SEP] operator[SEP] operator[SEP] identifier[tierAlias] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[hasBlockMeta] operator[SEP] identifier[blockId] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[BlockAlreadyExistsException] operator[SEP] identifier[ExceptionMessage] operator[SEP] identifier[ADD_EXISTING_BLOCK] , identifier[blockId] , identifier[blockMeta] operator[SEP] identifier[getBlockLocation] operator[SEP] operator[SEP] operator[SEP] identifier[tierAlias] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[mBlockIdToBlockMap] operator[SEP] identifier[put] operator[SEP] identifier[blockId] , identifier[blockMeta] operator[SEP] operator[SEP] identifier[reserveSpace] operator[SEP] identifier[blockSize] , literal[boolean] operator[SEP] operator[SEP] }
private void invalidateConsumerKey(String nic, String currentCK) throws IOException { config.invalidateConsumerKey(nic, currentCK); }
class class_name[name] begin[{] method[invalidateConsumerKey, return_type[void], modifier[private], parameter[nic, currentCK]] begin[{] call[config.invalidateConsumerKey, parameter[member[.nic], member[.currentCK]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[invalidateConsumerKey] operator[SEP] identifier[String] identifier[nic] , identifier[String] identifier[currentCK] operator[SEP] Keyword[throws] identifier[IOException] { identifier[config] operator[SEP] identifier[invalidateConsumerKey] operator[SEP] identifier[nic] , identifier[currentCK] operator[SEP] operator[SEP] }
@Override public final void setJmsDeliveryMode(PersistenceType value) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "setJmsDeliveryMode", value); getHdr2().setField(JsHdr2Access.JMSDELIVERYMODE_DATA, value.toByte()); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setJmsDeliveryMode"); }
class class_name[name] begin[{] method[setJmsDeliveryMode, return_type[void], modifier[final public], parameter[value]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["setJmsDeliveryMode"], member[.value]]] else begin[{] None end[}] call[.getHdr2, parameter[]] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["setJmsDeliveryMode"]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[void] identifier[setJmsDeliveryMode] operator[SEP] identifier[PersistenceType] identifier[value] 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] Keyword[this] , identifier[tc] , literal[String] , identifier[value] operator[SEP] operator[SEP] identifier[getHdr2] operator[SEP] operator[SEP] operator[SEP] identifier[setField] operator[SEP] identifier[JsHdr2Access] operator[SEP] identifier[JMSDELIVERYMODE_DATA] , identifier[value] operator[SEP] identifier[toByte] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public void removePhaseListener(PhaseListener phaseListener) { if (phaseListener == null) { return; } getStateHelper().remove(PropertyKeys.phaseListeners, phaseListener); }
class class_name[name] begin[{] method[removePhaseListener, return_type[void], modifier[public], parameter[phaseListener]] begin[{] if[binary_operation[member[.phaseListener], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] call[.getStateHelper, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[removePhaseListener] operator[SEP] identifier[PhaseListener] identifier[phaseListener] operator[SEP] { Keyword[if] operator[SEP] identifier[phaseListener] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[getStateHelper] operator[SEP] operator[SEP] operator[SEP] identifier[remove] operator[SEP] identifier[PropertyKeys] operator[SEP] identifier[phaseListeners] , identifier[phaseListener] operator[SEP] operator[SEP] }
public long count(String[] indices, String[] types, QueryBuilder filterQueryBuilder) { return countQuery(getSearchRequestBuilderWithMatchAll(false, indices, types, filterQueryBuilder)); }
class class_name[name] begin[{] method[count, return_type[type[long]], modifier[public], parameter[indices, types, filterQueryBuilder]] begin[{] return[call[.countQuery, parameter[call[.getSearchRequestBuilderWithMatchAll, parameter[literal[false], member[.indices], member[.types], member[.filterQueryBuilder]]]]]] end[}] END[}]
Keyword[public] Keyword[long] identifier[count] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[indices] , identifier[String] operator[SEP] operator[SEP] identifier[types] , identifier[QueryBuilder] identifier[filterQueryBuilder] operator[SEP] { Keyword[return] identifier[countQuery] operator[SEP] identifier[getSearchRequestBuilderWithMatchAll] operator[SEP] literal[boolean] , identifier[indices] , identifier[types] , identifier[filterQueryBuilder] operator[SEP] operator[SEP] operator[SEP] }
private void loadHeaderRows(final SheetConfiguration sheetConfig, final Map<String, CellRangeAddress> cellRangeMap, final List<String> skippedRegionCells) { int top = sheetConfig.getHeaderCellRange().getTopRow(); int bottom = sheetConfig.getHeaderCellRange().getBottomRow(); int left = sheetConfig.getHeaderCellRange().getLeftCol(); int right = sheetConfig.getHeaderCellRange().getRightCol(); String sheetName = sheetConfig.getSheetName(); Sheet sheet1 = parent.getWb().getSheet(sheetName); int totalWidth = CellStyleUtility.calcTotalWidth(sheet1, left, right, WebSheetUtility.pixel2WidthUnits(parent.getLineNumberColumnWidth() + parent.getAddRowColumnWidth())); RangeBuildRef rangeBuildRef = new RangeBuildRef(left, right, totalWidth, sheet1); if (sheetConfig.isFixedWidthStyle()) { parent.setTableWidthStyle( "table-layout: fixed; width:" + WebSheetUtility.widthUnits2Pixel(totalWidth) + "px;"); } parent.setLineNumberColumnWidthStyle( getWidthStyle(WebSheetUtility.pixel2WidthUnits(parent.getLineNumberColumnWidth()), totalWidth)); parent.setAddRowColumnWidthStyle("width:" + parent.getAddRowColumnWidth() + "px;"); parent.getHeaderRows().clear(); if (top < 0) { // this is blank configuration. set column letter as header parent.getHeaderRows().add(loadHeaderRowWithoutConfigurationTab(rangeBuildRef, true)); // set showlinenumber to true as default parent.setShowLineNumber(true); } else { parent.getHeaderRows().add(loadHeaderRowWithoutConfigurationTab(rangeBuildRef, false)); for (int i = top; i <= bottom; i++) { parent.getHeaderRows().add(loadHeaderRowWithConfigurationTab(sheetConfig, rangeBuildRef, i, cellRangeMap, skippedRegionCells)); } // set showlinenumber to false as default parent.setShowLineNumber(false); } }
class class_name[name] begin[{] method[loadHeaderRows, return_type[void], modifier[private], parameter[sheetConfig, cellRangeMap, skippedRegionCells]] begin[{] local_variable[type[int], top] local_variable[type[int], bottom] local_variable[type[int], left] local_variable[type[int], right] local_variable[type[String], sheetName] local_variable[type[Sheet], sheet1] local_variable[type[int], totalWidth] local_variable[type[RangeBuildRef], rangeBuildRef] if[call[sheetConfig.isFixedWidthStyle, parameter[]]] begin[{] call[parent.setTableWidthStyle, parameter[binary_operation[binary_operation[literal["table-layout: fixed; width:"], +, call[WebSheetUtility.widthUnits2Pixel, parameter[member[.totalWidth]]]], +, literal["px;"]]]] else begin[{] None end[}] call[parent.setLineNumberColumnWidthStyle, parameter[call[.getWidthStyle, parameter[call[WebSheetUtility.pixel2WidthUnits, parameter[call[parent.getLineNumberColumnWidth, parameter[]]]], member[.totalWidth]]]]] call[parent.setAddRowColumnWidthStyle, parameter[binary_operation[binary_operation[literal["width:"], +, call[parent.getAddRowColumnWidth, parameter[]]], +, literal["px;"]]]] call[parent.getHeaderRows, parameter[]] if[binary_operation[member[.top], <, literal[0]]] begin[{] call[parent.getHeaderRows, parameter[]] call[parent.setShowLineNumber, parameter[literal[true]]] else begin[{] call[parent.getHeaderRows, parameter[]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getHeaderRows, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=sheetConfig, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rangeBuildRef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cellRangeMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=skippedRegionCells, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadHeaderRowWithConfigurationTab, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=bottom, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=top, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[parent.setShowLineNumber, parameter[literal[false]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[loadHeaderRows] operator[SEP] Keyword[final] identifier[SheetConfiguration] identifier[sheetConfig] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[CellRangeAddress] operator[>] identifier[cellRangeMap] , Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[skippedRegionCells] operator[SEP] { Keyword[int] identifier[top] operator[=] identifier[sheetConfig] operator[SEP] identifier[getHeaderCellRange] operator[SEP] operator[SEP] operator[SEP] identifier[getTopRow] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[bottom] operator[=] identifier[sheetConfig] operator[SEP] identifier[getHeaderCellRange] operator[SEP] operator[SEP] operator[SEP] identifier[getBottomRow] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[left] operator[=] identifier[sheetConfig] operator[SEP] identifier[getHeaderCellRange] operator[SEP] operator[SEP] operator[SEP] identifier[getLeftCol] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[right] operator[=] identifier[sheetConfig] operator[SEP] identifier[getHeaderCellRange] operator[SEP] operator[SEP] operator[SEP] identifier[getRightCol] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[sheetName] operator[=] identifier[sheetConfig] operator[SEP] identifier[getSheetName] operator[SEP] operator[SEP] operator[SEP] identifier[Sheet] identifier[sheet1] operator[=] identifier[parent] operator[SEP] identifier[getWb] operator[SEP] operator[SEP] operator[SEP] identifier[getSheet] operator[SEP] identifier[sheetName] operator[SEP] operator[SEP] Keyword[int] identifier[totalWidth] operator[=] identifier[CellStyleUtility] operator[SEP] identifier[calcTotalWidth] operator[SEP] identifier[sheet1] , identifier[left] , identifier[right] , identifier[WebSheetUtility] operator[SEP] identifier[pixel2WidthUnits] operator[SEP] identifier[parent] operator[SEP] identifier[getLineNumberColumnWidth] operator[SEP] operator[SEP] operator[+] identifier[parent] operator[SEP] identifier[getAddRowColumnWidth] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[RangeBuildRef] identifier[rangeBuildRef] operator[=] Keyword[new] identifier[RangeBuildRef] operator[SEP] identifier[left] , identifier[right] , identifier[totalWidth] , identifier[sheet1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sheetConfig] operator[SEP] identifier[isFixedWidthStyle] operator[SEP] operator[SEP] operator[SEP] { identifier[parent] operator[SEP] identifier[setTableWidthStyle] operator[SEP] literal[String] operator[+] identifier[WebSheetUtility] operator[SEP] identifier[widthUnits2Pixel] operator[SEP] identifier[totalWidth] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[parent] operator[SEP] identifier[setLineNumberColumnWidthStyle] operator[SEP] identifier[getWidthStyle] operator[SEP] identifier[WebSheetUtility] operator[SEP] identifier[pixel2WidthUnits] operator[SEP] identifier[parent] operator[SEP] identifier[getLineNumberColumnWidth] operator[SEP] operator[SEP] operator[SEP] , identifier[totalWidth] operator[SEP] operator[SEP] operator[SEP] identifier[parent] operator[SEP] identifier[setAddRowColumnWidthStyle] operator[SEP] literal[String] operator[+] identifier[parent] operator[SEP] identifier[getAddRowColumnWidth] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[parent] operator[SEP] identifier[getHeaderRows] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[top] operator[<] Other[0] operator[SEP] { identifier[parent] operator[SEP] identifier[getHeaderRows] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[loadHeaderRowWithoutConfigurationTab] operator[SEP] identifier[rangeBuildRef] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] identifier[parent] operator[SEP] identifier[setShowLineNumber] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[parent] operator[SEP] identifier[getHeaderRows] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[loadHeaderRowWithoutConfigurationTab] operator[SEP] identifier[rangeBuildRef] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[top] operator[SEP] identifier[i] operator[<=] identifier[bottom] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[parent] operator[SEP] identifier[getHeaderRows] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[loadHeaderRowWithConfigurationTab] operator[SEP] identifier[sheetConfig] , identifier[rangeBuildRef] , identifier[i] , identifier[cellRangeMap] , identifier[skippedRegionCells] operator[SEP] operator[SEP] operator[SEP] } identifier[parent] operator[SEP] identifier[setShowLineNumber] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } }
public static Predicate<Number> getLess(Number target) { return number -> number.doubleValue() < target.doubleValue(); }
class class_name[name] begin[{] method[getLess, return_type[type[Predicate]], modifier[public static], parameter[target]] begin[{] return[LambdaExpression(body=BinaryOperation(operandl=MethodInvocation(arguments=[], member=doubleValue, postfix_operators=[], prefix_operators=[], qualifier=number, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=doubleValue, postfix_operators=[], prefix_operators=[], qualifier=target, selectors=[], type_arguments=None), operator=<), parameters=[MemberReference(member=number, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])] end[}] END[}]
Keyword[public] Keyword[static] identifier[Predicate] operator[<] identifier[Number] operator[>] identifier[getLess] operator[SEP] identifier[Number] identifier[target] operator[SEP] { Keyword[return] identifier[number] operator[->] identifier[number] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[<] identifier[target] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] }
public static DataRowsFacade normalize(DataRowsFacade dataFrame, double min, double max) { return normalize(dataFrame, min, max, Collections.<String>emptyList()); }
class class_name[name] begin[{] method[normalize, return_type[type[DataRowsFacade]], modifier[public static], parameter[dataFrame, min, max]] begin[{] return[call[.normalize, parameter[member[.dataFrame], member[.min], member[.max], call[.Collections, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[DataRowsFacade] identifier[normalize] operator[SEP] identifier[DataRowsFacade] identifier[dataFrame] , Keyword[double] identifier[min] , Keyword[double] identifier[max] operator[SEP] { Keyword[return] identifier[normalize] operator[SEP] identifier[dataFrame] , identifier[min] , identifier[max] , identifier[Collections] operator[SEP] operator[<] identifier[String] operator[>] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@XmlElementDecl(namespace = "http://docs.oasis-open.org/ns/cmis/messaging/200908/", name = "extension", scope = GetCheckedOutDocs.class) public JAXBElement<CmisExtensionType> createGetCheckedOutDocsExtension( CmisExtensionType value) { return new JAXBElement<CmisExtensionType>( _GetPropertiesExtension_QNAME, CmisExtensionType.class, GetCheckedOutDocs.class, value); }
class class_name[name] begin[{] method[createGetCheckedOutDocsExtension, return_type[type[JAXBElement]], modifier[public], parameter[value]] begin[{] return[ClassCreator(arguments=[MemberReference(member=_GetPropertiesExtension_QNAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmisExtensionType, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GetCheckedOutDocs, sub_type=None)), 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=CmisExtensionType, sub_type=None))], dimensions=None, name=JAXBElement, sub_type=None))] end[}] END[}]
annotation[@] identifier[XmlElementDecl] operator[SEP] identifier[namespace] operator[=] literal[String] , identifier[name] operator[=] literal[String] , identifier[scope] operator[=] identifier[GetCheckedOutDocs] operator[SEP] Keyword[class] operator[SEP] Keyword[public] identifier[JAXBElement] operator[<] identifier[CmisExtensionType] operator[>] identifier[createGetCheckedOutDocsExtension] operator[SEP] identifier[CmisExtensionType] identifier[value] operator[SEP] { Keyword[return] Keyword[new] identifier[JAXBElement] operator[<] identifier[CmisExtensionType] operator[>] operator[SEP] identifier[_GetPropertiesExtension_QNAME] , identifier[CmisExtensionType] operator[SEP] Keyword[class] , identifier[GetCheckedOutDocs] operator[SEP] Keyword[class] , identifier[value] operator[SEP] operator[SEP] }
public List<Form> getAllByLoggedInUserWhereCanCreateInstanceOf() { Form form = new Form(); if(this.serviceTicket != null) { form.setServiceTicket(this.serviceTicket); } return new FormListing(this.postJson( form, WS.Path.FormDefinition.Version1.getAllByLoggedInAndCanCreateInstanceOf())). getListing(); }
class class_name[name] begin[{] method[getAllByLoggedInUserWhereCanCreateInstanceOf, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[Form], form] if[binary_operation[THIS[member[None.serviceTicket]], !=, literal[null]]] begin[{] call[form.setServiceTicket, parameter[THIS[member[None.serviceTicket]]]] else begin[{] None end[}] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=form, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getAllByLoggedInAndCanCreateInstanceOf, postfix_operators=[], prefix_operators=[], qualifier=WS.Path.FormDefinition.Version1, selectors=[], type_arguments=None)], member=postJson, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getListing, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=FormListing, sub_type=None))] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Form] operator[>] identifier[getAllByLoggedInUserWhereCanCreateInstanceOf] operator[SEP] operator[SEP] { identifier[Form] identifier[form] operator[=] Keyword[new] identifier[Form] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[serviceTicket] operator[!=] Other[null] operator[SEP] { identifier[form] operator[SEP] identifier[setServiceTicket] operator[SEP] Keyword[this] operator[SEP] identifier[serviceTicket] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[FormListing] operator[SEP] Keyword[this] operator[SEP] identifier[postJson] operator[SEP] identifier[form] , identifier[WS] operator[SEP] identifier[Path] operator[SEP] identifier[FormDefinition] operator[SEP] identifier[Version1] operator[SEP] identifier[getAllByLoggedInAndCanCreateInstanceOf] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getListing] operator[SEP] operator[SEP] operator[SEP] }
@Override public void stopped() { // Mark as stopped started.set(false); // Stop timers super.stopped(); // Disconnect try { Thread.sleep(100); } catch (InterruptedException interrupt) { } disconnect(); }
class class_name[name] begin[{] method[stopped, return_type[void], modifier[public], parameter[]] begin[{] call[started.set, parameter[literal[false]]] SuperMethodInvocation(arguments=[], member=stopped, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=100)], member=sleep, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=interrupt, types=['InterruptedException']))], finally_block=None, label=None, resources=None) call[.disconnect, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[stopped] operator[SEP] operator[SEP] { identifier[started] operator[SEP] identifier[set] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[stopped] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] Other[100] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[interrupt] operator[SEP] { } identifier[disconnect] operator[SEP] operator[SEP] operator[SEP] }
public static void removeValue(String registryName, String key) { Sysprop registryObject = readRegistryObject(registryName); if (registryObject == null || StringUtils.isBlank(key)) { return; } if (registryObject.hasProperty(key)) { registryObject.removeProperty(key); CoreUtils.getInstance().getDao().update(REGISTRY_APP_ID, registryObject); } }
class class_name[name] begin[{] method[removeValue, return_type[void], modifier[public static], parameter[registryName, key]] begin[{] local_variable[type[Sysprop], registryObject] if[binary_operation[binary_operation[member[.registryObject], ==, literal[null]], ||, call[StringUtils.isBlank, parameter[member[.key]]]]] begin[{] return[None] else begin[{] None end[}] if[call[registryObject.hasProperty, parameter[member[.key]]]] begin[{] call[registryObject.removeProperty, parameter[member[.key]]] call[CoreUtils.getInstance, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[removeValue] operator[SEP] identifier[String] identifier[registryName] , identifier[String] identifier[key] operator[SEP] { identifier[Sysprop] identifier[registryObject] operator[=] identifier[readRegistryObject] operator[SEP] identifier[registryName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[registryObject] operator[==] Other[null] operator[||] identifier[StringUtils] operator[SEP] identifier[isBlank] operator[SEP] identifier[key] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[registryObject] operator[SEP] identifier[hasProperty] operator[SEP] identifier[key] operator[SEP] operator[SEP] { identifier[registryObject] operator[SEP] identifier[removeProperty] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[CoreUtils] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getDao] operator[SEP] operator[SEP] operator[SEP] identifier[update] operator[SEP] identifier[REGISTRY_APP_ID] , identifier[registryObject] operator[SEP] operator[SEP] } }
MetricFamilySamples fromMeter(String dropwizardName, Meter meter) { final MetricFamilySamples.Sample sample = sampleBuilder.createSample(dropwizardName, "_total", new ArrayList<String>(), new ArrayList<String>(), meter.getCount()); return new MetricFamilySamples(sample.name, Type.COUNTER, getHelpMessage(dropwizardName, meter), Arrays.asList(sample)); }
class class_name[name] begin[{] method[fromMeter, return_type[type[MetricFamilySamples]], modifier[default], parameter[dropwizardName, meter]] begin[{] local_variable[type[MetricFamilySamples], sample] return[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=sample, selectors=[]), MemberReference(member=COUNTER, postfix_operators=[], prefix_operators=[], qualifier=Type, selectors=[]), MethodInvocation(arguments=[MemberReference(member=dropwizardName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=meter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getHelpMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=sample, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asList, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MetricFamilySamples, sub_type=None))] end[}] END[}]
identifier[MetricFamilySamples] identifier[fromMeter] operator[SEP] identifier[String] identifier[dropwizardName] , identifier[Meter] identifier[meter] operator[SEP] { Keyword[final] identifier[MetricFamilySamples] operator[SEP] identifier[Sample] identifier[sample] operator[=] identifier[sampleBuilder] operator[SEP] identifier[createSample] operator[SEP] identifier[dropwizardName] , literal[String] , Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] , Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] , identifier[meter] operator[SEP] identifier[getCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MetricFamilySamples] operator[SEP] identifier[sample] operator[SEP] identifier[name] , identifier[Type] operator[SEP] identifier[COUNTER] , identifier[getHelpMessage] operator[SEP] identifier[dropwizardName] , identifier[meter] operator[SEP] , identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[sample] operator[SEP] operator[SEP] operator[SEP] }
public Observable<DomainInner> beginUpdateAsync(String resourceGroupName, String domainName, Map<String, String> tags) { return beginUpdateWithServiceResponseAsync(resourceGroupName, domainName, tags).map(new Func1<ServiceResponse<DomainInner>, DomainInner>() { @Override public DomainInner call(ServiceResponse<DomainInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[beginUpdateAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, domainName, tags]] begin[{] return[call[.beginUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.domainName], member[.tags]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[DomainInner] operator[>] identifier[beginUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[domainName] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[tags] operator[SEP] { Keyword[return] identifier[beginUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[domainName] , identifier[tags] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[DomainInner] operator[>] , identifier[DomainInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[DomainInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[DomainInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public FeatureVector createWordFeatures(DependencyInstance dependencyInstance, int i) { int[] pos = dependencyInstance.getPostagids(); int[] posA = dependencyInstance.getCpostagids(); int[] toks = dependencyInstance.getFormids(); int[] lemma = dependencyInstance.getLemmaids(); int p0 = pos[i]; int pp = i > 0 ? pos[i - 1] : this.tokenStart; int pn = i < pos.length - 1 ? pos[i + 1] : this.tokenEnd; int c0 = posA[i]; int cp = i > 0 ? posA[i - 1] : this.tokenStart; int cn = i < posA.length - 1 ? posA[i + 1] : this.tokenEnd; int w0 = toks[i]; int wp = i == 0 ? this.tokenStart : toks[i - 1]; int wn = i == dependencyInstance.getLength() - 1 ? this.tokenEnd : toks[i + 1]; int l0 = 0; int lp = 0; int ln = 0; if (lemma != null) { l0 = lemma[i]; lp = i == 0 ? this.tokenStart : lemma[i - 1]; ln = i == dependencyInstance.getLength() - 1 ? this.tokenEnd : lemma[i + 1]; } FeatureVector fv = new FeatureVector(); long code; code = createWordCodeP(WORDFV_BIAS, 0); addWordFeature(code, fv); code = createWordCodeW(WORDFV_W0, w0); addWordFeature(code, fv); code = createWordCodeW(WORDFV_Wp, wp); addWordFeature(code, fv); code = createWordCodeW(WORDFV_Wn, wn); addWordFeature(code, fv); if (l0 != 0) { code = createWordCodeW(WORDFV_W0, l0); addWordFeature(code, fv); code = createWordCodeW(WORDFV_Wp, lp); addWordFeature(code, fv); code = createWordCodeW(WORDFV_Wn, ln); addWordFeature(code, fv); } code = createWordCodeP(WORDFV_P0, p0); addWordFeature(code, fv); code = createWordCodeP(WORDFV_Pp, pp); addWordFeature(code, fv); code = createWordCodeP(WORDFV_Pn, pn); addWordFeature(code, fv); code = createWordCodeP(WORDFV_P0, c0); addWordFeature(code, fv); code = createWordCodeP(WORDFV_Pp, cp); addWordFeature(code, fv); code = createWordCodeP(WORDFV_Pn, cn); addWordFeature(code, fv); code = createWordCodePP(WORDFV_PpP0, pp, p0); addWordFeature(code, fv); code = createWordCodePP(WORDFV_P0Pn, p0, pn); addWordFeature(code, fv); code = createWordCodePP(WORDFV_PpPn, pp, pn); addWordFeature(code, fv); code = createWordCodePPP(WORDFV_PpP0Pn, pp, p0, pn); addWordFeature(code, fv); code = createWordCodePP(WORDFV_PpP0, cp, c0); addWordFeature(code, fv); code = createWordCodePP(WORDFV_P0Pn, c0, cn); addWordFeature(code, fv); code = createWordCodePP(WORDFV_PpPn, cp, cn); addWordFeature(code, fv); code = createWordCodePPP(WORDFV_PpP0Pn, cp, c0, cn); addWordFeature(code, fv); code = createWordCodeWP(WORDFV_W0P0, w0, p0); addWordFeature(code, fv); code = createWordCodeWP(WORDFV_W0P0, w0, c0); addWordFeature(code, fv); if (l0 != 0) { code = createWordCodeWP(WORDFV_W0P0, l0, p0); addWordFeature(code, fv); code = createWordCodeWP(WORDFV_W0P0, l0, c0); addWordFeature(code, fv); code = createWordCodeWP(WORDFV_W0Pp, l0, cp); addWordFeature(code, fv); code = createWordCodeWP(WORDFV_W0Pn, l0, cn); addWordFeature(code, fv); code = createWordCodeWP(WORDFV_WpPp, lp, cp); addWordFeature(code, fv); code = createWordCodeWP(WORDFV_WnPn, ln, cn); addWordFeature(code, fv); } int[][] feats = dependencyInstance.getFeatids(); if (feats[i] != null) { for (int u = 0; u < feats[i].length; ++u) { int f = feats[i][u]; code = createWordCodeP(WORDFV_P0, f); addWordFeature(code, fv); if (l0 != 0) { code = createWordCodeWP(WORDFV_W0P0, l0, f); addWordFeature(code, fv); } } } return fv; }
class class_name[name] begin[{] method[createWordFeatures, return_type[type[FeatureVector]], modifier[public], parameter[dependencyInstance, i]] begin[{] local_variable[type[int], pos] local_variable[type[int], posA] local_variable[type[int], toks] local_variable[type[int], lemma] local_variable[type[int], p0] local_variable[type[int], pp] local_variable[type[int], pn] local_variable[type[int], c0] local_variable[type[int], cp] local_variable[type[int], cn] local_variable[type[int], w0] local_variable[type[int], wp] local_variable[type[int], wn] local_variable[type[int], l0] local_variable[type[int], lp] local_variable[type[int], ln] if[binary_operation[member[.lemma], !=, literal[null]]] begin[{] assign[member[.l0], member[.lemma]] assign[member[.lp], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=MemberReference(member=lemma, 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=-))]), if_true=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=tokenStart, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]))] assign[member[.ln], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=dependencyInstance, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator===), if_false=MemberReference(member=lemma, 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=+))]), if_true=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=tokenEnd, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]))] else begin[{] None end[}] local_variable[type[FeatureVector], fv] local_variable[type[long], code] assign[member[.code], call[.createWordCodeP, parameter[member[.WORDFV_BIAS], literal[0]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeW, parameter[member[.WORDFV_W0], member[.w0]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeW, parameter[member[.WORDFV_Wp], member[.wp]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeW, parameter[member[.WORDFV_Wn], member[.wn]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] if[binary_operation[member[.l0], !=, literal[0]]] begin[{] assign[member[.code], call[.createWordCodeW, parameter[member[.WORDFV_W0], member[.l0]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeW, parameter[member[.WORDFV_Wp], member[.lp]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeW, parameter[member[.WORDFV_Wn], member[.ln]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] else begin[{] None end[}] assign[member[.code], call[.createWordCodeP, parameter[member[.WORDFV_P0], member[.p0]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeP, parameter[member[.WORDFV_Pp], member[.pp]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeP, parameter[member[.WORDFV_Pn], member[.pn]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeP, parameter[member[.WORDFV_P0], member[.c0]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeP, parameter[member[.WORDFV_Pp], member[.cp]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeP, parameter[member[.WORDFV_Pn], member[.cn]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodePP, parameter[member[.WORDFV_PpP0], member[.pp], member[.p0]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodePP, parameter[member[.WORDFV_P0Pn], member[.p0], member[.pn]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodePP, parameter[member[.WORDFV_PpPn], member[.pp], member[.pn]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodePPP, parameter[member[.WORDFV_PpP0Pn], member[.pp], member[.p0], member[.pn]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodePP, parameter[member[.WORDFV_PpP0], member[.cp], member[.c0]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodePP, parameter[member[.WORDFV_P0Pn], member[.c0], member[.cn]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodePP, parameter[member[.WORDFV_PpPn], member[.cp], member[.cn]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodePPP, parameter[member[.WORDFV_PpP0Pn], member[.cp], member[.c0], member[.cn]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeWP, parameter[member[.WORDFV_W0P0], member[.w0], member[.p0]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeWP, parameter[member[.WORDFV_W0P0], member[.w0], member[.c0]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] if[binary_operation[member[.l0], !=, literal[0]]] begin[{] assign[member[.code], call[.createWordCodeWP, parameter[member[.WORDFV_W0P0], member[.l0], member[.p0]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeWP, parameter[member[.WORDFV_W0P0], member[.l0], member[.c0]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeWP, parameter[member[.WORDFV_W0Pp], member[.l0], member[.cp]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeWP, parameter[member[.WORDFV_W0Pn], member[.l0], member[.cn]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeWP, parameter[member[.WORDFV_WpPp], member[.lp], member[.cp]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] assign[member[.code], call[.createWordCodeWP, parameter[member[.WORDFV_WnPn], member[.ln], member[.cn]]]] call[.addWordFeature, parameter[member[.code], member[.fv]]] else begin[{] None end[}] local_variable[type[int], feats] if[binary_operation[member[.feats], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=feats, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=u, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=f)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=WORDFV_P0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createWordCodeP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addWordFeature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=l0, 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=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=WORDFV_W0P0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=l0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createWordCodeWP, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fv, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addWordFeature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=u, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=feats, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=u)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=u, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] return[member[.fv]] end[}] END[}]
Keyword[public] identifier[FeatureVector] identifier[createWordFeatures] operator[SEP] identifier[DependencyInstance] identifier[dependencyInstance] , Keyword[int] identifier[i] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[pos] operator[=] identifier[dependencyInstance] operator[SEP] identifier[getPostagids] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[posA] operator[=] identifier[dependencyInstance] operator[SEP] identifier[getCpostagids] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[toks] operator[=] identifier[dependencyInstance] operator[SEP] identifier[getFormids] operator[SEP] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[lemma] operator[=] identifier[dependencyInstance] operator[SEP] identifier[getLemmaids] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[p0] operator[=] identifier[pos] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[pp] operator[=] identifier[i] operator[>] Other[0] operator[?] identifier[pos] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[:] Keyword[this] operator[SEP] identifier[tokenStart] operator[SEP] Keyword[int] identifier[pn] operator[=] identifier[i] operator[<] identifier[pos] operator[SEP] identifier[length] operator[-] Other[1] operator[?] identifier[pos] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[:] Keyword[this] operator[SEP] identifier[tokenEnd] operator[SEP] Keyword[int] identifier[c0] operator[=] identifier[posA] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[cp] operator[=] identifier[i] operator[>] Other[0] operator[?] identifier[posA] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[:] Keyword[this] operator[SEP] identifier[tokenStart] operator[SEP] Keyword[int] identifier[cn] operator[=] identifier[i] operator[<] identifier[posA] operator[SEP] identifier[length] operator[-] Other[1] operator[?] identifier[posA] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[:] Keyword[this] operator[SEP] identifier[tokenEnd] operator[SEP] Keyword[int] identifier[w0] operator[=] identifier[toks] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[wp] operator[=] identifier[i] operator[==] Other[0] operator[?] Keyword[this] operator[SEP] identifier[tokenStart] operator[:] identifier[toks] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[wn] operator[=] identifier[i] operator[==] identifier[dependencyInstance] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[-] Other[1] operator[?] Keyword[this] operator[SEP] identifier[tokenEnd] operator[:] identifier[toks] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[l0] operator[=] Other[0] operator[SEP] Keyword[int] identifier[lp] operator[=] Other[0] operator[SEP] Keyword[int] identifier[ln] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[lemma] operator[!=] Other[null] operator[SEP] { identifier[l0] operator[=] identifier[lemma] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[lp] operator[=] identifier[i] operator[==] Other[0] operator[?] Keyword[this] operator[SEP] identifier[tokenStart] operator[:] identifier[lemma] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] identifier[ln] operator[=] identifier[i] operator[==] identifier[dependencyInstance] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[-] Other[1] operator[?] Keyword[this] operator[SEP] identifier[tokenEnd] operator[:] identifier[lemma] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] } identifier[FeatureVector] identifier[fv] operator[=] Keyword[new] identifier[FeatureVector] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[code] operator[SEP] identifier[code] operator[=] identifier[createWordCodeP] operator[SEP] identifier[WORDFV_BIAS] , Other[0] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeW] operator[SEP] identifier[WORDFV_W0] , identifier[w0] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeW] operator[SEP] identifier[WORDFV_Wp] , identifier[wp] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeW] operator[SEP] identifier[WORDFV_Wn] , identifier[wn] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[l0] operator[!=] Other[0] operator[SEP] { identifier[code] operator[=] identifier[createWordCodeW] operator[SEP] identifier[WORDFV_W0] , identifier[l0] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeW] operator[SEP] identifier[WORDFV_Wp] , identifier[lp] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeW] operator[SEP] identifier[WORDFV_Wn] , identifier[ln] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] } identifier[code] operator[=] identifier[createWordCodeP] operator[SEP] identifier[WORDFV_P0] , identifier[p0] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeP] operator[SEP] identifier[WORDFV_Pp] , identifier[pp] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeP] operator[SEP] identifier[WORDFV_Pn] , identifier[pn] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeP] operator[SEP] identifier[WORDFV_P0] , identifier[c0] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeP] operator[SEP] identifier[WORDFV_Pp] , identifier[cp] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeP] operator[SEP] identifier[WORDFV_Pn] , identifier[cn] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodePP] operator[SEP] identifier[WORDFV_PpP0] , identifier[pp] , identifier[p0] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodePP] operator[SEP] identifier[WORDFV_P0Pn] , identifier[p0] , identifier[pn] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodePP] operator[SEP] identifier[WORDFV_PpPn] , identifier[pp] , identifier[pn] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodePPP] operator[SEP] identifier[WORDFV_PpP0Pn] , identifier[pp] , identifier[p0] , identifier[pn] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodePP] operator[SEP] identifier[WORDFV_PpP0] , identifier[cp] , identifier[c0] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodePP] operator[SEP] identifier[WORDFV_P0Pn] , identifier[c0] , identifier[cn] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodePP] operator[SEP] identifier[WORDFV_PpPn] , identifier[cp] , identifier[cn] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodePPP] operator[SEP] identifier[WORDFV_PpP0Pn] , identifier[cp] , identifier[c0] , identifier[cn] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeWP] operator[SEP] identifier[WORDFV_W0P0] , identifier[w0] , identifier[p0] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeWP] operator[SEP] identifier[WORDFV_W0P0] , identifier[w0] , identifier[c0] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[l0] operator[!=] Other[0] operator[SEP] { identifier[code] operator[=] identifier[createWordCodeWP] operator[SEP] identifier[WORDFV_W0P0] , identifier[l0] , identifier[p0] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeWP] operator[SEP] identifier[WORDFV_W0P0] , identifier[l0] , identifier[c0] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeWP] operator[SEP] identifier[WORDFV_W0Pp] , identifier[l0] , identifier[cp] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeWP] operator[SEP] identifier[WORDFV_W0Pn] , identifier[l0] , identifier[cn] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeWP] operator[SEP] identifier[WORDFV_WpPp] , identifier[lp] , identifier[cp] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeWP] operator[SEP] identifier[WORDFV_WnPn] , identifier[ln] , identifier[cn] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] } Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[feats] operator[=] identifier[dependencyInstance] operator[SEP] identifier[getFeatids] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[feats] operator[SEP] identifier[i] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[u] operator[=] Other[0] operator[SEP] identifier[u] operator[<] identifier[feats] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[u] operator[SEP] { Keyword[int] identifier[f] operator[=] identifier[feats] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[u] operator[SEP] operator[SEP] identifier[code] operator[=] identifier[createWordCodeP] operator[SEP] identifier[WORDFV_P0] , identifier[f] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[l0] operator[!=] Other[0] operator[SEP] { identifier[code] operator[=] identifier[createWordCodeWP] operator[SEP] identifier[WORDFV_W0P0] , identifier[l0] , identifier[f] operator[SEP] operator[SEP] identifier[addWordFeature] operator[SEP] identifier[code] , identifier[fv] operator[SEP] operator[SEP] } } } Keyword[return] identifier[fv] operator[SEP] }
public void setDeployments(java.util.Collection<BulkDeploymentResult> deployments) { if (deployments == null) { this.deployments = null; return; } this.deployments = new java.util.ArrayList<BulkDeploymentResult>(deployments); }
class class_name[name] begin[{] method[setDeployments, return_type[void], modifier[public], parameter[deployments]] begin[{] if[binary_operation[member[.deployments], ==, literal[null]]] begin[{] assign[THIS[member[None.deployments]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.deployments]], ClassCreator(arguments=[MemberReference(member=deployments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=BulkDeploymentResult, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setDeployments] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[BulkDeploymentResult] operator[>] identifier[deployments] operator[SEP] { Keyword[if] operator[SEP] identifier[deployments] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[deployments] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[deployments] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[BulkDeploymentResult] operator[>] operator[SEP] identifier[deployments] operator[SEP] operator[SEP] }
final public ReturnExpressionBuilder<T> returnExp() { final int sourceLineNumber = builder.getSourceLineNumber(); return new ReturnExpressionBuilder<T>(new ExpressionHandler<T>() { public T handleExpression(Expression e) { return statementHandler().handleStatement(new ReturnStatement(sourceLineNumber, e)); } }); }
class class_name[name] begin[{] method[returnExp, return_type[type[ReturnExpressionBuilder]], modifier[final public], parameter[]] begin[{] local_variable[type[int], sourceLineNumber] return[ClassCreator(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=statementHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=sourceLineNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), 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=ReturnStatement, sub_type=None))], member=handleStatement, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=handleExpression, parameters=[FormalParameter(annotations=[], modifiers=set(), name=e, type=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=ExpressionHandler, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=ReturnExpressionBuilder, sub_type=None))] end[}] END[}]
Keyword[final] Keyword[public] identifier[ReturnExpressionBuilder] operator[<] identifier[T] operator[>] identifier[returnExp] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[sourceLineNumber] operator[=] identifier[builder] operator[SEP] identifier[getSourceLineNumber] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ReturnExpressionBuilder] operator[<] identifier[T] operator[>] operator[SEP] Keyword[new] identifier[ExpressionHandler] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] { Keyword[public] identifier[T] identifier[handleExpression] operator[SEP] identifier[Expression] identifier[e] operator[SEP] { Keyword[return] identifier[statementHandler] operator[SEP] operator[SEP] operator[SEP] identifier[handleStatement] operator[SEP] Keyword[new] identifier[ReturnStatement] operator[SEP] identifier[sourceLineNumber] , identifier[e] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public Set<Class<? extends Exception>> getRecoverableExceptions() { return recoverableExceptions != null ? recoverableExceptions : parent != null ? parent.getRecoverableExceptions() : Collections.<Class<? extends Exception>>emptySet(); }
class class_name[name] begin[{] method[getRecoverableExceptions, return_type[type[Set]], modifier[public], parameter[]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=recoverableExceptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MethodInvocation(arguments=[], member=Collections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=Exception, sub_type=None))], dimensions=[], name=Class, sub_type=None))]), if_true=MethodInvocation(arguments=[], member=getRecoverableExceptions, postfix_operators=[], prefix_operators=[], qualifier=parent, selectors=[], type_arguments=None)), if_true=MemberReference(member=recoverableExceptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Exception] operator[>] operator[>] identifier[getRecoverableExceptions] operator[SEP] operator[SEP] { Keyword[return] identifier[recoverableExceptions] operator[!=] Other[null] operator[?] identifier[recoverableExceptions] operator[:] identifier[parent] operator[!=] Other[null] operator[?] identifier[parent] operator[SEP] identifier[getRecoverableExceptions] operator[SEP] operator[SEP] operator[:] identifier[Collections] operator[SEP] operator[<] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Exception] operator[>] operator[>] identifier[emptySet] operator[SEP] operator[SEP] operator[SEP] }
private String formatMaybeIpv6(String address) { String openBracket = "["; String closeBracket = "]"; if (address.contains(":") && !address.startsWith(openBracket) && !address.endsWith(closeBracket)) { return openBracket + address + closeBracket; } return address; }
class class_name[name] begin[{] method[formatMaybeIpv6, return_type[type[String]], modifier[private], parameter[address]] begin[{] local_variable[type[String], openBracket] local_variable[type[String], closeBracket] if[binary_operation[binary_operation[call[address.contains, parameter[literal[":"]]], &&, call[address.startsWith, parameter[member[.openBracket]]]], &&, call[address.endsWith, parameter[member[.closeBracket]]]]] begin[{] return[binary_operation[binary_operation[member[.openBracket], +, member[.address]], +, member[.closeBracket]]] else begin[{] None end[}] return[member[.address]] end[}] END[}]
Keyword[private] identifier[String] identifier[formatMaybeIpv6] operator[SEP] identifier[String] identifier[address] operator[SEP] { identifier[String] identifier[openBracket] operator[=] literal[String] operator[SEP] identifier[String] identifier[closeBracket] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[address] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[&&] operator[!] identifier[address] operator[SEP] identifier[startsWith] operator[SEP] identifier[openBracket] operator[SEP] operator[&&] operator[!] identifier[address] operator[SEP] identifier[endsWith] operator[SEP] identifier[closeBracket] operator[SEP] operator[SEP] { Keyword[return] identifier[openBracket] operator[+] identifier[address] operator[+] identifier[closeBracket] operator[SEP] } Keyword[return] identifier[address] operator[SEP] }
public String getHeader(@NotNull final String name, String defaultValue) { if (headers().contains(name)) { return getHeader(name); } else { return defaultValue; } }
class class_name[name] begin[{] method[getHeader, return_type[type[String]], modifier[public], parameter[name, defaultValue]] begin[{] if[call[.headers, parameter[]]] begin[{] return[call[.getHeader, parameter[member[.name]]]] else begin[{] return[member[.defaultValue]] end[}] end[}] END[}]
Keyword[public] identifier[String] identifier[getHeader] operator[SEP] annotation[@] identifier[NotNull] Keyword[final] identifier[String] identifier[name] , identifier[String] identifier[defaultValue] operator[SEP] { Keyword[if] operator[SEP] identifier[headers] operator[SEP] operator[SEP] operator[SEP] identifier[contains] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[return] identifier[getHeader] operator[SEP] identifier[name] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[defaultValue] operator[SEP] } }
public static Field getFieldByDBField(Class<?> clazz, String dbFieldName) { List<Field> fields = getColumns(clazz); for(Field field : fields) { Column column = field.getAnnotation(Column.class); if(column.value().equals(dbFieldName)) { return field; } } return null; }
class class_name[name] begin[{] method[getFieldByDBField, return_type[type[Field]], modifier[public static], parameter[clazz, dbFieldName]] begin[{] local_variable[type[List], fields] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Column, sub_type=None))], member=getAnnotation, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), name=column)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Column, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=value, postfix_operators=[], prefix_operators=[], qualifier=column, selectors=[MethodInvocation(arguments=[MemberReference(member=dbFieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Field] identifier[getFieldByDBField] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[dbFieldName] operator[SEP] { identifier[List] operator[<] identifier[Field] operator[>] identifier[fields] operator[=] identifier[getColumns] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Field] identifier[field] operator[:] identifier[fields] operator[SEP] { identifier[Column] identifier[column] operator[=] identifier[field] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[Column] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[column] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[dbFieldName] operator[SEP] operator[SEP] { Keyword[return] identifier[field] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
private void checkUnicity(ValidationStampFilter filter) { // Check project vs branch if (filter.getProject() != null && filter.getBranch() != null) { throw new IllegalStateException("Filter cannot be associated with both a project and a branch."); } // Gets the existing filter for the name in this scope MapSqlParameterSource params = params("name", filter.getName()) .addValue("project", filter.getProject() != null ? filter.getProject().id() : null) .addValue("branch", filter.getBranch() != null ? filter.getBranch().id() : null) .addValue("id", filter.getId() != null && filter.getId().isSet() ? filter.id() : null); String sql; // Branch if (filter.getBranch() != null) { sql = "SELECT ID FROM VALIDATION_STAMP_FILTERS WHERE PROJECT IS NULL AND BRANCH = :branch AND NAME = :name"; } // Project else if (filter.getProject() != null) { sql = "SELECT ID FROM VALIDATION_STAMP_FILTERS WHERE PROJECT = :project AND BRANCH IS NULL AND NAME = :name"; } // Global else { sql = "SELECT ID FROM VALIDATION_STAMP_FILTERS WHERE PROJECT IS NULL AND BRANCH IS NULL AND NAME = :name"; } // ID if (filter.getId() != null && filter.getId().isSet()) { sql += " AND ID <> :id"; } // Check Optional<Integer> o = getOptional( sql, params, Integer.class ); if (o.isPresent()) { throw new ValidationStampFilterNameAlreadyDefinedException(filter.getName()); } }
class class_name[name] begin[{] method[checkUnicity, return_type[void], modifier[private], parameter[filter]] begin[{] if[binary_operation[binary_operation[call[filter.getProject, parameter[]], !=, literal[null]], &&, binary_operation[call[filter.getBranch, parameter[]], !=, literal[null]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Filter cannot be associated with both a project and a branch.")], 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[MapSqlParameterSource], params] local_variable[type[String], sql] if[binary_operation[call[filter.getBranch, parameter[]], !=, literal[null]]] begin[{] assign[member[.sql], literal["SELECT ID FROM VALIDATION_STAMP_FILTERS WHERE PROJECT IS NULL AND BRANCH = :branch AND NAME = :name"]] else begin[{] if[binary_operation[call[filter.getProject, parameter[]], !=, literal[null]]] begin[{] assign[member[.sql], literal["SELECT ID FROM VALIDATION_STAMP_FILTERS WHERE PROJECT = :project AND BRANCH IS NULL AND NAME = :name"]] else begin[{] assign[member[.sql], literal["SELECT ID FROM VALIDATION_STAMP_FILTERS WHERE PROJECT IS NULL AND BRANCH IS NULL AND NAME = :name"]] end[}] end[}] if[binary_operation[binary_operation[call[filter.getId, parameter[]], !=, literal[null]], &&, call[filter.getId, parameter[]]]] begin[{] assign[member[.sql], literal[" AND ID <> :id"]] else begin[{] None end[}] local_variable[type[Optional], o] if[call[o.isPresent, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=filter, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ValidationStampFilterNameAlreadyDefinedException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[checkUnicity] operator[SEP] identifier[ValidationStampFilter] identifier[filter] operator[SEP] { Keyword[if] operator[SEP] identifier[filter] operator[SEP] identifier[getProject] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[filter] operator[SEP] identifier[getBranch] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[MapSqlParameterSource] identifier[params] operator[=] identifier[params] operator[SEP] literal[String] , identifier[filter] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addValue] operator[SEP] literal[String] , identifier[filter] operator[SEP] identifier[getProject] operator[SEP] operator[SEP] operator[!=] Other[null] operator[?] identifier[filter] operator[SEP] identifier[getProject] operator[SEP] operator[SEP] operator[SEP] identifier[id] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] identifier[addValue] operator[SEP] literal[String] , identifier[filter] operator[SEP] identifier[getBranch] operator[SEP] operator[SEP] operator[!=] Other[null] operator[?] identifier[filter] operator[SEP] identifier[getBranch] operator[SEP] operator[SEP] operator[SEP] identifier[id] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] identifier[addValue] operator[SEP] literal[String] , identifier[filter] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[filter] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[isSet] operator[SEP] operator[SEP] operator[?] identifier[filter] operator[SEP] identifier[id] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] operator[SEP] identifier[String] identifier[sql] operator[SEP] Keyword[if] operator[SEP] identifier[filter] operator[SEP] identifier[getBranch] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[sql] operator[=] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[filter] operator[SEP] identifier[getProject] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[sql] operator[=] literal[String] operator[SEP] } Keyword[else] { identifier[sql] operator[=] literal[String] operator[SEP] } Keyword[if] operator[SEP] identifier[filter] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[filter] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[isSet] operator[SEP] operator[SEP] operator[SEP] { identifier[sql] operator[+=] literal[String] operator[SEP] } identifier[Optional] operator[<] identifier[Integer] operator[>] identifier[o] operator[=] identifier[getOptional] operator[SEP] identifier[sql] , identifier[params] , identifier[Integer] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[o] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[ValidationStampFilterNameAlreadyDefinedException] operator[SEP] identifier[filter] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private void applyL1Reg(final double eta_t, Vec x) { //apply l1 regularization if(lambda1 > 0) { l1U += eta_t*lambda1;//line 6: in Tsuruoka et al paper, figure 2 for(int k = 0; k < ws.length; k++) { final Vec w_k = ws[k]; final double[] l1Q_k = l1Q[k]; for(IndexValue iv : x) { final int i = iv.getIndex(); //see "APPLYPENALTY(i)" on line 15: from Figure 2 in Tsuruoka et al paper final double z = w_k.get(i); double newW_i = 0; if (z > 0) newW_i = Math.max(0, z - (l1U + l1Q_k[i])); else if(z < 0) newW_i = Math.min(0, z + (l1U - l1Q_k[i])); l1Q_k[i] += (newW_i - z); w_k.set(i, newW_i); } } } }
class class_name[name] begin[{] method[applyL1Reg, return_type[void], modifier[private], parameter[eta_t, x]] begin[{] if[binary_operation[member[.lambda1], >, literal[0]]] begin[{] assign[member[.l1U], binary_operation[member[.eta_t], *, member[.lambda1]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=ws, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=w_k)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Vec, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=l1Q, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=l1Q_k)], modifiers={'final'}, type=BasicType(dimensions=[None], name=double)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getIndex, postfix_operators=[], prefix_operators=[], qualifier=iv, selectors=[], type_arguments=None), name=i)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=w_k, selectors=[], type_arguments=None), name=z)], modifiers={'final'}, type=BasicType(dimensions=[], name=double)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=newW_i)], modifiers=set(), type=BasicType(dimensions=[], name=double)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=z, 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=StatementExpression(expression=Assignment(expressionl=MemberReference(member=newW_i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=l1U, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=l1Q_k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=-), operator=+)], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None)), label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=newW_i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=l1U, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=l1Q_k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=+), operator=-)], member=max, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=l1Q_k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=BinaryOperation(operandl=MemberReference(member=newW_i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newW_i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=w_k, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=iv)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IndexValue, sub_type=None))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=ws, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[applyL1Reg] operator[SEP] Keyword[final] Keyword[double] identifier[eta_t] , identifier[Vec] identifier[x] operator[SEP] { Keyword[if] operator[SEP] identifier[lambda1] operator[>] Other[0] operator[SEP] { identifier[l1U] operator[+=] identifier[eta_t] operator[*] identifier[lambda1] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[ws] operator[SEP] identifier[length] operator[SEP] identifier[k] operator[++] operator[SEP] { Keyword[final] identifier[Vec] identifier[w_k] operator[=] identifier[ws] operator[SEP] identifier[k] operator[SEP] operator[SEP] Keyword[final] Keyword[double] operator[SEP] operator[SEP] identifier[l1Q_k] operator[=] identifier[l1Q] operator[SEP] identifier[k] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[IndexValue] identifier[iv] operator[:] identifier[x] operator[SEP] { Keyword[final] Keyword[int] identifier[i] operator[=] identifier[iv] operator[SEP] identifier[getIndex] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[z] operator[=] identifier[w_k] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[double] identifier[newW_i] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[z] operator[>] Other[0] operator[SEP] identifier[newW_i] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] Other[0] , identifier[z] operator[-] operator[SEP] identifier[l1U] operator[+] identifier[l1Q_k] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[z] operator[<] Other[0] operator[SEP] identifier[newW_i] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] Other[0] , identifier[z] operator[+] operator[SEP] identifier[l1U] operator[-] identifier[l1Q_k] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[l1Q_k] operator[SEP] identifier[i] operator[SEP] operator[+=] operator[SEP] identifier[newW_i] operator[-] identifier[z] operator[SEP] operator[SEP] identifier[w_k] operator[SEP] identifier[set] operator[SEP] identifier[i] , identifier[newW_i] operator[SEP] operator[SEP] } } } }
public final void setExceptions(SortedSet<Date> dates) { m_exceptions.clear(); if (null != dates) { m_exceptions.addAll(dates); } }
class class_name[name] begin[{] method[setExceptions, return_type[void], modifier[final public], parameter[dates]] begin[{] call[m_exceptions.clear, parameter[]] if[binary_operation[literal[null], !=, member[.dates]]] begin[{] call[m_exceptions.addAll, parameter[member[.dates]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[setExceptions] operator[SEP] identifier[SortedSet] operator[<] identifier[Date] operator[>] identifier[dates] operator[SEP] { identifier[m_exceptions] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[dates] operator[SEP] { identifier[m_exceptions] operator[SEP] identifier[addAll] operator[SEP] identifier[dates] operator[SEP] operator[SEP] } }
public Observable<ServiceResponse<List<IdentifyResult>>> identifyWithServiceResponseAsync(String personGroupId, List<UUID> faceIds, IdentifyOptionalParameter identifyOptionalParameter) { if (this.client.azureRegion() == null) { throw new IllegalArgumentException("Parameter this.client.azureRegion() is required and cannot be null."); } if (personGroupId == null) { throw new IllegalArgumentException("Parameter personGroupId is required and cannot be null."); } if (faceIds == null) { throw new IllegalArgumentException("Parameter faceIds is required and cannot be null."); } Validator.validate(faceIds); final Integer maxNumOfCandidatesReturned = identifyOptionalParameter != null ? identifyOptionalParameter.maxNumOfCandidatesReturned() : null; final Double confidenceThreshold = identifyOptionalParameter != null ? identifyOptionalParameter.confidenceThreshold() : null; return identifyWithServiceResponseAsync(personGroupId, faceIds, maxNumOfCandidatesReturned, confidenceThreshold); }
class class_name[name] begin[{] method[identifyWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[personGroupId, faceIds, identifyOptionalParameter]] begin[{] if[binary_operation[THIS[member[None.client]call[None.azureRegion, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.azureRegion() is required and cannot be 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[}] if[binary_operation[member[.personGroupId], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter personGroupId is required and cannot be 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[}] if[binary_operation[member[.faceIds], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter faceIds is required and cannot be 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[Validator.validate, parameter[member[.faceIds]]] local_variable[type[Integer], maxNumOfCandidatesReturned] local_variable[type[Double], confidenceThreshold] return[call[.identifyWithServiceResponseAsync, parameter[member[.personGroupId], member[.faceIds], member[.maxNumOfCandidatesReturned], member[.confidenceThreshold]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[List] operator[<] identifier[IdentifyResult] operator[>] operator[>] operator[>] identifier[identifyWithServiceResponseAsync] operator[SEP] identifier[String] identifier[personGroupId] , identifier[List] operator[<] identifier[UUID] operator[>] identifier[faceIds] , identifier[IdentifyOptionalParameter] identifier[identifyOptionalParameter] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[azureRegion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[personGroupId] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[faceIds] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Validator] operator[SEP] identifier[validate] operator[SEP] identifier[faceIds] operator[SEP] operator[SEP] Keyword[final] identifier[Integer] identifier[maxNumOfCandidatesReturned] operator[=] identifier[identifyOptionalParameter] operator[!=] Other[null] operator[?] identifier[identifyOptionalParameter] operator[SEP] identifier[maxNumOfCandidatesReturned] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[final] identifier[Double] identifier[confidenceThreshold] operator[=] identifier[identifyOptionalParameter] operator[!=] Other[null] operator[?] identifier[identifyOptionalParameter] operator[SEP] identifier[confidenceThreshold] operator[SEP] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[return] identifier[identifyWithServiceResponseAsync] operator[SEP] identifier[personGroupId] , identifier[faceIds] , identifier[maxNumOfCandidatesReturned] , identifier[confidenceThreshold] operator[SEP] operator[SEP] }
public static Object getProperty(Class senderClass, Object receiver, String messageName) throws Throwable { try { return InvokerHelper.getProperty(receiver, messageName); } catch (GroovyRuntimeException gre) { throw unwrap(gre); } }
class class_name[name] begin[{] method[getProperty, return_type[type[Object]], modifier[public static], parameter[senderClass, receiver, messageName]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=receiver, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=messageName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=InvokerHelper, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=gre, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unwrap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=gre, types=['GroovyRuntimeException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[getProperty] operator[SEP] identifier[Class] identifier[senderClass] , identifier[Object] identifier[receiver] , identifier[String] identifier[messageName] operator[SEP] Keyword[throws] identifier[Throwable] { Keyword[try] { Keyword[return] identifier[InvokerHelper] operator[SEP] identifier[getProperty] operator[SEP] identifier[receiver] , identifier[messageName] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[GroovyRuntimeException] identifier[gre] operator[SEP] { Keyword[throw] identifier[unwrap] operator[SEP] identifier[gre] operator[SEP] operator[SEP] } }
public void setStart(int x1, int y1) { start.x = x1; start.y = y1; needsRefresh = true; }
class class_name[name] begin[{] method[setStart, return_type[void], modifier[public], parameter[x1, y1]] begin[{] assign[member[start.x], member[.x1]] assign[member[start.y], member[.y1]] assign[member[.needsRefresh], literal[true]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setStart] operator[SEP] Keyword[int] identifier[x1] , Keyword[int] identifier[y1] operator[SEP] { identifier[start] operator[SEP] identifier[x] operator[=] identifier[x1] operator[SEP] identifier[start] operator[SEP] identifier[y] operator[=] identifier[y1] operator[SEP] identifier[needsRefresh] operator[=] literal[boolean] operator[SEP] }
@Override public boolean showGraphMindMapFileLinksDialog(@Nullable final File projectFolder, @Nullable final File initialMindMapFile, final boolean openIfSelected) { Utils.assertSwingDispatchThread(); boolean result = false; if (projectFolder != null || initialMindMapFile != null) { File projectFolderToUse = projectFolder; if (projectFolderToUse == null) { final NodeProject foundProject = findProjectForFile(initialMindMapFile); if (foundProject != null) { projectFolderToUse = foundProject.getFolder(); } } final FileLinkGraphPanel graph = new FileLinkGraphPanel(projectFolderToUse, initialMindMapFile); JOptionPane.showMessageDialog(this, graph, "Graph of Mind Map file links", JOptionPane.PLAIN_MESSAGE); final FileLinkGraphPanel.FileVertex selected = graph.getSelectedFile(); final File fileToOpen = selected == null ? null : selected.getFile(); if (openIfSelected && fileToOpen != null) { result = true; boolean cantFind = true; if (fileToOpen.exists()) { if (fileToOpen.isFile()) { if (openFileAsTab(fileToOpen, -1)) { cantFind = false; } } else if (fileToOpen.isDirectory()) { focusInTree(fileToOpen); cantFind = false; } } if (cantFind) { DialogProviderManager.getInstance().getDialogProvider().msgWarn(this, "Can't open file \'" + fileToOpen.getAbsolutePath() + "\'!"); result = false; } } } return result; }
class class_name[name] begin[{] method[showGraphMindMapFileLinksDialog, return_type[type[boolean]], modifier[public], parameter[projectFolder, initialMindMapFile, openIfSelected]] begin[{] call[Utils.assertSwingDispatchThread, parameter[]] local_variable[type[boolean], result] if[binary_operation[binary_operation[member[.projectFolder], !=, literal[null]], ||, binary_operation[member[.initialMindMapFile], !=, literal[null]]]] begin[{] local_variable[type[File], projectFolderToUse] if[binary_operation[member[.projectFolderToUse], ==, literal[null]]] begin[{] local_variable[type[NodeProject], foundProject] if[binary_operation[member[.foundProject], !=, literal[null]]] begin[{] assign[member[.projectFolderToUse], call[foundProject.getFolder, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[FileLinkGraphPanel], graph] call[JOptionPane.showMessageDialog, parameter[THIS[], member[.graph], literal["Graph of Mind Map file links"], member[JOptionPane.PLAIN_MESSAGE]]] local_variable[type[FileLinkGraphPanel], selected] local_variable[type[File], fileToOpen] if[binary_operation[member[.openIfSelected], &&, binary_operation[member[.fileToOpen], !=, literal[null]]]] begin[{] assign[member[.result], literal[true]] local_variable[type[boolean], cantFind] if[call[fileToOpen.exists, parameter[]]] begin[{] if[call[fileToOpen.isFile, parameter[]]] begin[{] if[call[.openFileAsTab, parameter[member[.fileToOpen], literal[1]]]] begin[{] assign[member[.cantFind], literal[false]] else begin[{] None end[}] else begin[{] if[call[fileToOpen.isDirectory, parameter[]]] begin[{] call[.focusInTree, parameter[member[.fileToOpen]]] assign[member[.cantFind], literal[false]] else begin[{] None end[}] end[}] else begin[{] None end[}] if[member[.cantFind]] begin[{] call[DialogProviderManager.getInstance, parameter[]] assign[member[.result], literal[false]] else begin[{] None end[}] else begin[{] None end[}] else begin[{] None end[}] return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[showGraphMindMapFileLinksDialog] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[File] identifier[projectFolder] , annotation[@] identifier[Nullable] Keyword[final] identifier[File] identifier[initialMindMapFile] , Keyword[final] Keyword[boolean] identifier[openIfSelected] operator[SEP] { identifier[Utils] operator[SEP] identifier[assertSwingDispatchThread] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[result] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[projectFolder] operator[!=] Other[null] operator[||] identifier[initialMindMapFile] operator[!=] Other[null] operator[SEP] { identifier[File] identifier[projectFolderToUse] operator[=] identifier[projectFolder] operator[SEP] Keyword[if] operator[SEP] identifier[projectFolderToUse] operator[==] Other[null] operator[SEP] { Keyword[final] identifier[NodeProject] identifier[foundProject] operator[=] identifier[findProjectForFile] operator[SEP] identifier[initialMindMapFile] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[foundProject] operator[!=] Other[null] operator[SEP] { identifier[projectFolderToUse] operator[=] identifier[foundProject] operator[SEP] identifier[getFolder] operator[SEP] operator[SEP] operator[SEP] } } Keyword[final] identifier[FileLinkGraphPanel] identifier[graph] operator[=] Keyword[new] identifier[FileLinkGraphPanel] operator[SEP] identifier[projectFolderToUse] , identifier[initialMindMapFile] operator[SEP] operator[SEP] identifier[JOptionPane] operator[SEP] identifier[showMessageDialog] operator[SEP] Keyword[this] , identifier[graph] , literal[String] , identifier[JOptionPane] operator[SEP] identifier[PLAIN_MESSAGE] operator[SEP] operator[SEP] Keyword[final] identifier[FileLinkGraphPanel] operator[SEP] identifier[FileVertex] identifier[selected] operator[=] identifier[graph] operator[SEP] identifier[getSelectedFile] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[File] identifier[fileToOpen] operator[=] identifier[selected] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[selected] operator[SEP] identifier[getFile] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[openIfSelected] operator[&&] identifier[fileToOpen] operator[!=] Other[null] operator[SEP] { identifier[result] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[cantFind] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[fileToOpen] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[fileToOpen] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[openFileAsTab] operator[SEP] identifier[fileToOpen] , operator[-] Other[1] operator[SEP] operator[SEP] { identifier[cantFind] operator[=] literal[boolean] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[fileToOpen] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[focusInTree] operator[SEP] identifier[fileToOpen] operator[SEP] operator[SEP] identifier[cantFind] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[cantFind] operator[SEP] { identifier[DialogProviderManager] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getDialogProvider] operator[SEP] operator[SEP] operator[SEP] identifier[msgWarn] operator[SEP] Keyword[this] , literal[String] operator[+] identifier[fileToOpen] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] identifier[result] operator[=] literal[boolean] operator[SEP] } } } Keyword[return] identifier[result] operator[SEP] }
@Nonnull public CloseableHttpResponse execute (@Nonnull final HttpUriRequest aRequest) throws IOException { return execute (aRequest, (HttpContext) null); }
class class_name[name] begin[{] method[execute, return_type[type[CloseableHttpResponse]], modifier[public], parameter[aRequest]] begin[{] return[call[.execute, parameter[member[.aRequest], Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), type=ReferenceType(arguments=None, dimensions=[], name=HttpContext, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] identifier[CloseableHttpResponse] identifier[execute] operator[SEP] annotation[@] identifier[Nonnull] Keyword[final] identifier[HttpUriRequest] identifier[aRequest] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[execute] operator[SEP] identifier[aRequest] , operator[SEP] identifier[HttpContext] operator[SEP] Other[null] operator[SEP] operator[SEP] }
public DJBarChartBuilder addSerie(AbstractColumn column, String label) { getDataset().addSerie(column, label); return this; }
class class_name[name] begin[{] method[addSerie, return_type[type[DJBarChartBuilder]], modifier[public], parameter[column, label]] begin[{] call[.getDataset, parameter[]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[DJBarChartBuilder] identifier[addSerie] operator[SEP] identifier[AbstractColumn] identifier[column] , identifier[String] identifier[label] operator[SEP] { identifier[getDataset] operator[SEP] operator[SEP] operator[SEP] identifier[addSerie] operator[SEP] identifier[column] , identifier[label] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public Observable<PolicyDefinitionInner> getAsync(String policyDefinitionName) { return getWithServiceResponseAsync(policyDefinitionName).map(new Func1<ServiceResponse<PolicyDefinitionInner>, PolicyDefinitionInner>() { @Override public PolicyDefinitionInner call(ServiceResponse<PolicyDefinitionInner> response) { return response.body(); } }); }
class class_name[name] begin[{] method[getAsync, return_type[type[Observable]], modifier[public], parameter[policyDefinitionName]] begin[{] return[call[.getWithServiceResponseAsync, parameter[member[.policyDefinitionName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[PolicyDefinitionInner] operator[>] identifier[getAsync] operator[SEP] identifier[String] identifier[policyDefinitionName] operator[SEP] { Keyword[return] identifier[getWithServiceResponseAsync] operator[SEP] identifier[policyDefinitionName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[PolicyDefinitionInner] operator[>] , identifier[PolicyDefinitionInner] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[PolicyDefinitionInner] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[PolicyDefinitionInner] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
private Geometry simplify(Geometry geom, double resolution, double factor){ Geometry simplifiedGeometry = null; if( geom instanceof GeometryCollection ){ GeometryCollection collection = (GeometryCollection)geom; boolean isSimplified = false; //List<Geometry> newComponents = new Vector<Geometry>(); // Extract basic geometries List<Geometry> basicGeometries = new Vector<Geometry>(); collection.accumulateBasicGeometries(basicGeometries); List<Point> accumulatedPoints = new Vector<Point>(); List<LineString> accumulatedLineStrings = new Vector<LineString>(); List<Polygon> accumulatedPolygons = new Vector<Polygon>(); for(Geometry component : basicGeometries){ if( component instanceof Point ){ Point p = (Point)component; accumulatedPoints.add(p); } else if( component instanceof LineString ){ LineString ls = (LineString)component; accumulatedLineStrings.add(ls); } else if( component instanceof Polygon ){ Polygon poly = (Polygon)component; accumulatedPolygons.add(poly); } } List<Geometry> newComponents = new Vector<Geometry>(); // Deal with polygons in one simplification if( accumulatedPolygons.size() > 0 ){ MultiPolygon polygons = new MultiPolygon(accumulatedPolygons); Geometry effectiveComponent = simplify(polygons, resolution, factor); if( null != effectiveComponent ){ isSimplified = true; newComponents.add(effectiveComponent); } else { newComponents.add(polygons); } } // Deal with linestrings in one simplification if( accumulatedLineStrings.size() > 0 ){ MultiLineString linestrings = new MultiLineString(accumulatedLineStrings); Geometry effectiveComponent = simplify(linestrings, resolution, factor); if( null != effectiveComponent ){ isSimplified = true; newComponents.add(effectiveComponent); } else { newComponents.add(linestrings); } } // Deal with points in one simplification if( accumulatedPoints.size() > 0 ){ MultiPoint points = new MultiPoint(accumulatedPoints); Geometry effectiveComponent = simplify(points, resolution, factor); if( null != effectiveComponent ){ isSimplified = true; newComponents.add(effectiveComponent); } else { newComponents.add(points); } } if( isSimplified ){ simplifiedGeometry = new GeometryCollection(newComponents); } } else if( geom instanceof Point ) { // Point point = (Point)geom; // // double x = Math.round(point.getX() * factor) / factor; // double y = Math.round(point.getY() * factor) / factor; // if( x != point.getX() // || y != point.getY() ){ // simplifiedGeometry = new Point(x,y); // } } else if( geom instanceof LineString ) { // The simplification of a LineString might result into a LineString // or into a point LineString lineString = (LineString)geom; boolean isGeneralized = false; List<Point> accumulatedPoints = new Vector<Point>(); Point lastPoint = null; // Keep track of bounds BoundingBox bbox = new BoundingBox(); for(Point point : lineString.getPoints()){ // Keep track of bounds bbox.extendToInclude(point); Geometry simplifiedPointObj = simplify(point, resolution, factor); Point simplifiedPoint = null; if( null != simplifiedPointObj ){ isGeneralized = true; simplifiedPoint = (Point)simplifiedPointObj; } else { simplifiedPoint = point; } if( null == lastPoint ){ lastPoint = simplifiedPoint; accumulatedPoints.add(simplifiedPoint); } else { if( areLocationsColliding(simplifiedPoint, lastPoint, resolution) ){ isGeneralized = true; } else { lastPoint = simplifiedPoint; accumulatedPoints.add(simplifiedPoint); } } } if( isGeneralized ){ // A change occurred if( accumulatedPoints.size() < 2 ){ // Create a point that represents the centre of the line string simplifiedGeometry = bbox.getCentroid(); } else { simplifiedGeometry = new LineString(accumulatedPoints); }; }; } else if( geom instanceof Polygon ) { // Might return a polygon or a point Polygon polygon = (Polygon)geom; boolean newPolygonNeeded = false; List<LineString> newRings = new Vector<LineString>(); // First linear ring is the outer limit of polygon List<LineString> rings = polygon.getLinearRings(); LineString firstRing = rings.get(0); Geometry simplifiedFirstRing = simplify(firstRing, resolution, factor); if( null != simplifiedFirstRing ){ if( simplifiedFirstRing instanceof Point ){ // The outer ring was turned into a point. The whole // polygon is now a point. Do not process the other rings. // Abort and return the point. return simplifiedFirstRing; } else { newPolygonNeeded = true; LineString simplifiedLineString = (LineString)simplifiedFirstRing; newRings.add(simplifiedLineString); } } else { newRings.add(firstRing); } // The following rings are subtractions from the outer ring for(int i=1,e=rings.size(); i<e; ++i){ LineString innerRing = rings.get(i); Geometry simplifiedInnerRing = simplify(innerRing,resolution,factor); if( null != simplifiedInnerRing ){ newPolygonNeeded = true; if( simplifiedInnerRing instanceof Point ){ // Drop inner ring } else { LineString simplifiedLineString = (LineString)simplifiedInnerRing; newRings.add(simplifiedLineString); } } else { newRings.add(innerRing); } } if( newPolygonNeeded ){ simplifiedGeometry = new Polygon(newRings); } } else if( geom instanceof MultiPoint ) { // A MultiPoint can be simplified into a MultiPoint or // a simple Point MultiPoint multiPoint = (MultiPoint)geom; boolean isGeneralized = false; List<Point> accumulatedPoints = new Vector<Point>(); Point lastPoint = null; for(Point point : multiPoint.getPoints()){ Point effectivePoint = point; Geometry simplifiedPoint = simplify(point,resolution,factor); if( null != simplifiedPoint ){ isGeneralized = true; effectivePoint = (Point)simplifiedPoint; } if( null == lastPoint ) { lastPoint = effectivePoint; accumulatedPoints.add(effectivePoint); } else { if( areLocationsColliding(effectivePoint, accumulatedPoints, resolution) ){ // If this points is colliding with other points, do not // add to resulting collection isGeneralized = true; } else { lastPoint = effectivePoint; accumulatedPoints.add(effectivePoint); } } } if( isGeneralized ){ if( accumulatedPoints.size() < 2 ){ simplifiedGeometry = accumulatedPoints.get(0); } else { simplifiedGeometry = new MultiPoint(accumulatedPoints); } } } else if( geom instanceof MultiLineString ) { // A MultiLineString can be simplified into a MultiLineString, a LineString, // a MultiPoint or a Point MultiLineString multiLineString = (MultiLineString)geom; List<LineString> effectiveLineStrings = makeLineStrings( multiLineString.getLineStrings(), null, resolution ); boolean isGeneralized = false; List<LineString> accumulatedLineStrings = new Vector<LineString>(); List<Point> accumulatedPoints = new Vector<Point>(); for(LineString lineString : effectiveLineStrings){ Geometry simplifiedLineString = simplify(lineString, resolution, factor); if( null != simplifiedLineString ){ isGeneralized = true; if( simplifiedLineString instanceof Point ){ Point simplifiedPoint = (Point)simplifiedLineString; if( false == areLocationsColliding(simplifiedPoint, accumulatedPoints, resolution) ){ accumulatedPoints.add(simplifiedPoint); } } else { LineString simplifiedLS = (LineString)simplifiedLineString; accumulatedLineStrings.add(simplifiedLS); } } else { accumulatedLineStrings.add(lineString); } } if( isGeneralized ){ if( accumulatedLineStrings.size() > 1 ){ simplifiedGeometry = new MultiLineString(accumulatedLineStrings); } else if( accumulatedLineStrings.size() == 1 ){ simplifiedGeometry = accumulatedLineStrings.get(0); } else if( accumulatedPoints.size() > 1 ){ simplifiedGeometry = new MultiPoint(accumulatedPoints); } else if( accumulatedPoints.size() == 1 ){ simplifiedGeometry = accumulatedPoints.get(0); } } } else if( geom instanceof MultiPolygon ) { // A MultiPolygon can be simplified into a MultiPolygon, a Polygon, // a MultiPoint or a Point MultiPolygon multiPolygon = (MultiPolygon)geom; boolean isGeneralized = false; List<Polygon> accumulatedPolygons = new Vector<Polygon>(); List<Point> accumulatedPoints = new Vector<Point>(); for(Polygon polygon : multiPolygon.getPolygons()){ Geometry simplifiedPolygon = simplify(polygon, resolution, factor); if( null != simplifiedPolygon ){ isGeneralized = true; if( simplifiedPolygon instanceof Point ){ Point simplifiedPoint = (Point)simplifiedPolygon; if( false == areLocationsColliding(simplifiedPoint, accumulatedPoints, resolution) ){ accumulatedPoints.add(simplifiedPoint); } } else { Polygon simplifiedPoly = (Polygon)simplifiedPolygon; accumulatedPolygons.add(simplifiedPoly); } } else { accumulatedPolygons.add(polygon); } } if( isGeneralized ){ if( accumulatedPolygons.size() > 1 ){ simplifiedGeometry = new MultiPolygon(accumulatedPolygons); } else if( accumulatedPolygons.size() == 1 ){ simplifiedGeometry = accumulatedPolygons.get(0); } else if( accumulatedPoints.size() > 1 ){ simplifiedGeometry = new MultiPoint(accumulatedPoints); } else if( accumulatedPoints.size() == 1 ){ simplifiedGeometry = accumulatedPoints.get(0); } } } return simplifiedGeometry; }
class class_name[name] begin[{] method[simplify, return_type[type[Geometry]], modifier[private], parameter[geom, resolution, factor]] begin[{] local_variable[type[Geometry], simplifiedGeometry] if[binary_operation[member[.geom], instanceof, type[GeometryCollection]]] begin[{] local_variable[type[GeometryCollection], collection] local_variable[type[boolean], isSimplified] local_variable[type[List], basicGeometries] call[collection.accumulateBasicGeometries, parameter[member[.basicGeometries]]] local_variable[type[List], accumulatedPoints] local_variable[type[List], accumulatedLineStrings] local_variable[type[List], accumulatedPolygons] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=LineString, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Polygon, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Polygon, sub_type=None)), name=poly)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Polygon, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=poly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedPolygons, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LineString, sub_type=None)), name=ls)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LineString, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ls, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedLineStrings, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=component, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None)), name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedPoints, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=basicGeometries, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=component)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Geometry, sub_type=None))), label=None) local_variable[type[List], newComponents] if[binary_operation[call[accumulatedPolygons.size, parameter[]], >, literal[0]]] begin[{] local_variable[type[MultiPolygon], polygons] local_variable[type[Geometry], effectiveComponent] if[binary_operation[literal[null], !=, member[.effectiveComponent]]] begin[{] assign[member[.isSimplified], literal[true]] call[newComponents.add, parameter[member[.effectiveComponent]]] else begin[{] call[newComponents.add, parameter[member[.polygons]]] end[}] else begin[{] None end[}] if[binary_operation[call[accumulatedLineStrings.size, parameter[]], >, literal[0]]] begin[{] local_variable[type[MultiLineString], linestrings] local_variable[type[Geometry], effectiveComponent] if[binary_operation[literal[null], !=, member[.effectiveComponent]]] begin[{] assign[member[.isSimplified], literal[true]] call[newComponents.add, parameter[member[.effectiveComponent]]] else begin[{] call[newComponents.add, parameter[member[.linestrings]]] end[}] else begin[{] None end[}] if[binary_operation[call[accumulatedPoints.size, parameter[]], >, literal[0]]] begin[{] local_variable[type[MultiPoint], points] local_variable[type[Geometry], effectiveComponent] if[binary_operation[literal[null], !=, member[.effectiveComponent]]] begin[{] assign[member[.isSimplified], literal[true]] call[newComponents.add, parameter[member[.effectiveComponent]]] else begin[{] call[newComponents.add, parameter[member[.points]]] end[}] else begin[{] None end[}] if[member[.isSimplified]] begin[{] assign[member[.simplifiedGeometry], ClassCreator(arguments=[MemberReference(member=newComponents, 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=GeometryCollection, sub_type=None))] else begin[{] None end[}] else begin[{] if[binary_operation[member[.geom], instanceof, type[Point]]] begin[{] else begin[{] if[binary_operation[member[.geom], instanceof, type[LineString]]] begin[{] local_variable[type[LineString], lineString] local_variable[type[boolean], isGeneralized] local_variable[type[List], accumulatedPoints] local_variable[type[Point], lastPoint] local_variable[type[BoundingBox], bbox] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=point, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=extendToInclude, postfix_operators=[], prefix_operators=[], qualifier=bbox, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=point, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=factor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=simplify, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=simplifiedPointObj)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Geometry, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=simplifiedPoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=simplifiedPointObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=point, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isGeneralized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=simplifiedPointObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None))), label=None)])), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=lastPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lastPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=areLocationsColliding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedPoints, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isGeneralized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedPoints, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getPoints, postfix_operators=[], prefix_operators=[], qualifier=lineString, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=point)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None))), label=None) if[member[.isGeneralized]] begin[{] if[binary_operation[call[accumulatedPoints.size, parameter[]], <, literal[2]]] begin[{] assign[member[.simplifiedGeometry], call[bbox.getCentroid, parameter[]]] else begin[{] assign[member[.simplifiedGeometry], ClassCreator(arguments=[MemberReference(member=accumulatedPoints, 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=LineString, sub_type=None))] end[}] Statement(label=None) else begin[{] None end[}] Statement(label=None) else begin[{] if[binary_operation[member[.geom], instanceof, type[Polygon]]] begin[{] local_variable[type[Polygon], polygon] local_variable[type[boolean], newPolygonNeeded] local_variable[type[List], newRings] local_variable[type[List], rings] local_variable[type[LineString], firstRing] local_variable[type[Geometry], simplifiedFirstRing] if[binary_operation[literal[null], !=, member[.simplifiedFirstRing]]] begin[{] if[binary_operation[member[.simplifiedFirstRing], instanceof, type[Point]]] begin[{] return[member[.simplifiedFirstRing]] else begin[{] assign[member[.newPolygonNeeded], literal[true]] local_variable[type[LineString], simplifiedLineString] call[newRings.add, parameter[member[.simplifiedLineString]]] end[}] else begin[{] call[newRings.add, parameter[member[.firstRing]]] end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=rings, selectors=[], type_arguments=None), name=innerRing)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LineString, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=innerRing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=factor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=simplify, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=simplifiedInnerRing)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Geometry, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=simplifiedInnerRing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=innerRing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=newRings, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=newPolygonNeeded, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=simplifiedInnerRing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=simplifiedInnerRing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LineString, sub_type=None)), name=simplifiedLineString)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LineString, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=simplifiedLineString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=newRings, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i), VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=rings, selectors=[], type_arguments=None), name=e)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) if[member[.newPolygonNeeded]] begin[{] assign[member[.simplifiedGeometry], ClassCreator(arguments=[MemberReference(member=newRings, 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=Polygon, sub_type=None))] else begin[{] None end[}] else begin[{] if[binary_operation[member[.geom], instanceof, type[MultiPoint]]] begin[{] local_variable[type[MultiPoint], multiPoint] local_variable[type[boolean], isGeneralized] local_variable[type[List], accumulatedPoints] local_variable[type[Point], lastPoint] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=point, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=effectivePoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=point, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=factor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=simplify, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=simplifiedPoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Geometry, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isGeneralized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=effectivePoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None))), label=None)])), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=lastPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=effectivePoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=accumulatedPoints, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=areLocationsColliding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=effectivePoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=effectivePoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedPoints, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isGeneralized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=effectivePoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=effectivePoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedPoints, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getPoints, postfix_operators=[], prefix_operators=[], qualifier=multiPoint, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=point)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None))), label=None) if[member[.isGeneralized]] begin[{] if[binary_operation[call[accumulatedPoints.size, parameter[]], <, literal[2]]] begin[{] assign[member[.simplifiedGeometry], call[accumulatedPoints.get, parameter[literal[0]]]] else begin[{] assign[member[.simplifiedGeometry], ClassCreator(arguments=[MemberReference(member=accumulatedPoints, 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=MultiPoint, sub_type=None))] end[}] else begin[{] None end[}] else begin[{] if[binary_operation[member[.geom], instanceof, type[MultiLineString]]] begin[{] local_variable[type[MultiLineString], multiLineString] local_variable[type[List], effectiveLineStrings] local_variable[type[boolean], isGeneralized] local_variable[type[List], accumulatedLineStrings] local_variable[type[List], accumulatedPoints] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=lineString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=factor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=simplify, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=simplifiedLineString)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Geometry, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=simplifiedLineString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lineString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedLineStrings, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isGeneralized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=simplifiedLineString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=simplifiedLineString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=LineString, sub_type=None)), name=simplifiedLS)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LineString, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=simplifiedLS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedLineStrings, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=simplifiedLineString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None)), name=simplifiedPoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), operandr=MethodInvocation(arguments=[MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=accumulatedPoints, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=areLocationsColliding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedPoints, selectors=[], type_arguments=None), label=None)]))]))]))]), control=EnhancedForControl(iterable=MemberReference(member=effectiveLineStrings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=lineString)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=LineString, sub_type=None))), label=None) if[member[.isGeneralized]] begin[{] if[binary_operation[call[accumulatedLineStrings.size, parameter[]], >, literal[1]]] begin[{] assign[member[.simplifiedGeometry], ClassCreator(arguments=[MemberReference(member=accumulatedLineStrings, 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=MultiLineString, sub_type=None))] else begin[{] if[binary_operation[call[accumulatedLineStrings.size, parameter[]], ==, literal[1]]] begin[{] assign[member[.simplifiedGeometry], call[accumulatedLineStrings.get, parameter[literal[0]]]] else begin[{] if[binary_operation[call[accumulatedPoints.size, parameter[]], >, literal[1]]] begin[{] assign[member[.simplifiedGeometry], ClassCreator(arguments=[MemberReference(member=accumulatedPoints, 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=MultiPoint, sub_type=None))] else begin[{] if[binary_operation[call[accumulatedPoints.size, parameter[]], ==, literal[1]]] begin[{] assign[member[.simplifiedGeometry], call[accumulatedPoints.get, parameter[literal[0]]]] else begin[{] None end[}] end[}] end[}] end[}] else begin[{] None end[}] else begin[{] if[binary_operation[member[.geom], instanceof, type[MultiPolygon]]] begin[{] local_variable[type[MultiPolygon], multiPolygon] local_variable[type[boolean], isGeneralized] local_variable[type[List], accumulatedPolygons] local_variable[type[List], accumulatedPoints] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=polygon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=factor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=simplify, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=simplifiedPolygon)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Geometry, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=simplifiedPolygon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=polygon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedPolygons, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isGeneralized, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=simplifiedPolygon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=simplifiedPolygon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Polygon, sub_type=None)), name=simplifiedPoly)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Polygon, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=simplifiedPoly, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedPolygons, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=simplifiedPolygon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None)), name=simplifiedPoint)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), operandr=MethodInvocation(arguments=[MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=accumulatedPoints, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolution, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=areLocationsColliding, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=simplifiedPoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=accumulatedPoints, selectors=[], type_arguments=None), label=None)]))]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getPolygons, postfix_operators=[], prefix_operators=[], qualifier=multiPolygon, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=polygon)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Polygon, sub_type=None))), label=None) if[member[.isGeneralized]] begin[{] if[binary_operation[call[accumulatedPolygons.size, parameter[]], >, literal[1]]] begin[{] assign[member[.simplifiedGeometry], ClassCreator(arguments=[MemberReference(member=accumulatedPolygons, 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=MultiPolygon, sub_type=None))] else begin[{] if[binary_operation[call[accumulatedPolygons.size, parameter[]], ==, literal[1]]] begin[{] assign[member[.simplifiedGeometry], call[accumulatedPolygons.get, parameter[literal[0]]]] else begin[{] if[binary_operation[call[accumulatedPoints.size, parameter[]], >, literal[1]]] begin[{] assign[member[.simplifiedGeometry], ClassCreator(arguments=[MemberReference(member=accumulatedPoints, 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=MultiPoint, sub_type=None))] else begin[{] if[binary_operation[call[accumulatedPoints.size, parameter[]], ==, literal[1]]] begin[{] assign[member[.simplifiedGeometry], call[accumulatedPoints.get, parameter[literal[0]]]] else begin[{] None end[}] end[}] end[}] end[}] else begin[{] None end[}] else begin[{] None end[}] end[}] end[}] end[}] end[}] end[}] end[}] return[member[.simplifiedGeometry]] end[}] END[}]
Keyword[private] identifier[Geometry] identifier[simplify] operator[SEP] identifier[Geometry] identifier[geom] , Keyword[double] identifier[resolution] , Keyword[double] identifier[factor] operator[SEP] { identifier[Geometry] identifier[simplifiedGeometry] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[geom] Keyword[instanceof] identifier[GeometryCollection] operator[SEP] { identifier[GeometryCollection] identifier[collection] operator[=] operator[SEP] identifier[GeometryCollection] operator[SEP] identifier[geom] operator[SEP] Keyword[boolean] identifier[isSimplified] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[Geometry] operator[>] identifier[basicGeometries] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[Geometry] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[collection] operator[SEP] identifier[accumulateBasicGeometries] operator[SEP] identifier[basicGeometries] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Point] operator[>] identifier[accumulatedPoints] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[Point] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[LineString] operator[>] identifier[accumulatedLineStrings] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[LineString] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Polygon] operator[>] identifier[accumulatedPolygons] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[Polygon] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Geometry] identifier[component] operator[:] identifier[basicGeometries] operator[SEP] { Keyword[if] operator[SEP] identifier[component] Keyword[instanceof] identifier[Point] operator[SEP] { identifier[Point] identifier[p] operator[=] operator[SEP] identifier[Point] operator[SEP] identifier[component] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[add] operator[SEP] identifier[p] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[component] Keyword[instanceof] identifier[LineString] operator[SEP] { identifier[LineString] identifier[ls] operator[=] operator[SEP] identifier[LineString] operator[SEP] identifier[component] operator[SEP] identifier[accumulatedLineStrings] operator[SEP] identifier[add] operator[SEP] identifier[ls] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[component] Keyword[instanceof] identifier[Polygon] operator[SEP] { identifier[Polygon] identifier[poly] operator[=] operator[SEP] identifier[Polygon] operator[SEP] identifier[component] operator[SEP] identifier[accumulatedPolygons] operator[SEP] identifier[add] operator[SEP] identifier[poly] operator[SEP] operator[SEP] } } identifier[List] operator[<] identifier[Geometry] operator[>] identifier[newComponents] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[Geometry] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[accumulatedPolygons] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[MultiPolygon] identifier[polygons] operator[=] Keyword[new] identifier[MultiPolygon] operator[SEP] identifier[accumulatedPolygons] operator[SEP] operator[SEP] identifier[Geometry] identifier[effectiveComponent] operator[=] identifier[simplify] operator[SEP] identifier[polygons] , identifier[resolution] , identifier[factor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[effectiveComponent] operator[SEP] { identifier[isSimplified] operator[=] literal[boolean] operator[SEP] identifier[newComponents] operator[SEP] identifier[add] operator[SEP] identifier[effectiveComponent] operator[SEP] operator[SEP] } Keyword[else] { identifier[newComponents] operator[SEP] identifier[add] operator[SEP] identifier[polygons] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[accumulatedLineStrings] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[MultiLineString] identifier[linestrings] operator[=] Keyword[new] identifier[MultiLineString] operator[SEP] identifier[accumulatedLineStrings] operator[SEP] operator[SEP] identifier[Geometry] identifier[effectiveComponent] operator[=] identifier[simplify] operator[SEP] identifier[linestrings] , identifier[resolution] , identifier[factor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[effectiveComponent] operator[SEP] { identifier[isSimplified] operator[=] literal[boolean] operator[SEP] identifier[newComponents] operator[SEP] identifier[add] operator[SEP] identifier[effectiveComponent] operator[SEP] operator[SEP] } Keyword[else] { identifier[newComponents] operator[SEP] identifier[add] operator[SEP] identifier[linestrings] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[MultiPoint] identifier[points] operator[=] Keyword[new] identifier[MultiPoint] operator[SEP] identifier[accumulatedPoints] operator[SEP] operator[SEP] identifier[Geometry] identifier[effectiveComponent] operator[=] identifier[simplify] operator[SEP] identifier[points] , identifier[resolution] , identifier[factor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[effectiveComponent] operator[SEP] { identifier[isSimplified] operator[=] literal[boolean] operator[SEP] identifier[newComponents] operator[SEP] identifier[add] operator[SEP] identifier[effectiveComponent] operator[SEP] operator[SEP] } Keyword[else] { identifier[newComponents] operator[SEP] identifier[add] operator[SEP] identifier[points] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isSimplified] operator[SEP] { identifier[simplifiedGeometry] operator[=] Keyword[new] identifier[GeometryCollection] operator[SEP] identifier[newComponents] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[geom] Keyword[instanceof] identifier[Point] operator[SEP] { } Keyword[else] Keyword[if] operator[SEP] identifier[geom] Keyword[instanceof] identifier[LineString] operator[SEP] { identifier[LineString] identifier[lineString] operator[=] operator[SEP] identifier[LineString] operator[SEP] identifier[geom] operator[SEP] Keyword[boolean] identifier[isGeneralized] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[Point] operator[>] identifier[accumulatedPoints] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[Point] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Point] identifier[lastPoint] operator[=] Other[null] operator[SEP] identifier[BoundingBox] identifier[bbox] operator[=] Keyword[new] identifier[BoundingBox] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Point] identifier[point] operator[:] identifier[lineString] operator[SEP] identifier[getPoints] operator[SEP] operator[SEP] operator[SEP] { identifier[bbox] operator[SEP] identifier[extendToInclude] operator[SEP] identifier[point] operator[SEP] operator[SEP] identifier[Geometry] identifier[simplifiedPointObj] operator[=] identifier[simplify] operator[SEP] identifier[point] , identifier[resolution] , identifier[factor] operator[SEP] operator[SEP] identifier[Point] identifier[simplifiedPoint] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[simplifiedPointObj] operator[SEP] { identifier[isGeneralized] operator[=] literal[boolean] operator[SEP] identifier[simplifiedPoint] operator[=] operator[SEP] identifier[Point] operator[SEP] identifier[simplifiedPointObj] operator[SEP] } Keyword[else] { identifier[simplifiedPoint] operator[=] identifier[point] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[==] identifier[lastPoint] operator[SEP] { identifier[lastPoint] operator[=] identifier[simplifiedPoint] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[add] operator[SEP] identifier[simplifiedPoint] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[areLocationsColliding] operator[SEP] identifier[simplifiedPoint] , identifier[lastPoint] , identifier[resolution] operator[SEP] operator[SEP] { identifier[isGeneralized] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[lastPoint] operator[=] identifier[simplifiedPoint] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[add] operator[SEP] identifier[simplifiedPoint] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[isGeneralized] operator[SEP] { Keyword[if] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] Other[2] operator[SEP] { identifier[simplifiedGeometry] operator[=] identifier[bbox] operator[SEP] identifier[getCentroid] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[simplifiedGeometry] operator[=] Keyword[new] identifier[LineString] operator[SEP] identifier[accumulatedPoints] operator[SEP] operator[SEP] } operator[SEP] } operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[geom] Keyword[instanceof] identifier[Polygon] operator[SEP] { identifier[Polygon] identifier[polygon] operator[=] operator[SEP] identifier[Polygon] operator[SEP] identifier[geom] operator[SEP] Keyword[boolean] identifier[newPolygonNeeded] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[LineString] operator[>] identifier[newRings] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[LineString] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[LineString] operator[>] identifier[rings] operator[=] identifier[polygon] operator[SEP] identifier[getLinearRings] operator[SEP] operator[SEP] operator[SEP] identifier[LineString] identifier[firstRing] operator[=] identifier[rings] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[Geometry] identifier[simplifiedFirstRing] operator[=] identifier[simplify] operator[SEP] identifier[firstRing] , identifier[resolution] , identifier[factor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[simplifiedFirstRing] operator[SEP] { Keyword[if] operator[SEP] identifier[simplifiedFirstRing] Keyword[instanceof] identifier[Point] operator[SEP] { Keyword[return] identifier[simplifiedFirstRing] operator[SEP] } Keyword[else] { identifier[newPolygonNeeded] operator[=] literal[boolean] operator[SEP] identifier[LineString] identifier[simplifiedLineString] operator[=] operator[SEP] identifier[LineString] operator[SEP] identifier[simplifiedFirstRing] operator[SEP] identifier[newRings] operator[SEP] identifier[add] operator[SEP] identifier[simplifiedLineString] operator[SEP] operator[SEP] } } Keyword[else] { identifier[newRings] operator[SEP] identifier[add] operator[SEP] identifier[firstRing] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] , identifier[e] operator[=] identifier[rings] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[<] identifier[e] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[LineString] identifier[innerRing] operator[=] identifier[rings] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[Geometry] identifier[simplifiedInnerRing] operator[=] identifier[simplify] operator[SEP] identifier[innerRing] , identifier[resolution] , identifier[factor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[simplifiedInnerRing] operator[SEP] { identifier[newPolygonNeeded] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[simplifiedInnerRing] Keyword[instanceof] identifier[Point] operator[SEP] { } Keyword[else] { identifier[LineString] identifier[simplifiedLineString] operator[=] operator[SEP] identifier[LineString] operator[SEP] identifier[simplifiedInnerRing] operator[SEP] identifier[newRings] operator[SEP] identifier[add] operator[SEP] identifier[simplifiedLineString] operator[SEP] operator[SEP] } } Keyword[else] { identifier[newRings] operator[SEP] identifier[add] operator[SEP] identifier[innerRing] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[newPolygonNeeded] operator[SEP] { identifier[simplifiedGeometry] operator[=] Keyword[new] identifier[Polygon] operator[SEP] identifier[newRings] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[geom] Keyword[instanceof] identifier[MultiPoint] operator[SEP] { identifier[MultiPoint] identifier[multiPoint] operator[=] operator[SEP] identifier[MultiPoint] operator[SEP] identifier[geom] operator[SEP] Keyword[boolean] identifier[isGeneralized] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[Point] operator[>] identifier[accumulatedPoints] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[Point] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Point] identifier[lastPoint] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Point] identifier[point] operator[:] identifier[multiPoint] operator[SEP] identifier[getPoints] operator[SEP] operator[SEP] operator[SEP] { identifier[Point] identifier[effectivePoint] operator[=] identifier[point] operator[SEP] identifier[Geometry] identifier[simplifiedPoint] operator[=] identifier[simplify] operator[SEP] identifier[point] , identifier[resolution] , identifier[factor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[simplifiedPoint] operator[SEP] { identifier[isGeneralized] operator[=] literal[boolean] operator[SEP] identifier[effectivePoint] operator[=] operator[SEP] identifier[Point] operator[SEP] identifier[simplifiedPoint] operator[SEP] } Keyword[if] operator[SEP] Other[null] operator[==] identifier[lastPoint] operator[SEP] { identifier[lastPoint] operator[=] identifier[effectivePoint] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[add] operator[SEP] identifier[effectivePoint] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[areLocationsColliding] operator[SEP] identifier[effectivePoint] , identifier[accumulatedPoints] , identifier[resolution] operator[SEP] operator[SEP] { identifier[isGeneralized] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[lastPoint] operator[=] identifier[effectivePoint] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[add] operator[SEP] identifier[effectivePoint] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[isGeneralized] operator[SEP] { Keyword[if] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<] Other[2] operator[SEP] { identifier[simplifiedGeometry] operator[=] identifier[accumulatedPoints] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[else] { identifier[simplifiedGeometry] operator[=] Keyword[new] identifier[MultiPoint] operator[SEP] identifier[accumulatedPoints] operator[SEP] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[geom] Keyword[instanceof] identifier[MultiLineString] operator[SEP] { identifier[MultiLineString] identifier[multiLineString] operator[=] operator[SEP] identifier[MultiLineString] operator[SEP] identifier[geom] operator[SEP] identifier[List] operator[<] identifier[LineString] operator[>] identifier[effectiveLineStrings] operator[=] identifier[makeLineStrings] operator[SEP] identifier[multiLineString] operator[SEP] identifier[getLineStrings] operator[SEP] operator[SEP] , Other[null] , identifier[resolution] operator[SEP] operator[SEP] Keyword[boolean] identifier[isGeneralized] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[LineString] operator[>] identifier[accumulatedLineStrings] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[LineString] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Point] operator[>] identifier[accumulatedPoints] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[Point] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[LineString] identifier[lineString] operator[:] identifier[effectiveLineStrings] operator[SEP] { identifier[Geometry] identifier[simplifiedLineString] operator[=] identifier[simplify] operator[SEP] identifier[lineString] , identifier[resolution] , identifier[factor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[simplifiedLineString] operator[SEP] { identifier[isGeneralized] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[simplifiedLineString] Keyword[instanceof] identifier[Point] operator[SEP] { identifier[Point] identifier[simplifiedPoint] operator[=] operator[SEP] identifier[Point] operator[SEP] identifier[simplifiedLineString] operator[SEP] Keyword[if] operator[SEP] literal[boolean] operator[==] identifier[areLocationsColliding] operator[SEP] identifier[simplifiedPoint] , identifier[accumulatedPoints] , identifier[resolution] operator[SEP] operator[SEP] { identifier[accumulatedPoints] operator[SEP] identifier[add] operator[SEP] identifier[simplifiedPoint] operator[SEP] operator[SEP] } } Keyword[else] { identifier[LineString] identifier[simplifiedLS] operator[=] operator[SEP] identifier[LineString] operator[SEP] identifier[simplifiedLineString] operator[SEP] identifier[accumulatedLineStrings] operator[SEP] identifier[add] operator[SEP] identifier[simplifiedLS] operator[SEP] operator[SEP] } } Keyword[else] { identifier[accumulatedLineStrings] operator[SEP] identifier[add] operator[SEP] identifier[lineString] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isGeneralized] operator[SEP] { Keyword[if] operator[SEP] identifier[accumulatedLineStrings] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[simplifiedGeometry] operator[=] Keyword[new] identifier[MultiLineString] operator[SEP] identifier[accumulatedLineStrings] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[accumulatedLineStrings] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[simplifiedGeometry] operator[=] identifier[accumulatedLineStrings] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[simplifiedGeometry] operator[=] Keyword[new] identifier[MultiPoint] operator[SEP] identifier[accumulatedPoints] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[simplifiedGeometry] operator[=] identifier[accumulatedPoints] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } } } Keyword[else] Keyword[if] operator[SEP] identifier[geom] Keyword[instanceof] identifier[MultiPolygon] operator[SEP] { identifier[MultiPolygon] identifier[multiPolygon] operator[=] operator[SEP] identifier[MultiPolygon] operator[SEP] identifier[geom] operator[SEP] Keyword[boolean] identifier[isGeneralized] operator[=] literal[boolean] operator[SEP] identifier[List] operator[<] identifier[Polygon] operator[>] identifier[accumulatedPolygons] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[Polygon] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Point] operator[>] identifier[accumulatedPoints] operator[=] Keyword[new] identifier[Vector] operator[<] identifier[Point] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Polygon] identifier[polygon] operator[:] identifier[multiPolygon] operator[SEP] identifier[getPolygons] operator[SEP] operator[SEP] operator[SEP] { identifier[Geometry] identifier[simplifiedPolygon] operator[=] identifier[simplify] operator[SEP] identifier[polygon] , identifier[resolution] , identifier[factor] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[!=] identifier[simplifiedPolygon] operator[SEP] { identifier[isGeneralized] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[simplifiedPolygon] Keyword[instanceof] identifier[Point] operator[SEP] { identifier[Point] identifier[simplifiedPoint] operator[=] operator[SEP] identifier[Point] operator[SEP] identifier[simplifiedPolygon] operator[SEP] Keyword[if] operator[SEP] literal[boolean] operator[==] identifier[areLocationsColliding] operator[SEP] identifier[simplifiedPoint] , identifier[accumulatedPoints] , identifier[resolution] operator[SEP] operator[SEP] { identifier[accumulatedPoints] operator[SEP] identifier[add] operator[SEP] identifier[simplifiedPoint] operator[SEP] operator[SEP] } } Keyword[else] { identifier[Polygon] identifier[simplifiedPoly] operator[=] operator[SEP] identifier[Polygon] operator[SEP] identifier[simplifiedPolygon] operator[SEP] identifier[accumulatedPolygons] operator[SEP] identifier[add] operator[SEP] identifier[simplifiedPoly] operator[SEP] operator[SEP] } } Keyword[else] { identifier[accumulatedPolygons] operator[SEP] identifier[add] operator[SEP] identifier[polygon] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isGeneralized] operator[SEP] { Keyword[if] operator[SEP] identifier[accumulatedPolygons] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[simplifiedGeometry] operator[=] Keyword[new] identifier[MultiPolygon] operator[SEP] identifier[accumulatedPolygons] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[accumulatedPolygons] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[simplifiedGeometry] operator[=] identifier[accumulatedPolygons] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[simplifiedGeometry] operator[=] Keyword[new] identifier[MultiPoint] operator[SEP] identifier[accumulatedPoints] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[accumulatedPoints] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[simplifiedGeometry] operator[=] identifier[accumulatedPoints] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } } } Keyword[return] identifier[simplifiedGeometry] operator[SEP] }
@RequestMapping(value = "/feature/{number}", method = GET, produces = APPLICATION_JSON_VALUE) public DataResponse<List<Feature>> story( @RequestParam(value = "component", required = true) String cId, @PathVariable(value = "number") String storyNumber) { ObjectId componentId = new ObjectId(cId); return this.featureService.getStory(componentId, storyNumber); }
class class_name[name] begin[{] method[story, return_type[type[DataResponse]], modifier[public], parameter[cId, storyNumber]] begin[{] local_variable[type[ObjectId], componentId] return[THIS[member[None.featureService]call[None.getStory, parameter[member[.componentId], member[.storyNumber]]]]] end[}] END[}]
annotation[@] identifier[RequestMapping] operator[SEP] identifier[value] operator[=] literal[String] , identifier[method] operator[=] identifier[GET] , identifier[produces] operator[=] identifier[APPLICATION_JSON_VALUE] operator[SEP] Keyword[public] identifier[DataResponse] operator[<] identifier[List] operator[<] identifier[Feature] operator[>] operator[>] identifier[story] operator[SEP] annotation[@] identifier[RequestParam] operator[SEP] identifier[value] operator[=] literal[String] , identifier[required] operator[=] literal[boolean] operator[SEP] identifier[String] identifier[cId] , annotation[@] identifier[PathVariable] operator[SEP] identifier[value] operator[=] literal[String] operator[SEP] identifier[String] identifier[storyNumber] operator[SEP] { identifier[ObjectId] identifier[componentId] operator[=] Keyword[new] identifier[ObjectId] operator[SEP] identifier[cId] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[featureService] operator[SEP] identifier[getStory] operator[SEP] identifier[componentId] , identifier[storyNumber] operator[SEP] operator[SEP] }
public static <T> Seq<T> of(Collection<T> c) { if (N.isNullOrEmpty(c)) { return EMPTY; } return new Seq<>(c); }
class class_name[name] begin[{] method[of, return_type[type[Seq]], modifier[public static], parameter[c]] begin[{] if[call[N.isNullOrEmpty, parameter[member[.c]]]] begin[{] return[member[.EMPTY]] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=c, 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=Seq, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Seq] operator[<] identifier[T] operator[>] identifier[of] operator[SEP] identifier[Collection] operator[<] identifier[T] operator[>] identifier[c] operator[SEP] { Keyword[if] operator[SEP] identifier[N] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[c] operator[SEP] operator[SEP] { Keyword[return] identifier[EMPTY] operator[SEP] } Keyword[return] Keyword[new] identifier[Seq] operator[<] operator[>] operator[SEP] identifier[c] operator[SEP] operator[SEP] }
void appendEndElement() { // pop up the stacks if (previousSiblingWasParent) nodes.writeEntry(previousSibling, 2, NULL); // Pop parentage previousSibling = currentParent; nodes.readSlot(currentParent, gotslot); currentParent = gotslot[1] & 0xFFFF; // The element just being finished will be // the previous sibling for the next operation previousSiblingWasParent = true; // Pop a level of namespace table // namespaceTable.removeLastElem(); }
class class_name[name] begin[{] method[appendEndElement, return_type[void], modifier[default], parameter[]] begin[{] if[member[.previousSiblingWasParent]] begin[{] call[nodes.writeEntry, parameter[member[.previousSibling], literal[2], member[.NULL]]] else begin[{] None end[}] assign[member[.previousSibling], member[.currentParent]] call[nodes.readSlot, parameter[member[.currentParent], member[.gotslot]]] assign[member[.currentParent], binary_operation[member[.gotslot], &, literal[0xFFFF]]] assign[member[.previousSiblingWasParent], literal[true]] end[}] END[}]
Keyword[void] identifier[appendEndElement] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[previousSiblingWasParent] operator[SEP] identifier[nodes] operator[SEP] identifier[writeEntry] operator[SEP] identifier[previousSibling] , Other[2] , identifier[NULL] operator[SEP] operator[SEP] identifier[previousSibling] operator[=] identifier[currentParent] operator[SEP] identifier[nodes] operator[SEP] identifier[readSlot] operator[SEP] identifier[currentParent] , identifier[gotslot] operator[SEP] operator[SEP] identifier[currentParent] operator[=] identifier[gotslot] operator[SEP] Other[1] operator[SEP] operator[&] literal[Integer] operator[SEP] identifier[previousSiblingWasParent] operator[=] literal[boolean] operator[SEP] }
public static aaa_stats get(nitro_service service) throws Exception{ aaa_stats obj = new aaa_stats(); aaa_stats[] response = (aaa_stats[])obj.stat_resources(service); return response[0]; }
class class_name[name] begin[{] method[get, return_type[type[aaa_stats]], modifier[public static], parameter[service]] begin[{] local_variable[type[aaa_stats], obj] local_variable[type[aaa_stats], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[aaa_stats] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] { identifier[aaa_stats] identifier[obj] operator[=] Keyword[new] identifier[aaa_stats] operator[SEP] operator[SEP] operator[SEP] identifier[aaa_stats] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[aaa_stats] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[stat_resources] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] Other[0] operator[SEP] operator[SEP] }
private void fireTreeStructureChanged() { // Guaranteed to return a non-null array Object[] listeners = m_listenerList.getListenerList(); TreeModelEvent e = null; // Process the listeners last to first, notifying // those that are interested in this event for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == TreeModelListener.class) { // Lazily create the event: if (e == null) { e = new TreeModelEvent(getRoot(), new Object[] { getRoot() }, null, null); } ((TreeModelListener) listeners[i + 1]).treeStructureChanged(e); } } }
class class_name[name] begin[{] method[fireTreeStructureChanged, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[Object], listeners] local_variable[type[TreeModelEvent], e] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=listeners, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TreeModelListener, sub_type=None)), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=e, 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=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getRoot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MethodInvocation(arguments=[], member=getRoot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TreeModelEvent, sub_type=None))), label=None)])), StatementExpression(expression=Cast(expression=MemberReference(member=listeners, 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=+))]), type=ReferenceType(arguments=None, dimensions=[], name=TreeModelListener, sub_type=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=listeners, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=-), 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) end[}] END[}]
Keyword[private] Keyword[void] identifier[fireTreeStructureChanged] operator[SEP] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[listeners] operator[=] identifier[m_listenerList] operator[SEP] identifier[getListenerList] operator[SEP] operator[SEP] operator[SEP] identifier[TreeModelEvent] identifier[e] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[listeners] operator[SEP] identifier[length] operator[-] Other[2] operator[SEP] identifier[i] operator[>=] Other[0] operator[SEP] identifier[i] operator[-=] Other[2] operator[SEP] { Keyword[if] operator[SEP] identifier[listeners] operator[SEP] identifier[i] operator[SEP] operator[==] identifier[TreeModelListener] operator[SEP] Keyword[class] operator[SEP] { Keyword[if] operator[SEP] identifier[e] operator[==] Other[null] operator[SEP] { identifier[e] operator[=] Keyword[new] identifier[TreeModelEvent] operator[SEP] identifier[getRoot] operator[SEP] operator[SEP] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[getRoot] operator[SEP] operator[SEP] } , Other[null] , Other[null] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[TreeModelListener] operator[SEP] identifier[listeners] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[treeStructureChanged] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } }
public void setRunningIssues(String runningIssues, boolean addOnIssues) { Validate.notNull(runningIssues, "Parameter runningIssues must not be null."); this.runningIssues = runningIssues; this.addOnRunningIssues = addOnIssues; }
class class_name[name] begin[{] method[setRunningIssues, return_type[void], modifier[public], parameter[runningIssues, addOnIssues]] begin[{] call[Validate.notNull, parameter[member[.runningIssues], literal["Parameter runningIssues must not be null."]]] assign[THIS[member[None.runningIssues]], member[.runningIssues]] assign[THIS[member[None.addOnRunningIssues]], member[.addOnIssues]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setRunningIssues] operator[SEP] identifier[String] identifier[runningIssues] , Keyword[boolean] identifier[addOnIssues] operator[SEP] { identifier[Validate] operator[SEP] identifier[notNull] operator[SEP] identifier[runningIssues] , literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[runningIssues] operator[=] identifier[runningIssues] operator[SEP] Keyword[this] operator[SEP] identifier[addOnRunningIssues] operator[=] identifier[addOnIssues] operator[SEP] }
public ConstructorInfo searchDeclaredConstructor(Class<?>... parameterTypes) { ConstructorInfo constructor = ExecutableUtils.getExecutable(declaredConstructorsGetter.get(), null, parameterTypes); if (constructor == null) { constructor = ExecutableUtils.searchExecutable(declaredConstructorsGetter.get(), null, parameterTypes); } return constructor; }
class class_name[name] begin[{] method[searchDeclaredConstructor, return_type[type[ConstructorInfo]], modifier[public], parameter[parameterTypes]] begin[{] local_variable[type[ConstructorInfo], constructor] if[binary_operation[member[.constructor], ==, literal[null]]] begin[{] assign[member[.constructor], call[ExecutableUtils.searchExecutable, parameter[call[declaredConstructorsGetter.get, parameter[]], literal[null], member[.parameterTypes]]]] else begin[{] None end[}] return[member[.constructor]] end[}] END[}]
Keyword[public] identifier[ConstructorInfo] identifier[searchDeclaredConstructor] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[...] identifier[parameterTypes] operator[SEP] { identifier[ConstructorInfo] identifier[constructor] operator[=] identifier[ExecutableUtils] operator[SEP] identifier[getExecutable] operator[SEP] identifier[declaredConstructorsGetter] operator[SEP] identifier[get] operator[SEP] operator[SEP] , Other[null] , identifier[parameterTypes] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[constructor] operator[==] Other[null] operator[SEP] { identifier[constructor] operator[=] identifier[ExecutableUtils] operator[SEP] identifier[searchExecutable] operator[SEP] identifier[declaredConstructorsGetter] operator[SEP] identifier[get] operator[SEP] operator[SEP] , Other[null] , identifier[parameterTypes] operator[SEP] operator[SEP] } Keyword[return] identifier[constructor] operator[SEP] }
public ResourceHealthMetadataInner getBySite(String resourceGroupName, String name) { return getBySiteWithServiceResponseAsync(resourceGroupName, name).toBlocking().single().body(); }
class class_name[name] begin[{] method[getBySite, return_type[type[ResourceHealthMetadataInner]], modifier[public], parameter[resourceGroupName, name]] begin[{] return[call[.getBySiteWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.name]]]] end[}] END[}]
Keyword[public] identifier[ResourceHealthMetadataInner] identifier[getBySite] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[name] operator[SEP] { Keyword[return] identifier[getBySiteWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[name] 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 String resolve(String path) { if (path == null) { return null; } if (path.startsWith("~" + File.separator)) { return SystemUtil.getUserHome() + path.substring(1); } return path; }
class class_name[name] begin[{] method[resolve, return_type[type[String]], modifier[public static], parameter[path]] begin[{] if[binary_operation[member[.path], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[call[path.startsWith, parameter[binary_operation[literal["~"], +, member[File.separator]]]]] begin[{] return[binary_operation[call[SystemUtil.getUserHome, parameter[]], +, call[path.substring, parameter[literal[1]]]]] else begin[{] None end[}] return[member[.path]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[resolve] operator[SEP] identifier[String] identifier[path] operator[SEP] { Keyword[if] operator[SEP] identifier[path] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[path] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[+] identifier[File] operator[SEP] identifier[separator] operator[SEP] operator[SEP] { Keyword[return] identifier[SystemUtil] operator[SEP] identifier[getUserHome] operator[SEP] operator[SEP] operator[+] identifier[path] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[return] identifier[path] operator[SEP] }
@Override public java.util.concurrent.Future<DescribeReservedCacheNodesOfferingsResult> describeReservedCacheNodesOfferingsAsync( com.amazonaws.handlers.AsyncHandler<DescribeReservedCacheNodesOfferingsRequest, DescribeReservedCacheNodesOfferingsResult> asyncHandler) { return describeReservedCacheNodesOfferingsAsync(new DescribeReservedCacheNodesOfferingsRequest(), asyncHandler); }
class class_name[name] begin[{] method[describeReservedCacheNodesOfferingsAsync, return_type[type[java]], modifier[public], parameter[asyncHandler]] begin[{] return[call[.describeReservedCacheNodesOfferingsAsync, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DescribeReservedCacheNodesOfferingsRequest, sub_type=None)), member[.asyncHandler]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[concurrent] operator[SEP] identifier[Future] operator[<] identifier[DescribeReservedCacheNodesOfferingsResult] operator[>] identifier[describeReservedCacheNodesOfferingsAsync] operator[SEP] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[handlers] operator[SEP] identifier[AsyncHandler] operator[<] identifier[DescribeReservedCacheNodesOfferingsRequest] , identifier[DescribeReservedCacheNodesOfferingsResult] operator[>] identifier[asyncHandler] operator[SEP] { Keyword[return] identifier[describeReservedCacheNodesOfferingsAsync] operator[SEP] Keyword[new] identifier[DescribeReservedCacheNodesOfferingsRequest] operator[SEP] operator[SEP] , identifier[asyncHandler] operator[SEP] operator[SEP] }
public void append(char c[], int off, int len) throws IOException { append(new String(c, off, len)); }
class class_name[name] begin[{] method[append, return_type[void], modifier[public], parameter[c, off, len]] begin[{] call[.append, parameter[ClassCreator(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=off, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=len, 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))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[append] operator[SEP] Keyword[char] identifier[c] operator[SEP] operator[SEP] , Keyword[int] identifier[off] , Keyword[int] identifier[len] operator[SEP] Keyword[throws] identifier[IOException] { identifier[append] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[c] , identifier[off] , identifier[len] operator[SEP] operator[SEP] operator[SEP] }
public Observable<ServiceResponse<Page<CsmUsageQuotaInner>>> listUsagesSinglePageAsync(final String resourceGroupName, final String name, final String filter) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (name == null) { throw new IllegalArgumentException("Parameter name is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listUsages(resourceGroupName, name, this.client.subscriptionId(), filter, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<CsmUsageQuotaInner>>>>() { @Override public Observable<ServiceResponse<Page<CsmUsageQuotaInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<CsmUsageQuotaInner>> result = listUsagesDelegate(response); return Observable.just(new ServiceResponse<Page<CsmUsageQuotaInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[listUsagesSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, name, filter]] begin[{] if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and cannot be 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[}] if[binary_operation[member[.name], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter name is required and cannot be 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[}] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and cannot be 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[}] if[binary_operation[THIS[member[None.client]call[None.apiVersion, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.apiVersion() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[call[service.listUsages, parameter[member[.resourceGroupName], member[.name], THIS[member[None.client]call[None.subscriptionId, parameter[]]], member[.filter], THIS[member[None.client]call[None.apiVersion, parameter[]]], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[CsmUsageQuotaInner] operator[>] operator[>] operator[>] identifier[listUsagesSinglePageAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[filter] operator[SEP] { Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[service] operator[SEP] identifier[listUsages] operator[SEP] identifier[resourceGroupName] , identifier[name] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , identifier[filter] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[CsmUsageQuotaInner] operator[>] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[CsmUsageQuotaInner] operator[>] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[PageImpl] operator[<] identifier[CsmUsageQuotaInner] operator[>] operator[>] identifier[result] operator[=] identifier[listUsagesDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] Keyword[new] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[CsmUsageQuotaInner] operator[>] operator[>] operator[SEP] identifier[result] operator[SEP] identifier[body] operator[SEP] operator[SEP] , identifier[result] operator[SEP] identifier[response] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
public String getTargetDestination() { if (tc.isEntryEnabled()) { SibTr.entry(tc, "getTargetDestination"); SibTr.exit(tc, "getTargetDestination", targetDestination); } return targetDestination; }
class class_name[name] begin[{] method[getTargetDestination, return_type[type[String]], modifier[public], parameter[]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["getTargetDestination"]]] call[SibTr.exit, parameter[member[.tc], literal["getTargetDestination"], member[.targetDestination]]] else begin[{] None end[}] return[member[.targetDestination]] end[}] END[}]
Keyword[public] identifier[String] identifier[getTargetDestination] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] 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] , identifier[targetDestination] operator[SEP] operator[SEP] } Keyword[return] identifier[targetDestination] operator[SEP] }
private void initializeStructure(List<AssociatedTriple> listObs, DMatrixRMaj P2, DMatrixRMaj P3) { List<DMatrixRMaj> cameraMatrices = new ArrayList<>(); cameraMatrices.add(P1); cameraMatrices.add(P2); cameraMatrices.add(P3); List<Point2D_F64> triangObs = new ArrayList<>(); triangObs.add(null); triangObs.add(null); triangObs.add(null); structure = new SceneStructureProjective(true); structure.initialize(3,listObs.size()); observations = new SceneObservations(3); structure.setView(0,true, P1,0,0); structure.setView(1,false,P2,0,0); structure.setView(2,false,P3,0,0); boolean needsPruning = false; Point4D_F64 X = new Point4D_F64(); for (int i = 0; i < listObs.size(); i++) { AssociatedTriple t = listObs.get(i); triangObs.set(0,t.p1); triangObs.set(1,t.p2); triangObs.set(2,t.p3); // triangulation can fail if all 3 views have the same pixel value. This has been observed in // simulated 3D scenes if( triangulator.triangulate(triangObs,cameraMatrices,X)) { observations.getView(0).add(i,(float)t.p1.x,(float)t.p1.y); observations.getView(1).add(i,(float)t.p2.x,(float)t.p2.y); observations.getView(2).add(i,(float)t.p3.x,(float)t.p3.y); structure.points[i].set(X.x,X.y,X.z,X.w); } else { needsPruning = true; } } if( needsPruning ) { PruneStructureFromSceneProjective pruner = new PruneStructureFromSceneProjective(structure,observations); pruner.prunePoints(1); } }
class class_name[name] begin[{] method[initializeStructure, return_type[void], modifier[private], parameter[listObs, P2, P3]] begin[{] local_variable[type[List], cameraMatrices] call[cameraMatrices.add, parameter[member[.P1]]] call[cameraMatrices.add, parameter[member[.P2]]] call[cameraMatrices.add, parameter[member[.P3]]] local_variable[type[List], triangObs] call[triangObs.add, parameter[literal[null]]] call[triangObs.add, parameter[literal[null]]] call[triangObs.add, parameter[literal[null]]] assign[member[.structure], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SceneStructureProjective, sub_type=None))] call[structure.initialize, parameter[literal[3], call[listObs.size, parameter[]]]] assign[member[.observations], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SceneObservations, sub_type=None))] call[structure.setView, parameter[literal[0], literal[true], member[.P1], literal[0], literal[0]]] call[structure.setView, parameter[literal[1], literal[false], member[.P2], literal[0], literal[0]]] call[structure.setView, parameter[literal[2], literal[false], member[.P3], literal[0], literal[0]]] local_variable[type[boolean], needsPruning] local_variable[type[Point4D_F64], X] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=listObs, selectors=[], type_arguments=None), name=t)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AssociatedTriple, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=p1, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=triangObs, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MemberReference(member=p2, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=triangObs, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), MemberReference(member=p3, postfix_operators=[], prefix_operators=[], qualifier=t, selectors=[])], member=set, postfix_operators=[], prefix_operators=[], qualifier=triangObs, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=triangObs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cameraMatrices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=X, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=triangulate, postfix_operators=[], prefix_operators=[], qualifier=triangulator, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=needsPruning, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getView, postfix_operators=[], prefix_operators=[], qualifier=observations, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=t.p1, selectors=[]), type=BasicType(dimensions=[], name=float)), Cast(expression=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=t.p1, selectors=[]), type=BasicType(dimensions=[], name=float))], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=getView, postfix_operators=[], prefix_operators=[], qualifier=observations, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=t.p2, selectors=[]), type=BasicType(dimensions=[], name=float)), Cast(expression=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=t.p2, selectors=[]), type=BasicType(dimensions=[], name=float))], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=getView, postfix_operators=[], prefix_operators=[], qualifier=observations, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=t.p3, selectors=[]), type=BasicType(dimensions=[], name=float)), Cast(expression=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=t.p3, selectors=[]), type=BasicType(dimensions=[], name=float))], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=points, postfix_operators=[], prefix_operators=[], qualifier=structure, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=X, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=X, selectors=[]), MemberReference(member=z, postfix_operators=[], prefix_operators=[], qualifier=X, selectors=[]), MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=X, selectors=[])], member=set, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=listObs, 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[member[.needsPruning]] begin[{] local_variable[type[PruneStructureFromSceneProjective], pruner] call[pruner.prunePoints, parameter[literal[1]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[initializeStructure] operator[SEP] identifier[List] operator[<] identifier[AssociatedTriple] operator[>] identifier[listObs] , identifier[DMatrixRMaj] identifier[P2] , identifier[DMatrixRMaj] identifier[P3] operator[SEP] { identifier[List] operator[<] identifier[DMatrixRMaj] operator[>] identifier[cameraMatrices] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[cameraMatrices] operator[SEP] identifier[add] operator[SEP] identifier[P1] operator[SEP] operator[SEP] identifier[cameraMatrices] operator[SEP] identifier[add] operator[SEP] identifier[P2] operator[SEP] operator[SEP] identifier[cameraMatrices] operator[SEP] identifier[add] operator[SEP] identifier[P3] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Point2D_F64] operator[>] identifier[triangObs] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[triangObs] operator[SEP] identifier[add] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[triangObs] operator[SEP] identifier[add] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[triangObs] operator[SEP] identifier[add] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[structure] operator[=] Keyword[new] identifier[SceneStructureProjective] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[structure] operator[SEP] identifier[initialize] operator[SEP] Other[3] , identifier[listObs] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[observations] operator[=] Keyword[new] identifier[SceneObservations] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[structure] operator[SEP] identifier[setView] operator[SEP] Other[0] , literal[boolean] , identifier[P1] , Other[0] , Other[0] operator[SEP] operator[SEP] identifier[structure] operator[SEP] identifier[setView] operator[SEP] Other[1] , literal[boolean] , identifier[P2] , Other[0] , Other[0] operator[SEP] operator[SEP] identifier[structure] operator[SEP] identifier[setView] operator[SEP] Other[2] , literal[boolean] , identifier[P3] , Other[0] , Other[0] operator[SEP] operator[SEP] Keyword[boolean] identifier[needsPruning] operator[=] literal[boolean] operator[SEP] identifier[Point4D_F64] identifier[X] operator[=] Keyword[new] identifier[Point4D_F64] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[listObs] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[AssociatedTriple] identifier[t] operator[=] identifier[listObs] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[triangObs] operator[SEP] identifier[set] operator[SEP] Other[0] , identifier[t] operator[SEP] identifier[p1] operator[SEP] operator[SEP] identifier[triangObs] operator[SEP] identifier[set] operator[SEP] Other[1] , identifier[t] operator[SEP] identifier[p2] operator[SEP] operator[SEP] identifier[triangObs] operator[SEP] identifier[set] operator[SEP] Other[2] , identifier[t] operator[SEP] identifier[p3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[triangulator] operator[SEP] identifier[triangulate] operator[SEP] identifier[triangObs] , identifier[cameraMatrices] , identifier[X] operator[SEP] operator[SEP] { identifier[observations] operator[SEP] identifier[getView] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[i] , operator[SEP] Keyword[float] operator[SEP] identifier[t] operator[SEP] identifier[p1] operator[SEP] identifier[x] , operator[SEP] Keyword[float] operator[SEP] identifier[t] operator[SEP] identifier[p1] operator[SEP] identifier[y] operator[SEP] operator[SEP] identifier[observations] operator[SEP] identifier[getView] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[i] , operator[SEP] Keyword[float] operator[SEP] identifier[t] operator[SEP] identifier[p2] operator[SEP] identifier[x] , operator[SEP] Keyword[float] operator[SEP] identifier[t] operator[SEP] identifier[p2] operator[SEP] identifier[y] operator[SEP] operator[SEP] identifier[observations] operator[SEP] identifier[getView] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[i] , operator[SEP] Keyword[float] operator[SEP] identifier[t] operator[SEP] identifier[p3] operator[SEP] identifier[x] , operator[SEP] Keyword[float] operator[SEP] identifier[t] operator[SEP] identifier[p3] operator[SEP] identifier[y] operator[SEP] operator[SEP] identifier[structure] operator[SEP] identifier[points] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[X] operator[SEP] identifier[x] , identifier[X] operator[SEP] identifier[y] , identifier[X] operator[SEP] identifier[z] , identifier[X] operator[SEP] identifier[w] operator[SEP] operator[SEP] } Keyword[else] { identifier[needsPruning] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[needsPruning] operator[SEP] { identifier[PruneStructureFromSceneProjective] identifier[pruner] operator[=] Keyword[new] identifier[PruneStructureFromSceneProjective] operator[SEP] identifier[structure] , identifier[observations] operator[SEP] operator[SEP] identifier[pruner] operator[SEP] identifier[prunePoints] operator[SEP] Other[1] operator[SEP] operator[SEP] } }
private boolean emitAsKey(String field) { return emitValueAsKey && (field.equals(TaskEvent.METADATA_TASK_WORKING_STATE) || field.equals(JobEvent.METADATA_JOB_STATE)); }
class class_name[name] begin[{] method[emitAsKey, return_type[type[boolean]], modifier[private], parameter[field]] begin[{] return[binary_operation[member[.emitValueAsKey], &&, binary_operation[call[field.equals, parameter[member[TaskEvent.METADATA_TASK_WORKING_STATE]]], ||, call[field.equals, parameter[member[JobEvent.METADATA_JOB_STATE]]]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[emitAsKey] operator[SEP] identifier[String] identifier[field] operator[SEP] { Keyword[return] identifier[emitValueAsKey] operator[&&] operator[SEP] identifier[field] operator[SEP] identifier[equals] operator[SEP] identifier[TaskEvent] operator[SEP] identifier[METADATA_TASK_WORKING_STATE] operator[SEP] operator[||] identifier[field] operator[SEP] identifier[equals] operator[SEP] identifier[JobEvent] operator[SEP] identifier[METADATA_JOB_STATE] operator[SEP] operator[SEP] operator[SEP] }
public String getContent() { String content = ""; NodeList list = dom.getChildNodes(); for (int i=0;i<list.getLength();i++) { if (list.item(i) instanceof Text) { content += (list.item(i).getNodeValue()); } } return content; }
class class_name[name] begin[{] method[getContent, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[String], content] local_variable[type[NodeList], list] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), operandr=ReferenceType(arguments=None, dimensions=[], name=Text, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=list, 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) return[member[.content]] end[}] END[}]
Keyword[public] identifier[String] identifier[getContent] operator[SEP] operator[SEP] { identifier[String] identifier[content] operator[=] literal[String] operator[SEP] identifier[NodeList] identifier[list] operator[=] identifier[dom] operator[SEP] identifier[getChildNodes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[list] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[list] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] Keyword[instanceof] identifier[Text] operator[SEP] { identifier[content] operator[+=] operator[SEP] identifier[list] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getNodeValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[content] operator[SEP] }
public static Bearing calculateBearing(Earth e, LatLonPoint pt1, LatLonPoint pt2, Bearing result) { return calculateBearing(e, pt1.getLatitude(), pt1.getLongitude(), pt2.getLatitude(), pt2.getLongitude(), result); }
class class_name[name] begin[{] method[calculateBearing, return_type[type[Bearing]], modifier[public static], parameter[e, pt1, pt2, result]] begin[{] return[call[.calculateBearing, parameter[member[.e], call[pt1.getLatitude, parameter[]], call[pt1.getLongitude, parameter[]], call[pt2.getLatitude, parameter[]], call[pt2.getLongitude, parameter[]], member[.result]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Bearing] identifier[calculateBearing] operator[SEP] identifier[Earth] identifier[e] , identifier[LatLonPoint] identifier[pt1] , identifier[LatLonPoint] identifier[pt2] , identifier[Bearing] identifier[result] operator[SEP] { Keyword[return] identifier[calculateBearing] operator[SEP] identifier[e] , identifier[pt1] operator[SEP] identifier[getLatitude] operator[SEP] operator[SEP] , identifier[pt1] operator[SEP] identifier[getLongitude] operator[SEP] operator[SEP] , identifier[pt2] operator[SEP] identifier[getLatitude] operator[SEP] operator[SEP] , identifier[pt2] operator[SEP] identifier[getLongitude] operator[SEP] operator[SEP] , identifier[result] operator[SEP] operator[SEP] }
public static int waitForExitProcess(Pointer hProcess) throws InterruptedException { while (true) { if (Thread.interrupted()) throw new InterruptedException(); Kernel32.INSTANCE.WaitForSingleObject(hProcess,1000); IntByReference exitCode = new IntByReference(); exitCode.setValue(-1); Kernel32.INSTANCE.GetExitCodeProcess(hProcess,exitCode); int v = exitCode.getValue(); if (v !=Kernel32.STILL_ACTIVE) { return v; } } }
class class_name[name] begin[{] method[waitForExitProcess, return_type[type[int]], modifier[public static], parameter[hProcess]] begin[{] while[literal[true]] begin[{] if[call[Thread.interrupted, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InterruptedException, sub_type=None)), label=None) else begin[{] None end[}] call[Kernel32.INSTANCE.WaitForSingleObject, parameter[member[.hProcess], literal[1000]]] local_variable[type[IntByReference], exitCode] call[exitCode.setValue, parameter[literal[1]]] call[Kernel32.INSTANCE.GetExitCodeProcess, parameter[member[.hProcess], member[.exitCode]]] local_variable[type[int], v] if[binary_operation[member[.v], !=, member[Kernel32.STILL_ACTIVE]]] begin[{] return[member[.v]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[waitForExitProcess] operator[SEP] identifier[Pointer] identifier[hProcess] operator[SEP] Keyword[throws] identifier[InterruptedException] { Keyword[while] operator[SEP] literal[boolean] operator[SEP] { Keyword[if] operator[SEP] identifier[Thread] operator[SEP] identifier[interrupted] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[InterruptedException] operator[SEP] operator[SEP] operator[SEP] identifier[Kernel32] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[WaitForSingleObject] operator[SEP] identifier[hProcess] , Other[1000] operator[SEP] operator[SEP] identifier[IntByReference] identifier[exitCode] operator[=] Keyword[new] identifier[IntByReference] operator[SEP] operator[SEP] operator[SEP] identifier[exitCode] operator[SEP] identifier[setValue] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[Kernel32] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[GetExitCodeProcess] operator[SEP] identifier[hProcess] , identifier[exitCode] operator[SEP] operator[SEP] Keyword[int] identifier[v] operator[=] identifier[exitCode] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[v] operator[!=] identifier[Kernel32] operator[SEP] identifier[STILL_ACTIVE] operator[SEP] { Keyword[return] identifier[v] operator[SEP] } } }
public static MockMvcFactory of(Object[] controllerOrMockMvcConfigurers) { List<Object> controllers = new ArrayList<Object>(); List<MockMvcConfigurer> configurers = new ArrayList<MockMvcConfigurer>(); for (Object object : controllerOrMockMvcConfigurers) { if (object instanceof MockMvcConfigurer) { configurers.add((MockMvcConfigurer) object); } else { controllers.add(object); } } StandaloneMockMvcBuilder mockMvc = MockMvcBuilders.standaloneSetup(controllers.toArray()); if (!configurers.isEmpty()) { for (MockMvcConfigurer configurer : configurers) { mockMvc.apply(configurer); } } return new MockMvcFactory(mockMvc); }
class class_name[name] begin[{] method[of, return_type[type[MockMvcFactory]], modifier[public static], parameter[controllerOrMockMvcConfigurers]] begin[{] local_variable[type[List], controllers] local_variable[type[List], configurers] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=MockMvcConfigurer, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=controllers, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=MockMvcConfigurer, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=configurers, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=controllerOrMockMvcConfigurers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=object)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) local_variable[type[StandaloneMockMvcBuilder], mockMvc] if[call[configurers.isEmpty, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=configurer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=[], prefix_operators=[], qualifier=mockMvc, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=configurers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=configurer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=MockMvcConfigurer, sub_type=None))), label=None) else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=mockMvc, 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=MockMvcFactory, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[MockMvcFactory] identifier[of] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[controllerOrMockMvcConfigurers] operator[SEP] { identifier[List] operator[<] identifier[Object] operator[>] identifier[controllers] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[MockMvcConfigurer] operator[>] identifier[configurers] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[MockMvcConfigurer] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[object] operator[:] identifier[controllerOrMockMvcConfigurers] operator[SEP] { Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[MockMvcConfigurer] operator[SEP] { identifier[configurers] operator[SEP] identifier[add] operator[SEP] operator[SEP] identifier[MockMvcConfigurer] operator[SEP] identifier[object] operator[SEP] operator[SEP] } Keyword[else] { identifier[controllers] operator[SEP] identifier[add] operator[SEP] identifier[object] operator[SEP] operator[SEP] } } identifier[StandaloneMockMvcBuilder] identifier[mockMvc] operator[=] identifier[MockMvcBuilders] operator[SEP] identifier[standaloneSetup] operator[SEP] identifier[controllers] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[configurers] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[MockMvcConfigurer] identifier[configurer] operator[:] identifier[configurers] operator[SEP] { identifier[mockMvc] operator[SEP] identifier[apply] operator[SEP] identifier[configurer] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[MockMvcFactory] operator[SEP] identifier[mockMvc] operator[SEP] operator[SEP] }
static ModifiableRealmIdentity getRealmIdentity(OperationContext context, String principalName) throws OperationFailedException { ModifiableSecurityRealm modifiableRealm = getModifiableSecurityRealm(context); ModifiableRealmIdentity realmIdentity = null; try { realmIdentity = modifiableRealm.getRealmIdentityForUpdate(new NamePrincipal(principalName)); if (!realmIdentity.exists()) { throw new OperationFailedException(ROOT_LOGGER.identityNotFound(principalName)); } return realmIdentity; } catch (RealmUnavailableException e) { throw ROOT_LOGGER.couldNotReadIdentity(principalName, e); } finally { if (realmIdentity != null) { realmIdentity.dispose(); } } }
class class_name[name] begin[{] method[getRealmIdentity, return_type[type[ModifiableRealmIdentity]], modifier[static], parameter[context, principalName]] begin[{] local_variable[type[ModifiableSecurityRealm], modifiableRealm] local_variable[type[ModifiableRealmIdentity], realmIdentity] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=realmIdentity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=principalName, 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=NamePrincipal, sub_type=None))], member=getRealmIdentityForUpdate, postfix_operators=[], prefix_operators=[], qualifier=modifiableRealm, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=exists, postfix_operators=[], prefix_operators=['!'], qualifier=realmIdentity, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=principalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=identityNotFound, postfix_operators=[], prefix_operators=[], qualifier=ROOT_LOGGER, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OperationFailedException, sub_type=None)), label=None)])), ReturnStatement(expression=MemberReference(member=realmIdentity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=principalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=couldNotReadIdentity, postfix_operators=[], prefix_operators=[], qualifier=ROOT_LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['RealmUnavailableException']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=realmIdentity, 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=dispose, postfix_operators=[], prefix_operators=[], qualifier=realmIdentity, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) end[}] END[}]
Keyword[static] identifier[ModifiableRealmIdentity] identifier[getRealmIdentity] operator[SEP] identifier[OperationContext] identifier[context] , identifier[String] identifier[principalName] operator[SEP] Keyword[throws] identifier[OperationFailedException] { identifier[ModifiableSecurityRealm] identifier[modifiableRealm] operator[=] identifier[getModifiableSecurityRealm] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[ModifiableRealmIdentity] identifier[realmIdentity] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[realmIdentity] operator[=] identifier[modifiableRealm] operator[SEP] identifier[getRealmIdentityForUpdate] operator[SEP] Keyword[new] identifier[NamePrincipal] operator[SEP] identifier[principalName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[realmIdentity] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[OperationFailedException] operator[SEP] identifier[ROOT_LOGGER] operator[SEP] identifier[identityNotFound] operator[SEP] identifier[principalName] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[realmIdentity] operator[SEP] } Keyword[catch] operator[SEP] identifier[RealmUnavailableException] identifier[e] operator[SEP] { Keyword[throw] identifier[ROOT_LOGGER] operator[SEP] identifier[couldNotReadIdentity] operator[SEP] identifier[principalName] , identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[realmIdentity] operator[!=] Other[null] operator[SEP] { identifier[realmIdentity] operator[SEP] identifier[dispose] operator[SEP] operator[SEP] operator[SEP] } } }
private static String formatProvide(String namespace) { StringBuilder sb = new StringBuilder(); sb.append("goog.provide('"); sb.append(namespace); sb.append("');"); return sb.toString(); }
class class_name[name] begin[{] method[formatProvide, return_type[type[String]], modifier[private static], parameter[namespace]] begin[{] local_variable[type[StringBuilder], sb] call[sb.append, parameter[literal["goog.provide('"]]] call[sb.append, parameter[member[.namespace]]] call[sb.append, parameter[literal["');"]]] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[formatProvide] operator[SEP] identifier[String] identifier[namespace] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[namespace] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public synchronized int read(long position, byte[] buffer, int offset, int length) throws IOException { long oldPos = getPos(); int nread = -1; try { seek(position); nread = read(buffer, offset, length); } finally { seek(oldPos); } return nread; }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[synchronized public], parameter[position, buffer, offset, length]] begin[{] local_variable[type[long], oldPos] local_variable[type[int], nread] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=position, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=seek, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=nread, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=buffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=offset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=oldPos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=seek, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) return[member[.nread]] end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[int] identifier[read] operator[SEP] Keyword[long] identifier[position] , Keyword[byte] operator[SEP] operator[SEP] identifier[buffer] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[long] identifier[oldPos] operator[=] identifier[getPos] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[nread] operator[=] operator[-] Other[1] operator[SEP] Keyword[try] { identifier[seek] operator[SEP] identifier[position] operator[SEP] operator[SEP] identifier[nread] operator[=] identifier[read] operator[SEP] identifier[buffer] , identifier[offset] , identifier[length] operator[SEP] operator[SEP] } Keyword[finally] { identifier[seek] operator[SEP] identifier[oldPos] operator[SEP] operator[SEP] } Keyword[return] identifier[nread] operator[SEP] }
public static double pdf(double val, double shape, double location, double scale) { if(val < location) { return 0; } val = (val - location) / scale; double f = shape / scale * FastMath.pow(val, shape - 1.); if(f == Double.POSITIVE_INFINITY) { return 0; } double d = 1. + FastMath.pow(val, shape); return f / (d * d); }
class class_name[name] begin[{] method[pdf, return_type[type[double]], modifier[public static], parameter[val, shape, location, scale]] begin[{] if[binary_operation[member[.val], <, member[.location]]] begin[{] return[literal[0]] else begin[{] None end[}] assign[member[.val], binary_operation[binary_operation[member[.val], -, member[.location]], /, member[.scale]]] local_variable[type[double], f] if[binary_operation[member[.f], ==, member[Double.POSITIVE_INFINITY]]] begin[{] return[literal[0]] else begin[{] None end[}] local_variable[type[double], d] return[binary_operation[member[.f], /, binary_operation[member[.d], *, member[.d]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[pdf] operator[SEP] Keyword[double] identifier[val] , Keyword[double] identifier[shape] , Keyword[double] identifier[location] , Keyword[double] identifier[scale] operator[SEP] { Keyword[if] operator[SEP] identifier[val] operator[<] identifier[location] operator[SEP] { Keyword[return] Other[0] operator[SEP] } identifier[val] operator[=] operator[SEP] identifier[val] operator[-] identifier[location] operator[SEP] operator[/] identifier[scale] operator[SEP] Keyword[double] identifier[f] operator[=] identifier[shape] operator[/] identifier[scale] operator[*] identifier[FastMath] operator[SEP] identifier[pow] operator[SEP] identifier[val] , identifier[shape] operator[-] literal[Float] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[f] operator[==] identifier[Double] operator[SEP] identifier[POSITIVE_INFINITY] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[double] identifier[d] operator[=] literal[Float] operator[+] identifier[FastMath] operator[SEP] identifier[pow] operator[SEP] identifier[val] , identifier[shape] operator[SEP] operator[SEP] Keyword[return] identifier[f] operator[/] operator[SEP] identifier[d] operator[*] identifier[d] operator[SEP] operator[SEP] }
public final static Observable<WatchEvent<?>> from(final File file, List<Kind<?>> kinds) { return from(file, null, kinds.toArray(new Kind<?>[] {})); }
class class_name[name] begin[{] method[from, return_type[type[Observable]], modifier[final public static], parameter[file, kinds]] begin[{] return[call[.from, parameter[member[.file], literal[null], call[kinds.toArray, parameter[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=None, name=Kind, sub_type=None))]]]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[static] identifier[Observable] operator[<] identifier[WatchEvent] operator[<] operator[?] operator[>] operator[>] identifier[from] operator[SEP] Keyword[final] identifier[File] identifier[file] , identifier[List] operator[<] identifier[Kind] operator[<] operator[?] operator[>] operator[>] identifier[kinds] operator[SEP] { Keyword[return] identifier[from] operator[SEP] identifier[file] , Other[null] , identifier[kinds] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[Kind] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] { } operator[SEP] operator[SEP] operator[SEP] }
public static <T> List<T> takeWhile(List<T> self, @ClosureParams(FirstParam.FirstGenericType.class) Closure condition) { int num = 0; BooleanClosureWrapper bcw = new BooleanClosureWrapper(condition); for (T value : self) { if (bcw.call(value)) { num += 1; } else { break; } } return take(self, num); }
class class_name[name] begin[{] method[takeWhile, return_type[type[List]], modifier[public static], parameter[self, condition]] begin[{] local_variable[type[int], num] local_variable[type[BooleanClosureWrapper], bcw] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=call, postfix_operators=[], prefix_operators=[], qualifier=bcw, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[BreakStatement(goto=None, label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=num, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=self, 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=T, sub_type=None))), label=None) return[call[.take, parameter[member[.self], member[.num]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[List] operator[<] identifier[T] operator[>] identifier[takeWhile] operator[SEP] identifier[List] operator[<] identifier[T] operator[>] identifier[self] , annotation[@] identifier[ClosureParams] operator[SEP] identifier[FirstParam] operator[SEP] identifier[FirstGenericType] operator[SEP] Keyword[class] operator[SEP] identifier[Closure] identifier[condition] operator[SEP] { Keyword[int] identifier[num] operator[=] Other[0] operator[SEP] identifier[BooleanClosureWrapper] identifier[bcw] operator[=] Keyword[new] identifier[BooleanClosureWrapper] operator[SEP] identifier[condition] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[T] identifier[value] operator[:] identifier[self] operator[SEP] { Keyword[if] operator[SEP] identifier[bcw] operator[SEP] identifier[call] operator[SEP] identifier[value] operator[SEP] operator[SEP] { identifier[num] operator[+=] Other[1] operator[SEP] } Keyword[else] { Keyword[break] operator[SEP] } } Keyword[return] identifier[take] operator[SEP] identifier[self] , identifier[num] operator[SEP] operator[SEP] }
public static CoverageData<?> getCoverageData(GeoPackage geoPackage, TileDao tileDao, Projection requestProjection) { return getCoverageData(geoPackage, tileDao, null, null, requestProjection); }
class class_name[name] begin[{] method[getCoverageData, return_type[type[CoverageData]], modifier[public static], parameter[geoPackage, tileDao, requestProjection]] begin[{] return[call[.getCoverageData, parameter[member[.geoPackage], member[.tileDao], literal[null], literal[null], member[.requestProjection]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CoverageData] operator[<] operator[?] operator[>] identifier[getCoverageData] operator[SEP] identifier[GeoPackage] identifier[geoPackage] , identifier[TileDao] identifier[tileDao] , identifier[Projection] identifier[requestProjection] operator[SEP] { Keyword[return] identifier[getCoverageData] operator[SEP] identifier[geoPackage] , identifier[tileDao] , Other[null] , Other[null] , identifier[requestProjection] operator[SEP] operator[SEP] }
public static <I, Void, V> MapOnlyMapper<I, V> forMapper(Mapper<I, Void, V> mapper) { return new MapperAdapter<>(mapper); }
class class_name[name] begin[{] method[forMapper, return_type[type[MapOnlyMapper]], modifier[public static], parameter[mapper]] begin[{] return[ClassCreator(arguments=[MemberReference(member=mapper, 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=MapperAdapter, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[I] , identifier[Void] , identifier[V] operator[>] identifier[MapOnlyMapper] operator[<] identifier[I] , identifier[V] operator[>] identifier[forMapper] operator[SEP] identifier[Mapper] operator[<] identifier[I] , identifier[Void] , identifier[V] operator[>] identifier[mapper] operator[SEP] { Keyword[return] Keyword[new] identifier[MapperAdapter] operator[<] operator[>] operator[SEP] identifier[mapper] operator[SEP] operator[SEP] }
static boolean isChanged(Collection<RedisNodeDescription> o1, Collection<RedisNodeDescription> o2) { if (o1.size() != o2.size()) { return true; } for (RedisNodeDescription base : o2) { if (!essentiallyEqualsTo(base, findNodeByUri(o1, base.getUri()))) { return true; } } return false; }
class class_name[name] begin[{] method[isChanged, return_type[type[boolean]], modifier[static], parameter[o1, o2]] begin[{] if[binary_operation[call[o1.size, parameter[]], !=, call[o2.size, parameter[]]]] begin[{] return[literal[true]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=base, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=o1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getUri, postfix_operators=[], prefix_operators=[], qualifier=base, selectors=[], type_arguments=None)], member=findNodeByUri, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=essentiallyEqualsTo, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=o2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=base)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RedisNodeDescription, sub_type=None))), label=None) return[literal[false]] end[}] END[}]
Keyword[static] Keyword[boolean] identifier[isChanged] operator[SEP] identifier[Collection] operator[<] identifier[RedisNodeDescription] operator[>] identifier[o1] , identifier[Collection] operator[<] identifier[RedisNodeDescription] operator[>] identifier[o2] operator[SEP] { Keyword[if] operator[SEP] identifier[o1] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[!=] identifier[o2] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[for] operator[SEP] identifier[RedisNodeDescription] identifier[base] operator[:] identifier[o2] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[essentiallyEqualsTo] operator[SEP] identifier[base] , identifier[findNodeByUri] operator[SEP] identifier[o1] , identifier[base] operator[SEP] identifier[getUri] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public static TextArea newTextArea (String text, int width, int height) { TextArea area = new TextArea(); if (text != null) { area.setText(text); } if (width > 0) { area.setCharacterWidth(width); } if (height > 0) { area.setVisibleLines(height); } return area; }
class class_name[name] begin[{] method[newTextArea, return_type[type[TextArea]], modifier[public static], parameter[text, width, height]] begin[{] local_variable[type[TextArea], area] if[binary_operation[member[.text], !=, literal[null]]] begin[{] call[area.setText, parameter[member[.text]]] else begin[{] None end[}] if[binary_operation[member[.width], >, literal[0]]] begin[{] call[area.setCharacterWidth, parameter[member[.width]]] else begin[{] None end[}] if[binary_operation[member[.height], >, literal[0]]] begin[{] call[area.setVisibleLines, parameter[member[.height]]] else begin[{] None end[}] return[member[.area]] end[}] END[}]
Keyword[public] Keyword[static] identifier[TextArea] identifier[newTextArea] operator[SEP] identifier[String] identifier[text] , Keyword[int] identifier[width] , Keyword[int] identifier[height] operator[SEP] { identifier[TextArea] identifier[area] operator[=] Keyword[new] identifier[TextArea] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[text] operator[!=] Other[null] operator[SEP] { identifier[area] operator[SEP] identifier[setText] operator[SEP] identifier[text] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[width] operator[>] Other[0] operator[SEP] { identifier[area] operator[SEP] identifier[setCharacterWidth] operator[SEP] identifier[width] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[height] operator[>] Other[0] operator[SEP] { identifier[area] operator[SEP] identifier[setVisibleLines] operator[SEP] identifier[height] operator[SEP] operator[SEP] } Keyword[return] identifier[area] operator[SEP] }
public void startDiff(String oldJar, String newJar) throws DiffException { Element tmp = doc.createElementNS(XML_URI, "diff"); tmp.setAttribute( "old", oldJar); tmp.setAttribute( "new", newJar); doc.appendChild(tmp); currentNode = tmp; }
class class_name[name] begin[{] method[startDiff, return_type[void], modifier[public], parameter[oldJar, newJar]] begin[{] local_variable[type[Element], tmp] call[tmp.setAttribute, parameter[literal["old"], member[.oldJar]]] call[tmp.setAttribute, parameter[literal["new"], member[.newJar]]] call[doc.appendChild, parameter[member[.tmp]]] assign[member[.currentNode], member[.tmp]] end[}] END[}]
Keyword[public] Keyword[void] identifier[startDiff] operator[SEP] identifier[String] identifier[oldJar] , identifier[String] identifier[newJar] operator[SEP] Keyword[throws] identifier[DiffException] { identifier[Element] identifier[tmp] operator[=] identifier[doc] operator[SEP] identifier[createElementNS] operator[SEP] identifier[XML_URI] , literal[String] operator[SEP] operator[SEP] identifier[tmp] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[oldJar] operator[SEP] operator[SEP] identifier[tmp] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[newJar] operator[SEP] operator[SEP] identifier[doc] operator[SEP] identifier[appendChild] operator[SEP] identifier[tmp] operator[SEP] operator[SEP] identifier[currentNode] operator[=] identifier[tmp] operator[SEP] }
void deliverError(final OtpCookedConnection conn, final Exception e) { removeConnection(conn); remoteStatus(conn.name, false, e); }
class class_name[name] begin[{] method[deliverError, return_type[void], modifier[default], parameter[conn, e]] begin[{] call[.removeConnection, parameter[member[.conn]]] call[.remoteStatus, parameter[member[conn.name], literal[false], member[.e]]] end[}] END[}]
Keyword[void] identifier[deliverError] operator[SEP] Keyword[final] identifier[OtpCookedConnection] identifier[conn] , Keyword[final] identifier[Exception] identifier[e] operator[SEP] { identifier[removeConnection] operator[SEP] identifier[conn] operator[SEP] operator[SEP] identifier[remoteStatus] operator[SEP] identifier[conn] operator[SEP] identifier[name] , literal[boolean] , identifier[e] operator[SEP] operator[SEP] }
public static String getProperty(String base, String property) { return getProperty(base, property, true); }
class class_name[name] begin[{] method[getProperty, return_type[type[String]], modifier[public static], parameter[base, property]] begin[{] return[call[.getProperty, parameter[member[.base], member[.property], literal[true]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getProperty] operator[SEP] identifier[String] identifier[base] , identifier[String] identifier[property] operator[SEP] { Keyword[return] identifier[getProperty] operator[SEP] identifier[base] , identifier[property] , literal[boolean] operator[SEP] operator[SEP] }
public Promise<V> now() { final Promise<V> smartFuture = new Promise<V>(); JobsPlugin.executor.submit(getJobCallingCallable(smartFuture)); return smartFuture; }
class class_name[name] begin[{] method[now, return_type[type[Promise]], modifier[public], parameter[]] begin[{] local_variable[type[Promise], smartFuture] call[JobsPlugin.executor.submit, parameter[call[.getJobCallingCallable, parameter[member[.smartFuture]]]]] return[member[.smartFuture]] end[}] END[}]
Keyword[public] identifier[Promise] operator[<] identifier[V] operator[>] identifier[now] operator[SEP] operator[SEP] { Keyword[final] identifier[Promise] operator[<] identifier[V] operator[>] identifier[smartFuture] operator[=] Keyword[new] identifier[Promise] operator[<] identifier[V] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[JobsPlugin] operator[SEP] identifier[executor] operator[SEP] identifier[submit] operator[SEP] identifier[getJobCallingCallable] operator[SEP] identifier[smartFuture] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[smartFuture] operator[SEP] }
public CloudJobSchedule getJobSchedule(String jobScheduleId) throws BatchErrorException, IOException { return getJobSchedule(jobScheduleId, null, null); }
class class_name[name] begin[{] method[getJobSchedule, return_type[type[CloudJobSchedule]], modifier[public], parameter[jobScheduleId]] begin[{] return[call[.getJobSchedule, parameter[member[.jobScheduleId], literal[null], literal[null]]]] end[}] END[}]
Keyword[public] identifier[CloudJobSchedule] identifier[getJobSchedule] operator[SEP] identifier[String] identifier[jobScheduleId] operator[SEP] Keyword[throws] identifier[BatchErrorException] , identifier[IOException] { Keyword[return] identifier[getJobSchedule] operator[SEP] identifier[jobScheduleId] , Other[null] , Other[null] operator[SEP] operator[SEP] }
private EventLogger getCustomEventLogger(MuleContext muleContext) { Object obj = getCustomEventLoggerFromRegistry(muleContext); if (obj == null) { log.debug("no custom event logger defined using bean name: {}", CUSTOM_EVENT_LOGGER_BEAN_NAME); return null; } if (obj instanceof EventLogger) { log.debug( "custom event logger defined using bean name: {}, impl class: {}", CUSTOM_EVENT_LOGGER_BEAN_NAME, obj.getClass().getName()); return (EventLogger) obj; } else { String errMsg = "custom event logger defined using bean name: " + CUSTOM_EVENT_LOGGER_BEAN_NAME + " does not implement required interface: " + EventLogger.class.getName() + ", impl class: " + obj.getClass().getName(); log.error(errMsg); throw new IllegalStateException(errMsg); } }
class class_name[name] begin[{] method[getCustomEventLogger, return_type[type[EventLogger]], modifier[private], parameter[muleContext]] begin[{] local_variable[type[Object], obj] if[binary_operation[member[.obj], ==, literal[null]]] begin[{] call[log.debug, parameter[literal["no custom event logger defined using bean name: {}"], member[.CUSTOM_EVENT_LOGGER_BEAN_NAME]]] return[literal[null]] else begin[{] None end[}] if[binary_operation[member[.obj], instanceof, type[EventLogger]]] begin[{] call[log.debug, parameter[literal["custom event logger defined using bean name: {}, impl class: {}"], member[.CUSTOM_EVENT_LOGGER_BEAN_NAME], call[obj.getClass, parameter[]]]] return[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=EventLogger, sub_type=None))] else begin[{] local_variable[type[String], errMsg] call[log.error, parameter[member[.errMsg]]] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=errMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) end[}] end[}] END[}]
Keyword[private] identifier[EventLogger] identifier[getCustomEventLogger] operator[SEP] identifier[MuleContext] identifier[muleContext] operator[SEP] { identifier[Object] identifier[obj] operator[=] identifier[getCustomEventLoggerFromRegistry] operator[SEP] identifier[muleContext] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[obj] operator[==] Other[null] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[CUSTOM_EVENT_LOGGER_BEAN_NAME] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[EventLogger] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[CUSTOM_EVENT_LOGGER_BEAN_NAME] , identifier[obj] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[EventLogger] operator[SEP] identifier[obj] operator[SEP] } Keyword[else] { identifier[String] identifier[errMsg] operator[=] literal[String] operator[+] identifier[CUSTOM_EVENT_LOGGER_BEAN_NAME] operator[+] literal[String] operator[+] identifier[EventLogger] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[obj] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[errMsg] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] identifier[errMsg] operator[SEP] operator[SEP] } }
public static Map<String, OptionalFailure<Object>> deserializeAccumulators( Map<String, SerializedValue<OptionalFailure<Object>>> serializedAccumulators, ClassLoader loader) throws IOException, ClassNotFoundException { if (serializedAccumulators == null || serializedAccumulators.isEmpty()) { return Collections.emptyMap(); } Map<String, OptionalFailure<Object>> accumulators = new HashMap<>(serializedAccumulators.size()); for (Map.Entry<String, SerializedValue<OptionalFailure<Object>>> entry : serializedAccumulators.entrySet()) { OptionalFailure<Object> value = null; if (entry.getValue() != null) { value = entry.getValue().deserializeValue(loader); } accumulators.put(entry.getKey(), value); } return accumulators; }
class class_name[name] begin[{] method[deserializeAccumulators, return_type[type[Map]], modifier[public static], parameter[serializedAccumulators, loader]] begin[{] if[binary_operation[binary_operation[member[.serializedAccumulators], ==, literal[null]], ||, call[serializedAccumulators.isEmpty, parameter[]]]] begin[{] return[call[Collections.emptyMap, parameter[]]] else begin[{] None end[}] local_variable[type[Map], accumulators] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=value)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=OptionalFailure, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, 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=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[MemberReference(member=loader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=deserializeValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=accumulators, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=serializedAccumulators, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=OptionalFailure, sub_type=None))], dimensions=[], name=SerializedValue, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) return[member[.accumulators]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Map] operator[<] identifier[String] , identifier[OptionalFailure] operator[<] identifier[Object] operator[>] operator[>] identifier[deserializeAccumulators] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[SerializedValue] operator[<] identifier[OptionalFailure] operator[<] identifier[Object] operator[>] operator[>] operator[>] identifier[serializedAccumulators] , identifier[ClassLoader] identifier[loader] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { Keyword[if] operator[SEP] identifier[serializedAccumulators] operator[==] Other[null] operator[||] identifier[serializedAccumulators] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[OptionalFailure] operator[<] identifier[Object] operator[>] operator[>] identifier[accumulators] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] identifier[serializedAccumulators] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[SerializedValue] operator[<] identifier[OptionalFailure] operator[<] identifier[Object] operator[>] operator[>] operator[>] identifier[entry] operator[:] identifier[serializedAccumulators] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[OptionalFailure] operator[<] identifier[Object] operator[>] identifier[value] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[value] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[deserializeValue] operator[SEP] identifier[loader] operator[SEP] operator[SEP] } identifier[accumulators] operator[SEP] identifier[put] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] , identifier[value] operator[SEP] operator[SEP] } Keyword[return] identifier[accumulators] operator[SEP] }
private void validateRSV(byte opcodeByte) throws ProtocolDecoderException { if ((opcodeByte & 0x70) != 0) { // We don't support negotiated extensions that deal with RSV bits if ((opcodeByte & 0x40) != 0) { throw new ProtocolDecoderException("RSV1 is set"); } if ((opcodeByte & 0x20) != 0) { throw new ProtocolDecoderException("RSV2 is set"); } if ((opcodeByte & 0x10) != 0) { throw new ProtocolDecoderException("RSV3 is set"); } } }
class class_name[name] begin[{] method[validateRSV, return_type[void], modifier[private], parameter[opcodeByte]] begin[{] if[binary_operation[binary_operation[member[.opcodeByte], &, literal[0x70]], !=, literal[0]]] begin[{] if[binary_operation[binary_operation[member[.opcodeByte], &, literal[0x40]], !=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="RSV1 is set")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProtocolDecoderException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[binary_operation[member[.opcodeByte], &, literal[0x20]], !=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="RSV2 is set")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProtocolDecoderException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[binary_operation[member[.opcodeByte], &, literal[0x10]], !=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="RSV3 is set")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProtocolDecoderException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[validateRSV] operator[SEP] Keyword[byte] identifier[opcodeByte] operator[SEP] Keyword[throws] identifier[ProtocolDecoderException] { Keyword[if] operator[SEP] operator[SEP] identifier[opcodeByte] operator[&] literal[Integer] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[opcodeByte] operator[&] literal[Integer] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProtocolDecoderException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[opcodeByte] operator[&] literal[Integer] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProtocolDecoderException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[opcodeByte] operator[&] literal[Integer] operator[SEP] operator[!=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProtocolDecoderException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } }
private void resubscribe_if_needed() { Enumeration channel_names = EventConsumer.getChannelMap().keys(); long now = System.currentTimeMillis(); // check the list of not yet connected events and try to subscribe while (channel_names.hasMoreElements()) { String name = (String) channel_names.nextElement(); EventChannelStruct eventChannelStruct = EventConsumer.getChannelMap().get(name); if ((now - eventChannelStruct.last_subscribed) > EVENT_RESUBSCRIBE_PERIOD / 3) { reSubscribeByName(eventChannelStruct, name); } eventChannelStruct.consumer.checkIfHeartbeatSkipped(name, eventChannelStruct); }// end while channel_names.hasMoreElements() }
class class_name[name] begin[{] method[resubscribe_if_needed, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[Enumeration], channel_names] local_variable[type[long], now] while[call[channel_names.hasMoreElements, parameter[]]] begin[{] local_variable[type[String], name] local_variable[type[EventChannelStruct], eventChannelStruct] if[binary_operation[binary_operation[member[.now], -, member[eventChannelStruct.last_subscribed]], >, binary_operation[member[.EVENT_RESUBSCRIBE_PERIOD], /, literal[3]]]] begin[{] call[.reSubscribeByName, parameter[member[.eventChannelStruct], member[.name]]] else begin[{] None end[}] call[eventChannelStruct.consumer.checkIfHeartbeatSkipped, parameter[member[.name], member[.eventChannelStruct]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[resubscribe_if_needed] operator[SEP] operator[SEP] { identifier[Enumeration] identifier[channel_names] operator[=] identifier[EventConsumer] operator[SEP] identifier[getChannelMap] operator[SEP] operator[SEP] operator[SEP] identifier[keys] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[now] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[channel_names] operator[SEP] identifier[hasMoreElements] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[name] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[channel_names] operator[SEP] identifier[nextElement] operator[SEP] operator[SEP] operator[SEP] identifier[EventChannelStruct] identifier[eventChannelStruct] operator[=] identifier[EventConsumer] operator[SEP] identifier[getChannelMap] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[now] operator[-] identifier[eventChannelStruct] operator[SEP] identifier[last_subscribed] operator[SEP] operator[>] identifier[EVENT_RESUBSCRIBE_PERIOD] operator[/] Other[3] operator[SEP] { identifier[reSubscribeByName] operator[SEP] identifier[eventChannelStruct] , identifier[name] operator[SEP] operator[SEP] } identifier[eventChannelStruct] operator[SEP] identifier[consumer] operator[SEP] identifier[checkIfHeartbeatSkipped] operator[SEP] identifier[name] , identifier[eventChannelStruct] operator[SEP] operator[SEP] } }
static String getFontName(AssetManager assets, String filePath) { TTFAssetInputStream in = null; try { InputStream file = assets.open(filePath, AssetManager.ACCESS_RANDOM); in = new TTFAssetInputStream(file); return getTTFFontName(in, filePath); } catch (FileNotFoundException e) { return null; // Missing permissions? } catch (IOException e) { return null; // Corrupted font file? } finally { IOUtils.closeQuietly(in); } }
class class_name[name] begin[{] method[getFontName, return_type[type[String]], modifier[static], parameter[assets, filePath]] begin[{] local_variable[type[TTFAssetInputStream], in] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=filePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ACCESS_RANDOM, postfix_operators=[], prefix_operators=[], qualifier=AssetManager, selectors=[])], member=open, postfix_operators=[], prefix_operators=[], qualifier=assets, selectors=[], type_arguments=None), name=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TTFAssetInputStream, sub_type=None))), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTTFFontName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['FileNotFoundException'])), CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=closeQuietly, postfix_operators=[], prefix_operators=[], qualifier=IOUtils, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[static] identifier[String] identifier[getFontName] operator[SEP] identifier[AssetManager] identifier[assets] , identifier[String] identifier[filePath] operator[SEP] { identifier[TTFAssetInputStream] identifier[in] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[InputStream] identifier[file] operator[=] identifier[assets] operator[SEP] identifier[open] operator[SEP] identifier[filePath] , identifier[AssetManager] operator[SEP] identifier[ACCESS_RANDOM] operator[SEP] operator[SEP] identifier[in] operator[=] Keyword[new] identifier[TTFAssetInputStream] operator[SEP] identifier[file] operator[SEP] operator[SEP] Keyword[return] identifier[getTTFFontName] operator[SEP] identifier[in] , identifier[filePath] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[FileNotFoundException] identifier[e] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[finally] { identifier[IOUtils] operator[SEP] identifier[closeQuietly] operator[SEP] identifier[in] operator[SEP] operator[SEP] } }