code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public ServiceFuture<ImageAnalysis> analyzeImageAsync(String url, AnalyzeImageOptionalParameter analyzeImageOptionalParameter, final ServiceCallback<ImageAnalysis> serviceCallback) { return ServiceFuture.fromResponse(analyzeImageWithServiceResponseAsync(url, analyzeImageOptionalParameter), serviceCallback); }
class class_name[name] begin[{] method[analyzeImageAsync, return_type[type[ServiceFuture]], modifier[public], parameter[url, analyzeImageOptionalParameter, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.analyzeImageWithServiceResponseAsync, parameter[member[.url], member[.analyzeImageOptionalParameter]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[ImageAnalysis] operator[>] identifier[analyzeImageAsync] operator[SEP] identifier[String] identifier[url] , identifier[AnalyzeImageOptionalParameter] identifier[analyzeImageOptionalParameter] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[ImageAnalysis] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[analyzeImageWithServiceResponseAsync] operator[SEP] identifier[url] , identifier[analyzeImageOptionalParameter] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
protected boolean locateMatchingHttpRequest(final Authentication authentication, final HttpServletRequest request) { if (StringUtils.isNotBlank(bypassProperties.getHttpRequestRemoteAddress())) { if (httpRequestRemoteAddressPattern.matcher(request.getRemoteAddr()).find()) { LOGGER.debug("Http request remote address [{}] matches [{}]", bypassProperties.getHttpRequestRemoteAddress(), request.getRemoteAddr()); return true; } if (httpRequestRemoteAddressPattern.matcher(request.getRemoteHost()).find()) { LOGGER.debug("Http request remote host [{}] matches [{}]", bypassProperties.getHttpRequestRemoteAddress(), request.getRemoteHost()); return true; } } if (StringUtils.isNotBlank(bypassProperties.getHttpRequestHeaders())) { val headerNames = Collections.list(request.getHeaderNames()); val matched = this.httpRequestHeaderPatterns.stream() .anyMatch(pattern -> headerNames.stream().anyMatch(name -> pattern.matcher(name).matches())); if (matched) { LOGGER.debug("Http request remote headers [{}] match [{}]", headerNames, bypassProperties.getHttpRequestHeaders()); return true; } } return false; }
class class_name[name] begin[{] method[locateMatchingHttpRequest, return_type[type[boolean]], modifier[protected], parameter[authentication, request]] begin[{] if[call[StringUtils.isNotBlank, parameter[call[bypassProperties.getHttpRequestRemoteAddress, parameter[]]]]] begin[{] if[call[httpRequestRemoteAddressPattern.matcher, parameter[call[request.getRemoteAddr, parameter[]]]]] begin[{] call[LOGGER.debug, parameter[literal["Http request remote address [{}] matches [{}]"], call[bypassProperties.getHttpRequestRemoteAddress, parameter[]], call[request.getRemoteAddr, parameter[]]]] return[literal[true]] else begin[{] None end[}] if[call[httpRequestRemoteAddressPattern.matcher, parameter[call[request.getRemoteHost, parameter[]]]]] begin[{] call[LOGGER.debug, parameter[literal["Http request remote host [{}] matches [{}]"], call[bypassProperties.getHttpRequestRemoteAddress, parameter[]], call[request.getRemoteHost, parameter[]]]] return[literal[true]] else begin[{] None end[}] else begin[{] None end[}] if[call[StringUtils.isNotBlank, parameter[call[bypassProperties.getHttpRequestHeaders, parameter[]]]]] begin[{] local_variable[type[val], headerNames] local_variable[type[val], matched] if[member[.matched]] begin[{] call[LOGGER.debug, parameter[literal["Http request remote headers [{}] match [{}]"], member[.headerNames], call[bypassProperties.getHttpRequestHeaders, parameter[]]]] return[literal[true]] else begin[{] None end[}] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[locateMatchingHttpRequest] operator[SEP] Keyword[final] identifier[Authentication] identifier[authentication] , Keyword[final] identifier[HttpServletRequest] identifier[request] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[bypassProperties] operator[SEP] identifier[getHttpRequestRemoteAddress] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[httpRequestRemoteAddressPattern] operator[SEP] identifier[matcher] operator[SEP] identifier[request] operator[SEP] identifier[getRemoteAddr] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[bypassProperties] operator[SEP] identifier[getHttpRequestRemoteAddress] operator[SEP] operator[SEP] , identifier[request] operator[SEP] identifier[getRemoteAddr] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[httpRequestRemoteAddressPattern] operator[SEP] identifier[matcher] operator[SEP] identifier[request] operator[SEP] identifier[getRemoteHost] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[bypassProperties] operator[SEP] identifier[getHttpRequestRemoteAddress] operator[SEP] operator[SEP] , identifier[request] operator[SEP] identifier[getRemoteHost] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[bypassProperties] operator[SEP] identifier[getHttpRequestHeaders] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[val] identifier[headerNames] operator[=] identifier[Collections] operator[SEP] identifier[list] operator[SEP] identifier[request] operator[SEP] identifier[getHeaderNames] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[val] identifier[matched] operator[=] Keyword[this] operator[SEP] identifier[httpRequestHeaderPatterns] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[anyMatch] operator[SEP] identifier[pattern] operator[->] identifier[headerNames] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[anyMatch] operator[SEP] identifier[name] operator[->] identifier[pattern] operator[SEP] identifier[matcher] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matched] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[headerNames] , identifier[bypassProperties] operator[SEP] identifier[getHttpRequestHeaders] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
@SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case TypesPackage.JVM_BOOLEAN_ANNOTATION_VALUE__VALUES: getValues().clear(); getValues().addAll((Collection<? extends Boolean>)newValue); return; } super.eSet(featureID, newValue); }
class class_name[name] begin[{] method[eSet, return_type[void], modifier[public], parameter[featureID, newValue]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=JVM_BOOLEAN_ANNOTATION_VALUE__VALUES, postfix_operators=[], prefix_operators=[], qualifier=TypesPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=getValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=clear, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Cast(expression=MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=Boolean, sub_type=None))], dimensions=[], name=Collection, sub_type=None))], member=addAll, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=newValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eSet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eSet] operator[SEP] Keyword[int] identifier[featureID] , identifier[Object] identifier[newValue] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[TypesPackage] operator[SEP] identifier[JVM_BOOLEAN_ANNOTATION_VALUE__VALUES] operator[:] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] identifier[getValues] operator[SEP] operator[SEP] operator[SEP] identifier[addAll] operator[SEP] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[Boolean] operator[>] operator[SEP] identifier[newValue] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[super] operator[SEP] identifier[eSet] operator[SEP] identifier[featureID] , identifier[newValue] operator[SEP] operator[SEP] }
protected AbstractColumn buildExpressionColumn() { ExpressionColumn column = new ExpressionColumn(); populateCommonAttributes(column); populateExpressionAttributes(column); column.setExpression(customExpression); column.setExpressionToGroupBy(customExpressionToGroupBy); column.setExpressionForCalculation(customExpressionForCalculation); return column; }
class class_name[name] begin[{] method[buildExpressionColumn, return_type[type[AbstractColumn]], modifier[protected], parameter[]] begin[{] local_variable[type[ExpressionColumn], column] call[.populateCommonAttributes, parameter[member[.column]]] call[.populateExpressionAttributes, parameter[member[.column]]] call[column.setExpression, parameter[member[.customExpression]]] call[column.setExpressionToGroupBy, parameter[member[.customExpressionToGroupBy]]] call[column.setExpressionForCalculation, parameter[member[.customExpressionForCalculation]]] return[member[.column]] end[}] END[}]
Keyword[protected] identifier[AbstractColumn] identifier[buildExpressionColumn] operator[SEP] operator[SEP] { identifier[ExpressionColumn] identifier[column] operator[=] Keyword[new] identifier[ExpressionColumn] operator[SEP] operator[SEP] operator[SEP] identifier[populateCommonAttributes] operator[SEP] identifier[column] operator[SEP] operator[SEP] identifier[populateExpressionAttributes] operator[SEP] identifier[column] operator[SEP] operator[SEP] identifier[column] operator[SEP] identifier[setExpression] operator[SEP] identifier[customExpression] operator[SEP] operator[SEP] identifier[column] operator[SEP] identifier[setExpressionToGroupBy] operator[SEP] identifier[customExpressionToGroupBy] operator[SEP] operator[SEP] identifier[column] operator[SEP] identifier[setExpressionForCalculation] operator[SEP] identifier[customExpressionForCalculation] operator[SEP] operator[SEP] Keyword[return] identifier[column] operator[SEP] }
@Override public ResponseStubbing withHeader(final String name, final String value) { currentResponse().addHeader(name, value); return this; }
class class_name[name] begin[{] method[withHeader, return_type[type[ResponseStubbing]], modifier[public], parameter[name, value]] begin[{] call[.currentResponse, parameter[]] return[THIS[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ResponseStubbing] identifier[withHeader] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[value] operator[SEP] { identifier[currentResponse] operator[SEP] operator[SEP] operator[SEP] identifier[addHeader] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public GroupPattern<T, F> followedBy(Pattern<T, F> group) { return new GroupPattern<>(this, group, ConsumingStrategy.SKIP_TILL_NEXT, afterMatchSkipStrategy); }
class class_name[name] begin[{] method[followedBy, return_type[type[GroupPattern]], modifier[public], parameter[group]] begin[{] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SKIP_TILL_NEXT, postfix_operators=[], prefix_operators=[], qualifier=ConsumingStrategy, selectors=[]), MemberReference(member=afterMatchSkipStrategy, 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=GroupPattern, sub_type=None))] end[}] END[}]
Keyword[public] identifier[GroupPattern] operator[<] identifier[T] , identifier[F] operator[>] identifier[followedBy] operator[SEP] identifier[Pattern] operator[<] identifier[T] , identifier[F] operator[>] identifier[group] operator[SEP] { Keyword[return] Keyword[new] identifier[GroupPattern] operator[<] operator[>] operator[SEP] Keyword[this] , identifier[group] , identifier[ConsumingStrategy] operator[SEP] identifier[SKIP_TILL_NEXT] , identifier[afterMatchSkipStrategy] operator[SEP] operator[SEP] }
@Override public List<User> getAllUsers() throws ServiceException { if(! isStarted){ ServiceDirectoryError error = new ServiceDirectoryError(ErrorCode.SERVICE_DIRECTORY_MANAGER_FACTORY_CLOSED); throw new ServiceException(error); } return getRegistrationService().getAllUser(); }
class class_name[name] begin[{] method[getAllUsers, return_type[type[List]], modifier[public], parameter[]] begin[{] if[member[.isStarted]] begin[{] local_variable[type[ServiceDirectoryError], error] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=error, 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=ServiceException, sub_type=None)), label=None) else begin[{] None end[}] return[call[.getRegistrationService, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[User] operator[>] identifier[getAllUsers] operator[SEP] operator[SEP] Keyword[throws] identifier[ServiceException] { Keyword[if] operator[SEP] operator[!] identifier[isStarted] operator[SEP] { identifier[ServiceDirectoryError] identifier[error] operator[=] Keyword[new] identifier[ServiceDirectoryError] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[SERVICE_DIRECTORY_MANAGER_FACTORY_CLOSED] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[ServiceException] operator[SEP] identifier[error] operator[SEP] operator[SEP] } Keyword[return] identifier[getRegistrationService] operator[SEP] operator[SEP] operator[SEP] identifier[getAllUser] operator[SEP] operator[SEP] operator[SEP] }
public void parse(Proxy proxy) { if (proxy.getProxyType() == Proxy.ProxyType.UNSPECIFIED) { return; } reset(); switch (proxy.getProxyType()) { case DIRECT: if (!product.is(MOBILE)) { setEnabled(false); } setUsePAC(false); break; case MANUAL: if (!product.is(MOBILE)) { setEnabled(true); } setUsePAC(false); // TODO(andreastt): HTTPS proxy // TODO(andreastt): SOCKS proxy if (proxy.getHttpProxy() != null) { setHttpProxy(proxy.getHttpProxy()); } if (proxy.getFtpProxy() != null) { setFtpProxy(proxy.getFtpProxy()); } break; case PAC: if (!product.is(MOBILE)) { setEnabled(true); } setUsePAC(true); if (proxy.getProxyAutoconfigUrl() != null) { setAutoconfigUrl(proxy.getProxyAutoconfigUrl()); } break; default: logger.warning("Unsupported proxy type: " + proxy.getProxyType()); } }
class class_name[name] begin[{] method[parse, return_type[void], modifier[public], parameter[proxy]] begin[{] if[binary_operation[call[proxy.getProxyType, parameter[]], ==, member[Proxy.ProxyType.UNSPECIFIED]]] begin[{] return[None] else begin[{] None end[}] call[.reset, parameter[]] SwitchStatement(cases=[SwitchStatementCase(case=['DIRECT'], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=MOBILE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=is, postfix_operators=[], prefix_operators=['!'], qualifier=product, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setUsePAC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['MANUAL'], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=MOBILE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=is, postfix_operators=[], prefix_operators=['!'], qualifier=product, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=setUsePAC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHttpProxy, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHttpProxy, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[], type_arguments=None)], member=setHttpProxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getFtpProxy, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getFtpProxy, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[], type_arguments=None)], member=setFtpProxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['PAC'], statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=MOBILE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=is, postfix_operators=[], prefix_operators=['!'], qualifier=product, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setEnabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setUsePAC, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getProxyAutoconfigUrl, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getProxyAutoconfigUrl, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[], type_arguments=None)], member=setAutoconfigUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported proxy type: "), operandr=MethodInvocation(arguments=[], member=getProxyType, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[], type_arguments=None), operator=+)], member=warning, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)])], expression=MethodInvocation(arguments=[], member=getProxyType, postfix_operators=[], prefix_operators=[], qualifier=proxy, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[parse] operator[SEP] identifier[Proxy] identifier[proxy] operator[SEP] { Keyword[if] operator[SEP] identifier[proxy] operator[SEP] identifier[getProxyType] operator[SEP] operator[SEP] operator[==] identifier[Proxy] operator[SEP] identifier[ProxyType] operator[SEP] identifier[UNSPECIFIED] operator[SEP] { Keyword[return] operator[SEP] } identifier[reset] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[proxy] operator[SEP] identifier[getProxyType] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[DIRECT] operator[:] Keyword[if] operator[SEP] operator[!] identifier[product] operator[SEP] identifier[is] operator[SEP] identifier[MOBILE] operator[SEP] operator[SEP] { identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } identifier[setUsePAC] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[MANUAL] operator[:] Keyword[if] operator[SEP] operator[!] identifier[product] operator[SEP] identifier[is] operator[SEP] identifier[MOBILE] operator[SEP] operator[SEP] { identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } identifier[setUsePAC] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[proxy] operator[SEP] identifier[getHttpProxy] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[setHttpProxy] operator[SEP] identifier[proxy] operator[SEP] identifier[getHttpProxy] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[proxy] operator[SEP] identifier[getFtpProxy] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[setFtpProxy] operator[SEP] identifier[proxy] operator[SEP] identifier[getFtpProxy] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[PAC] operator[:] Keyword[if] operator[SEP] operator[!] identifier[product] operator[SEP] identifier[is] operator[SEP] identifier[MOBILE] operator[SEP] operator[SEP] { identifier[setEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } identifier[setUsePAC] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[proxy] operator[SEP] identifier[getProxyAutoconfigUrl] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[setAutoconfigUrl] operator[SEP] identifier[proxy] operator[SEP] identifier[getProxyAutoconfigUrl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[default] operator[:] identifier[logger] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[+] identifier[proxy] operator[SEP] identifier[getProxyType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private String parseLevelOfTheory(String line) { StringBuffer summary = new StringBuffer(); summary.append(line); try { do { line = input.readLine().trim(); summary.append(line); } while (!(line.indexOf('@') >= 0)); } catch (Exception exc) { logger.debug("syntax problem while parsing summary of g98 section: "); logger.debug(exc); } logger.debug("parseLoT(): " + summary.toString()); StringTokenizer st1 = new StringTokenizer(summary.toString(), "\\"); // Must contain at least 6 tokens if (st1.countTokens() < 6) { return null; } // Skip first four tokens for (int i = 0; i < 4; ++i) { st1.nextToken(); } return st1.nextToken() + "/" + st1.nextToken(); }
class class_name[name] begin[{] method[parseLevelOfTheory, return_type[type[String]], modifier[private], parameter[line]] begin[{] local_variable[type[StringBuffer], summary] call[summary.append, parameter[member[.line]]] TryStatement(block=[DoStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=summary, selectors=[], type_arguments=None), label=None)]), condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='@')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="syntax problem while parsing summary of g98 section: ")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=exc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exc, types=['Exception']))], finally_block=None, label=None, resources=None) call[logger.debug, parameter[binary_operation[literal["parseLoT(): "], +, call[summary.toString, parameter[]]]]] local_variable[type[StringTokenizer], st1] if[binary_operation[call[st1.countTokens, parameter[]], <, literal[6]]] begin[{] return[literal[null]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=nextToken, postfix_operators=[], prefix_operators=[], qualifier=st1, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), 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[binary_operation[binary_operation[call[st1.nextToken, parameter[]], +, literal["/"]], +, call[st1.nextToken, parameter[]]]] end[}] END[}]
Keyword[private] identifier[String] identifier[parseLevelOfTheory] operator[SEP] identifier[String] identifier[line] operator[SEP] { identifier[StringBuffer] identifier[summary] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[summary] operator[SEP] identifier[append] operator[SEP] identifier[line] operator[SEP] operator[SEP] Keyword[try] { Keyword[do] { identifier[line] operator[=] identifier[input] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[summary] operator[SEP] identifier[append] operator[SEP] identifier[line] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] operator[!] operator[SEP] identifier[line] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[>=] Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[exc] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[exc] operator[SEP] operator[SEP] } identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[summary] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[StringTokenizer] identifier[st1] operator[=] Keyword[new] identifier[StringTokenizer] operator[SEP] identifier[summary] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[st1] operator[SEP] identifier[countTokens] operator[SEP] operator[SEP] operator[<] Other[6] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Other[4] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[st1] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[st1] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[st1] operator[SEP] identifier[nextToken] operator[SEP] operator[SEP] operator[SEP] }
public EClass getIfcStructuralLoadPlanarForce() { if (ifcStructuralLoadPlanarForceEClass == null) { ifcStructuralLoadPlanarForceEClass = (EClass) EPackage.Registry.INSTANCE .getEPackage(Ifc2x3tc1Package.eNS_URI).getEClassifiers().get(548); } return ifcStructuralLoadPlanarForceEClass; }
class class_name[name] begin[{] method[getIfcStructuralLoadPlanarForce, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcStructuralLoadPlanarForceEClass], ==, literal[null]]] begin[{] assign[member[.ifcStructuralLoadPlanarForceEClass], 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=548)], 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[.ifcStructuralLoadPlanarForceEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getIfcStructuralLoadPlanarForce] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcStructuralLoadPlanarForceEClass] operator[==] Other[null] operator[SEP] { identifier[ifcStructuralLoadPlanarForceEClass] operator[=] operator[SEP] identifier[EClass] 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[548] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcStructuralLoadPlanarForceEClass] operator[SEP] }
public int getXOrigin (int orient, int frameIdx) { CompositedMultiFrameImage cmfi = (CompositedMultiFrameImage) getFrames(orient); return cmfi.getXOrigin(frameIdx); }
class class_name[name] begin[{] method[getXOrigin, return_type[type[int]], modifier[public], parameter[orient, frameIdx]] begin[{] local_variable[type[CompositedMultiFrameImage], cmfi] return[call[cmfi.getXOrigin, parameter[member[.frameIdx]]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getXOrigin] operator[SEP] Keyword[int] identifier[orient] , Keyword[int] identifier[frameIdx] operator[SEP] { identifier[CompositedMultiFrameImage] identifier[cmfi] operator[=] operator[SEP] identifier[CompositedMultiFrameImage] operator[SEP] identifier[getFrames] operator[SEP] identifier[orient] operator[SEP] operator[SEP] Keyword[return] identifier[cmfi] operator[SEP] identifier[getXOrigin] operator[SEP] identifier[frameIdx] operator[SEP] operator[SEP] }
long prevSetBit(long index) { assert index >= 0 && index < numBits : "index=" + index + " numBits=" + numBits; int i = (int) (index >> 6); final int subIndex = (int) (index & 0x3f); // index within the word long word = (bits[i] << (63 - subIndex)); // skip all the bits to the // left of index if (word != 0) { return (i << 6) + subIndex - Long.numberOfLeadingZeros(word); // See // LUCENE-3197 } while (--i >= 0) { word = bits[i]; if (word != 0) { return (i << 6) + 63 - Long.numberOfLeadingZeros(word); } } return -1; }
class class_name[name] begin[{] method[prevSetBit, return_type[type[long]], modifier[default], parameter[index]] begin[{] AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numBits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), label=None, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="index="), operandr=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" numBits="), operator=+), operandr=MemberReference(member=numBits, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)) local_variable[type[int], i] local_variable[type[int], subIndex] local_variable[type[long], word] if[binary_operation[member[.word], !=, literal[0]]] begin[{] return[binary_operation[binary_operation[binary_operation[member[.i], <<, literal[6]], +, member[.subIndex]], -, call[Long.numberOfLeadingZeros, parameter[member[.word]]]]] else begin[{] None end[}] while[binary_operation[member[.i], >=, literal[0]]] begin[{] assign[member[.word], member[.bits]] if[binary_operation[member[.word], !=, literal[0]]] begin[{] return[binary_operation[binary_operation[binary_operation[member[.i], <<, literal[6]], +, literal[63]], -, call[Long.numberOfLeadingZeros, parameter[member[.word]]]]] else begin[{] None end[}] end[}] return[literal[1]] end[}] END[}]
Keyword[long] identifier[prevSetBit] operator[SEP] Keyword[long] identifier[index] operator[SEP] { Keyword[assert] identifier[index] operator[>=] Other[0] operator[&&] identifier[index] operator[<] identifier[numBits] operator[:] literal[String] operator[+] identifier[index] operator[+] literal[String] operator[+] identifier[numBits] operator[SEP] Keyword[int] identifier[i] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[index] operator[>] operator[>] Other[6] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[subIndex] operator[=] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[index] operator[&] literal[Integer] operator[SEP] operator[SEP] Keyword[long] identifier[word] operator[=] operator[SEP] identifier[bits] operator[SEP] identifier[i] operator[SEP] operator[<<] operator[SEP] Other[63] operator[-] identifier[subIndex] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[word] operator[!=] Other[0] operator[SEP] { Keyword[return] operator[SEP] identifier[i] operator[<<] Other[6] operator[SEP] operator[+] identifier[subIndex] operator[-] identifier[Long] operator[SEP] identifier[numberOfLeadingZeros] operator[SEP] identifier[word] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] operator[--] identifier[i] operator[>=] Other[0] operator[SEP] { identifier[word] operator[=] identifier[bits] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[word] operator[!=] Other[0] operator[SEP] { Keyword[return] operator[SEP] identifier[i] operator[<<] Other[6] operator[SEP] operator[+] Other[63] operator[-] identifier[Long] operator[SEP] identifier[numberOfLeadingZeros] operator[SEP] identifier[word] operator[SEP] operator[SEP] } } Keyword[return] operator[-] Other[1] operator[SEP] }
public String currentStatus() { StringBuffer sb = new StringBuffer(); sb.append("===== CommonThreadPool Status at ").append(new Date()).append(" =====\n"); sb.append("Threads: current=").append(thread_pool.getPoolSize()); sb.append(", core=").append(thread_pool.getCorePoolSize()); sb.append(", max=").append(thread_pool.getMaximumPoolSize()); sb.append(", active=").append(thread_pool.getActiveCount()).append("\n"); BlockingQueue<Runnable> workQueue = thread_pool.getQueue(); sb.append("Queue: current=").append(workQueue.size()).append("\n"); sb.append("Works: total=").append(thread_pool.getTaskCount()); sb.append(", completed=").append(thread_pool.getCompletedTaskCount()).append("\n"); for (String name : workers.keySet()) { Worker worker = workers.get(name); sb.append(" - Worker ").append(name); sb.append(": current works=").append(worker.curWorks); sb.append(", current thread=").append(worker.curThreads); sb.append(", total submit=").append(worker.totalSubmits); sb.append(", total reject=").append(worker.totalRejects).append("\n"); } Worker worker = defaultWorker; sb.append(" - Default Worker: "); sb.append(": current works=").append(worker.curWorks); sb.append(", current thread=").append(worker.curThreads); sb.append(", total submit=").append(worker.totalSubmits); sb.append(", total reject=").append(worker.totalRejects).append("\n"); return sb.toString(); }
class class_name[name] begin[{] method[currentStatus, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuffer], sb] call[sb.append, parameter[literal["===== CommonThreadPool Status at "]]] call[sb.append, parameter[literal["Threads: current="]]] call[sb.append, parameter[literal[", core="]]] call[sb.append, parameter[literal[", max="]]] call[sb.append, parameter[literal[", active="]]] local_variable[type[BlockingQueue], workQueue] call[sb.append, parameter[literal["Queue: current="]]] call[sb.append, parameter[literal["Works: total="]]] call[sb.append, parameter[literal[", completed="]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=workers, selectors=[], type_arguments=None), name=worker)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Worker, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" - Worker ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, 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=": current works=")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=curWorks, postfix_operators=[], prefix_operators=[], qualifier=worker, selectors=[])], member=append, 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=", current thread=")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=curThreads, postfix_operators=[], prefix_operators=[], qualifier=worker, selectors=[])], member=append, 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=", total submit=")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=totalSubmits, postfix_operators=[], prefix_operators=[], qualifier=worker, selectors=[])], member=append, 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=", total reject=")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=totalRejects, postfix_operators=[], prefix_operators=[], qualifier=worker, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=workers, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) local_variable[type[Worker], worker] call[sb.append, parameter[literal[" - Default Worker: "]]] call[sb.append, parameter[literal[": current works="]]] call[sb.append, parameter[literal[", current thread="]]] call[sb.append, parameter[literal[", total submit="]]] call[sb.append, parameter[literal[", total reject="]]] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[currentStatus] operator[SEP] operator[SEP] { identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] Keyword[new] identifier[Date] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[thread_pool] operator[SEP] identifier[getPoolSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[thread_pool] operator[SEP] identifier[getCorePoolSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[thread_pool] operator[SEP] identifier[getMaximumPoolSize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[thread_pool] operator[SEP] identifier[getActiveCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[BlockingQueue] operator[<] identifier[Runnable] operator[>] identifier[workQueue] operator[=] identifier[thread_pool] operator[SEP] identifier[getQueue] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[workQueue] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[thread_pool] operator[SEP] identifier[getTaskCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[thread_pool] operator[SEP] identifier[getCompletedTaskCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[name] operator[:] identifier[workers] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[Worker] identifier[worker] operator[=] identifier[workers] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[worker] operator[SEP] identifier[curWorks] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[worker] operator[SEP] identifier[curThreads] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[worker] operator[SEP] identifier[totalSubmits] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[worker] operator[SEP] identifier[totalRejects] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Worker] identifier[worker] operator[=] identifier[defaultWorker] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[worker] operator[SEP] identifier[curWorks] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[worker] operator[SEP] identifier[curThreads] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[worker] operator[SEP] identifier[totalSubmits] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[worker] operator[SEP] identifier[totalRejects] operator[SEP] 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] }
@NonNull public static SelectFrom selectFrom(@NonNull String table) { return selectFrom(CqlIdentifier.fromCql(table)); }
class class_name[name] begin[{] method[selectFrom, return_type[type[SelectFrom]], modifier[public static], parameter[table]] begin[{] return[call[.selectFrom, parameter[call[CqlIdentifier.fromCql, parameter[member[.table]]]]]] end[}] END[}]
annotation[@] identifier[NonNull] Keyword[public] Keyword[static] identifier[SelectFrom] identifier[selectFrom] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[table] operator[SEP] { Keyword[return] identifier[selectFrom] operator[SEP] identifier[CqlIdentifier] operator[SEP] identifier[fromCql] operator[SEP] identifier[table] operator[SEP] operator[SEP] operator[SEP] }
@Override public void write(long offset, ByteBuffer sourceBuffer) throws IOException { offset += contentStart; sourceBuffer.position(0); long newFilePosition = offset + sourceBuffer.limit(); if (newFilePosition > contentEnd) { logger.debug("Filesize exceeded (contendEnd: {},size: {})", contentEnd, size); if (AUTO_ENLARGE) { // if the incrementSize is not large enough // if (offset + sourceBuffer.limit() > contentEnd + incrementSize) { // incrementSize = (int) (offset + sourceBuffer.limit() - contentEnd + incrementSize); // } this.enlargeFile(newFilePosition - contentEnd); } else { throw new IOException("Filesize exceeded (" + size + ") and automatic enlargement is disabled. You have to enlarge file manually."); } } if (offset + sourceBuffer.limit() > filledUpTo) { filledUpTo = offset + sourceBuffer.limit(); } channel.write(sourceBuffer, offset); writeHeader(); }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[offset, sourceBuffer]] begin[{] assign[member[.offset], member[.contentStart]] call[sourceBuffer.position, parameter[literal[0]]] local_variable[type[long], newFilePosition] if[binary_operation[member[.newFilePosition], >, member[.contentEnd]]] begin[{] call[logger.debug, parameter[literal["Filesize exceeded (contendEnd: {},size: {})"], member[.contentEnd], member[.size]]] if[member[.AUTO_ENLARGE]] begin[{] THIS[call[None.enlargeFile, parameter[binary_operation[member[.newFilePosition], -, member[.contentEnd]]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Filesize exceeded ("), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") and automatic enlargement is disabled. You have to enlarge file manually."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) end[}] else begin[{] None end[}] if[binary_operation[binary_operation[member[.offset], +, call[sourceBuffer.limit, parameter[]]], >, member[.filledUpTo]]] begin[{] assign[member[.filledUpTo], binary_operation[member[.offset], +, call[sourceBuffer.limit, parameter[]]]] else begin[{] None end[}] call[channel.write, parameter[member[.sourceBuffer], member[.offset]]] call[.writeHeader, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[write] operator[SEP] Keyword[long] identifier[offset] , identifier[ByteBuffer] identifier[sourceBuffer] operator[SEP] Keyword[throws] identifier[IOException] { identifier[offset] operator[+=] identifier[contentStart] operator[SEP] identifier[sourceBuffer] operator[SEP] identifier[position] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[long] identifier[newFilePosition] operator[=] identifier[offset] operator[+] identifier[sourceBuffer] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[newFilePosition] operator[>] identifier[contentEnd] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[contentEnd] , identifier[size] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[AUTO_ENLARGE] operator[SEP] { Keyword[this] operator[SEP] identifier[enlargeFile] operator[SEP] identifier[newFilePosition] operator[-] identifier[contentEnd] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[size] operator[+] literal[String] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[offset] operator[+] identifier[sourceBuffer] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[>] identifier[filledUpTo] operator[SEP] { identifier[filledUpTo] operator[=] identifier[offset] operator[+] identifier[sourceBuffer] operator[SEP] identifier[limit] operator[SEP] operator[SEP] operator[SEP] } identifier[channel] operator[SEP] identifier[write] operator[SEP] identifier[sourceBuffer] , identifier[offset] operator[SEP] operator[SEP] identifier[writeHeader] operator[SEP] operator[SEP] operator[SEP] }
private void closeZooKeeper(@Nullable ZooKeeper zk) { try { if (zk != null) { zk.close(); } } catch (InterruptedException e) { LOG.warn("Interrupted when closing ZooKeeper", e); Thread.currentThread().interrupt(); } }
class class_name[name] begin[{] method[closeZooKeeper, return_type[void], modifier[private], parameter[zk]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=zk, 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=close, postfix_operators=[], prefix_operators=[], qualifier=zk, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Interrupted when closing ZooKeeper"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=interrupt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InterruptedException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[closeZooKeeper] operator[SEP] annotation[@] identifier[Nullable] identifier[ZooKeeper] identifier[zk] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[zk] operator[!=] Other[null] operator[SEP] { identifier[zk] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[interrupt] operator[SEP] operator[SEP] operator[SEP] } }
private final int load_digits(StringBuilder sb, int c) throws IOException { if (!IonTokenConstsX.isDigit(c)) { return c; } sb.append((char) c); return readNumeric(sb, Radix.DECIMAL, NumericState.DIGIT); }
class class_name[name] begin[{] method[load_digits, return_type[type[int]], modifier[final private], parameter[sb, c]] begin[{] if[call[IonTokenConstsX.isDigit, parameter[member[.c]]]] begin[{] return[member[.c]] else begin[{] None end[}] call[sb.append, parameter[Cast(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=char))]] return[call[.readNumeric, parameter[member[.sb], member[Radix.DECIMAL], member[NumericState.DIGIT]]]] end[}] END[}]
Keyword[private] Keyword[final] Keyword[int] identifier[load_digits] operator[SEP] identifier[StringBuilder] identifier[sb] , Keyword[int] identifier[c] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[IonTokenConstsX] operator[SEP] identifier[isDigit] operator[SEP] identifier[c] operator[SEP] operator[SEP] { Keyword[return] identifier[c] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] operator[SEP] Keyword[char] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[return] identifier[readNumeric] operator[SEP] identifier[sb] , identifier[Radix] operator[SEP] identifier[DECIMAL] , identifier[NumericState] operator[SEP] identifier[DIGIT] operator[SEP] operator[SEP] }
public static Type getBound(WildcardType wildcardType) { Type[] lowerBounds = wildcardType.getLowerBounds(); if (lowerBounds.length != 0) { return lowerBounds[0]; } return wildcardType.getUpperBounds()[0]; }
class class_name[name] begin[{] method[getBound, return_type[type[Type]], modifier[public static], parameter[wildcardType]] begin[{] local_variable[type[Type], lowerBounds] if[binary_operation[member[lowerBounds.length], !=, literal[0]]] begin[{] return[member[.lowerBounds]] else begin[{] None end[}] return[call[wildcardType.getUpperBounds, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Type] identifier[getBound] operator[SEP] identifier[WildcardType] identifier[wildcardType] operator[SEP] { identifier[Type] operator[SEP] operator[SEP] identifier[lowerBounds] operator[=] identifier[wildcardType] operator[SEP] identifier[getLowerBounds] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lowerBounds] operator[SEP] identifier[length] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[lowerBounds] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[return] identifier[wildcardType] operator[SEP] identifier[getUpperBounds] operator[SEP] operator[SEP] operator[SEP] Other[0] operator[SEP] operator[SEP] }
public int delete(CMARole role) { final String id = getResourceIdOrThrow(role, "role"); final String spaceId = getSpaceIdOrThrow(role, "role"); final CMASystem sys = role.getSystem(); role.setSystem(null); try { final Response<Void> response = service.delete(spaceId, id).blockingFirst(); return response.code(); } finally { role.setSystem(sys); } }
class class_name[name] begin[{] method[delete, return_type[type[int]], modifier[public], parameter[role]] begin[{] local_variable[type[String], id] local_variable[type[String], spaceId] local_variable[type[CMASystem], sys] call[role.setSystem, parameter[literal[null]]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=spaceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=delete, postfix_operators=[], prefix_operators=[], qualifier=service, selectors=[MethodInvocation(arguments=[], member=blockingFirst, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=response)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Void, sub_type=None))], dimensions=[], name=Response, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[], member=code, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=sys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSystem, postfix_operators=[], prefix_operators=[], qualifier=role, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[int] identifier[delete] operator[SEP] identifier[CMARole] identifier[role] operator[SEP] { Keyword[final] identifier[String] identifier[id] operator[=] identifier[getResourceIdOrThrow] operator[SEP] identifier[role] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[spaceId] operator[=] identifier[getSpaceIdOrThrow] operator[SEP] identifier[role] , literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[CMASystem] identifier[sys] operator[=] identifier[role] operator[SEP] identifier[getSystem] operator[SEP] operator[SEP] operator[SEP] identifier[role] operator[SEP] identifier[setSystem] operator[SEP] Other[null] operator[SEP] operator[SEP] Keyword[try] { Keyword[final] identifier[Response] operator[<] identifier[Void] operator[>] identifier[response] operator[=] identifier[service] operator[SEP] identifier[delete] operator[SEP] identifier[spaceId] , identifier[id] operator[SEP] operator[SEP] identifier[blockingFirst] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] identifier[code] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[role] operator[SEP] identifier[setSystem] operator[SEP] identifier[sys] operator[SEP] operator[SEP] } }
@CheckResult @NonNull public final PowerAdapter offset(int offset) { if (offset <= 0) { return this; } if (offset == Integer.MAX_VALUE) { return EMPTY; } return new OffsetAdapter(this, offset); }
class class_name[name] begin[{] method[offset, return_type[type[PowerAdapter]], modifier[final public], parameter[offset]] begin[{] if[binary_operation[member[.offset], <=, literal[0]]] begin[{] return[THIS[]] else begin[{] None end[}] if[binary_operation[member[.offset], ==, member[Integer.MAX_VALUE]]] begin[{] return[member[.EMPTY]] else begin[{] None end[}] return[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=offset, 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=OffsetAdapter, sub_type=None))] end[}] END[}]
annotation[@] identifier[CheckResult] annotation[@] identifier[NonNull] Keyword[public] Keyword[final] identifier[PowerAdapter] identifier[offset] operator[SEP] Keyword[int] identifier[offset] operator[SEP] { Keyword[if] operator[SEP] identifier[offset] operator[<=] Other[0] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } Keyword[if] operator[SEP] identifier[offset] operator[==] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] { Keyword[return] identifier[EMPTY] operator[SEP] } Keyword[return] Keyword[new] identifier[OffsetAdapter] operator[SEP] Keyword[this] , identifier[offset] operator[SEP] operator[SEP] }
private TaskAttemptCompletionEvent createTaskAttemptCompletionEvent( SimulatorTaskInProgress tip, long now) { // We need to clone() status as we modify and it goes into an Event TaskStatus status = (TaskStatus)tip.getTaskStatus().clone(); long delta = tip.getUserSpaceRunTime(); assert delta >= 0 : "TaskAttempt " + tip.getTaskStatus().getTaskID() + " has negative UserSpaceRunTime = " + delta; long finishTime = now + delta; status.setFinishTime(finishTime); status.setProgress(1.0f); status.setRunState(tip.getFinalRunState()); TaskAttemptCompletionEvent event = new TaskAttemptCompletionEvent(this, status); if (LOG.isDebugEnabled()) { LOG.debug("Created task attempt completion event " + event); } return event; }
class class_name[name] begin[{] method[createTaskAttemptCompletionEvent, return_type[type[TaskAttemptCompletionEvent]], modifier[private], parameter[tip, now]] begin[{] local_variable[type[TaskStatus], status] local_variable[type[long], delta] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=delta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), label=None, value=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="TaskAttempt "), operandr=MethodInvocation(arguments=[], member=getTaskStatus, postfix_operators=[], prefix_operators=[], qualifier=tip, selectors=[MethodInvocation(arguments=[], member=getTaskID, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" has negative UserSpaceRunTime = "), operator=+), operandr=MemberReference(member=delta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)) local_variable[type[long], finishTime] call[status.setFinishTime, parameter[member[.finishTime]]] call[status.setProgress, parameter[literal[1.0f]]] call[status.setRunState, parameter[call[tip.getFinalRunState, parameter[]]]] local_variable[type[TaskAttemptCompletionEvent], event] if[call[LOG.isDebugEnabled, parameter[]]] begin[{] call[LOG.debug, parameter[binary_operation[literal["Created task attempt completion event "], +, member[.event]]]] else begin[{] None end[}] return[member[.event]] end[}] END[}]
Keyword[private] identifier[TaskAttemptCompletionEvent] identifier[createTaskAttemptCompletionEvent] operator[SEP] identifier[SimulatorTaskInProgress] identifier[tip] , Keyword[long] identifier[now] operator[SEP] { identifier[TaskStatus] identifier[status] operator[=] operator[SEP] identifier[TaskStatus] operator[SEP] identifier[tip] operator[SEP] identifier[getTaskStatus] operator[SEP] operator[SEP] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[delta] operator[=] identifier[tip] operator[SEP] identifier[getUserSpaceRunTime] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] identifier[delta] operator[>=] Other[0] operator[:] literal[String] operator[+] identifier[tip] operator[SEP] identifier[getTaskStatus] operator[SEP] operator[SEP] operator[SEP] identifier[getTaskID] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[delta] operator[SEP] Keyword[long] identifier[finishTime] operator[=] identifier[now] operator[+] identifier[delta] operator[SEP] identifier[status] operator[SEP] identifier[setFinishTime] operator[SEP] identifier[finishTime] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setProgress] operator[SEP] literal[Float] operator[SEP] operator[SEP] identifier[status] operator[SEP] identifier[setRunState] operator[SEP] identifier[tip] operator[SEP] identifier[getFinalRunState] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[TaskAttemptCompletionEvent] identifier[event] operator[=] Keyword[new] identifier[TaskAttemptCompletionEvent] operator[SEP] Keyword[this] , identifier[status] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[LOG] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[event] operator[SEP] operator[SEP] } Keyword[return] identifier[event] operator[SEP] }
public void marshall(ListedServer listedServer, ProtocolMarshaller protocolMarshaller) { if (listedServer == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(listedServer.getArn(), ARN_BINDING); protocolMarshaller.marshall(listedServer.getIdentityProviderType(), IDENTITYPROVIDERTYPE_BINDING); protocolMarshaller.marshall(listedServer.getEndpointType(), ENDPOINTTYPE_BINDING); protocolMarshaller.marshall(listedServer.getLoggingRole(), LOGGINGROLE_BINDING); protocolMarshaller.marshall(listedServer.getServerId(), SERVERID_BINDING); protocolMarshaller.marshall(listedServer.getState(), STATE_BINDING); protocolMarshaller.marshall(listedServer.getUserCount(), USERCOUNT_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[listedServer, protocolMarshaller]] begin[{] if[binary_operation[member[.listedServer], ==, 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=getArn, postfix_operators=[], prefix_operators=[], qualifier=listedServer, selectors=[], type_arguments=None), MemberReference(member=ARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getIdentityProviderType, postfix_operators=[], prefix_operators=[], qualifier=listedServer, selectors=[], type_arguments=None), MemberReference(member=IDENTITYPROVIDERTYPE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEndpointType, postfix_operators=[], prefix_operators=[], qualifier=listedServer, selectors=[], type_arguments=None), MemberReference(member=ENDPOINTTYPE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLoggingRole, postfix_operators=[], prefix_operators=[], qualifier=listedServer, selectors=[], type_arguments=None), MemberReference(member=LOGGINGROLE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getServerId, postfix_operators=[], prefix_operators=[], qualifier=listedServer, selectors=[], type_arguments=None), MemberReference(member=SERVERID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getState, postfix_operators=[], prefix_operators=[], qualifier=listedServer, selectors=[], type_arguments=None), MemberReference(member=STATE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getUserCount, postfix_operators=[], prefix_operators=[], qualifier=listedServer, selectors=[], type_arguments=None), MemberReference(member=USERCOUNT_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[ListedServer] identifier[listedServer] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[listedServer] 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[listedServer] operator[SEP] identifier[getArn] operator[SEP] operator[SEP] , identifier[ARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listedServer] operator[SEP] identifier[getIdentityProviderType] operator[SEP] operator[SEP] , identifier[IDENTITYPROVIDERTYPE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listedServer] operator[SEP] identifier[getEndpointType] operator[SEP] operator[SEP] , identifier[ENDPOINTTYPE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listedServer] operator[SEP] identifier[getLoggingRole] operator[SEP] operator[SEP] , identifier[LOGGINGROLE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listedServer] operator[SEP] identifier[getServerId] operator[SEP] operator[SEP] , identifier[SERVERID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listedServer] operator[SEP] identifier[getState] operator[SEP] operator[SEP] , identifier[STATE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listedServer] operator[SEP] identifier[getUserCount] operator[SEP] operator[SEP] , identifier[USERCOUNT_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public boolean readNext(BinaryWritable<M> writable) throws IOException { byte[] blob = readNextProtoBytes(); if (blob != null) { writable.set(protoConverter_.fromBytes(blob)); return true; } return false; }
class class_name[name] begin[{] method[readNext, return_type[type[boolean]], modifier[public], parameter[writable]] begin[{] local_variable[type[byte], blob] if[binary_operation[member[.blob], !=, literal[null]]] begin[{] call[writable.set, parameter[call[protoConverter_.fromBytes, parameter[member[.blob]]]]] return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[readNext] operator[SEP] identifier[BinaryWritable] operator[<] identifier[M] operator[>] identifier[writable] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[blob] operator[=] identifier[readNextProtoBytes] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[blob] operator[!=] Other[null] operator[SEP] { identifier[writable] operator[SEP] identifier[set] operator[SEP] identifier[protoConverter_] operator[SEP] identifier[fromBytes] operator[SEP] identifier[blob] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static <T extends IPositioned & ISized> IntSupplier below(T other, int spacing) { checkNotNull(other); return () -> { return other.position().y() + other.size().height() + spacing; }; }
class class_name[name] begin[{] method[below, return_type[type[IntSupplier]], modifier[public static], parameter[other, spacing]] begin[{] call[.checkNotNull, parameter[member[.other]]] return[LambdaExpression(body=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=position, postfix_operators=[], prefix_operators=[], qualifier=other, selectors=[MethodInvocation(arguments=[], member=y, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=other, selectors=[MethodInvocation(arguments=[], member=height, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=MemberReference(member=spacing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), label=None)], parameters=[])] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[IPositioned] operator[&] identifier[ISized] operator[>] identifier[IntSupplier] identifier[below] operator[SEP] identifier[T] identifier[other] , Keyword[int] identifier[spacing] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[other] operator[SEP] operator[SEP] Keyword[return] operator[SEP] operator[SEP] operator[->] { Keyword[return] identifier[other] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[+] identifier[other] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[height] operator[SEP] operator[SEP] operator[+] identifier[spacing] operator[SEP] } operator[SEP] }
public void addPlugin(ComponentPlugin plugin) { if (RegistryInitializationEntryPlugin.class.isAssignableFrom(plugin.getClass())) { RegistryInitializationEntryPlugin registryPlugin = (RegistryInitializationEntryPlugin)plugin; appConfigurations = registryPlugin.getAppConfiguration(); entryLocation = registryPlugin.getLocation(); if (entryLocation == null) entryLocation = EXO_APPLICATIONS; } }
class class_name[name] begin[{] method[addPlugin, return_type[void], modifier[public], parameter[plugin]] begin[{] if[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=plugin, selectors=[], type_arguments=None)], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=RegistryInitializationEntryPlugin, sub_type=None))] begin[{] local_variable[type[RegistryInitializationEntryPlugin], registryPlugin] assign[member[.appConfigurations], call[registryPlugin.getAppConfiguration, parameter[]]] assign[member[.entryLocation], call[registryPlugin.getLocation, parameter[]]] if[binary_operation[member[.entryLocation], ==, literal[null]]] begin[{] assign[member[.entryLocation], member[.EXO_APPLICATIONS]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addPlugin] operator[SEP] identifier[ComponentPlugin] identifier[plugin] operator[SEP] { Keyword[if] operator[SEP] identifier[RegistryInitializationEntryPlugin] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[plugin] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[RegistryInitializationEntryPlugin] identifier[registryPlugin] operator[=] operator[SEP] identifier[RegistryInitializationEntryPlugin] operator[SEP] identifier[plugin] operator[SEP] identifier[appConfigurations] operator[=] identifier[registryPlugin] operator[SEP] identifier[getAppConfiguration] operator[SEP] operator[SEP] operator[SEP] identifier[entryLocation] operator[=] identifier[registryPlugin] operator[SEP] identifier[getLocation] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entryLocation] operator[==] Other[null] operator[SEP] identifier[entryLocation] operator[=] identifier[EXO_APPLICATIONS] operator[SEP] } }
protected void parseXaPool(XMLExtendedStreamReader reader, ModelNode node) throws XMLStreamException, ParserException, ValidateException { while (reader.hasNext()) { switch (reader.nextTag()) { case END_ELEMENT: { if (XaDataSource.Tag.forName(reader.getLocalName()) == XaDataSource.Tag.XA_POOL) { return; } else { if (XaPool.Tag.forName(reader.getLocalName()) == XaPool.Tag.UNKNOWN) { throw ParseUtils.unexpectedEndElement(reader); } } break; } case START_ELEMENT: { switch (XaPool.Tag.forName(reader.getLocalName())) { case MAX_POOL_SIZE: { String value = rawElementText(reader); MAX_POOL_SIZE.parseAndSetParameter(value, node, reader); break; } case MIN_POOL_SIZE: { String value = rawElementText(reader); MIN_POOL_SIZE.parseAndSetParameter(value, node, reader); break; } case INITIAL_POOL_SIZE: { String value = rawElementText(reader); INITIAL_POOL_SIZE.parseAndSetParameter(value, node, reader); break; } case PREFILL: { String value = rawElementText(reader); POOL_PREFILL.parseAndSetParameter(value, node, reader); break; } case FAIR: { String value = rawElementText(reader); POOL_FAIR.parseAndSetParameter(value, node, reader); break; } case USE_STRICT_MIN: { String value = rawElementText(reader); POOL_USE_STRICT_MIN.parseAndSetParameter(value, node, reader); break; } case FLUSH_STRATEGY: { String value = rawElementText(reader); POOL_FLUSH_STRATEGY.parseAndSetParameter(value, node, reader); break; } case INTERLEAVING: { String value = rawElementText(reader); //just presence means true value = value == null ? "true" : value; INTERLEAVING.parseAndSetParameter(value, node, reader); break; } case IS_SAME_RM_OVERRIDE: { String value = rawElementText(reader); SAME_RM_OVERRIDE.parseAndSetParameter(value, node, reader); break; } case NO_TX_SEPARATE_POOLS: { String value = rawElementText(reader); //just presence means true value = value == null ? "true" : value; NOTXSEPARATEPOOL.parseAndSetParameter(value, node, reader); break; } case PAD_XID: { String value = rawElementText(reader); PAD_XID.parseAndSetParameter(value, node, reader); break; } case WRAP_XA_RESOURCE: { String value = rawElementText(reader); WRAP_XA_RESOURCE.parseAndSetParameter(value, node, reader); break; } case CAPACITY: { parseCapacity(reader, node); break; } default: throw ParseUtils.unexpectedElement(reader); } break; } } } throw ParseUtils.unexpectedEndElement(reader); }
class class_name[name] begin[{] method[parseXaPool, return_type[void], modifier[protected], parameter[reader, node]] begin[{] while[call[reader.hasNext, parameter[]]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=['END_ELEMENT'], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalName, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None)], member=forName, postfix_operators=[], prefix_operators=[], qualifier=XaDataSource.Tag, selectors=[], type_arguments=None), operandr=MemberReference(member=XA_POOL, postfix_operators=[], prefix_operators=[], qualifier=XaDataSource.Tag, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalName, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None)], member=forName, postfix_operators=[], prefix_operators=[], qualifier=XaPool.Tag, selectors=[], type_arguments=None), operandr=MemberReference(member=UNKNOWN, postfix_operators=[], prefix_operators=[], qualifier=XaPool.Tag, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unexpectedEndElement, postfix_operators=[], prefix_operators=[], qualifier=ParseUtils, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=None, label=None)])), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['START_ELEMENT'], statements=[BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=['MAX_POOL_SIZE'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=MAX_POOL_SIZE, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['MIN_POOL_SIZE'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=MIN_POOL_SIZE, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['INITIAL_POOL_SIZE'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=INITIAL_POOL_SIZE, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['PREFILL'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=POOL_PREFILL, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['FAIR'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=POOL_FAIR, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['USE_STRICT_MIN'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=POOL_USE_STRICT_MIN, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['FLUSH_STRATEGY'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=POOL_FLUSH_STRATEGY, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['INTERLEAVING'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="true"))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=INTERLEAVING, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['IS_SAME_RM_OVERRIDE'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=SAME_RM_OVERRIDE, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['NO_TX_SEPARATE_POOLS'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="true"))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=NOTXSEPARATEPOOL, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['PAD_XID'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=PAD_XID, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['WRAP_XA_RESOURCE'], statements=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=rawElementText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseAndSetParameter, postfix_operators=[], prefix_operators=[], qualifier=WRAP_XA_RESOURCE, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=['CAPACITY'], statements=[BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseCapacity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unexpectedElement, postfix_operators=[], prefix_operators=[], qualifier=ParseUtils, selectors=[], type_arguments=None), label=None)])], expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLocalName, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None)], member=forName, postfix_operators=[], prefix_operators=[], qualifier=XaPool.Tag, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])])], expression=MethodInvocation(arguments=[], member=nextTag, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None) end[}] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=unexpectedEndElement, postfix_operators=[], prefix_operators=[], qualifier=ParseUtils, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[parseXaPool] operator[SEP] identifier[XMLExtendedStreamReader] identifier[reader] , identifier[ModelNode] identifier[node] operator[SEP] Keyword[throws] identifier[XMLStreamException] , identifier[ParserException] , identifier[ValidateException] { Keyword[while] operator[SEP] identifier[reader] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[switch] operator[SEP] identifier[reader] operator[SEP] identifier[nextTag] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[END_ELEMENT] operator[:] { Keyword[if] operator[SEP] identifier[XaDataSource] operator[SEP] identifier[Tag] operator[SEP] identifier[forName] operator[SEP] identifier[reader] operator[SEP] identifier[getLocalName] operator[SEP] operator[SEP] operator[SEP] operator[==] identifier[XaDataSource] operator[SEP] identifier[Tag] operator[SEP] identifier[XA_POOL] operator[SEP] { Keyword[return] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[XaPool] operator[SEP] identifier[Tag] operator[SEP] identifier[forName] operator[SEP] identifier[reader] operator[SEP] identifier[getLocalName] operator[SEP] operator[SEP] operator[SEP] operator[==] identifier[XaPool] operator[SEP] identifier[Tag] operator[SEP] identifier[UNKNOWN] operator[SEP] { Keyword[throw] identifier[ParseUtils] operator[SEP] identifier[unexpectedEndElement] operator[SEP] identifier[reader] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] } Keyword[case] identifier[START_ELEMENT] operator[:] { Keyword[switch] operator[SEP] identifier[XaPool] operator[SEP] identifier[Tag] operator[SEP] identifier[forName] operator[SEP] identifier[reader] operator[SEP] identifier[getLocalName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[MAX_POOL_SIZE] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[MAX_POOL_SIZE] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[MIN_POOL_SIZE] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[MIN_POOL_SIZE] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[INITIAL_POOL_SIZE] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[INITIAL_POOL_SIZE] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[PREFILL] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[POOL_PREFILL] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[FAIR] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[POOL_FAIR] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[USE_STRICT_MIN] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[POOL_USE_STRICT_MIN] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[FLUSH_STRATEGY] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[POOL_FLUSH_STRATEGY] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[INTERLEAVING] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[value] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[value] operator[SEP] identifier[INTERLEAVING] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[IS_SAME_RM_OVERRIDE] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[SAME_RM_OVERRIDE] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[NO_TX_SEPARATE_POOLS] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[value] operator[==] Other[null] operator[?] literal[String] operator[:] identifier[value] operator[SEP] identifier[NOTXSEPARATEPOOL] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[PAD_XID] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[PAD_XID] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[WRAP_XA_RESOURCE] operator[:] { identifier[String] identifier[value] operator[=] identifier[rawElementText] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[WRAP_XA_RESOURCE] operator[SEP] identifier[parseAndSetParameter] operator[SEP] identifier[value] , identifier[node] , identifier[reader] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[case] identifier[CAPACITY] operator[:] { identifier[parseCapacity] operator[SEP] identifier[reader] , identifier[node] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[default] operator[:] Keyword[throw] identifier[ParseUtils] operator[SEP] identifier[unexpectedElement] operator[SEP] identifier[reader] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } } } Keyword[throw] identifier[ParseUtils] operator[SEP] identifier[unexpectedEndElement] operator[SEP] identifier[reader] operator[SEP] operator[SEP] }
private void assignHuffmanCodeSymbols() { final int[][] huffmanMergedCodeSymbols = this.huffmanMergedCodeSymbols; final int[][] huffmanCodeLengths = this.huffmanCodeLengths; final int mtfAlphabetSize = this.mtfAlphabetSize; final int totalTables = huffmanCodeLengths.length; for (int i = 0; i < totalTables; i++) { final int[] tableLengths = huffmanCodeLengths[i]; int minimumLength = 32; int maximumLength = 0; for (int j = 0; j < mtfAlphabetSize; j++) { final int length = tableLengths[j]; if (length > maximumLength) { maximumLength = length; } if (length < minimumLength) { minimumLength = length; } } int code = 0; for (int j = minimumLength; j <= maximumLength; j++) { for (int k = 0; k < mtfAlphabetSize; k++) { if ((huffmanCodeLengths[i][k] & 0xff) == j) { huffmanMergedCodeSymbols[i][k] = (j << 24) | code; code++; } } code <<= 1; } } }
class class_name[name] begin[{] method[assignHuffmanCodeSymbols, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[int], huffmanMergedCodeSymbols] local_variable[type[int], huffmanCodeLengths] local_variable[type[int], mtfAlphabetSize] local_variable[type[int], totalTables] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=huffmanCodeLengths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=tableLengths)], modifiers={'final'}, type=BasicType(dimensions=[None], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=32), name=minimumLength)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=maximumLength)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=tableLengths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=length)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=maximumLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=maximumLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=minimumLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=minimumLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=mtfAlphabetSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=code)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=huffmanCodeLengths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xff), operator=&), operandr=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=huffmanMergedCodeSymbols, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=<<), operandr=MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=|)), label=None), StatementExpression(expression=MemberReference(member=code, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=mtfAlphabetSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=code, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=<<=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=maximumLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=minimumLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=totalTables, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[assignHuffmanCodeSymbols] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[huffmanMergedCodeSymbols] operator[=] Keyword[this] operator[SEP] identifier[huffmanMergedCodeSymbols] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[huffmanCodeLengths] operator[=] Keyword[this] operator[SEP] identifier[huffmanCodeLengths] operator[SEP] Keyword[final] Keyword[int] identifier[mtfAlphabetSize] operator[=] Keyword[this] operator[SEP] identifier[mtfAlphabetSize] operator[SEP] Keyword[final] Keyword[int] identifier[totalTables] operator[=] identifier[huffmanCodeLengths] operator[SEP] identifier[length] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[totalTables] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[tableLengths] operator[=] identifier[huffmanCodeLengths] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[minimumLength] operator[=] Other[32] operator[SEP] Keyword[int] identifier[maximumLength] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[mtfAlphabetSize] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[final] Keyword[int] identifier[length] operator[=] identifier[tableLengths] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[>] identifier[maximumLength] operator[SEP] { identifier[maximumLength] operator[=] identifier[length] operator[SEP] } Keyword[if] operator[SEP] identifier[length] operator[<] identifier[minimumLength] operator[SEP] { identifier[minimumLength] operator[=] identifier[length] operator[SEP] } } Keyword[int] identifier[code] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[minimumLength] operator[SEP] identifier[j] operator[<=] identifier[maximumLength] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[mtfAlphabetSize] operator[SEP] identifier[k] operator[++] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[huffmanCodeLengths] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[k] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[==] identifier[j] operator[SEP] { identifier[huffmanMergedCodeSymbols] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[k] operator[SEP] operator[=] operator[SEP] identifier[j] operator[<<] Other[24] operator[SEP] operator[|] identifier[code] operator[SEP] identifier[code] operator[++] operator[SEP] } } identifier[code] operator[<<=] Other[1] operator[SEP] } } }
public static void downloadObjectToFile(S3Object s3Object, final File destinationFile, boolean performIntegrityCheck, boolean appendData) { downloadToFile(s3Object, destinationFile, performIntegrityCheck, appendData, -1); }
class class_name[name] begin[{] method[downloadObjectToFile, return_type[void], modifier[public static], parameter[s3Object, destinationFile, performIntegrityCheck, appendData]] begin[{] call[.downloadToFile, parameter[member[.s3Object], member[.destinationFile], member[.performIntegrityCheck], member[.appendData], literal[1]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[downloadObjectToFile] operator[SEP] identifier[S3Object] identifier[s3Object] , Keyword[final] identifier[File] identifier[destinationFile] , Keyword[boolean] identifier[performIntegrityCheck] , Keyword[boolean] identifier[appendData] operator[SEP] { identifier[downloadToFile] operator[SEP] identifier[s3Object] , identifier[destinationFile] , identifier[performIntegrityCheck] , identifier[appendData] , operator[-] Other[1] operator[SEP] operator[SEP] }
@InterfaceAudience.Private public static boolean isValidDocumentId(String id) { // http://wiki.apache.org/couchdb/HTTP_Document_API#Documents if (id == null || id.length() == 0) return false; if (id.charAt(0) == '_') return (id.startsWith("_design/")); return true; // "_local/*" is not a valid document ID. // Local docs have their own API and shouldn't get here. }
class class_name[name] begin[{] method[isValidDocumentId, return_type[type[boolean]], modifier[public static], parameter[id]] begin[{] if[binary_operation[binary_operation[member[.id], ==, literal[null]], ||, binary_operation[call[id.length, parameter[]], ==, literal[0]]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[call[id.charAt, parameter[literal[0]]], ==, literal['_']]] begin[{] return[call[id.startsWith, parameter[literal["_design/"]]]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
annotation[@] identifier[InterfaceAudience] operator[SEP] identifier[Private] Keyword[public] Keyword[static] Keyword[boolean] identifier[isValidDocumentId] operator[SEP] identifier[String] identifier[id] operator[SEP] { Keyword[if] operator[SEP] identifier[id] operator[==] Other[null] operator[||] identifier[id] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] Keyword[return] operator[SEP] identifier[id] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
protected InstallRequest buildInstallRequest(MemberState member) { Snapshot snapshot = context.getSnapshotStore().currentSnapshot(); if (member.getNextSnapshotIndex() != snapshot.index()) { member.setNextSnapshotIndex(snapshot.index()).setNextSnapshotOffset(0); } InstallRequest request; synchronized (snapshot) { // Open a new snapshot reader. try (SnapshotReader reader = snapshot.reader()) { // Skip to the next batch of bytes according to the snapshot chunk size and current offset. reader.skip(member.getNextSnapshotOffset() * MAX_BATCH_SIZE); byte[] data = new byte[Math.min(MAX_BATCH_SIZE, (int) reader.remaining())]; reader.read(data); // Create the install request, indicating whether this is the last chunk of data based on the number // of bytes remaining in the buffer. ServerMember leader = context.getLeader(); request = InstallRequest.builder() .withTerm(context.getTerm()) .withLeader(leader != null ? leader.id() : 0) .withIndex(member.getNextSnapshotIndex()) .withOffset(member.getNextSnapshotOffset()) .withData(data) .withComplete(!reader.hasRemaining()) .build(); } } return request; }
class class_name[name] begin[{] method[buildInstallRequest, return_type[type[InstallRequest]], modifier[protected], parameter[member]] begin[{] local_variable[type[Snapshot], snapshot] if[binary_operation[call[member.getNextSnapshotIndex, parameter[]], !=, call[snapshot.index, parameter[]]]] begin[{] call[member.setNextSnapshotIndex, parameter[call[snapshot.index, parameter[]]]] else begin[{] None end[}] local_variable[type[InstallRequest], request] SYNCHRONIZED[member[.snapshot]] BEGIN[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNextSnapshotOffset, postfix_operators=[], prefix_operators=[], qualifier=member, selectors=[], type_arguments=None), operandr=MemberReference(member=MAX_BATCH_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)], member=skip, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[MethodInvocation(arguments=[MemberReference(member=MAX_BATCH_SIZE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MethodInvocation(arguments=[], member=remaining, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=data)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=read, postfix_operators=[], prefix_operators=[], qualifier=reader, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getLeader, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None), name=leader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ServerMember, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=builder, postfix_operators=[], prefix_operators=[], qualifier=InstallRequest, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTerm, postfix_operators=[], prefix_operators=[], qualifier=context, selectors=[], type_arguments=None)], member=withTerm, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=leader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=MethodInvocation(arguments=[], member=id, postfix_operators=[], prefix_operators=[], qualifier=leader, selectors=[], type_arguments=None))], member=withLeader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextSnapshotIndex, postfix_operators=[], prefix_operators=[], qualifier=member, selectors=[], type_arguments=None)], member=withIndex, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextSnapshotOffset, postfix_operators=[], prefix_operators=[], qualifier=member, selectors=[], type_arguments=None)], member=withOffset, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=withData, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=hasRemaining, postfix_operators=[], prefix_operators=['!'], qualifier=reader, selectors=[], type_arguments=None)], member=withComplete, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=reader, type=ReferenceType(arguments=None, dimensions=[], name=SnapshotReader, sub_type=None), value=MethodInvocation(arguments=[], member=reader, postfix_operators=[], prefix_operators=[], qualifier=snapshot, selectors=[], type_arguments=None))]) END[}] return[member[.request]] end[}] END[}]
Keyword[protected] identifier[InstallRequest] identifier[buildInstallRequest] operator[SEP] identifier[MemberState] identifier[member] operator[SEP] { identifier[Snapshot] identifier[snapshot] operator[=] identifier[context] operator[SEP] identifier[getSnapshotStore] operator[SEP] operator[SEP] operator[SEP] identifier[currentSnapshot] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[member] operator[SEP] identifier[getNextSnapshotIndex] operator[SEP] operator[SEP] operator[!=] identifier[snapshot] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] { identifier[member] operator[SEP] identifier[setNextSnapshotIndex] operator[SEP] identifier[snapshot] operator[SEP] identifier[index] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setNextSnapshotOffset] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[InstallRequest] identifier[request] operator[SEP] Keyword[synchronized] operator[SEP] identifier[snapshot] operator[SEP] { Keyword[try] operator[SEP] identifier[SnapshotReader] identifier[reader] operator[=] identifier[snapshot] operator[SEP] identifier[reader] operator[SEP] operator[SEP] operator[SEP] { identifier[reader] operator[SEP] identifier[skip] operator[SEP] identifier[member] operator[SEP] identifier[getNextSnapshotOffset] operator[SEP] operator[SEP] operator[*] identifier[MAX_BATCH_SIZE] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[MAX_BATCH_SIZE] , operator[SEP] Keyword[int] operator[SEP] identifier[reader] operator[SEP] identifier[remaining] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[reader] operator[SEP] identifier[read] operator[SEP] identifier[data] operator[SEP] operator[SEP] identifier[ServerMember] identifier[leader] operator[=] identifier[context] operator[SEP] identifier[getLeader] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[=] identifier[InstallRequest] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[withTerm] operator[SEP] identifier[context] operator[SEP] identifier[getTerm] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withLeader] operator[SEP] identifier[leader] operator[!=] Other[null] operator[?] identifier[leader] operator[SEP] identifier[id] operator[SEP] operator[SEP] operator[:] Other[0] operator[SEP] operator[SEP] identifier[withIndex] operator[SEP] identifier[member] operator[SEP] identifier[getNextSnapshotIndex] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withOffset] operator[SEP] identifier[member] operator[SEP] identifier[getNextSnapshotOffset] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withData] operator[SEP] identifier[data] operator[SEP] operator[SEP] identifier[withComplete] operator[SEP] operator[!] identifier[reader] operator[SEP] identifier[hasRemaining] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[request] operator[SEP] }
public void deleteOrganizationalUnit(CmsDbContext dbc, CmsOrganizationalUnit organizationalUnit) throws CmsException { // check organizational unit in context if (dbc.getRequestContext().getOuFqn().equals(organizationalUnit.getName())) { throw new CmsDbConsistencyException( Messages.get().container(Messages.ERR_ORGUNIT_DELETE_IN_CONTEXT_1, organizationalUnit.getName())); } // check organizational unit for user if (dbc.currentUser().getOuFqn().equals(organizationalUnit.getName())) { throw new CmsDbConsistencyException( Messages.get().container(Messages.ERR_ORGUNIT_DELETE_CURRENT_USER_1, organizationalUnit.getName())); } // check sub organizational units if (!getOrganizationalUnits(dbc, organizationalUnit, true).isEmpty()) { throw new CmsDbConsistencyException( Messages.get().container(Messages.ERR_ORGUNIT_DELETE_SUB_ORGUNITS_1, organizationalUnit.getName())); } // check groups List<CmsGroup> groups = getGroups(dbc, organizationalUnit, true, false); Iterator<CmsGroup> itGroups = groups.iterator(); while (itGroups.hasNext()) { CmsGroup group = itGroups.next(); if (!OpenCms.getDefaultUsers().isDefaultGroup(group.getName())) { throw new CmsDbConsistencyException( Messages.get().container(Messages.ERR_ORGUNIT_DELETE_GROUPS_1, organizationalUnit.getName())); } } // check users if (!getUsers(dbc, organizationalUnit, true).isEmpty()) { throw new CmsDbConsistencyException( Messages.get().container(Messages.ERR_ORGUNIT_DELETE_USERS_1, organizationalUnit.getName())); } // delete default groups if needed itGroups = groups.iterator(); while (itGroups.hasNext()) { CmsGroup group = itGroups.next(); deleteGroup(dbc, group, null); } // delete projects Iterator<CmsProject> itProjects = getProjectDriver(dbc).readProjects( dbc, organizationalUnit.getName()).iterator(); while (itProjects.hasNext()) { CmsProject project = itProjects.next(); deleteProject(dbc, project, false); } // delete roles Iterator<CmsGroup> itRoles = getGroups(dbc, organizationalUnit, true, true).iterator(); while (itRoles.hasNext()) { CmsGroup role = itRoles.next(); deleteGroup(dbc, role, null); } // create a publish list for the 'virtual' publish event CmsResource resource = readResource(dbc, organizationalUnit.getId(), CmsResourceFilter.DEFAULT); CmsPublishList pl = new CmsPublishList(resource, false); pl.add(resource, false); // remove the organizational unit itself getUserDriver(dbc).deleteOrganizationalUnit(dbc, organizationalUnit); // write the publish history entry getProjectDriver(dbc).writePublishHistory( dbc, pl.getPublishHistoryId(), new CmsPublishedResource(resource, -1, CmsResourceState.STATE_DELETED)); // flush relevant caches m_monitor.clearPrincipalsCache(); m_monitor.flushCache(CmsMemoryMonitor.CacheType.PROPERTY, CmsMemoryMonitor.CacheType.PROPERTY_LIST); // fire the 'virtual' publish event Map<String, Object> eventData = new HashMap<String, Object>(); eventData.put(I_CmsEventListener.KEY_PUBLISHID, pl.getPublishHistoryId().toString()); eventData.put(I_CmsEventListener.KEY_PROJECTID, dbc.currentProject().getUuid()); eventData.put(I_CmsEventListener.KEY_DBCONTEXT, dbc); CmsEvent afterPublishEvent = new CmsEvent(I_CmsEventListener.EVENT_PUBLISH_PROJECT, eventData); OpenCms.fireCmsEvent(afterPublishEvent); m_lockManager.removeDeletedResource(dbc, resource.getRootPath()); if (!dbc.getProjectId().isNullUUID()) { // OU modified event is not needed return; } // fire OU modified event Map<String, Object> event2Data = new HashMap<String, Object>(); event2Data.put(I_CmsEventListener.KEY_OU_NAME, organizationalUnit.getName()); event2Data.put(I_CmsEventListener.KEY_USER_ACTION, I_CmsEventListener.VALUE_OU_MODIFIED_ACTION_DELETE); OpenCms.fireCmsEvent(new CmsEvent(I_CmsEventListener.EVENT_OU_MODIFIED, event2Data)); }
class class_name[name] begin[{] method[deleteOrganizationalUnit, return_type[void], modifier[public], parameter[dbc, organizationalUnit]] begin[{] if[call[dbc.getRequestContext, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=ERR_ORGUNIT_DELETE_IN_CONTEXT_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=organizationalUnit, selectors=[], type_arguments=None)], member=container, 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=CmsDbConsistencyException, sub_type=None)), label=None) else begin[{] None end[}] if[call[dbc.currentUser, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=ERR_ORGUNIT_DELETE_CURRENT_USER_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=organizationalUnit, selectors=[], type_arguments=None)], member=container, 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=CmsDbConsistencyException, sub_type=None)), label=None) else begin[{] None end[}] if[call[.getOrganizationalUnits, parameter[member[.dbc], member[.organizationalUnit], literal[true]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=ERR_ORGUNIT_DELETE_SUB_ORGUNITS_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=organizationalUnit, selectors=[], type_arguments=None)], member=container, 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=CmsDbConsistencyException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[List], groups] local_variable[type[Iterator], itGroups] while[call[itGroups.hasNext, parameter[]]] begin[{] local_variable[type[CmsGroup], group] if[call[OpenCms.getDefaultUsers, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=ERR_ORGUNIT_DELETE_GROUPS_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=organizationalUnit, selectors=[], type_arguments=None)], member=container, 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=CmsDbConsistencyException, sub_type=None)), label=None) else begin[{] None end[}] end[}] if[call[.getUsers, parameter[member[.dbc], member[.organizationalUnit], literal[true]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[MethodInvocation(arguments=[MemberReference(member=ERR_ORGUNIT_DELETE_USERS_1, postfix_operators=[], prefix_operators=[], qualifier=Messages, selectors=[]), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=organizationalUnit, selectors=[], type_arguments=None)], member=container, 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=CmsDbConsistencyException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.itGroups], call[groups.iterator, parameter[]]] while[call[itGroups.hasNext, parameter[]]] begin[{] local_variable[type[CmsGroup], group] call[.deleteGroup, parameter[member[.dbc], member[.group], literal[null]]] end[}] local_variable[type[Iterator], itProjects] while[call[itProjects.hasNext, parameter[]]] begin[{] local_variable[type[CmsProject], project] call[.deleteProject, parameter[member[.dbc], member[.project], literal[false]]] end[}] local_variable[type[Iterator], itRoles] while[call[itRoles.hasNext, parameter[]]] begin[{] local_variable[type[CmsGroup], role] call[.deleteGroup, parameter[member[.dbc], member[.role], literal[null]]] end[}] local_variable[type[CmsResource], resource] local_variable[type[CmsPublishList], pl] call[pl.add, parameter[member[.resource], literal[false]]] call[.getUserDriver, parameter[member[.dbc]]] call[.getProjectDriver, parameter[member[.dbc]]] call[m_monitor.clearPrincipalsCache, parameter[]] call[m_monitor.flushCache, parameter[member[CmsMemoryMonitor.CacheType.PROPERTY], member[CmsMemoryMonitor.CacheType.PROPERTY_LIST]]] local_variable[type[Map], eventData] call[eventData.put, parameter[member[I_CmsEventListener.KEY_PUBLISHID], call[pl.getPublishHistoryId, parameter[]]]] call[eventData.put, parameter[member[I_CmsEventListener.KEY_PROJECTID], call[dbc.currentProject, parameter[]]]] call[eventData.put, parameter[member[I_CmsEventListener.KEY_DBCONTEXT], member[.dbc]]] local_variable[type[CmsEvent], afterPublishEvent] call[OpenCms.fireCmsEvent, parameter[member[.afterPublishEvent]]] call[m_lockManager.removeDeletedResource, parameter[member[.dbc], call[resource.getRootPath, parameter[]]]] if[call[dbc.getProjectId, parameter[]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Map], event2Data] call[event2Data.put, parameter[member[I_CmsEventListener.KEY_OU_NAME], call[organizationalUnit.getName, parameter[]]]] call[event2Data.put, parameter[member[I_CmsEventListener.KEY_USER_ACTION], member[I_CmsEventListener.VALUE_OU_MODIFIED_ACTION_DELETE]]] call[OpenCms.fireCmsEvent, parameter[ClassCreator(arguments=[MemberReference(member=EVENT_OU_MODIFIED, postfix_operators=[], prefix_operators=[], qualifier=I_CmsEventListener, selectors=[]), MemberReference(member=event2Data, 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=CmsEvent, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[deleteOrganizationalUnit] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsOrganizationalUnit] identifier[organizationalUnit] operator[SEP] Keyword[throws] identifier[CmsException] { Keyword[if] operator[SEP] identifier[dbc] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getOuFqn] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[organizationalUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[CmsDbConsistencyException] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[SEP] identifier[Messages] operator[SEP] identifier[ERR_ORGUNIT_DELETE_IN_CONTEXT_1] , identifier[organizationalUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[dbc] operator[SEP] identifier[currentUser] operator[SEP] operator[SEP] operator[SEP] identifier[getOuFqn] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[organizationalUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[CmsDbConsistencyException] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[SEP] identifier[Messages] operator[SEP] identifier[ERR_ORGUNIT_DELETE_CURRENT_USER_1] , identifier[organizationalUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[getOrganizationalUnits] operator[SEP] identifier[dbc] , identifier[organizationalUnit] , literal[boolean] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[CmsDbConsistencyException] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[SEP] identifier[Messages] operator[SEP] identifier[ERR_ORGUNIT_DELETE_SUB_ORGUNITS_1] , identifier[organizationalUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[CmsGroup] operator[>] identifier[groups] operator[=] identifier[getGroups] operator[SEP] identifier[dbc] , identifier[organizationalUnit] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[Iterator] operator[<] identifier[CmsGroup] operator[>] identifier[itGroups] operator[=] identifier[groups] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[itGroups] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsGroup] identifier[group] operator[=] identifier[itGroups] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[OpenCms] operator[SEP] identifier[getDefaultUsers] operator[SEP] operator[SEP] operator[SEP] identifier[isDefaultGroup] operator[SEP] identifier[group] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[CmsDbConsistencyException] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[SEP] identifier[Messages] operator[SEP] identifier[ERR_ORGUNIT_DELETE_GROUPS_1] , identifier[organizationalUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[getUsers] operator[SEP] identifier[dbc] , identifier[organizationalUnit] , literal[boolean] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[CmsDbConsistencyException] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[container] operator[SEP] identifier[Messages] operator[SEP] identifier[ERR_ORGUNIT_DELETE_USERS_1] , identifier[organizationalUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[itGroups] operator[=] identifier[groups] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[itGroups] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsGroup] identifier[group] operator[=] identifier[itGroups] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[deleteGroup] operator[SEP] identifier[dbc] , identifier[group] , Other[null] operator[SEP] operator[SEP] } identifier[Iterator] operator[<] identifier[CmsProject] operator[>] identifier[itProjects] operator[=] identifier[getProjectDriver] operator[SEP] identifier[dbc] operator[SEP] operator[SEP] identifier[readProjects] operator[SEP] identifier[dbc] , identifier[organizationalUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[itProjects] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsProject] identifier[project] operator[=] identifier[itProjects] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[deleteProject] operator[SEP] identifier[dbc] , identifier[project] , literal[boolean] operator[SEP] operator[SEP] } identifier[Iterator] operator[<] identifier[CmsGroup] operator[>] identifier[itRoles] operator[=] identifier[getGroups] operator[SEP] identifier[dbc] , identifier[organizationalUnit] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[itRoles] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsGroup] identifier[role] operator[=] identifier[itRoles] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[deleteGroup] operator[SEP] identifier[dbc] , identifier[role] , Other[null] operator[SEP] operator[SEP] } identifier[CmsResource] identifier[resource] operator[=] identifier[readResource] operator[SEP] identifier[dbc] , identifier[organizationalUnit] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[CmsResourceFilter] operator[SEP] identifier[DEFAULT] operator[SEP] operator[SEP] identifier[CmsPublishList] identifier[pl] operator[=] Keyword[new] identifier[CmsPublishList] operator[SEP] identifier[resource] , literal[boolean] operator[SEP] operator[SEP] identifier[pl] operator[SEP] identifier[add] operator[SEP] identifier[resource] , literal[boolean] operator[SEP] operator[SEP] identifier[getUserDriver] operator[SEP] identifier[dbc] operator[SEP] operator[SEP] identifier[deleteOrganizationalUnit] operator[SEP] identifier[dbc] , identifier[organizationalUnit] operator[SEP] operator[SEP] identifier[getProjectDriver] operator[SEP] identifier[dbc] operator[SEP] operator[SEP] identifier[writePublishHistory] operator[SEP] identifier[dbc] , identifier[pl] operator[SEP] identifier[getPublishHistoryId] operator[SEP] operator[SEP] , Keyword[new] identifier[CmsPublishedResource] operator[SEP] identifier[resource] , operator[-] Other[1] , identifier[CmsResourceState] operator[SEP] identifier[STATE_DELETED] operator[SEP] operator[SEP] operator[SEP] identifier[m_monitor] operator[SEP] identifier[clearPrincipalsCache] operator[SEP] operator[SEP] operator[SEP] identifier[m_monitor] operator[SEP] identifier[flushCache] operator[SEP] identifier[CmsMemoryMonitor] operator[SEP] identifier[CacheType] operator[SEP] identifier[PROPERTY] , identifier[CmsMemoryMonitor] operator[SEP] identifier[CacheType] operator[SEP] identifier[PROPERTY_LIST] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[eventData] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[eventData] operator[SEP] identifier[put] operator[SEP] identifier[I_CmsEventListener] operator[SEP] identifier[KEY_PUBLISHID] , identifier[pl] operator[SEP] identifier[getPublishHistoryId] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[eventData] operator[SEP] identifier[put] operator[SEP] identifier[I_CmsEventListener] operator[SEP] identifier[KEY_PROJECTID] , identifier[dbc] operator[SEP] identifier[currentProject] operator[SEP] operator[SEP] operator[SEP] identifier[getUuid] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[eventData] operator[SEP] identifier[put] operator[SEP] identifier[I_CmsEventListener] operator[SEP] identifier[KEY_DBCONTEXT] , identifier[dbc] operator[SEP] operator[SEP] identifier[CmsEvent] identifier[afterPublishEvent] operator[=] Keyword[new] identifier[CmsEvent] operator[SEP] identifier[I_CmsEventListener] operator[SEP] identifier[EVENT_PUBLISH_PROJECT] , identifier[eventData] operator[SEP] operator[SEP] identifier[OpenCms] operator[SEP] identifier[fireCmsEvent] operator[SEP] identifier[afterPublishEvent] operator[SEP] operator[SEP] identifier[m_lockManager] operator[SEP] identifier[removeDeletedResource] operator[SEP] identifier[dbc] , identifier[resource] operator[SEP] identifier[getRootPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[dbc] operator[SEP] identifier[getProjectId] operator[SEP] operator[SEP] operator[SEP] identifier[isNullUUID] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[event2Data] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[event2Data] operator[SEP] identifier[put] operator[SEP] identifier[I_CmsEventListener] operator[SEP] identifier[KEY_OU_NAME] , identifier[organizationalUnit] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[event2Data] operator[SEP] identifier[put] operator[SEP] identifier[I_CmsEventListener] operator[SEP] identifier[KEY_USER_ACTION] , identifier[I_CmsEventListener] operator[SEP] identifier[VALUE_OU_MODIFIED_ACTION_DELETE] operator[SEP] operator[SEP] identifier[OpenCms] operator[SEP] identifier[fireCmsEvent] operator[SEP] Keyword[new] identifier[CmsEvent] operator[SEP] identifier[I_CmsEventListener] operator[SEP] identifier[EVENT_OU_MODIFIED] , identifier[event2Data] operator[SEP] operator[SEP] operator[SEP] }
@Override public void addSerDeProperties(Path path, HiveRegistrationUnit hiveUnit) throws IOException { hiveUnit.setSerDeType(this.serDeWrapper.getSerDe().getClass().getName()); hiveUnit.setInputFormat(this.serDeWrapper.getInputFormatClassName()); hiveUnit.setOutputFormat(this.serDeWrapper.getOutputFormatClassName()); addSchemaProperties(path, hiveUnit); }
class class_name[name] begin[{] method[addSerDeProperties, return_type[void], modifier[public], parameter[path, hiveUnit]] begin[{] call[hiveUnit.setSerDeType, parameter[THIS[member[None.serDeWrapper]call[None.getSerDe, parameter[]]call[None.getClass, parameter[]]call[None.getName, parameter[]]]]] call[hiveUnit.setInputFormat, parameter[THIS[member[None.serDeWrapper]call[None.getInputFormatClassName, parameter[]]]]] call[hiveUnit.setOutputFormat, parameter[THIS[member[None.serDeWrapper]call[None.getOutputFormatClassName, parameter[]]]]] call[.addSchemaProperties, parameter[member[.path], member[.hiveUnit]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[addSerDeProperties] operator[SEP] identifier[Path] identifier[path] , identifier[HiveRegistrationUnit] identifier[hiveUnit] operator[SEP] Keyword[throws] identifier[IOException] { identifier[hiveUnit] operator[SEP] identifier[setSerDeType] operator[SEP] Keyword[this] operator[SEP] identifier[serDeWrapper] operator[SEP] identifier[getSerDe] operator[SEP] operator[SEP] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[hiveUnit] operator[SEP] identifier[setInputFormat] operator[SEP] Keyword[this] operator[SEP] identifier[serDeWrapper] operator[SEP] identifier[getInputFormatClassName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[hiveUnit] operator[SEP] identifier[setOutputFormat] operator[SEP] Keyword[this] operator[SEP] identifier[serDeWrapper] operator[SEP] identifier[getOutputFormatClassName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addSchemaProperties] operator[SEP] identifier[path] , identifier[hiveUnit] operator[SEP] operator[SEP] }
public static boolean varyMatches( Response cachedResponse, Headers cachedRequest, Request newRequest) { for (String field : varyFields(cachedResponse)) { if (!Objects.equals(cachedRequest.values(field), newRequest.headers(field))) return false; } return true; }
class class_name[name] begin[{] method[varyMatches, return_type[type[boolean]], modifier[public static], parameter[cachedResponse, cachedRequest, newRequest]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=values, postfix_operators=[], prefix_operators=[], qualifier=cachedRequest, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=headers, postfix_operators=[], prefix_operators=[], qualifier=newRequest, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=Objects, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=cachedResponse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=varyFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[literal[true]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[varyMatches] operator[SEP] identifier[Response] identifier[cachedResponse] , identifier[Headers] identifier[cachedRequest] , identifier[Request] identifier[newRequest] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[field] operator[:] identifier[varyFields] operator[SEP] identifier[cachedResponse] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[Objects] operator[SEP] identifier[equals] operator[SEP] identifier[cachedRequest] operator[SEP] identifier[values] operator[SEP] identifier[field] operator[SEP] , identifier[newRequest] operator[SEP] identifier[headers] operator[SEP] identifier[field] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public final void ruleXPrimaryExpression() throws RecognitionException { int stackSize = keepStackSize(); try { // InternalXbase.g:671:2: ( ( ( rule__XPrimaryExpression__Alternatives ) ) ) // InternalXbase.g:672:2: ( ( rule__XPrimaryExpression__Alternatives ) ) { // InternalXbase.g:672:2: ( ( rule__XPrimaryExpression__Alternatives ) ) // InternalXbase.g:673:3: ( rule__XPrimaryExpression__Alternatives ) { if ( state.backtracking==0 ) { before(grammarAccess.getXPrimaryExpressionAccess().getAlternatives()); } // InternalXbase.g:674:3: ( rule__XPrimaryExpression__Alternatives ) // InternalXbase.g:674:4: rule__XPrimaryExpression__Alternatives { pushFollow(FOLLOW_2); rule__XPrimaryExpression__Alternatives(); state._fsp--; if (state.failed) return ; } if ( state.backtracking==0 ) { after(grammarAccess.getXPrimaryExpressionAccess().getAlternatives()); } } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { restoreStackSize(stackSize); } return ; }
class class_name[name] begin[{] method[ruleXPrimaryExpression, return_type[void], modifier[final public], parameter[]] begin[{] local_variable[type[int], stackSize] TryStatement(block=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXPrimaryExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getAlternatives, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=before, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=rule__XPrimaryExpression__Alternatives, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=None, label=None))]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXPrimaryExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getAlternatives, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=after, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])])], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=reportError, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=stackSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=restoreStackSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) return[None] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[ruleXPrimaryExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { Keyword[int] identifier[stackSize] operator[=] identifier[keepStackSize] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[before] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXPrimaryExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getAlternatives] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } { identifier[pushFollow] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] identifier[rule__XPrimaryExpression__Alternatives] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[after] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXPrimaryExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getAlternatives] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[reportError] operator[SEP] identifier[re] operator[SEP] operator[SEP] identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] } Keyword[finally] { identifier[restoreStackSize] operator[SEP] identifier[stackSize] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] }
@Nullable public static String getClassPackageName (@Nullable final Class <?> aClass) { return aClass == null ? null : getClassPackageName (aClass.getName ()); }
class class_name[name] begin[{] method[getClassPackageName, return_type[type[String]], modifier[public static], parameter[aClass]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=aClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=aClass, selectors=[], type_arguments=None)], member=getClassPackageName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[String] identifier[getClassPackageName] operator[SEP] annotation[@] identifier[Nullable] Keyword[final] identifier[Class] operator[<] operator[?] operator[>] identifier[aClass] operator[SEP] { Keyword[return] identifier[aClass] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[getClassPackageName] operator[SEP] identifier[aClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public View setTypeface(Context context, @LayoutRes int layoutRes, ViewGroup parent, @StringRes int strResId) { return setTypeface(context, layoutRes, parent, mApplication.getString(strResId)); }
class class_name[name] begin[{] method[setTypeface, return_type[type[View]], modifier[public], parameter[context, layoutRes, parent, strResId]] begin[{] return[call[.setTypeface, parameter[member[.context], member[.layoutRes], member[.parent], call[mApplication.getString, parameter[member[.strResId]]]]]] end[}] END[}]
Keyword[public] identifier[View] identifier[setTypeface] operator[SEP] identifier[Context] identifier[context] , annotation[@] identifier[LayoutRes] Keyword[int] identifier[layoutRes] , identifier[ViewGroup] identifier[parent] , annotation[@] identifier[StringRes] Keyword[int] identifier[strResId] operator[SEP] { Keyword[return] identifier[setTypeface] operator[SEP] identifier[context] , identifier[layoutRes] , identifier[parent] , identifier[mApplication] operator[SEP] identifier[getString] operator[SEP] identifier[strResId] operator[SEP] operator[SEP] operator[SEP] }
public static Set<Policy> policies(Config config) { LruWindowTinyLfuSettings settings = new LruWindowTinyLfuSettings(config); return settings.percentMain().stream() .map(percentMain -> new LruWindowTinyLfuPolicy(percentMain, settings)) .collect(toSet()); }
class class_name[name] begin[{] method[policies, return_type[type[Set]], modifier[public static], parameter[config]] begin[{] local_variable[type[LruWindowTinyLfuSettings], settings] return[call[settings.percentMain, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[Policy] operator[>] identifier[policies] operator[SEP] identifier[Config] identifier[config] operator[SEP] { identifier[LruWindowTinyLfuSettings] identifier[settings] operator[=] Keyword[new] identifier[LruWindowTinyLfuSettings] operator[SEP] identifier[config] operator[SEP] operator[SEP] Keyword[return] identifier[settings] operator[SEP] identifier[percentMain] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[percentMain] operator[->] Keyword[new] identifier[LruWindowTinyLfuPolicy] operator[SEP] identifier[percentMain] , identifier[settings] operator[SEP] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[toSet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static boolean multiPointWithinEnvelope_(MultiPoint multipoint_a, Envelope envelope_b, double tolerance, ProgressTracker progress_tracker) { Envelope2D env_a = new Envelope2D(), env_b = new Envelope2D(); multipoint_a.queryEnvelope2D(env_a); envelope_b.queryEnvelope2D(env_b); if (!envelopeInfContainsEnvelope_(env_b, env_a, tolerance)) return false; if (env_b.getHeight() <= tolerance && env_b.getWidth() <= tolerance) return envelopeEqualsEnvelope_(env_a, env_b, tolerance, progress_tracker); // treat as point if (env_b.getHeight() <= tolerance || env_b.getWidth() <= tolerance) {// treat // as // line boolean b_interior = false; Envelope2D env_b_deflated = new Envelope2D(), env_b_inflated = new Envelope2D(); env_b_deflated.setCoords(env_b); env_b_inflated.setCoords(env_b); if (env_b.getHeight() > tolerance) env_b_deflated.inflate(0, -tolerance); else env_b_deflated.inflate(-tolerance, 0); env_b_inflated.inflate(tolerance, tolerance); Point2D pt_a = new Point2D(); for (int i = 0; i < multipoint_a.getPointCount(); i++) { multipoint_a.getXY(i, pt_a); if (!env_b_inflated.contains(pt_a)) return false; if (env_b.getHeight() > tolerance) { if (pt_a.y > env_b_deflated.ymin && pt_a.y < env_b_deflated.ymax) b_interior = true; } else { if (pt_a.x > env_b_deflated.xmin && pt_a.x < env_b_deflated.xmax) b_interior = true; } } return b_interior; } // treat as area boolean b_interior = false; Envelope2D env_b_deflated = new Envelope2D(), env_b_inflated = new Envelope2D(); env_b_deflated.setCoords(env_b); env_b_inflated.setCoords(env_b); env_b_deflated.inflate(-tolerance, -tolerance); env_b_inflated.inflate(tolerance, tolerance); Point2D pt_a = new Point2D(); // we loop to find a proper interior intersection (i.e. something inside // instead of just on the boundary) for (int i = 0; i < multipoint_a.getPointCount(); i++) { multipoint_a.getXY(i, pt_a); if (!env_b_inflated.contains(pt_a)) return false; if (env_b_deflated.containsExclusive(pt_a)) b_interior = true; } return b_interior; }
class class_name[name] begin[{] method[multiPointWithinEnvelope_, return_type[type[boolean]], modifier[private static], parameter[multipoint_a, envelope_b, tolerance, progress_tracker]] begin[{] local_variable[type[Envelope2D], env_a] call[multipoint_a.queryEnvelope2D, parameter[member[.env_a]]] call[envelope_b.queryEnvelope2D, parameter[member[.env_b]]] if[call[.envelopeInfContainsEnvelope_, parameter[member[.env_b], member[.env_a], member[.tolerance]]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[binary_operation[call[env_b.getHeight, parameter[]], <=, member[.tolerance]], &&, binary_operation[call[env_b.getWidth, parameter[]], <=, member[.tolerance]]]] begin[{] return[call[.envelopeEqualsEnvelope_, parameter[member[.env_a], member[.env_b], member[.tolerance], member[.progress_tracker]]]] else begin[{] None end[}] if[binary_operation[binary_operation[call[env_b.getHeight, parameter[]], <=, member[.tolerance]], ||, binary_operation[call[env_b.getWidth, parameter[]], <=, member[.tolerance]]]] begin[{] local_variable[type[boolean], b_interior] local_variable[type[Envelope2D], env_b_deflated] call[env_b_deflated.setCoords, parameter[member[.env_b]]] call[env_b_inflated.setCoords, parameter[member[.env_b]]] if[binary_operation[call[env_b.getHeight, parameter[]], >, member[.tolerance]]] begin[{] call[env_b_deflated.inflate, parameter[literal[0], member[.tolerance]]] else begin[{] call[env_b_deflated.inflate, parameter[member[.tolerance], literal[0]]] end[}] call[env_b_inflated.inflate, parameter[member[.tolerance], member[.tolerance]]] local_variable[type[Point2D], pt_a] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pt_a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getXY, postfix_operators=[], prefix_operators=[], qualifier=multipoint_a, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=pt_a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=env_b_inflated, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=env_b, selectors=[], type_arguments=None), operandr=MemberReference(member=tolerance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=pt_a, selectors=[]), operandr=MemberReference(member=xmin, postfix_operators=[], prefix_operators=[], qualifier=env_b_deflated, selectors=[]), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=pt_a, selectors=[]), operandr=MemberReference(member=xmax, postfix_operators=[], prefix_operators=[], qualifier=env_b_deflated, selectors=[]), operator=<), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=b_interior, 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=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=pt_a, selectors=[]), operandr=MemberReference(member=ymin, postfix_operators=[], prefix_operators=[], qualifier=env_b_deflated, selectors=[]), operator=>), operandr=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=pt_a, selectors=[]), operandr=MemberReference(member=ymax, postfix_operators=[], prefix_operators=[], qualifier=env_b_deflated, selectors=[]), operator=<), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=b_interior, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getPointCount, postfix_operators=[], prefix_operators=[], qualifier=multipoint_a, 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[.b_interior]] else begin[{] None end[}] local_variable[type[boolean], b_interior] local_variable[type[Envelope2D], env_b_deflated] call[env_b_deflated.setCoords, parameter[member[.env_b]]] call[env_b_inflated.setCoords, parameter[member[.env_b]]] call[env_b_deflated.inflate, parameter[member[.tolerance], member[.tolerance]]] call[env_b_inflated.inflate, parameter[member[.tolerance], member[.tolerance]]] local_variable[type[Point2D], pt_a] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pt_a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getXY, postfix_operators=[], prefix_operators=[], qualifier=multipoint_a, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=pt_a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=['!'], qualifier=env_b_inflated, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=pt_a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsExclusive, postfix_operators=[], prefix_operators=[], qualifier=env_b_deflated, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=b_interior, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getPointCount, postfix_operators=[], prefix_operators=[], qualifier=multipoint_a, 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[.b_interior]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[multiPointWithinEnvelope_] operator[SEP] identifier[MultiPoint] identifier[multipoint_a] , identifier[Envelope] identifier[envelope_b] , Keyword[double] identifier[tolerance] , identifier[ProgressTracker] identifier[progress_tracker] operator[SEP] { identifier[Envelope2D] identifier[env_a] operator[=] Keyword[new] identifier[Envelope2D] operator[SEP] operator[SEP] , identifier[env_b] operator[=] Keyword[new] identifier[Envelope2D] operator[SEP] operator[SEP] operator[SEP] identifier[multipoint_a] operator[SEP] identifier[queryEnvelope2D] operator[SEP] identifier[env_a] operator[SEP] operator[SEP] identifier[envelope_b] operator[SEP] identifier[queryEnvelope2D] operator[SEP] identifier[env_b] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[envelopeInfContainsEnvelope_] operator[SEP] identifier[env_b] , identifier[env_a] , identifier[tolerance] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[env_b] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[<=] identifier[tolerance] operator[&&] identifier[env_b] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[<=] identifier[tolerance] operator[SEP] Keyword[return] identifier[envelopeEqualsEnvelope_] operator[SEP] identifier[env_a] , identifier[env_b] , identifier[tolerance] , identifier[progress_tracker] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[env_b] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[<=] identifier[tolerance] operator[||] identifier[env_b] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[<=] identifier[tolerance] operator[SEP] { Keyword[boolean] identifier[b_interior] operator[=] literal[boolean] operator[SEP] identifier[Envelope2D] identifier[env_b_deflated] operator[=] Keyword[new] identifier[Envelope2D] operator[SEP] operator[SEP] , identifier[env_b_inflated] operator[=] Keyword[new] identifier[Envelope2D] operator[SEP] operator[SEP] operator[SEP] identifier[env_b_deflated] operator[SEP] identifier[setCoords] operator[SEP] identifier[env_b] operator[SEP] operator[SEP] identifier[env_b_inflated] operator[SEP] identifier[setCoords] operator[SEP] identifier[env_b] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[env_b] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[>] identifier[tolerance] operator[SEP] identifier[env_b_deflated] operator[SEP] identifier[inflate] operator[SEP] Other[0] , operator[-] identifier[tolerance] operator[SEP] operator[SEP] Keyword[else] identifier[env_b_deflated] operator[SEP] identifier[inflate] operator[SEP] operator[-] identifier[tolerance] , Other[0] operator[SEP] operator[SEP] identifier[env_b_inflated] operator[SEP] identifier[inflate] operator[SEP] identifier[tolerance] , identifier[tolerance] operator[SEP] operator[SEP] identifier[Point2D] identifier[pt_a] operator[=] Keyword[new] identifier[Point2D] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[multipoint_a] operator[SEP] identifier[getPointCount] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[multipoint_a] operator[SEP] identifier[getXY] operator[SEP] identifier[i] , identifier[pt_a] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[env_b_inflated] operator[SEP] identifier[contains] operator[SEP] identifier[pt_a] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[env_b] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[>] identifier[tolerance] operator[SEP] { Keyword[if] operator[SEP] identifier[pt_a] operator[SEP] identifier[y] operator[>] identifier[env_b_deflated] operator[SEP] identifier[ymin] operator[&&] identifier[pt_a] operator[SEP] identifier[y] operator[<] identifier[env_b_deflated] operator[SEP] identifier[ymax] operator[SEP] identifier[b_interior] operator[=] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[pt_a] operator[SEP] identifier[x] operator[>] identifier[env_b_deflated] operator[SEP] identifier[xmin] operator[&&] identifier[pt_a] operator[SEP] identifier[x] operator[<] identifier[env_b_deflated] operator[SEP] identifier[xmax] operator[SEP] identifier[b_interior] operator[=] literal[boolean] operator[SEP] } } Keyword[return] identifier[b_interior] operator[SEP] } Keyword[boolean] identifier[b_interior] operator[=] literal[boolean] operator[SEP] identifier[Envelope2D] identifier[env_b_deflated] operator[=] Keyword[new] identifier[Envelope2D] operator[SEP] operator[SEP] , identifier[env_b_inflated] operator[=] Keyword[new] identifier[Envelope2D] operator[SEP] operator[SEP] operator[SEP] identifier[env_b_deflated] operator[SEP] identifier[setCoords] operator[SEP] identifier[env_b] operator[SEP] operator[SEP] identifier[env_b_inflated] operator[SEP] identifier[setCoords] operator[SEP] identifier[env_b] operator[SEP] operator[SEP] identifier[env_b_deflated] operator[SEP] identifier[inflate] operator[SEP] operator[-] identifier[tolerance] , operator[-] identifier[tolerance] operator[SEP] operator[SEP] identifier[env_b_inflated] operator[SEP] identifier[inflate] operator[SEP] identifier[tolerance] , identifier[tolerance] operator[SEP] operator[SEP] identifier[Point2D] identifier[pt_a] operator[=] Keyword[new] identifier[Point2D] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[multipoint_a] operator[SEP] identifier[getPointCount] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[multipoint_a] operator[SEP] identifier[getXY] operator[SEP] identifier[i] , identifier[pt_a] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[env_b_inflated] operator[SEP] identifier[contains] operator[SEP] identifier[pt_a] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[env_b_deflated] operator[SEP] identifier[containsExclusive] operator[SEP] identifier[pt_a] operator[SEP] operator[SEP] identifier[b_interior] operator[=] literal[boolean] operator[SEP] } Keyword[return] identifier[b_interior] operator[SEP] }
public static Predicates<Object> in(Iterable<?> iterable) { if (iterable instanceof SetIterable<?>) { return new InSetIterablePredicate((SetIterable<?>) iterable); } if (iterable instanceof Set<?>) { return new InSetPredicate((Set<?>) iterable); } if (iterable instanceof Collection<?> && ((Collection<?>) iterable).size() <= SMALL_COLLECTION_THRESHOLD) { return new InCollectionPredicate((Collection<?>) iterable); } return new InSetIterablePredicate(UnifiedSet.newSet(iterable)); }
class class_name[name] begin[{] method[in, return_type[type[Predicates]], modifier[public static], parameter[iterable]] begin[{] if[binary_operation[member[.iterable], instanceof, type[SetIterable]]] begin[{] return[ClassCreator(arguments=[Cast(expression=MemberReference(member=iterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=SetIterable, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InSetIterablePredicate, sub_type=None))] else begin[{] None end[}] if[binary_operation[member[.iterable], instanceof, type[Set]]] begin[{] return[ClassCreator(arguments=[Cast(expression=MemberReference(member=iterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Set, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InSetPredicate, sub_type=None))] else begin[{] None end[}] if[binary_operation[binary_operation[member[.iterable], instanceof, type[Collection]], &&, binary_operation[Cast(expression=MemberReference(member=iterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Collection, sub_type=None)), <=, member[.SMALL_COLLECTION_THRESHOLD]]]] begin[{] return[ClassCreator(arguments=[Cast(expression=MemberReference(member=iterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Collection, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InCollectionPredicate, sub_type=None))] else begin[{] None end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=iterable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newSet, postfix_operators=[], prefix_operators=[], qualifier=UnifiedSet, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InSetIterablePredicate, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Predicates] operator[<] identifier[Object] operator[>] identifier[in] operator[SEP] identifier[Iterable] operator[<] operator[?] operator[>] identifier[iterable] operator[SEP] { Keyword[if] operator[SEP] identifier[iterable] Keyword[instanceof] identifier[SetIterable] operator[<] operator[?] operator[>] operator[SEP] { Keyword[return] Keyword[new] identifier[InSetIterablePredicate] operator[SEP] operator[SEP] identifier[SetIterable] operator[<] operator[?] operator[>] operator[SEP] identifier[iterable] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[iterable] Keyword[instanceof] identifier[Set] operator[<] operator[?] operator[>] operator[SEP] { Keyword[return] Keyword[new] identifier[InSetPredicate] operator[SEP] operator[SEP] identifier[Set] operator[<] operator[?] operator[>] operator[SEP] identifier[iterable] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[iterable] Keyword[instanceof] identifier[Collection] operator[<] operator[?] operator[>] operator[&&] operator[SEP] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] operator[SEP] identifier[iterable] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<=] identifier[SMALL_COLLECTION_THRESHOLD] operator[SEP] { Keyword[return] Keyword[new] identifier[InCollectionPredicate] operator[SEP] operator[SEP] identifier[Collection] operator[<] operator[?] operator[>] operator[SEP] identifier[iterable] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[InSetIterablePredicate] operator[SEP] identifier[UnifiedSet] operator[SEP] identifier[newSet] operator[SEP] identifier[iterable] operator[SEP] operator[SEP] operator[SEP] }
public static final boolean isArchive(InputStream in) throws IOException { if (in != null) { try (ZipInputStream zip = new ZipInputStream(in)){ return zip.getNextEntry() != null; } catch (ZipException e) { return false; } } return false; }
class class_name[name] begin[{] method[isArchive, return_type[type[boolean]], modifier[final public static], parameter[in]] begin[{] if[binary_operation[member[.in], !=, literal[null]]] begin[{] TryStatement(block=[ReturnStatement(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNextEntry, postfix_operators=[], prefix_operators=[], qualifier=zip, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ZipException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=zip, type=ReferenceType(arguments=None, dimensions=[], name=ZipInputStream, sub_type=None), value=ClassCreator(arguments=[MemberReference(member=in, 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=ZipInputStream, sub_type=None)))]) else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] Keyword[boolean] identifier[isArchive] operator[SEP] identifier[InputStream] identifier[in] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[in] operator[!=] Other[null] operator[SEP] { Keyword[try] operator[SEP] identifier[ZipInputStream] identifier[zip] operator[=] Keyword[new] identifier[ZipInputStream] operator[SEP] identifier[in] operator[SEP] operator[SEP] { Keyword[return] identifier[zip] operator[SEP] identifier[getNextEntry] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] } Keyword[catch] operator[SEP] identifier[ZipException] identifier[e] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public TextBuilder link(final String text, final URL url) { this.curParagraphBuilder.link(text, url); return this; }
class class_name[name] begin[{] method[link, return_type[type[TextBuilder]], modifier[public], parameter[text, url]] begin[{] THIS[member[None.curParagraphBuilder]call[None.link, parameter[member[.text], member[.url]]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[TextBuilder] identifier[link] operator[SEP] Keyword[final] identifier[String] identifier[text] , Keyword[final] identifier[URL] identifier[url] operator[SEP] { Keyword[this] operator[SEP] identifier[curParagraphBuilder] operator[SEP] identifier[link] operator[SEP] identifier[text] , identifier[url] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
private static Node getFirstNonEmptyChild(Node n) { for (Node c = n.getFirstChild(); c != null; c = c.getNext()) { if (c.isBlock()) { Node result = getFirstNonEmptyChild(c); if (result != null) { return result; } } else if (!c.isEmpty()) { return c; } } return null; }
class class_name[name] begin[{] method[getFirstNonEmptyChild, return_type[type[Node]], modifier[private static], parameter[n]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isBlock, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=c, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFirstNonEmptyChild, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=getFirstChild, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getNext, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None))]), label=None) return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Node] identifier[getFirstNonEmptyChild] operator[SEP] identifier[Node] identifier[n] operator[SEP] { Keyword[for] operator[SEP] identifier[Node] identifier[c] operator[=] identifier[n] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[!=] Other[null] operator[SEP] identifier[c] operator[=] identifier[c] operator[SEP] identifier[getNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[c] operator[SEP] identifier[isBlock] operator[SEP] operator[SEP] operator[SEP] { identifier[Node] identifier[result] operator[=] identifier[getFirstNonEmptyChild] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[result] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[c] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[c] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public static void setCurrentUser(UserGroupInformation ugi) { Subject user = SecurityUtil.getSubject(ugi); currentUser.set(user); }
class class_name[name] begin[{] method[setCurrentUser, return_type[void], modifier[public static], parameter[ugi]] begin[{] local_variable[type[Subject], user] call[currentUser.set, parameter[member[.user]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setCurrentUser] operator[SEP] identifier[UserGroupInformation] identifier[ugi] operator[SEP] { identifier[Subject] identifier[user] operator[=] identifier[SecurityUtil] operator[SEP] identifier[getSubject] operator[SEP] identifier[ugi] operator[SEP] operator[SEP] identifier[currentUser] operator[SEP] identifier[set] operator[SEP] identifier[user] operator[SEP] operator[SEP] }
@Override public void notifyClients() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "notifyClients"); long totalItems = getTotalMsgCount(); synchronized (this) { if (wlmRemoved && ((_destLowMsgs == -1) || (totalItems <= _destLowMsgs))) { wlmRemoved = false; // re-advertise destination PUT on WLM if (!destinationHandler.isTemporary()) { updatePutRegistration(true); destinationHandler.requestReallocation(); } // Fire event if event notification is enabled // Also check for logging of events (510343) if (_isEventNotificationEnabled || (mp.getCustomProperties().getOutputLinkThresholdEventsToLog() && destinationHandler.isLink()) || (mp.getCustomProperties().getOutputDestinationThresholdEventsToLog() && !destinationHandler.isLink())) { fireDepthThresholdReachedEvent(getControlAdapter(), false, totalItems, _destLowMsgs); // Reached low } } else if (!wlmRemoved && (_destHighMsgs != -1) && (_destLowMsgs != -1) && (totalItems >= _destHighMsgs)) { wlmRemoved = true; // remove destination PUT advertisement on WLM if (!destinationHandler.isTemporary()) { updatePutRegistration(false); wlmRemoved = true; } // Fire event if event notification is enabled // Also check for logging of events (510343) if (_isEventNotificationEnabled || (mp.getCustomProperties().getOutputLinkThresholdEventsToLog() && destinationHandler.isLink()) || (mp.getCustomProperties().getOutputDestinationThresholdEventsToLog() && !destinationHandler.isLink())) { fireDepthThresholdReachedEvent(getControlAdapter(), true, totalItems, _destHighMsgs); // Reached High } } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "notifyClients", new Boolean(!wlmRemoved)); }
class class_name[name] begin[{] method[notifyClients, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["notifyClients"]]] else begin[{] None end[}] local_variable[type[long], totalItems] SYNCHRONIZED[THIS[]] BEGIN[{] if[binary_operation[member[.wlmRemoved], &&, binary_operation[binary_operation[member[._destLowMsgs], ==, literal[1]], ||, binary_operation[member[.totalItems], <=, member[._destLowMsgs]]]]] begin[{] assign[member[.wlmRemoved], literal[false]] if[call[destinationHandler.isTemporary, parameter[]]] begin[{] call[.updatePutRegistration, parameter[literal[true]]] call[destinationHandler.requestReallocation, parameter[]] else begin[{] None end[}] if[binary_operation[binary_operation[member[._isEventNotificationEnabled], ||, binary_operation[call[mp.getCustomProperties, parameter[]], &&, call[destinationHandler.isLink, parameter[]]]], ||, binary_operation[call[mp.getCustomProperties, parameter[]], &&, call[destinationHandler.isLink, parameter[]]]]] begin[{] call[.fireDepthThresholdReachedEvent, parameter[call[.getControlAdapter, parameter[]], literal[false], member[.totalItems], member[._destLowMsgs]]] else begin[{] None end[}] else begin[{] if[binary_operation[binary_operation[binary_operation[member[.wlmRemoved], &&, binary_operation[member[._destHighMsgs], !=, literal[1]]], &&, binary_operation[member[._destLowMsgs], !=, literal[1]]], &&, binary_operation[member[.totalItems], >=, member[._destHighMsgs]]]] begin[{] assign[member[.wlmRemoved], literal[true]] if[call[destinationHandler.isTemporary, parameter[]]] begin[{] call[.updatePutRegistration, parameter[literal[false]]] assign[member[.wlmRemoved], literal[true]] else begin[{] None end[}] if[binary_operation[binary_operation[member[._isEventNotificationEnabled], ||, binary_operation[call[mp.getCustomProperties, parameter[]], &&, call[destinationHandler.isLink, parameter[]]]], ||, binary_operation[call[mp.getCustomProperties, parameter[]], &&, call[destinationHandler.isLink, parameter[]]]]] begin[{] call[.fireDepthThresholdReachedEvent, parameter[call[.getControlAdapter, parameter[]], literal[true], member[.totalItems], member[._destHighMsgs]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["notifyClients"], ClassCreator(arguments=[MemberReference(member=wlmRemoved, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Boolean, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[notifyClients] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[long] identifier[totalItems] operator[=] identifier[getTotalMsgCount] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[wlmRemoved] operator[&&] operator[SEP] operator[SEP] identifier[_destLowMsgs] operator[==] operator[-] Other[1] operator[SEP] operator[||] operator[SEP] identifier[totalItems] operator[<=] identifier[_destLowMsgs] operator[SEP] operator[SEP] operator[SEP] { identifier[wlmRemoved] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[destinationHandler] operator[SEP] identifier[isTemporary] operator[SEP] operator[SEP] operator[SEP] { identifier[updatePutRegistration] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[destinationHandler] operator[SEP] identifier[requestReallocation] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[_isEventNotificationEnabled] operator[||] operator[SEP] identifier[mp] operator[SEP] identifier[getCustomProperties] operator[SEP] operator[SEP] operator[SEP] identifier[getOutputLinkThresholdEventsToLog] operator[SEP] operator[SEP] operator[&&] identifier[destinationHandler] operator[SEP] identifier[isLink] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[mp] operator[SEP] identifier[getCustomProperties] operator[SEP] operator[SEP] operator[SEP] identifier[getOutputDestinationThresholdEventsToLog] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[destinationHandler] operator[SEP] identifier[isLink] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[fireDepthThresholdReachedEvent] operator[SEP] identifier[getControlAdapter] operator[SEP] operator[SEP] , literal[boolean] , identifier[totalItems] , identifier[_destLowMsgs] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] operator[!] identifier[wlmRemoved] operator[&&] operator[SEP] identifier[_destHighMsgs] operator[!=] operator[-] Other[1] operator[SEP] operator[&&] operator[SEP] identifier[_destLowMsgs] operator[!=] operator[-] Other[1] operator[SEP] operator[&&] operator[SEP] identifier[totalItems] operator[>=] identifier[_destHighMsgs] operator[SEP] operator[SEP] { identifier[wlmRemoved] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[destinationHandler] operator[SEP] identifier[isTemporary] operator[SEP] operator[SEP] operator[SEP] { identifier[updatePutRegistration] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[wlmRemoved] operator[=] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[_isEventNotificationEnabled] operator[||] operator[SEP] identifier[mp] operator[SEP] identifier[getCustomProperties] operator[SEP] operator[SEP] operator[SEP] identifier[getOutputLinkThresholdEventsToLog] operator[SEP] operator[SEP] operator[&&] identifier[destinationHandler] operator[SEP] identifier[isLink] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[mp] operator[SEP] identifier[getCustomProperties] operator[SEP] operator[SEP] operator[SEP] identifier[getOutputDestinationThresholdEventsToLog] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[destinationHandler] operator[SEP] identifier[isLink] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[fireDepthThresholdReachedEvent] operator[SEP] identifier[getControlAdapter] operator[SEP] operator[SEP] , literal[boolean] , identifier[totalItems] , identifier[_destHighMsgs] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Boolean] operator[SEP] operator[!] identifier[wlmRemoved] operator[SEP] operator[SEP] operator[SEP] }
@Deprecated public static ResourceHandler.Builder classpathHandler(String classpathRoot) { return new Builder().withResourceProviderFactory(ResourceProviderFactory.classpathBased(classpathRoot)); }
class class_name[name] begin[{] method[classpathHandler, return_type[type[ResourceHandler]], modifier[public static], parameter[classpathRoot]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=classpathRoot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=classpathBased, postfix_operators=[], prefix_operators=[], qualifier=ResourceProviderFactory, selectors=[], type_arguments=None)], member=withResourceProviderFactory, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Builder, sub_type=None))] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[ResourceHandler] operator[SEP] identifier[Builder] identifier[classpathHandler] operator[SEP] identifier[String] identifier[classpathRoot] operator[SEP] { Keyword[return] Keyword[new] identifier[Builder] operator[SEP] operator[SEP] operator[SEP] identifier[withResourceProviderFactory] operator[SEP] identifier[ResourceProviderFactory] operator[SEP] identifier[classpathBased] operator[SEP] identifier[classpathRoot] operator[SEP] operator[SEP] operator[SEP] }
public void setPin(int numberPinBoxes, int inputType) { if(numberPinBoxes<=0) { numberPinBoxes = mNumberPinBoxes; } mLinearLayoutPinBoxes.removeAllViews(); setNumberPinBoxes(numberPinBoxes); pinBoxesIds = new int[numberPinBoxes]; pinSplitsIds = new int[numberPinBoxes-1]; int index = 0; for (int i = 0; i < numberPinBoxes; i++) { mLinearLayoutPinBoxes.addView(generatePinBox(i, inputType), index); if (mSplit != null && !mSplit.isEmpty() && i < numberPinBoxes - 1) { mLinearLayoutPinBoxes.addView(generateSplit(i), index + 1); mLinearLayoutPinBoxes.setGravity(Gravity.CENTER_VERTICAL); index += 2; } else { index++; } } }
class class_name[name] begin[{] method[setPin, return_type[void], modifier[public], parameter[numberPinBoxes, inputType]] begin[{] if[binary_operation[member[.numberPinBoxes], <=, literal[0]]] begin[{] assign[member[.numberPinBoxes], member[.mNumberPinBoxes]] else begin[{] None end[}] call[mLinearLayoutPinBoxes.removeAllViews, parameter[]] call[.setNumberPinBoxes, parameter[member[.numberPinBoxes]]] assign[member[.pinBoxesIds], ArrayCreator(dimensions=[MemberReference(member=numberPinBoxes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] assign[member[.pinSplitsIds], ArrayCreator(dimensions=[BinaryOperation(operandl=MemberReference(member=numberPinBoxes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int))] local_variable[type[int], index] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=inputType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generatePinBox, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addView, postfix_operators=[], prefix_operators=[], qualifier=mLinearLayoutPinBoxes, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=mSplit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=mSplit, selectors=[], type_arguments=None), operator=&&), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=numberPinBoxes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateSplit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)], member=addView, postfix_operators=[], prefix_operators=[], qualifier=mLinearLayoutPinBoxes, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CENTER_VERTICAL, postfix_operators=[], prefix_operators=[], qualifier=Gravity, selectors=[])], member=setGravity, postfix_operators=[], prefix_operators=[], qualifier=mLinearLayoutPinBoxes, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numberPinBoxes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[setPin] operator[SEP] Keyword[int] identifier[numberPinBoxes] , Keyword[int] identifier[inputType] operator[SEP] { Keyword[if] operator[SEP] identifier[numberPinBoxes] operator[<=] Other[0] operator[SEP] { identifier[numberPinBoxes] operator[=] identifier[mNumberPinBoxes] operator[SEP] } identifier[mLinearLayoutPinBoxes] operator[SEP] identifier[removeAllViews] operator[SEP] operator[SEP] operator[SEP] identifier[setNumberPinBoxes] operator[SEP] identifier[numberPinBoxes] operator[SEP] operator[SEP] identifier[pinBoxesIds] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[numberPinBoxes] operator[SEP] operator[SEP] identifier[pinSplitsIds] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[numberPinBoxes] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[index] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[numberPinBoxes] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[mLinearLayoutPinBoxes] operator[SEP] identifier[addView] operator[SEP] identifier[generatePinBox] operator[SEP] identifier[i] , identifier[inputType] operator[SEP] , identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[mSplit] operator[!=] Other[null] operator[&&] operator[!] identifier[mSplit] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[i] operator[<] identifier[numberPinBoxes] operator[-] Other[1] operator[SEP] { identifier[mLinearLayoutPinBoxes] operator[SEP] identifier[addView] operator[SEP] identifier[generateSplit] operator[SEP] identifier[i] operator[SEP] , identifier[index] operator[+] Other[1] operator[SEP] operator[SEP] identifier[mLinearLayoutPinBoxes] operator[SEP] identifier[setGravity] operator[SEP] identifier[Gravity] operator[SEP] identifier[CENTER_VERTICAL] operator[SEP] operator[SEP] identifier[index] operator[+=] Other[2] operator[SEP] } Keyword[else] { identifier[index] operator[++] operator[SEP] } } }
@Deprecated public final FluentIterable<T> preOrderTraversal(final T root) { checkNotNull(root); return new FluentIterable<T>() { @Override public UnmodifiableIterator<T> iterator() { return preOrderIterator(root); } @Override public void forEach(Consumer<? super T> action) { checkNotNull(action); new Consumer<T>() { @Override public void accept(T t) { action.accept(t); children(t).forEach(this); } }.accept(root); } }; }
class class_name[name] begin[{] method[preOrderTraversal, return_type[type[FluentIterable]], modifier[final public], parameter[root]] begin[{] call[.checkNotNull, parameter[member[.root]]] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=preOrderIterator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=iterator, parameters=[], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=UnmodifiableIterator, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=action, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkNotNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=action, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=children, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=forEach, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=accept, parameters=[FormalParameter(annotations=[], modifiers=set(), name=t, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=Consumer, sub_type=None)), label=None)], documentation=None, modifiers={'public'}, name=forEach, parameters=[FormalParameter(annotations=[], modifiers=set(), name=action, type=ReferenceType(arguments=[TypeArgument(pattern_type=super, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Consumer, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=FluentIterable, sub_type=None))] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[final] identifier[FluentIterable] operator[<] identifier[T] operator[>] identifier[preOrderTraversal] operator[SEP] Keyword[final] identifier[T] identifier[root] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[root] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[FluentIterable] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[UnmodifiableIterator] operator[<] identifier[T] operator[>] identifier[iterator] operator[SEP] operator[SEP] { Keyword[return] identifier[preOrderIterator] operator[SEP] identifier[root] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[forEach] operator[SEP] identifier[Consumer] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[action] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[action] operator[SEP] operator[SEP] Keyword[new] identifier[Consumer] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[accept] operator[SEP] identifier[T] identifier[t] operator[SEP] { identifier[action] operator[SEP] identifier[accept] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[children] operator[SEP] identifier[t] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } } operator[SEP] identifier[accept] operator[SEP] identifier[root] operator[SEP] operator[SEP] } } operator[SEP] }
private String getNextAsymId(String asymId) { if (asymId.length()==1) { if (!asymId.equals("Z")) { return Character.toString(getNextChar(asymId.charAt(0))); } else { return "AA"; } } else if (asymId.length()==2) { if (asymId.equals("ZZ")) { return "AAA"; } char[] c = new char[2]; asymId.getChars(0, 2, c, 0); c[0] = getNextChar(c[0]); if (c[0]=='A') { c[1] = getNextChar(c[1]); } return new String(c); } else if (asymId.length()==3) { char[] c = new char[3]; asymId.getChars(0, 3, c, 0); c[0] = getNextChar(c[0]); if (c[0]=='A') { c[1] = getNextChar(c[1]); if (c[1]=='A') { c[2] = getNextChar(c[2]); } } return new String(c); } return null; }
class class_name[name] begin[{] method[getNextAsymId, return_type[type[String]], modifier[private], parameter[asymId]] begin[{] if[binary_operation[call[asymId.length, parameter[]], ==, literal[1]]] begin[{] if[call[asymId.equals, parameter[literal["Z"]]]] begin[{] return[call[Character.toString, parameter[call[.getNextChar, parameter[call[asymId.charAt, parameter[literal[0]]]]]]]] else begin[{] return[literal["AA"]] end[}] else begin[{] if[binary_operation[call[asymId.length, parameter[]], ==, literal[2]]] begin[{] if[call[asymId.equals, parameter[literal["ZZ"]]]] begin[{] return[literal["AAA"]] else begin[{] None end[}] local_variable[type[char], c] call[asymId.getChars, parameter[literal[0], literal[2], member[.c], literal[0]]] assign[member[.c], call[.getNextChar, parameter[member[.c]]]] if[binary_operation[member[.c], ==, literal['A']]] begin[{] assign[member[.c], call[.getNextChar, parameter[member[.c]]]] 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=None, dimensions=None, name=String, sub_type=None))] else begin[{] if[binary_operation[call[asymId.length, parameter[]], ==, literal[3]]] begin[{] local_variable[type[char], c] call[asymId.getChars, parameter[literal[0], literal[3], member[.c], literal[0]]] assign[member[.c], call[.getNextChar, parameter[member[.c]]]] if[binary_operation[member[.c], ==, literal['A']]] begin[{] assign[member[.c], call[.getNextChar, parameter[member[.c]]]] if[binary_operation[member[.c], ==, literal['A']]] begin[{] assign[member[.c], call[.getNextChar, parameter[member[.c]]]] else begin[{] None end[}] 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=None, dimensions=None, name=String, sub_type=None))] else begin[{] None end[}] end[}] end[}] return[literal[null]] end[}] END[}]
Keyword[private] identifier[String] identifier[getNextAsymId] operator[SEP] identifier[String] identifier[asymId] operator[SEP] { Keyword[if] operator[SEP] identifier[asymId] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[asymId] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[Character] operator[SEP] identifier[toString] operator[SEP] identifier[getNextChar] operator[SEP] identifier[asymId] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] literal[String] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[asymId] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[2] operator[SEP] { Keyword[if] operator[SEP] identifier[asymId] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] literal[String] operator[SEP] } Keyword[char] operator[SEP] operator[SEP] identifier[c] operator[=] Keyword[new] Keyword[char] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[asymId] operator[SEP] identifier[getChars] operator[SEP] Other[0] , Other[2] , identifier[c] , Other[0] operator[SEP] operator[SEP] identifier[c] operator[SEP] Other[0] operator[SEP] operator[=] identifier[getNextChar] operator[SEP] identifier[c] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[c] operator[SEP] Other[1] operator[SEP] operator[=] identifier[getNextChar] operator[SEP] identifier[c] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[String] operator[SEP] identifier[c] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[asymId] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[3] operator[SEP] { Keyword[char] operator[SEP] operator[SEP] identifier[c] operator[=] Keyword[new] Keyword[char] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[asymId] operator[SEP] identifier[getChars] operator[SEP] Other[0] , Other[3] , identifier[c] , Other[0] operator[SEP] operator[SEP] identifier[c] operator[SEP] Other[0] operator[SEP] operator[=] identifier[getNextChar] operator[SEP] identifier[c] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[SEP] Other[0] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[c] operator[SEP] Other[1] operator[SEP] operator[=] identifier[getNextChar] operator[SEP] identifier[c] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[SEP] Other[1] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[c] operator[SEP] Other[2] operator[SEP] operator[=] identifier[getNextChar] operator[SEP] identifier[c] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[String] operator[SEP] identifier[c] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public ListConfigurationRevisionsResult withRevisions(ConfigurationRevision... revisions) { if (this.revisions == null) { setRevisions(new java.util.ArrayList<ConfigurationRevision>(revisions.length)); } for (ConfigurationRevision ele : revisions) { this.revisions.add(ele); } return this; }
class class_name[name] begin[{] method[withRevisions, return_type[type[ListConfigurationRevisionsResult]], modifier[public], parameter[revisions]] begin[{] if[binary_operation[THIS[member[None.revisions]], ==, literal[null]]] begin[{] call[.setRevisions, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=revisions, 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=ConfigurationRevision, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=revisions, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=revisions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConfigurationRevision, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[ListConfigurationRevisionsResult] identifier[withRevisions] operator[SEP] identifier[ConfigurationRevision] operator[...] identifier[revisions] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[revisions] operator[==] Other[null] operator[SEP] { identifier[setRevisions] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[ConfigurationRevision] operator[>] operator[SEP] identifier[revisions] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[ConfigurationRevision] identifier[ele] operator[:] identifier[revisions] operator[SEP] { Keyword[this] operator[SEP] identifier[revisions] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public void marshall(IpPermission ipPermission, ProtocolMarshaller protocolMarshaller) { if (ipPermission == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(ipPermission.getFromPort(), FROMPORT_BINDING); protocolMarshaller.marshall(ipPermission.getToPort(), TOPORT_BINDING); protocolMarshaller.marshall(ipPermission.getIpRange(), IPRANGE_BINDING); protocolMarshaller.marshall(ipPermission.getProtocol(), PROTOCOL_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[ipPermission, protocolMarshaller]] begin[{] if[binary_operation[member[.ipPermission], ==, 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=getFromPort, postfix_operators=[], prefix_operators=[], qualifier=ipPermission, selectors=[], type_arguments=None), MemberReference(member=FROMPORT_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getToPort, postfix_operators=[], prefix_operators=[], qualifier=ipPermission, selectors=[], type_arguments=None), MemberReference(member=TOPORT_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getIpRange, postfix_operators=[], prefix_operators=[], qualifier=ipPermission, selectors=[], type_arguments=None), MemberReference(member=IPRANGE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getProtocol, postfix_operators=[], prefix_operators=[], qualifier=ipPermission, selectors=[], type_arguments=None), MemberReference(member=PROTOCOL_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[IpPermission] identifier[ipPermission] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[ipPermission] 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[ipPermission] operator[SEP] identifier[getFromPort] operator[SEP] operator[SEP] , identifier[FROMPORT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[ipPermission] operator[SEP] identifier[getToPort] operator[SEP] operator[SEP] , identifier[TOPORT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[ipPermission] operator[SEP] identifier[getIpRange] operator[SEP] operator[SEP] , identifier[IPRANGE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[ipPermission] operator[SEP] identifier[getProtocol] operator[SEP] operator[SEP] , identifier[PROTOCOL_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] } }
private static MethodRef getForNumberMethod(EnumDescriptor descriptor) { TypeInfo enumType = enumRuntimeType(descriptor); return MethodRef.createStaticMethod( enumType, new Method("forNumber", enumType.type(), ONE_INT_ARG)) // Note: Enum.forNumber() returns null if there is no corresponding enum. If a bad value is // passed in (via unknown types), the generated bytecode will NPE. .asNonNullable() .asCheap(); }
class class_name[name] begin[{] method[getForNumberMethod, return_type[type[MethodRef]], modifier[private static], parameter[descriptor]] begin[{] local_variable[type[TypeInfo], enumType] return[call[MethodRef.createStaticMethod, parameter[member[.enumType], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="forNumber"), MethodInvocation(arguments=[], member=type, postfix_operators=[], prefix_operators=[], qualifier=enumType, selectors=[], type_arguments=None), MemberReference(member=ONE_INT_ARG, 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=Method, sub_type=None))]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[MethodRef] identifier[getForNumberMethod] operator[SEP] identifier[EnumDescriptor] identifier[descriptor] operator[SEP] { identifier[TypeInfo] identifier[enumType] operator[=] identifier[enumRuntimeType] operator[SEP] identifier[descriptor] operator[SEP] operator[SEP] Keyword[return] identifier[MethodRef] operator[SEP] identifier[createStaticMethod] operator[SEP] identifier[enumType] , Keyword[new] identifier[Method] operator[SEP] literal[String] , identifier[enumType] operator[SEP] identifier[type] operator[SEP] operator[SEP] , identifier[ONE_INT_ARG] operator[SEP] operator[SEP] operator[SEP] identifier[asNonNullable] operator[SEP] operator[SEP] operator[SEP] identifier[asCheap] operator[SEP] operator[SEP] operator[SEP] }
public void write(Object o) throws OfficeWriterException { if (this.currentOfficeSpreadSheetWriter!=null) { this.currentOfficeSpreadSheetWriter.write(o); } else { throw new OfficeWriterException(EX_NO_WRITER_INSTANTIATED); } }
class class_name[name] begin[{] method[write, return_type[void], modifier[public], parameter[o]] begin[{] if[binary_operation[THIS[member[None.currentOfficeSpreadSheetWriter]], !=, literal[null]]] begin[{] THIS[member[None.currentOfficeSpreadSheetWriter]call[None.write, parameter[member[.o]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=EX_NO_WRITER_INSTANTIATED, 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=OfficeWriterException, sub_type=None)), label=None) end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[write] operator[SEP] identifier[Object] identifier[o] operator[SEP] Keyword[throws] identifier[OfficeWriterException] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[currentOfficeSpreadSheetWriter] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[currentOfficeSpreadSheetWriter] operator[SEP] identifier[write] operator[SEP] identifier[o] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[OfficeWriterException] operator[SEP] identifier[EX_NO_WRITER_INSTANTIATED] operator[SEP] operator[SEP] } }
public static BigInteger fromUnsignedByteArray(byte[] buf, int off, int length) { byte[] mag = buf; if (off != 0 || length != buf.length) { mag = new byte[length]; System.arraycopy(buf, off, mag, 0, length); } return new BigInteger(1, mag); }
class class_name[name] begin[{] method[fromUnsignedByteArray, return_type[type[BigInteger]], modifier[public static], parameter[buf, off, length]] begin[{] local_variable[type[byte], mag] if[binary_operation[binary_operation[member[.off], !=, literal[0]], ||, binary_operation[member[.length], !=, member[buf.length]]]] begin[{] assign[member[.mag], ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] call[System.arraycopy, parameter[member[.buf], member[.off], member[.mag], literal[0], member[.length]]] else begin[{] None end[}] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), MemberReference(member=mag, 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=BigInteger, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[BigInteger] identifier[fromUnsignedByteArray] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[buf] , Keyword[int] identifier[off] , Keyword[int] identifier[length] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[mag] operator[=] identifier[buf] operator[SEP] Keyword[if] operator[SEP] identifier[off] operator[!=] Other[0] operator[||] identifier[length] operator[!=] identifier[buf] operator[SEP] identifier[length] operator[SEP] { identifier[mag] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[buf] , identifier[off] , identifier[mag] , Other[0] , identifier[length] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[BigInteger] operator[SEP] Other[1] , identifier[mag] operator[SEP] operator[SEP] }
@Override protected void initialiseComponentModel() { super.initialiseComponentModel(); // Copy the custom tree (if set) to allow the nodes to be updated per user TreeItemIdNode custom = getCustomTree(); if (custom != null) { TreeItemIdNode copy = TreeItemUtil.copyTreeNode(custom); setCustomTree(copy); } }
class class_name[name] begin[{] method[initialiseComponentModel, return_type[void], modifier[protected], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=initialiseComponentModel, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) local_variable[type[TreeItemIdNode], custom] if[binary_operation[member[.custom], !=, literal[null]]] begin[{] local_variable[type[TreeItemIdNode], copy] call[.setCustomTree, parameter[member[.copy]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[initialiseComponentModel] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[initialiseComponentModel] operator[SEP] operator[SEP] operator[SEP] identifier[TreeItemIdNode] identifier[custom] operator[=] identifier[getCustomTree] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[custom] operator[!=] Other[null] operator[SEP] { identifier[TreeItemIdNode] identifier[copy] operator[=] identifier[TreeItemUtil] operator[SEP] identifier[copyTreeNode] operator[SEP] identifier[custom] operator[SEP] operator[SEP] identifier[setCustomTree] operator[SEP] identifier[copy] operator[SEP] operator[SEP] } }
public FileEntry put( DirectoryEntry parent, String name, byte[] content ) throws IOException { return put( parent, name, new ByteArrayInputStream( content ) ); }
class class_name[name] begin[{] method[put, return_type[type[FileEntry]], modifier[public], parameter[parent, name, content]] begin[{] return[call[.put, parameter[member[.parent], member[.name], ClassCreator(arguments=[MemberReference(member=content, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ByteArrayInputStream, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[FileEntry] identifier[put] operator[SEP] identifier[DirectoryEntry] identifier[parent] , identifier[String] identifier[name] , Keyword[byte] operator[SEP] operator[SEP] identifier[content] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[put] operator[SEP] identifier[parent] , identifier[name] , Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[content] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(BotMetadata botMetadata, ProtocolMarshaller protocolMarshaller) { if (botMetadata == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(botMetadata.getName(), NAME_BINDING); protocolMarshaller.marshall(botMetadata.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(botMetadata.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(botMetadata.getLastUpdatedDate(), LASTUPDATEDDATE_BINDING); protocolMarshaller.marshall(botMetadata.getCreatedDate(), CREATEDDATE_BINDING); protocolMarshaller.marshall(botMetadata.getVersion(), VERSION_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[botMetadata, protocolMarshaller]] begin[{] if[binary_operation[member[.botMetadata], ==, 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=getName, postfix_operators=[], prefix_operators=[], qualifier=botMetadata, selectors=[], type_arguments=None), MemberReference(member=NAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDescription, postfix_operators=[], prefix_operators=[], qualifier=botMetadata, selectors=[], type_arguments=None), MemberReference(member=DESCRIPTION_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=botMetadata, selectors=[], type_arguments=None), MemberReference(member=STATUS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLastUpdatedDate, postfix_operators=[], prefix_operators=[], qualifier=botMetadata, selectors=[], type_arguments=None), MemberReference(member=LASTUPDATEDDATE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCreatedDate, postfix_operators=[], prefix_operators=[], qualifier=botMetadata, selectors=[], type_arguments=None), MemberReference(member=CREATEDDATE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getVersion, postfix_operators=[], prefix_operators=[], qualifier=botMetadata, selectors=[], type_arguments=None), MemberReference(member=VERSION_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[BotMetadata] identifier[botMetadata] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[botMetadata] 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[botMetadata] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[botMetadata] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] , identifier[DESCRIPTION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[botMetadata] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] , identifier[STATUS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[botMetadata] operator[SEP] identifier[getLastUpdatedDate] operator[SEP] operator[SEP] , identifier[LASTUPDATEDDATE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[botMetadata] operator[SEP] identifier[getCreatedDate] operator[SEP] operator[SEP] , identifier[CREATEDDATE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[botMetadata] operator[SEP] identifier[getVersion] operator[SEP] operator[SEP] , identifier[VERSION_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] } }
@SuppressWarnings("static-method") protected boolean isResponsible(Map<Object, Object> context, EObject eObject) { // Skip the validation of an feature call if one of its container was validated previously if (eObject instanceof XMemberFeatureCall || eObject instanceof XFeatureCall) { final XAbstractFeatureCall rootFeatureCall = Utils.getRootFeatureCall((XAbstractFeatureCall) eObject); return !isCheckedFeatureCall(context, rootFeatureCall); } return true; }
class class_name[name] begin[{] method[isResponsible, return_type[type[boolean]], modifier[protected], parameter[context, eObject]] begin[{] if[binary_operation[binary_operation[member[.eObject], instanceof, type[XMemberFeatureCall]], ||, binary_operation[member[.eObject], instanceof, type[XFeatureCall]]]] begin[{] local_variable[type[XAbstractFeatureCall], rootFeatureCall] return[call[.isCheckedFeatureCall, parameter[member[.context], member[.rootFeatureCall]]]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[protected] Keyword[boolean] identifier[isResponsible] operator[SEP] identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[context] , identifier[EObject] identifier[eObject] operator[SEP] { Keyword[if] operator[SEP] identifier[eObject] Keyword[instanceof] identifier[XMemberFeatureCall] operator[||] identifier[eObject] Keyword[instanceof] identifier[XFeatureCall] operator[SEP] { Keyword[final] identifier[XAbstractFeatureCall] identifier[rootFeatureCall] operator[=] identifier[Utils] operator[SEP] identifier[getRootFeatureCall] operator[SEP] operator[SEP] identifier[XAbstractFeatureCall] operator[SEP] identifier[eObject] operator[SEP] operator[SEP] Keyword[return] operator[!] identifier[isCheckedFeatureCall] operator[SEP] identifier[context] , identifier[rootFeatureCall] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public void into(@NonNull RemoteViews remoteViews, @IdRes int viewId, int appWidgetId, @Nullable Callback callback) { into(remoteViews, viewId, new int[] { appWidgetId }, callback); }
class class_name[name] begin[{] method[into, return_type[void], modifier[public], parameter[remoteViews, viewId, appWidgetId, callback]] begin[{] call[.into, parameter[member[.remoteViews], member[.viewId], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=appWidgetId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=int)), member[.callback]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[into] operator[SEP] annotation[@] identifier[NonNull] identifier[RemoteViews] identifier[remoteViews] , annotation[@] identifier[IdRes] Keyword[int] identifier[viewId] , Keyword[int] identifier[appWidgetId] , annotation[@] identifier[Nullable] identifier[Callback] identifier[callback] operator[SEP] { identifier[into] operator[SEP] identifier[remoteViews] , identifier[viewId] , Keyword[new] Keyword[int] operator[SEP] operator[SEP] { identifier[appWidgetId] } , identifier[callback] operator[SEP] operator[SEP] }
public static String collapse(String name) { if (name == null) { return null; } int breakPoint = name.lastIndexOf('.'); if (breakPoint < 0) { return name; } return collapseQualifier(name.substring(0, breakPoint), true) + name.substring(breakPoint); // includes last '.' }
class class_name[name] begin[{] method[collapse, return_type[type[String]], modifier[public static], parameter[name]] begin[{] if[binary_operation[member[.name], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[int], breakPoint] if[binary_operation[member[.breakPoint], <, literal[0]]] begin[{] return[member[.name]] else begin[{] None end[}] return[binary_operation[call[.collapseQualifier, parameter[call[name.substring, parameter[literal[0], member[.breakPoint]]], literal[true]]], +, call[name.substring, parameter[member[.breakPoint]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[collapse] operator[SEP] identifier[String] identifier[name] operator[SEP] { Keyword[if] operator[SEP] identifier[name] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[int] identifier[breakPoint] operator[=] identifier[name] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[breakPoint] operator[<] Other[0] operator[SEP] { Keyword[return] identifier[name] operator[SEP] } Keyword[return] identifier[collapseQualifier] operator[SEP] identifier[name] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[breakPoint] operator[SEP] , literal[boolean] operator[SEP] operator[+] identifier[name] operator[SEP] identifier[substring] operator[SEP] identifier[breakPoint] operator[SEP] operator[SEP] }
private static double scoreToPvalue(double score, int n) { double T= score/Math.sqrt((1-score*score)/(n-2)); return ContinuousDistributions.studentsCdf(T, n-2); }
class class_name[name] begin[{] method[scoreToPvalue, return_type[type[double]], modifier[private static], parameter[score, n]] begin[{] local_variable[type[double], T] return[call[ContinuousDistributions.studentsCdf, parameter[member[.T], binary_operation[member[.n], -, literal[2]]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[double] identifier[scoreToPvalue] operator[SEP] Keyword[double] identifier[score] , Keyword[int] identifier[n] operator[SEP] { Keyword[double] identifier[T] operator[=] identifier[score] operator[/] identifier[Math] operator[SEP] identifier[sqrt] operator[SEP] operator[SEP] Other[1] operator[-] identifier[score] operator[*] identifier[score] operator[SEP] operator[/] operator[SEP] identifier[n] operator[-] Other[2] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[ContinuousDistributions] operator[SEP] identifier[studentsCdf] operator[SEP] identifier[T] , identifier[n] operator[-] Other[2] operator[SEP] operator[SEP] }
public static int cusparseSnnz_compress( cusparseHandle handle, int m, cusparseMatDescr descr, Pointer csrSortedValA, Pointer csrSortedRowPtrA, Pointer nnzPerRow, Pointer nnzC, float tol) { return checkResult(cusparseSnnz_compressNative(handle, m, descr, csrSortedValA, csrSortedRowPtrA, nnzPerRow, nnzC, tol)); }
class class_name[name] begin[{] method[cusparseSnnz_compress, return_type[type[int]], modifier[public static], parameter[handle, m, descr, csrSortedValA, csrSortedRowPtrA, nnzPerRow, nnzC, tol]] begin[{] return[call[.checkResult, parameter[call[.cusparseSnnz_compressNative, parameter[member[.handle], member[.m], member[.descr], member[.csrSortedValA], member[.csrSortedRowPtrA], member[.nnzPerRow], member[.nnzC], member[.tol]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[cusparseSnnz_compress] operator[SEP] identifier[cusparseHandle] identifier[handle] , Keyword[int] identifier[m] , identifier[cusparseMatDescr] identifier[descr] , identifier[Pointer] identifier[csrSortedValA] , identifier[Pointer] identifier[csrSortedRowPtrA] , identifier[Pointer] identifier[nnzPerRow] , identifier[Pointer] identifier[nnzC] , Keyword[float] identifier[tol] operator[SEP] { Keyword[return] identifier[checkResult] operator[SEP] identifier[cusparseSnnz_compressNative] operator[SEP] identifier[handle] , identifier[m] , identifier[descr] , identifier[csrSortedValA] , identifier[csrSortedRowPtrA] , identifier[nnzPerRow] , identifier[nnzC] , identifier[tol] operator[SEP] operator[SEP] operator[SEP] }
public static HashMap<String, ArrayList<String>> getAutoPlantingDate(HashMap data, String eDate, String lDate, String rain, String days) { Map wthData; ArrayList<Map> dailyData; ArrayList<HashMap<String, String>> eventData; Event event; Calendar eDateCal = Calendar.getInstance(); Calendar lDateCal = Calendar.getInstance(); int intDays; int duration; double accRainAmtTotal; double accRainAmt; int expDur; int startYear = 0; Window[] windows; ArrayList<String> pdates = new ArrayList<String>(); HashMap<String, ArrayList<String>> results = new HashMap<String, ArrayList<String>>(); // Check input dates if (!isValidDate(eDate, eDateCal, "-")) { LOG.error("INVALID EARLIST DATE:[" + eDate + "]"); return new HashMap<String, ArrayList<String>>(); } if (!isValidDate(lDate, lDateCal, "-")) { LOG.error("INVALID LATEST DATE:[" + lDate + "]"); return new HashMap<String, ArrayList<String>>(); } if (eDateCal.after(lDateCal)) { lDateCal.set(Calendar.YEAR, lDateCal.get(Calendar.YEAR) + 1); } try { duration = Integer.parseInt(convertMsToDay(lDateCal.getTimeInMillis() - eDateCal.getTimeInMillis())); } catch (Exception e) { duration = 0; } // Check Number of days of accumulation try { intDays = Integer.parseInt(days); } catch (Exception e) { LOG.error("INVALID NUMBER FOR NUMBER OF DAYS OF ACCUMULATION"); return new HashMap<String, ArrayList<String>>(); } if (intDays <= 0) { LOG.error("NON-POSITIVE NUMBER FOR NUMBER OF DAYS OF ACCUMULATION"); return new HashMap<String, ArrayList<String>>(); } // Check Threshold rainfall amount try { accRainAmtTotal = Double.parseDouble(rain); } catch (Exception e) { LOG.error("INVALID NUMBER FOR THRESHOLD RAINFALL AMOUNT"); return new HashMap<String, ArrayList<String>>(); } if (accRainAmtTotal <= 0) { LOG.error("NON-POSITIVE NUMBER FOR THRESHOLD RAINFALL AMOUNT"); return new HashMap<String, ArrayList<String>>(); } // Validation for input parameters // Weather data check and try to get daily data dailyData = WeatherHelper.getDailyData(data); if (dailyData.isEmpty()) { LOG.error("EMPTY DAILY WEATHER DATA."); return new HashMap<String, ArrayList<String>>(); } // Check experiment data // Case for multiple data json structure Map mgnData = getObjectOr(data, "management", new HashMap()); eventData = getObjectOr(mgnData, "events", new ArrayList()); // Remove all planting events, for now, as a default. This is because this generates new replaced planting events. // NOTE: This is the "safest" way to remove items during iteration. // Iterator<HashMap<String, String>> iter = eventData.iterator(); // while (iter.hasNext()) { // if (getValueOr(iter.next(), "event", "").equals("planting")) { // iter.remove(); // } // } // Check EXP_DUR is avalaible try { expDur = Integer.parseInt(getValueOr(data, "exp_dur", "1")); } catch (Exception e) { expDur = 1; } LOG.debug("EXP_DUR FOUND: {}", expDur); // The starting year for multiple year runs may be set with SC_YEAR. if (expDur > 1) { try { startYear = Integer.parseInt(getValueOr(data, "sc_year", "").substring(0, 4)); } catch (Exception e) { LOG.warn("Invalid SC_YEAR: {}", data.get("sc_year")); startYear = -99; } } LOG.debug("START YEAR: {}", startYear); windows = new Window[expDur]; // Check if there is eventData existing if (eventData.isEmpty()) { LOG.warn("EMPTY EVENT DATA."); // event = new Event(new ArrayList(), "planting"); } else { event = new Event(eventData, "planting"); // If only one year is to be simulated, the recorded planting date year will be used (if available). if (expDur == 1) { if (event.isEventExist()) { Map plEvent = event.getCurrentEvent(); try { startYear = Integer.parseInt(getValueOr(plEvent, "date", "").substring(0, 4)); } catch (Exception e) { LOG.warn("Invalid planting date: {}", plEvent.get("date")); startYear = -99; } } else { startYear = -99; } } } int startYearIndex = getStartYearIndex(dailyData, startYear); // If start year is out of weather data range if (startYearIndex == dailyData.size()) { // If one year duration, then use the first year if (expDur == 1) { startYearIndex = 0; } // If multiple year duration, then report error and end function else { LOG.error("THE START YEAR IS OUT OF DATA RANGE (SC_YEAR:[" + startYear + "]) {}", startYearIndex); return new HashMap<String, ArrayList<String>>(); } } // Find the first record which is the ealiest date for the window in each year int end; int start = getDailyRecIndex(dailyData, eDate, startYearIndex, 0); for (int i = 0; i < windows.length; i++) { end = getDailyRecIndex(dailyData, lDate, start, duration); windows[i] = new Window(start, end); if (i + 1 < windows.length) { start = getDailyRecIndex(dailyData, eDate, end, 365 - duration); } } if (windows[0].start == dailyData.size()) { LOG.warn("NO VALID DAILY DATA FOR SEARCH WINDOW"); // return new HashMap<String, ArrayList<String>>(); } // Loop each window to try to find appropriate planting date for (int i = 0; i < windows.length; i++) { // Check first n days int last = Math.min(windows[i].start + intDays, windows[i].end); accRainAmt = 0; for (int j = windows[i].start; j < last; j++) { try { accRainAmt += Double.parseDouble(getValueOr(dailyData.get(j), "rain", "0")); } catch (Exception e) { continue; } if (accRainAmt >= accRainAmtTotal) { LOG.debug("1: " + getValueOr(dailyData.get(j), "w_date", "") + " : " + accRainAmt + ", " + (accRainAmt >= accRainAmtTotal)); //event.updateEvent("date", getValueOr(dailyData.get(j), "w_date", "")); //AcePathfinderUtil.insertValue((HashMap)data, "pdate", getValueOr(dailyData.get(j), "w_date", "")); pdates.add(getValueOr(dailyData.get(j), "w_date", "")); break; } } if (accRainAmt >= accRainAmtTotal) { continue; } // // If the window size is smaller than n // if (last > windows[i].end) { // LOG.info("NO APPROPRIATE DATE WAS FOUND FOR NO." + (i + 1) + " PLANTING EVENT"); // // TODO remove one planting event // // event.removeEvent(); // } // Check following days int outIndex = last; for (int j = last; j <= windows[i].end; j++) { try { accRainAmt -= Double.parseDouble(getValueOr(dailyData.get(j - intDays), "rain", "0")); accRainAmt += Double.parseDouble(getValueOr(dailyData.get(j), "rain", "0")); } catch (Exception e) { continue; } if (accRainAmt >= accRainAmtTotal) { LOG.debug("2:" + getValueOr(dailyData.get(j), "w_date", "") + " : " + accRainAmt + ", " + (accRainAmt >= accRainAmtTotal)); //event.updateEvent("date", getValueOr(dailyData.get(j), "w_date", "")); //AcePathfinderUtil.insertValue((HashMap)data, "pdate", getValueOr(dailyData.get(j), "w_date", "")); pdates.add(getValueOr(dailyData.get(j), "w_date", "")); break; } outIndex++; } if (accRainAmt < accRainAmtTotal) { String lastDay; if (startYear > 0) { lastDay = (startYear + i) + lDate; } else if (windows[i].end >= dailyData.size()) { lastDay = getValueOr(dailyData.get(dailyData.size() - 1), "w_date", ""); } else { lastDay = getValueOr(dailyData.get(windows[i].end), "w_date", ""); } LOG.warn("Could not find an appropriate day to plant, using {}", lastDay); pdates.add(lastDay); } } results.put("pdate", pdates); return results; }
class class_name[name] begin[{] method[getAutoPlantingDate, return_type[type[HashMap]], modifier[public static], parameter[data, eDate, lDate, rain, days]] begin[{] local_variable[type[Map], wthData] local_variable[type[ArrayList], dailyData] local_variable[type[ArrayList], eventData] local_variable[type[Event], event] local_variable[type[Calendar], eDateCal] local_variable[type[Calendar], lDateCal] local_variable[type[int], intDays] local_variable[type[int], duration] local_variable[type[double], accRainAmtTotal] local_variable[type[double], accRainAmt] local_variable[type[int], expDur] local_variable[type[int], startYear] local_variable[type[Window], windows] local_variable[type[ArrayList], pdates] local_variable[type[HashMap], results] if[call[.isValidDate, parameter[member[.eDate], member[.eDateCal], literal["-"]]]] begin[{] call[LOG.error, parameter[binary_operation[binary_operation[literal["INVALID EARLIST DATE:["], +, member[.eDate]], +, literal["]"]]]] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] else begin[{] None end[}] if[call[.isValidDate, parameter[member[.lDate], member[.lDateCal], literal["-"]]]] begin[{] call[LOG.error, parameter[binary_operation[binary_operation[literal["INVALID LATEST DATE:["], +, member[.lDate]], +, literal["]"]]]] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] else begin[{] None end[}] if[call[eDateCal.after, parameter[member[.lDateCal]]]] begin[{] call[lDateCal.set, parameter[member[Calendar.YEAR], binary_operation[call[lDateCal.get, parameter[member[Calendar.YEAR]]], +, literal[1]]]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=duration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTimeInMillis, postfix_operators=[], prefix_operators=[], qualifier=lDateCal, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getTimeInMillis, postfix_operators=[], prefix_operators=[], qualifier=eDateCal, selectors=[], type_arguments=None), operator=-)], member=convertMsToDay, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=duration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=intDays, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=days, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INVALID NUMBER FOR NUMBER OF DAYS OF ACCUMULATION")], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None))], dimensions=None, name=HashMap, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.intDays], <=, literal[0]]] begin[{] call[LOG.error, parameter[literal["NON-POSITIVE NUMBER FOR NUMBER OF DAYS OF ACCUMULATION"]]] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=accRainAmtTotal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=rain, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parseDouble, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INVALID NUMBER FOR THRESHOLD RAINFALL AMOUNT")], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None))], dimensions=None, name=HashMap, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[binary_operation[member[.accRainAmtTotal], <=, literal[0]]] begin[{] call[LOG.error, parameter[literal["NON-POSITIVE NUMBER FOR THRESHOLD RAINFALL AMOUNT"]]] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] else begin[{] None end[}] assign[member[.dailyData], call[WeatherHelper.getDailyData, parameter[member[.data]]]] if[call[dailyData.isEmpty, parameter[]]] begin[{] call[LOG.error, parameter[literal["EMPTY DAILY WEATHER DATA."]]] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] else begin[{] None end[}] local_variable[type[Map], mgnData] assign[member[.eventData], call[.getObjectOr, parameter[member[.mgnData], literal["events"], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ArrayList, sub_type=None))]]] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=expDur, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="exp_dur"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=expDur, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) call[LOG.debug, parameter[literal["EXP_DUR FOUND: {}"], member[.expDur]]] if[binary_operation[member[.expDur], >, literal[1]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=startYear, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="sc_year"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid SC_YEAR: {}"), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="sc_year")], member=get, postfix_operators=[], prefix_operators=[], qualifier=data, selectors=[], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startYear, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=99)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] call[LOG.debug, parameter[literal["START YEAR: {}"], member[.startYear]]] assign[member[.windows], ArrayCreator(dimensions=[MemberReference(member=expDur, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Window, sub_type=None))] if[call[eventData.isEmpty, parameter[]]] begin[{] call[LOG.warn, parameter[literal["EMPTY EVENT DATA."]]] else begin[{] assign[member[.event], ClassCreator(arguments=[MemberReference(member=eventData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="planting")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Event, sub_type=None))] if[binary_operation[member[.expDur], ==, literal[1]]] begin[{] if[call[event.isEventExist, parameter[]]] begin[{] local_variable[type[Map], plEvent] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=startYear, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=plEvent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="date"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=parseInt, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid planting date: {}"), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="date")], member=get, postfix_operators=[], prefix_operators=[], qualifier=plEvent, selectors=[], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=startYear, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=99)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] assign[member[.startYear], literal[99]] end[}] else begin[{] None end[}] end[}] local_variable[type[int], startYearIndex] if[binary_operation[member[.startYearIndex], ==, call[dailyData.size, parameter[]]]] begin[{] if[binary_operation[member[.expDur], ==, literal[1]]] begin[{] assign[member[.startYearIndex], literal[0]] else begin[{] call[LOG.error, parameter[binary_operation[binary_operation[literal["THE START YEAR IS OUT OF DATA RANGE (SC_YEAR:["], +, member[.startYear]], +, literal["]) {}"]], member[.startYearIndex]]] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=ArrayList, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] end[}] else begin[{] None end[}] local_variable[type[int], end] local_variable[type[int], start] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=dailyData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lDate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=duration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDailyRecIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=windows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=end, 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=Window, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=windows, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=dailyData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=eDate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=365), operandr=MemberReference(member=duration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=getDailyRecIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=windows, 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[.windows], ==, call[dailyData.size, parameter[]]]] begin[{] call[LOG.warn, parameter[literal["NO VALID DAILY DATA FOR SEARCH WINDOW"]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=windows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=start, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=intDays, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=windows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=end, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=min, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), name=last)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None), ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=dailyData, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="rain"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=parseDouble, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ContinueStatement(goto=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=accRainAmtTotal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1: "), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=dailyData, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="w_date"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" : "), operator=+), operandr=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=accRainAmtTotal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=dailyData, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="w_date"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=pdates, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=windows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=start, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=accRainAmtTotal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=outIndex)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=intDays, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)], member=get, postfix_operators=[], prefix_operators=[], qualifier=dailyData, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="rain"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=parseDouble, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=dailyData, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="rain"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="0")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=parseDouble, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ContinueStatement(goto=None, label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=accRainAmtTotal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="2:"), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=dailyData, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="w_date"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" : "), operator=+), operandr=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=accRainAmtTotal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operator=+)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=dailyData, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="w_date"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=pdates, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])), StatementExpression(expression=MemberReference(member=outIndex, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=windows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=end, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=last, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=accRainAmt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=accRainAmtTotal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=lastDay)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=startYear, 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=windows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=end, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=dailyData, selectors=[], type_arguments=None), operator=>=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastDay, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=windows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=end, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], member=get, postfix_operators=[], prefix_operators=[], qualifier=dailyData, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="w_date"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastDay, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=dailyData, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)], member=get, postfix_operators=[], prefix_operators=[], qualifier=dailyData, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="w_date"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=getValueOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=lastDay, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=startYear, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=lDate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not find an appropriate day to plant, using {}"), MemberReference(member=lastDay, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warn, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=lastDay, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=pdates, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=windows, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[results.put, parameter[literal["pdate"], member[.pdates]]] return[member[.results]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] identifier[getAutoPlantingDate] operator[SEP] identifier[HashMap] identifier[data] , identifier[String] identifier[eDate] , identifier[String] identifier[lDate] , identifier[String] identifier[rain] , identifier[String] identifier[days] operator[SEP] { identifier[Map] identifier[wthData] operator[SEP] identifier[ArrayList] operator[<] identifier[Map] operator[>] identifier[dailyData] operator[SEP] identifier[ArrayList] operator[<] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[>] identifier[eventData] operator[SEP] identifier[Event] identifier[event] operator[SEP] identifier[Calendar] identifier[eDateCal] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[Calendar] identifier[lDateCal] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[intDays] operator[SEP] Keyword[int] identifier[duration] operator[SEP] Keyword[double] identifier[accRainAmtTotal] operator[SEP] Keyword[double] identifier[accRainAmt] operator[SEP] Keyword[int] identifier[expDur] operator[SEP] Keyword[int] identifier[startYear] operator[=] Other[0] operator[SEP] identifier[Window] operator[SEP] operator[SEP] identifier[windows] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[pdates] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] identifier[results] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isValidDate] operator[SEP] identifier[eDate] , identifier[eDateCal] , literal[String] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[eDate] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[isValidDate] operator[SEP] identifier[lDate] , identifier[lDateCal] , literal[String] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[lDate] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[eDateCal] operator[SEP] identifier[after] operator[SEP] identifier[lDateCal] operator[SEP] operator[SEP] { identifier[lDateCal] operator[SEP] identifier[set] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] , identifier[lDateCal] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[try] { identifier[duration] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[convertMsToDay] operator[SEP] identifier[lDateCal] operator[SEP] identifier[getTimeInMillis] operator[SEP] operator[SEP] operator[-] identifier[eDateCal] operator[SEP] identifier[getTimeInMillis] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[duration] operator[=] Other[0] operator[SEP] } Keyword[try] { identifier[intDays] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[days] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[intDays] operator[<=] Other[0] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[try] { identifier[accRainAmtTotal] operator[=] identifier[Double] operator[SEP] identifier[parseDouble] operator[SEP] identifier[rain] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[accRainAmtTotal] operator[<=] Other[0] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] } identifier[dailyData] operator[=] identifier[WeatherHelper] operator[SEP] identifier[getDailyData] operator[SEP] identifier[data] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dailyData] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] } identifier[Map] identifier[mgnData] operator[=] identifier[getObjectOr] operator[SEP] identifier[data] , literal[String] , Keyword[new] identifier[HashMap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[eventData] operator[=] identifier[getObjectOr] operator[SEP] identifier[mgnData] , literal[String] , Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[expDur] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[getValueOr] operator[SEP] identifier[data] , literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[expDur] operator[=] Other[1] operator[SEP] } identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[expDur] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[expDur] operator[>] Other[1] operator[SEP] { Keyword[try] { identifier[startYear] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[getValueOr] operator[SEP] identifier[data] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[0] , Other[4] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[data] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[startYear] operator[=] operator[-] Other[99] operator[SEP] } } identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[startYear] operator[SEP] operator[SEP] identifier[windows] operator[=] Keyword[new] identifier[Window] operator[SEP] identifier[expDur] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[eventData] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[event] operator[=] Keyword[new] identifier[Event] operator[SEP] identifier[eventData] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[expDur] operator[==] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[event] operator[SEP] identifier[isEventExist] operator[SEP] operator[SEP] operator[SEP] { identifier[Map] identifier[plEvent] operator[=] identifier[event] operator[SEP] identifier[getCurrentEvent] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[startYear] operator[=] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[getValueOr] operator[SEP] identifier[plEvent] , literal[String] , literal[String] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[0] , Other[4] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[plEvent] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[startYear] operator[=] operator[-] Other[99] operator[SEP] } } Keyword[else] { identifier[startYear] operator[=] operator[-] Other[99] operator[SEP] } } } Keyword[int] identifier[startYearIndex] operator[=] identifier[getStartYearIndex] operator[SEP] identifier[dailyData] , identifier[startYear] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[startYearIndex] operator[==] identifier[dailyData] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[expDur] operator[==] Other[1] operator[SEP] { identifier[startYearIndex] operator[=] Other[0] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[+] identifier[startYear] operator[+] literal[String] , identifier[startYearIndex] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ArrayList] operator[<] identifier[String] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] } } Keyword[int] identifier[end] operator[SEP] Keyword[int] identifier[start] operator[=] identifier[getDailyRecIndex] operator[SEP] identifier[dailyData] , identifier[eDate] , identifier[startYearIndex] , Other[0] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[windows] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[end] operator[=] identifier[getDailyRecIndex] operator[SEP] identifier[dailyData] , identifier[lDate] , identifier[start] , identifier[duration] operator[SEP] operator[SEP] identifier[windows] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[Window] operator[SEP] identifier[start] , identifier[end] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[+] Other[1] operator[<] identifier[windows] operator[SEP] identifier[length] operator[SEP] { identifier[start] operator[=] identifier[getDailyRecIndex] operator[SEP] identifier[dailyData] , identifier[eDate] , identifier[end] , Other[365] operator[-] identifier[duration] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[windows] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[start] operator[==] identifier[dailyData] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[windows] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[last] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[windows] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[start] operator[+] identifier[intDays] , identifier[windows] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[end] operator[SEP] operator[SEP] identifier[accRainAmt] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[windows] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[start] operator[SEP] identifier[j] operator[<] identifier[last] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[try] { identifier[accRainAmt] operator[+=] identifier[Double] operator[SEP] identifier[parseDouble] operator[SEP] identifier[getValueOr] operator[SEP] identifier[dailyData] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[accRainAmt] operator[>=] identifier[accRainAmtTotal] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[getValueOr] operator[SEP] identifier[dailyData] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[+] identifier[accRainAmt] operator[+] literal[String] operator[+] operator[SEP] identifier[accRainAmt] operator[>=] identifier[accRainAmtTotal] operator[SEP] operator[SEP] operator[SEP] identifier[pdates] operator[SEP] identifier[add] operator[SEP] identifier[getValueOr] operator[SEP] identifier[dailyData] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[accRainAmt] operator[>=] identifier[accRainAmtTotal] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[int] identifier[outIndex] operator[=] identifier[last] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] identifier[last] operator[SEP] identifier[j] operator[<=] identifier[windows] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[end] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[try] { identifier[accRainAmt] operator[-=] identifier[Double] operator[SEP] identifier[parseDouble] operator[SEP] identifier[getValueOr] operator[SEP] identifier[dailyData] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[-] identifier[intDays] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[accRainAmt] operator[+=] identifier[Double] operator[SEP] identifier[parseDouble] operator[SEP] identifier[getValueOr] operator[SEP] identifier[dailyData] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[if] operator[SEP] identifier[accRainAmt] operator[>=] identifier[accRainAmtTotal] operator[SEP] { identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[getValueOr] operator[SEP] identifier[dailyData] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[+] literal[String] operator[+] identifier[accRainAmt] operator[+] literal[String] operator[+] operator[SEP] identifier[accRainAmt] operator[>=] identifier[accRainAmtTotal] operator[SEP] operator[SEP] operator[SEP] identifier[pdates] operator[SEP] identifier[add] operator[SEP] identifier[getValueOr] operator[SEP] identifier[dailyData] operator[SEP] identifier[get] operator[SEP] identifier[j] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } identifier[outIndex] operator[++] operator[SEP] } Keyword[if] operator[SEP] identifier[accRainAmt] operator[<] identifier[accRainAmtTotal] operator[SEP] { identifier[String] identifier[lastDay] operator[SEP] Keyword[if] operator[SEP] identifier[startYear] operator[>] Other[0] operator[SEP] { identifier[lastDay] operator[=] operator[SEP] identifier[startYear] operator[+] identifier[i] operator[SEP] operator[+] identifier[lDate] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[windows] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[end] operator[>=] identifier[dailyData] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] { identifier[lastDay] operator[=] identifier[getValueOr] operator[SEP] identifier[dailyData] operator[SEP] identifier[get] operator[SEP] identifier[dailyData] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[-] Other[1] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[lastDay] operator[=] identifier[getValueOr] operator[SEP] identifier[dailyData] operator[SEP] identifier[get] operator[SEP] identifier[windows] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[end] operator[SEP] , literal[String] , literal[String] operator[SEP] operator[SEP] } identifier[LOG] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[lastDay] operator[SEP] operator[SEP] identifier[pdates] operator[SEP] identifier[add] operator[SEP] identifier[lastDay] operator[SEP] operator[SEP] } } identifier[results] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[pdates] operator[SEP] operator[SEP] Keyword[return] identifier[results] operator[SEP] }
@Nullable public static StaticImportInfo tryCreate(ImportTree tree, VisitorState state) { if (!tree.isStatic()) { return null; } if (!(tree.getQualifiedIdentifier() instanceof JCTree.JCFieldAccess)) { return null; } JCTree.JCFieldAccess access = (JCTree.JCFieldAccess) tree.getQualifiedIdentifier(); Name identifier = access.getIdentifier(); if (identifier.contentEquals("*")) { // Java doesn't allow non-canonical types inside wildcard imports, // so there's nothing to do here. return null; } Symbol importedType = ASTHelpers.getSymbol(access.getExpression()); if (importedType == null) { return null; } Types types = state.getTypes(); Type canonicalType = types.erasure(importedType.asType()); if (canonicalType == null) { return null; } Symbol.TypeSymbol baseType; { Symbol sym = ASTHelpers.getSymbol(access.getExpression()); if (!(sym instanceof Symbol.TypeSymbol)) { return null; } baseType = (Symbol.TypeSymbol) sym; } Symbol.PackageSymbol pkgSym = ((JCTree.JCCompilationUnit) state.getPath().getCompilationUnit()).packge; ImmutableSet<Symbol> members = lookup(baseType, baseType, identifier, types, pkgSym); if (members.isEmpty()) { return null; } /* Find the most specific subtype that defines one of the members that is imported. * TODO(gak): we should instead find the most specific subtype with a member that is _used_ */ Type canonicalOwner = null; for (Symbol member : members) { Type owner = types.erasure(member.owner.type); if (canonicalOwner == null || types.isSubtype(owner, canonicalOwner)) { canonicalOwner = owner; } } if (canonicalOwner == null) { return null; } if (members.size() == 1 && getOnlyElement(members) instanceof ClassSymbol) { return StaticImportInfo.create(access.toString(), getOnlyElement(members).toString()); } return StaticImportInfo.create( access.getExpression().toString(), canonicalOwner.toString(), identifier.toString(), members); }
class class_name[name] begin[{] method[tryCreate, return_type[type[StaticImportInfo]], modifier[public static], parameter[tree, state]] begin[{] if[call[tree.isStatic, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[call[tree.getQualifiedIdentifier, parameter[]], instanceof, type[JCTree]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[JCTree], access] local_variable[type[Name], identifier] if[call[identifier.contentEquals, parameter[literal["*"]]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Symbol], importedType] if[binary_operation[member[.importedType], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Types], types] local_variable[type[Type], canonicalType] if[binary_operation[member[.canonicalType], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Symbol], baseType] local_variable[type[Symbol], sym] if[binary_operation[member[.sym], instanceof, type[Symbol]]] begin[{] return[literal[null]] else begin[{] None end[}] assign[member[.baseType], Cast(expression=MemberReference(member=sym, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Symbol, sub_type=ReferenceType(arguments=None, dimensions=None, name=TypeSymbol, sub_type=None)))] local_variable[type[Symbol], pkgSym] local_variable[type[ImmutableSet], members] if[call[members.isEmpty, parameter[]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Type], canonicalOwner] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=member.owner, selectors=[])], member=erasure, postfix_operators=[], prefix_operators=[], qualifier=types, selectors=[], type_arguments=None), name=owner)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Type, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=canonicalOwner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=MethodInvocation(arguments=[MemberReference(member=owner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=canonicalOwner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isSubtype, postfix_operators=[], prefix_operators=[], qualifier=types, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=canonicalOwner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=owner, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=members, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=member)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Symbol, sub_type=None))), label=None) if[binary_operation[member[.canonicalOwner], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[binary_operation[call[members.size, parameter[]], ==, literal[1]], &&, binary_operation[call[.getOnlyElement, parameter[member[.members]]], instanceof, type[ClassSymbol]]]] begin[{] return[call[StaticImportInfo.create, parameter[call[access.toString, parameter[]], call[.getOnlyElement, parameter[member[.members]]]]]] else begin[{] None end[}] return[call[StaticImportInfo.create, parameter[call[access.getExpression, parameter[]], call[canonicalOwner.toString, parameter[]], call[identifier.toString, parameter[]], member[.members]]]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[StaticImportInfo] identifier[tryCreate] operator[SEP] identifier[ImportTree] identifier[tree] , identifier[VisitorState] identifier[state] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[tree] operator[SEP] identifier[isStatic] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[tree] operator[SEP] identifier[getQualifiedIdentifier] operator[SEP] operator[SEP] Keyword[instanceof] identifier[JCTree] operator[SEP] identifier[JCFieldAccess] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[JCTree] operator[SEP] identifier[JCFieldAccess] identifier[access] operator[=] operator[SEP] identifier[JCTree] operator[SEP] identifier[JCFieldAccess] operator[SEP] identifier[tree] operator[SEP] identifier[getQualifiedIdentifier] operator[SEP] operator[SEP] operator[SEP] identifier[Name] identifier[identifier] operator[=] identifier[access] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[identifier] operator[SEP] identifier[contentEquals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[Symbol] identifier[importedType] operator[=] identifier[ASTHelpers] operator[SEP] identifier[getSymbol] operator[SEP] identifier[access] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[importedType] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[Types] identifier[types] operator[=] identifier[state] operator[SEP] identifier[getTypes] operator[SEP] operator[SEP] operator[SEP] identifier[Type] identifier[canonicalType] operator[=] identifier[types] operator[SEP] identifier[erasure] operator[SEP] identifier[importedType] operator[SEP] identifier[asType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[canonicalType] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[Symbol] operator[SEP] identifier[TypeSymbol] identifier[baseType] operator[SEP] { identifier[Symbol] identifier[sym] operator[=] identifier[ASTHelpers] operator[SEP] identifier[getSymbol] operator[SEP] identifier[access] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[sym] Keyword[instanceof] identifier[Symbol] operator[SEP] identifier[TypeSymbol] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[baseType] operator[=] operator[SEP] identifier[Symbol] operator[SEP] identifier[TypeSymbol] operator[SEP] identifier[sym] operator[SEP] } identifier[Symbol] operator[SEP] identifier[PackageSymbol] identifier[pkgSym] operator[=] operator[SEP] operator[SEP] identifier[JCTree] operator[SEP] identifier[JCCompilationUnit] operator[SEP] identifier[state] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] identifier[getCompilationUnit] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[packge] operator[SEP] identifier[ImmutableSet] operator[<] identifier[Symbol] operator[>] identifier[members] operator[=] identifier[lookup] operator[SEP] identifier[baseType] , identifier[baseType] , identifier[identifier] , identifier[types] , identifier[pkgSym] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[members] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[Type] identifier[canonicalOwner] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Symbol] identifier[member] operator[:] identifier[members] operator[SEP] { identifier[Type] identifier[owner] operator[=] identifier[types] operator[SEP] identifier[erasure] operator[SEP] identifier[member] operator[SEP] identifier[owner] operator[SEP] identifier[type] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[canonicalOwner] operator[==] Other[null] operator[||] identifier[types] operator[SEP] identifier[isSubtype] operator[SEP] identifier[owner] , identifier[canonicalOwner] operator[SEP] operator[SEP] { identifier[canonicalOwner] operator[=] identifier[owner] operator[SEP] } } Keyword[if] operator[SEP] identifier[canonicalOwner] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[members] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[&&] identifier[getOnlyElement] operator[SEP] identifier[members] operator[SEP] Keyword[instanceof] identifier[ClassSymbol] operator[SEP] { Keyword[return] identifier[StaticImportInfo] operator[SEP] identifier[create] operator[SEP] identifier[access] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[getOnlyElement] operator[SEP] identifier[members] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[StaticImportInfo] operator[SEP] identifier[create] operator[SEP] identifier[access] operator[SEP] identifier[getExpression] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[canonicalOwner] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[identifier] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[members] operator[SEP] operator[SEP] }
public void unsetSla() { boolean oldSla = sla; boolean oldSlaESet = slaESet; sla = SLA_EDEFAULT; slaESet = false; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.UNSET, BpsimPackage.PARAMETER__SLA, oldSla, SLA_EDEFAULT, oldSlaESet)); }
class class_name[name] begin[{] method[unsetSla, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[boolean], oldSla] local_variable[type[boolean], oldSlaESet] assign[member[.sla], member[.SLA_EDEFAULT]] assign[member[.slaESet], literal[false]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=UNSET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=PARAMETER__SLA, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, selectors=[]), MemberReference(member=oldSla, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=SLA_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=oldSlaESet, 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[}]
Keyword[public] Keyword[void] identifier[unsetSla] operator[SEP] operator[SEP] { Keyword[boolean] identifier[oldSla] operator[=] identifier[sla] operator[SEP] Keyword[boolean] identifier[oldSlaESet] operator[=] identifier[slaESet] operator[SEP] identifier[sla] operator[=] identifier[SLA_EDEFAULT] operator[SEP] identifier[slaESet] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[eNotificationRequired] operator[SEP] operator[SEP] operator[SEP] identifier[eNotify] operator[SEP] Keyword[new] identifier[ENotificationImpl] operator[SEP] Keyword[this] , identifier[Notification] operator[SEP] identifier[UNSET] , identifier[BpsimPackage] operator[SEP] identifier[PARAMETER__SLA] , identifier[oldSla] , identifier[SLA_EDEFAULT] , identifier[oldSlaESet] operator[SEP] operator[SEP] operator[SEP] }
public static int secondsDiff(Date earlierDate, Date laterDate) { if (earlierDate == null || laterDate == null) { return 0; } return (int) ((laterDate.getTime() / SECOND_MILLIS) - (earlierDate.getTime() / SECOND_MILLIS)); }
class class_name[name] begin[{] method[secondsDiff, return_type[type[int]], modifier[public static], parameter[earlierDate, laterDate]] begin[{] if[binary_operation[binary_operation[member[.earlierDate], ==, literal[null]], ||, binary_operation[member[.laterDate], ==, literal[null]]]] begin[{] return[literal[0]] else begin[{] None end[}] return[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTime, postfix_operators=[], prefix_operators=[], qualifier=laterDate, selectors=[], type_arguments=None), operandr=MemberReference(member=SECOND_MILLIS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getTime, postfix_operators=[], prefix_operators=[], qualifier=earlierDate, selectors=[], type_arguments=None), operandr=MemberReference(member=SECOND_MILLIS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), operator=-), type=BasicType(dimensions=[], name=int))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[secondsDiff] operator[SEP] identifier[Date] identifier[earlierDate] , identifier[Date] identifier[laterDate] operator[SEP] { Keyword[if] operator[SEP] identifier[earlierDate] operator[==] Other[null] operator[||] identifier[laterDate] operator[==] Other[null] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[return] operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] identifier[laterDate] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[/] identifier[SECOND_MILLIS] operator[SEP] operator[-] operator[SEP] identifier[earlierDate] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[/] identifier[SECOND_MILLIS] operator[SEP] operator[SEP] operator[SEP] }
public TaskAddOptions withOcpDate(DateTime ocpDate) { if (ocpDate == null) { this.ocpDate = null; } else { this.ocpDate = new DateTimeRfc1123(ocpDate); } return this; }
class class_name[name] begin[{] method[withOcpDate, return_type[type[TaskAddOptions]], modifier[public], parameter[ocpDate]] begin[{] if[binary_operation[member[.ocpDate], ==, literal[null]]] begin[{] assign[THIS[member[None.ocpDate]], literal[null]] else begin[{] assign[THIS[member[None.ocpDate]], ClassCreator(arguments=[MemberReference(member=ocpDate, 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=DateTimeRfc1123, sub_type=None))] end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[TaskAddOptions] identifier[withOcpDate] operator[SEP] identifier[DateTime] identifier[ocpDate] operator[SEP] { Keyword[if] operator[SEP] identifier[ocpDate] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[ocpDate] operator[=] Other[null] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[ocpDate] operator[=] Keyword[new] identifier[DateTimeRfc1123] operator[SEP] identifier[ocpDate] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
@Override public <T extends IChemObject> T read(T object) throws CDKException { if (object instanceof IReaction) { return (T) readReaction(object.getBuilder()); } else if (object instanceof IReactionSet) { IReactionSet reactionSet = object.getBuilder().newInstance(IReactionSet.class); reactionSet.addReaction(readReaction(object.getBuilder())); return (T) reactionSet; } else if (object instanceof IChemModel) { IChemModel model = object.getBuilder().newInstance(IChemModel.class); IReactionSet reactionSet = object.getBuilder().newInstance(IReactionSet.class); reactionSet.addReaction(readReaction(object.getBuilder())); model.setReactionSet(reactionSet); return (T) model; } else if (object instanceof IChemFile) { IChemFile chemFile = object.getBuilder().newInstance(IChemFile.class); IChemSequence sequence = object.getBuilder().newInstance(IChemSequence.class); sequence.addChemModel((IChemModel) read(object.getBuilder().newInstance(IChemModel.class))); chemFile.addChemSequence(sequence); return (T) chemFile; } else { throw new CDKException("Only supported are Reaction and ChemModel, and not " + object.getClass().getName() + "."); } }
class class_name[name] begin[{] method[read, return_type[type[T]], modifier[public], parameter[object]] begin[{] if[binary_operation[member[.object], instanceof, type[IReaction]]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBuilder, postfix_operators=[], prefix_operators=[], qualifier=object, selectors=[], type_arguments=None)], member=readReaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))] else begin[{] if[binary_operation[member[.object], instanceof, type[IReactionSet]]] begin[{] local_variable[type[IReactionSet], reactionSet] call[reactionSet.addReaction, parameter[call[.readReaction, parameter[call[object.getBuilder, parameter[]]]]]] return[Cast(expression=MemberReference(member=reactionSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))] else begin[{] if[binary_operation[member[.object], instanceof, type[IChemModel]]] begin[{] local_variable[type[IChemModel], model] local_variable[type[IReactionSet], reactionSet] call[reactionSet.addReaction, parameter[call[.readReaction, parameter[call[object.getBuilder, parameter[]]]]]] call[model.setReactionSet, parameter[member[.reactionSet]]] return[Cast(expression=MemberReference(member=model, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))] else begin[{] if[binary_operation[member[.object], instanceof, type[IChemFile]]] begin[{] local_variable[type[IChemFile], chemFile] local_variable[type[IChemSequence], sequence] call[sequence.addChemModel, parameter[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBuilder, postfix_operators=[], prefix_operators=[], qualifier=object, selectors=[MethodInvocation(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IChemModel, sub_type=None))], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=read, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=IChemModel, sub_type=None))]] call[chemFile.addChemSequence, parameter[member[.sequence]]] return[Cast(expression=MemberReference(member=chemFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Only supported are Reaction and ChemModel, and not "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=object, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="."), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CDKException, sub_type=None)), label=None) end[}] end[}] end[}] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[IChemObject] operator[>] identifier[T] identifier[read] operator[SEP] identifier[T] identifier[object] operator[SEP] Keyword[throws] identifier[CDKException] { Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[IReaction] operator[SEP] { Keyword[return] operator[SEP] identifier[T] operator[SEP] identifier[readReaction] operator[SEP] identifier[object] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[IReactionSet] operator[SEP] { identifier[IReactionSet] identifier[reactionSet] operator[=] identifier[object] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IReactionSet] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[reactionSet] operator[SEP] identifier[addReaction] operator[SEP] identifier[readReaction] operator[SEP] identifier[object] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[T] operator[SEP] identifier[reactionSet] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[IChemModel] operator[SEP] { identifier[IChemModel] identifier[model] operator[=] identifier[object] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IChemModel] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[IReactionSet] identifier[reactionSet] operator[=] identifier[object] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IReactionSet] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[reactionSet] operator[SEP] identifier[addReaction] operator[SEP] identifier[readReaction] operator[SEP] identifier[object] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[model] operator[SEP] identifier[setReactionSet] operator[SEP] identifier[reactionSet] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[T] operator[SEP] identifier[model] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[IChemFile] operator[SEP] { identifier[IChemFile] identifier[chemFile] operator[=] identifier[object] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IChemFile] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[IChemSequence] identifier[sequence] operator[=] identifier[object] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IChemSequence] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[sequence] operator[SEP] identifier[addChemModel] operator[SEP] operator[SEP] identifier[IChemModel] operator[SEP] identifier[read] operator[SEP] identifier[object] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IChemModel] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[chemFile] operator[SEP] identifier[addChemSequence] operator[SEP] identifier[sequence] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[T] operator[SEP] identifier[chemFile] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[CDKException] operator[SEP] literal[String] operator[+] identifier[object] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } }
private <T> T convertObject(byte[] json, Class<T> claz) throws IOException { TypeReference<RestSuccessResult<Map<?, ?>>> typeReference = new TypeReference<RestSuccessResult<Map<?, ?>>>() { }; RestSuccessResult<T> successResponse = MAPPER.readValue(json, typeReference); Map<?, ?> data = (Map<?, ?>) successResponse.getData(); return MAPPER.convertValue(data, claz); }
class class_name[name] begin[{] method[convertObject, return_type[type[T]], modifier[private], parameter[json, claz]] begin[{] local_variable[type[TypeReference], typeReference] local_variable[type[RestSuccessResult], successResponse] local_variable[type[Map], data] return[call[MAPPER.convertValue, parameter[member[.data], member[.claz]]]] end[}] END[}]
Keyword[private] operator[<] identifier[T] operator[>] identifier[T] identifier[convertObject] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[json] , identifier[Class] operator[<] identifier[T] operator[>] identifier[claz] operator[SEP] Keyword[throws] identifier[IOException] { identifier[TypeReference] operator[<] identifier[RestSuccessResult] operator[<] identifier[Map] operator[<] operator[?] , operator[?] operator[>] operator[>] operator[>] identifier[typeReference] operator[=] Keyword[new] identifier[TypeReference] operator[<] identifier[RestSuccessResult] operator[<] identifier[Map] operator[<] operator[?] , operator[?] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[RestSuccessResult] operator[<] identifier[T] operator[>] identifier[successResponse] operator[=] identifier[MAPPER] operator[SEP] identifier[readValue] operator[SEP] identifier[json] , identifier[typeReference] operator[SEP] operator[SEP] identifier[Map] operator[<] operator[?] , operator[?] operator[>] identifier[data] operator[=] operator[SEP] identifier[Map] operator[<] operator[?] , operator[?] operator[>] operator[SEP] identifier[successResponse] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[MAPPER] operator[SEP] identifier[convertValue] operator[SEP] identifier[data] , identifier[claz] operator[SEP] operator[SEP] }
public static base_responses expire(nitro_service client, cachecontentgroup resources[]) throws Exception { base_responses result = null; if (resources != null && resources.length > 0) { cachecontentgroup expireresources[] = new cachecontentgroup[resources.length]; for (int i=0;i<resources.length;i++){ expireresources[i] = new cachecontentgroup(); expireresources[i].name = resources[i].name; } result = perform_operation_bulk_request(client, expireresources,"expire"); } return result; }
class class_name[name] begin[{] method[expire, return_type[type[base_responses]], modifier[public static], parameter[client, resources]] begin[{] local_variable[type[base_responses], result] if[binary_operation[binary_operation[member[.resources], !=, literal[null]], &&, binary_operation[member[resources.length], >, literal[0]]]] begin[{] local_variable[type[cachecontentgroup], expireresources] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=expireresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=cachecontentgroup, sub_type=None))), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=expireresources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=resources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=resources, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) assign[member[.result], call[.perform_operation_bulk_request, parameter[member[.client], member[.expireresources], literal["expire"]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_responses] identifier[expire] operator[SEP] identifier[nitro_service] identifier[client] , identifier[cachecontentgroup] identifier[resources] operator[SEP] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[base_responses] identifier[result] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[resources] operator[!=] Other[null] operator[&&] identifier[resources] operator[SEP] identifier[length] operator[>] Other[0] operator[SEP] { identifier[cachecontentgroup] identifier[expireresources] operator[SEP] operator[SEP] operator[=] Keyword[new] identifier[cachecontentgroup] operator[SEP] identifier[resources] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[resources] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[expireresources] operator[SEP] identifier[i] operator[SEP] operator[=] Keyword[new] identifier[cachecontentgroup] operator[SEP] operator[SEP] operator[SEP] identifier[expireresources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[name] operator[=] identifier[resources] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[name] operator[SEP] } identifier[result] operator[=] identifier[perform_operation_bulk_request] operator[SEP] identifier[client] , identifier[expireresources] , literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public static int startsWith(String str, String[] arr) { if ( arr == null ) { return -1; } for ( int i = 0; i < arr.length; i++ ) { if ( arr[i].startsWith(str) ) { return i; } } return -1; }
class class_name[name] begin[{] method[startsWith, return_type[type[int]], modifier[public static], parameter[str, arr]] begin[{] if[binary_operation[member[.arr], ==, literal[null]]] begin[{] return[literal[1]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MemberReference(member=arr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=arr, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[1]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[startsWith] operator[SEP] identifier[String] identifier[str] , identifier[String] operator[SEP] operator[SEP] identifier[arr] operator[SEP] { Keyword[if] operator[SEP] identifier[arr] operator[==] Other[null] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[arr] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[arr] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] identifier[str] operator[SEP] operator[SEP] { Keyword[return] identifier[i] operator[SEP] } } Keyword[return] operator[-] Other[1] operator[SEP] }
public MockMvcRequestSpecBuilder addResultHandlers(ResultHandler resultHandler, ResultHandler... additionalResultHandlers) { spec.resultHandlers(resultHandler, additionalResultHandlers); return this; }
class class_name[name] begin[{] method[addResultHandlers, return_type[type[MockMvcRequestSpecBuilder]], modifier[public], parameter[resultHandler, additionalResultHandlers]] begin[{] call[spec.resultHandlers, parameter[member[.resultHandler], member[.additionalResultHandlers]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[MockMvcRequestSpecBuilder] identifier[addResultHandlers] operator[SEP] identifier[ResultHandler] identifier[resultHandler] , identifier[ResultHandler] operator[...] identifier[additionalResultHandlers] operator[SEP] { identifier[spec] operator[SEP] identifier[resultHandlers] operator[SEP] identifier[resultHandler] , identifier[additionalResultHandlers] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void marshall(CreateJobRequest createJobRequest, ProtocolMarshaller protocolMarshaller) { if (createJobRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createJobRequest.getName(), NAME_BINDING); protocolMarshaller.marshall(createJobRequest.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(createJobRequest.getLogUri(), LOGURI_BINDING); protocolMarshaller.marshall(createJobRequest.getRole(), ROLE_BINDING); protocolMarshaller.marshall(createJobRequest.getExecutionProperty(), EXECUTIONPROPERTY_BINDING); protocolMarshaller.marshall(createJobRequest.getCommand(), COMMAND_BINDING); protocolMarshaller.marshall(createJobRequest.getDefaultArguments(), DEFAULTARGUMENTS_BINDING); protocolMarshaller.marshall(createJobRequest.getConnections(), CONNECTIONS_BINDING); protocolMarshaller.marshall(createJobRequest.getMaxRetries(), MAXRETRIES_BINDING); protocolMarshaller.marshall(createJobRequest.getAllocatedCapacity(), ALLOCATEDCAPACITY_BINDING); protocolMarshaller.marshall(createJobRequest.getTimeout(), TIMEOUT_BINDING); protocolMarshaller.marshall(createJobRequest.getMaxCapacity(), MAXCAPACITY_BINDING); protocolMarshaller.marshall(createJobRequest.getNotificationProperty(), NOTIFICATIONPROPERTY_BINDING); protocolMarshaller.marshall(createJobRequest.getWorkerType(), WORKERTYPE_BINDING); protocolMarshaller.marshall(createJobRequest.getNumberOfWorkers(), NUMBEROFWORKERS_BINDING); protocolMarshaller.marshall(createJobRequest.getSecurityConfiguration(), SECURITYCONFIGURATION_BINDING); protocolMarshaller.marshall(createJobRequest.getTags(), TAGS_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[createJobRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.createJobRequest], ==, 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=getName, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=NAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDescription, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=DESCRIPTION_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLogUri, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=LOGURI_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRole, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=ROLE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getExecutionProperty, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=EXECUTIONPROPERTY_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCommand, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=COMMAND_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDefaultArguments, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=DEFAULTARGUMENTS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getConnections, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=CONNECTIONS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMaxRetries, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=MAXRETRIES_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getAllocatedCapacity, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=ALLOCATEDCAPACITY_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTimeout, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=TIMEOUT_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMaxCapacity, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=MAXCAPACITY_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNotificationProperty, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=NOTIFICATIONPROPERTY_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getWorkerType, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=WORKERTYPE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNumberOfWorkers, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=NUMBEROFWORKERS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSecurityConfiguration, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=SECURITYCONFIGURATION_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTags, postfix_operators=[], prefix_operators=[], qualifier=createJobRequest, selectors=[], type_arguments=None), MemberReference(member=TAGS_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[CreateJobRequest] identifier[createJobRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[createJobRequest] 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[createJobRequest] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[NAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] , identifier[DESCRIPTION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getLogUri] operator[SEP] operator[SEP] , identifier[LOGURI_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getRole] operator[SEP] operator[SEP] , identifier[ROLE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getExecutionProperty] operator[SEP] operator[SEP] , identifier[EXECUTIONPROPERTY_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getCommand] operator[SEP] operator[SEP] , identifier[COMMAND_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getDefaultArguments] operator[SEP] operator[SEP] , identifier[DEFAULTARGUMENTS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getConnections] operator[SEP] operator[SEP] , identifier[CONNECTIONS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getMaxRetries] operator[SEP] operator[SEP] , identifier[MAXRETRIES_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getAllocatedCapacity] operator[SEP] operator[SEP] , identifier[ALLOCATEDCAPACITY_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getTimeout] operator[SEP] operator[SEP] , identifier[TIMEOUT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getMaxCapacity] operator[SEP] operator[SEP] , identifier[MAXCAPACITY_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getNotificationProperty] operator[SEP] operator[SEP] , identifier[NOTIFICATIONPROPERTY_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getWorkerType] operator[SEP] operator[SEP] , identifier[WORKERTYPE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getNumberOfWorkers] operator[SEP] operator[SEP] , identifier[NUMBEROFWORKERS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getSecurityConfiguration] operator[SEP] operator[SEP] , identifier[SECURITYCONFIGURATION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[createJobRequest] operator[SEP] identifier[getTags] operator[SEP] operator[SEP] , identifier[TAGS_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] } }
void unlinkEntry(FatLfnDirectoryEntry entry) { final ShortName sn = entry.realEntry.getShortName(); if (sn.equals(ShortName.DOT) || sn.equals(ShortName.DOT_DOT)) throw new IllegalArgumentException( "the dot entries can not be removed"); final String lowerName = entry.getName().toLowerCase(Locale.ROOT); assert (this.longNameIndex.containsKey(lowerName)); this.longNameIndex.remove(lowerName); assert (this.shortNameIndex.containsKey(sn)); this.shortNameIndex.remove(sn); this.usedNames.remove(sn.asSimpleString().toLowerCase(Locale.ROOT)); assert (this.usedNames.contains(lowerName)); this.usedNames.remove(lowerName); if (entry.isFile()) { this.entryToFile.remove(entry.realEntry); } else { this.entryToDirectory.remove(entry.realEntry); } }
class class_name[name] begin[{] method[unlinkEntry, return_type[void], modifier[default], parameter[entry]] begin[{] local_variable[type[ShortName], sn] if[binary_operation[call[sn.equals, parameter[member[ShortName.DOT]]], ||, call[sn.equals, parameter[member[ShortName.DOT_DOT]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="the dot entries can not be removed")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], lowerName] AssertStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), label=None, value=None) THIS[member[None.longNameIndex]call[None.remove, parameter[member[.lowerName]]]] AssertStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), label=None, value=None) THIS[member[None.shortNameIndex]call[None.remove, parameter[member[.sn]]]] THIS[member[None.usedNames]call[None.remove, parameter[call[sn.asSimpleString, parameter[]]]]] AssertStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), label=None, value=None) THIS[member[None.usedNames]call[None.remove, parameter[member[.lowerName]]]] if[call[entry.isFile, parameter[]]] begin[{] THIS[member[None.entryToFile]call[None.remove, parameter[member[entry.realEntry]]]] else begin[{] THIS[member[None.entryToDirectory]call[None.remove, parameter[member[entry.realEntry]]]] end[}] end[}] END[}]
Keyword[void] identifier[unlinkEntry] operator[SEP] identifier[FatLfnDirectoryEntry] identifier[entry] operator[SEP] { Keyword[final] identifier[ShortName] identifier[sn] operator[=] identifier[entry] operator[SEP] identifier[realEntry] operator[SEP] identifier[getShortName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sn] operator[SEP] identifier[equals] operator[SEP] identifier[ShortName] operator[SEP] identifier[DOT] operator[SEP] operator[||] identifier[sn] operator[SEP] identifier[equals] operator[SEP] identifier[ShortName] operator[SEP] identifier[DOT_DOT] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[lowerName] operator[=] identifier[entry] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[ROOT] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] Keyword[this] operator[SEP] identifier[longNameIndex] operator[SEP] identifier[containsKey] operator[SEP] identifier[lowerName] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[longNameIndex] operator[SEP] identifier[remove] operator[SEP] identifier[lowerName] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] Keyword[this] operator[SEP] identifier[shortNameIndex] operator[SEP] identifier[containsKey] operator[SEP] identifier[sn] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[shortNameIndex] operator[SEP] identifier[remove] operator[SEP] identifier[sn] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[usedNames] operator[SEP] identifier[remove] operator[SEP] identifier[sn] operator[SEP] identifier[asSimpleString] operator[SEP] operator[SEP] operator[SEP] identifier[toLowerCase] operator[SEP] identifier[Locale] operator[SEP] identifier[ROOT] operator[SEP] operator[SEP] operator[SEP] Keyword[assert] operator[SEP] Keyword[this] operator[SEP] identifier[usedNames] operator[SEP] identifier[contains] operator[SEP] identifier[lowerName] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[usedNames] operator[SEP] identifier[remove] operator[SEP] identifier[lowerName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[entryToFile] operator[SEP] identifier[remove] operator[SEP] identifier[entry] operator[SEP] identifier[realEntry] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[entryToDirectory] operator[SEP] identifier[remove] operator[SEP] identifier[entry] operator[SEP] identifier[realEntry] operator[SEP] operator[SEP] } }
@SuppressWarnings({"PMD.UseVarargs", "PMD.CyclomaticComplexity", "checkstyle:CyclomaticComplexity"}) public static boolean isAssignableBounds(final Class[] one, final Class[] two) { if (one.length == 0 || two.length == 0) { throw new IllegalArgumentException(String.format("Incomplete bounds information: %s %s", Arrays.toString(one), Arrays.toString(two))); } // nothing to do for Object - it's assignable to anything if (!(one.length == 1 && (one[0] == Object.class || (ArrayTypeUtils.isArray(one[0]) && ArrayTypeUtils.getArrayComponentType(one[0]) == Object.class)))) { for (Class<?> twoType : two) { // everything is assignable to object if (twoType != Object.class) { boolean assignable = false; for (Class<?> oneType : one) { if (twoType.isAssignableFrom(oneType)) { assignable = true; break; } } // none on left types is assignable to this right type if (!assignable) { return false; } } } } return true; }
class class_name[name] begin[{] method[isAssignableBounds, return_type[type[boolean]], modifier[public static], parameter[one, two]] begin[{] if[binary_operation[binary_operation[member[one.length], ==, literal[0]], ||, binary_operation[member[two.length], ==, literal[0]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Incomplete bounds information: %s %s"), MethodInvocation(arguments=[MemberReference(member=one, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=two, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[binary_operation[member[one.length], ==, literal[1]], &&, binary_operation[binary_operation[member[.one], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], ||, binary_operation[call[ArrayTypeUtils.isArray, parameter[member[.one]]], &&, binary_operation[call[ArrayTypeUtils.getArrayComponentType, parameter[member[.one]]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=twoType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=assignable)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=oneType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAssignableFrom, postfix_operators=[], prefix_operators=[], qualifier=twoType, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=assignable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=one, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=oneType)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None), IfStatement(condition=MemberReference(member=assignable, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]))]), control=EnhancedForControl(iterable=MemberReference(member=two, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=twoType)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None) else begin[{] None end[}] return[literal[true]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] , literal[String] } operator[SEP] Keyword[public] Keyword[static] Keyword[boolean] identifier[isAssignableBounds] operator[SEP] Keyword[final] identifier[Class] operator[SEP] operator[SEP] identifier[one] , Keyword[final] identifier[Class] operator[SEP] operator[SEP] identifier[two] operator[SEP] { Keyword[if] operator[SEP] identifier[one] operator[SEP] identifier[length] operator[==] Other[0] operator[||] identifier[two] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[Arrays] operator[SEP] identifier[toString] operator[SEP] identifier[one] operator[SEP] , identifier[Arrays] operator[SEP] identifier[toString] operator[SEP] identifier[two] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[one] operator[SEP] identifier[length] operator[==] Other[1] operator[&&] operator[SEP] identifier[one] operator[SEP] Other[0] operator[SEP] operator[==] identifier[Object] operator[SEP] Keyword[class] operator[||] operator[SEP] identifier[ArrayTypeUtils] operator[SEP] identifier[isArray] operator[SEP] identifier[one] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[&&] identifier[ArrayTypeUtils] operator[SEP] identifier[getArrayComponentType] operator[SEP] identifier[one] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[==] identifier[Object] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[twoType] operator[:] identifier[two] operator[SEP] { Keyword[if] operator[SEP] identifier[twoType] operator[!=] identifier[Object] operator[SEP] Keyword[class] operator[SEP] { Keyword[boolean] identifier[assignable] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[oneType] operator[:] identifier[one] operator[SEP] { Keyword[if] operator[SEP] identifier[twoType] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[oneType] operator[SEP] operator[SEP] { identifier[assignable] operator[=] literal[boolean] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[assignable] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } } } Keyword[return] literal[boolean] operator[SEP] }
public static CertPathValidator getInstance(String algorithm) throws NoSuchAlgorithmException { Instance instance = GetInstance.getInstance("CertPathValidator", CertPathValidatorSpi.class, algorithm); return new CertPathValidator((CertPathValidatorSpi)instance.impl, instance.provider, algorithm); }
class class_name[name] begin[{] method[getInstance, return_type[type[CertPathValidator]], modifier[public static], parameter[algorithm]] begin[{] local_variable[type[Instance], instance] return[ClassCreator(arguments=[Cast(expression=MemberReference(member=impl, postfix_operators=[], prefix_operators=[], qualifier=instance, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=CertPathValidatorSpi, sub_type=None)), MemberReference(member=provider, postfix_operators=[], prefix_operators=[], qualifier=instance, selectors=[]), MemberReference(member=algorithm, 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=CertPathValidator, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[CertPathValidator] identifier[getInstance] operator[SEP] identifier[String] identifier[algorithm] operator[SEP] Keyword[throws] identifier[NoSuchAlgorithmException] { identifier[Instance] identifier[instance] operator[=] identifier[GetInstance] operator[SEP] identifier[getInstance] operator[SEP] literal[String] , identifier[CertPathValidatorSpi] operator[SEP] Keyword[class] , identifier[algorithm] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[CertPathValidator] operator[SEP] operator[SEP] identifier[CertPathValidatorSpi] operator[SEP] identifier[instance] operator[SEP] identifier[impl] , identifier[instance] operator[SEP] identifier[provider] , identifier[algorithm] operator[SEP] operator[SEP] }
public static Point2D getBitmapCoordinate(double latitude, double longitude, int zoomLevel, TileFactoryInfo info) { double x = info.getMapCenterInPixelsAtZoom(zoomLevel).getX() + longitude * info.getLongitudeDegreeWidthInPixels(zoomLevel); double e = Math.sin(latitude * (Math.PI / 180.0)); if (e > 0.9999) { e = 0.9999; } if (e < -0.9999) { e = -0.9999; } double y = info.getMapCenterInPixelsAtZoom(zoomLevel).getY() + 0.5 * Math.log((1 + e) / (1 - e)) * -1 * (info.getLongitudeRadianWidthInPixels(zoomLevel)); return new Point2D.Double(x, y); }
class class_name[name] begin[{] method[getBitmapCoordinate, return_type[type[Point2D]], modifier[public static], parameter[latitude, longitude, zoomLevel, info]] begin[{] local_variable[type[double], x] local_variable[type[double], e] if[binary_operation[member[.e], >, literal[0.9999]]] begin[{] assign[member[.e], literal[0.9999]] else begin[{] None end[}] if[binary_operation[member[.e], <, literal[0.9999]]] begin[{] assign[member[.e], literal[0.9999]] else begin[{] None end[}] local_variable[type[double], y] return[ClassCreator(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, 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=Point2D, sub_type=ReferenceType(arguments=None, dimensions=None, name=Double, sub_type=None)))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Point2D] identifier[getBitmapCoordinate] operator[SEP] Keyword[double] identifier[latitude] , Keyword[double] identifier[longitude] , Keyword[int] identifier[zoomLevel] , identifier[TileFactoryInfo] identifier[info] operator[SEP] { Keyword[double] identifier[x] operator[=] identifier[info] operator[SEP] identifier[getMapCenterInPixelsAtZoom] operator[SEP] identifier[zoomLevel] operator[SEP] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[+] identifier[longitude] operator[*] identifier[info] operator[SEP] identifier[getLongitudeDegreeWidthInPixels] operator[SEP] identifier[zoomLevel] operator[SEP] operator[SEP] Keyword[double] identifier[e] operator[=] identifier[Math] operator[SEP] identifier[sin] operator[SEP] identifier[latitude] operator[*] operator[SEP] identifier[Math] operator[SEP] identifier[PI] operator[/] literal[Float] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[e] operator[>] literal[Float] operator[SEP] { identifier[e] operator[=] literal[Float] operator[SEP] } Keyword[if] operator[SEP] identifier[e] operator[<] operator[-] literal[Float] operator[SEP] { identifier[e] operator[=] operator[-] literal[Float] operator[SEP] } Keyword[double] identifier[y] operator[=] identifier[info] operator[SEP] identifier[getMapCenterInPixelsAtZoom] operator[SEP] identifier[zoomLevel] operator[SEP] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[+] literal[Float] operator[*] identifier[Math] operator[SEP] identifier[log] operator[SEP] operator[SEP] Other[1] operator[+] identifier[e] operator[SEP] operator[/] operator[SEP] Other[1] operator[-] identifier[e] operator[SEP] operator[SEP] operator[*] operator[-] Other[1] operator[*] operator[SEP] identifier[info] operator[SEP] identifier[getLongitudeRadianWidthInPixels] operator[SEP] identifier[zoomLevel] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Point2D] operator[SEP] identifier[Double] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] }
public static FlowElement getFlowElement(DelegateExecution execution) { BpmnModel bpmnModel = getBpmnModel(execution); FlowElement flowElement = bpmnModel.getFlowElement(execution.getCurrentActivityId()); if (flowElement == null) { throw new ActivitiException("Could not find a FlowElement for activityId " + execution.getCurrentActivityId()); } return flowElement; }
class class_name[name] begin[{] method[getFlowElement, return_type[type[FlowElement]], modifier[public static], parameter[execution]] begin[{] local_variable[type[BpmnModel], bpmnModel] local_variable[type[FlowElement], flowElement] if[binary_operation[member[.flowElement], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not find a FlowElement for activityId "), operandr=MethodInvocation(arguments=[], member=getCurrentActivityId, postfix_operators=[], prefix_operators=[], qualifier=execution, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ActivitiException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.flowElement]] end[}] END[}]
Keyword[public] Keyword[static] identifier[FlowElement] identifier[getFlowElement] operator[SEP] identifier[DelegateExecution] identifier[execution] operator[SEP] { identifier[BpmnModel] identifier[bpmnModel] operator[=] identifier[getBpmnModel] operator[SEP] identifier[execution] operator[SEP] operator[SEP] identifier[FlowElement] identifier[flowElement] operator[=] identifier[bpmnModel] operator[SEP] identifier[getFlowElement] operator[SEP] identifier[execution] operator[SEP] identifier[getCurrentActivityId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[flowElement] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[ActivitiException] operator[SEP] literal[String] operator[+] identifier[execution] operator[SEP] identifier[getCurrentActivityId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[flowElement] operator[SEP] }
public KeyArea setupKey(int iKeyArea) { KeyArea keyArea = null; if (iKeyArea == 0) { keyArea = this.makeIndex(DBConstants.UNIQUE, ID_KEY); keyArea.addKeyField(ID, DBConstants.ASCENDING); } if (keyArea == null) keyArea = super.setupKey(iKeyArea); return keyArea; }
class class_name[name] begin[{] method[setupKey, return_type[type[KeyArea]], modifier[public], parameter[iKeyArea]] begin[{] local_variable[type[KeyArea], keyArea] if[binary_operation[member[.iKeyArea], ==, literal[0]]] begin[{] assign[member[.keyArea], THIS[call[None.makeIndex, parameter[member[DBConstants.UNIQUE], member[.ID_KEY]]]]] call[keyArea.addKeyField, parameter[member[.ID], member[DBConstants.ASCENDING]]] else begin[{] None end[}] if[binary_operation[member[.keyArea], ==, literal[null]]] begin[{] assign[member[.keyArea], SuperMethodInvocation(arguments=[MemberReference(member=iKeyArea, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setupKey, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] else begin[{] None end[}] return[member[.keyArea]] end[}] END[}]
Keyword[public] identifier[KeyArea] identifier[setupKey] operator[SEP] Keyword[int] identifier[iKeyArea] operator[SEP] { identifier[KeyArea] identifier[keyArea] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[iKeyArea] operator[==] Other[0] operator[SEP] { identifier[keyArea] operator[=] Keyword[this] operator[SEP] identifier[makeIndex] operator[SEP] identifier[DBConstants] operator[SEP] identifier[UNIQUE] , identifier[ID_KEY] operator[SEP] operator[SEP] identifier[keyArea] operator[SEP] identifier[addKeyField] operator[SEP] identifier[ID] , identifier[DBConstants] operator[SEP] identifier[ASCENDING] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[keyArea] operator[==] Other[null] operator[SEP] identifier[keyArea] operator[=] Keyword[super] operator[SEP] identifier[setupKey] operator[SEP] identifier[iKeyArea] operator[SEP] operator[SEP] Keyword[return] identifier[keyArea] operator[SEP] }
private boolean decodeBulkStringEndOfLine(ByteBuf in, List<Object> out) throws Exception { if (in.readableBytes() < RedisConstants.EOL_LENGTH) { return false; } readEndOfLine(in); out.add(FullBulkStringRedisMessage.EMPTY_INSTANCE); resetDecoder(); return true; }
class class_name[name] begin[{] method[decodeBulkStringEndOfLine, return_type[type[boolean]], modifier[private], parameter[in, out]] begin[{] if[binary_operation[call[in.readableBytes, parameter[]], <, member[RedisConstants.EOL_LENGTH]]] begin[{] return[literal[false]] else begin[{] None end[}] call[.readEndOfLine, parameter[member[.in]]] call[out.add, parameter[member[FullBulkStringRedisMessage.EMPTY_INSTANCE]]] call[.resetDecoder, parameter[]] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[decodeBulkStringEndOfLine] operator[SEP] identifier[ByteBuf] identifier[in] , identifier[List] operator[<] identifier[Object] operator[>] identifier[out] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[in] operator[SEP] identifier[readableBytes] operator[SEP] operator[SEP] operator[<] identifier[RedisConstants] operator[SEP] identifier[EOL_LENGTH] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[readEndOfLine] operator[SEP] identifier[in] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[add] operator[SEP] identifier[FullBulkStringRedisMessage] operator[SEP] identifier[EMPTY_INSTANCE] operator[SEP] operator[SEP] identifier[resetDecoder] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public static String renderJson(Object o) { Gson gson = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting() .create(); return gson.toJson(o); }
class class_name[name] begin[{] method[renderJson, return_type[type[String]], modifier[public static], parameter[o]] begin[{] local_variable[type[Gson], gson] return[call[gson.toJson, parameter[member[.o]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[renderJson] operator[SEP] identifier[Object] identifier[o] operator[SEP] { identifier[Gson] identifier[gson] operator[=] Keyword[new] identifier[GsonBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[disableHtmlEscaping] operator[SEP] operator[SEP] operator[SEP] identifier[setPrettyPrinting] operator[SEP] operator[SEP] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[gson] operator[SEP] identifier[toJson] operator[SEP] identifier[o] operator[SEP] operator[SEP] }
public final void writeNativeResponse(NativeResponse resp, JsonGenerator gen) throws IOException { gen.writeStartObject(); if (factory().isRootNativeField()) { gen.writeObjectFieldStart("native"); } writeNativeResponseFields(resp, gen); writeExtensions(resp, gen); if (factory().isRootNativeField()) { gen.writeEndObject(); } gen.writeEndObject(); gen.flush(); }
class class_name[name] begin[{] method[writeNativeResponse, return_type[void], modifier[final public], parameter[resp, gen]] begin[{] call[gen.writeStartObject, parameter[]] if[call[.factory, parameter[]]] begin[{] call[gen.writeObjectFieldStart, parameter[literal["native"]]] else begin[{] None end[}] call[.writeNativeResponseFields, parameter[member[.resp], member[.gen]]] call[.writeExtensions, parameter[member[.resp], member[.gen]]] if[call[.factory, parameter[]]] begin[{] call[gen.writeEndObject, parameter[]] else begin[{] None end[}] call[gen.writeEndObject, parameter[]] call[gen.flush, parameter[]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[writeNativeResponse] operator[SEP] identifier[NativeResponse] identifier[resp] , identifier[JsonGenerator] identifier[gen] operator[SEP] Keyword[throws] identifier[IOException] { identifier[gen] operator[SEP] identifier[writeStartObject] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[factory] operator[SEP] operator[SEP] operator[SEP] identifier[isRootNativeField] operator[SEP] operator[SEP] operator[SEP] { identifier[gen] operator[SEP] identifier[writeObjectFieldStart] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[writeNativeResponseFields] operator[SEP] identifier[resp] , identifier[gen] operator[SEP] operator[SEP] identifier[writeExtensions] operator[SEP] identifier[resp] , identifier[gen] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[factory] operator[SEP] operator[SEP] operator[SEP] identifier[isRootNativeField] operator[SEP] operator[SEP] operator[SEP] { identifier[gen] operator[SEP] identifier[writeEndObject] operator[SEP] operator[SEP] operator[SEP] } identifier[gen] operator[SEP] identifier[writeEndObject] operator[SEP] operator[SEP] operator[SEP] identifier[gen] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] }
@Override public Boolean convert(final String value) { return Boolean.valueOf(value) || "1".equals(value) || "on".equalsIgnoreCase(value) || "yes".equalsIgnoreCase(value); }
class class_name[name] begin[{] method[convert, return_type[type[Boolean]], modifier[public], parameter[value]] begin[{] return[binary_operation[binary_operation[binary_operation[call[Boolean.valueOf, parameter[member[.value]]], ||, literal["1"]], ||, literal["on"]], ||, literal["yes"]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Boolean] identifier[convert] operator[SEP] Keyword[final] identifier[String] identifier[value] operator[SEP] { Keyword[return] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[value] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[value] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[value] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[value] operator[SEP] operator[SEP] }
@Override public Attributes getAttributes(String name) throws NamingException { if (StringUtils.hasLength(name)) { throw new NameNotFoundException(); } return (Attributes) originalAttrs.clone(); }
class class_name[name] begin[{] method[getAttributes, return_type[type[Attributes]], modifier[public], parameter[name]] begin[{] if[call[StringUtils.hasLength, parameter[member[.name]]]] 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=NameNotFoundException, sub_type=None)), label=None) else begin[{] None end[}] return[Cast(expression=MethodInvocation(arguments=[], member=clone, postfix_operators=[], prefix_operators=[], qualifier=originalAttrs, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Attributes, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Attributes] identifier[getAttributes] operator[SEP] identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[NamingException] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[hasLength] operator[SEP] identifier[name] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[NameNotFoundException] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[Attributes] operator[SEP] identifier[originalAttrs] operator[SEP] identifier[clone] operator[SEP] operator[SEP] operator[SEP] }
boolean isIntermediaryPath(final JsonPointer jp) { List<String> jpRefTokens = jp.tokens(); int jpSize = jpRefTokens.size(); if (jpSize == 1) { return false; } Node node = root; for (int i = 1; i < jpSize; i++) { Node childMatch = node.match(jpRefTokens.get(i)); if (childMatch == null) { return false; } else { node = childMatch; } } return node.children != null; }
class class_name[name] begin[{] method[isIntermediaryPath, return_type[type[boolean]], modifier[default], parameter[jp]] begin[{] local_variable[type[List], jpRefTokens] local_variable[type[int], jpSize] if[binary_operation[member[.jpSize], ==, literal[1]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[Node], node] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=jpRefTokens, selectors=[], type_arguments=None)], member=match, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), name=childMatch)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=childMatch, 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=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=childMatch, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=jpSize, 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)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[binary_operation[member[node.children], !=, literal[null]]] end[}] END[}]
Keyword[boolean] identifier[isIntermediaryPath] operator[SEP] Keyword[final] identifier[JsonPointer] identifier[jp] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[jpRefTokens] operator[=] identifier[jp] operator[SEP] identifier[tokens] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[jpSize] operator[=] identifier[jpRefTokens] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jpSize] operator[==] Other[1] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[Node] identifier[node] operator[=] identifier[root] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[jpSize] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Node] identifier[childMatch] operator[=] identifier[node] operator[SEP] identifier[match] operator[SEP] identifier[jpRefTokens] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[childMatch] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { identifier[node] operator[=] identifier[childMatch] operator[SEP] } } Keyword[return] identifier[node] operator[SEP] identifier[children] operator[!=] Other[null] operator[SEP] }
public ClassConfiguration<T> merge(ClassConfiguration<T> other) { if (!targetClass.isAssignableFrom(other.targetClass)) { throw new IllegalArgumentException( "Cannot merge class configurations: " + targetClass.getName() + " is not assignable to " + other .targetClass.getName()); } map.putAll(other.map); map.values().removeIf(Objects::isNull); return this; }
class class_name[name] begin[{] method[merge, return_type[type[ClassConfiguration]], modifier[public], parameter[other]] begin[{] if[call[targetClass.isAssignableFrom, parameter[member[other.targetClass]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Cannot merge class configurations: "), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=targetClass, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is not assignable to "), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=other.targetClass, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[map.putAll, parameter[member[other.map]]] call[map.values, parameter[]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[ClassConfiguration] operator[<] identifier[T] operator[>] identifier[merge] operator[SEP] identifier[ClassConfiguration] operator[<] identifier[T] operator[>] identifier[other] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[targetClass] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[other] operator[SEP] identifier[targetClass] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[targetClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[other] operator[SEP] identifier[targetClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[map] operator[SEP] identifier[putAll] operator[SEP] identifier[other] operator[SEP] identifier[map] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] identifier[removeIf] operator[SEP] identifier[Objects] operator[::] identifier[isNull] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public String diff_text2(LinkedList<Diff> diffs) { StringBuilder text = new StringBuilder(); for (Diff aDiff : diffs) { if (aDiff.operation != Operation.DELETE) { text.append(aDiff.text); } } return text.toString(); }
class class_name[name] begin[{] method[diff_text2, return_type[type[String]], modifier[public], parameter[diffs]] begin[{] local_variable[type[StringBuilder], text] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=operation, postfix_operators=[], prefix_operators=[], qualifier=aDiff, selectors=[]), operandr=MemberReference(member=DELETE, postfix_operators=[], prefix_operators=[], qualifier=Operation, selectors=[]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=text, postfix_operators=[], prefix_operators=[], qualifier=aDiff, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=text, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=diffs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=aDiff)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Diff, sub_type=None))), label=None) return[call[text.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[diff_text2] operator[SEP] identifier[LinkedList] operator[<] identifier[Diff] operator[>] identifier[diffs] operator[SEP] { identifier[StringBuilder] identifier[text] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Diff] identifier[aDiff] operator[:] identifier[diffs] operator[SEP] { Keyword[if] operator[SEP] identifier[aDiff] operator[SEP] identifier[operation] operator[!=] identifier[Operation] operator[SEP] identifier[DELETE] operator[SEP] { identifier[text] operator[SEP] identifier[append] operator[SEP] identifier[aDiff] operator[SEP] identifier[text] operator[SEP] operator[SEP] } } Keyword[return] identifier[text] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public ListFacetAttributesResult withAttributes(FacetAttribute... attributes) { if (this.attributes == null) { setAttributes(new java.util.ArrayList<FacetAttribute>(attributes.length)); } for (FacetAttribute ele : attributes) { this.attributes.add(ele); } return this; }
class class_name[name] begin[{] method[withAttributes, return_type[type[ListFacetAttributesResult]], modifier[public], parameter[attributes]] begin[{] if[binary_operation[THIS[member[None.attributes]], ==, literal[null]]] begin[{] call[.setAttributes, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=attributes, 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=FacetAttribute, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=attributes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=attributes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FacetAttribute, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[ListFacetAttributesResult] identifier[withAttributes] operator[SEP] identifier[FacetAttribute] operator[...] identifier[attributes] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[attributes] operator[==] Other[null] operator[SEP] { identifier[setAttributes] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[FacetAttribute] operator[>] operator[SEP] identifier[attributes] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[FacetAttribute] identifier[ele] operator[:] identifier[attributes] operator[SEP] { Keyword[this] operator[SEP] identifier[attributes] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public void handleAckExpectedMessage(ControlAckExpected cMsg) throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "handleAckExpectedMessage", new Object[] { cMsg }); int priority = cMsg.getPriority().intValue(); Reliability reliability = cMsg.getReliability(); SIBUuid12 streamID = cMsg.getGuaranteedStreamUUID(); StreamSet streamSet = getStreamSetForMessage(cMsg); if(streamSet == null) { //if this is a new streamID, send a flush query handleNewStreamID(cMsg); } else { TargetStream targetStream = null; synchronized(streamSet) { targetStream = (TargetStream) streamSet.getStream(priority, reliability); if(targetStream == null) { //if the specific stream does not exist, create it targetStream = createStream(streamSet, priority, reliability, streamSet.getPersistentData(priority, reliability)); } } // Get the tickValue from the message long tickValue = cMsg.getTick(); // Get the underlying statestream to process this // it will call back to the UpstreamControl to send Nacks targetStream.processAckExpected(tickValue); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "handleAckExpectedMessage"); }
class class_name[name] begin[{] method[handleAckExpectedMessage, return_type[void], modifier[public], parameter[cMsg]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["handleAckExpectedMessage"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=cMsg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] local_variable[type[int], priority] local_variable[type[Reliability], reliability] local_variable[type[SIBUuid12], streamID] local_variable[type[StreamSet], streamSet] if[binary_operation[member[.streamSet], ==, literal[null]]] begin[{] call[.handleNewStreamID, parameter[member[.cMsg]]] else begin[{] local_variable[type[TargetStream], targetStream] SYNCHRONIZED[member[.streamSet]] BEGIN[{] assign[member[.targetStream], Cast(expression=MethodInvocation(arguments=[MemberReference(member=priority, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=reliability, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getStream, postfix_operators=[], prefix_operators=[], qualifier=streamSet, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=TargetStream, sub_type=None))] if[binary_operation[member[.targetStream], ==, literal[null]]] begin[{] assign[member[.targetStream], call[.createStream, parameter[member[.streamSet], member[.priority], member[.reliability], call[streamSet.getPersistentData, parameter[member[.priority], member[.reliability]]]]]] else begin[{] None end[}] END[}] local_variable[type[long], tickValue] call[targetStream.processAckExpected, parameter[member[.tickValue]]] end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["handleAckExpectedMessage"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[handleAckExpectedMessage] operator[SEP] identifier[ControlAckExpected] identifier[cMsg] operator[SEP] Keyword[throws] identifier[SIResourceException] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[cMsg] } operator[SEP] operator[SEP] Keyword[int] identifier[priority] operator[=] identifier[cMsg] operator[SEP] identifier[getPriority] operator[SEP] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] identifier[Reliability] identifier[reliability] operator[=] identifier[cMsg] operator[SEP] identifier[getReliability] operator[SEP] operator[SEP] operator[SEP] identifier[SIBUuid12] identifier[streamID] operator[=] identifier[cMsg] operator[SEP] identifier[getGuaranteedStreamUUID] operator[SEP] operator[SEP] operator[SEP] identifier[StreamSet] identifier[streamSet] operator[=] identifier[getStreamSetForMessage] operator[SEP] identifier[cMsg] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[streamSet] operator[==] Other[null] operator[SEP] { identifier[handleNewStreamID] operator[SEP] identifier[cMsg] operator[SEP] operator[SEP] } Keyword[else] { identifier[TargetStream] identifier[targetStream] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] identifier[streamSet] operator[SEP] { identifier[targetStream] operator[=] operator[SEP] identifier[TargetStream] operator[SEP] identifier[streamSet] operator[SEP] identifier[getStream] operator[SEP] identifier[priority] , identifier[reliability] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[targetStream] operator[==] Other[null] operator[SEP] { identifier[targetStream] operator[=] identifier[createStream] operator[SEP] identifier[streamSet] , identifier[priority] , identifier[reliability] , identifier[streamSet] operator[SEP] identifier[getPersistentData] operator[SEP] identifier[priority] , identifier[reliability] operator[SEP] operator[SEP] operator[SEP] } } Keyword[long] identifier[tickValue] operator[=] identifier[cMsg] operator[SEP] identifier[getTick] operator[SEP] operator[SEP] operator[SEP] identifier[targetStream] operator[SEP] identifier[processAckExpected] operator[SEP] identifier[tickValue] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public void writePropertyObject(String resourcename, CmsProperty property) throws CmsException { CmsResource resource = readResource(resourcename, CmsResourceFilter.IGNORE_EXPIRATION); getResourceType(resource).writePropertyObject(this, m_securityManager, resource, property); }
class class_name[name] begin[{] method[writePropertyObject, return_type[void], modifier[public], parameter[resourcename, property]] begin[{] local_variable[type[CmsResource], resource] call[.getResourceType, parameter[member[.resource]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[writePropertyObject] operator[SEP] identifier[String] identifier[resourcename] , identifier[CmsProperty] identifier[property] operator[SEP] Keyword[throws] identifier[CmsException] { identifier[CmsResource] identifier[resource] operator[=] identifier[readResource] operator[SEP] identifier[resourcename] , identifier[CmsResourceFilter] operator[SEP] identifier[IGNORE_EXPIRATION] operator[SEP] operator[SEP] identifier[getResourceType] operator[SEP] identifier[resource] operator[SEP] operator[SEP] identifier[writePropertyObject] operator[SEP] Keyword[this] , identifier[m_securityManager] , identifier[resource] , identifier[property] operator[SEP] operator[SEP] }
public static int nextPow2(int x) { if (x < 1) throw new IllegalArgumentException("x must be greater or equal 1"); if ((x & (x - 1)) == 0) { if( x == 1 ) return 2; return x; // x is already a power-of-two number } x |= (x >>> 1); x |= (x >>> 2); x |= (x >>> 4); x |= (x >>> 8); x |= (x >>> 16); x |= (x >>> 32); return x + 1; }
class class_name[name] begin[{] method[nextPow2, return_type[type[int]], modifier[public static], parameter[x]] begin[{] if[binary_operation[member[.x], <, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="x must be greater or equal 1")], 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[binary_operation[member[.x], &, binary_operation[member[.x], -, literal[1]]], ==, literal[0]]] begin[{] if[binary_operation[member[.x], ==, literal[1]]] begin[{] return[literal[2]] else begin[{] None end[}] return[member[.x]] else begin[{] None end[}] assign[member[.x], binary_operation[member[.x], >>>, literal[1]]] assign[member[.x], binary_operation[member[.x], >>>, literal[2]]] assign[member[.x], binary_operation[member[.x], >>>, literal[4]]] assign[member[.x], binary_operation[member[.x], >>>, literal[8]]] assign[member[.x], binary_operation[member[.x], >>>, literal[16]]] assign[member[.x], binary_operation[member[.x], >>>, literal[32]]] return[binary_operation[member[.x], +, literal[1]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[nextPow2] operator[SEP] Keyword[int] identifier[x] operator[SEP] { Keyword[if] operator[SEP] identifier[x] operator[<] Other[1] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[x] operator[&] operator[SEP] identifier[x] operator[-] Other[1] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[x] operator[==] Other[1] operator[SEP] Keyword[return] Other[2] operator[SEP] Keyword[return] identifier[x] operator[SEP] } identifier[x] operator[|=] operator[SEP] identifier[x] operator[>] operator[>] operator[>] Other[1] operator[SEP] operator[SEP] identifier[x] operator[|=] operator[SEP] identifier[x] operator[>] operator[>] operator[>] Other[2] operator[SEP] operator[SEP] identifier[x] operator[|=] operator[SEP] identifier[x] operator[>] operator[>] operator[>] Other[4] operator[SEP] operator[SEP] identifier[x] operator[|=] operator[SEP] identifier[x] operator[>] operator[>] operator[>] Other[8] operator[SEP] operator[SEP] identifier[x] operator[|=] operator[SEP] identifier[x] operator[>] operator[>] operator[>] Other[16] operator[SEP] operator[SEP] identifier[x] operator[|=] operator[SEP] identifier[x] operator[>] operator[>] operator[>] Other[32] operator[SEP] operator[SEP] Keyword[return] identifier[x] operator[+] Other[1] operator[SEP] }
private boolean isExcluded(String name, String cmpname, String value) { return exclude.contains(excludeKey(name, null, value)) || exclude.contains(excludeKey(name, cmpname, value)); }
class class_name[name] begin[{] method[isExcluded, return_type[type[boolean]], modifier[private], parameter[name, cmpname, value]] begin[{] return[binary_operation[call[exclude.contains, parameter[call[.excludeKey, parameter[member[.name], literal[null], member[.value]]]]], ||, call[exclude.contains, parameter[call[.excludeKey, parameter[member[.name], member[.cmpname], member[.value]]]]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isExcluded] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[cmpname] , identifier[String] identifier[value] operator[SEP] { Keyword[return] identifier[exclude] operator[SEP] identifier[contains] operator[SEP] identifier[excludeKey] operator[SEP] identifier[name] , Other[null] , identifier[value] operator[SEP] operator[SEP] operator[||] identifier[exclude] operator[SEP] identifier[contains] operator[SEP] identifier[excludeKey] operator[SEP] identifier[name] , identifier[cmpname] , identifier[value] operator[SEP] operator[SEP] operator[SEP] }
public Map<String, Object> getContext() { final Map<String, Object> rval = newMap(); rval.putAll(context); // replace "" with "@vocab" if (rval.containsKey("")) { rval.put("@vocab", rval.remove("")); } return rval; }
class class_name[name] begin[{] method[getContext, return_type[type[Map]], modifier[public], parameter[]] begin[{] local_variable[type[Map], rval] call[rval.putAll, parameter[member[.context]]] if[call[rval.containsKey, parameter[literal[""]]]] begin[{] call[rval.put, parameter[literal["@vocab"], call[rval.remove, parameter[literal[""]]]]] else begin[{] None end[}] return[member[.rval]] end[}] END[}]
Keyword[public] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[getContext] operator[SEP] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[rval] operator[=] identifier[newMap] operator[SEP] operator[SEP] operator[SEP] identifier[rval] operator[SEP] identifier[putAll] operator[SEP] identifier[context] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rval] operator[SEP] identifier[containsKey] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[rval] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[rval] operator[SEP] identifier[remove] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[rval] operator[SEP] }
public long getNumberOfQueuedMessages() { long count = 0; try { count = itemStream.getStatistics().getTotalItemCount(); } catch (MessageStoreException e) { FFDCFilter.processException( e, "com.ibm.ws.sib.processor.runtime.LocalQueuePoint.getNumberOfQueuedMessages", "1:494:1.58", this); SibTr.exception(tc, e); } return count; }
class class_name[name] begin[{] method[getNumberOfQueuedMessages, return_type[type[long]], modifier[public], parameter[]] begin[{] local_variable[type[long], count] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getStatistics, postfix_operators=[], prefix_operators=[], qualifier=itemStream, selectors=[MethodInvocation(arguments=[], member=getTotalItemCount, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.runtime.LocalQueuePoint.getNumberOfQueuedMessages"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:494:1.58"), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exception, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['MessageStoreException']))], finally_block=None, label=None, resources=None) return[member[.count]] end[}] END[}]
Keyword[public] Keyword[long] identifier[getNumberOfQueuedMessages] operator[SEP] operator[SEP] { Keyword[long] identifier[count] operator[=] Other[0] operator[SEP] Keyword[try] { identifier[count] operator[=] identifier[itemStream] operator[SEP] identifier[getStatistics] operator[SEP] operator[SEP] operator[SEP] identifier[getTotalItemCount] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[MessageStoreException] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , literal[String] , literal[String] , Keyword[this] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] identifier[tc] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[count] operator[SEP] }
private void iniButtons() { m_newButton = CmsToolBar.createButton( FontOpenCms.WAND, CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_ADD_ELEMENT_0)); m_newButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 1L; public void buttonClick(ClickEvent event) { openNewDialog(); } }); m_infoButton = new CmsInfoButton(); Button csvButton = new Button(CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_EXPORT_ONLY_USER_0)); csvButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 5472430305539438757L; public void buttonClick(ClickEvent event) { boolean includeTechnicalFields = false; try { OpenCms.getRoleManager().checkRole(m_cms, CmsRole.ADMINISTRATOR); includeTechnicalFields = true; } catch (CmsRoleViolationException e) { // ok } Window window = CmsBasicDialog.prepareWindow(DialogWidth.wide); CmsUserCsvExportDialog dialog = new CmsUserCsvExportDialog( getFullUser(getVisibleUser()), m_stateBean.getPath(), m_stateBean.getType(), getElementName(m_stateBean), CmsVaadinUtils.isButtonPressed(getToggleButton(m_stateBean)), window, includeTechnicalFields); window.setContent(dialog); A_CmsUI.get().addWindow(window); } }); m_infoButton.setAdditionalButton(csvButton); m_addElementButton = CmsToolBar.createButton( FontAwesome.PLUS, CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_ADD_USER_TO_GROUP_0)); m_addElementButton.addClickListener(new ClickListener() { private static final long serialVersionUID = 1859694635385726953L; public void buttonClick(ClickEvent event) { openAddUserDialog(); } }); m_toggleButtonRole = CmsToolBar.createButton( FontOpenCms.USERS, CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_ROLES_TOGGLE_0)); m_toggleButtonRole.addClickListener(new ClickListener() { private static final long serialVersionUID = 8265075332953321274L; public void buttonClick(ClickEvent event) { toggleTable(m_toggleButtonRole); } }); m_toggleButtonUser = CmsToolBar.createButton( FontOpenCms.USERS, CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_USER_TOGGLE_0)); m_toggleButtonUser.addClickListener(new ClickListener() { private static final long serialVersionUID = 8265075332953321274L; public void buttonClick(ClickEvent event) { toggleTable(m_toggleButtonUser); } }); m_toggleButtonGroups = CmsToolBar.createButton( FontOpenCms.USERS, CmsVaadinUtils.getMessageText(Messages.GUI_USERMANAGEMENT_GROUPS_TOGGLE_0)); m_toggleButtonGroups.addClickListener(new ClickListener() { private static final long serialVersionUID = 8265075332953321274L; public void buttonClick(ClickEvent event) { toggleTable(m_toggleButtonGroups); } }); m_uiContext.addToolbarButton(m_newButton); m_uiContext.addToolbarButton(m_addElementButton); m_uiContext.addToolbarButton(m_infoButton); m_uiContext.addToolbarButton(m_toggleButtonRole); m_uiContext.addToolbarButton(m_toggleButtonUser); m_uiContext.addToolbarButton(m_toggleButtonGroups); for (Button button : getAdditionalButtons()) { m_uiContext.addToolbarButton(button); } m_filter = CmsVaadinUtils.getOUComboBox(m_cms, m_baseOU, LOG); m_filter.setWidth("379px"); m_infoLayout.addComponent(m_filter, 0); m_filterTable = new TextField(); m_filterTable.setIcon(FontOpenCms.FILTER); m_filterTable.setInputPrompt( Messages.get().getBundle(UI.getCurrent().getLocale()).key(Messages.GUI_EXPLORER_FILTER_0)); m_filterTable.addStyleName(ValoTheme.TEXTFIELD_INLINE_ICON); // m_filterTable.setWidth("200px"); m_filterTable.addTextChangeListener(new TextChangeListener() { private static final long serialVersionUID = 1L; public void textChange(TextChangeEvent event) { filterTable(event.getText()); } }); m_filterTable.setWidth("200px"); m_infoLayout.addComponent(m_filterTable); m_infoLayout.addStyleName("o-many-elements"); m_filter.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; public void valueChange(ValueChangeEvent event) { if ((m_stateBean.getType() != null) & !m_doNotChange) { update((String)event.getProperty().getValue(), CmsOuTreeType.OU, null); } else { // } } }); if (!m_ouHandler.isOUManagable(m_stateBean.getPath())) { boolean change = m_doNotChange; m_doNotChange = false; m_filter.select(m_filter.getItemIds().iterator().next()); m_doNotChange = change; } }
class class_name[name] begin[{] method[iniButtons, return_type[void], modifier[private], parameter[]] begin[{] assign[member[.m_newButton], call[CmsToolBar.createButton, parameter[member[FontOpenCms.WAND], call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_USERMANAGEMENT_ADD_ELEMENT_0]]]]]] call[m_newButton.addClickListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[], member=openNewDialog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=buttonClick, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ClickEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClickListener, sub_type=None))]] assign[member[.m_infoButton], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CmsInfoButton, sub_type=None))] local_variable[type[Button], csvButton] call[csvButton.addClickListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5472430305539438757L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=includeTechnicalFields)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getRoleManager, postfix_operators=[], prefix_operators=[], qualifier=OpenCms, selectors=[MethodInvocation(arguments=[MemberReference(member=m_cms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ADMINISTRATOR, postfix_operators=[], prefix_operators=[], qualifier=CmsRole, selectors=[])], member=checkRole, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=includeTechnicalFields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsRoleViolationException']))], finally_block=None, label=None, resources=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=wide, postfix_operators=[], prefix_operators=[], qualifier=DialogWidth, selectors=[])], member=prepareWindow, postfix_operators=[], prefix_operators=[], qualifier=CmsBasicDialog, selectors=[], type_arguments=None), name=window)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Window, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getVisibleUser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=getFullUser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=m_stateBean, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=m_stateBean, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=m_stateBean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getElementName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=m_stateBean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getToggleButton, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=isButtonPressed, postfix_operators=[], prefix_operators=[], qualifier=CmsVaadinUtils, selectors=[], type_arguments=None), MemberReference(member=window, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=includeTechnicalFields, 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=CmsUserCsvExportDialog, sub_type=None)), name=dialog)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsUserCsvExportDialog, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dialog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setContent, postfix_operators=[], prefix_operators=[], qualifier=window, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=A_CmsUI, selectors=[MethodInvocation(arguments=[MemberReference(member=window, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addWindow, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=buttonClick, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ClickEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClickListener, sub_type=None))]] call[m_infoButton.setAdditionalButton, parameter[member[.csvButton]]] assign[member[.m_addElementButton], call[CmsToolBar.createButton, parameter[member[FontAwesome.PLUS], call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_USERMANAGEMENT_ADD_USER_TO_GROUP_0]]]]]] call[m_addElementButton.addClickListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1859694635385726953L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[], member=openAddUserDialog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=buttonClick, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ClickEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClickListener, sub_type=None))]] assign[member[.m_toggleButtonRole], call[CmsToolBar.createButton, parameter[member[FontOpenCms.USERS], call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_USERMANAGEMENT_ROLES_TOGGLE_0]]]]]] call[m_toggleButtonRole.addClickListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8265075332953321274L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=m_toggleButtonRole, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toggleTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=buttonClick, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ClickEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClickListener, sub_type=None))]] assign[member[.m_toggleButtonUser], call[CmsToolBar.createButton, parameter[member[FontOpenCms.USERS], call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_USERMANAGEMENT_USER_TOGGLE_0]]]]]] call[m_toggleButtonUser.addClickListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8265075332953321274L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=m_toggleButtonUser, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toggleTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=buttonClick, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ClickEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClickListener, sub_type=None))]] assign[member[.m_toggleButtonGroups], call[CmsToolBar.createButton, parameter[member[FontOpenCms.USERS], call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_USERMANAGEMENT_GROUPS_TOGGLE_0]]]]]] call[m_toggleButtonGroups.addClickListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8265075332953321274L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=m_toggleButtonGroups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toggleTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=buttonClick, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ClickEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClickListener, sub_type=None))]] call[m_uiContext.addToolbarButton, parameter[member[.m_newButton]]] call[m_uiContext.addToolbarButton, parameter[member[.m_addElementButton]]] call[m_uiContext.addToolbarButton, parameter[member[.m_infoButton]]] call[m_uiContext.addToolbarButton, parameter[member[.m_toggleButtonRole]]] call[m_uiContext.addToolbarButton, parameter[member[.m_toggleButtonUser]]] call[m_uiContext.addToolbarButton, parameter[member[.m_toggleButtonGroups]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=button, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addToolbarButton, postfix_operators=[], prefix_operators=[], qualifier=m_uiContext, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAdditionalButtons, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=button)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Button, sub_type=None))), label=None) assign[member[.m_filter], call[CmsVaadinUtils.getOUComboBox, parameter[member[.m_cms], member[.m_baseOU], member[.LOG]]]] call[m_filter.setWidth, parameter[literal["379px"]]] call[m_infoLayout.addComponent, parameter[member[.m_filter], literal[0]]] assign[member[.m_filterTable], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextField, sub_type=None))] call[m_filterTable.setIcon, parameter[member[FontOpenCms.FILTER]]] call[m_filterTable.setInputPrompt, parameter[call[Messages.get, parameter[]]]] call[m_filterTable.addStyleName, parameter[member[ValoTheme.TEXTFIELD_INLINE_ICON]]] call[m_filterTable.addTextChangeListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[], body=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getText, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[], type_arguments=None)], member=filterTable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=textChange, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=TextChangeEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TextChangeListener, sub_type=None))]] call[m_filterTable.setWidth, parameter[literal["200px"]]] call[m_infoLayout.addComponent, parameter[member[.m_filterTable]]] call[m_infoLayout.addStyleName, parameter[literal["o-many-elements"]]] call[m_filter.addValueChangeListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[], body=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=m_stateBean, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MemberReference(member=m_doNotChange, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&), else_statement=BlockStatement(label=None, statements=[]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[MethodInvocation(arguments=[], member=getValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), MemberReference(member=OU, postfix_operators=[], prefix_operators=[], qualifier=CmsOuTreeType, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=update, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=valueChange, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ValueChangeEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ValueChangeListener, sub_type=None))]] if[call[m_ouHandler.isOUManagable, parameter[call[m_stateBean.getPath, parameter[]]]]] begin[{] local_variable[type[boolean], change] assign[member[.m_doNotChange], literal[false]] call[m_filter.select, parameter[call[m_filter.getItemIds, parameter[]]]] assign[member[.m_doNotChange], member[.change]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[iniButtons] operator[SEP] operator[SEP] { identifier[m_newButton] operator[=] identifier[CmsToolBar] operator[SEP] identifier[createButton] operator[SEP] identifier[FontOpenCms] operator[SEP] identifier[WAND] , identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_USERMANAGEMENT_ADD_ELEMENT_0] operator[SEP] operator[SEP] operator[SEP] identifier[m_newButton] operator[SEP] identifier[addClickListener] operator[SEP] Keyword[new] identifier[ClickListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[1L] operator[SEP] Keyword[public] Keyword[void] identifier[buttonClick] operator[SEP] identifier[ClickEvent] identifier[event] operator[SEP] { identifier[openNewDialog] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[m_infoButton] operator[=] Keyword[new] identifier[CmsInfoButton] operator[SEP] operator[SEP] operator[SEP] identifier[Button] identifier[csvButton] operator[=] Keyword[new] identifier[Button] operator[SEP] identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_USERMANAGEMENT_EXPORT_ONLY_USER_0] operator[SEP] operator[SEP] operator[SEP] identifier[csvButton] operator[SEP] identifier[addClickListener] operator[SEP] Keyword[new] identifier[ClickListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[5472430305539438757L] operator[SEP] Keyword[public] Keyword[void] identifier[buttonClick] operator[SEP] identifier[ClickEvent] identifier[event] operator[SEP] { Keyword[boolean] identifier[includeTechnicalFields] operator[=] literal[boolean] operator[SEP] Keyword[try] { identifier[OpenCms] operator[SEP] identifier[getRoleManager] operator[SEP] operator[SEP] operator[SEP] identifier[checkRole] operator[SEP] identifier[m_cms] , identifier[CmsRole] operator[SEP] identifier[ADMINISTRATOR] operator[SEP] operator[SEP] identifier[includeTechnicalFields] operator[=] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmsRoleViolationException] identifier[e] operator[SEP] { } identifier[Window] identifier[window] operator[=] identifier[CmsBasicDialog] operator[SEP] identifier[prepareWindow] operator[SEP] identifier[DialogWidth] operator[SEP] identifier[wide] operator[SEP] operator[SEP] identifier[CmsUserCsvExportDialog] identifier[dialog] operator[=] Keyword[new] identifier[CmsUserCsvExportDialog] operator[SEP] identifier[getFullUser] operator[SEP] identifier[getVisibleUser] operator[SEP] operator[SEP] operator[SEP] , identifier[m_stateBean] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] , identifier[m_stateBean] operator[SEP] identifier[getType] operator[SEP] operator[SEP] , identifier[getElementName] operator[SEP] identifier[m_stateBean] operator[SEP] , identifier[CmsVaadinUtils] operator[SEP] identifier[isButtonPressed] operator[SEP] identifier[getToggleButton] operator[SEP] identifier[m_stateBean] operator[SEP] operator[SEP] , identifier[window] , identifier[includeTechnicalFields] operator[SEP] operator[SEP] identifier[window] operator[SEP] identifier[setContent] operator[SEP] identifier[dialog] operator[SEP] operator[SEP] identifier[A_CmsUI] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[addWindow] operator[SEP] identifier[window] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[m_infoButton] operator[SEP] identifier[setAdditionalButton] operator[SEP] identifier[csvButton] operator[SEP] operator[SEP] identifier[m_addElementButton] operator[=] identifier[CmsToolBar] operator[SEP] identifier[createButton] operator[SEP] identifier[FontAwesome] operator[SEP] identifier[PLUS] , identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_USERMANAGEMENT_ADD_USER_TO_GROUP_0] operator[SEP] operator[SEP] operator[SEP] identifier[m_addElementButton] operator[SEP] identifier[addClickListener] operator[SEP] Keyword[new] identifier[ClickListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[1859694635385726953L] operator[SEP] Keyword[public] Keyword[void] identifier[buttonClick] operator[SEP] identifier[ClickEvent] identifier[event] operator[SEP] { identifier[openAddUserDialog] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[m_toggleButtonRole] operator[=] identifier[CmsToolBar] operator[SEP] identifier[createButton] operator[SEP] identifier[FontOpenCms] operator[SEP] identifier[USERS] , identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_USERMANAGEMENT_ROLES_TOGGLE_0] operator[SEP] operator[SEP] operator[SEP] identifier[m_toggleButtonRole] operator[SEP] identifier[addClickListener] operator[SEP] Keyword[new] identifier[ClickListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[8265075332953321274L] operator[SEP] Keyword[public] Keyword[void] identifier[buttonClick] operator[SEP] identifier[ClickEvent] identifier[event] operator[SEP] { identifier[toggleTable] operator[SEP] identifier[m_toggleButtonRole] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[m_toggleButtonUser] operator[=] identifier[CmsToolBar] operator[SEP] identifier[createButton] operator[SEP] identifier[FontOpenCms] operator[SEP] identifier[USERS] , identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_USERMANAGEMENT_USER_TOGGLE_0] operator[SEP] operator[SEP] operator[SEP] identifier[m_toggleButtonUser] operator[SEP] identifier[addClickListener] operator[SEP] Keyword[new] identifier[ClickListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[8265075332953321274L] operator[SEP] Keyword[public] Keyword[void] identifier[buttonClick] operator[SEP] identifier[ClickEvent] identifier[event] operator[SEP] { identifier[toggleTable] operator[SEP] identifier[m_toggleButtonUser] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[m_toggleButtonGroups] operator[=] identifier[CmsToolBar] operator[SEP] identifier[createButton] operator[SEP] identifier[FontOpenCms] operator[SEP] identifier[USERS] , identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_USERMANAGEMENT_GROUPS_TOGGLE_0] operator[SEP] operator[SEP] operator[SEP] identifier[m_toggleButtonGroups] operator[SEP] identifier[addClickListener] operator[SEP] Keyword[new] identifier[ClickListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[8265075332953321274L] operator[SEP] Keyword[public] Keyword[void] identifier[buttonClick] operator[SEP] identifier[ClickEvent] identifier[event] operator[SEP] { identifier[toggleTable] operator[SEP] identifier[m_toggleButtonGroups] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[m_uiContext] operator[SEP] identifier[addToolbarButton] operator[SEP] identifier[m_newButton] operator[SEP] operator[SEP] identifier[m_uiContext] operator[SEP] identifier[addToolbarButton] operator[SEP] identifier[m_addElementButton] operator[SEP] operator[SEP] identifier[m_uiContext] operator[SEP] identifier[addToolbarButton] operator[SEP] identifier[m_infoButton] operator[SEP] operator[SEP] identifier[m_uiContext] operator[SEP] identifier[addToolbarButton] operator[SEP] identifier[m_toggleButtonRole] operator[SEP] operator[SEP] identifier[m_uiContext] operator[SEP] identifier[addToolbarButton] operator[SEP] identifier[m_toggleButtonUser] operator[SEP] operator[SEP] identifier[m_uiContext] operator[SEP] identifier[addToolbarButton] operator[SEP] identifier[m_toggleButtonGroups] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Button] identifier[button] operator[:] identifier[getAdditionalButtons] operator[SEP] operator[SEP] operator[SEP] { identifier[m_uiContext] operator[SEP] identifier[addToolbarButton] operator[SEP] identifier[button] operator[SEP] operator[SEP] } identifier[m_filter] operator[=] identifier[CmsVaadinUtils] operator[SEP] identifier[getOUComboBox] operator[SEP] identifier[m_cms] , identifier[m_baseOU] , identifier[LOG] operator[SEP] operator[SEP] identifier[m_filter] operator[SEP] identifier[setWidth] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[m_infoLayout] operator[SEP] identifier[addComponent] operator[SEP] identifier[m_filter] , Other[0] operator[SEP] operator[SEP] identifier[m_filterTable] operator[=] Keyword[new] identifier[TextField] operator[SEP] operator[SEP] operator[SEP] identifier[m_filterTable] operator[SEP] identifier[setIcon] operator[SEP] identifier[FontOpenCms] operator[SEP] identifier[FILTER] operator[SEP] operator[SEP] identifier[m_filterTable] operator[SEP] identifier[setInputPrompt] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] identifier[UI] operator[SEP] identifier[getCurrent] operator[SEP] operator[SEP] operator[SEP] identifier[getLocale] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_EXPLORER_FILTER_0] operator[SEP] operator[SEP] operator[SEP] identifier[m_filterTable] operator[SEP] identifier[addStyleName] operator[SEP] identifier[ValoTheme] operator[SEP] identifier[TEXTFIELD_INLINE_ICON] operator[SEP] operator[SEP] identifier[m_filterTable] operator[SEP] identifier[addTextChangeListener] operator[SEP] Keyword[new] identifier[TextChangeListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[1L] operator[SEP] Keyword[public] Keyword[void] identifier[textChange] operator[SEP] identifier[TextChangeEvent] identifier[event] operator[SEP] { identifier[filterTable] operator[SEP] identifier[event] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[m_filterTable] operator[SEP] identifier[setWidth] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[m_infoLayout] operator[SEP] identifier[addComponent] operator[SEP] identifier[m_filterTable] operator[SEP] operator[SEP] identifier[m_infoLayout] operator[SEP] identifier[addStyleName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[m_filter] operator[SEP] identifier[addValueChangeListener] operator[SEP] Keyword[new] identifier[ValueChangeListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[1L] operator[SEP] Keyword[public] Keyword[void] identifier[valueChange] operator[SEP] identifier[ValueChangeEvent] identifier[event] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[m_stateBean] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] operator[&] operator[!] identifier[m_doNotChange] operator[SEP] { identifier[update] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[event] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] , identifier[CmsOuTreeType] operator[SEP] identifier[OU] , Other[null] operator[SEP] operator[SEP] } Keyword[else] { } } } operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[m_ouHandler] operator[SEP] identifier[isOUManagable] operator[SEP] identifier[m_stateBean] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[boolean] identifier[change] operator[=] identifier[m_doNotChange] operator[SEP] identifier[m_doNotChange] operator[=] literal[boolean] operator[SEP] identifier[m_filter] operator[SEP] identifier[select] operator[SEP] identifier[m_filter] operator[SEP] identifier[getItemIds] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[m_doNotChange] operator[=] identifier[change] operator[SEP] } }
@FFDCIgnore(BAD_PARAM.class) private boolean isEncodingForWASClassic(ClientRequestInfo ri) { try { int IBM_PV_TC_ID = 0x49424d0a; ri.get_effective_component(IBM_PV_TC_ID); return true; } catch (BAD_PARAM bpe) { // Expected if not talking to a WAS Classic server with an IBM ORB. return false; } }
class class_name[name] begin[{] method[isEncodingForWASClassic, return_type[type[boolean]], modifier[private], parameter[ri]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x49424d0a), name=IBM_PV_TC_ID)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=IBM_PV_TC_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get_effective_component, postfix_operators=[], prefix_operators=[], qualifier=ri, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=bpe, types=['BAD_PARAM']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[FFDCIgnore] operator[SEP] identifier[BAD_PARAM] operator[SEP] Keyword[class] operator[SEP] Keyword[private] Keyword[boolean] identifier[isEncodingForWASClassic] operator[SEP] identifier[ClientRequestInfo] identifier[ri] operator[SEP] { Keyword[try] { Keyword[int] identifier[IBM_PV_TC_ID] operator[=] literal[Integer] operator[SEP] identifier[ri] operator[SEP] identifier[get_effective_component] operator[SEP] identifier[IBM_PV_TC_ID] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[BAD_PARAM] identifier[bpe] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } }
protected String extractInternacionalizedMessage(ConstraintViolation<Object> v) { return interpolator.interpolate(v.getMessageTemplate(), new BeanValidatorContext(v), locale.get()); }
class class_name[name] begin[{] method[extractInternacionalizedMessage, return_type[type[String]], modifier[protected], parameter[v]] begin[{] return[call[interpolator.interpolate, parameter[call[v.getMessageTemplate, parameter[]], ClassCreator(arguments=[MemberReference(member=v, 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=BeanValidatorContext, sub_type=None)), call[locale.get, parameter[]]]]] end[}] END[}]
Keyword[protected] identifier[String] identifier[extractInternacionalizedMessage] operator[SEP] identifier[ConstraintViolation] operator[<] identifier[Object] operator[>] identifier[v] operator[SEP] { Keyword[return] identifier[interpolator] operator[SEP] identifier[interpolate] operator[SEP] identifier[v] operator[SEP] identifier[getMessageTemplate] operator[SEP] operator[SEP] , Keyword[new] identifier[BeanValidatorContext] operator[SEP] identifier[v] operator[SEP] , identifier[locale] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public final ReadSession createReadSession( TableReference tableReference, String parent, int requestedStreams) { CreateReadSessionRequest request = CreateReadSessionRequest.newBuilder() .setTableReference(tableReference) .setParent(parent) .setRequestedStreams(requestedStreams) .build(); return createReadSession(request); }
class class_name[name] begin[{] method[createReadSession, return_type[type[ReadSession]], modifier[final public], parameter[tableReference, parent, requestedStreams]] begin[{] local_variable[type[CreateReadSessionRequest], request] return[call[.createReadSession, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[ReadSession] identifier[createReadSession] operator[SEP] identifier[TableReference] identifier[tableReference] , identifier[String] identifier[parent] , Keyword[int] identifier[requestedStreams] operator[SEP] { identifier[CreateReadSessionRequest] identifier[request] operator[=] identifier[CreateReadSessionRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setTableReference] operator[SEP] identifier[tableReference] operator[SEP] operator[SEP] identifier[setParent] operator[SEP] identifier[parent] operator[SEP] operator[SEP] identifier[setRequestedStreams] operator[SEP] identifier[requestedStreams] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[createReadSession] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static <T> T mode(Collection<T> values) { Set<T> modes = modes(values); return modes.iterator().next(); }
class class_name[name] begin[{] method[mode, return_type[type[T]], modifier[public static], parameter[values]] begin[{] local_variable[type[Set], modes] return[call[modes.iterator, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[mode] operator[SEP] identifier[Collection] operator[<] identifier[T] operator[>] identifier[values] operator[SEP] { identifier[Set] operator[<] identifier[T] operator[>] identifier[modes] operator[=] identifier[modes] operator[SEP] identifier[values] operator[SEP] operator[SEP] Keyword[return] identifier[modes] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] }
public static void checkNullArgument(Object obj, String variableName) { if (null == obj) { throw new NullPointerException(ExceptionMessageMap.getMessage("000003") + " { variableName=[" + variableName + "] }"); } }
class class_name[name] begin[{] method[checkNullArgument, return_type[void], modifier[public static], parameter[obj, variableName]] begin[{] if[binary_operation[literal[null], ==, member[.obj]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="000003")], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ExceptionMessageMap, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" { variableName=["), operator=+), operandr=MemberReference(member=variableName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] }"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[checkNullArgument] operator[SEP] identifier[Object] identifier[obj] , identifier[String] identifier[variableName] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[obj] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] identifier[ExceptionMessageMap] operator[SEP] identifier[getMessage] operator[SEP] literal[String] operator[SEP] operator[+] literal[String] operator[+] identifier[variableName] operator[+] literal[String] operator[SEP] operator[SEP] } }
public static void start() { synchronized (lock) { if (singleton != null) return; ZkLeaderElection leaderElection = new ZkLeaderElection(); LeaderSelectorListener listener = new LeaderSelectorListenerAdapter() { public void takeLeadership(CuratorFramework client) throws InterruptedException { LOG.info("被提升为主节点!"); try { Thread.sleep(Long.MAX_VALUE); } catch (InterruptedException e) { LOG.info("节点主动断开 or 主动让出主节点身份?反正此处是预期的打断!不需要打印堆栈"); } finally { LOG.info("主节点降级为普通节点!"); } } }; leaderElection.leaderSelector = new LeaderSelector(ZkConnection.client, ZkPathManager.getMyNodeBasePath(), listener); leaderElection.leaderSelector.autoRequeue(); //not required, but this is behavior that you will probably expect leaderElection.leaderSelector.start(); singleton = leaderElection; LOG.info("ZkLeaderElection启动完毕."); } }
class class_name[name] begin[{] method[start, return_type[void], modifier[public static], parameter[]] begin[{] SYNCHRONIZED[member[.lock]] BEGIN[{] if[binary_operation[member[.singleton], !=, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[ZkLeaderElection], leaderElection] local_variable[type[LeaderSelectorListener], listener] assign[member[leaderElection.leaderSelector], ClassCreator(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=ZkConnection, selectors=[]), MethodInvocation(arguments=[], member=getMyNodeBasePath, postfix_operators=[], prefix_operators=[], qualifier=ZkPathManager, selectors=[], type_arguments=None), MemberReference(member=listener, 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=LeaderSelector, sub_type=None))] call[leaderElection.leaderSelector.autoRequeue, parameter[]] call[leaderElection.leaderSelector.start, parameter[]] assign[member[.singleton], member[.leaderElection]] call[LOG.info, parameter[literal["ZkLeaderElection启动完毕."]]] END[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[start] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] { Keyword[if] operator[SEP] identifier[singleton] operator[!=] Other[null] operator[SEP] Keyword[return] operator[SEP] identifier[ZkLeaderElection] identifier[leaderElection] operator[=] Keyword[new] identifier[ZkLeaderElection] operator[SEP] operator[SEP] operator[SEP] identifier[LeaderSelectorListener] identifier[listener] operator[=] Keyword[new] identifier[LeaderSelectorListenerAdapter] operator[SEP] operator[SEP] { Keyword[public] Keyword[void] identifier[takeLeadership] operator[SEP] identifier[CuratorFramework] identifier[client] operator[SEP] Keyword[throws] identifier[InterruptedException] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[Thread] operator[SEP] identifier[sleep] operator[SEP] identifier[Long] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[finally] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] } } } operator[SEP] identifier[leaderElection] operator[SEP] identifier[leaderSelector] operator[=] Keyword[new] identifier[LeaderSelector] operator[SEP] identifier[ZkConnection] operator[SEP] identifier[client] , identifier[ZkPathManager] operator[SEP] identifier[getMyNodeBasePath] operator[SEP] operator[SEP] , identifier[listener] operator[SEP] operator[SEP] identifier[leaderElection] operator[SEP] identifier[leaderSelector] operator[SEP] identifier[autoRequeue] operator[SEP] operator[SEP] operator[SEP] identifier[leaderElection] operator[SEP] identifier[leaderSelector] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] identifier[singleton] operator[=] identifier[leaderElection] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] } }