code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
boolean hasTransformation() { String transformationPath = getTransformationPath(); boolean result = (transformationPath != null) && new File(transformationPath).exists(); if (result) { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_XSLT_CONFIG_ENABLED_1, transformationPath)); } else { CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_XSLT_CONFIG_DISABLED_0)); } return result; }
class class_name[name] begin[{] method[hasTransformation, return_type[type[boolean]], modifier[default], parameter[]] begin[{] local_variable[type[String], transformationPath] local_variable[type[boolean], result] if[member[.result]] begin[{] call[CmsLog.INIT.info, parameter[call[Messages.get, parameter[]]]] else begin[{] call[CmsLog.INIT.info, parameter[call[Messages.get, parameter[]]]] end[}] return[member[.result]] end[}] END[}]
Keyword[boolean] identifier[hasTransformation] operator[SEP] operator[SEP] { identifier[String] identifier[transformationPath] operator[=] identifier[getTransformationPath] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[result] operator[=] operator[SEP] identifier[transformationPath] operator[!=] Other[null] operator[SEP] operator[&&] Keyword[new] identifier[File] operator[SEP] identifier[transformationPath] operator[SEP] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[SEP] { identifier[CmsLog] operator[SEP] identifier[INIT] operator[SEP] identifier[info] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[INIT_XSLT_CONFIG_ENABLED_1] , identifier[transformationPath] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[CmsLog] operator[SEP] identifier[INIT] operator[SEP] identifier[info] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[INIT_XSLT_CONFIG_DISABLED_0] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public final void modifyPushConfig(ProjectSubscriptionName subscription, PushConfig pushConfig) { ModifyPushConfigRequest request = ModifyPushConfigRequest.newBuilder() .setSubscription(subscription == null ? null : subscription.toString()) .setPushConfig(pushConfig) .build(); modifyPushConfig(request); }
class class_name[name] begin[{] method[modifyPushConfig, return_type[void], modifier[final public], parameter[subscription, pushConfig]] begin[{] local_variable[type[ModifyPushConfigRequest], request] call[.modifyPushConfig, parameter[member[.request]]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[modifyPushConfig] operator[SEP] identifier[ProjectSubscriptionName] identifier[subscription] , identifier[PushConfig] identifier[pushConfig] operator[SEP] { identifier[ModifyPushConfigRequest] identifier[request] operator[=] identifier[ModifyPushConfigRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setSubscription] operator[SEP] identifier[subscription] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[subscription] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setPushConfig] operator[SEP] identifier[pushConfig] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[modifyPushConfig] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public void debug(Object object) { if (isDebugEnabled()) { if (object instanceof Throwable) { debugThrowable((Throwable) object); } else { debugString("" + object); } } }
class class_name[name] begin[{] method[debug, return_type[void], modifier[public], parameter[object]] begin[{] if[call[.isDebugEnabled, parameter[]]] begin[{] if[binary_operation[member[.object], instanceof, type[Throwable]]] begin[{] call[.debugThrowable, parameter[Cast(expression=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None))]] else begin[{] call[.debugString, parameter[binary_operation[literal[""], +, member[.object]]]] end[}] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[debug] operator[SEP] identifier[Object] identifier[object] operator[SEP] { Keyword[if] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[Throwable] operator[SEP] { identifier[debugThrowable] operator[SEP] operator[SEP] identifier[Throwable] operator[SEP] identifier[object] operator[SEP] operator[SEP] } Keyword[else] { identifier[debugString] operator[SEP] literal[String] operator[+] identifier[object] operator[SEP] operator[SEP] } } }
public static Color stringToColor(String str) { int icol = SVG_COLOR_NAMES.getInt(str.toLowerCase()); if(icol != NO_VALUE) { return new Color(icol, false); } return colorLookupStylesheet.stringToColor(str); }
class class_name[name] begin[{] method[stringToColor, return_type[type[Color]], modifier[public static], parameter[str]] begin[{] local_variable[type[int], icol] if[binary_operation[member[.icol], !=, member[.NO_VALUE]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=icol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Color, sub_type=None))] else begin[{] None end[}] return[call[colorLookupStylesheet.stringToColor, parameter[member[.str]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Color] identifier[stringToColor] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[int] identifier[icol] operator[=] identifier[SVG_COLOR_NAMES] operator[SEP] identifier[getInt] operator[SEP] identifier[str] operator[SEP] identifier[toLowerCase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[icol] operator[!=] identifier[NO_VALUE] operator[SEP] { Keyword[return] Keyword[new] identifier[Color] operator[SEP] identifier[icol] , literal[boolean] operator[SEP] operator[SEP] } Keyword[return] identifier[colorLookupStylesheet] operator[SEP] identifier[stringToColor] operator[SEP] identifier[str] operator[SEP] operator[SEP] }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <R> Observable<R> replay(Function<? super Observable<T>, ? extends ObservableSource<R>> selector) { ObjectHelper.requireNonNull(selector, "selector is null"); return ObservableReplay.multicastSelector(ObservableInternalHelper.replayCallable(this), selector); }
class class_name[name] begin[{] method[replay, return_type[type[Observable]], modifier[final public], parameter[selector]] begin[{] call[ObjectHelper.requireNonNull, parameter[member[.selector], literal["selector is null"]]] return[call[ObservableReplay.multicastSelector, parameter[call[ObservableInternalHelper.replayCallable, parameter[THIS[]]], member[.selector]]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[NONE] operator[SEP] Keyword[public] Keyword[final] operator[<] identifier[R] operator[>] identifier[Observable] operator[<] identifier[R] operator[>] identifier[replay] operator[SEP] identifier[Function] operator[<] operator[?] Keyword[super] identifier[Observable] operator[<] identifier[T] operator[>] , operator[?] Keyword[extends] identifier[ObservableSource] operator[<] identifier[R] operator[>] operator[>] identifier[selector] operator[SEP] { identifier[ObjectHelper] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[selector] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[ObservableReplay] operator[SEP] identifier[multicastSelector] operator[SEP] identifier[ObservableInternalHelper] operator[SEP] identifier[replayCallable] operator[SEP] Keyword[this] operator[SEP] , identifier[selector] operator[SEP] operator[SEP] }
public void setOutboundInterface(SipURI outboundInterface) { if(outboundInterface == null) { throw new NullPointerException("outbound Interface param shouldn't be null"); } List<SipURI> list = this.sipFactoryImpl.getSipNetworkInterfaceManager().getOutboundInterfaces(); SipURI networkInterface = null; for(SipURI networkInterfaceURI : list) { if(networkInterfaceURI.equals(outboundInterface)) { networkInterface = networkInterfaceURI; break; } } if(networkInterface == null) throw new IllegalArgumentException("Network interface for " + outboundInterface + " not found"); this.outboundInterface = networkInterface; }
class class_name[name] begin[{] method[setOutboundInterface, return_type[void], modifier[public], parameter[outboundInterface]] begin[{] if[binary_operation[member[.outboundInterface], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="outbound Interface param shouldn't be null")], 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[}] local_variable[type[List], list] local_variable[type[SipURI], networkInterface] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=outboundInterface, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=networkInterfaceURI, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=networkInterface, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=networkInterfaceURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=networkInterfaceURI)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SipURI, sub_type=None))), label=None) if[binary_operation[member[.networkInterface], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Network interface for "), operandr=MemberReference(member=outboundInterface, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" not found"), 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[}] assign[THIS[member[None.outboundInterface]], member[.networkInterface]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setOutboundInterface] operator[SEP] identifier[SipURI] identifier[outboundInterface] operator[SEP] { Keyword[if] operator[SEP] identifier[outboundInterface] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[SipURI] operator[>] identifier[list] operator[=] Keyword[this] operator[SEP] identifier[sipFactoryImpl] operator[SEP] identifier[getSipNetworkInterfaceManager] operator[SEP] operator[SEP] operator[SEP] identifier[getOutboundInterfaces] operator[SEP] operator[SEP] operator[SEP] identifier[SipURI] identifier[networkInterface] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[SipURI] identifier[networkInterfaceURI] operator[:] identifier[list] operator[SEP] { Keyword[if] operator[SEP] identifier[networkInterfaceURI] operator[SEP] identifier[equals] operator[SEP] identifier[outboundInterface] operator[SEP] operator[SEP] { identifier[networkInterface] operator[=] identifier[networkInterfaceURI] operator[SEP] Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[networkInterface] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[outboundInterface] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[outboundInterface] operator[=] identifier[networkInterface] operator[SEP] }
public static <T extends Comparable<T>> Matcher<T> betweenLowerBoundInclusive(final T from, final T to) { return new IsBetweenLowerBoundInclusive(from, to); }
class class_name[name] begin[{] method[betweenLowerBoundInclusive, return_type[type[Matcher]], modifier[public static], parameter[from, to]] begin[{] return[ClassCreator(arguments=[MemberReference(member=from, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=to, 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=IsBetweenLowerBoundInclusive, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Comparable] operator[<] identifier[T] operator[>] operator[>] identifier[Matcher] operator[<] identifier[T] operator[>] identifier[betweenLowerBoundInclusive] operator[SEP] Keyword[final] identifier[T] identifier[from] , Keyword[final] identifier[T] identifier[to] operator[SEP] { Keyword[return] Keyword[new] identifier[IsBetweenLowerBoundInclusive] operator[SEP] identifier[from] , identifier[to] operator[SEP] operator[SEP] }
public static Object unwrap( Object obj ) { // map voids to nulls for the outside world if (obj == Primitive.VOID) return null; // unwrap primitives if (obj instanceof Primitive) return((Primitive)obj).getValue(); return obj; }
class class_name[name] begin[{] method[unwrap, return_type[type[Object]], modifier[public static], parameter[obj]] begin[{] if[binary_operation[member[.obj], ==, member[Primitive.VOID]]] begin[{] return[literal[null]] else begin[{] None end[}] if[binary_operation[member[.obj], instanceof, type[Primitive]]] begin[{] return[Cast(expression=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Primitive, sub_type=None))] else begin[{] None end[}] return[member[.obj]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[unwrap] operator[SEP] identifier[Object] identifier[obj] operator[SEP] { Keyword[if] operator[SEP] identifier[obj] operator[==] identifier[Primitive] operator[SEP] identifier[VOID] operator[SEP] Keyword[return] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[obj] Keyword[instanceof] identifier[Primitive] operator[SEP] Keyword[return] operator[SEP] operator[SEP] identifier[Primitive] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[obj] operator[SEP] }
public static URL getDocumentation(Class<?> comp, Locale loc) { Documentation doc = (Documentation) comp.getAnnotation(Documentation.class); if (doc != null) { String v = doc.value(); try { // try full URL first (external reference) URL url = new URL(v); return url; } catch (MalformedURLException E) { // local resource bundled with the class String name = v.substring(0, v.lastIndexOf('.')); String ext = v.substring(v.lastIndexOf('.')); String lang = loc.getLanguage(); URL f = comp.getResource(name + "_" + lang + ext); if (f != null) { return f; } f = comp.getResource(v); if (f != null) { return f; } } } return null; }
class class_name[name] begin[{] method[getDocumentation, return_type[type[URL]], modifier[public static], parameter[comp, loc]] begin[{] local_variable[type[Documentation], doc] if[binary_operation[member[.doc], !=, literal[null]]] begin[{] local_variable[type[String], v] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=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=URL, sub_type=None)), name=url)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URL, sub_type=None)), ReturnStatement(expression=MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.')], member=lastIndexOf, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[], type_arguments=None), name=ext)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getLanguage, postfix_operators=[], prefix_operators=[], qualifier=loc, selectors=[], type_arguments=None), name=lang)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="_"), operator=+), operandr=MemberReference(member=lang, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MemberReference(member=ext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=getResource, postfix_operators=[], prefix_operators=[], qualifier=comp, selectors=[], type_arguments=None), name=f)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=URL, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=f, 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=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResource, postfix_operators=[], prefix_operators=[], qualifier=comp, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=f, 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=f, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=E, types=['MalformedURLException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[URL] identifier[getDocumentation] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[comp] , identifier[Locale] identifier[loc] operator[SEP] { identifier[Documentation] identifier[doc] operator[=] operator[SEP] identifier[Documentation] operator[SEP] identifier[comp] operator[SEP] identifier[getAnnotation] operator[SEP] identifier[Documentation] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[doc] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[v] operator[=] identifier[doc] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[URL] identifier[url] operator[=] Keyword[new] identifier[URL] operator[SEP] identifier[v] operator[SEP] operator[SEP] Keyword[return] identifier[url] operator[SEP] } Keyword[catch] operator[SEP] identifier[MalformedURLException] identifier[E] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[v] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[v] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[ext] operator[=] identifier[v] operator[SEP] identifier[substring] operator[SEP] identifier[v] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[lang] operator[=] identifier[loc] operator[SEP] identifier[getLanguage] operator[SEP] operator[SEP] operator[SEP] identifier[URL] identifier[f] operator[=] identifier[comp] operator[SEP] identifier[getResource] operator[SEP] identifier[name] operator[+] literal[String] operator[+] identifier[lang] operator[+] identifier[ext] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[f] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[f] operator[SEP] } identifier[f] operator[=] identifier[comp] operator[SEP] identifier[getResource] operator[SEP] identifier[v] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[f] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[f] operator[SEP] } } } Keyword[return] Other[null] operator[SEP] }
public ImageDownloadResult getImageDownloadResultWait() throws Exception { try { ImageDownloadResult imdr = pool.take().get(); return imdr; } catch (Exception e) { throw e; } finally { // in any case (Exception or not) the numPendingTask should be reduced numPendingTasks--; } }
class class_name[name] begin[{] method[getImageDownloadResultWait, return_type[type[ImageDownloadResult]], modifier[public], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=take, postfix_operators=[], prefix_operators=[], qualifier=pool, selectors=[MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=imdr)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ImageDownloadResult, sub_type=None)), ReturnStatement(expression=MemberReference(member=imdr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=[StatementExpression(expression=MemberReference(member=numPendingTasks, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] identifier[ImageDownloadResult] identifier[getImageDownloadResultWait] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[try] { identifier[ImageDownloadResult] identifier[imdr] operator[=] identifier[pool] operator[SEP] identifier[take] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[imdr] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[finally] { identifier[numPendingTasks] operator[--] operator[SEP] } }
public FactPattern getLHSBoundFact(final String var) { if (this.lhs == null) { return null; } for (int i = 0; i < this.lhs.length; i++) { IPattern pat = this.lhs[i]; if (pat instanceof FromCompositeFactPattern) { pat = ((FromCompositeFactPattern) pat).getFactPattern(); } if (pat instanceof FactPattern) { final FactPattern p = (FactPattern) pat; if (p.getBoundName() != null && var.equals(p.getBoundName())) { return p; } } } return null; }
class class_name[name] begin[{] method[getLHSBoundFact, return_type[type[FactPattern]], modifier[public], parameter[var]] begin[{] if[binary_operation[THIS[member[None.lhs]], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=lhs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=pat)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IPattern, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=FromCompositeFactPattern, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=pat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MemberReference(member=pat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=FromCompositeFactPattern, sub_type=None))), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=pat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=FactPattern, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=pat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=FactPattern, sub_type=None)), name=p)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=FactPattern, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getBoundName, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBoundName, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=var, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=lhs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[literal[null]] end[}] END[}]
Keyword[public] identifier[FactPattern] identifier[getLHSBoundFact] operator[SEP] Keyword[final] identifier[String] identifier[var] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[lhs] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] Keyword[this] operator[SEP] identifier[lhs] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[IPattern] identifier[pat] operator[=] Keyword[this] operator[SEP] identifier[lhs] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[pat] Keyword[instanceof] identifier[FromCompositeFactPattern] operator[SEP] { identifier[pat] operator[=] operator[SEP] operator[SEP] identifier[FromCompositeFactPattern] operator[SEP] identifier[pat] operator[SEP] operator[SEP] identifier[getFactPattern] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[pat] Keyword[instanceof] identifier[FactPattern] operator[SEP] { Keyword[final] identifier[FactPattern] identifier[p] operator[=] operator[SEP] identifier[FactPattern] operator[SEP] identifier[pat] operator[SEP] Keyword[if] operator[SEP] identifier[p] operator[SEP] identifier[getBoundName] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[var] operator[SEP] identifier[equals] operator[SEP] identifier[p] operator[SEP] identifier[getBoundName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[p] operator[SEP] } } } Keyword[return] Other[null] operator[SEP] }
public static String changeTimestampToNewFormat(String isoTimestamp, ZoneId zoneID, DateTimeFormatter newFormat) { return ZonedDateTime.parse(isoTimestamp).withZoneSameInstant(zoneID) .format(newFormat); }
class class_name[name] begin[{] method[changeTimestampToNewFormat, return_type[type[String]], modifier[public static], parameter[isoTimestamp, zoneID, newFormat]] begin[{] return[call[ZonedDateTime.parse, parameter[member[.isoTimestamp]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[changeTimestampToNewFormat] operator[SEP] identifier[String] identifier[isoTimestamp] , identifier[ZoneId] identifier[zoneID] , identifier[DateTimeFormatter] identifier[newFormat] operator[SEP] { Keyword[return] identifier[ZonedDateTime] operator[SEP] identifier[parse] operator[SEP] identifier[isoTimestamp] operator[SEP] operator[SEP] identifier[withZoneSameInstant] operator[SEP] identifier[zoneID] operator[SEP] operator[SEP] identifier[format] operator[SEP] identifier[newFormat] operator[SEP] operator[SEP] }
public IntronSequence addIntron(AccessionID accession, int begin, int end) throws Exception { if (intronSequenceHashMap.containsKey(accession.getID())) { throw new Exception("Duplicate accesion id " + accession.getID()); } intronAdded = true; IntronSequence intronSequence = new IntronSequence(this, begin, end); // working off the assumption that intron frame is always 0 or doesn't matter and same sense as parent intronSequence.setAccession(accession); intronSequenceList.add(intronSequence); intronSequenceHashMap.put(accession.getID(), intronSequence); return intronSequence; }
class class_name[name] begin[{] method[addIntron, return_type[type[IntronSequence]], modifier[public], parameter[accession, begin, end]] begin[{] if[call[intronSequenceHashMap.containsKey, parameter[call[accession.getID, parameter[]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Duplicate accesion id "), operandr=MethodInvocation(arguments=[], member=getID, postfix_operators=[], prefix_operators=[], qualifier=accession, 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=Exception, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.intronAdded], literal[true]] local_variable[type[IntronSequence], intronSequence] call[intronSequence.setAccession, parameter[member[.accession]]] call[intronSequenceList.add, parameter[member[.intronSequence]]] call[intronSequenceHashMap.put, parameter[call[accession.getID, parameter[]], member[.intronSequence]]] return[member[.intronSequence]] end[}] END[}]
Keyword[public] identifier[IntronSequence] identifier[addIntron] operator[SEP] identifier[AccessionID] identifier[accession] , Keyword[int] identifier[begin] , Keyword[int] identifier[end] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[if] operator[SEP] identifier[intronSequenceHashMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[accession] operator[SEP] identifier[getID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[accession] operator[SEP] identifier[getID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[intronAdded] operator[=] literal[boolean] operator[SEP] identifier[IntronSequence] identifier[intronSequence] operator[=] Keyword[new] identifier[IntronSequence] operator[SEP] Keyword[this] , identifier[begin] , identifier[end] operator[SEP] operator[SEP] identifier[intronSequence] operator[SEP] identifier[setAccession] operator[SEP] identifier[accession] operator[SEP] operator[SEP] identifier[intronSequenceList] operator[SEP] identifier[add] operator[SEP] identifier[intronSequence] operator[SEP] operator[SEP] identifier[intronSequenceHashMap] operator[SEP] identifier[put] operator[SEP] identifier[accession] operator[SEP] identifier[getID] operator[SEP] operator[SEP] , identifier[intronSequence] operator[SEP] operator[SEP] Keyword[return] identifier[intronSequence] operator[SEP] }
public static IAction register(boolean asGlobal, String id, String label, String script) { return register(asGlobal, new Action(id, label, script)); }
class class_name[name] begin[{] method[register, return_type[type[IAction]], modifier[public static], parameter[asGlobal, id, label, script]] begin[{] return[call[.register, parameter[member[.asGlobal], ClassCreator(arguments=[MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=label, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=script, 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=Action, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[IAction] identifier[register] operator[SEP] Keyword[boolean] identifier[asGlobal] , identifier[String] identifier[id] , identifier[String] identifier[label] , identifier[String] identifier[script] operator[SEP] { Keyword[return] identifier[register] operator[SEP] identifier[asGlobal] , Keyword[new] identifier[Action] operator[SEP] identifier[id] , identifier[label] , identifier[script] operator[SEP] operator[SEP] operator[SEP] }
public void setRules(java.util.Collection<MappingRule> rules) { if (rules == null) { this.rules = null; return; } this.rules = new java.util.ArrayList<MappingRule>(rules); }
class class_name[name] begin[{] method[setRules, return_type[void], modifier[public], parameter[rules]] begin[{] if[binary_operation[member[.rules], ==, literal[null]]] begin[{] assign[THIS[member[None.rules]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.rules]], ClassCreator(arguments=[MemberReference(member=rules, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=MappingRule, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setRules] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[MappingRule] operator[>] identifier[rules] operator[SEP] { Keyword[if] operator[SEP] identifier[rules] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[rules] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[rules] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[MappingRule] operator[>] operator[SEP] identifier[rules] operator[SEP] operator[SEP] }
public static StoreConfig newInstance(File filePath) throws IOException { File homeDir; Properties p = new Properties(); if(filePath.exists()) { if(filePath.isDirectory()) { homeDir = filePath; File propertiesFile = new File(filePath, CONFIG_PROPERTIES_FILE); if(propertiesFile.exists()) { FileReader reader = new FileReader(propertiesFile); p.load(reader); reader.close(); } else { throw new FileNotFoundException(propertiesFile.toString()); } } else { homeDir = filePath.getParentFile(); FileReader reader = new FileReader(filePath); p.load(reader); reader.close(); } } else { throw new FileNotFoundException(filePath.toString()); } int initialCapacity = -1; String initialCapacityStr = p.getProperty(StoreParams.PARAM_INITIAL_CAPACITY); if(initialCapacityStr == null) { throw new InvalidStoreConfigException(StoreParams.PARAM_INITIAL_CAPACITY + " not found"); } else if((initialCapacity = parseInt(StoreParams.PARAM_INITIAL_CAPACITY, initialCapacityStr, -1)) < 1) { throw new InvalidStoreConfigException(StoreParams.PARAM_INITIAL_CAPACITY + "=" + initialCapacityStr); } int partitionStart = -1; int partitionCount = -1; String partitionStartStr = p.getProperty(StoreParams.PARAM_PARTITION_START); String partitionCountStr = p.getProperty(StoreParams.PARAM_PARTITION_COUNT); if(partitionStartStr != null && partitionCountStr != null) { if((partitionStart = parseInt(StoreParams.PARAM_PARTITION_START, partitionStartStr, -1)) < 0) { throw new InvalidStoreConfigException(StoreParams.PARAM_PARTITION_START + "=" + partitionStartStr); } if((partitionCount = parseInt(StoreParams.PARAM_PARTITION_COUNT, partitionCountStr, -1)) < 1) { throw new InvalidStoreConfigException(StoreParams.PARAM_PARTITION_COUNT + "=" + partitionCountStr); } } else { return new StoreConfig(homeDir, initialCapacity); } return new StorePartitionConfig(homeDir, partitionStart, partitionCount); }
class class_name[name] begin[{] method[newInstance, return_type[type[StoreConfig]], modifier[public static], parameter[filePath]] begin[{] local_variable[type[File], homeDir] local_variable[type[Properties], p] if[call[filePath.exists, parameter[]]] begin[{] if[call[filePath.isDirectory, parameter[]]] begin[{] assign[member[.homeDir], member[.filePath]] local_variable[type[File], propertiesFile] if[call[propertiesFile.exists, parameter[]]] begin[{] local_variable[type[FileReader], reader] call[p.load, parameter[member[.reader]]] call[reader.close, parameter[]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=propertiesFile, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileNotFoundException, sub_type=None)), label=None) end[}] else begin[{] assign[member[.homeDir], call[filePath.getParentFile, parameter[]]] local_variable[type[FileReader], reader] call[p.load, parameter[member[.reader]]] call[reader.close, parameter[]] end[}] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=filePath, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileNotFoundException, sub_type=None)), label=None) end[}] local_variable[type[int], initialCapacity] local_variable[type[String], initialCapacityStr] if[binary_operation[member[.initialCapacityStr], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=PARAM_INITIAL_CAPACITY, postfix_operators=[], prefix_operators=[], qualifier=StoreParams, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" not found"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidStoreConfigException, sub_type=None)), label=None) else begin[{] if[binary_operation[assign[member[.initialCapacity], call[.parseInt, parameter[member[StoreParams.PARAM_INITIAL_CAPACITY], member[.initialCapacityStr], literal[1]]]], <, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=PARAM_INITIAL_CAPACITY, postfix_operators=[], prefix_operators=[], qualifier=StoreParams, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="="), operator=+), operandr=MemberReference(member=initialCapacityStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidStoreConfigException, sub_type=None)), label=None) else begin[{] None end[}] end[}] local_variable[type[int], partitionStart] local_variable[type[int], partitionCount] local_variable[type[String], partitionStartStr] local_variable[type[String], partitionCountStr] if[binary_operation[binary_operation[member[.partitionStartStr], !=, literal[null]], &&, binary_operation[member[.partitionCountStr], !=, literal[null]]]] begin[{] if[binary_operation[assign[member[.partitionStart], call[.parseInt, parameter[member[StoreParams.PARAM_PARTITION_START], member[.partitionStartStr], literal[1]]]], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=PARAM_PARTITION_START, postfix_operators=[], prefix_operators=[], qualifier=StoreParams, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="="), operator=+), operandr=MemberReference(member=partitionStartStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidStoreConfigException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[assign[member[.partitionCount], call[.parseInt, parameter[member[StoreParams.PARAM_PARTITION_COUNT], member[.partitionCountStr], literal[1]]]], <, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=PARAM_PARTITION_COUNT, postfix_operators=[], prefix_operators=[], qualifier=StoreParams, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="="), operator=+), operandr=MemberReference(member=partitionCountStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidStoreConfigException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] return[ClassCreator(arguments=[MemberReference(member=homeDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=initialCapacity, 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=StoreConfig, sub_type=None))] end[}] return[ClassCreator(arguments=[MemberReference(member=homeDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=partitionStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=partitionCount, 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=StorePartitionConfig, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[StoreConfig] identifier[newInstance] operator[SEP] identifier[File] identifier[filePath] operator[SEP] Keyword[throws] identifier[IOException] { identifier[File] identifier[homeDir] operator[SEP] identifier[Properties] identifier[p] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[filePath] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[filePath] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[homeDir] operator[=] identifier[filePath] operator[SEP] identifier[File] identifier[propertiesFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[filePath] , identifier[CONFIG_PROPERTIES_FILE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[propertiesFile] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { identifier[FileReader] identifier[reader] operator[=] Keyword[new] identifier[FileReader] operator[SEP] identifier[propertiesFile] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[load] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[FileNotFoundException] operator[SEP] identifier[propertiesFile] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[homeDir] operator[=] identifier[filePath] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] identifier[FileReader] identifier[reader] operator[=] Keyword[new] identifier[FileReader] operator[SEP] identifier[filePath] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[load] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[reader] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[throw] Keyword[new] identifier[FileNotFoundException] operator[SEP] identifier[filePath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[initialCapacity] operator[=] operator[-] Other[1] operator[SEP] identifier[String] identifier[initialCapacityStr] operator[=] identifier[p] operator[SEP] identifier[getProperty] operator[SEP] identifier[StoreParams] operator[SEP] identifier[PARAM_INITIAL_CAPACITY] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[initialCapacityStr] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidStoreConfigException] operator[SEP] identifier[StoreParams] operator[SEP] identifier[PARAM_INITIAL_CAPACITY] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[initialCapacity] operator[=] identifier[parseInt] operator[SEP] identifier[StoreParams] operator[SEP] identifier[PARAM_INITIAL_CAPACITY] , identifier[initialCapacityStr] , operator[-] Other[1] operator[SEP] operator[SEP] operator[<] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidStoreConfigException] operator[SEP] identifier[StoreParams] operator[SEP] identifier[PARAM_INITIAL_CAPACITY] operator[+] literal[String] operator[+] identifier[initialCapacityStr] operator[SEP] operator[SEP] } Keyword[int] identifier[partitionStart] operator[=] operator[-] Other[1] operator[SEP] Keyword[int] identifier[partitionCount] operator[=] operator[-] Other[1] operator[SEP] identifier[String] identifier[partitionStartStr] operator[=] identifier[p] operator[SEP] identifier[getProperty] operator[SEP] identifier[StoreParams] operator[SEP] identifier[PARAM_PARTITION_START] operator[SEP] operator[SEP] identifier[String] identifier[partitionCountStr] operator[=] identifier[p] operator[SEP] identifier[getProperty] operator[SEP] identifier[StoreParams] operator[SEP] identifier[PARAM_PARTITION_COUNT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[partitionStartStr] operator[!=] Other[null] operator[&&] identifier[partitionCountStr] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[partitionStart] operator[=] identifier[parseInt] operator[SEP] identifier[StoreParams] operator[SEP] identifier[PARAM_PARTITION_START] , identifier[partitionStartStr] , operator[-] Other[1] operator[SEP] operator[SEP] operator[<] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidStoreConfigException] operator[SEP] identifier[StoreParams] operator[SEP] identifier[PARAM_PARTITION_START] operator[+] literal[String] operator[+] identifier[partitionStartStr] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[SEP] identifier[partitionCount] operator[=] identifier[parseInt] operator[SEP] identifier[StoreParams] operator[SEP] identifier[PARAM_PARTITION_COUNT] , identifier[partitionCountStr] , operator[-] Other[1] operator[SEP] operator[SEP] operator[<] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidStoreConfigException] operator[SEP] identifier[StoreParams] operator[SEP] identifier[PARAM_PARTITION_COUNT] operator[+] literal[String] operator[+] identifier[partitionCountStr] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[return] Keyword[new] identifier[StoreConfig] operator[SEP] identifier[homeDir] , identifier[initialCapacity] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[StorePartitionConfig] operator[SEP] identifier[homeDir] , identifier[partitionStart] , identifier[partitionCount] operator[SEP] operator[SEP] }
private Future<?> sendKeys(final MapStoreContext mapStoreContext, final boolean replaceExistingValues) { if (keyLoadFinished.isDone()) { keyLoadFinished = new LoadFinishedFuture(); Future<Boolean> sent = execService.submit(MAP_LOAD_ALL_KEYS_EXECUTOR, () -> { sendKeysInBatches(mapStoreContext, replaceExistingValues); return false; }); execService.asCompletableFuture(sent).andThen(keyLoadFinished); } return keyLoadFinished; }
class class_name[name] begin[{] method[sendKeys, return_type[type[Future]], modifier[private], parameter[mapStoreContext, replaceExistingValues]] begin[{] if[call[keyLoadFinished.isDone, parameter[]]] begin[{] assign[member[.keyLoadFinished], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LoadFinishedFuture, sub_type=None))] local_variable[type[Future], sent] call[execService.asCompletableFuture, parameter[member[.sent]]] else begin[{] None end[}] return[member[.keyLoadFinished]] end[}] END[}]
Keyword[private] identifier[Future] operator[<] operator[?] operator[>] identifier[sendKeys] operator[SEP] Keyword[final] identifier[MapStoreContext] identifier[mapStoreContext] , Keyword[final] Keyword[boolean] identifier[replaceExistingValues] operator[SEP] { Keyword[if] operator[SEP] identifier[keyLoadFinished] operator[SEP] identifier[isDone] operator[SEP] operator[SEP] operator[SEP] { identifier[keyLoadFinished] operator[=] Keyword[new] identifier[LoadFinishedFuture] operator[SEP] operator[SEP] operator[SEP] identifier[Future] operator[<] identifier[Boolean] operator[>] identifier[sent] operator[=] identifier[execService] operator[SEP] identifier[submit] operator[SEP] identifier[MAP_LOAD_ALL_KEYS_EXECUTOR] , operator[SEP] operator[SEP] operator[->] { identifier[sendKeysInBatches] operator[SEP] identifier[mapStoreContext] , identifier[replaceExistingValues] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } operator[SEP] operator[SEP] identifier[execService] operator[SEP] identifier[asCompletableFuture] operator[SEP] identifier[sent] operator[SEP] operator[SEP] identifier[andThen] operator[SEP] identifier[keyLoadFinished] operator[SEP] operator[SEP] } Keyword[return] identifier[keyLoadFinished] operator[SEP] }
public void setClientInfo(String name, String value) throws SQLClientInfoException { try { checkClosed(); } catch (SQLException ex) { SQLClientInfoException e = new SQLClientInfoException(ex.getMessage(), null); e.initCause(ex); throw e; } SQLWarning warning = new SQLWarning("ClientInfo name not recognized: " + name); warning.initCause(Util.notSupported()); addWarning(warning); }
class class_name[name] begin[{] method[setClientInfo, return_type[void], modifier[public], parameter[name, value]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=checkClosed, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SQLClientInfoException, sub_type=None)), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SQLClientInfoException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=initCause, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['SQLException']))], finally_block=None, label=None, resources=None) local_variable[type[SQLWarning], warning] call[warning.initCause, parameter[call[Util.notSupported, parameter[]]]] call[.addWarning, parameter[member[.warning]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setClientInfo] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[value] operator[SEP] Keyword[throws] identifier[SQLClientInfoException] { Keyword[try] { identifier[checkClosed] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[ex] operator[SEP] { identifier[SQLClientInfoException] identifier[e] operator[=] Keyword[new] identifier[SQLClientInfoException] operator[SEP] identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] identifier[e] operator[SEP] identifier[initCause] operator[SEP] identifier[ex] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } identifier[SQLWarning] identifier[warning] operator[=] Keyword[new] identifier[SQLWarning] operator[SEP] literal[String] operator[+] identifier[name] operator[SEP] operator[SEP] identifier[warning] operator[SEP] identifier[initCause] operator[SEP] identifier[Util] operator[SEP] identifier[notSupported] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addWarning] operator[SEP] identifier[warning] operator[SEP] operator[SEP] }
public void drawRoundRect(float x, float y, float width, float height, int cornerRadius, int segs) { if (cornerRadius < 0) throw new IllegalArgumentException("corner radius must be > 0"); if (cornerRadius == 0) { drawRect(x, y, width, height); return; } int mr = (int) Math.min(width, height) / 2; // make sure that w & h are larger than 2*cornerRadius if (cornerRadius > mr) { cornerRadius = mr; } drawLine(x + cornerRadius, y, x + width - cornerRadius, y); drawLine(x, y + cornerRadius, x, y + height - cornerRadius); drawLine(x + width, y + cornerRadius, x + width, y + height - cornerRadius); drawLine(x + cornerRadius, y + height, x + width - cornerRadius, y + height); float d = cornerRadius * 2; // bottom right - 0, 90 drawArc(x + width - d, y + height - d, d, d, segs, 0, 90); // bottom left - 90, 180 drawArc(x, y + height - d, d, d, segs, 90, 180); // top right - 270, 360 drawArc(x + width - d, y, d, d, segs, 270, 360); // top left - 180, 270 drawArc(x, y, d, d, segs, 180, 270); }
class class_name[name] begin[{] method[drawRoundRect, return_type[void], modifier[public], parameter[x, y, width, height, cornerRadius, segs]] begin[{] if[binary_operation[member[.cornerRadius], <, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="corner radius must be > 0")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.cornerRadius], ==, literal[0]]] begin[{] call[.drawRect, parameter[member[.x], member[.y], member[.width], member[.height]]] return[None] else begin[{] None end[}] local_variable[type[int], mr] if[binary_operation[member[.cornerRadius], >, member[.mr]]] begin[{] assign[member[.cornerRadius], member[.mr]] else begin[{] None end[}] call[.drawLine, parameter[binary_operation[member[.x], +, member[.cornerRadius]], member[.y], binary_operation[binary_operation[member[.x], +, member[.width]], -, member[.cornerRadius]], member[.y]]] call[.drawLine, parameter[member[.x], binary_operation[member[.y], +, member[.cornerRadius]], member[.x], binary_operation[binary_operation[member[.y], +, member[.height]], -, member[.cornerRadius]]]] call[.drawLine, parameter[binary_operation[member[.x], +, member[.width]], binary_operation[member[.y], +, member[.cornerRadius]], binary_operation[member[.x], +, member[.width]], binary_operation[binary_operation[member[.y], +, member[.height]], -, member[.cornerRadius]]]] call[.drawLine, parameter[binary_operation[member[.x], +, member[.cornerRadius]], binary_operation[member[.y], +, member[.height]], binary_operation[binary_operation[member[.x], +, member[.width]], -, member[.cornerRadius]], binary_operation[member[.y], +, member[.height]]]] local_variable[type[float], d] call[.drawArc, parameter[binary_operation[binary_operation[member[.x], +, member[.width]], -, member[.d]], binary_operation[binary_operation[member[.y], +, member[.height]], -, member[.d]], member[.d], member[.d], member[.segs], literal[0], literal[90]]] call[.drawArc, parameter[member[.x], binary_operation[binary_operation[member[.y], +, member[.height]], -, member[.d]], member[.d], member[.d], member[.segs], literal[90], literal[180]]] call[.drawArc, parameter[binary_operation[binary_operation[member[.x], +, member[.width]], -, member[.d]], member[.y], member[.d], member[.d], member[.segs], literal[270], literal[360]]] call[.drawArc, parameter[member[.x], member[.y], member[.d], member[.d], member[.segs], literal[180], literal[270]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[drawRoundRect] operator[SEP] Keyword[float] identifier[x] , Keyword[float] identifier[y] , Keyword[float] identifier[width] , Keyword[float] identifier[height] , Keyword[int] identifier[cornerRadius] , Keyword[int] identifier[segs] operator[SEP] { Keyword[if] operator[SEP] identifier[cornerRadius] operator[<] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cornerRadius] operator[==] Other[0] operator[SEP] { identifier[drawRect] operator[SEP] identifier[x] , identifier[y] , identifier[width] , identifier[height] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[int] identifier[mr] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[width] , identifier[height] operator[SEP] operator[/] Other[2] operator[SEP] Keyword[if] operator[SEP] identifier[cornerRadius] operator[>] identifier[mr] operator[SEP] { identifier[cornerRadius] operator[=] identifier[mr] operator[SEP] } identifier[drawLine] operator[SEP] identifier[x] operator[+] identifier[cornerRadius] , identifier[y] , identifier[x] operator[+] identifier[width] operator[-] identifier[cornerRadius] , identifier[y] operator[SEP] operator[SEP] identifier[drawLine] operator[SEP] identifier[x] , identifier[y] operator[+] identifier[cornerRadius] , identifier[x] , identifier[y] operator[+] identifier[height] operator[-] identifier[cornerRadius] operator[SEP] operator[SEP] identifier[drawLine] operator[SEP] identifier[x] operator[+] identifier[width] , identifier[y] operator[+] identifier[cornerRadius] , identifier[x] operator[+] identifier[width] , identifier[y] operator[+] identifier[height] operator[-] identifier[cornerRadius] operator[SEP] operator[SEP] identifier[drawLine] operator[SEP] identifier[x] operator[+] identifier[cornerRadius] , identifier[y] operator[+] identifier[height] , identifier[x] operator[+] identifier[width] operator[-] identifier[cornerRadius] , identifier[y] operator[+] identifier[height] operator[SEP] operator[SEP] Keyword[float] identifier[d] operator[=] identifier[cornerRadius] operator[*] Other[2] operator[SEP] identifier[drawArc] operator[SEP] identifier[x] operator[+] identifier[width] operator[-] identifier[d] , identifier[y] operator[+] identifier[height] operator[-] identifier[d] , identifier[d] , identifier[d] , identifier[segs] , Other[0] , Other[90] operator[SEP] operator[SEP] identifier[drawArc] operator[SEP] identifier[x] , identifier[y] operator[+] identifier[height] operator[-] identifier[d] , identifier[d] , identifier[d] , identifier[segs] , Other[90] , Other[180] operator[SEP] operator[SEP] identifier[drawArc] operator[SEP] identifier[x] operator[+] identifier[width] operator[-] identifier[d] , identifier[y] , identifier[d] , identifier[d] , identifier[segs] , Other[270] , Other[360] operator[SEP] operator[SEP] identifier[drawArc] operator[SEP] identifier[x] , identifier[y] , identifier[d] , identifier[d] , identifier[segs] , Other[180] , Other[270] operator[SEP] operator[SEP] }
public void transform(TransformerFactory factory, URL stylesheetUrl, Result result) throws IOException { try (InputStream xslInputStream = stylesheetUrl.openStream()) { factory.newTemplates(new StreamSource(xslInputStream)).newTransformer() .transform(new DOMSource(document()), result); } catch (TransformerException e) { throw new IOException(e); } finally { if (builder.getInputStream() != null) { // essential builder.getInputStream().close(); } } }
class class_name[name] begin[{] method[transform, return_type[void], modifier[public], parameter[factory, stylesheetUrl, result]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=xslInputStream, 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=StreamSource, sub_type=None))], member=newTemplates, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[MethodInvocation(arguments=[], member=newTransformer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[ClassCreator(arguments=[MethodInvocation(arguments=[], member=document, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DOMSource, sub_type=None)), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=transform, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['TransformerException']))], finally_block=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=builder, 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=[], member=getInputStream, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[MethodInvocation(arguments=[], member=close, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]))], label=None, resources=[TryResource(annotations=[], modifiers=set(), name=xslInputStream, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[], member=openStream, postfix_operators=[], prefix_operators=[], qualifier=stylesheetUrl, selectors=[], type_arguments=None))]) end[}] END[}]
Keyword[public] Keyword[void] identifier[transform] operator[SEP] identifier[TransformerFactory] identifier[factory] , identifier[URL] identifier[stylesheetUrl] , identifier[Result] identifier[result] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] operator[SEP] identifier[InputStream] identifier[xslInputStream] operator[=] identifier[stylesheetUrl] operator[SEP] identifier[openStream] operator[SEP] operator[SEP] operator[SEP] { identifier[factory] operator[SEP] identifier[newTemplates] operator[SEP] Keyword[new] identifier[StreamSource] operator[SEP] identifier[xslInputStream] operator[SEP] operator[SEP] operator[SEP] identifier[newTransformer] operator[SEP] operator[SEP] operator[SEP] identifier[transform] operator[SEP] Keyword[new] identifier[DOMSource] operator[SEP] identifier[document] operator[SEP] operator[SEP] operator[SEP] , identifier[result] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[TransformerException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[builder] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[builder] operator[SEP] identifier[getInputStream] operator[SEP] operator[SEP] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } }
public void setAdUnitSizes(com.google.api.ads.admanager.axis.v201902.AdUnitSize[] adUnitSizes) { this.adUnitSizes = adUnitSizes; }
class class_name[name] begin[{] method[setAdUnitSizes, return_type[void], modifier[public], parameter[adUnitSizes]] begin[{] assign[THIS[member[None.adUnitSizes]], member[.adUnitSizes]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAdUnitSizes] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201902] operator[SEP] identifier[AdUnitSize] operator[SEP] operator[SEP] identifier[adUnitSizes] operator[SEP] { Keyword[this] operator[SEP] identifier[adUnitSizes] operator[=] identifier[adUnitSizes] operator[SEP] }
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { syslog_server_responses result = (syslog_server_responses) service.get_payload_formatter().string_to_resource(syslog_server_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == SESSION_NOT_EXISTS) service.clear_session(); throw new nitro_exception(result.message, result.errorcode, (base_response [])result.syslog_server_response_array); } syslog_server[] result_syslog_server = new syslog_server[result.syslog_server_response_array.length]; for(int i = 0; i < result.syslog_server_response_array.length; i++) { result_syslog_server[i] = result.syslog_server_response_array[i].syslog_server[0]; } return result_syslog_server; }
class class_name[name] begin[{] method[get_nitro_bulk_response, return_type[type[base_resource]], modifier[protected], parameter[service, response]] begin[{] local_variable[type[syslog_server_responses], result] if[binary_operation[member[result.errorcode], !=, literal[0]]] begin[{] if[binary_operation[member[result.errorcode], ==, member[.SESSION_NOT_EXISTS]]] begin[{] call[service.clear_session, parameter[]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[]), MemberReference(member=errorcode, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[]), Cast(expression=MemberReference(member=syslog_server_response_array, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[]), type=ReferenceType(arguments=None, dimensions=[None], name=base_response, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=nitro_exception, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[syslog_server], result_syslog_server] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result_syslog_server, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=syslog_server_response_array, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MemberReference(member=syslog_server, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=result.syslog_server_response_array, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.result_syslog_server]] end[}] END[}]
Keyword[protected] identifier[base_resource] operator[SEP] operator[SEP] identifier[get_nitro_bulk_response] operator[SEP] identifier[nitro_service] identifier[service] , identifier[String] identifier[response] operator[SEP] Keyword[throws] identifier[Exception] { identifier[syslog_server_responses] identifier[result] operator[=] operator[SEP] identifier[syslog_server_responses] operator[SEP] identifier[service] operator[SEP] identifier[get_payload_formatter] operator[SEP] operator[SEP] operator[SEP] identifier[string_to_resource] operator[SEP] identifier[syslog_server_responses] operator[SEP] Keyword[class] , identifier[response] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[errorcode] operator[!=] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[errorcode] operator[==] identifier[SESSION_NOT_EXISTS] operator[SEP] identifier[service] operator[SEP] identifier[clear_session] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[nitro_exception] operator[SEP] identifier[result] operator[SEP] identifier[message] , identifier[result] operator[SEP] identifier[errorcode] , operator[SEP] identifier[base_response] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[syslog_server_response_array] operator[SEP] operator[SEP] } identifier[syslog_server] operator[SEP] operator[SEP] identifier[result_syslog_server] operator[=] Keyword[new] identifier[syslog_server] operator[SEP] identifier[result] operator[SEP] identifier[syslog_server_response_array] 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[result] operator[SEP] identifier[syslog_server_response_array] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[result_syslog_server] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[result] operator[SEP] identifier[syslog_server_response_array] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[syslog_server] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[return] identifier[result_syslog_server] operator[SEP] }
public static Object decodeToObject(String encodedObject, int options, final ClassLoader loader) throws IOException, ClassNotFoundException { // Decode and gunzip if necessary byte[] objBytes = decode(encodedObject, options); ByteArrayInputStream bais = null; ObjectInputStream ois = null; Object obj = null; try { bais = new ByteArrayInputStream(objBytes); // If no custom class loader is provided, use Java's builtin OIS. if (loader == null) { ois = new ObjectInputStream(bais); } else { // Else make a customized object input stream that uses the provided class loader. ois = new ObjectInputStream(bais) { @Override public Class<?> resolveClass(ObjectStreamClass streamClass) throws IOException, ClassNotFoundException { Class c = Class.forName(streamClass.getName(), false, loader); if (c == null) { return super.resolveClass(streamClass); } else { return c; // Class loader knows of this class. } } }; } obj = ois.readObject(); } catch (IOException e) { throw e; // Catch and throw in order to execute finally{} } catch (ClassNotFoundException e) { throw e; // Catch and throw in order to execute finally{} } finally { try { if (bais != null) { bais.close(); } } catch (Exception e) { } try { if (ois != null) { ois.close(); } } catch (Exception e) { } } return obj; }
class class_name[name] begin[{] method[decodeToObject, return_type[type[Object]], modifier[public static], parameter[encodedObject, options, loader]] begin[{] local_variable[type[byte], objBytes] local_variable[type[ByteArrayInputStream], bais] local_variable[type[ObjectInputStream], ois] local_variable[type[Object], obj] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bais, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=objBytes, 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))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=loader, 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=ois, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=bais, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=streamClass, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=loader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=SuperMethodInvocation(arguments=[MemberReference(member=streamClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveClass, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=resolveClass, parameters=[FormalParameter(annotations=[], modifiers=set(), name=streamClass, type=ReferenceType(arguments=None, dimensions=[], name=ObjectStreamClass, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None), throws=['IOException', 'ClassNotFoundException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ObjectInputStream, sub_type=None))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=ois, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=bais, 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=ObjectInputStream, sub_type=None))), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readObject, postfix_operators=[], prefix_operators=[], qualifier=ois, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException'])), CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ClassNotFoundException']))], finally_block=[TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=bais, 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=bais, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None), TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ois, 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=ois, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)], label=None, resources=None) return[member[.obj]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[decodeToObject] operator[SEP] identifier[String] identifier[encodedObject] , Keyword[int] identifier[options] , Keyword[final] identifier[ClassLoader] identifier[loader] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { Keyword[byte] operator[SEP] operator[SEP] identifier[objBytes] operator[=] identifier[decode] operator[SEP] identifier[encodedObject] , identifier[options] operator[SEP] operator[SEP] identifier[ByteArrayInputStream] identifier[bais] operator[=] Other[null] operator[SEP] identifier[ObjectInputStream] identifier[ois] operator[=] Other[null] operator[SEP] identifier[Object] identifier[obj] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[bais] operator[=] Keyword[new] identifier[ByteArrayInputStream] operator[SEP] identifier[objBytes] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[loader] operator[==] Other[null] operator[SEP] { identifier[ois] operator[=] Keyword[new] identifier[ObjectInputStream] operator[SEP] identifier[bais] operator[SEP] operator[SEP] } Keyword[else] { identifier[ois] operator[=] Keyword[new] identifier[ObjectInputStream] operator[SEP] identifier[bais] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Class] operator[<] operator[?] operator[>] identifier[resolveClass] operator[SEP] identifier[ObjectStreamClass] identifier[streamClass] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassNotFoundException] { identifier[Class] identifier[c] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[streamClass] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , literal[boolean] , identifier[loader] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[super] operator[SEP] identifier[resolveClass] operator[SEP] identifier[streamClass] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[c] operator[SEP] } } } operator[SEP] } identifier[obj] operator[=] identifier[ois] operator[SEP] identifier[readObject] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[finally] { Keyword[try] { Keyword[if] operator[SEP] identifier[bais] operator[!=] Other[null] operator[SEP] { identifier[bais] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } Keyword[try] { Keyword[if] operator[SEP] identifier[ois] operator[!=] Other[null] operator[SEP] { identifier[ois] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { } } Keyword[return] identifier[obj] operator[SEP] }
@VisibleForTesting public final Print getJasperPrint( final String jobId, final PJsonObject requestData, final Configuration config, final File configDir, final File taskDirectory) throws JRException, SQLException, ExecutionException { final String templateName = requestData.getString(Constants.JSON_LAYOUT_KEY); final Template template = config.getTemplate(templateName); final File jasperTemplateFile = new File(configDir, template.getReportTemplate()); final File jasperTemplateBuild = this.workingDirectories.getBuildFileFor( config, jasperTemplateFile, JasperReportBuilder.JASPER_REPORT_COMPILED_FILE_EXT, LOGGER); final Values values = new Values(jobId, requestData, template, taskDirectory, this.httpRequestFactory, jasperTemplateBuild.getParentFile()); double maxDpi = maxDpi(values); final ProcessorDependencyGraph.ProcessorGraphForkJoinTask task = template.getProcessorGraph().createTask(values); final ForkJoinTask<Values> taskFuture = this.forkJoinPool.submit( task); try { taskFuture.get(); } catch (InterruptedException exc) { // if cancel() is called on the current thread, this exception will be thrown. // in this case, also properly cancel the task future. taskFuture.cancel(true); Thread.currentThread().interrupt(); throw new CancellationException(); } // Fill the resource bundle String resourceBundle = config.getResourceBundle(); if (resourceBundle != null) { values.put("REPORT_RESOURCE_BUNDLE", ResourceBundle.getBundle( resourceBundle, values.getObject(Values.LOCALE_KEY, Locale.class), new ResourceBundleClassLoader(configDir))); } ValuesLogger.log(templateName, template, values); JasperFillManager fillManager = getJasperFillManager( values.getObject( Values.CLIENT_HTTP_REQUEST_FACTORY_KEY, MfClientHttpRequestFactoryProvider.class)); checkRequiredValues(config, values, template.getReportTemplate()); final JasperPrint print; if (template.getJdbcUrl() != null) { Connection connection; if (template.getJdbcUser() != null) { connection = DriverManager.getConnection( template.getJdbcUrl(), template.getJdbcUser(), template.getJdbcPassword()); } else { connection = DriverManager.getConnection(template.getJdbcUrl()); } print = fillManager.fill( jasperTemplateBuild.getAbsolutePath(), values.asMap(), connection); } else { JRDataSource dataSource; if (template.getTableDataKey() != null) { final Object dataSourceObj = values.getObject(template.getTableDataKey(), Object.class); if (dataSourceObj instanceof JRDataSource) { dataSource = (JRDataSource) dataSourceObj; } else if (dataSourceObj instanceof Iterable) { Iterable sourceObj = (Iterable) dataSourceObj; dataSource = toJRDataSource(sourceObj.iterator()); } else if (dataSourceObj instanceof Iterator) { Iterator sourceObj = (Iterator) dataSourceObj; dataSource = toJRDataSource(sourceObj); } else if (dataSourceObj.getClass().isArray()) { Object[] sourceObj = (Object[]) dataSourceObj; dataSource = toJRDataSource(Arrays.asList(sourceObj).iterator()); } else { throw new AssertionError( String.format("Objects of type: %s cannot be converted to a row in a " + "JRDataSource", dataSourceObj.getClass())); } } else { dataSource = new JREmptyDataSource(); } checkRequiredFields(config, dataSource, template.getReportTemplate()); print = fillManager.fill( jasperTemplateBuild.getAbsolutePath(), values.asMap(), dataSource); } print.setProperty(Renderable.PROPERTY_IMAGE_DPI, String.valueOf(Math.round(maxDpi))); return new Print(getJasperReportsContext( values.getObject( Values.CLIENT_HTTP_REQUEST_FACTORY_KEY, MfClientHttpRequestFactoryProvider.class)), print, values, maxDpi, task.getExecutionContext()); }
class class_name[name] begin[{] method[getJasperPrint, return_type[type[Print]], modifier[final public], parameter[jobId, requestData, config, configDir, taskDirectory]] begin[{] local_variable[type[String], templateName] local_variable[type[Template], template] local_variable[type[File], jasperTemplateFile] local_variable[type[File], jasperTemplateBuild] local_variable[type[Values], values] local_variable[type[double], maxDpi] local_variable[type[ProcessorDependencyGraph], task] local_variable[type[ForkJoinTask], taskFuture] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=taskFuture, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=cancel, postfix_operators=[], prefix_operators=[], qualifier=taskFuture, 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), ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CancellationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exc, types=['InterruptedException']))], finally_block=None, label=None, resources=None) local_variable[type[String], resourceBundle] if[binary_operation[member[.resourceBundle], !=, literal[null]]] begin[{] call[values.put, parameter[literal["REPORT_RESOURCE_BUNDLE"], call[ResourceBundle.getBundle, parameter[member[.resourceBundle], call[values.getObject, parameter[member[Values.LOCALE_KEY], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Locale, sub_type=None))]], ClassCreator(arguments=[MemberReference(member=configDir, 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=ResourceBundleClassLoader, sub_type=None))]]]] else begin[{] None end[}] call[ValuesLogger.log, parameter[member[.templateName], member[.template], member[.values]]] local_variable[type[JasperFillManager], fillManager] call[.checkRequiredValues, parameter[member[.config], member[.values], call[template.getReportTemplate, parameter[]]]] local_variable[type[JasperPrint], print] if[binary_operation[call[template.getJdbcUrl, parameter[]], !=, literal[null]]] begin[{] local_variable[type[Connection], connection] if[binary_operation[call[template.getJdbcUser, parameter[]], !=, literal[null]]] begin[{] assign[member[.connection], call[DriverManager.getConnection, parameter[call[template.getJdbcUrl, parameter[]], call[template.getJdbcUser, parameter[]], call[template.getJdbcPassword, parameter[]]]]] else begin[{] assign[member[.connection], call[DriverManager.getConnection, parameter[call[template.getJdbcUrl, parameter[]]]]] end[}] assign[member[.print], call[fillManager.fill, parameter[call[jasperTemplateBuild.getAbsolutePath, parameter[]], call[values.asMap, parameter[]], member[.connection]]]] else begin[{] local_variable[type[JRDataSource], dataSource] if[binary_operation[call[template.getTableDataKey, parameter[]], !=, literal[null]]] begin[{] local_variable[type[Object], dataSourceObj] if[binary_operation[member[.dataSourceObj], instanceof, type[JRDataSource]]] begin[{] assign[member[.dataSource], Cast(expression=MemberReference(member=dataSourceObj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=JRDataSource, sub_type=None))] else begin[{] if[binary_operation[member[.dataSourceObj], instanceof, type[Iterable]]] begin[{] local_variable[type[Iterable], sourceObj] assign[member[.dataSource], call[.toJRDataSource, parameter[call[sourceObj.iterator, parameter[]]]]] else begin[{] if[binary_operation[member[.dataSourceObj], instanceof, type[Iterator]]] begin[{] local_variable[type[Iterator], sourceObj] assign[member[.dataSource], call[.toJRDataSource, parameter[member[.sourceObj]]]] else begin[{] if[call[dataSourceObj.getClass, parameter[]]] begin[{] local_variable[type[Object], sourceObj] assign[member[.dataSource], call[.toJRDataSource, parameter[call[Arrays.asList, parameter[member[.sourceObj]]]]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Objects of type: %s cannot be converted to a row in a "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="JRDataSource"), operator=+), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=dataSourceObj, 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=AssertionError, sub_type=None)), label=None) end[}] end[}] end[}] end[}] else begin[{] assign[member[.dataSource], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JREmptyDataSource, sub_type=None))] end[}] call[.checkRequiredFields, parameter[member[.config], member[.dataSource], call[template.getReportTemplate, parameter[]]]] assign[member[.print], call[fillManager.fill, parameter[call[jasperTemplateBuild.getAbsolutePath, parameter[]], call[values.asMap, parameter[]], member[.dataSource]]]] end[}] call[print.setProperty, parameter[member[Renderable.PROPERTY_IMAGE_DPI], call[String.valueOf, parameter[call[Math.round, parameter[member[.maxDpi]]]]]]] return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=CLIENT_HTTP_REQUEST_FACTORY_KEY, postfix_operators=[], prefix_operators=[], qualifier=Values, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MfClientHttpRequestFactoryProvider, sub_type=None))], member=getObject, postfix_operators=[], prefix_operators=[], qualifier=values, selectors=[], type_arguments=None)], member=getJasperReportsContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=print, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxDpi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getExecutionContext, postfix_operators=[], prefix_operators=[], qualifier=task, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Print, sub_type=None))] end[}] END[}]
annotation[@] identifier[VisibleForTesting] Keyword[public] Keyword[final] identifier[Print] identifier[getJasperPrint] operator[SEP] Keyword[final] identifier[String] identifier[jobId] , Keyword[final] identifier[PJsonObject] identifier[requestData] , Keyword[final] identifier[Configuration] identifier[config] , Keyword[final] identifier[File] identifier[configDir] , Keyword[final] identifier[File] identifier[taskDirectory] operator[SEP] Keyword[throws] identifier[JRException] , identifier[SQLException] , identifier[ExecutionException] { Keyword[final] identifier[String] identifier[templateName] operator[=] identifier[requestData] operator[SEP] identifier[getString] operator[SEP] identifier[Constants] operator[SEP] identifier[JSON_LAYOUT_KEY] operator[SEP] operator[SEP] Keyword[final] identifier[Template] identifier[template] operator[=] identifier[config] operator[SEP] identifier[getTemplate] operator[SEP] identifier[templateName] operator[SEP] operator[SEP] Keyword[final] identifier[File] identifier[jasperTemplateFile] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[configDir] , identifier[template] operator[SEP] identifier[getReportTemplate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[File] identifier[jasperTemplateBuild] operator[=] Keyword[this] operator[SEP] identifier[workingDirectories] operator[SEP] identifier[getBuildFileFor] operator[SEP] identifier[config] , identifier[jasperTemplateFile] , identifier[JasperReportBuilder] operator[SEP] identifier[JASPER_REPORT_COMPILED_FILE_EXT] , identifier[LOGGER] operator[SEP] operator[SEP] Keyword[final] identifier[Values] identifier[values] operator[=] Keyword[new] identifier[Values] operator[SEP] identifier[jobId] , identifier[requestData] , identifier[template] , identifier[taskDirectory] , Keyword[this] operator[SEP] identifier[httpRequestFactory] , identifier[jasperTemplateBuild] operator[SEP] identifier[getParentFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[maxDpi] operator[=] identifier[maxDpi] operator[SEP] identifier[values] operator[SEP] operator[SEP] Keyword[final] identifier[ProcessorDependencyGraph] operator[SEP] identifier[ProcessorGraphForkJoinTask] identifier[task] operator[=] identifier[template] operator[SEP] identifier[getProcessorGraph] operator[SEP] operator[SEP] operator[SEP] identifier[createTask] operator[SEP] identifier[values] operator[SEP] operator[SEP] Keyword[final] identifier[ForkJoinTask] operator[<] identifier[Values] operator[>] identifier[taskFuture] operator[=] Keyword[this] operator[SEP] identifier[forkJoinPool] operator[SEP] identifier[submit] operator[SEP] identifier[task] operator[SEP] operator[SEP] Keyword[try] { identifier[taskFuture] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InterruptedException] identifier[exc] operator[SEP] { identifier[taskFuture] operator[SEP] identifier[cancel] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[interrupt] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[CancellationException] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[resourceBundle] operator[=] identifier[config] operator[SEP] identifier[getResourceBundle] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resourceBundle] operator[!=] Other[null] operator[SEP] { identifier[values] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[ResourceBundle] operator[SEP] identifier[getBundle] operator[SEP] identifier[resourceBundle] , identifier[values] operator[SEP] identifier[getObject] operator[SEP] identifier[Values] operator[SEP] identifier[LOCALE_KEY] , identifier[Locale] operator[SEP] Keyword[class] operator[SEP] , Keyword[new] identifier[ResourceBundleClassLoader] operator[SEP] identifier[configDir] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[ValuesLogger] operator[SEP] identifier[log] operator[SEP] identifier[templateName] , identifier[template] , identifier[values] operator[SEP] operator[SEP] identifier[JasperFillManager] identifier[fillManager] operator[=] identifier[getJasperFillManager] operator[SEP] identifier[values] operator[SEP] identifier[getObject] operator[SEP] identifier[Values] operator[SEP] identifier[CLIENT_HTTP_REQUEST_FACTORY_KEY] , identifier[MfClientHttpRequestFactoryProvider] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] identifier[checkRequiredValues] operator[SEP] identifier[config] , identifier[values] , identifier[template] operator[SEP] identifier[getReportTemplate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[JasperPrint] identifier[print] operator[SEP] Keyword[if] operator[SEP] identifier[template] operator[SEP] identifier[getJdbcUrl] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[Connection] identifier[connection] operator[SEP] Keyword[if] operator[SEP] identifier[template] operator[SEP] identifier[getJdbcUser] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[connection] operator[=] identifier[DriverManager] operator[SEP] identifier[getConnection] operator[SEP] identifier[template] operator[SEP] identifier[getJdbcUrl] operator[SEP] operator[SEP] , identifier[template] operator[SEP] identifier[getJdbcUser] operator[SEP] operator[SEP] , identifier[template] operator[SEP] identifier[getJdbcPassword] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[connection] operator[=] identifier[DriverManager] operator[SEP] identifier[getConnection] operator[SEP] identifier[template] operator[SEP] identifier[getJdbcUrl] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[print] operator[=] identifier[fillManager] operator[SEP] identifier[fill] operator[SEP] identifier[jasperTemplateBuild] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] , identifier[values] operator[SEP] identifier[asMap] operator[SEP] operator[SEP] , identifier[connection] operator[SEP] operator[SEP] } Keyword[else] { identifier[JRDataSource] identifier[dataSource] operator[SEP] Keyword[if] operator[SEP] identifier[template] operator[SEP] identifier[getTableDataKey] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[final] identifier[Object] identifier[dataSourceObj] operator[=] identifier[values] operator[SEP] identifier[getObject] operator[SEP] identifier[template] operator[SEP] identifier[getTableDataKey] operator[SEP] operator[SEP] , identifier[Object] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dataSourceObj] Keyword[instanceof] identifier[JRDataSource] operator[SEP] { identifier[dataSource] operator[=] operator[SEP] identifier[JRDataSource] operator[SEP] identifier[dataSourceObj] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[dataSourceObj] Keyword[instanceof] identifier[Iterable] operator[SEP] { identifier[Iterable] identifier[sourceObj] operator[=] operator[SEP] identifier[Iterable] operator[SEP] identifier[dataSourceObj] operator[SEP] identifier[dataSource] operator[=] identifier[toJRDataSource] operator[SEP] identifier[sourceObj] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[dataSourceObj] Keyword[instanceof] identifier[Iterator] operator[SEP] { identifier[Iterator] identifier[sourceObj] operator[=] operator[SEP] identifier[Iterator] operator[SEP] identifier[dataSourceObj] operator[SEP] identifier[dataSource] operator[=] identifier[toJRDataSource] operator[SEP] identifier[sourceObj] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[dataSourceObj] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[sourceObj] operator[=] operator[SEP] identifier[Object] operator[SEP] operator[SEP] operator[SEP] identifier[dataSourceObj] operator[SEP] identifier[dataSource] operator[=] identifier[toJRDataSource] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[sourceObj] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[AssertionError] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] operator[+] literal[String] , identifier[dataSourceObj] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[dataSource] operator[=] Keyword[new] identifier[JREmptyDataSource] operator[SEP] operator[SEP] operator[SEP] } identifier[checkRequiredFields] operator[SEP] identifier[config] , identifier[dataSource] , identifier[template] operator[SEP] identifier[getReportTemplate] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[print] operator[=] identifier[fillManager] operator[SEP] identifier[fill] operator[SEP] identifier[jasperTemplateBuild] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] , identifier[values] operator[SEP] identifier[asMap] operator[SEP] operator[SEP] , identifier[dataSource] operator[SEP] operator[SEP] } identifier[print] operator[SEP] identifier[setProperty] operator[SEP] identifier[Renderable] operator[SEP] identifier[PROPERTY_IMAGE_DPI] , identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[maxDpi] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Print] operator[SEP] identifier[getJasperReportsContext] operator[SEP] identifier[values] operator[SEP] identifier[getObject] operator[SEP] identifier[Values] operator[SEP] identifier[CLIENT_HTTP_REQUEST_FACTORY_KEY] , identifier[MfClientHttpRequestFactoryProvider] operator[SEP] Keyword[class] operator[SEP] operator[SEP] , identifier[print] , identifier[values] , identifier[maxDpi] , identifier[task] operator[SEP] identifier[getExecutionContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static PutFromLoadValidator removeFromCache(AdvancedCache cache) { AsyncInterceptorChain chain = cache.getAsyncInterceptorChain(); BasicComponentRegistry cr = cache.getComponentRegistry().getComponent(BasicComponentRegistry.class); chain.removeInterceptor(TxPutFromLoadInterceptor.class); chain.removeInterceptor(NonTxPutFromLoadInterceptor.class); chain.getInterceptors().stream() .filter(BaseInvalidationInterceptor.class::isInstance).findFirst().map(AsyncInterceptor::getClass) .ifPresent(invalidationClass -> { InvalidationInterceptor invalidationInterceptor = new InvalidationInterceptor(); cr.replaceComponent(InvalidationInterceptor.class.getName(), invalidationInterceptor, true); cr.getComponent(InvalidationInterceptor.class).running(); chain.replaceInterceptor(invalidationInterceptor, invalidationClass); }); chain.getInterceptors().stream() .filter(LockingInterceptor.class::isInstance).findFirst().map(AsyncInterceptor::getClass) .ifPresent(invalidationClass -> { NonTransactionalLockingInterceptor lockingInterceptor = new NonTransactionalLockingInterceptor(); cr.replaceComponent(NonTransactionalLockingInterceptor.class.getName(), lockingInterceptor, true); cr.getComponent(NonTransactionalLockingInterceptor.class).running(); chain.replaceInterceptor(lockingInterceptor, LockingInterceptor.class); }); CacheCommandInitializer cci = cr.getComponent(CacheCommandInitializer.class).running(); return cci.removePutFromLoadValidator(cache.getName()); }
class class_name[name] begin[{] method[removeFromCache, return_type[type[PutFromLoadValidator]], modifier[public static], parameter[cache]] begin[{] local_variable[type[AsyncInterceptorChain], chain] local_variable[type[BasicComponentRegistry], cr] call[chain.removeInterceptor, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TxPutFromLoadInterceptor, sub_type=None))]] call[chain.removeInterceptor, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NonTxPutFromLoadInterceptor, sub_type=None))]] call[chain.getInterceptors, parameter[]] call[chain.getInterceptors, parameter[]] local_variable[type[CacheCommandInitializer], cci] return[call[cci.removePutFromLoadValidator, parameter[call[cache.getName, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PutFromLoadValidator] identifier[removeFromCache] operator[SEP] identifier[AdvancedCache] identifier[cache] operator[SEP] { identifier[AsyncInterceptorChain] identifier[chain] operator[=] identifier[cache] operator[SEP] identifier[getAsyncInterceptorChain] operator[SEP] operator[SEP] operator[SEP] identifier[BasicComponentRegistry] identifier[cr] operator[=] identifier[cache] operator[SEP] identifier[getComponentRegistry] operator[SEP] operator[SEP] operator[SEP] identifier[getComponent] operator[SEP] identifier[BasicComponentRegistry] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[chain] operator[SEP] identifier[removeInterceptor] operator[SEP] identifier[TxPutFromLoadInterceptor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[chain] operator[SEP] identifier[removeInterceptor] operator[SEP] identifier[NonTxPutFromLoadInterceptor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[chain] operator[SEP] identifier[getInterceptors] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[BaseInvalidationInterceptor] operator[SEP] Keyword[class] operator[::] identifier[isInstance] operator[SEP] operator[SEP] identifier[findFirst] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[AsyncInterceptor] operator[::] identifier[getClass] operator[SEP] operator[SEP] identifier[ifPresent] operator[SEP] identifier[invalidationClass] operator[->] { identifier[InvalidationInterceptor] identifier[invalidationInterceptor] operator[=] Keyword[new] identifier[InvalidationInterceptor] operator[SEP] operator[SEP] operator[SEP] identifier[cr] operator[SEP] identifier[replaceComponent] operator[SEP] identifier[InvalidationInterceptor] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[invalidationInterceptor] , literal[boolean] operator[SEP] operator[SEP] identifier[cr] operator[SEP] identifier[getComponent] operator[SEP] identifier[InvalidationInterceptor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[running] operator[SEP] operator[SEP] operator[SEP] identifier[chain] operator[SEP] identifier[replaceInterceptor] operator[SEP] identifier[invalidationInterceptor] , identifier[invalidationClass] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[chain] operator[SEP] identifier[getInterceptors] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[LockingInterceptor] operator[SEP] Keyword[class] operator[::] identifier[isInstance] operator[SEP] operator[SEP] identifier[findFirst] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[AsyncInterceptor] operator[::] identifier[getClass] operator[SEP] operator[SEP] identifier[ifPresent] operator[SEP] identifier[invalidationClass] operator[->] { identifier[NonTransactionalLockingInterceptor] identifier[lockingInterceptor] operator[=] Keyword[new] identifier[NonTransactionalLockingInterceptor] operator[SEP] operator[SEP] operator[SEP] identifier[cr] operator[SEP] identifier[replaceComponent] operator[SEP] identifier[NonTransactionalLockingInterceptor] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[lockingInterceptor] , literal[boolean] operator[SEP] operator[SEP] identifier[cr] operator[SEP] identifier[getComponent] operator[SEP] identifier[NonTransactionalLockingInterceptor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[running] operator[SEP] operator[SEP] operator[SEP] identifier[chain] operator[SEP] identifier[replaceInterceptor] operator[SEP] identifier[lockingInterceptor] , identifier[LockingInterceptor] operator[SEP] Keyword[class] operator[SEP] operator[SEP] } operator[SEP] operator[SEP] identifier[CacheCommandInitializer] identifier[cci] operator[=] identifier[cr] operator[SEP] identifier[getComponent] operator[SEP] identifier[CacheCommandInitializer] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[running] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[cci] operator[SEP] identifier[removePutFromLoadValidator] operator[SEP] identifier[cache] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static SyncListPermissionDeleter deleter(final String pathServiceSid, final String pathListSid, final String pathIdentity) { return new SyncListPermissionDeleter(pathServiceSid, pathListSid, pathIdentity); }
class class_name[name] begin[{] method[deleter, return_type[type[SyncListPermissionDeleter]], modifier[public static], parameter[pathServiceSid, pathListSid, pathIdentity]] begin[{] return[ClassCreator(arguments=[MemberReference(member=pathServiceSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pathListSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pathIdentity, 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=SyncListPermissionDeleter, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[SyncListPermissionDeleter] identifier[deleter] operator[SEP] Keyword[final] identifier[String] identifier[pathServiceSid] , Keyword[final] identifier[String] identifier[pathListSid] , Keyword[final] identifier[String] identifier[pathIdentity] operator[SEP] { Keyword[return] Keyword[new] identifier[SyncListPermissionDeleter] operator[SEP] identifier[pathServiceSid] , identifier[pathListSid] , identifier[pathIdentity] operator[SEP] operator[SEP] }
@Override public <T extends GraphQLType> Comparator<? super T> getComparator(SchemaPrinterComparatorEnvironment environment) { Comparator<?> comparator = registry.get(environment); if (comparator != null) { //noinspection unchecked return (Comparator<? super T>) comparator; } comparator = registry.get(environment.transform(builder -> builder.parentType(null))); if (comparator != null) { //noinspection unchecked return (Comparator<? super T>) comparator; } return DEFAULT_COMPARATOR; }
class class_name[name] begin[{] method[getComparator, return_type[type[Comparator]], modifier[public], parameter[environment]] begin[{] local_variable[type[Comparator], comparator] if[binary_operation[member[.comparator], !=, literal[null]]] begin[{] return[Cast(expression=MemberReference(member=comparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=super, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Comparator, sub_type=None))] else begin[{] None end[}] assign[member[.comparator], call[registry.get, parameter[call[environment.transform, parameter[LambdaExpression(body=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=parentType, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), parameters=[MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]]]] if[binary_operation[member[.comparator], !=, literal[null]]] begin[{] return[Cast(expression=MemberReference(member=comparator, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=super, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Comparator, sub_type=None))] else begin[{] None end[}] return[member[.DEFAULT_COMPARATOR]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[GraphQLType] operator[>] identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[T] operator[>] identifier[getComparator] operator[SEP] identifier[SchemaPrinterComparatorEnvironment] identifier[environment] operator[SEP] { identifier[Comparator] operator[<] operator[?] operator[>] identifier[comparator] operator[=] identifier[registry] operator[SEP] identifier[get] operator[SEP] identifier[environment] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[comparator] operator[!=] Other[null] operator[SEP] { Keyword[return] operator[SEP] identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[SEP] identifier[comparator] operator[SEP] } identifier[comparator] operator[=] identifier[registry] operator[SEP] identifier[get] operator[SEP] identifier[environment] operator[SEP] identifier[transform] operator[SEP] identifier[builder] operator[->] identifier[builder] operator[SEP] identifier[parentType] operator[SEP] Other[null] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[comparator] operator[!=] Other[null] operator[SEP] { Keyword[return] operator[SEP] identifier[Comparator] operator[<] operator[?] Keyword[super] identifier[T] operator[>] operator[SEP] identifier[comparator] operator[SEP] } Keyword[return] identifier[DEFAULT_COMPARATOR] operator[SEP] }
public long writeLogRecord(LogRecord logRecord, long reservedDelta, boolean flush) throws ObjectManagerException { if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.entry(this, cclass , "writeLogRecord" , new Object[] { logRecord, new Long(reservedDelta), new Boolean(flush) } ); long logSequenceNumber = objectManagerState.logOutput.writeNext(logRecord , reservedDelta , true , flush ); if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled()) trace.exit(this, cclass , "writeLogRecord" , new Object[] { new Long(logSequenceNumber) } ); return logSequenceNumber; }
class class_name[name] begin[{] method[writeLogRecord, return_type[type[long]], modifier[public], parameter[logRecord, reservedDelta, flush]] begin[{] if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{] call[trace.entry, parameter[THIS[], member[.cclass], literal["writeLogRecord"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=logRecord, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=reservedDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Long, sub_type=None)), ClassCreator(arguments=[MemberReference(member=flush, 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))]), 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[long], logSequenceNumber] if[binary_operation[call[Tracing.isAnyTracingEnabled, parameter[]], &&, call[trace.isEntryEnabled, parameter[]]]] begin[{] call[trace.exit, parameter[THIS[], member[.cclass], literal["writeLogRecord"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[ClassCreator(arguments=[MemberReference(member=logSequenceNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Long, sub_type=None))]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] return[member[.logSequenceNumber]] end[}] END[}]
Keyword[public] Keyword[long] identifier[writeLogRecord] operator[SEP] identifier[LogRecord] identifier[logRecord] , Keyword[long] identifier[reservedDelta] , Keyword[boolean] identifier[flush] operator[SEP] Keyword[throws] identifier[ObjectManagerException] { Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[trace] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[cclass] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[logRecord] , Keyword[new] identifier[Long] operator[SEP] identifier[reservedDelta] operator[SEP] , Keyword[new] identifier[Boolean] operator[SEP] identifier[flush] operator[SEP] } operator[SEP] operator[SEP] Keyword[long] identifier[logSequenceNumber] operator[=] identifier[objectManagerState] operator[SEP] identifier[logOutput] operator[SEP] identifier[writeNext] operator[SEP] identifier[logRecord] , identifier[reservedDelta] , literal[boolean] , identifier[flush] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Tracing] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[trace] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[cclass] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { Keyword[new] identifier[Long] operator[SEP] identifier[logSequenceNumber] operator[SEP] } operator[SEP] operator[SEP] Keyword[return] identifier[logSequenceNumber] operator[SEP] }
public ExecutionVertex getInputExecutionVertex(int index) { final Iterator<ExecutionGroupVertex> it = this.stageMembers.iterator(); while (it.hasNext()) { final ExecutionGroupVertex groupVertex = it.next(); if (groupVertex.isInputVertex()) { final int numberOfMembers = groupVertex.getCurrentNumberOfGroupMembers(); if (index >= numberOfMembers) { index -= numberOfMembers; } else { return groupVertex.getGroupMember(index); } } } return null; }
class class_name[name] begin[{] method[getInputExecutionVertex, return_type[type[ExecutionVertex]], modifier[public], parameter[index]] begin[{] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[ExecutionGroupVertex], groupVertex] if[call[groupVertex.isInputVertex, parameter[]]] begin[{] local_variable[type[int], numberOfMembers] if[binary_operation[member[.index], >=, member[.numberOfMembers]]] begin[{] assign[member[.index], member[.numberOfMembers]] else begin[{] return[call[groupVertex.getGroupMember, parameter[member[.index]]]] end[}] else begin[{] None end[}] end[}] return[literal[null]] end[}] END[}]
Keyword[public] identifier[ExecutionVertex] identifier[getInputExecutionVertex] operator[SEP] Keyword[int] identifier[index] operator[SEP] { Keyword[final] identifier[Iterator] operator[<] identifier[ExecutionGroupVertex] operator[>] identifier[it] operator[=] Keyword[this] operator[SEP] identifier[stageMembers] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[ExecutionGroupVertex] identifier[groupVertex] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[groupVertex] operator[SEP] identifier[isInputVertex] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[numberOfMembers] operator[=] identifier[groupVertex] operator[SEP] identifier[getCurrentNumberOfGroupMembers] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[>=] identifier[numberOfMembers] operator[SEP] { identifier[index] operator[-=] identifier[numberOfMembers] operator[SEP] } Keyword[else] { Keyword[return] identifier[groupVertex] operator[SEP] identifier[getGroupMember] operator[SEP] identifier[index] operator[SEP] operator[SEP] } } } Keyword[return] Other[null] operator[SEP] }
@Override public Set<Long> getCandidateItemsToRank(final Long user) { final Set<Long> items = getModelTrainingDifference(getTraining(), user); items.addAll(getModelTrainingDifference(getTest(), user)); return items; }
class class_name[name] begin[{] method[getCandidateItemsToRank, return_type[type[Set]], modifier[public], parameter[user]] begin[{] local_variable[type[Set], items] call[items.addAll, parameter[call[.getModelTrainingDifference, parameter[call[.getTest, parameter[]], member[.user]]]]] return[member[.items]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Set] operator[<] identifier[Long] operator[>] identifier[getCandidateItemsToRank] operator[SEP] Keyword[final] identifier[Long] identifier[user] operator[SEP] { Keyword[final] identifier[Set] operator[<] identifier[Long] operator[>] identifier[items] operator[=] identifier[getModelTrainingDifference] operator[SEP] identifier[getTraining] operator[SEP] operator[SEP] , identifier[user] operator[SEP] operator[SEP] identifier[items] operator[SEP] identifier[addAll] operator[SEP] identifier[getModelTrainingDifference] operator[SEP] identifier[getTest] operator[SEP] operator[SEP] , identifier[user] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[items] operator[SEP] }
@Override @Transactional public void cancelSnapshot(String snapshotId) throws SnapshotException { checkInitialized(); final Snapshot snapshot = getSnapshot(snapshotId); stop(snapshot); String snapshotDir = ContentDirUtils.getDestinationPath(snapshotId, this.config.getContentRootDir()); deleteDirectory(snapshotDir); new Thread(new Runnable() { @Override public void run() { final DuracloudEndPointConfig source = snapshot.getSource(); final String spaceId = source.getSpaceId(); final ContentStore contentStore = storeClientHelper.create(source, config.getDuracloudUsername(), config.getDuracloudPassword()); try { String result = new Retrier().execute(new Retriable() { /* (non-Javadoc) * @see org.duracloud.common.retry.Retriable#retry() */ @Override public Object retry() throws Exception { CompleteCancelSnapshotTaskParameters params = new CompleteCancelSnapshotTaskParameters(); params.setSpaceId(spaceId); return contentStore.performTask(SnapshotConstants.COMPLETE_SNAPSHOT_CANCEL_TASK_NAME, params.serialize()); } }); log.info("snapshot cancellation is complete: {}", result); snapshot.setStatus(SnapshotStatus.CANCELLED); snapshot.setStatusText(""); eventLog.logSnapshotUpdate(snapshot); } catch (Exception ex) { log.error("failed to complete cancellation on the durastore side for space {}: {}", spaceId, ex.getMessage(), ex); } } }).start(); }
class class_name[name] begin[{] method[cancelSnapshot, return_type[void], modifier[public], parameter[snapshotId]] begin[{] call[.checkInitialized, parameter[]] local_variable[type[Snapshot], snapshot] call[.stop, parameter[member[.snapshot]]] local_variable[type[String], snapshotDir] call[.deleteDirectory, parameter[member[.snapshotDir]]] ClassCreator(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSource, postfix_operators=[], prefix_operators=[], qualifier=snapshot, selectors=[], type_arguments=None), name=source)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=DuracloudEndPointConfig, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSpaceId, postfix_operators=[], prefix_operators=[], qualifier=source, selectors=[], type_arguments=None), name=spaceId)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=source, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getDuracloudUsername, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getDuracloudPassword, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None)], member=create, postfix_operators=[], prefix_operators=[], qualifier=storeClientHelper, selectors=[], type_arguments=None), name=contentStore)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ContentStore, sub_type=None)), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CompleteCancelSnapshotTaskParameters, sub_type=None)), name=params)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CompleteCancelSnapshotTaskParameters, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=spaceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setSpaceId, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=COMPLETE_SNAPSHOT_CANCEL_TASK_NAME, postfix_operators=[], prefix_operators=[], qualifier=SnapshotConstants, selectors=[]), MethodInvocation(arguments=[], member=serialize, postfix_operators=[], prefix_operators=[], qualifier=params, selectors=[], type_arguments=None)], member=performTask, postfix_operators=[], prefix_operators=[], qualifier=contentStore, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=retry, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None), throws=['Exception'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Retriable, sub_type=None))], member=execute, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Retrier, sub_type=None)), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="snapshot cancellation is complete: {}"), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=info, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=CANCELLED, postfix_operators=[], prefix_operators=[], qualifier=SnapshotStatus, selectors=[])], member=setStatus, postfix_operators=[], prefix_operators=[], qualifier=snapshot, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=setStatusText, postfix_operators=[], prefix_operators=[], qualifier=snapshot, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=snapshot, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=logSnapshotUpdate, postfix_operators=[], prefix_operators=[], qualifier=eventLog, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="failed to complete cancellation on the durastore side for space {}: {}"), MemberReference(member=spaceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=start, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Thread, sub_type=None)) end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[Transactional] Keyword[public] Keyword[void] identifier[cancelSnapshot] operator[SEP] identifier[String] identifier[snapshotId] operator[SEP] Keyword[throws] identifier[SnapshotException] { identifier[checkInitialized] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Snapshot] identifier[snapshot] operator[=] identifier[getSnapshot] operator[SEP] identifier[snapshotId] operator[SEP] operator[SEP] identifier[stop] operator[SEP] identifier[snapshot] operator[SEP] operator[SEP] identifier[String] identifier[snapshotDir] operator[=] identifier[ContentDirUtils] operator[SEP] identifier[getDestinationPath] operator[SEP] identifier[snapshotId] , Keyword[this] operator[SEP] identifier[config] operator[SEP] identifier[getContentRootDir] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[deleteDirectory] operator[SEP] identifier[snapshotDir] operator[SEP] operator[SEP] Keyword[new] identifier[Thread] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { Keyword[final] identifier[DuracloudEndPointConfig] identifier[source] operator[=] identifier[snapshot] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[spaceId] operator[=] identifier[source] operator[SEP] identifier[getSpaceId] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ContentStore] identifier[contentStore] operator[=] identifier[storeClientHelper] operator[SEP] identifier[create] operator[SEP] identifier[source] , identifier[config] operator[SEP] identifier[getDuracloudUsername] operator[SEP] operator[SEP] , identifier[config] operator[SEP] identifier[getDuracloudPassword] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[String] identifier[result] operator[=] Keyword[new] identifier[Retrier] operator[SEP] operator[SEP] operator[SEP] identifier[execute] operator[SEP] Keyword[new] identifier[Retriable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[retry] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[CompleteCancelSnapshotTaskParameters] identifier[params] operator[=] Keyword[new] identifier[CompleteCancelSnapshotTaskParameters] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[setSpaceId] operator[SEP] identifier[spaceId] operator[SEP] operator[SEP] Keyword[return] identifier[contentStore] operator[SEP] identifier[performTask] operator[SEP] identifier[SnapshotConstants] operator[SEP] identifier[COMPLETE_SNAPSHOT_CANCEL_TASK_NAME] , identifier[params] operator[SEP] identifier[serialize] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , identifier[result] operator[SEP] operator[SEP] identifier[snapshot] operator[SEP] identifier[setStatus] operator[SEP] identifier[SnapshotStatus] operator[SEP] identifier[CANCELLED] operator[SEP] operator[SEP] identifier[snapshot] operator[SEP] identifier[setStatusText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[eventLog] operator[SEP] identifier[logSnapshotUpdate] operator[SEP] identifier[snapshot] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[spaceId] , identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] }
protected PendingIntent getPendingIntent(Context context, NotificationMessage message, Intent notificationIntent) { return PendingIntent.getActivity(context, getNotificationId(message), notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT); }
class class_name[name] begin[{] method[getPendingIntent, return_type[type[PendingIntent]], modifier[protected], parameter[context, message, notificationIntent]] begin[{] return[call[PendingIntent.getActivity, parameter[member[.context], call[.getNotificationId, parameter[member[.message]]], member[.notificationIntent], member[PendingIntent.FLAG_CANCEL_CURRENT]]]] end[}] END[}]
Keyword[protected] identifier[PendingIntent] identifier[getPendingIntent] operator[SEP] identifier[Context] identifier[context] , identifier[NotificationMessage] identifier[message] , identifier[Intent] identifier[notificationIntent] operator[SEP] { Keyword[return] identifier[PendingIntent] operator[SEP] identifier[getActivity] operator[SEP] identifier[context] , identifier[getNotificationId] operator[SEP] identifier[message] operator[SEP] , identifier[notificationIntent] , identifier[PendingIntent] operator[SEP] identifier[FLAG_CANCEL_CURRENT] operator[SEP] operator[SEP] }
public static <T,G extends Multigraph<T,? extends TypedEdge<T>>> TypedIsomorphicGraphCounter<T,G> asMotifs(Set<? extends G> motifs) { return new TypedIsomorphicGraphCounter<T,G>(motifs); }
class class_name[name] begin[{] method[asMotifs, return_type[type[TypedIsomorphicGraphCounter]], modifier[public static], parameter[motifs]] begin[{] return[ClassCreator(arguments=[MemberReference(member=motifs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=G, sub_type=None))], dimensions=None, name=TypedIsomorphicGraphCounter, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[G] Keyword[extends] identifier[Multigraph] operator[<] identifier[T] , operator[?] Keyword[extends] identifier[TypedEdge] operator[<] identifier[T] operator[>] operator[>] operator[>] identifier[TypedIsomorphicGraphCounter] operator[<] identifier[T] , identifier[G] operator[>] identifier[asMotifs] operator[SEP] identifier[Set] operator[<] operator[?] Keyword[extends] identifier[G] operator[>] identifier[motifs] operator[SEP] { Keyword[return] Keyword[new] identifier[TypedIsomorphicGraphCounter] operator[<] identifier[T] , identifier[G] operator[>] operator[SEP] identifier[motifs] operator[SEP] operator[SEP] }
public static void resolveRichTextField(ArrayResource array, CDAClient client) { for (CDAEntry entry : array.entries().values()) { ensureContentType(entry, client); for (CDAField field : entry.contentType().fields()) { if ("RichText".equals(field.type())) { resolveRichDocument(entry, field); resolveRichLink(array, entry, field); } } } }
class class_name[name] begin[{] method[resolveRichTextField, return_type[void], modifier[public static], parameter[array, client]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ensureContentType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=type, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], value="RichText"), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveRichDocument, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveRichLink, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=contentType, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=fields, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CDAField, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entries, postfix_operators=[], prefix_operators=[], qualifier=array, selectors=[MethodInvocation(arguments=[], member=values, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CDAEntry, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[resolveRichTextField] operator[SEP] identifier[ArrayResource] identifier[array] , identifier[CDAClient] identifier[client] operator[SEP] { Keyword[for] operator[SEP] identifier[CDAEntry] identifier[entry] operator[:] identifier[array] operator[SEP] identifier[entries] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { identifier[ensureContentType] operator[SEP] identifier[entry] , identifier[client] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[CDAField] identifier[field] operator[:] identifier[entry] operator[SEP] identifier[contentType] operator[SEP] operator[SEP] operator[SEP] identifier[fields] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[field] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[resolveRichDocument] operator[SEP] identifier[entry] , identifier[field] operator[SEP] operator[SEP] identifier[resolveRichLink] operator[SEP] identifier[array] , identifier[entry] , identifier[field] operator[SEP] operator[SEP] } } } }
private static Set<String> processIncludeExclude( CopyResourcesMojo copyResourcesMojo, Resource resource, Set<String> files) { Set<String> retval = new HashSet<String>(files); // process with include parameters retval = IncludeService.process(copyResourcesMojo, resource.getIncludes(), files); copyResourcesMojo.getLog().debug( "files after include processing :" + files); // process with exclude parameters retval = ExcludeService.process(copyResourcesMojo, resource.getExcludes(), retval); copyResourcesMojo.getLog().debug( "files after exclude processing :" + files); return retval; }
class class_name[name] begin[{] method[processIncludeExclude, return_type[type[Set]], modifier[private static], parameter[copyResourcesMojo, resource, files]] begin[{] local_variable[type[Set], retval] assign[member[.retval], call[IncludeService.process, parameter[member[.copyResourcesMojo], call[resource.getIncludes, parameter[]], member[.files]]]] call[copyResourcesMojo.getLog, parameter[]] assign[member[.retval], call[ExcludeService.process, parameter[member[.copyResourcesMojo], call[resource.getExcludes, parameter[]], member[.retval]]]] call[copyResourcesMojo.getLog, parameter[]] return[member[.retval]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Set] operator[<] identifier[String] operator[>] identifier[processIncludeExclude] operator[SEP] identifier[CopyResourcesMojo] identifier[copyResourcesMojo] , identifier[Resource] identifier[resource] , identifier[Set] operator[<] identifier[String] operator[>] identifier[files] operator[SEP] { identifier[Set] operator[<] identifier[String] operator[>] identifier[retval] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[String] operator[>] operator[SEP] identifier[files] operator[SEP] operator[SEP] identifier[retval] operator[=] identifier[IncludeService] operator[SEP] identifier[process] operator[SEP] identifier[copyResourcesMojo] , identifier[resource] operator[SEP] identifier[getIncludes] operator[SEP] operator[SEP] , identifier[files] operator[SEP] operator[SEP] identifier[copyResourcesMojo] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[files] operator[SEP] operator[SEP] identifier[retval] operator[=] identifier[ExcludeService] operator[SEP] identifier[process] operator[SEP] identifier[copyResourcesMojo] , identifier[resource] operator[SEP] identifier[getExcludes] operator[SEP] operator[SEP] , identifier[retval] operator[SEP] operator[SEP] identifier[copyResourcesMojo] operator[SEP] identifier[getLog] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[files] operator[SEP] operator[SEP] Keyword[return] identifier[retval] operator[SEP] }
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/1712") public static <T> ServerServiceDefinition useMarshalledMessages( final ServerServiceDefinition serviceDef, final MethodDescriptor.Marshaller<T> marshaller) { List<ServerMethodDefinition<?, ?>> wrappedMethods = new ArrayList<>(); List<MethodDescriptor<?, ?>> wrappedDescriptors = new ArrayList<>(); // Wrap the descriptors for (final ServerMethodDefinition<?, ?> definition : serviceDef.getMethods()) { final MethodDescriptor<?, ?> originalMethodDescriptor = definition.getMethodDescriptor(); final MethodDescriptor<T, T> wrappedMethodDescriptor = originalMethodDescriptor.toBuilder(marshaller, marshaller).build(); wrappedDescriptors.add(wrappedMethodDescriptor); wrappedMethods.add(wrapMethod(definition, wrappedMethodDescriptor)); } // Build the new service descriptor final ServerServiceDefinition.Builder serviceBuilder = ServerServiceDefinition .builder(new ServiceDescriptor(serviceDef.getServiceDescriptor().getName(), wrappedDescriptors)); // Create the new service definiton. for (ServerMethodDefinition<?, ?> definition : wrappedMethods) { serviceBuilder.addMethod(definition); } return serviceBuilder.build(); }
class class_name[name] begin[{] method[useMarshalledMessages, return_type[type[ServerServiceDefinition]], modifier[public static], parameter[serviceDef, marshaller]] begin[{] local_variable[type[List], wrappedMethods] local_variable[type[List], wrappedDescriptors] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getMethodDescriptor, postfix_operators=[], prefix_operators=[], qualifier=definition, selectors=[], type_arguments=None), name=originalMethodDescriptor)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=MethodDescriptor, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=marshaller, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=marshaller, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toBuilder, postfix_operators=[], prefix_operators=[], qualifier=originalMethodDescriptor, selectors=[MethodInvocation(arguments=[], member=build, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=wrappedMethodDescriptor)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=MethodDescriptor, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=wrappedMethodDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=wrappedDescriptors, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=definition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=wrappedMethodDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=wrapMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=wrappedMethods, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getMethods, postfix_operators=[], prefix_operators=[], qualifier=serviceDef, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=definition)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=ServerMethodDefinition, sub_type=None))), label=None) local_variable[type[ServerServiceDefinition], serviceBuilder] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=definition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addMethod, postfix_operators=[], prefix_operators=[], qualifier=serviceBuilder, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=wrappedMethods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=definition)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None), TypeArgument(pattern_type=?, type=None)], dimensions=[], name=ServerMethodDefinition, sub_type=None))), label=None) return[call[serviceBuilder.build, parameter[]]] end[}] END[}]
annotation[@] identifier[ExperimentalApi] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[ServerServiceDefinition] identifier[useMarshalledMessages] operator[SEP] Keyword[final] identifier[ServerServiceDefinition] identifier[serviceDef] , Keyword[final] identifier[MethodDescriptor] operator[SEP] identifier[Marshaller] operator[<] identifier[T] operator[>] identifier[marshaller] operator[SEP] { identifier[List] operator[<] identifier[ServerMethodDefinition] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[wrappedMethods] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[MethodDescriptor] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[wrappedDescriptors] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[ServerMethodDefinition] operator[<] operator[?] , operator[?] operator[>] identifier[definition] operator[:] identifier[serviceDef] operator[SEP] identifier[getMethods] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[MethodDescriptor] operator[<] operator[?] , operator[?] operator[>] identifier[originalMethodDescriptor] operator[=] identifier[definition] operator[SEP] identifier[getMethodDescriptor] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[MethodDescriptor] operator[<] identifier[T] , identifier[T] operator[>] identifier[wrappedMethodDescriptor] operator[=] identifier[originalMethodDescriptor] operator[SEP] identifier[toBuilder] operator[SEP] identifier[marshaller] , identifier[marshaller] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] identifier[wrappedDescriptors] operator[SEP] identifier[add] operator[SEP] identifier[wrappedMethodDescriptor] operator[SEP] operator[SEP] identifier[wrappedMethods] operator[SEP] identifier[add] operator[SEP] identifier[wrapMethod] operator[SEP] identifier[definition] , identifier[wrappedMethodDescriptor] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[ServerServiceDefinition] operator[SEP] identifier[Builder] identifier[serviceBuilder] operator[=] identifier[ServerServiceDefinition] operator[SEP] identifier[builder] operator[SEP] Keyword[new] identifier[ServiceDescriptor] operator[SEP] identifier[serviceDef] operator[SEP] identifier[getServiceDescriptor] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[wrappedDescriptors] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ServerMethodDefinition] operator[<] operator[?] , operator[?] operator[>] identifier[definition] operator[:] identifier[wrappedMethods] operator[SEP] { identifier[serviceBuilder] operator[SEP] identifier[addMethod] operator[SEP] identifier[definition] operator[SEP] operator[SEP] } Keyword[return] identifier[serviceBuilder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public static int mod(int val, int mod) { val = val % mod; if (val < 0) { val += mod; } return val; }
class class_name[name] begin[{] method[mod, return_type[type[int]], modifier[public static], parameter[val, mod]] begin[{] assign[member[.val], binary_operation[member[.val], %, member[.mod]]] if[binary_operation[member[.val], <, literal[0]]] begin[{] assign[member[.val], member[.mod]] else begin[{] None end[}] return[member[.val]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[mod] operator[SEP] Keyword[int] identifier[val] , Keyword[int] identifier[mod] operator[SEP] { identifier[val] operator[=] identifier[val] operator[%] identifier[mod] operator[SEP] Keyword[if] operator[SEP] identifier[val] operator[<] Other[0] operator[SEP] { identifier[val] operator[+=] identifier[mod] operator[SEP] } Keyword[return] identifier[val] operator[SEP] }
public ThrowingIntConsumer<X> unmask(IntConsumer consumer) { Objects.requireNonNull(consumer); return i -> unmaskException(() -> consumer.accept(i)); }
class class_name[name] begin[{] method[unmask, return_type[type[ThrowingIntConsumer]], modifier[public], parameter[consumer]] begin[{] call[Objects.requireNonNull, parameter[member[.consumer]]] return[LambdaExpression(body=MethodInvocation(arguments=[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=accept, postfix_operators=[], prefix_operators=[], qualifier=consumer, selectors=[], type_arguments=None), parameters=[])], member=unmaskException, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), parameters=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])] end[}] END[}]
Keyword[public] identifier[ThrowingIntConsumer] operator[<] identifier[X] operator[>] identifier[unmask] operator[SEP] identifier[IntConsumer] identifier[consumer] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[consumer] operator[SEP] operator[SEP] Keyword[return] identifier[i] operator[->] identifier[unmaskException] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[consumer] operator[SEP] identifier[accept] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] }
public void eventPostCommitUpdate(Transaction transaction) throws SevereMessageStoreException { super.eventPostCommitAdd(transaction); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "eventPostCommitUpdate", transaction); // Remove the current CPS from the MatchSpace if (_proxyHandler != null) { _destination.getSubscriptionIndex().remove(_controllableProxySubscription); _proxyHandler .getMessageProcessor() .getMessageProcessorMatching() .removePubSubOutputHandlerMatchTarget(_controllableProxySubscription); } // Add the CPS to the MatchSpace. try { if (_proxyHandler != null) { _controllableProxySubscription = _proxyHandler .getMessageProcessor() .getMessageProcessorMatching() .addPubSubOutputHandlerMatchTarget( _handler, _topicSpaceUuid, _topic, _foreignSecuredProxy, _meSubUserId); } } catch (SIException e) { // FFDC FFDCFilter.processException( e, "com.ibm.ws.sib.processor.proxyhandler.MESubscription.eventPostCommitUpdate", "1:738:1.55", this); SibTr.exception(tc, e); SibTr.error(tc, "INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] { "com.ibm.ws.sib.processor.proxyhandler.MESubscription", "1:745:1.55", e }); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "eventPostCommitUpdate", "SIErrorException"); // An error at this point is very bad ! throw new SIErrorException(nls.getFormattedMessage( "INTERNAL_MESSAGING_ERROR_CWSIP0002", new Object[] { "com.ibm.ws.sib.processor.proxyhandler.MESubscription", "1:755:1.55", e }, null), e); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "eventPostCommitUpdate"); }
class class_name[name] begin[{] method[eventPostCommitUpdate, return_type[void], modifier[public], parameter[transaction]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=transaction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eventPostCommitAdd, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["eventPostCommitUpdate"], member[.transaction]]] else begin[{] None end[}] if[binary_operation[member[._proxyHandler], !=, literal[null]]] begin[{] call[_destination.getSubscriptionIndex, parameter[]] call[_proxyHandler.getMessageProcessor, parameter[]] else begin[{] None end[}] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=_proxyHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=_controllableProxySubscription, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getMessageProcessor, postfix_operators=[], prefix_operators=[], qualifier=_proxyHandler, selectors=[MethodInvocation(arguments=[], member=getMessageProcessorMatching, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=_handler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=_topicSpaceUuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=_topic, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=_foreignSecuredProxy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=_meSubUserId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addPubSubOutputHandlerMatchTarget, 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.proxyhandler.MESubscription.eventPostCommitUpdate"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:738:1.55"), 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), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INTERNAL_MESSAGING_ERROR_CWSIP0002"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.proxyhandler.MESubscription"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:745:1.55"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=error, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEntryEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="eventPostCommitUpdate"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SIErrorException")], member=exit, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)), ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="INTERNAL_MESSAGING_ERROR_CWSIP0002"), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="com.ibm.ws.sib.processor.proxyhandler.MESubscription"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="1:755:1.55"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=getFormattedMessage, postfix_operators=[], prefix_operators=[], qualifier=nls, selectors=[], type_arguments=None), 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=SIErrorException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SIException']))], finally_block=None, label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["eventPostCommitUpdate"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[eventPostCommitUpdate] operator[SEP] identifier[Transaction] identifier[transaction] operator[SEP] Keyword[throws] identifier[SevereMessageStoreException] { Keyword[super] operator[SEP] identifier[eventPostCommitAdd] operator[SEP] identifier[transaction] 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] , identifier[transaction] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_proxyHandler] operator[!=] Other[null] operator[SEP] { identifier[_destination] operator[SEP] identifier[getSubscriptionIndex] operator[SEP] operator[SEP] operator[SEP] identifier[remove] operator[SEP] identifier[_controllableProxySubscription] operator[SEP] operator[SEP] identifier[_proxyHandler] operator[SEP] identifier[getMessageProcessor] operator[SEP] operator[SEP] operator[SEP] identifier[getMessageProcessorMatching] operator[SEP] operator[SEP] operator[SEP] identifier[removePubSubOutputHandlerMatchTarget] operator[SEP] identifier[_controllableProxySubscription] operator[SEP] operator[SEP] } Keyword[try] { Keyword[if] operator[SEP] identifier[_proxyHandler] operator[!=] Other[null] operator[SEP] { identifier[_controllableProxySubscription] operator[=] identifier[_proxyHandler] operator[SEP] identifier[getMessageProcessor] operator[SEP] operator[SEP] operator[SEP] identifier[getMessageProcessorMatching] operator[SEP] operator[SEP] operator[SEP] identifier[addPubSubOutputHandlerMatchTarget] operator[SEP] identifier[_handler] , identifier[_topicSpaceUuid] , identifier[_topic] , identifier[_foreignSecuredProxy] , identifier[_meSubUserId] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[SIException] 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] identifier[SibTr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , literal[String] , identifier[e] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[SIErrorException] operator[SEP] identifier[nls] operator[SEP] identifier[getFormattedMessage] operator[SEP] literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] , literal[String] , identifier[e] } , Other[null] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public OvhFilter delegatedAccount_email_filter_name_GET(String email, String name) throws IOException { String qPath = "/email/domain/delegatedAccount/{email}/filter/{name}"; StringBuilder sb = path(qPath, email, name); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhFilter.class); }
class class_name[name] begin[{] method[delegatedAccount_email_filter_name_GET, return_type[type[OvhFilter]], modifier[public], parameter[email, name]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[String], resp] return[call[.convertTo, parameter[member[.resp], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OvhFilter, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhFilter] identifier[delegatedAccount_email_filter_name_GET] operator[SEP] identifier[String] identifier[email] , identifier[String] identifier[name] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[email] , identifier[name] operator[SEP] operator[SEP] identifier[String] identifier[resp] operator[=] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[convertTo] operator[SEP] identifier[resp] , identifier[OvhFilter] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
@Override public int estimateUnassembledValueSize(int index) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.entry(this, tc, "estimateUnassembledValueSize", index); int size = 0; // We are only interested in 'real' fields, not boxed variants etc if (index < cacheSize) { checkIndex(index); synchronized (getMessageLockArtefact()) { // We can only figure out the size if we have a field definition (which presumably should // be the case). Have to specifiy false on getFieldDef, otherwise it will return null // if the message hasn't been assembled. JSField field = getFieldDef(index, false); if (field != null) { Object val = cache[index]; // If the value is in the cache and isn't something with 0 size if ((val != null) && (val != nullIndicator) && (val != JSVaryingListImpl.EMPTY_UNBOXED_VARYINGLIST) && (val != JSFixedListImpl.EMPTY_FIXEDLIST)) { size = (field.estimateSizeOfUnassembledValue(val, indirect)); } // If not, estimate it from the information in the contents, if we have any else if (contents != null) { try { size = (field.estimateSizeOfUnassembledValue(contents, getAbsoluteOffset(index), indirect)); } catch (JMFUninitializedAccessException e) { // No FFDC code needed // We don't want to throw an exception or even FFDC it (as we don't // know anything useful to FFDC). We'll just let it default to 0. } } } } } // If we have no FieldDef, a nullIndicator or no contents, then we will just return 0; if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) JmfTr.exit(this, tc, "estimateUnassembledValueSize", size); return size; }
class class_name[name] begin[{] method[estimateUnassembledValueSize, return_type[type[int]], modifier[public], parameter[index]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[JmfTr.entry, parameter[THIS[], member[.tc], literal["estimateUnassembledValueSize"], member[.index]]] else begin[{] None end[}] local_variable[type[int], size] if[binary_operation[member[.index], <, member[.cacheSize]]] begin[{] call[.checkIndex, parameter[member[.index]]] SYNCHRONIZED[call[.getMessageLockArtefact, parameter[]]] BEGIN[{] local_variable[type[JSField], field] if[binary_operation[member[.field], !=, literal[null]]] begin[{] local_variable[type[Object], val] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.val], !=, literal[null]], &&, binary_operation[member[.val], !=, member[.nullIndicator]]], &&, binary_operation[member[.val], !=, member[JSVaryingListImpl.EMPTY_UNBOXED_VARYINGLIST]]], &&, binary_operation[member[.val], !=, member[JSFixedListImpl.EMPTY_FIXEDLIST]]]] begin[{] assign[member[.size], call[field.estimateSizeOfUnassembledValue, parameter[member[.val], member[.indirect]]]] else begin[{] if[binary_operation[member[.contents], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=contents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAbsoluteOffset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=indirect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=estimateSizeOfUnassembledValue, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JMFUninitializedAccessException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] else begin[{] None end[}] END[}] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[JmfTr.exit, parameter[THIS[], member[.tc], literal["estimateUnassembledValueSize"], member[.size]]] else begin[{] None end[}] return[member[.size]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[estimateUnassembledValueSize] operator[SEP] Keyword[int] identifier[index] 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[JmfTr] operator[SEP] identifier[entry] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[index] operator[SEP] operator[SEP] Keyword[int] identifier[size] operator[=] Other[0] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[<] identifier[cacheSize] operator[SEP] { identifier[checkIndex] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[getMessageLockArtefact] operator[SEP] operator[SEP] operator[SEP] { identifier[JSField] identifier[field] operator[=] identifier[getFieldDef] operator[SEP] identifier[index] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[field] operator[!=] Other[null] operator[SEP] { identifier[Object] identifier[val] operator[=] identifier[cache] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[val] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[val] operator[!=] identifier[nullIndicator] operator[SEP] operator[&&] operator[SEP] identifier[val] operator[!=] identifier[JSVaryingListImpl] operator[SEP] identifier[EMPTY_UNBOXED_VARYINGLIST] operator[SEP] operator[&&] operator[SEP] identifier[val] operator[!=] identifier[JSFixedListImpl] operator[SEP] identifier[EMPTY_FIXEDLIST] operator[SEP] operator[SEP] { identifier[size] operator[=] operator[SEP] identifier[field] operator[SEP] identifier[estimateSizeOfUnassembledValue] operator[SEP] identifier[val] , identifier[indirect] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[contents] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[size] operator[=] operator[SEP] identifier[field] operator[SEP] identifier[estimateSizeOfUnassembledValue] operator[SEP] identifier[contents] , identifier[getAbsoluteOffset] operator[SEP] identifier[index] operator[SEP] , identifier[indirect] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JMFUninitializedAccessException] identifier[e] 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[JmfTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[size] operator[SEP] operator[SEP] Keyword[return] identifier[size] operator[SEP] }
protected ModuleSpec createModuleSpec(ScriptArchive archive, ModuleIdentifier moduleId, Map<ModuleId, ModuleIdentifier> moduleIdMap, Path moduleCompilationRoot) throws ModuleLoadException { ScriptModuleSpec archiveSpec = archive.getModuleSpec(); // create the jboss module pre-cursor artifact ModuleSpec.Builder moduleSpecBuilder = ModuleSpec.build(moduleId); JBossModuleUtils.populateModuleSpecWithResources(moduleSpecBuilder, archive); JBossModuleUtils.populateModuleSpecWithCoreDependencies(moduleSpecBuilder, archive); JBossModuleUtils.populateModuleSpecWithAppImports(moduleSpecBuilder, appClassLoader, archiveSpec.getAppImportFilterPaths() == null ? appPackagePaths : archiveSpec.getAppImportFilterPaths()); // Allow compiled class files to fetched as resources later on. JBossModuleUtils.populateModuleSpecWithCompilationRoot(moduleSpecBuilder, moduleCompilationRoot); // Populate the modulespec with the scriptArchive dependencies for (ModuleId dependencyModuleId : archiveSpec.getModuleDependencies()) { ScriptModule dependencyModule = getScriptModule(dependencyModuleId); Set<String> exportPaths = dependencyModule.getSourceArchive().getModuleSpec().getModuleExportFilterPaths(); JBossModuleUtils.populateModuleSpecWithModuleDependency(moduleSpecBuilder, archiveSpec.getModuleImportFilterPaths(), exportPaths, moduleIdMap.get(dependencyModuleId)); } return moduleSpecBuilder.create(); }
class class_name[name] begin[{] method[createModuleSpec, return_type[type[ModuleSpec]], modifier[protected], parameter[archive, moduleId, moduleIdMap, moduleCompilationRoot]] begin[{] local_variable[type[ScriptModuleSpec], archiveSpec] local_variable[type[ModuleSpec], moduleSpecBuilder] call[JBossModuleUtils.populateModuleSpecWithResources, parameter[member[.moduleSpecBuilder], member[.archive]]] call[JBossModuleUtils.populateModuleSpecWithCoreDependencies, parameter[member[.moduleSpecBuilder], member[.archive]]] call[JBossModuleUtils.populateModuleSpecWithAppImports, parameter[member[.moduleSpecBuilder], member[.appClassLoader], TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAppImportFilterPaths, postfix_operators=[], prefix_operators=[], qualifier=archiveSpec, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=getAppImportFilterPaths, postfix_operators=[], prefix_operators=[], qualifier=archiveSpec, selectors=[], type_arguments=None), if_true=MemberReference(member=appPackagePaths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]] call[JBossModuleUtils.populateModuleSpecWithCompilationRoot, parameter[member[.moduleSpecBuilder], member[.moduleCompilationRoot]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=dependencyModuleId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getScriptModule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=dependencyModule)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ScriptModule, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSourceArchive, postfix_operators=[], prefix_operators=[], qualifier=dependencyModule, selectors=[MethodInvocation(arguments=[], member=getModuleSpec, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getModuleExportFilterPaths, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=exportPaths)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Set, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=moduleSpecBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getModuleImportFilterPaths, postfix_operators=[], prefix_operators=[], qualifier=archiveSpec, selectors=[], type_arguments=None), MemberReference(member=exportPaths, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=dependencyModuleId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=moduleIdMap, selectors=[], type_arguments=None)], member=populateModuleSpecWithModuleDependency, postfix_operators=[], prefix_operators=[], qualifier=JBossModuleUtils, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getModuleDependencies, postfix_operators=[], prefix_operators=[], qualifier=archiveSpec, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dependencyModuleId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ModuleId, sub_type=None))), label=None) return[call[moduleSpecBuilder.create, parameter[]]] end[}] END[}]
Keyword[protected] identifier[ModuleSpec] identifier[createModuleSpec] operator[SEP] identifier[ScriptArchive] identifier[archive] , identifier[ModuleIdentifier] identifier[moduleId] , identifier[Map] operator[<] identifier[ModuleId] , identifier[ModuleIdentifier] operator[>] identifier[moduleIdMap] , identifier[Path] identifier[moduleCompilationRoot] operator[SEP] Keyword[throws] identifier[ModuleLoadException] { identifier[ScriptModuleSpec] identifier[archiveSpec] operator[=] identifier[archive] operator[SEP] identifier[getModuleSpec] operator[SEP] operator[SEP] operator[SEP] identifier[ModuleSpec] operator[SEP] identifier[Builder] identifier[moduleSpecBuilder] operator[=] identifier[ModuleSpec] operator[SEP] identifier[build] operator[SEP] identifier[moduleId] operator[SEP] operator[SEP] identifier[JBossModuleUtils] operator[SEP] identifier[populateModuleSpecWithResources] operator[SEP] identifier[moduleSpecBuilder] , identifier[archive] operator[SEP] operator[SEP] identifier[JBossModuleUtils] operator[SEP] identifier[populateModuleSpecWithCoreDependencies] operator[SEP] identifier[moduleSpecBuilder] , identifier[archive] operator[SEP] operator[SEP] identifier[JBossModuleUtils] operator[SEP] identifier[populateModuleSpecWithAppImports] operator[SEP] identifier[moduleSpecBuilder] , identifier[appClassLoader] , identifier[archiveSpec] operator[SEP] identifier[getAppImportFilterPaths] operator[SEP] operator[SEP] operator[==] Other[null] operator[?] identifier[appPackagePaths] operator[:] identifier[archiveSpec] operator[SEP] identifier[getAppImportFilterPaths] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[JBossModuleUtils] operator[SEP] identifier[populateModuleSpecWithCompilationRoot] operator[SEP] identifier[moduleSpecBuilder] , identifier[moduleCompilationRoot] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ModuleId] identifier[dependencyModuleId] operator[:] identifier[archiveSpec] operator[SEP] identifier[getModuleDependencies] operator[SEP] operator[SEP] operator[SEP] { identifier[ScriptModule] identifier[dependencyModule] operator[=] identifier[getScriptModule] operator[SEP] identifier[dependencyModuleId] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[exportPaths] operator[=] identifier[dependencyModule] operator[SEP] identifier[getSourceArchive] operator[SEP] operator[SEP] operator[SEP] identifier[getModuleSpec] operator[SEP] operator[SEP] operator[SEP] identifier[getModuleExportFilterPaths] operator[SEP] operator[SEP] operator[SEP] identifier[JBossModuleUtils] operator[SEP] identifier[populateModuleSpecWithModuleDependency] operator[SEP] identifier[moduleSpecBuilder] , identifier[archiveSpec] operator[SEP] identifier[getModuleImportFilterPaths] operator[SEP] operator[SEP] , identifier[exportPaths] , identifier[moduleIdMap] operator[SEP] identifier[get] operator[SEP] identifier[dependencyModuleId] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[moduleSpecBuilder] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] }
@Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.BEGIN_IMAGE__OBJTYPE: return getOBJTYPE(); } return super.eGet(featureID, resolve, coreType); }
class class_name[name] begin[{] method[eGet, return_type[type[Object]], modifier[public], parameter[featureID, resolve, coreType]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=BEGIN_IMAGE__OBJTYPE, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getOBJTYPE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resolve, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=coreType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eGet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[eGet] operator[SEP] Keyword[int] identifier[featureID] , Keyword[boolean] identifier[resolve] , Keyword[boolean] identifier[coreType] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[BEGIN_IMAGE__OBJTYPE] operator[:] Keyword[return] identifier[getOBJTYPE] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eGet] operator[SEP] identifier[featureID] , identifier[resolve] , identifier[coreType] operator[SEP] operator[SEP] }
public static void validateInputs(EditXmlInputs inputs) throws Exception { validateXmlAndFilePathInputs(inputs.getXml(), inputs.getFilePath()); if (Constants.Inputs.MOVE_ACTION.equals(inputs.getAction())) { validateIsNotEmpty(inputs.getXpath2(), "xpath2 input is required for action 'move' "); } if (!Constants.Inputs.SUBNODE_ACTION.equals(inputs.getAction()) && !Constants.Inputs.MOVE_ACTION.equals(inputs.getAction())) { validateIsNotEmpty(inputs.getType(), "type input is required for action '" + inputs.getAction() + "'"); if (!Constants.Inputs.TYPE_ELEM.equals(inputs.getType()) && !Constants.Inputs.TYPE_ATTR.equals(inputs.getType()) && !Constants.Inputs.TYPE_TEXT.equals(inputs.getType())) { throw new Exception("Invalid type. Only supported : " + Constants.Inputs.TYPE_ELEM + ", " + Constants.Inputs.TYPE_ATTR + ", " + Constants.Inputs.TYPE_TEXT); } if (Constants.Inputs.TYPE_ATTR.equals(inputs.getType())) { validateIsNotEmpty(inputs.getName(), "name input is required for type 'attr' "); } } }
class class_name[name] begin[{] method[validateInputs, return_type[void], modifier[public static], parameter[inputs]] begin[{] call[.validateXmlAndFilePathInputs, parameter[call[inputs.getXml, parameter[]], call[inputs.getFilePath, parameter[]]]] if[call[Constants.Inputs.MOVE_ACTION.equals, parameter[call[inputs.getAction, parameter[]]]]] begin[{] call[.validateIsNotEmpty, parameter[call[inputs.getXpath2, parameter[]], literal["xpath2 input is required for action 'move' "]]] else begin[{] None end[}] if[binary_operation[call[Constants.Inputs.SUBNODE_ACTION.equals, parameter[call[inputs.getAction, parameter[]]]], &&, call[Constants.Inputs.MOVE_ACTION.equals, parameter[call[inputs.getAction, parameter[]]]]]] begin[{] call[.validateIsNotEmpty, parameter[call[inputs.getType, parameter[]], binary_operation[binary_operation[literal["type input is required for action '"], +, call[inputs.getAction, parameter[]]], +, literal["'"]]]] if[binary_operation[binary_operation[call[Constants.Inputs.TYPE_ELEM.equals, parameter[call[inputs.getType, parameter[]]]], &&, call[Constants.Inputs.TYPE_ATTR.equals, parameter[call[inputs.getType, parameter[]]]]], &&, call[Constants.Inputs.TYPE_TEXT.equals, parameter[call[inputs.getType, parameter[]]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid type. Only supported : "), operandr=MemberReference(member=TYPE_ELEM, postfix_operators=[], prefix_operators=[], qualifier=Constants.Inputs, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=MemberReference(member=TYPE_ATTR, postfix_operators=[], prefix_operators=[], qualifier=Constants.Inputs, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", "), operator=+), operandr=MemberReference(member=TYPE_TEXT, postfix_operators=[], prefix_operators=[], qualifier=Constants.Inputs, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None)), label=None) else begin[{] None end[}] if[call[Constants.Inputs.TYPE_ATTR.equals, parameter[call[inputs.getType, parameter[]]]]] begin[{] call[.validateIsNotEmpty, parameter[call[inputs.getName, parameter[]], literal["name input is required for type 'attr' "]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[validateInputs] operator[SEP] identifier[EditXmlInputs] identifier[inputs] operator[SEP] Keyword[throws] identifier[Exception] { identifier[validateXmlAndFilePathInputs] operator[SEP] identifier[inputs] operator[SEP] identifier[getXml] operator[SEP] operator[SEP] , identifier[inputs] operator[SEP] identifier[getFilePath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[Inputs] operator[SEP] identifier[MOVE_ACTION] operator[SEP] identifier[equals] operator[SEP] identifier[inputs] operator[SEP] identifier[getAction] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[validateIsNotEmpty] operator[SEP] identifier[inputs] operator[SEP] identifier[getXpath2] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[Constants] operator[SEP] identifier[Inputs] operator[SEP] identifier[SUBNODE_ACTION] operator[SEP] identifier[equals] operator[SEP] identifier[inputs] operator[SEP] identifier[getAction] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[Constants] operator[SEP] identifier[Inputs] operator[SEP] identifier[MOVE_ACTION] operator[SEP] identifier[equals] operator[SEP] identifier[inputs] operator[SEP] identifier[getAction] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[validateIsNotEmpty] operator[SEP] identifier[inputs] operator[SEP] identifier[getType] operator[SEP] operator[SEP] , literal[String] operator[+] identifier[inputs] operator[SEP] identifier[getAction] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Constants] operator[SEP] identifier[Inputs] operator[SEP] identifier[TYPE_ELEM] operator[SEP] identifier[equals] operator[SEP] identifier[inputs] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[Constants] operator[SEP] identifier[Inputs] operator[SEP] identifier[TYPE_ATTR] operator[SEP] identifier[equals] operator[SEP] identifier[inputs] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[Constants] operator[SEP] identifier[Inputs] operator[SEP] identifier[TYPE_TEXT] operator[SEP] identifier[equals] operator[SEP] identifier[inputs] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[Inputs] operator[SEP] identifier[TYPE_ELEM] operator[+] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[Inputs] operator[SEP] identifier[TYPE_ATTR] operator[+] literal[String] operator[+] identifier[Constants] operator[SEP] identifier[Inputs] operator[SEP] identifier[TYPE_TEXT] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[Constants] operator[SEP] identifier[Inputs] operator[SEP] identifier[TYPE_ATTR] operator[SEP] identifier[equals] operator[SEP] identifier[inputs] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[validateIsNotEmpty] operator[SEP] identifier[inputs] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] } } }
public EClass getIfcConnectionPointEccentricity() { if (ifcConnectionPointEccentricityEClass == null) { ifcConnectionPointEccentricityEClass = (EClass) EPackage.Registry.INSTANCE .getEPackage(Ifc2x3tc1Package.eNS_URI).getEClassifiers().get(103); } return ifcConnectionPointEccentricityEClass; }
class class_name[name] begin[{] method[getIfcConnectionPointEccentricity, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcConnectionPointEccentricityEClass], ==, literal[null]]] begin[{] assign[member[.ifcConnectionPointEccentricityEClass], 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=103)], 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[.ifcConnectionPointEccentricityEClass]] end[}] END[}]
Keyword[public] identifier[EClass] identifier[getIfcConnectionPointEccentricity] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcConnectionPointEccentricityEClass] operator[==] Other[null] operator[SEP] { identifier[ifcConnectionPointEccentricityEClass] 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[103] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcConnectionPointEccentricityEClass] operator[SEP] }
public void setMinASp(Integer newMinASp) { Integer oldMinASp = minASp; minASp = newMinASp; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, AfplibPackage.FNORG__MIN_ASP, oldMinASp, minASp)); }
class class_name[name] begin[{] method[setMinASp, return_type[void], modifier[public], parameter[newMinASp]] begin[{] local_variable[type[Integer], oldMinASp] assign[member[.minASp], member[.newMinASp]] if[call[.eNotificationRequired, parameter[]]] begin[{] call[.eNotify, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=SET, postfix_operators=[], prefix_operators=[], qualifier=Notification, selectors=[]), MemberReference(member=FNORG__MIN_ASP, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[]), MemberReference(member=oldMinASp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=minASp, 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[setMinASp] operator[SEP] identifier[Integer] identifier[newMinASp] operator[SEP] { identifier[Integer] identifier[oldMinASp] operator[=] identifier[minASp] operator[SEP] identifier[minASp] operator[=] identifier[newMinASp] 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[SET] , identifier[AfplibPackage] operator[SEP] identifier[FNORG__MIN_ASP] , identifier[oldMinASp] , identifier[minASp] operator[SEP] operator[SEP] operator[SEP] }
private static final void copyBytes(byte[] src, int srcoff, byte[] tgt, int tgtoff, int length) { if (length < 64) { for (int i = srcoff, n = tgtoff; -- length >= 0; ++ i, ++ n) { tgt[n] = src[i]; } } else { System.arraycopy(src, srcoff, tgt, tgtoff, length); } }
class class_name[name] begin[{] method[copyBytes, return_type[void], modifier[final private static], parameter[src, srcoff, tgt, tgtoff, length]] begin[{] if[binary_operation[member[.length], <, literal[64]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=tgt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=src, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=srcoff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i), VariableDeclarator(dimensions=[], initializer=MemberReference(member=tgtoff, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=n)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[]), MemberReference(member=n, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) else begin[{] call[System.arraycopy, parameter[member[.src], member[.srcoff], member[.tgt], member[.tgtoff], member[.length]]] end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[final] Keyword[void] identifier[copyBytes] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[src] , Keyword[int] identifier[srcoff] , Keyword[byte] operator[SEP] operator[SEP] identifier[tgt] , Keyword[int] identifier[tgtoff] , Keyword[int] identifier[length] operator[SEP] { Keyword[if] operator[SEP] identifier[length] operator[<] Other[64] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[srcoff] , identifier[n] operator[=] identifier[tgtoff] operator[SEP] operator[--] identifier[length] operator[>=] Other[0] operator[SEP] operator[++] identifier[i] , operator[++] identifier[n] operator[SEP] { identifier[tgt] operator[SEP] identifier[n] operator[SEP] operator[=] identifier[src] operator[SEP] identifier[i] operator[SEP] operator[SEP] } } Keyword[else] { identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[src] , identifier[srcoff] , identifier[tgt] , identifier[tgtoff] , identifier[length] operator[SEP] operator[SEP] } }
public static Money from(MonetaryAmount amt) { if (amt.getClass() == Money.class) { return (Money) amt; } return Money.of(amt.getNumber().numberValue(BigDecimal.class), amt.getCurrency(), amt.getContext()); }
class class_name[name] begin[{] method[from, return_type[type[Money]], modifier[public static], parameter[amt]] begin[{] if[binary_operation[call[amt.getClass, parameter[]], ==, ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Money, sub_type=None))]] begin[{] return[Cast(expression=MemberReference(member=amt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Money, sub_type=None))] else begin[{] None end[}] return[call[Money.of, parameter[call[amt.getNumber, parameter[]], call[amt.getCurrency, parameter[]], call[amt.getContext, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Money] identifier[from] operator[SEP] identifier[MonetaryAmount] identifier[amt] operator[SEP] { Keyword[if] operator[SEP] identifier[amt] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[==] identifier[Money] operator[SEP] Keyword[class] operator[SEP] { Keyword[return] operator[SEP] identifier[Money] operator[SEP] identifier[amt] operator[SEP] } Keyword[return] identifier[Money] operator[SEP] identifier[of] operator[SEP] identifier[amt] operator[SEP] identifier[getNumber] operator[SEP] operator[SEP] operator[SEP] identifier[numberValue] operator[SEP] identifier[BigDecimal] operator[SEP] Keyword[class] operator[SEP] , identifier[amt] operator[SEP] identifier[getCurrency] operator[SEP] operator[SEP] , identifier[amt] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static void initializeNode(Element node) { node.attr(CONTENT_SCORE, Integer.toString(0)); String tagName = node.tagName(); if ("div".equalsIgnoreCase(tagName)) { incrementContentScore(node, 5); } else if ("pre".equalsIgnoreCase(tagName) || "td".equalsIgnoreCase(tagName) || "blockquote".equalsIgnoreCase(tagName)) { incrementContentScore(node, 3); } else if ("address".equalsIgnoreCase(tagName) || "ol".equalsIgnoreCase(tagName) || "ul".equalsIgnoreCase(tagName) || "dl".equalsIgnoreCase(tagName) || "dd".equalsIgnoreCase(tagName) || "dt".equalsIgnoreCase(tagName) || "li".equalsIgnoreCase(tagName) || "form".equalsIgnoreCase(tagName)) { incrementContentScore(node, -3); } else if ("h1".equalsIgnoreCase(tagName) || "h2".equalsIgnoreCase(tagName) || "h3".equalsIgnoreCase(tagName) || "h4".equalsIgnoreCase(tagName) || "h5".equalsIgnoreCase(tagName) || "h6".equalsIgnoreCase(tagName) || "th".equalsIgnoreCase(tagName)) { incrementContentScore(node, -5); } incrementContentScore(node, getClassWeight(node)); }
class class_name[name] begin[{] method[initializeNode, return_type[void], modifier[private static], parameter[node]] begin[{] call[node.attr, parameter[member[.CONTENT_SCORE], call[Integer.toString, parameter[literal[0]]]]] local_variable[type[String], tagName] if[literal["div"]] begin[{] call[.incrementContentScore, parameter[member[.node], literal[5]]] else begin[{] if[binary_operation[binary_operation[literal["pre"], ||, literal["td"]], ||, literal["blockquote"]]] begin[{] call[.incrementContentScore, parameter[member[.node], literal[3]]] else begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["address"], ||, literal["ol"]], ||, literal["ul"]], ||, literal["dl"]], ||, literal["dd"]], ||, literal["dt"]], ||, literal["li"]], ||, literal["form"]]] begin[{] call[.incrementContentScore, parameter[member[.node], literal[3]]] else begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["h1"], ||, literal["h2"]], ||, literal["h3"]], ||, literal["h4"]], ||, literal["h5"]], ||, literal["h6"]], ||, literal["th"]]] begin[{] call[.incrementContentScore, parameter[member[.node], literal[5]]] else begin[{] None end[}] end[}] end[}] end[}] call[.incrementContentScore, parameter[member[.node], call[.getClassWeight, parameter[member[.node]]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[initializeNode] operator[SEP] identifier[Element] identifier[node] operator[SEP] { identifier[node] operator[SEP] identifier[attr] operator[SEP] identifier[CONTENT_SCORE] , identifier[Integer] operator[SEP] identifier[toString] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[tagName] operator[=] identifier[node] operator[SEP] identifier[tagName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[SEP] { identifier[incrementContentScore] operator[SEP] identifier[node] , Other[5] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[SEP] { identifier[incrementContentScore] operator[SEP] identifier[node] , Other[3] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[SEP] { identifier[incrementContentScore] operator[SEP] identifier[node] , operator[-] Other[3] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[tagName] operator[SEP] operator[SEP] { identifier[incrementContentScore] operator[SEP] identifier[node] , operator[-] Other[5] operator[SEP] operator[SEP] } identifier[incrementContentScore] operator[SEP] identifier[node] , identifier[getClassWeight] operator[SEP] identifier[node] operator[SEP] operator[SEP] operator[SEP] }
private <T> T getEnvConfig(Map<String, ?> configs, String key, Class<T> type) { if(configs.containsKey(key)) { Object config = configs.get(key); if(type.isAssignableFrom(config.getClass())) { return type.cast(config); } } return null; }
class class_name[name] begin[{] method[getEnvConfig, return_type[type[T]], modifier[private], parameter[configs, key, type]] begin[{] if[call[configs.containsKey, parameter[member[.key]]]] begin[{] local_variable[type[Object], config] if[call[type.isAssignableFrom, parameter[call[config.getClass, parameter[]]]]] begin[{] return[call[type.cast, parameter[member[.config]]]] else begin[{] None end[}] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] operator[<] identifier[T] operator[>] identifier[T] identifier[getEnvConfig] operator[SEP] identifier[Map] operator[<] identifier[String] , operator[?] operator[>] identifier[configs] , identifier[String] identifier[key] , identifier[Class] operator[<] identifier[T] operator[>] identifier[type] operator[SEP] { Keyword[if] operator[SEP] identifier[configs] operator[SEP] identifier[containsKey] operator[SEP] identifier[key] operator[SEP] operator[SEP] { identifier[Object] identifier[config] operator[=] identifier[configs] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[config] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[type] operator[SEP] identifier[cast] operator[SEP] identifier[config] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public Properties getProperties() { Properties props = new Properties(); try (FileInputStream in = new FileInputStream(getPropertiesFile())) { props.load(in); } catch (IOException e) { Exceptions.ignore(e); } return props; }
class class_name[name] begin[{] method[getProperties, return_type[type[Properties]], modifier[public], parameter[]] begin[{] local_variable[type[Properties], props] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=props, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=ignore, postfix_operators=[], prefix_operators=[], qualifier=Exceptions, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=in, type=ReferenceType(arguments=None, dimensions=[], name=FileInputStream, sub_type=None), value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getPropertiesFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileInputStream, sub_type=None)))]) return[member[.props]] end[}] END[}]
Keyword[public] identifier[Properties] identifier[getProperties] operator[SEP] operator[SEP] { identifier[Properties] identifier[props] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[FileInputStream] identifier[in] operator[=] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[getPropertiesFile] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[props] operator[SEP] identifier[load] operator[SEP] identifier[in] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[Exceptions] operator[SEP] identifier[ignore] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[props] operator[SEP] }
private AdditionalInformation getAdditionalInformation() { AdditionalInformation additionalInformation = AdditionalInformation.Factory.newInstance(); additionalInformation.setCitizenship(CitizenshipDataType.U_S_CITIZEN_OR_NONCITIZEN_NATIONAL); StemCells stemCells = StemCells.Factory.newInstance(); stemCells.setIsHumanStemCellsInvolved(YesNoDataType.N_NO); stemCells.setStemCellsIndicator(YesNoDataType.N_NO); GraduateDegreeSought graduateDegreeSought = GraduateDegreeSought.Factory.newInstance(); ProposalPersonContract principalInvestigator = s2SProposalPersonService.getPrincipalInvestigator(pdDoc); ArrayList<String> cellLinesList = new ArrayList<>(Arrays.asList(stemCells.getCellLinesArray())); for (ProposalPersonContract proposalPerson : pdDoc.getDevelopmentProposal().getProposalPersons()) { if (proposalPerson.isPrincipalInvestigator()) { CitizenshipType citizenShip=s2SProposalPersonService.getCitizenship(proposalPerson); if(citizenShip!=null && StringUtils.isNotBlank(citizenShip.getCitizenShip())){ if(citizenShip.getCitizenShip().trim().equals(CitizenshipDataType.NON_U_S_CITIZEN_WITH_TEMPORARY_VISA.toString())){ additionalInformation.setCitizenship(CitizenshipDataType.NON_U_S_CITIZEN_WITH_TEMPORARY_VISA); } else if(citizenShip.getCitizenShip().trim().equals(CitizenshipDataType.PERMANENT_RESIDENT_OF_U_S.toString())){ additionalInformation.setCitizenship(CitizenshipDataType.PERMANENT_RESIDENT_OF_U_S); } else if(citizenShip.getCitizenShip().trim().equals(CitizenshipDataType.U_S_CITIZEN_OR_NONCITIZEN_NATIONAL.toString())){ additionalInformation.setCitizenship(CitizenshipDataType.U_S_CITIZEN_OR_NONCITIZEN_NATIONAL); } else if(citizenShip.getCitizenShip().trim().equals(CitizenshipDataType.PERMANENT_RESIDENT_OF_U_S_PENDING.toString())){ additionalInformation.setCitizenship(CitizenshipDataType.PERMANENT_RESIDENT_OF_U_S_PENDING); } }else{ additionalInformation.setCitizenship(null); } } } if (principalInvestigator != null && principalInvestigator.getMobilePhoneNumber() != null) { additionalInformation.setAlernatePhoneNumber(principalInvestigator.getMobilePhoneNumber()); } List<? extends AnswerHeaderContract> answerHeaders = getPropDevQuestionAnswerService().getQuestionnaireAnswerHeaders(pdDoc.getDevelopmentProposal().getProposalNumber(), getNamespace(), getFormName()); for (AnswerHeaderContract answerHeader : answerHeaders) { for (AnswerContract questionnaireAnswer : answerHeader.getAnswers()) { String answer = questionnaireAnswer.getAnswer(); Integer seqId = getQuestionAnswerService().findQuestionById(questionnaireAnswer.getQuestionId()).getQuestionSeqId(); if(seqId.equals(STEMCELLLINES)){ List<AnswerContract> answerList = getAnswers(questionnaireAnswer.getQuestionnaireQuestionsId(),answerHeader); for (AnswerContract questionnaireAnswerBO: answerList) { String questionnaireSubAnswer = questionnaireAnswerBO.getAnswer(); if(questionnaireSubAnswer!=null){ cellLinesList.add(questionnaireSubAnswer); stemCells.addCellLines(questionnaireSubAnswer); } } } if (answer != null) { switch (seqId) { case BROAD_TRAINING: case FIELD_TRAINING: if (!answer.toUpperCase().equals(SUB_CATEGORY_NOT_FOUND)) { FieldOfTrainingDataType.Enum e = FieldOfTrainingDataType.Enum.forString(answer); additionalInformation.setFieldOfTraining(e); } break; case NRSA_SUPPORT: additionalInformation .setCurrentPriorNRSASupportIndicator(answer .equals(YnqConstant.YES.code()) ? YesNoDataType.Y_YES : YesNoDataType.N_NO); break; case SUBMITTED_DIFF_INST: additionalInformation .setChangeOfInstitution(answer .equals(YnqConstant.YES.code()) ? YesNoDataType.Y_YES : YesNoDataType.N_NO); break; case FORMER_INST: additionalInformation.setFormerInstitution(answer); break; case STEMCELLS: stemCells .setIsHumanStemCellsInvolved(answer .equals(YnqConstant.YES.code()) ? YesNoDataType.Y_YES : YesNoDataType.N_NO); break; case CELLLINEIND: stemCells.setStemCellsIndicator(answer .equals(YnqConstant.YES.code()) ? YesNoDataType.Y_YES : YesNoDataType.N_NO); break; case DEGREE_TYPE_SOUGHT: graduateDegreeSought.setDegreeType(DegreeTypeDataType.Enum.forString(answer)); break; case DEG_EXP_COMP_DATE: graduateDegreeSought.setDegreeDate(answer.substring(6, 10) + STRING_SEPRATOR + answer.substring(0, 2)); break; case OTHER_MASTERS: graduateDegreeSought.setOtherDegreeTypeText(answer); break; case OTHER_DOCT: graduateDegreeSought.setOtherDegreeTypeText(answer); break; case OTHER_DDOT: graduateDegreeSought.setDegreeType(DegreeTypeDataType.DDOT_OTHER_DOCTOR_OF_MEDICAL_DENTISTRY); graduateDegreeSought.setOtherDegreeTypeText(answer); break; case OTHER_VDOT: graduateDegreeSought.setDegreeType(DegreeTypeDataType.VDOT_OTHER_DOCTOR_OF_VETERINARY_MEDICINE); graduateDegreeSought.setOtherDegreeTypeText(answer); break; case OTHER_DBOTH: graduateDegreeSought.setDegreeType(DegreeTypeDataType.DBOTH_OTHER_DOUBLE_DEGREE_PROGRAM); graduateDegreeSought.setOtherDegreeTypeText(answer); break; case OTHER_MDOT: graduateDegreeSought.setDegreeType(DegreeTypeDataType.MDOT_OTHER_DOCTOR_OF_MEDICINE); graduateDegreeSought.setOtherDegreeTypeText(answer); break; default: break; } } } } additionalInformation.setStemCells(stemCells); if(graduateDegreeSought.getDegreeType()!=null){ additionalInformation.setGraduateDegreeSought(graduateDegreeSought); } additionalInformation .setCurrentPriorNRSASupportArray(getCurrentPriorNRSASupportArray()); additionalInformation.setConcurrentSupport(YesNoDataType.N_NO); FellowshipTrainingAndCareerGoals fellowshipTrainingAndCareerGoals = FellowshipTrainingAndCareerGoals.Factory.newInstance(); ActivitiesPlannedUnderThisAward activitiesPlannedUnderThisAward = ActivitiesPlannedUnderThisAward.Factory.newInstance(); AttachedFileDataType attachedFileDataType = null; for (NarrativeContract narrative : pdDoc.getDevelopmentProposal() .getNarratives()) { if (narrative.getNarrativeType().getCode() != null) { switch (Integer.parseInt(narrative.getNarrativeType().getCode())) { case CONCURRENT_SUPPORT: attachedFileDataType = getAttachedFileType(narrative); if(attachedFileDataType == null){ continue; } ConcurrentSupportDescription concurrentSupportDescription = ConcurrentSupportDescription.Factory .newInstance(); concurrentSupportDescription .setAttFile(attachedFileDataType); additionalInformation .setConcurrentSupport(YesNoDataType.Y_YES); additionalInformation .setConcurrentSupportDescription(concurrentSupportDescription); break; case FELLOWSHIP: attachedFileDataType = getAttachedFileType(narrative); if(attachedFileDataType == null){ continue; } fellowshipTrainingAndCareerGoals.setAttFile(attachedFileDataType); break; case DISSERTATION: attachedFileDataType = getAttachedFileType(narrative); if(attachedFileDataType == null){ continue; } DissertationAndResearchExperience dissertationAndResearchExperience = DissertationAndResearchExperience.Factory .newInstance(); dissertationAndResearchExperience .setAttFile(attachedFileDataType); additionalInformation .setDissertationAndResearchExperience(dissertationAndResearchExperience); break; case ACTIVITIES: attachedFileDataType = getAttachedFileType(narrative); if(attachedFileDataType == null){ continue; } activitiesPlannedUnderThisAward.setAttFile(attachedFileDataType); break; default: break; } } } additionalInformation.setFellowshipTrainingAndCareerGoals(fellowshipTrainingAndCareerGoals); additionalInformation.setActivitiesPlannedUnderThisAward(activitiesPlannedUnderThisAward); return additionalInformation; }
class class_name[name] begin[{] method[getAdditionalInformation, return_type[type[AdditionalInformation]], modifier[private], parameter[]] begin[{] local_variable[type[AdditionalInformation], additionalInformation] call[additionalInformation.setCitizenship, parameter[member[CitizenshipDataType.U_S_CITIZEN_OR_NONCITIZEN_NATIONAL]]] local_variable[type[StemCells], stemCells] call[stemCells.setIsHumanStemCellsInvolved, parameter[member[YesNoDataType.N_NO]]] call[stemCells.setStemCellsIndicator, parameter[member[YesNoDataType.N_NO]]] local_variable[type[GraduateDegreeSought], graduateDegreeSought] local_variable[type[ProposalPersonContract], principalInvestigator] local_variable[type[ArrayList], cellLinesList] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isPrincipalInvestigator, postfix_operators=[], prefix_operators=[], qualifier=proposalPerson, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=proposalPerson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCitizenship, postfix_operators=[], prefix_operators=[], qualifier=s2SProposalPersonService, selectors=[], type_arguments=None), name=citizenShip)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CitizenshipType, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=citizenShip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCitizenShip, postfix_operators=[], prefix_operators=[], qualifier=citizenShip, selectors=[], type_arguments=None)], member=isNotBlank, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=setCitizenship, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getCitizenShip, postfix_operators=[], prefix_operators=[], qualifier=citizenShip, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=CitizenshipDataType.NON_U_S_CITIZEN_WITH_TEMPORARY_VISA, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=getCitizenShip, postfix_operators=[], prefix_operators=[], qualifier=citizenShip, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=CitizenshipDataType.PERMANENT_RESIDENT_OF_U_S, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=getCitizenShip, postfix_operators=[], prefix_operators=[], qualifier=citizenShip, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=CitizenshipDataType.U_S_CITIZEN_OR_NONCITIZEN_NATIONAL, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=IfStatement(condition=MethodInvocation(arguments=[], member=getCitizenShip, postfix_operators=[], prefix_operators=[], qualifier=citizenShip, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=CitizenshipDataType.PERMANENT_RESIDENT_OF_U_S_PENDING, selectors=[], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PERMANENT_RESIDENT_OF_U_S_PENDING, postfix_operators=[], prefix_operators=[], qualifier=CitizenshipDataType, selectors=[])], member=setCitizenship, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=U_S_CITIZEN_OR_NONCITIZEN_NATIONAL, postfix_operators=[], prefix_operators=[], qualifier=CitizenshipDataType, selectors=[])], member=setCitizenship, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PERMANENT_RESIDENT_OF_U_S, postfix_operators=[], prefix_operators=[], qualifier=CitizenshipDataType, selectors=[])], member=setCitizenship, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NON_U_S_CITIZEN_WITH_TEMPORARY_VISA, postfix_operators=[], prefix_operators=[], qualifier=CitizenshipDataType, selectors=[])], member=setCitizenship, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None)]))]))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDevelopmentProposal, postfix_operators=[], prefix_operators=[], qualifier=pdDoc, selectors=[MethodInvocation(arguments=[], member=getProposalPersons, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=proposalPerson)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ProposalPersonContract, sub_type=None))), label=None) if[binary_operation[binary_operation[member[.principalInvestigator], !=, literal[null]], &&, binary_operation[call[principalInvestigator.getMobilePhoneNumber, parameter[]], !=, literal[null]]]] begin[{] call[additionalInformation.setAlernatePhoneNumber, parameter[call[principalInvestigator.getMobilePhoneNumber, parameter[]]]] else begin[{] None end[}] local_variable[type[List], answerHeaders] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getAnswer, postfix_operators=[], prefix_operators=[], qualifier=questionnaireAnswer, selectors=[], type_arguments=None), name=answer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getQuestionAnswerService, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getQuestionId, postfix_operators=[], prefix_operators=[], qualifier=questionnaireAnswer, selectors=[], type_arguments=None)], member=findQuestionById, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getQuestionSeqId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=seqId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=STEMCELLLINES, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=seqId, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getQuestionnaireQuestionsId, postfix_operators=[], prefix_operators=[], qualifier=questionnaireAnswer, selectors=[], type_arguments=None), MemberReference(member=answerHeader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAnswers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=answerList)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AnswerContract, sub_type=None))], dimensions=[], name=List, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getAnswer, postfix_operators=[], prefix_operators=[], qualifier=questionnaireAnswerBO, selectors=[], type_arguments=None), name=questionnaireSubAnswer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=questionnaireSubAnswer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=questionnaireSubAnswer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=cellLinesList, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=questionnaireSubAnswer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addCellLines, postfix_operators=[], prefix_operators=[], qualifier=stemCells, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=answerList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=questionnaireAnswerBO)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AnswerContract, sub_type=None))), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=answer, 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=[SwitchStatement(cases=[SwitchStatementCase(case=['BROAD_TRAINING', 'FIELD_TRAINING'], statements=[IfStatement(condition=MethodInvocation(arguments=[], member=toUpperCase, postfix_operators=[], prefix_operators=['!'], qualifier=answer, selectors=[MethodInvocation(arguments=[MemberReference(member=SUB_CATEGORY_NOT_FOUND, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forString, postfix_operators=[], prefix_operators=[], qualifier=FieldOfTrainingDataType.Enum, selectors=[], type_arguments=None), name=e)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FieldOfTrainingDataType, sub_type=ReferenceType(arguments=None, dimensions=None, name=Enum, sub_type=None))), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setFieldOfTraining, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['NRSA_SUPPORT'], statements=[StatementExpression(expression=MethodInvocation(arguments=[TernaryExpression(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=code, postfix_operators=[], prefix_operators=[], qualifier=YnqConstant.YES, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=answer, selectors=[], type_arguments=None), if_false=MemberReference(member=N_NO, postfix_operators=[], prefix_operators=[], qualifier=YesNoDataType, selectors=[]), if_true=MemberReference(member=Y_YES, postfix_operators=[], prefix_operators=[], qualifier=YesNoDataType, selectors=[]))], member=setCurrentPriorNRSASupportIndicator, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['SUBMITTED_DIFF_INST'], statements=[StatementExpression(expression=MethodInvocation(arguments=[TernaryExpression(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=code, postfix_operators=[], prefix_operators=[], qualifier=YnqConstant.YES, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=answer, selectors=[], type_arguments=None), if_false=MemberReference(member=N_NO, postfix_operators=[], prefix_operators=[], qualifier=YesNoDataType, selectors=[]), if_true=MemberReference(member=Y_YES, postfix_operators=[], prefix_operators=[], qualifier=YesNoDataType, selectors=[]))], member=setChangeOfInstitution, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['FORMER_INST'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setFormerInstitution, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['STEMCELLS'], statements=[StatementExpression(expression=MethodInvocation(arguments=[TernaryExpression(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=code, postfix_operators=[], prefix_operators=[], qualifier=YnqConstant.YES, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=answer, selectors=[], type_arguments=None), if_false=MemberReference(member=N_NO, postfix_operators=[], prefix_operators=[], qualifier=YesNoDataType, selectors=[]), if_true=MemberReference(member=Y_YES, postfix_operators=[], prefix_operators=[], qualifier=YesNoDataType, selectors=[]))], member=setIsHumanStemCellsInvolved, postfix_operators=[], prefix_operators=[], qualifier=stemCells, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['CELLLINEIND'], statements=[StatementExpression(expression=MethodInvocation(arguments=[TernaryExpression(condition=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=code, postfix_operators=[], prefix_operators=[], qualifier=YnqConstant.YES, selectors=[], type_arguments=None)], member=equals, postfix_operators=[], prefix_operators=[], qualifier=answer, selectors=[], type_arguments=None), if_false=MemberReference(member=N_NO, postfix_operators=[], prefix_operators=[], qualifier=YesNoDataType, selectors=[]), if_true=MemberReference(member=Y_YES, postfix_operators=[], prefix_operators=[], qualifier=YesNoDataType, selectors=[]))], member=setStemCellsIndicator, postfix_operators=[], prefix_operators=[], qualifier=stemCells, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['DEGREE_TYPE_SOUGHT'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forString, postfix_operators=[], prefix_operators=[], qualifier=DegreeTypeDataType.Enum, selectors=[], type_arguments=None)], member=setDegreeType, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['DEG_EXP_COMP_DATE'], statements=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=10)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=answer, selectors=[], type_arguments=None), operandr=MemberReference(member=STRING_SEPRATOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=answer, selectors=[], type_arguments=None), operator=+)], member=setDegreeDate, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['OTHER_MASTERS'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOtherDegreeTypeText, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['OTHER_DOCT'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOtherDegreeTypeText, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['OTHER_DDOT'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=DDOT_OTHER_DOCTOR_OF_MEDICAL_DENTISTRY, postfix_operators=[], prefix_operators=[], qualifier=DegreeTypeDataType, selectors=[])], member=setDegreeType, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOtherDegreeTypeText, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['OTHER_VDOT'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=VDOT_OTHER_DOCTOR_OF_VETERINARY_MEDICINE, postfix_operators=[], prefix_operators=[], qualifier=DegreeTypeDataType, selectors=[])], member=setDegreeType, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOtherDegreeTypeText, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['OTHER_DBOTH'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=DBOTH_OTHER_DOUBLE_DEGREE_PROGRAM, postfix_operators=[], prefix_operators=[], qualifier=DegreeTypeDataType, selectors=[])], member=setDegreeType, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOtherDegreeTypeText, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['OTHER_MDOT'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=MDOT_OTHER_DOCTOR_OF_MEDICINE, postfix_operators=[], prefix_operators=[], qualifier=DegreeTypeDataType, selectors=[])], member=setDegreeType, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=answer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOtherDegreeTypeText, postfix_operators=[], prefix_operators=[], qualifier=graduateDegreeSought, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=seqId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAnswers, postfix_operators=[], prefix_operators=[], qualifier=answerHeader, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=questionnaireAnswer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AnswerContract, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=answerHeaders, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=answerHeader)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AnswerHeaderContract, sub_type=None))), label=None) call[additionalInformation.setStemCells, parameter[member[.stemCells]]] if[binary_operation[call[graduateDegreeSought.getDegreeType, parameter[]], !=, literal[null]]] begin[{] call[additionalInformation.setGraduateDegreeSought, parameter[member[.graduateDegreeSought]]] else begin[{] None end[}] call[additionalInformation.setCurrentPriorNRSASupportArray, parameter[call[.getCurrentPriorNRSASupportArray, parameter[]]]] call[additionalInformation.setConcurrentSupport, parameter[member[YesNoDataType.N_NO]]] local_variable[type[FellowshipTrainingAndCareerGoals], fellowshipTrainingAndCareerGoals] local_variable[type[ActivitiesPlannedUnderThisAward], activitiesPlannedUnderThisAward] local_variable[type[AttachedFileDataType], attachedFileDataType] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getNarrativeType, postfix_operators=[], prefix_operators=[], qualifier=narrative, selectors=[MethodInvocation(arguments=[], member=getCode, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[SwitchStatement(cases=[SwitchStatementCase(case=['CONCURRENT_SUPPORT'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=narrative, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttachedFileType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=ConcurrentSupportDescription.Factory, selectors=[], type_arguments=None), name=concurrentSupportDescription)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConcurrentSupportDescription, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttFile, postfix_operators=[], prefix_operators=[], qualifier=concurrentSupportDescription, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=Y_YES, postfix_operators=[], prefix_operators=[], qualifier=YesNoDataType, selectors=[])], member=setConcurrentSupport, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=concurrentSupportDescription, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setConcurrentSupportDescription, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['FELLOWSHIP'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=narrative, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttachedFileType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttFile, postfix_operators=[], prefix_operators=[], qualifier=fellowshipTrainingAndCareerGoals, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['DISSERTATION'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=narrative, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttachedFileType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=DissertationAndResearchExperience.Factory, selectors=[], type_arguments=None), name=dissertationAndResearchExperience)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DissertationAndResearchExperience, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttFile, postfix_operators=[], prefix_operators=[], qualifier=dissertationAndResearchExperience, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dissertationAndResearchExperience, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setDissertationAndResearchExperience, postfix_operators=[], prefix_operators=[], qualifier=additionalInformation, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['ACTIVITIES'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=narrative, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAttachedFileType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttFile, postfix_operators=[], prefix_operators=[], qualifier=activitiesPlannedUnderThisAward, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNarrativeType, postfix_operators=[], prefix_operators=[], qualifier=narrative, selectors=[MethodInvocation(arguments=[], member=getCode, 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)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDevelopmentProposal, postfix_operators=[], prefix_operators=[], qualifier=pdDoc, selectors=[MethodInvocation(arguments=[], member=getNarratives, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=narrative)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NarrativeContract, sub_type=None))), label=None) call[additionalInformation.setFellowshipTrainingAndCareerGoals, parameter[member[.fellowshipTrainingAndCareerGoals]]] call[additionalInformation.setActivitiesPlannedUnderThisAward, parameter[member[.activitiesPlannedUnderThisAward]]] return[member[.additionalInformation]] end[}] END[}]
Keyword[private] identifier[AdditionalInformation] identifier[getAdditionalInformation] operator[SEP] operator[SEP] { identifier[AdditionalInformation] identifier[additionalInformation] operator[=] identifier[AdditionalInformation] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[additionalInformation] operator[SEP] identifier[setCitizenship] operator[SEP] identifier[CitizenshipDataType] operator[SEP] identifier[U_S_CITIZEN_OR_NONCITIZEN_NATIONAL] operator[SEP] operator[SEP] identifier[StemCells] identifier[stemCells] operator[=] identifier[StemCells] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[stemCells] operator[SEP] identifier[setIsHumanStemCellsInvolved] operator[SEP] identifier[YesNoDataType] operator[SEP] identifier[N_NO] operator[SEP] operator[SEP] identifier[stemCells] operator[SEP] identifier[setStemCellsIndicator] operator[SEP] identifier[YesNoDataType] operator[SEP] identifier[N_NO] operator[SEP] operator[SEP] identifier[GraduateDegreeSought] identifier[graduateDegreeSought] operator[=] identifier[GraduateDegreeSought] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[ProposalPersonContract] identifier[principalInvestigator] operator[=] identifier[s2SProposalPersonService] operator[SEP] identifier[getPrincipalInvestigator] operator[SEP] identifier[pdDoc] operator[SEP] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] identifier[cellLinesList] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[stemCells] operator[SEP] identifier[getCellLinesArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ProposalPersonContract] identifier[proposalPerson] operator[:] identifier[pdDoc] operator[SEP] identifier[getDevelopmentProposal] operator[SEP] operator[SEP] operator[SEP] identifier[getProposalPersons] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[proposalPerson] operator[SEP] identifier[isPrincipalInvestigator] operator[SEP] operator[SEP] operator[SEP] { identifier[CitizenshipType] identifier[citizenShip] operator[=] identifier[s2SProposalPersonService] operator[SEP] identifier[getCitizenship] operator[SEP] identifier[proposalPerson] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[citizenShip] operator[!=] Other[null] operator[&&] identifier[StringUtils] operator[SEP] identifier[isNotBlank] operator[SEP] identifier[citizenShip] operator[SEP] identifier[getCitizenShip] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[citizenShip] operator[SEP] identifier[getCitizenShip] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[CitizenshipDataType] operator[SEP] identifier[NON_U_S_CITIZEN_WITH_TEMPORARY_VISA] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[additionalInformation] operator[SEP] identifier[setCitizenship] operator[SEP] identifier[CitizenshipDataType] operator[SEP] identifier[NON_U_S_CITIZEN_WITH_TEMPORARY_VISA] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[citizenShip] operator[SEP] identifier[getCitizenShip] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[CitizenshipDataType] operator[SEP] identifier[PERMANENT_RESIDENT_OF_U_S] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[additionalInformation] operator[SEP] identifier[setCitizenship] operator[SEP] identifier[CitizenshipDataType] operator[SEP] identifier[PERMANENT_RESIDENT_OF_U_S] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[citizenShip] operator[SEP] identifier[getCitizenShip] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[CitizenshipDataType] operator[SEP] identifier[U_S_CITIZEN_OR_NONCITIZEN_NATIONAL] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[additionalInformation] operator[SEP] identifier[setCitizenship] operator[SEP] identifier[CitizenshipDataType] operator[SEP] identifier[U_S_CITIZEN_OR_NONCITIZEN_NATIONAL] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[citizenShip] operator[SEP] identifier[getCitizenShip] operator[SEP] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[CitizenshipDataType] operator[SEP] identifier[PERMANENT_RESIDENT_OF_U_S_PENDING] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[additionalInformation] operator[SEP] identifier[setCitizenship] operator[SEP] identifier[CitizenshipDataType] operator[SEP] identifier[PERMANENT_RESIDENT_OF_U_S_PENDING] operator[SEP] operator[SEP] } } Keyword[else] { identifier[additionalInformation] operator[SEP] identifier[setCitizenship] operator[SEP] Other[null] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[principalInvestigator] operator[!=] Other[null] operator[&&] identifier[principalInvestigator] operator[SEP] identifier[getMobilePhoneNumber] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[additionalInformation] operator[SEP] identifier[setAlernatePhoneNumber] operator[SEP] identifier[principalInvestigator] operator[SEP] identifier[getMobilePhoneNumber] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] operator[?] Keyword[extends] identifier[AnswerHeaderContract] operator[>] identifier[answerHeaders] operator[=] identifier[getPropDevQuestionAnswerService] operator[SEP] operator[SEP] operator[SEP] identifier[getQuestionnaireAnswerHeaders] operator[SEP] identifier[pdDoc] operator[SEP] identifier[getDevelopmentProposal] operator[SEP] operator[SEP] operator[SEP] identifier[getProposalNumber] operator[SEP] operator[SEP] , identifier[getNamespace] operator[SEP] operator[SEP] , identifier[getFormName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[AnswerHeaderContract] identifier[answerHeader] operator[:] identifier[answerHeaders] operator[SEP] { Keyword[for] operator[SEP] identifier[AnswerContract] identifier[questionnaireAnswer] operator[:] identifier[answerHeader] operator[SEP] identifier[getAnswers] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[answer] operator[=] identifier[questionnaireAnswer] operator[SEP] identifier[getAnswer] operator[SEP] operator[SEP] operator[SEP] identifier[Integer] identifier[seqId] operator[=] identifier[getQuestionAnswerService] operator[SEP] operator[SEP] operator[SEP] identifier[findQuestionById] operator[SEP] identifier[questionnaireAnswer] operator[SEP] identifier[getQuestionId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getQuestionSeqId] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[seqId] operator[SEP] identifier[equals] operator[SEP] identifier[STEMCELLLINES] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[AnswerContract] operator[>] identifier[answerList] operator[=] identifier[getAnswers] operator[SEP] identifier[questionnaireAnswer] operator[SEP] identifier[getQuestionnaireQuestionsId] operator[SEP] operator[SEP] , identifier[answerHeader] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[AnswerContract] identifier[questionnaireAnswerBO] operator[:] identifier[answerList] operator[SEP] { identifier[String] identifier[questionnaireSubAnswer] operator[=] identifier[questionnaireAnswerBO] operator[SEP] identifier[getAnswer] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[questionnaireSubAnswer] operator[!=] Other[null] operator[SEP] { identifier[cellLinesList] operator[SEP] identifier[add] operator[SEP] identifier[questionnaireSubAnswer] operator[SEP] operator[SEP] identifier[stemCells] operator[SEP] identifier[addCellLines] operator[SEP] identifier[questionnaireSubAnswer] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[answer] operator[!=] Other[null] operator[SEP] { Keyword[switch] operator[SEP] identifier[seqId] operator[SEP] { Keyword[case] identifier[BROAD_TRAINING] operator[:] Keyword[case] identifier[FIELD_TRAINING] operator[:] Keyword[if] operator[SEP] operator[!] identifier[answer] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[SUB_CATEGORY_NOT_FOUND] operator[SEP] operator[SEP] { identifier[FieldOfTrainingDataType] operator[SEP] identifier[Enum] identifier[e] operator[=] identifier[FieldOfTrainingDataType] operator[SEP] identifier[Enum] operator[SEP] identifier[forString] operator[SEP] identifier[answer] operator[SEP] operator[SEP] identifier[additionalInformation] operator[SEP] identifier[setFieldOfTraining] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[NRSA_SUPPORT] operator[:] identifier[additionalInformation] operator[SEP] identifier[setCurrentPriorNRSASupportIndicator] operator[SEP] identifier[answer] operator[SEP] identifier[equals] operator[SEP] identifier[YnqConstant] operator[SEP] identifier[YES] operator[SEP] identifier[code] operator[SEP] operator[SEP] operator[SEP] operator[?] identifier[YesNoDataType] operator[SEP] identifier[Y_YES] operator[:] identifier[YesNoDataType] operator[SEP] identifier[N_NO] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[SUBMITTED_DIFF_INST] operator[:] identifier[additionalInformation] operator[SEP] identifier[setChangeOfInstitution] operator[SEP] identifier[answer] operator[SEP] identifier[equals] operator[SEP] identifier[YnqConstant] operator[SEP] identifier[YES] operator[SEP] identifier[code] operator[SEP] operator[SEP] operator[SEP] operator[?] identifier[YesNoDataType] operator[SEP] identifier[Y_YES] operator[:] identifier[YesNoDataType] operator[SEP] identifier[N_NO] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[FORMER_INST] operator[:] identifier[additionalInformation] operator[SEP] identifier[setFormerInstitution] operator[SEP] identifier[answer] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[STEMCELLS] operator[:] identifier[stemCells] operator[SEP] identifier[setIsHumanStemCellsInvolved] operator[SEP] identifier[answer] operator[SEP] identifier[equals] operator[SEP] identifier[YnqConstant] operator[SEP] identifier[YES] operator[SEP] identifier[code] operator[SEP] operator[SEP] operator[SEP] operator[?] identifier[YesNoDataType] operator[SEP] identifier[Y_YES] operator[:] identifier[YesNoDataType] operator[SEP] identifier[N_NO] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[CELLLINEIND] operator[:] identifier[stemCells] operator[SEP] identifier[setStemCellsIndicator] operator[SEP] identifier[answer] operator[SEP] identifier[equals] operator[SEP] identifier[YnqConstant] operator[SEP] identifier[YES] operator[SEP] identifier[code] operator[SEP] operator[SEP] operator[SEP] operator[?] identifier[YesNoDataType] operator[SEP] identifier[Y_YES] operator[:] identifier[YesNoDataType] operator[SEP] identifier[N_NO] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[DEGREE_TYPE_SOUGHT] operator[:] identifier[graduateDegreeSought] operator[SEP] identifier[setDegreeType] operator[SEP] identifier[DegreeTypeDataType] operator[SEP] identifier[Enum] operator[SEP] identifier[forString] operator[SEP] identifier[answer] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[DEG_EXP_COMP_DATE] operator[:] identifier[graduateDegreeSought] operator[SEP] identifier[setDegreeDate] operator[SEP] identifier[answer] operator[SEP] identifier[substring] operator[SEP] Other[6] , Other[10] operator[SEP] operator[+] identifier[STRING_SEPRATOR] operator[+] identifier[answer] operator[SEP] identifier[substring] operator[SEP] Other[0] , Other[2] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[OTHER_MASTERS] operator[:] identifier[graduateDegreeSought] operator[SEP] identifier[setOtherDegreeTypeText] operator[SEP] identifier[answer] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[OTHER_DOCT] operator[:] identifier[graduateDegreeSought] operator[SEP] identifier[setOtherDegreeTypeText] operator[SEP] identifier[answer] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[OTHER_DDOT] operator[:] identifier[graduateDegreeSought] operator[SEP] identifier[setDegreeType] operator[SEP] identifier[DegreeTypeDataType] operator[SEP] identifier[DDOT_OTHER_DOCTOR_OF_MEDICAL_DENTISTRY] operator[SEP] operator[SEP] identifier[graduateDegreeSought] operator[SEP] identifier[setOtherDegreeTypeText] operator[SEP] identifier[answer] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[OTHER_VDOT] operator[:] identifier[graduateDegreeSought] operator[SEP] identifier[setDegreeType] operator[SEP] identifier[DegreeTypeDataType] operator[SEP] identifier[VDOT_OTHER_DOCTOR_OF_VETERINARY_MEDICINE] operator[SEP] operator[SEP] identifier[graduateDegreeSought] operator[SEP] identifier[setOtherDegreeTypeText] operator[SEP] identifier[answer] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[OTHER_DBOTH] operator[:] identifier[graduateDegreeSought] operator[SEP] identifier[setDegreeType] operator[SEP] identifier[DegreeTypeDataType] operator[SEP] identifier[DBOTH_OTHER_DOUBLE_DEGREE_PROGRAM] operator[SEP] operator[SEP] identifier[graduateDegreeSought] operator[SEP] identifier[setOtherDegreeTypeText] operator[SEP] identifier[answer] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[OTHER_MDOT] operator[:] identifier[graduateDegreeSought] operator[SEP] identifier[setDegreeType] operator[SEP] identifier[DegreeTypeDataType] operator[SEP] identifier[MDOT_OTHER_DOCTOR_OF_MEDICINE] operator[SEP] operator[SEP] identifier[graduateDegreeSought] operator[SEP] identifier[setOtherDegreeTypeText] operator[SEP] identifier[answer] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } } } } identifier[additionalInformation] operator[SEP] identifier[setStemCells] operator[SEP] identifier[stemCells] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[graduateDegreeSought] operator[SEP] identifier[getDegreeType] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[additionalInformation] operator[SEP] identifier[setGraduateDegreeSought] operator[SEP] identifier[graduateDegreeSought] operator[SEP] operator[SEP] } identifier[additionalInformation] operator[SEP] identifier[setCurrentPriorNRSASupportArray] operator[SEP] identifier[getCurrentPriorNRSASupportArray] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[additionalInformation] operator[SEP] identifier[setConcurrentSupport] operator[SEP] identifier[YesNoDataType] operator[SEP] identifier[N_NO] operator[SEP] operator[SEP] identifier[FellowshipTrainingAndCareerGoals] identifier[fellowshipTrainingAndCareerGoals] operator[=] identifier[FellowshipTrainingAndCareerGoals] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[ActivitiesPlannedUnderThisAward] identifier[activitiesPlannedUnderThisAward] operator[=] identifier[ActivitiesPlannedUnderThisAward] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[AttachedFileDataType] identifier[attachedFileDataType] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[NarrativeContract] identifier[narrative] operator[:] identifier[pdDoc] operator[SEP] identifier[getDevelopmentProposal] operator[SEP] operator[SEP] operator[SEP] identifier[getNarratives] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[narrative] operator[SEP] identifier[getNarrativeType] operator[SEP] operator[SEP] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[switch] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[narrative] operator[SEP] identifier[getNarrativeType] operator[SEP] operator[SEP] operator[SEP] identifier[getCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[CONCURRENT_SUPPORT] operator[:] identifier[attachedFileDataType] operator[=] identifier[getAttachedFileType] operator[SEP] identifier[narrative] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attachedFileDataType] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } identifier[ConcurrentSupportDescription] identifier[concurrentSupportDescription] operator[=] identifier[ConcurrentSupportDescription] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[concurrentSupportDescription] operator[SEP] identifier[setAttFile] operator[SEP] identifier[attachedFileDataType] operator[SEP] operator[SEP] identifier[additionalInformation] operator[SEP] identifier[setConcurrentSupport] operator[SEP] identifier[YesNoDataType] operator[SEP] identifier[Y_YES] operator[SEP] operator[SEP] identifier[additionalInformation] operator[SEP] identifier[setConcurrentSupportDescription] operator[SEP] identifier[concurrentSupportDescription] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[FELLOWSHIP] operator[:] identifier[attachedFileDataType] operator[=] identifier[getAttachedFileType] operator[SEP] identifier[narrative] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attachedFileDataType] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } identifier[fellowshipTrainingAndCareerGoals] operator[SEP] identifier[setAttFile] operator[SEP] identifier[attachedFileDataType] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[DISSERTATION] operator[:] identifier[attachedFileDataType] operator[=] identifier[getAttachedFileType] operator[SEP] identifier[narrative] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attachedFileDataType] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } identifier[DissertationAndResearchExperience] identifier[dissertationAndResearchExperience] operator[=] identifier[DissertationAndResearchExperience] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[dissertationAndResearchExperience] operator[SEP] identifier[setAttFile] operator[SEP] identifier[attachedFileDataType] operator[SEP] operator[SEP] identifier[additionalInformation] operator[SEP] identifier[setDissertationAndResearchExperience] operator[SEP] identifier[dissertationAndResearchExperience] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[ACTIVITIES] operator[:] identifier[attachedFileDataType] operator[=] identifier[getAttachedFileType] operator[SEP] identifier[narrative] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attachedFileDataType] operator[==] Other[null] operator[SEP] { Keyword[continue] operator[SEP] } identifier[activitiesPlannedUnderThisAward] operator[SEP] identifier[setAttFile] operator[SEP] identifier[attachedFileDataType] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } } } identifier[additionalInformation] operator[SEP] identifier[setFellowshipTrainingAndCareerGoals] operator[SEP] identifier[fellowshipTrainingAndCareerGoals] operator[SEP] operator[SEP] identifier[additionalInformation] operator[SEP] identifier[setActivitiesPlannedUnderThisAward] operator[SEP] identifier[activitiesPlannedUnderThisAward] operator[SEP] operator[SEP] Keyword[return] identifier[additionalInformation] operator[SEP] }
public static <T> T track(T target){ //noinspection unchecked return (T) Enhancer.create(target.getClass(), (MethodInterceptor) (o, method, objects, methodProxy) -> { METHODSTACK.get().push(method); try{ return methodProxy.invokeSuper(o, objects); } finally { METHODSTACK.get().pop(); } }); }
class class_name[name] begin[{] method[track, return_type[type[T]], modifier[public static], parameter[target]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=target, selectors=[], type_arguments=None), Cast(expression=LambdaExpression(body=[StatementExpression(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=METHODSTACK, selectors=[MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=push, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=objects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invokeSuper, postfix_operators=[], prefix_operators=[], qualifier=methodProxy, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=METHODSTACK, selectors=[MethodInvocation(arguments=[], member=pop, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, resources=None)], parameters=[InferredFormalParameter(name=o), InferredFormalParameter(name=method), InferredFormalParameter(name=objects), InferredFormalParameter(name=methodProxy)]), type=ReferenceType(arguments=None, dimensions=[], name=MethodInterceptor, sub_type=None))], member=create, postfix_operators=[], prefix_operators=[], qualifier=Enhancer, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[track] operator[SEP] identifier[T] identifier[target] operator[SEP] { Keyword[return] operator[SEP] identifier[T] operator[SEP] identifier[Enhancer] operator[SEP] identifier[create] operator[SEP] identifier[target] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , operator[SEP] identifier[MethodInterceptor] operator[SEP] operator[SEP] identifier[o] , identifier[method] , identifier[objects] , identifier[methodProxy] operator[SEP] operator[->] { identifier[METHODSTACK] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[push] operator[SEP] identifier[method] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[methodProxy] operator[SEP] identifier[invokeSuper] operator[SEP] identifier[o] , identifier[objects] operator[SEP] operator[SEP] } Keyword[finally] { identifier[METHODSTACK] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
@Override public void setStriped(boolean striped) { this.striped = striped; for (int i = 0; i < getChildCount(); i++) { retrieveChild(i).setStriped(striped); } }
class class_name[name] begin[{] method[setStriped, return_type[void], modifier[public], parameter[striped]] begin[{] assign[THIS[member[None.striped]], member[.striped]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=retrieveChild, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=striped, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setStriped, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getChildCount, postfix_operators=[], prefix_operators=[], qualifier=, 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) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setStriped] operator[SEP] Keyword[boolean] identifier[striped] operator[SEP] { Keyword[this] operator[SEP] identifier[striped] operator[=] identifier[striped] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[getChildCount] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[retrieveChild] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[setStriped] operator[SEP] identifier[striped] operator[SEP] operator[SEP] } }
public void addUsername(String username) { SystemAssert.requireArgument(username != null && !username.isEmpty(), "Username cannot be null or empty."); this.usernames.add(username); }
class class_name[name] begin[{] method[addUsername, return_type[void], modifier[public], parameter[username]] begin[{] call[SystemAssert.requireArgument, parameter[binary_operation[binary_operation[member[.username], !=, literal[null]], &&, call[username.isEmpty, parameter[]]], literal["Username cannot be null or empty."]]] THIS[member[None.usernames]call[None.add, parameter[member[.username]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addUsername] operator[SEP] identifier[String] identifier[username] operator[SEP] { identifier[SystemAssert] operator[SEP] identifier[requireArgument] operator[SEP] identifier[username] operator[!=] Other[null] operator[&&] operator[!] identifier[username] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[usernames] operator[SEP] identifier[add] operator[SEP] identifier[username] operator[SEP] operator[SEP] }
private static String extractModelName(String filter) { Matcher matcher = MODEL_FILTER_PATTERN.matcher(filter); if (matcher.matches()) { return matcher.group(1); } else { return "Unknown model"; } }
class class_name[name] begin[{] method[extractModelName, return_type[type[String]], modifier[private static], parameter[filter]] begin[{] local_variable[type[Matcher], matcher] if[call[matcher.matches, parameter[]]] begin[{] return[call[matcher.group, parameter[literal[1]]]] else begin[{] return[literal["Unknown model"]] end[}] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[extractModelName] operator[SEP] identifier[String] identifier[filter] operator[SEP] { identifier[Matcher] identifier[matcher] operator[=] identifier[MODEL_FILTER_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[filter] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[matcher] operator[SEP] identifier[group] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] literal[String] operator[SEP] } }
@Programmatic public DocumentType findByReference( final String reference) { return queryResultsCache.execute( () -> repositoryService.firstMatch( new QueryDefault<>(DocumentType.class, "findByReference", "reference", reference)), DocumentTypeRepository.class, "findByReference", reference); }
class class_name[name] begin[{] method[findByReference, return_type[type[DocumentType]], modifier[public], parameter[reference]] begin[{] return[call[queryResultsCache.execute, parameter[LambdaExpression(body=MethodInvocation(arguments=[ClassCreator(arguments=[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DocumentType, sub_type=None)), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="findByReference"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="reference"), MemberReference(member=reference, 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=QueryDefault, sub_type=None))], member=firstMatch, postfix_operators=[], prefix_operators=[], qualifier=repositoryService, selectors=[], type_arguments=None), parameters=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=DocumentTypeRepository, sub_type=None)), literal["findByReference"], member[.reference]]]] end[}] END[}]
annotation[@] identifier[Programmatic] Keyword[public] identifier[DocumentType] identifier[findByReference] operator[SEP] Keyword[final] identifier[String] identifier[reference] operator[SEP] { Keyword[return] identifier[queryResultsCache] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] operator[->] identifier[repositoryService] operator[SEP] identifier[firstMatch] operator[SEP] Keyword[new] identifier[QueryDefault] operator[<] operator[>] operator[SEP] identifier[DocumentType] operator[SEP] Keyword[class] , literal[String] , literal[String] , identifier[reference] operator[SEP] operator[SEP] , identifier[DocumentTypeRepository] operator[SEP] Keyword[class] , literal[String] , identifier[reference] operator[SEP] operator[SEP] }
public static String getMiscHashCode(String str) { if (null == str || str.length() == 0) { return ""; } int originSize = 20; if (str.length() <= originSize) { return str; } StringBuilder tmp = new StringBuilder(); tmp.append(str.hashCode()).append(SPLIT_STR).append(getHashCode(str)); int mid = str.length() / 2; String str1 = str.substring(0, mid); String str2 = str.substring(mid); tmp.append(SPLIT_STR).append(str1.hashCode()); tmp.append(SPLIT_STR).append(str2.hashCode()); return tmp.toString(); }
class class_name[name] begin[{] method[getMiscHashCode, return_type[type[String]], modifier[public static], parameter[str]] begin[{] if[binary_operation[binary_operation[literal[null], ==, member[.str]], ||, binary_operation[call[str.length, parameter[]], ==, literal[0]]]] begin[{] return[literal[""]] else begin[{] None end[}] local_variable[type[int], originSize] if[binary_operation[call[str.length, parameter[]], <=, member[.originSize]]] begin[{] return[member[.str]] else begin[{] None end[}] local_variable[type[StringBuilder], tmp] call[tmp.append, parameter[call[str.hashCode, parameter[]]]] local_variable[type[int], mid] local_variable[type[String], str1] local_variable[type[String], str2] call[tmp.append, parameter[member[.SPLIT_STR]]] call[tmp.append, parameter[member[.SPLIT_STR]]] return[call[tmp.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getMiscHashCode] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[str] operator[||] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[return] literal[String] operator[SEP] } Keyword[int] identifier[originSize] operator[=] Other[20] operator[SEP] Keyword[if] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<=] identifier[originSize] operator[SEP] { Keyword[return] identifier[str] operator[SEP] } identifier[StringBuilder] identifier[tmp] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[tmp] operator[SEP] identifier[append] operator[SEP] identifier[str] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[SPLIT_STR] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[getHashCode] operator[SEP] identifier[str] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[mid] operator[=] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[/] Other[2] operator[SEP] identifier[String] identifier[str1] operator[=] identifier[str] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[mid] operator[SEP] operator[SEP] identifier[String] identifier[str2] operator[=] identifier[str] operator[SEP] identifier[substring] operator[SEP] identifier[mid] operator[SEP] operator[SEP] identifier[tmp] operator[SEP] identifier[append] operator[SEP] identifier[SPLIT_STR] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[str1] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tmp] operator[SEP] identifier[append] operator[SEP] identifier[SPLIT_STR] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[str2] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[tmp] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static ImageBuffer createFunctionDraw(CollisionFormula collision, int tw, int th) { final ImageBuffer buffer = Graphics.createImageBuffer(tw, th, ColorRgba.TRANSPARENT); final Graphic g = buffer.createGraphic(); g.setColor(ColorRgba.PURPLE); createFunctionDraw(g, collision, tw, th); g.dispose(); return buffer; }
class class_name[name] begin[{] method[createFunctionDraw, return_type[type[ImageBuffer]], modifier[public static], parameter[collision, tw, th]] begin[{] local_variable[type[ImageBuffer], buffer] local_variable[type[Graphic], g] call[g.setColor, parameter[member[ColorRgba.PURPLE]]] call[.createFunctionDraw, parameter[member[.g], member[.collision], member[.tw], member[.th]]] call[g.dispose, parameter[]] return[member[.buffer]] end[}] END[}]
Keyword[public] Keyword[static] identifier[ImageBuffer] identifier[createFunctionDraw] operator[SEP] identifier[CollisionFormula] identifier[collision] , Keyword[int] identifier[tw] , Keyword[int] identifier[th] operator[SEP] { Keyword[final] identifier[ImageBuffer] identifier[buffer] operator[=] identifier[Graphics] operator[SEP] identifier[createImageBuffer] operator[SEP] identifier[tw] , identifier[th] , identifier[ColorRgba] operator[SEP] identifier[TRANSPARENT] operator[SEP] operator[SEP] Keyword[final] identifier[Graphic] identifier[g] operator[=] identifier[buffer] operator[SEP] identifier[createGraphic] operator[SEP] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[setColor] operator[SEP] identifier[ColorRgba] operator[SEP] identifier[PURPLE] operator[SEP] operator[SEP] identifier[createFunctionDraw] operator[SEP] identifier[g] , identifier[collision] , identifier[tw] , identifier[th] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[dispose] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[buffer] operator[SEP] }
private static boolean validateFingerprint(FingerprintAttribute fingerprint, byte[] message, int offset, int length) { byte[] incomingCrcBytes = fingerprint.getChecksum(); // now check whether the CRC really is what it's supposed to be. // re calculate the check sum byte[] realCrcBytes = FingerprintAttribute.calculateXorCRC32(message, offset, length); // CRC validation. if (!Arrays.equals(incomingCrcBytes, realCrcBytes)) { if (logger.isDebugEnabled()) { logger.debug("An incoming message arrived with a wrong FINGERPRINT attribute value. " + "CRC Was:" + Arrays.toString(incomingCrcBytes) + ". Should have been:" + Arrays.toString(realCrcBytes) + ". Will ignore."); } return false; } return true; }
class class_name[name] begin[{] method[validateFingerprint, return_type[type[boolean]], modifier[private static], parameter[fingerprint, message, offset, length]] begin[{] local_variable[type[byte], incomingCrcBytes] local_variable[type[byte], realCrcBytes] if[call[Arrays.equals, parameter[member[.incomingCrcBytes], member[.realCrcBytes]]]] begin[{] if[call[logger.isDebugEnabled, parameter[]]] begin[{] call[logger.debug, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["An incoming message arrived with a wrong FINGERPRINT attribute value. "], +, literal["CRC Was:"]], +, call[Arrays.toString, parameter[member[.incomingCrcBytes]]]], +, literal[". Should have been:"]], +, call[Arrays.toString, parameter[member[.realCrcBytes]]]], +, literal[". Will ignore."]]]] else begin[{] None end[}] return[literal[false]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[boolean] identifier[validateFingerprint] operator[SEP] identifier[FingerprintAttribute] identifier[fingerprint] , Keyword[byte] operator[SEP] operator[SEP] identifier[message] , Keyword[int] identifier[offset] , Keyword[int] identifier[length] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[incomingCrcBytes] operator[=] identifier[fingerprint] operator[SEP] identifier[getChecksum] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[realCrcBytes] operator[=] identifier[FingerprintAttribute] operator[SEP] identifier[calculateXorCRC32] operator[SEP] identifier[message] , identifier[offset] , identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[Arrays] operator[SEP] identifier[equals] operator[SEP] identifier[incomingCrcBytes] , identifier[realCrcBytes] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[Arrays] operator[SEP] identifier[toString] operator[SEP] identifier[incomingCrcBytes] operator[SEP] operator[+] literal[String] operator[+] identifier[Arrays] operator[SEP] identifier[toString] operator[SEP] identifier[realCrcBytes] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public static void method(String methodName, String fieldName, Class<?> clazz){ String completeName = clazz.getCanonicalName(); String packageName = clazz.getPackage().getName(); String className = completeName.substring(packageName.length()+1); throw new MalformedBeanException(MSG.INSTANCE.message(malformedBeanException3, methodName,fieldName,className)); }
class class_name[name] begin[{] method[method, return_type[void], modifier[public static], parameter[methodName, fieldName, clazz]] begin[{] local_variable[type[String], completeName] local_variable[type[String], packageName] local_variable[type[String], className] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=malformedBeanException3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=message, postfix_operators=[], prefix_operators=[], qualifier=MSG.INSTANCE, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MalformedBeanException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[method] operator[SEP] identifier[String] identifier[methodName] , identifier[String] identifier[fieldName] , identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[SEP] { identifier[String] identifier[completeName] operator[=] identifier[clazz] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[packageName] operator[=] identifier[clazz] operator[SEP] identifier[getPackage] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[className] operator[=] identifier[completeName] operator[SEP] identifier[substring] operator[SEP] identifier[packageName] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[MalformedBeanException] operator[SEP] identifier[MSG] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[message] operator[SEP] identifier[malformedBeanException3] , identifier[methodName] , identifier[fieldName] , identifier[className] operator[SEP] operator[SEP] operator[SEP] }
public static CommercePriceList findByPrimaryKey(long commercePriceListId) throws com.liferay.commerce.price.list.exception.NoSuchPriceListException { return getPersistence().findByPrimaryKey(commercePriceListId); }
class class_name[name] begin[{] method[findByPrimaryKey, return_type[type[CommercePriceList]], modifier[public static], parameter[commercePriceListId]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CommercePriceList] identifier[findByPrimaryKey] operator[SEP] Keyword[long] identifier[commercePriceListId] operator[SEP] Keyword[throws] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[price] operator[SEP] identifier[list] operator[SEP] identifier[exception] operator[SEP] identifier[NoSuchPriceListException] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[findByPrimaryKey] operator[SEP] identifier[commercePriceListId] operator[SEP] operator[SEP] }
public void flushDataStoreEvents() { DataStoreEvent e; switch(currentDataStoreEventType){ case INSERT: e = DataStoreEvent.insertionEvent(dataStoreObjects); break; case REMOVE: e = DataStoreEvent.removalEvent(dataStoreObjects); break; case UPDATE: e = DataStoreEvent.updateEvent(dataStoreObjects); break; default: return; } for(int i = dataListenerList.size(); --i >= 0;) { dataListenerList.get(i).contentChanged(e); } // reset accumulateDataStoreEvents = false; currentDataStoreEventType = null; dataStoreObjects = null; }
class class_name[name] begin[{] method[flushDataStoreEvents, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[DataStoreEvent], e] SwitchStatement(cases=[SwitchStatementCase(case=['INSERT'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=dataStoreObjects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=insertionEvent, postfix_operators=[], prefix_operators=[], qualifier=DataStoreEvent, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['REMOVE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=dataStoreObjects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=removalEvent, postfix_operators=[], prefix_operators=[], qualifier=DataStoreEvent, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['UPDATE'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=dataStoreObjects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=updateEvent, postfix_operators=[], prefix_operators=[], qualifier=DataStoreEvent, selectors=[], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=currentDataStoreEventType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=dataListenerList, selectors=[MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contentChanged, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=['--'], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=dataListenerList, selectors=[], type_arguments=None), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=None), label=None) assign[member[.accumulateDataStoreEvents], literal[false]] assign[member[.currentDataStoreEventType], literal[null]] assign[member[.dataStoreObjects], literal[null]] end[}] END[}]
Keyword[public] Keyword[void] identifier[flushDataStoreEvents] operator[SEP] operator[SEP] { identifier[DataStoreEvent] identifier[e] operator[SEP] Keyword[switch] operator[SEP] identifier[currentDataStoreEventType] operator[SEP] { Keyword[case] identifier[INSERT] operator[:] identifier[e] operator[=] identifier[DataStoreEvent] operator[SEP] identifier[insertionEvent] operator[SEP] identifier[dataStoreObjects] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[REMOVE] operator[:] identifier[e] operator[=] identifier[DataStoreEvent] operator[SEP] identifier[removalEvent] operator[SEP] identifier[dataStoreObjects] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[UPDATE] operator[:] identifier[e] operator[=] identifier[DataStoreEvent] operator[SEP] identifier[updateEvent] operator[SEP] identifier[dataStoreObjects] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[return] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[dataListenerList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[--] identifier[i] operator[>=] Other[0] operator[SEP] operator[SEP] { identifier[dataListenerList] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[contentChanged] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[accumulateDataStoreEvents] operator[=] literal[boolean] operator[SEP] identifier[currentDataStoreEventType] operator[=] Other[null] operator[SEP] identifier[dataStoreObjects] operator[=] Other[null] operator[SEP] }
public static PropertyGroup getPropertyGroup(final String basename) { SecurityManager sm = System.getSecurityManager(); if (sm != null) sm.checkPropertiesAccess(); return props.getPropertyGroup(basename); }
class class_name[name] begin[{] method[getPropertyGroup, return_type[type[PropertyGroup]], modifier[public static], parameter[basename]] begin[{] local_variable[type[SecurityManager], sm] if[binary_operation[member[.sm], !=, literal[null]]] begin[{] call[sm.checkPropertiesAccess, parameter[]] else begin[{] None end[}] return[call[props.getPropertyGroup, parameter[member[.basename]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PropertyGroup] identifier[getPropertyGroup] operator[SEP] Keyword[final] identifier[String] identifier[basename] operator[SEP] { identifier[SecurityManager] identifier[sm] operator[=] identifier[System] operator[SEP] identifier[getSecurityManager] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[sm] operator[!=] Other[null] operator[SEP] identifier[sm] operator[SEP] identifier[checkPropertiesAccess] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[props] operator[SEP] identifier[getPropertyGroup] operator[SEP] identifier[basename] operator[SEP] operator[SEP] }
public static AlipayTradeAppPayResponse appPayToResponse(AlipayTradeAppPayModel model, String notifyUrl) throws AlipayApiException { // 实例化具体API对应的request类,类名称和接口名称对应,当前调用接口名称:alipay.trade.app.pay AlipayTradeAppPayRequest request = new AlipayTradeAppPayRequest(); // SDK已经封装掉了公共参数,这里只需要传入业务参数。以下方法为sdk的model入参方式(model和biz_content同时存在的情况下取biz_content)。 request.setBizModel(model); request.setNotifyUrl(notifyUrl); // 这里和普通的接口调用不同,使用的是sdkExecute AlipayTradeAppPayResponse response = AliPayApiConfigKit.getAliPayApiConfig().getAlipayClient() .sdkExecute(request); return response; }
class class_name[name] begin[{] method[appPayToResponse, return_type[type[AlipayTradeAppPayResponse]], modifier[public static], parameter[model, notifyUrl]] begin[{] local_variable[type[AlipayTradeAppPayRequest], request] call[request.setBizModel, parameter[member[.model]]] call[request.setNotifyUrl, parameter[member[.notifyUrl]]] local_variable[type[AlipayTradeAppPayResponse], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[AlipayTradeAppPayResponse] identifier[appPayToResponse] operator[SEP] identifier[AlipayTradeAppPayModel] identifier[model] , identifier[String] identifier[notifyUrl] operator[SEP] Keyword[throws] identifier[AlipayApiException] { identifier[AlipayTradeAppPayRequest] identifier[request] operator[=] Keyword[new] identifier[AlipayTradeAppPayRequest] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setBizModel] operator[SEP] identifier[model] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setNotifyUrl] operator[SEP] identifier[notifyUrl] operator[SEP] operator[SEP] identifier[AlipayTradeAppPayResponse] identifier[response] operator[=] identifier[AliPayApiConfigKit] operator[SEP] identifier[getAliPayApiConfig] operator[SEP] operator[SEP] operator[SEP] identifier[getAlipayClient] operator[SEP] operator[SEP] operator[SEP] identifier[sdkExecute] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public boolean addFile(File fileToWatch) { if (!fileToWatch.exists()) { return false; } synchronized (this) { if (GlobalConfiguration.verboseMode && log.isLoggable(Level.INFO)) { log.info("Now watching " + fileToWatch); } int insertionPos = findPosition(fileToWatch); if (insertionPos == -1) { watchListFiles.add(fileToWatch); watchListLMTs.add(fileToWatch.lastModified()); } else { watchListFiles.add(insertionPos, fileToWatch); watchListLMTs.add(insertionPos, fileToWatch.lastModified()); } return true; } }
class class_name[name] begin[{] method[addFile, return_type[type[boolean]], modifier[public], parameter[fileToWatch]] begin[{] if[call[fileToWatch.exists, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] SYNCHRONIZED[THIS[]] BEGIN[{] if[binary_operation[member[GlobalConfiguration.verboseMode], &&, call[log.isLoggable, parameter[member[Level.INFO]]]]] begin[{] call[log.info, parameter[binary_operation[literal["Now watching "], +, member[.fileToWatch]]]] else begin[{] None end[}] local_variable[type[int], insertionPos] if[binary_operation[member[.insertionPos], ==, literal[1]]] begin[{] call[watchListFiles.add, parameter[member[.fileToWatch]]] call[watchListLMTs.add, parameter[call[fileToWatch.lastModified, parameter[]]]] else begin[{] call[watchListFiles.add, parameter[member[.insertionPos], member[.fileToWatch]]] call[watchListLMTs.add, parameter[member[.insertionPos], call[fileToWatch.lastModified, parameter[]]]] end[}] return[literal[true]] END[}] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[addFile] operator[SEP] identifier[File] identifier[fileToWatch] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[fileToWatch] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] identifier[GlobalConfiguration] operator[SEP] identifier[verboseMode] operator[&&] identifier[log] operator[SEP] identifier[isLoggable] operator[SEP] identifier[Level] operator[SEP] identifier[INFO] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[fileToWatch] operator[SEP] operator[SEP] } Keyword[int] identifier[insertionPos] operator[=] identifier[findPosition] operator[SEP] identifier[fileToWatch] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[insertionPos] operator[==] operator[-] Other[1] operator[SEP] { identifier[watchListFiles] operator[SEP] identifier[add] operator[SEP] identifier[fileToWatch] operator[SEP] operator[SEP] identifier[watchListLMTs] operator[SEP] identifier[add] operator[SEP] identifier[fileToWatch] operator[SEP] identifier[lastModified] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[watchListFiles] operator[SEP] identifier[add] operator[SEP] identifier[insertionPos] , identifier[fileToWatch] operator[SEP] operator[SEP] identifier[watchListLMTs] operator[SEP] identifier[add] operator[SEP] identifier[insertionPos] , identifier[fileToWatch] operator[SEP] identifier[lastModified] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } }
public Observable<Page<LongTermRetentionBackupInner>> listByDatabaseNextAsync(final String nextPageLink) { return listByDatabaseNextWithServiceResponseAsync(nextPageLink) .map(new Func1<ServiceResponse<Page<LongTermRetentionBackupInner>>, Page<LongTermRetentionBackupInner>>() { @Override public Page<LongTermRetentionBackupInner> call(ServiceResponse<Page<LongTermRetentionBackupInner>> response) { return response.body(); } }); }
class class_name[name] begin[{] method[listByDatabaseNextAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] return[call[.listByDatabaseNextWithServiceResponseAsync, parameter[member[.nextPageLink]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Page] operator[<] identifier[LongTermRetentionBackupInner] operator[>] operator[>] identifier[listByDatabaseNextAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[listByDatabaseNextWithServiceResponseAsync] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[LongTermRetentionBackupInner] operator[>] operator[>] , identifier[Page] operator[<] identifier[LongTermRetentionBackupInner] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Page] operator[<] identifier[LongTermRetentionBackupInner] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[LongTermRetentionBackupInner] operator[>] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static final String asString(WsByteBuffer[] list, int[] positions, int[] limits) { byte[] data = asByteArray(list, positions, limits); return (null != data) ? new String(data) : null; }
class class_name[name] begin[{] method[asString, return_type[type[String]], modifier[final public static], parameter[list, positions, limits]] begin[{] local_variable[type[byte], data] return[TernaryExpression(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=ClassCreator(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None)))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] identifier[String] identifier[asString] operator[SEP] identifier[WsByteBuffer] operator[SEP] operator[SEP] identifier[list] , Keyword[int] operator[SEP] operator[SEP] identifier[positions] , Keyword[int] operator[SEP] operator[SEP] identifier[limits] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[=] identifier[asByteArray] operator[SEP] identifier[list] , identifier[positions] , identifier[limits] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Other[null] operator[!=] identifier[data] operator[SEP] operator[?] Keyword[new] identifier[String] operator[SEP] identifier[data] operator[SEP] operator[:] Other[null] operator[SEP] }
public static CommerceCountry removeByG_Tw(long groupId, String twoLettersISOCode) throws com.liferay.commerce.exception.NoSuchCountryException { return getPersistence().removeByG_Tw(groupId, twoLettersISOCode); }
class class_name[name] begin[{] method[removeByG_Tw, return_type[type[CommerceCountry]], modifier[public static], parameter[groupId, twoLettersISOCode]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CommerceCountry] identifier[removeByG_Tw] operator[SEP] Keyword[long] identifier[groupId] , identifier[String] identifier[twoLettersISOCode] operator[SEP] Keyword[throws] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[exception] operator[SEP] identifier[NoSuchCountryException] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[removeByG_Tw] operator[SEP] identifier[groupId] , identifier[twoLettersISOCode] operator[SEP] operator[SEP] }
private void cardinalityChangeConsumersDetached() throws SIResourceException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "cardinalityChangeConsumersDetached"); // Tell the AIH to start the flush. // this call will acquire a lock on AIH such that it is guaranteed that all calls to // RDC.put() for messages on this stream will have returned before rejectAll() returns // Therefore we can safely go through itemStream and remove the messages that have // already been put and reject them. _aih.rejectAll(); // reject everything and start flushing the stream // then delete all the messages, since know that put() must have completed removeAllMessagesItemStream(); synchronized (consumerPoints) { // set cardinalityChange to false. Note that any consumers that try to attach right after this will not // be able to use the old stream since already initiated the flush _cardinalityChange = false; // tell the AIH to change its cardinality _aih.changeReceiveExclusive(_cardinalityOne); } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "cardinalityChangeConsumersDetached"); }
class class_name[name] begin[{] method[cardinalityChangeConsumersDetached, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["cardinalityChangeConsumersDetached"]]] else begin[{] None end[}] call[_aih.rejectAll, parameter[]] call[.removeAllMessagesItemStream, parameter[]] SYNCHRONIZED[member[.consumerPoints]] BEGIN[{] assign[member[._cardinalityChange], literal[false]] call[_aih.changeReceiveExclusive, parameter[member[._cardinalityOne]]] END[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["cardinalityChangeConsumersDetached"]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[cardinalityChangeConsumersDetached] operator[SEP] 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] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[_aih] operator[SEP] identifier[rejectAll] operator[SEP] operator[SEP] operator[SEP] identifier[removeAllMessagesItemStream] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[consumerPoints] operator[SEP] { identifier[_cardinalityChange] operator[=] literal[boolean] operator[SEP] identifier[_aih] operator[SEP] identifier[changeReceiveExclusive] operator[SEP] identifier[_cardinalityOne] 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 close() { if (null != publication && publication.isConnected()) { closeSession(); } if (!ctx.ownsAeronClient()) { CloseHelper.close(subscription); CloseHelper.close(publication); } ctx.close(); }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[binary_operation[literal[null], !=, member[.publication]], &&, call[publication.isConnected, parameter[]]]] begin[{] call[.closeSession, parameter[]] else begin[{] None end[}] if[call[ctx.ownsAeronClient, parameter[]]] begin[{] call[CloseHelper.close, parameter[member[.subscription]]] call[CloseHelper.close, parameter[member[.publication]]] else begin[{] None end[}] call[ctx.close, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[!=] identifier[publication] operator[&&] identifier[publication] operator[SEP] identifier[isConnected] operator[SEP] operator[SEP] operator[SEP] { identifier[closeSession] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[ctx] operator[SEP] identifier[ownsAeronClient] operator[SEP] operator[SEP] operator[SEP] { identifier[CloseHelper] operator[SEP] identifier[close] operator[SEP] identifier[subscription] operator[SEP] operator[SEP] identifier[CloseHelper] operator[SEP] identifier[close] operator[SEP] identifier[publication] operator[SEP] operator[SEP] } identifier[ctx] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] }
public final Index getIndex( String indexName, String workspaceName ) { logger().trace("Looking for index '{0}' in '{1}' provider for query in workspace '{2}'", indexName, getName(), workspaceName); Map<String, AtomicIndex> byWorkspaceNames = providedIndexesByWorkspaceNameByIndexName.get(indexName); return byWorkspaceNames == null ? null : byWorkspaceNames.get(workspaceName); }
class class_name[name] begin[{] method[getIndex, return_type[type[Index]], modifier[final public], parameter[indexName, workspaceName]] begin[{] call[.logger, parameter[]] local_variable[type[Map], byWorkspaceNames] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=byWorkspaceNames, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=workspaceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=byWorkspaceNames, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] Keyword[final] identifier[Index] identifier[getIndex] operator[SEP] identifier[String] identifier[indexName] , identifier[String] identifier[workspaceName] operator[SEP] { identifier[logger] operator[SEP] operator[SEP] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[indexName] , identifier[getName] operator[SEP] operator[SEP] , identifier[workspaceName] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[AtomicIndex] operator[>] identifier[byWorkspaceNames] operator[=] identifier[providedIndexesByWorkspaceNameByIndexName] operator[SEP] identifier[get] operator[SEP] identifier[indexName] operator[SEP] operator[SEP] Keyword[return] identifier[byWorkspaceNames] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[byWorkspaceNames] operator[SEP] identifier[get] operator[SEP] identifier[workspaceName] operator[SEP] operator[SEP] }
public static CPDefinitionOptionValueRel fetchByCompanyId_Last( long companyId, OrderByComparator<CPDefinitionOptionValueRel> orderByComparator) { return getPersistence() .fetchByCompanyId_Last(companyId, orderByComparator); }
class class_name[name] begin[{] method[fetchByCompanyId_Last, return_type[type[CPDefinitionOptionValueRel]], modifier[public static], parameter[companyId, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CPDefinitionOptionValueRel] identifier[fetchByCompanyId_Last] operator[SEP] Keyword[long] identifier[companyId] , identifier[OrderByComparator] operator[<] identifier[CPDefinitionOptionValueRel] operator[>] identifier[orderByComparator] operator[SEP] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[fetchByCompanyId_Last] operator[SEP] identifier[companyId] , identifier[orderByComparator] operator[SEP] operator[SEP] }
public CertificateItem withX509Thumbprint(byte[] x509Thumbprint) { if (x509Thumbprint == null) { this.x509Thumbprint = null; } else { this.x509Thumbprint = Base64Url.encode(x509Thumbprint); } return this; }
class class_name[name] begin[{] method[withX509Thumbprint, return_type[type[CertificateItem]], modifier[public], parameter[x509Thumbprint]] begin[{] if[binary_operation[member[.x509Thumbprint], ==, literal[null]]] begin[{] assign[THIS[member[None.x509Thumbprint]], literal[null]] else begin[{] assign[THIS[member[None.x509Thumbprint]], call[Base64Url.encode, parameter[member[.x509Thumbprint]]]] end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[CertificateItem] identifier[withX509Thumbprint] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[x509Thumbprint] operator[SEP] { Keyword[if] operator[SEP] identifier[x509Thumbprint] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[x509Thumbprint] operator[=] Other[null] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[x509Thumbprint] operator[=] identifier[Base64Url] operator[SEP] identifier[encode] operator[SEP] identifier[x509Thumbprint] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static Set<ModuleId> getDependencyScriptModuleIds(ModuleSpec moduleSpec) { Objects.requireNonNull(moduleSpec, "moduleSpec"); if (!(moduleSpec instanceof ConcreteModuleSpec)) { throw new IllegalArgumentException("Unsupported ModuleSpec implementation: " + moduleSpec.getClass().getName()); } Set<ModuleId> dependencyNames = new LinkedHashSet<ModuleId>(); ConcreteModuleSpec concreteSpec = (ConcreteModuleSpec)moduleSpec; for (DependencySpec dependencSpec : concreteSpec.getDependencies()) { if (dependencSpec instanceof ModuleDependencySpec) { ModuleIdentifier revisionId = ((ModuleDependencySpec)dependencSpec).getIdentifier(); dependencyNames.add(ModuleId.fromString(revisionId.getName())); } } return dependencyNames; }
class class_name[name] begin[{] method[getDependencyScriptModuleIds, return_type[type[Set]], modifier[public static], parameter[moduleSpec]] begin[{] call[Objects.requireNonNull, parameter[member[.moduleSpec], literal["moduleSpec"]]] if[binary_operation[member[.moduleSpec], instanceof, type[ConcreteModuleSpec]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unsupported ModuleSpec implementation: "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=moduleSpec, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], 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[}] local_variable[type[Set], dependencyNames] local_variable[type[ConcreteModuleSpec], concreteSpec] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=dependencSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=ModuleDependencySpec, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=dependencSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ModuleDependencySpec, sub_type=None)), name=revisionId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ModuleIdentifier, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=revisionId, selectors=[], type_arguments=None)], member=fromString, postfix_operators=[], prefix_operators=[], qualifier=ModuleId, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=dependencyNames, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDependencies, postfix_operators=[], prefix_operators=[], qualifier=concreteSpec, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=dependencSpec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=DependencySpec, sub_type=None))), label=None) return[member[.dependencyNames]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Set] operator[<] identifier[ModuleId] operator[>] identifier[getDependencyScriptModuleIds] operator[SEP] identifier[ModuleSpec] identifier[moduleSpec] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[moduleSpec] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[moduleSpec] Keyword[instanceof] identifier[ConcreteModuleSpec] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[moduleSpec] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Set] operator[<] identifier[ModuleId] operator[>] identifier[dependencyNames] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] identifier[ModuleId] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ConcreteModuleSpec] identifier[concreteSpec] operator[=] operator[SEP] identifier[ConcreteModuleSpec] operator[SEP] identifier[moduleSpec] operator[SEP] Keyword[for] operator[SEP] identifier[DependencySpec] identifier[dependencSpec] operator[:] identifier[concreteSpec] operator[SEP] identifier[getDependencies] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[dependencSpec] Keyword[instanceof] identifier[ModuleDependencySpec] operator[SEP] { identifier[ModuleIdentifier] identifier[revisionId] operator[=] operator[SEP] operator[SEP] identifier[ModuleDependencySpec] operator[SEP] identifier[dependencSpec] operator[SEP] operator[SEP] identifier[getIdentifier] operator[SEP] operator[SEP] operator[SEP] identifier[dependencyNames] operator[SEP] identifier[add] operator[SEP] identifier[ModuleId] operator[SEP] identifier[fromString] operator[SEP] identifier[revisionId] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[dependencyNames] operator[SEP] }
private InternalCacheEntry<WrappedBytes, WrappedBytes> performPut(long bucketHeadAddress, long actualAddress, long newAddress, WrappedBytes key, boolean requireReturn) { // Have to start new linked node list if (bucketHeadAddress == 0) { memoryLookup.putMemoryAddress(key, newAddress); entryCreated(newAddress); size.incrementAndGet(); return null; } else { boolean replaceHead = false; boolean foundPrevious = false; // Whether the key was found or not - short circuit equality checks InternalCacheEntry<WrappedBytes, WrappedBytes> previousValue = null; long address = bucketHeadAddress; // Holds the previous linked list address long prevAddress = 0; // Keep looping until we get the tail end - we always append the put to the end while (address != 0) { long nextAddress = offHeapEntryFactory.getNext(address); if (!foundPrevious) { // If the actualAddress was not known check key equality otherwise just compare with the address if (actualAddress == 0 ? offHeapEntryFactory.equalsKey(address, key) : actualAddress == address) { foundPrevious = true; if (requireReturn) { previousValue = offHeapEntryFactory.fromMemory(address); } entryReplaced(newAddress, address); // If this is true it means this was the first node in the linked list if (prevAddress == 0) { if (nextAddress == 0) { // This branch is the case where our key is the only one in the linked list replaceHead = true; } else { // This branch is the case where our key is the first with another after memoryLookup.putMemoryAddress(key, nextAddress); } } else { // This branch means our node was not the first, so we have to update the address before ours // to the one we previously referenced offHeapEntryFactory.setNext(prevAddress, nextAddress); // We purposely don't update prevAddress, because we have to keep it as the current pointer // since we removed ours address = nextAddress; continue; } } } prevAddress = address; address = nextAddress; } // If we didn't find the key previous, it means we are a new entry if (!foundPrevious) { entryCreated(newAddress); size.incrementAndGet(); } if (replaceHead) { memoryLookup.putMemoryAddress(key, newAddress); } else { // Now prevAddress should be the last link so we fix our link offHeapEntryFactory.setNext(prevAddress, newAddress); } return previousValue; } }
class class_name[name] begin[{] method[performPut, return_type[type[InternalCacheEntry]], modifier[private], parameter[bucketHeadAddress, actualAddress, newAddress, key, requireReturn]] begin[{] if[binary_operation[member[.bucketHeadAddress], ==, literal[0]]] begin[{] call[memoryLookup.putMemoryAddress, parameter[member[.key], member[.newAddress]]] call[.entryCreated, parameter[member[.newAddress]]] call[size.incrementAndGet, parameter[]] return[literal[null]] else begin[{] local_variable[type[boolean], replaceHead] local_variable[type[boolean], foundPrevious] local_variable[type[InternalCacheEntry], previousValue] local_variable[type[long], address] local_variable[type[long], prevAddress] while[binary_operation[member[.address], !=, literal[0]]] begin[{] local_variable[type[long], nextAddress] if[member[.foundPrevious]] begin[{] if[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=actualAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), if_false=BinaryOperation(operandl=MemberReference(member=actualAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=address, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), if_true=MethodInvocation(arguments=[MemberReference(member=address, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equalsKey, postfix_operators=[], prefix_operators=[], qualifier=offHeapEntryFactory, selectors=[], type_arguments=None))] begin[{] assign[member[.foundPrevious], literal[true]] if[member[.requireReturn]] begin[{] assign[member[.previousValue], call[offHeapEntryFactory.fromMemory, parameter[member[.address]]]] else begin[{] None end[}] call[.entryReplaced, parameter[member[.newAddress], member[.address]]] if[binary_operation[member[.prevAddress], ==, literal[0]]] begin[{] if[binary_operation[member[.nextAddress], ==, literal[0]]] begin[{] assign[member[.replaceHead], literal[true]] else begin[{] call[memoryLookup.putMemoryAddress, parameter[member[.key], member[.nextAddress]]] end[}] else begin[{] call[offHeapEntryFactory.setNext, parameter[member[.prevAddress], member[.nextAddress]]] assign[member[.address], member[.nextAddress]] ContinueStatement(goto=None, label=None) end[}] else begin[{] None end[}] else begin[{] None end[}] assign[member[.prevAddress], member[.address]] assign[member[.address], member[.nextAddress]] end[}] if[member[.foundPrevious]] begin[{] call[.entryCreated, parameter[member[.newAddress]]] call[size.incrementAndGet, parameter[]] else begin[{] None end[}] if[member[.replaceHead]] begin[{] call[memoryLookup.putMemoryAddress, parameter[member[.key], member[.newAddress]]] else begin[{] call[offHeapEntryFactory.setNext, parameter[member[.prevAddress], member[.newAddress]]] end[}] return[member[.previousValue]] end[}] end[}] END[}]
Keyword[private] identifier[InternalCacheEntry] operator[<] identifier[WrappedBytes] , identifier[WrappedBytes] operator[>] identifier[performPut] operator[SEP] Keyword[long] identifier[bucketHeadAddress] , Keyword[long] identifier[actualAddress] , Keyword[long] identifier[newAddress] , identifier[WrappedBytes] identifier[key] , Keyword[boolean] identifier[requireReturn] operator[SEP] { Keyword[if] operator[SEP] identifier[bucketHeadAddress] operator[==] Other[0] operator[SEP] { identifier[memoryLookup] operator[SEP] identifier[putMemoryAddress] operator[SEP] identifier[key] , identifier[newAddress] operator[SEP] operator[SEP] identifier[entryCreated] operator[SEP] identifier[newAddress] operator[SEP] operator[SEP] identifier[size] operator[SEP] identifier[incrementAndGet] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[else] { Keyword[boolean] identifier[replaceHead] operator[=] literal[boolean] operator[SEP] Keyword[boolean] identifier[foundPrevious] operator[=] literal[boolean] operator[SEP] identifier[InternalCacheEntry] operator[<] identifier[WrappedBytes] , identifier[WrappedBytes] operator[>] identifier[previousValue] operator[=] Other[null] operator[SEP] Keyword[long] identifier[address] operator[=] identifier[bucketHeadAddress] operator[SEP] Keyword[long] identifier[prevAddress] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[address] operator[!=] Other[0] operator[SEP] { Keyword[long] identifier[nextAddress] operator[=] identifier[offHeapEntryFactory] operator[SEP] identifier[getNext] operator[SEP] identifier[address] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[foundPrevious] operator[SEP] { Keyword[if] operator[SEP] identifier[actualAddress] operator[==] Other[0] operator[?] identifier[offHeapEntryFactory] operator[SEP] identifier[equalsKey] operator[SEP] identifier[address] , identifier[key] operator[SEP] operator[:] identifier[actualAddress] operator[==] identifier[address] operator[SEP] { identifier[foundPrevious] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[requireReturn] operator[SEP] { identifier[previousValue] operator[=] identifier[offHeapEntryFactory] operator[SEP] identifier[fromMemory] operator[SEP] identifier[address] operator[SEP] operator[SEP] } identifier[entryReplaced] operator[SEP] identifier[newAddress] , identifier[address] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[prevAddress] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[nextAddress] operator[==] Other[0] operator[SEP] { identifier[replaceHead] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[memoryLookup] operator[SEP] identifier[putMemoryAddress] operator[SEP] identifier[key] , identifier[nextAddress] operator[SEP] operator[SEP] } } Keyword[else] { identifier[offHeapEntryFactory] operator[SEP] identifier[setNext] operator[SEP] identifier[prevAddress] , identifier[nextAddress] operator[SEP] operator[SEP] identifier[address] operator[=] identifier[nextAddress] operator[SEP] Keyword[continue] operator[SEP] } } } identifier[prevAddress] operator[=] identifier[address] operator[SEP] identifier[address] operator[=] identifier[nextAddress] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[foundPrevious] operator[SEP] { identifier[entryCreated] operator[SEP] identifier[newAddress] operator[SEP] operator[SEP] identifier[size] operator[SEP] identifier[incrementAndGet] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[replaceHead] operator[SEP] { identifier[memoryLookup] operator[SEP] identifier[putMemoryAddress] operator[SEP] identifier[key] , identifier[newAddress] operator[SEP] operator[SEP] } Keyword[else] { identifier[offHeapEntryFactory] operator[SEP] identifier[setNext] operator[SEP] identifier[prevAddress] , identifier[newAddress] operator[SEP] operator[SEP] } Keyword[return] identifier[previousValue] operator[SEP] } }
protected static void loadConfigSource(ConfigArgP config, String source) { Properties p = loadConfig(source); Config c = config.getConfig(); for(String key: p.stringPropertyNames()) { String value = p.getProperty(key); ConfigurationItem ci = config.getConfigurationItem(key); if(ci!=null) { // if we recognize the key, validate it ci.setValue(processConfigValue(value)); } c.overrideConfig(key, processConfigValue(value)); } }
class class_name[name] begin[{] method[loadConfigSource, return_type[void], modifier[static protected], parameter[config, source]] begin[{] local_variable[type[Properties], p] local_variable[type[Config], c] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getConfigurationItem, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), name=ci)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConfigurationItem, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ci, 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=[MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processConfigValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=ci, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processConfigValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=overrideConfig, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=stringPropertyNames, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[protected] Keyword[static] Keyword[void] identifier[loadConfigSource] operator[SEP] identifier[ConfigArgP] identifier[config] , identifier[String] identifier[source] operator[SEP] { identifier[Properties] identifier[p] operator[=] identifier[loadConfig] operator[SEP] identifier[source] operator[SEP] operator[SEP] identifier[Config] identifier[c] operator[=] identifier[config] operator[SEP] identifier[getConfig] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[p] operator[SEP] identifier[stringPropertyNames] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[value] operator[=] identifier[p] operator[SEP] identifier[getProperty] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[ConfigurationItem] identifier[ci] operator[=] identifier[config] operator[SEP] identifier[getConfigurationItem] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ci] operator[!=] Other[null] operator[SEP] { identifier[ci] operator[SEP] identifier[setValue] operator[SEP] identifier[processConfigValue] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } identifier[c] operator[SEP] identifier[overrideConfig] operator[SEP] identifier[key] , identifier[processConfigValue] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] } }
@Override public <E> List<E> findAll(Class<E> entityClass, String[] columnsToSelect, Object... keys) { List results = new ArrayList(); for (Object key : keys) { Object object = find(entityClass, key); if (object != null) { results.add(object); } } return results; }
class class_name[name] begin[{] method[findAll, return_type[type[List]], modifier[public], parameter[entityClass, columnsToSelect, keys]] begin[{] local_variable[type[List], results] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=entityClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=find, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=object)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=results, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))), label=None) return[member[.results]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[E] operator[>] identifier[List] operator[<] identifier[E] operator[>] identifier[findAll] operator[SEP] identifier[Class] operator[<] identifier[E] operator[>] identifier[entityClass] , identifier[String] operator[SEP] operator[SEP] identifier[columnsToSelect] , identifier[Object] operator[...] identifier[keys] operator[SEP] { identifier[List] identifier[results] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Object] identifier[key] operator[:] identifier[keys] operator[SEP] { identifier[Object] identifier[object] operator[=] identifier[find] operator[SEP] identifier[entityClass] , identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[object] operator[!=] Other[null] operator[SEP] { identifier[results] operator[SEP] identifier[add] operator[SEP] identifier[object] operator[SEP] operator[SEP] } } Keyword[return] identifier[results] operator[SEP] }
@VisibleForTesting void setSleeper(Sleeper sleeper) { Preconditions.checkArgument(sleeper != null, "sleeper must not be null!"); this.sleeper = sleeper; }
class class_name[name] begin[{] method[setSleeper, return_type[void], modifier[default], parameter[sleeper]] begin[{] call[Preconditions.checkArgument, parameter[binary_operation[member[.sleeper], !=, literal[null]], literal["sleeper must not be null!"]]] assign[THIS[member[None.sleeper]], member[.sleeper]] end[}] END[}]
annotation[@] identifier[VisibleForTesting] Keyword[void] identifier[setSleeper] operator[SEP] identifier[Sleeper] identifier[sleeper] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[sleeper] operator[!=] Other[null] , literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[sleeper] operator[=] identifier[sleeper] operator[SEP] }
public void connect() throws IOException { if (!connected) { try { filename = file.toString(); isDirectory = file.isDirectory(); if (isDirectory) { String[] fileList = file.list(); if (fileList == null) throw new FileNotFoundException(filename + " exists, but is not accessible"); files = Arrays.<String>asList(fileList); } else { is = new BufferedInputStream(new FileInputStream(filename)); // Check if URL should be metered boolean meteredInput = ProgressMonitor.getDefault().shouldMeterInput(url, "GET"); if (meteredInput) { ProgressSource pi = new ProgressSource(url, "GET", file.length()); is = new MeteredStream(is, pi, file.length()); } } } catch (IOException e) { throw e; } connected = true; } }
class class_name[name] begin[{] method[connect, return_type[void], modifier[public], parameter[]] begin[{] if[member[.connected]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MemberReference(member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileInputStream, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedInputStream, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDefault, postfix_operators=[], prefix_operators=[], qualifier=ProgressMonitor, selectors=[MethodInvocation(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="GET")], member=shouldMeterInput, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=meteredInput)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=MemberReference(member=meteredInput, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="GET"), MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProgressSource, sub_type=None)), name=pi)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ProgressSource, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MeteredStream, sub_type=None))), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=list, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), name=fileList)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=fileList, 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=ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" exists, but is not accessible"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileNotFoundException, sub_type=None)), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=files, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=fileList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=Arrays, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))])), label=None)]))], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) assign[member[.connected], literal[true]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[connect] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[connected] operator[SEP] { Keyword[try] { identifier[filename] operator[=] identifier[file] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[isDirectory] operator[=] identifier[file] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isDirectory] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[fileList] operator[=] identifier[file] operator[SEP] identifier[list] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fileList] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[FileNotFoundException] operator[SEP] identifier[filename] operator[+] literal[String] operator[SEP] operator[SEP] identifier[files] operator[=] identifier[Arrays] operator[SEP] operator[<] identifier[String] operator[>] identifier[asList] operator[SEP] identifier[fileList] operator[SEP] operator[SEP] } Keyword[else] { identifier[is] operator[=] Keyword[new] identifier[BufferedInputStream] operator[SEP] Keyword[new] identifier[FileInputStream] operator[SEP] identifier[filename] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[meteredInput] operator[=] identifier[ProgressMonitor] operator[SEP] identifier[getDefault] operator[SEP] operator[SEP] operator[SEP] identifier[shouldMeterInput] operator[SEP] identifier[url] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[meteredInput] operator[SEP] { identifier[ProgressSource] identifier[pi] operator[=] Keyword[new] identifier[ProgressSource] operator[SEP] identifier[url] , literal[String] , identifier[file] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[is] operator[=] Keyword[new] identifier[MeteredStream] operator[SEP] identifier[is] , identifier[pi] , identifier[file] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } identifier[connected] operator[=] literal[boolean] operator[SEP] } }
public static <R> Optional<R> supplierIfTrue(boolean bool, Supplier<R> supplier) { return bool ? Optional.ofNullable(supplier.get()) : Optional.empty(); }
class class_name[name] begin[{] method[supplierIfTrue, return_type[type[Optional]], modifier[public static], parameter[bool, supplier]] begin[{] return[TernaryExpression(condition=MemberReference(member=bool, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=MethodInvocation(arguments=[], member=empty, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=supplier, selectors=[], type_arguments=None)], member=ofNullable, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[R] operator[>] identifier[Optional] operator[<] identifier[R] operator[>] identifier[supplierIfTrue] operator[SEP] Keyword[boolean] identifier[bool] , identifier[Supplier] operator[<] identifier[R] operator[>] identifier[supplier] operator[SEP] { Keyword[return] identifier[bool] operator[?] identifier[Optional] operator[SEP] identifier[ofNullable] operator[SEP] identifier[supplier] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] operator[:] identifier[Optional] operator[SEP] identifier[empty] operator[SEP] operator[SEP] operator[SEP] }
private void deleteBuilds() { if (getName() == null) { return; } String buildConfigLabelValue = getName().substring(0, Math.min(getName().length(), 63)); BuildList matchingBuilds = new BuildOperationsImpl(client, (OpenShiftConfig) config).inNamespace(namespace).withLabel(BUILD_CONFIG_LABEL, buildConfigLabelValue).list(); if (matchingBuilds.getItems() != null) { for (Build matchingBuild : matchingBuilds.getItems()) { if (matchingBuild.getMetadata() != null && matchingBuild.getMetadata().getAnnotations() != null && getName().equals(matchingBuild.getMetadata().getAnnotations().get(BUILD_CONFIG_ANNOTATION))) { new BuildOperationsImpl(client, (OpenShiftConfig) config).inNamespace(matchingBuild.getMetadata().getNamespace()).withName(matchingBuild.getMetadata().getName()).delete(); } } } }
class class_name[name] begin[{] method[deleteBuilds, return_type[void], modifier[private], parameter[]] begin[{] if[binary_operation[call[.getName, parameter[]], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[String], buildConfigLabelValue] local_variable[type[BuildList], matchingBuilds] if[binary_operation[call[matchingBuilds.getItems, parameter[]], !=, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getMetadata, postfix_operators=[], prefix_operators=[], qualifier=matchingBuild, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getMetadata, postfix_operators=[], prefix_operators=[], qualifier=matchingBuild, selectors=[MethodInvocation(arguments=[], member=getAnnotations, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operator=&&), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMetadata, postfix_operators=[], prefix_operators=[], qualifier=matchingBuild, selectors=[MethodInvocation(arguments=[], member=getAnnotations, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=BUILD_CONFIG_ANNOTATION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=ClassCreator(arguments=[MemberReference(member=client, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=OpenShiftConfig, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMetadata, postfix_operators=[], prefix_operators=[], qualifier=matchingBuild, selectors=[MethodInvocation(arguments=[], member=getNamespace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=inNamespace, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMetadata, postfix_operators=[], prefix_operators=[], qualifier=matchingBuild, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=withName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=delete, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=BuildOperationsImpl, sub_type=None)), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getItems, postfix_operators=[], prefix_operators=[], qualifier=matchingBuilds, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=matchingBuild)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Build, sub_type=None))), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[deleteBuilds] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } identifier[String] identifier[buildConfigLabelValue] operator[=] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] , Other[63] operator[SEP] operator[SEP] operator[SEP] identifier[BuildList] identifier[matchingBuilds] operator[=] Keyword[new] identifier[BuildOperationsImpl] operator[SEP] identifier[client] , operator[SEP] identifier[OpenShiftConfig] operator[SEP] identifier[config] operator[SEP] operator[SEP] identifier[inNamespace] operator[SEP] identifier[namespace] operator[SEP] operator[SEP] identifier[withLabel] operator[SEP] identifier[BUILD_CONFIG_LABEL] , identifier[buildConfigLabelValue] operator[SEP] operator[SEP] identifier[list] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matchingBuilds] operator[SEP] identifier[getItems] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[Build] identifier[matchingBuild] operator[:] identifier[matchingBuilds] operator[SEP] identifier[getItems] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[matchingBuild] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[matchingBuild] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getAnnotations] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[matchingBuild] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getAnnotations] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[BUILD_CONFIG_ANNOTATION] operator[SEP] operator[SEP] operator[SEP] { Keyword[new] identifier[BuildOperationsImpl] operator[SEP] identifier[client] , operator[SEP] identifier[OpenShiftConfig] operator[SEP] identifier[config] operator[SEP] operator[SEP] identifier[inNamespace] operator[SEP] identifier[matchingBuild] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getNamespace] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withName] operator[SEP] identifier[matchingBuild] operator[SEP] identifier[getMetadata] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[delete] operator[SEP] operator[SEP] operator[SEP] } } } }
public static void put(Object obj, String path, Object val) { Object mapList = Mapl.toMaplist(val); MaplRebuild rebuild = new MaplRebuild(obj); rebuild.put(path, mapList); }
class class_name[name] begin[{] method[put, return_type[void], modifier[public static], parameter[obj, path, val]] begin[{] local_variable[type[Object], mapList] local_variable[type[MaplRebuild], rebuild] call[rebuild.put, parameter[member[.path], member[.mapList]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[put] operator[SEP] identifier[Object] identifier[obj] , identifier[String] identifier[path] , identifier[Object] identifier[val] operator[SEP] { identifier[Object] identifier[mapList] operator[=] identifier[Mapl] operator[SEP] identifier[toMaplist] operator[SEP] identifier[val] operator[SEP] operator[SEP] identifier[MaplRebuild] identifier[rebuild] operator[=] Keyword[new] identifier[MaplRebuild] operator[SEP] identifier[obj] operator[SEP] operator[SEP] identifier[rebuild] operator[SEP] identifier[put] operator[SEP] identifier[path] , identifier[mapList] operator[SEP] operator[SEP] }
public void actionPerformed(ActionEvent e) { int x = calendarButton.getWidth() - (int) popup.getPreferredSize().getWidth(); int y = calendarButton.getY() + calendarButton.getHeight(); Calendar calendar = Calendar.getInstance(); Date date = dateEditor.getDate(); if (date != null) { calendar.setTime(date); } jcalendar.setCalendar(calendar); popup.show(calendarButton, x, y); dateSelected = false; }
class class_name[name] begin[{] method[actionPerformed, return_type[void], modifier[public], parameter[e]] begin[{] local_variable[type[int], x] local_variable[type[int], y] local_variable[type[Calendar], calendar] local_variable[type[Date], date] if[binary_operation[member[.date], !=, literal[null]]] begin[{] call[calendar.setTime, parameter[member[.date]]] else begin[{] None end[}] call[jcalendar.setCalendar, parameter[member[.calendar]]] call[popup.show, parameter[member[.calendarButton], member[.x], member[.y]]] assign[member[.dateSelected], literal[false]] end[}] END[}]
Keyword[public] Keyword[void] identifier[actionPerformed] operator[SEP] identifier[ActionEvent] identifier[e] operator[SEP] { Keyword[int] identifier[x] operator[=] identifier[calendarButton] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[-] operator[SEP] Keyword[int] operator[SEP] identifier[popup] operator[SEP] identifier[getPreferredSize] operator[SEP] operator[SEP] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[y] operator[=] identifier[calendarButton] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[+] identifier[calendarButton] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] identifier[Calendar] identifier[calendar] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[Date] identifier[date] operator[=] identifier[dateEditor] operator[SEP] identifier[getDate] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[date] operator[!=] Other[null] operator[SEP] { identifier[calendar] operator[SEP] identifier[setTime] operator[SEP] identifier[date] operator[SEP] operator[SEP] } identifier[jcalendar] operator[SEP] identifier[setCalendar] operator[SEP] identifier[calendar] operator[SEP] operator[SEP] identifier[popup] operator[SEP] identifier[show] operator[SEP] identifier[calendarButton] , identifier[x] , identifier[y] operator[SEP] operator[SEP] identifier[dateSelected] operator[=] literal[boolean] operator[SEP] }
@Deprecated protected void addSearchField(CmsXmlContentDefinition contentDefinition, CmsSearchField field) { addSearchField(contentDefinition, field, I_CmsXmlContentHandler.MappingType.ELEMENT); }
class class_name[name] begin[{] method[addSearchField, return_type[void], modifier[protected], parameter[contentDefinition, field]] begin[{] call[.addSearchField, parameter[member[.contentDefinition], member[.field], member[I_CmsXmlContentHandler.MappingType.ELEMENT]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[protected] Keyword[void] identifier[addSearchField] operator[SEP] identifier[CmsXmlContentDefinition] identifier[contentDefinition] , identifier[CmsSearchField] identifier[field] operator[SEP] { identifier[addSearchField] operator[SEP] identifier[contentDefinition] , identifier[field] , identifier[I_CmsXmlContentHandler] operator[SEP] identifier[MappingType] operator[SEP] identifier[ELEMENT] operator[SEP] operator[SEP] }
private void writeIntegerField(String fieldName, Object value) throws IOException { int val = ((Number) value).intValue(); if (val != 0) { m_writer.writeNameValuePair(fieldName, val); } }
class class_name[name] begin[{] method[writeIntegerField, return_type[void], modifier[private], parameter[fieldName, value]] begin[{] local_variable[type[int], val] if[binary_operation[member[.val], !=, literal[0]]] begin[{] call[m_writer.writeNameValuePair, parameter[member[.fieldName], member[.val]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[writeIntegerField] operator[SEP] identifier[String] identifier[fieldName] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[val] operator[=] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[value] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[val] operator[!=] Other[0] operator[SEP] { identifier[m_writer] operator[SEP] identifier[writeNameValuePair] operator[SEP] identifier[fieldName] , identifier[val] operator[SEP] operator[SEP] } }
public static @Nullable PorterDuff.Mode parseTintMode(int value, @Nullable PorterDuff.Mode defaultMode) { switch (value) { case 3: return PorterDuff.Mode.SRC_OVER; case 5: return PorterDuff.Mode.SRC_IN; case 9: return PorterDuff.Mode.SRC_ATOP; case 14: return PorterDuff.Mode.MULTIPLY; case 15: return PorterDuff.Mode.SCREEN; case 16: return PorterDuff.Mode.ADD; default: return defaultMode; } }
class class_name[name] begin[{] method[parseTintMode, return_type[type[PorterDuff]], modifier[public static], parameter[value, defaultMode]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], statements=[ReturnStatement(expression=MemberReference(member=SRC_OVER, postfix_operators=[], prefix_operators=[], qualifier=PorterDuff.Mode, selectors=[]), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], statements=[ReturnStatement(expression=MemberReference(member=SRC_IN, postfix_operators=[], prefix_operators=[], qualifier=PorterDuff.Mode, selectors=[]), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=9)], statements=[ReturnStatement(expression=MemberReference(member=SRC_ATOP, postfix_operators=[], prefix_operators=[], qualifier=PorterDuff.Mode, selectors=[]), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=14)], statements=[ReturnStatement(expression=MemberReference(member=MULTIPLY, postfix_operators=[], prefix_operators=[], qualifier=PorterDuff.Mode, selectors=[]), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=15)], statements=[ReturnStatement(expression=MemberReference(member=SCREEN, postfix_operators=[], prefix_operators=[], qualifier=PorterDuff.Mode, selectors=[]), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16)], statements=[ReturnStatement(expression=MemberReference(member=ADD, postfix_operators=[], prefix_operators=[], qualifier=PorterDuff.Mode, selectors=[]), label=None)]), SwitchStatementCase(case=[], statements=[ReturnStatement(expression=MemberReference(member=defaultMode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])], expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[public] Keyword[static] annotation[@] identifier[Nullable] identifier[PorterDuff] operator[SEP] identifier[Mode] identifier[parseTintMode] operator[SEP] Keyword[int] identifier[value] , annotation[@] identifier[Nullable] identifier[PorterDuff] operator[SEP] identifier[Mode] identifier[defaultMode] operator[SEP] { Keyword[switch] operator[SEP] identifier[value] operator[SEP] { Keyword[case] Other[3] operator[:] Keyword[return] identifier[PorterDuff] operator[SEP] identifier[Mode] operator[SEP] identifier[SRC_OVER] operator[SEP] Keyword[case] Other[5] operator[:] Keyword[return] identifier[PorterDuff] operator[SEP] identifier[Mode] operator[SEP] identifier[SRC_IN] operator[SEP] Keyword[case] Other[9] operator[:] Keyword[return] identifier[PorterDuff] operator[SEP] identifier[Mode] operator[SEP] identifier[SRC_ATOP] operator[SEP] Keyword[case] Other[14] operator[:] Keyword[return] identifier[PorterDuff] operator[SEP] identifier[Mode] operator[SEP] identifier[MULTIPLY] operator[SEP] Keyword[case] Other[15] operator[:] Keyword[return] identifier[PorterDuff] operator[SEP] identifier[Mode] operator[SEP] identifier[SCREEN] operator[SEP] Keyword[case] Other[16] operator[:] Keyword[return] identifier[PorterDuff] operator[SEP] identifier[Mode] operator[SEP] identifier[ADD] operator[SEP] Keyword[default] operator[:] Keyword[return] identifier[defaultMode] operator[SEP] } }
@Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case BpsimPackage.SCENARIO_PARAMETERS__START: return basicSetStart(null, msgs); case BpsimPackage.SCENARIO_PARAMETERS__DURATION: return basicSetDuration(null, msgs); case BpsimPackage.SCENARIO_PARAMETERS__PROPERTY_PARAMETERS: return basicSetPropertyParameters(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); }
class class_name[name] begin[{] method[eInverseRemove, return_type[type[NotificationChain]], modifier[public], parameter[otherEnd, featureID, msgs]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SCENARIO_PARAMETERS__START, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=msgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=basicSetStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=SCENARIO_PARAMETERS__DURATION, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=msgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=basicSetDuration, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=[MemberReference(member=SCENARIO_PARAMETERS__PROPERTY_PARAMETERS, postfix_operators=[], prefix_operators=[], qualifier=BpsimPackage, selectors=[])], statements=[ReturnStatement(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=msgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=basicSetPropertyParameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=otherEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=msgs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eInverseRemove, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[NotificationChain] identifier[eInverseRemove] operator[SEP] identifier[InternalEObject] identifier[otherEnd] , Keyword[int] identifier[featureID] , identifier[NotificationChain] identifier[msgs] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[BpsimPackage] operator[SEP] identifier[SCENARIO_PARAMETERS__START] operator[:] Keyword[return] identifier[basicSetStart] operator[SEP] Other[null] , identifier[msgs] operator[SEP] operator[SEP] Keyword[case] identifier[BpsimPackage] operator[SEP] identifier[SCENARIO_PARAMETERS__DURATION] operator[:] Keyword[return] identifier[basicSetDuration] operator[SEP] Other[null] , identifier[msgs] operator[SEP] operator[SEP] Keyword[case] identifier[BpsimPackage] operator[SEP] identifier[SCENARIO_PARAMETERS__PROPERTY_PARAMETERS] operator[:] Keyword[return] identifier[basicSetPropertyParameters] operator[SEP] Other[null] , identifier[msgs] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eInverseRemove] operator[SEP] identifier[otherEnd] , identifier[featureID] , identifier[msgs] operator[SEP] operator[SEP] }
public static Function create(String name, String formula, Engine engine) { Function result = new Function(name); try { result.load(formula, engine); } catch (RuntimeException ex) { throw ex; } catch (Exception ex) { throw new RuntimeException(ex); } return result; }
class class_name[name] begin[{] method[create, return_type[type[Function]], modifier[public static], parameter[name, formula, engine]] begin[{] local_variable[type[Function], result] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=formula, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=engine, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['RuntimeException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Function] identifier[create] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[formula] , identifier[Engine] identifier[engine] operator[SEP] { identifier[Function] identifier[result] operator[=] Keyword[new] identifier[Function] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[try] { identifier[result] operator[SEP] identifier[load] operator[SEP] identifier[formula] , identifier[engine] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[ex] operator[SEP] { Keyword[throw] identifier[ex] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[ex] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public void addDataElement(String elemName, String content, Attributes attrs) { writeDataElement(elemName, attrs, content); }
class class_name[name] begin[{] method[addDataElement, return_type[void], modifier[public], parameter[elemName, content, attrs]] begin[{] call[.writeDataElement, parameter[member[.elemName], member[.attrs], member[.content]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addDataElement] operator[SEP] identifier[String] identifier[elemName] , identifier[String] identifier[content] , identifier[Attributes] identifier[attrs] operator[SEP] { identifier[writeDataElement] operator[SEP] identifier[elemName] , identifier[attrs] , identifier[content] operator[SEP] operator[SEP] }
public SafeStyleBuilder fontFamilyAppend(String value, String... otherValues) { sanitizeAndAppendToFontFamily(value); for (String otherValue : otherValues) { sanitizeAndAppendToFontFamily(otherValue); } return this; }
class class_name[name] begin[{] method[fontFamilyAppend, return_type[type[SafeStyleBuilder]], modifier[public], parameter[value, otherValues]] begin[{] call[.sanitizeAndAppendToFontFamily, parameter[member[.value]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=otherValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sanitizeAndAppendToFontFamily, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=otherValues, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=otherValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[SafeStyleBuilder] identifier[fontFamilyAppend] operator[SEP] identifier[String] identifier[value] , identifier[String] operator[...] identifier[otherValues] operator[SEP] { identifier[sanitizeAndAppendToFontFamily] operator[SEP] identifier[value] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[otherValue] operator[:] identifier[otherValues] operator[SEP] { identifier[sanitizeAndAppendToFontFamily] operator[SEP] identifier[otherValue] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
private JobTaskVertex createSingleInputVertex(SingleInputPlanNode node) throws CompilerException { final String taskName = node.getNodeName(); final DriverStrategy ds = node.getDriverStrategy(); // check, whether chaining is possible boolean chaining = false; { Channel inConn = node.getInput(); PlanNode pred = inConn.getSource(); chaining = ds.getPushChainDriverClass() != null && !(pred instanceof NAryUnionPlanNode) && // first op after union is stand-alone, because union is merged !(pred instanceof BulkPartialSolutionPlanNode) && // partial solution merges anyways !(pred instanceof WorksetPlanNode) && // workset merges anyways !(pred instanceof IterationPlanNode) && // cannot chain with iteration heads currently inConn.getShipStrategy() == ShipStrategyType.FORWARD && inConn.getLocalStrategy() == LocalStrategy.NONE && pred.getOutgoingChannels().size() == 1 && node.getDegreeOfParallelism() == pred.getDegreeOfParallelism() && node.getSubtasksPerInstance() == pred.getSubtasksPerInstance() && node.getBroadcastInputs().isEmpty(); // cannot chain the nodes that produce the next workset or the next solution set, if they are not the // in a tail if (this.currentIteration != null && this.currentIteration instanceof WorksetIterationPlanNode && node.getOutgoingChannels().size() > 0) { WorksetIterationPlanNode wspn = (WorksetIterationPlanNode) this.currentIteration; if (wspn.getSolutionSetDeltaPlanNode() == pred || wspn.getNextWorkSetPlanNode() == pred) { chaining = false; } } // cannot chain the nodes that produce the next workset in a bulk iteration if a termination criterion follows if (this.currentIteration != null && this.currentIteration instanceof BulkIterationPlanNode) { BulkIterationPlanNode wspn = (BulkIterationPlanNode) this.currentIteration; if (node == wspn.getRootOfTerminationCriterion() && wspn.getRootOfStepFunction() == pred){ chaining = false; }else if(node.getOutgoingChannels().size() > 0 &&(wspn.getRootOfStepFunction() == pred || wspn.getRootOfTerminationCriterion() == pred)) { chaining = false; } } } final JobTaskVertex vertex; final TaskConfig config; if (chaining) { vertex = null; config = new TaskConfig(new Configuration()); this.chainedTasks.put(node, new TaskInChain(ds.getPushChainDriverClass(), config, taskName)); } else { // create task vertex vertex = new JobTaskVertex(taskName, this.jobGraph); vertex.setTaskClass( (this.currentIteration != null && node.isOnDynamicPath()) ? IterationIntermediatePactTask.class : RegularPactTask.class); config = new TaskConfig(vertex.getConfiguration()); config.setDriver(ds.getDriverClass()); } // set user code config.setStubWrapper(node.getPactContract().getUserCodeWrapper()); config.setStubParameters(node.getPactContract().getParameters()); // set the driver strategy config.setDriverStrategy(ds); if (node.getComparator() != null) { config.setDriverComparator(node.getComparator(), 0); } // assign memory, file-handles, etc. assignDriverResources(node, config); return vertex; }
class class_name[name] begin[{] method[createSingleInputVertex, return_type[type[JobTaskVertex]], modifier[private], parameter[node]] begin[{] local_variable[type[String], taskName] local_variable[type[DriverStrategy], ds] local_variable[type[boolean], chaining] local_variable[type[Channel], inConn] local_variable[type[PlanNode], pred] assign[member[.chaining], binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[call[ds.getPushChainDriverClass, parameter[]], !=, literal[null]], &&, binary_operation[member[.pred], instanceof, type[NAryUnionPlanNode]]], &&, binary_operation[member[.pred], instanceof, type[BulkPartialSolutionPlanNode]]], &&, binary_operation[member[.pred], instanceof, type[WorksetPlanNode]]], &&, binary_operation[member[.pred], instanceof, type[IterationPlanNode]]], &&, binary_operation[call[inConn.getShipStrategy, parameter[]], ==, member[ShipStrategyType.FORWARD]]], &&, binary_operation[call[inConn.getLocalStrategy, parameter[]], ==, member[LocalStrategy.NONE]]], &&, binary_operation[call[pred.getOutgoingChannels, parameter[]], ==, literal[1]]], &&, binary_operation[call[node.getDegreeOfParallelism, parameter[]], ==, call[pred.getDegreeOfParallelism, parameter[]]]], &&, binary_operation[call[node.getSubtasksPerInstance, parameter[]], ==, call[pred.getSubtasksPerInstance, parameter[]]]], &&, call[node.getBroadcastInputs, parameter[]]]] if[binary_operation[binary_operation[binary_operation[THIS[member[None.currentIteration]], !=, literal[null]], &&, binary_operation[THIS[member[None.currentIteration]], instanceof, type[WorksetIterationPlanNode]]], &&, binary_operation[call[node.getOutgoingChannels, parameter[]], >, literal[0]]]] begin[{] local_variable[type[WorksetIterationPlanNode], wspn] if[binary_operation[binary_operation[call[wspn.getSolutionSetDeltaPlanNode, parameter[]], ==, member[.pred]], ||, binary_operation[call[wspn.getNextWorkSetPlanNode, parameter[]], ==, member[.pred]]]] begin[{] assign[member[.chaining], literal[false]] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[binary_operation[THIS[member[None.currentIteration]], !=, literal[null]], &&, binary_operation[THIS[member[None.currentIteration]], instanceof, type[BulkIterationPlanNode]]]] begin[{] local_variable[type[BulkIterationPlanNode], wspn] if[binary_operation[binary_operation[member[.node], ==, call[wspn.getRootOfTerminationCriterion, parameter[]]], &&, binary_operation[call[wspn.getRootOfStepFunction, parameter[]], ==, member[.pred]]]] begin[{] assign[member[.chaining], literal[false]] else begin[{] if[binary_operation[binary_operation[call[node.getOutgoingChannels, parameter[]], >, literal[0]], &&, binary_operation[binary_operation[call[wspn.getRootOfStepFunction, parameter[]], ==, member[.pred]], ||, binary_operation[call[wspn.getRootOfTerminationCriterion, parameter[]], ==, member[.pred]]]]] begin[{] assign[member[.chaining], literal[false]] else begin[{] None end[}] end[}] else begin[{] None end[}] local_variable[type[JobTaskVertex], vertex] local_variable[type[TaskConfig], config] if[member[.chaining]] begin[{] assign[member[.vertex], literal[null]] assign[member[.config], ClassCreator(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Configuration, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TaskConfig, sub_type=None))] THIS[member[None.chainedTasks]call[None.put, parameter[member[.node], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getPushChainDriverClass, postfix_operators=[], prefix_operators=[], qualifier=ds, selectors=[], type_arguments=None), MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=taskName, 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=TaskInChain, sub_type=None))]]] else begin[{] assign[member[.vertex], ClassCreator(arguments=[MemberReference(member=taskName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=jobGraph, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=JobTaskVertex, sub_type=None))] call[vertex.setTaskClass, parameter[TernaryExpression(condition=BinaryOperation(operandl=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=currentIteration, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=isOnDynamicPath, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), operator=&&), if_false=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RegularPactTask, sub_type=None)), if_true=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IterationIntermediatePactTask, sub_type=None)))]] assign[member[.config], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getConfiguration, postfix_operators=[], prefix_operators=[], qualifier=vertex, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TaskConfig, sub_type=None))] call[config.setDriver, parameter[call[ds.getDriverClass, parameter[]]]] end[}] call[config.setStubWrapper, parameter[call[node.getPactContract, parameter[]]]] call[config.setStubParameters, parameter[call[node.getPactContract, parameter[]]]] call[config.setDriverStrategy, parameter[member[.ds]]] if[binary_operation[call[node.getComparator, parameter[]], !=, literal[null]]] begin[{] call[config.setDriverComparator, parameter[call[node.getComparator, parameter[]], literal[0]]] else begin[{] None end[}] call[.assignDriverResources, parameter[member[.node], member[.config]]] return[member[.vertex]] end[}] END[}]
Keyword[private] identifier[JobTaskVertex] identifier[createSingleInputVertex] operator[SEP] identifier[SingleInputPlanNode] identifier[node] operator[SEP] Keyword[throws] identifier[CompilerException] { Keyword[final] identifier[String] identifier[taskName] operator[=] identifier[node] operator[SEP] identifier[getNodeName] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[DriverStrategy] identifier[ds] operator[=] identifier[node] operator[SEP] identifier[getDriverStrategy] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[chaining] operator[=] literal[boolean] operator[SEP] { identifier[Channel] identifier[inConn] operator[=] identifier[node] operator[SEP] identifier[getInput] operator[SEP] operator[SEP] operator[SEP] identifier[PlanNode] identifier[pred] operator[=] identifier[inConn] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] operator[SEP] identifier[chaining] operator[=] identifier[ds] operator[SEP] identifier[getPushChainDriverClass] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] operator[!] operator[SEP] identifier[pred] Keyword[instanceof] identifier[NAryUnionPlanNode] operator[SEP] operator[&&] operator[!] operator[SEP] identifier[pred] Keyword[instanceof] identifier[BulkPartialSolutionPlanNode] operator[SEP] operator[&&] operator[!] operator[SEP] identifier[pred] Keyword[instanceof] identifier[WorksetPlanNode] operator[SEP] operator[&&] operator[!] operator[SEP] identifier[pred] Keyword[instanceof] identifier[IterationPlanNode] operator[SEP] operator[&&] identifier[inConn] operator[SEP] identifier[getShipStrategy] operator[SEP] operator[SEP] operator[==] identifier[ShipStrategyType] operator[SEP] identifier[FORWARD] operator[&&] identifier[inConn] operator[SEP] identifier[getLocalStrategy] operator[SEP] operator[SEP] operator[==] identifier[LocalStrategy] operator[SEP] identifier[NONE] operator[&&] identifier[pred] operator[SEP] identifier[getOutgoingChannels] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[==] Other[1] operator[&&] identifier[node] operator[SEP] identifier[getDegreeOfParallelism] operator[SEP] operator[SEP] operator[==] identifier[pred] operator[SEP] identifier[getDegreeOfParallelism] operator[SEP] operator[SEP] operator[&&] identifier[node] operator[SEP] identifier[getSubtasksPerInstance] operator[SEP] operator[SEP] operator[==] identifier[pred] operator[SEP] identifier[getSubtasksPerInstance] operator[SEP] operator[SEP] operator[&&] identifier[node] operator[SEP] identifier[getBroadcastInputs] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[currentIteration] operator[!=] Other[null] operator[&&] Keyword[this] operator[SEP] identifier[currentIteration] Keyword[instanceof] identifier[WorksetIterationPlanNode] operator[&&] identifier[node] operator[SEP] identifier[getOutgoingChannels] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[WorksetIterationPlanNode] identifier[wspn] operator[=] operator[SEP] identifier[WorksetIterationPlanNode] operator[SEP] Keyword[this] operator[SEP] identifier[currentIteration] operator[SEP] Keyword[if] operator[SEP] identifier[wspn] operator[SEP] identifier[getSolutionSetDeltaPlanNode] operator[SEP] operator[SEP] operator[==] identifier[pred] operator[||] identifier[wspn] operator[SEP] identifier[getNextWorkSetPlanNode] operator[SEP] operator[SEP] operator[==] identifier[pred] operator[SEP] { identifier[chaining] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[currentIteration] operator[!=] Other[null] operator[&&] Keyword[this] operator[SEP] identifier[currentIteration] Keyword[instanceof] identifier[BulkIterationPlanNode] operator[SEP] { identifier[BulkIterationPlanNode] identifier[wspn] operator[=] operator[SEP] identifier[BulkIterationPlanNode] operator[SEP] Keyword[this] operator[SEP] identifier[currentIteration] operator[SEP] Keyword[if] operator[SEP] identifier[node] operator[==] identifier[wspn] operator[SEP] identifier[getRootOfTerminationCriterion] operator[SEP] operator[SEP] operator[&&] identifier[wspn] operator[SEP] identifier[getRootOfStepFunction] operator[SEP] operator[SEP] operator[==] identifier[pred] operator[SEP] { identifier[chaining] operator[=] literal[boolean] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[getOutgoingChannels] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[&&] operator[SEP] identifier[wspn] operator[SEP] identifier[getRootOfStepFunction] operator[SEP] operator[SEP] operator[==] identifier[pred] operator[||] identifier[wspn] operator[SEP] identifier[getRootOfTerminationCriterion] operator[SEP] operator[SEP] operator[==] identifier[pred] operator[SEP] operator[SEP] { identifier[chaining] operator[=] literal[boolean] operator[SEP] } } } Keyword[final] identifier[JobTaskVertex] identifier[vertex] operator[SEP] Keyword[final] identifier[TaskConfig] identifier[config] operator[SEP] Keyword[if] operator[SEP] identifier[chaining] operator[SEP] { identifier[vertex] operator[=] Other[null] operator[SEP] identifier[config] operator[=] Keyword[new] identifier[TaskConfig] operator[SEP] Keyword[new] identifier[Configuration] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[chainedTasks] operator[SEP] identifier[put] operator[SEP] identifier[node] , Keyword[new] identifier[TaskInChain] operator[SEP] identifier[ds] operator[SEP] identifier[getPushChainDriverClass] operator[SEP] operator[SEP] , identifier[config] , identifier[taskName] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[vertex] operator[=] Keyword[new] identifier[JobTaskVertex] operator[SEP] identifier[taskName] , Keyword[this] operator[SEP] identifier[jobGraph] operator[SEP] operator[SEP] identifier[vertex] operator[SEP] identifier[setTaskClass] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[currentIteration] operator[!=] Other[null] operator[&&] identifier[node] operator[SEP] identifier[isOnDynamicPath] operator[SEP] operator[SEP] operator[SEP] operator[?] identifier[IterationIntermediatePactTask] operator[SEP] Keyword[class] operator[:] identifier[RegularPactTask] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[config] operator[=] Keyword[new] identifier[TaskConfig] operator[SEP] identifier[vertex] operator[SEP] identifier[getConfiguration] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[config] operator[SEP] identifier[setDriver] operator[SEP] identifier[ds] operator[SEP] identifier[getDriverClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[config] operator[SEP] identifier[setStubWrapper] operator[SEP] identifier[node] operator[SEP] identifier[getPactContract] operator[SEP] operator[SEP] operator[SEP] identifier[getUserCodeWrapper] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[config] operator[SEP] identifier[setStubParameters] operator[SEP] identifier[node] operator[SEP] identifier[getPactContract] operator[SEP] operator[SEP] operator[SEP] identifier[getParameters] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[config] operator[SEP] identifier[setDriverStrategy] operator[SEP] identifier[ds] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[node] operator[SEP] identifier[getComparator] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[config] operator[SEP] identifier[setDriverComparator] operator[SEP] identifier[node] operator[SEP] identifier[getComparator] operator[SEP] operator[SEP] , Other[0] operator[SEP] operator[SEP] } identifier[assignDriverResources] operator[SEP] identifier[node] , identifier[config] operator[SEP] operator[SEP] Keyword[return] identifier[vertex] operator[SEP] }
@Override public List<CommerceOrderItem> findByCPInstanceId(long CPInstanceId, int start, int end, OrderByComparator<CommerceOrderItem> orderByComparator) { return findByCPInstanceId(CPInstanceId, start, end, orderByComparator, true); }
class class_name[name] begin[{] method[findByCPInstanceId, return_type[type[List]], modifier[public], parameter[CPInstanceId, start, end, orderByComparator]] begin[{] return[call[.findByCPInstanceId, parameter[member[.CPInstanceId], member[.start], member[.end], member[.orderByComparator], literal[true]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[CommerceOrderItem] operator[>] identifier[findByCPInstanceId] operator[SEP] Keyword[long] identifier[CPInstanceId] , Keyword[int] identifier[start] , Keyword[int] identifier[end] , identifier[OrderByComparator] operator[<] identifier[CommerceOrderItem] operator[>] identifier[orderByComparator] operator[SEP] { Keyword[return] identifier[findByCPInstanceId] operator[SEP] identifier[CPInstanceId] , identifier[start] , identifier[end] , identifier[orderByComparator] , literal[boolean] operator[SEP] operator[SEP] }
public static String replacePlaceHoldersInTemplate(final String template, final Map<String, String> replacementMap) { List<String> toReplace = new ArrayList<>(); List<String> replaceBy = new ArrayList<>(); for (Entry<String, String> property : replacementMap.entrySet()) { toReplace.add(property.getKey()); replaceBy.add(property.getValue()); } return StringUtils.replaceEachRepeatedly(template, toReplace.toArray(new String[toReplace.size()]), replaceBy.toArray(new String[replaceBy.size()])); }
class class_name[name] begin[{] method[replacePlaceHoldersInTemplate, return_type[type[String]], modifier[public static], parameter[template, replacementMap]] begin[{] local_variable[type[List], toReplace] local_variable[type[List], replaceBy] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=toReplace, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=property, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=replaceBy, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=replacementMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=property)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) return[call[StringUtils.replaceEachRepeatedly, parameter[member[.template], call[toReplace.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=toReplace, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]], call[replaceBy.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=replaceBy, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[replacePlaceHoldersInTemplate] operator[SEP] Keyword[final] identifier[String] identifier[template] , Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[replacementMap] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[toReplace] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[replaceBy] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] identifier[property] operator[:] identifier[replacementMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[toReplace] operator[SEP] identifier[add] operator[SEP] identifier[property] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[replaceBy] operator[SEP] identifier[add] operator[SEP] identifier[property] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[StringUtils] operator[SEP] identifier[replaceEachRepeatedly] operator[SEP] identifier[template] , identifier[toReplace] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[toReplace] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] , identifier[replaceBy] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[replaceBy] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected void pushAttributeDataReadyEvent(final int counter, ZMQ.Socket eventSocket) throws DevFailed { xlogger.entry(); try { final AttDataReady dataReady = new AttDataReady(attribute.getName(), attribute.getTangoType(), counter); synchronized (eventSocket) { EventUtilities.sendToSocket(eventSocket, fullName, counter, EventUtilities.marshall(dataReady)); } } catch (final org.zeromq.ZMQException e) { throw DevFailedUtils.newDevFailed(e); } xlogger.exit(); }
class class_name[name] begin[{] method[pushAttributeDataReadyEvent, return_type[void], modifier[protected], parameter[counter, eventSocket]] begin[{] call[xlogger.entry, parameter[]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getTangoType, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), MemberReference(member=counter, 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=AttDataReady, sub_type=None)), name=dataReady)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=AttDataReady, sub_type=None)), SynchronizedStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=eventSocket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fullName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=counter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=dataReady, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=EventUtilities, selectors=[], type_arguments=None)], member=sendToSocket, postfix_operators=[], prefix_operators=[], qualifier=EventUtilities, selectors=[], type_arguments=None), label=None)], label=None, lock=MemberReference(member=eventSocket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=newDevFailed, postfix_operators=[], prefix_operators=[], qualifier=DevFailedUtils, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['org.zeromq.ZMQException']))], finally_block=None, label=None, resources=None) call[xlogger.exit, parameter[]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[pushAttributeDataReadyEvent] operator[SEP] Keyword[final] Keyword[int] identifier[counter] , identifier[ZMQ] operator[SEP] identifier[Socket] identifier[eventSocket] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[xlogger] operator[SEP] identifier[entry] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[final] identifier[AttDataReady] identifier[dataReady] operator[=] Keyword[new] identifier[AttDataReady] operator[SEP] identifier[attribute] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[attribute] operator[SEP] identifier[getTangoType] operator[SEP] operator[SEP] , identifier[counter] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[eventSocket] operator[SEP] { identifier[EventUtilities] operator[SEP] identifier[sendToSocket] operator[SEP] identifier[eventSocket] , identifier[fullName] , identifier[counter] , identifier[EventUtilities] operator[SEP] identifier[marshall] operator[SEP] identifier[dataReady] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] Keyword[final] identifier[org] operator[SEP] identifier[zeromq] operator[SEP] identifier[ZMQException] identifier[e] operator[SEP] { Keyword[throw] identifier[DevFailedUtils] operator[SEP] identifier[newDevFailed] operator[SEP] identifier[e] operator[SEP] operator[SEP] } identifier[xlogger] operator[SEP] identifier[exit] operator[SEP] operator[SEP] operator[SEP] }
public String build() { StringBuilder sb = new StringBuilder(funcName + "("); // Join args and kwargs into simple strings. String args = argList.stream() .map(PyExpr::getText) .filter(Objects::nonNull) .collect(Collectors.joining(", ")); String kwargs = kwargMap.entrySet().stream() .map(entry -> entry.getKey() + "=" + entry.getValue().getText()) .filter(Objects::nonNull) .collect(Collectors.joining(", ")); // Strip empty strings. args = Strings.emptyToNull(args); kwargs = Strings.emptyToNull(kwargs); // Join all pieces together. Joiner.on(", ").skipNulls().appendTo(sb, args, kwargs, unpackedKwargs); sb.append(")"); return sb.toString(); }
class class_name[name] begin[{] method[build, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[StringBuilder], sb] local_variable[type[String], args] local_variable[type[String], kwargs] assign[member[.args], call[Strings.emptyToNull, parameter[member[.args]]]] assign[member[.kwargs], call[Strings.emptyToNull, parameter[member[.kwargs]]]] call[Joiner.on, parameter[literal[", "]]] call[sb.append, parameter[literal[")"]]] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[build] operator[SEP] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[funcName] operator[+] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[args] operator[=] identifier[argList] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[PyExpr] operator[::] identifier[getText] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[Objects] operator[::] identifier[nonNull] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[joining] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[kwargs] operator[=] identifier[kwargMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[entry] operator[->] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getText] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[Objects] operator[::] identifier[nonNull] operator[SEP] operator[SEP] identifier[collect] operator[SEP] identifier[Collectors] operator[SEP] identifier[joining] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[args] operator[=] identifier[Strings] operator[SEP] identifier[emptyToNull] operator[SEP] identifier[args] operator[SEP] operator[SEP] identifier[kwargs] operator[=] identifier[Strings] operator[SEP] identifier[emptyToNull] operator[SEP] identifier[kwargs] operator[SEP] operator[SEP] identifier[Joiner] operator[SEP] identifier[on] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[skipNulls] operator[SEP] operator[SEP] operator[SEP] identifier[appendTo] operator[SEP] identifier[sb] , identifier[args] , identifier[kwargs] , identifier[unpackedKwargs] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@Override public Set<Entry<K, V>> entrySet() { expungeStaleEntries(); Set<Entry<K, V>> result = new LinkedHashSet<>(); for (final Entry<K, SoftReference<V>> entry : hash.entrySet()) { final V value = entry.getValue().get(); if (value != null) { result.add(new Entry<K, V>() { @Override public K getKey() { return entry.getKey(); } @Override public V getValue() { return value; } @Override public V setValue(V v) { entry.setValue(new SoftReference<>(v, queue)); return value; } }); } } return result; }
class class_name[name] begin[{] method[entrySet, return_type[type[Set]], modifier[public], parameter[]] begin[{] call[.expungeStaleEntries, parameter[]] local_variable[type[Set], result] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[MethodInvocation(arguments=[], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=value)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=value, 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=[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=getKey, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=getValue, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None), throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=v, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=queue, 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=SoftReference, sub_type=None))], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], documentation=None, modifiers={'public'}, name=setValue, parameters=[FormalParameter(annotations=[], modifiers=set(), name=v, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=None, name=Entry, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=hash, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers={'final'}, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=[], name=SoftReference, sub_type=None))], dimensions=[], name=Entry, sub_type=None))), label=None) return[member[.result]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Set] operator[<] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[entrySet] operator[SEP] operator[SEP] { identifier[expungeStaleEntries] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[>] identifier[result] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[Entry] operator[<] identifier[K] , identifier[SoftReference] operator[<] identifier[V] operator[>] operator[>] identifier[entry] operator[:] identifier[hash] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[V] identifier[value] operator[=] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[!=] Other[null] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[K] identifier[getKey] operator[SEP] operator[SEP] { Keyword[return] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[V] identifier[getValue] operator[SEP] operator[SEP] { Keyword[return] identifier[value] operator[SEP] } annotation[@] identifier[Override] Keyword[public] identifier[V] identifier[setValue] operator[SEP] identifier[V] identifier[v] operator[SEP] { identifier[entry] operator[SEP] identifier[setValue] operator[SEP] Keyword[new] identifier[SoftReference] operator[<] operator[>] operator[SEP] identifier[v] , identifier[queue] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[SEP] } } operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
public ServiceFuture<AssetInner> updateAsync(String resourceGroupName, String accountName, String assetName, AssetInner parameters, final ServiceCallback<AssetInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, assetName, parameters), serviceCallback); }
class class_name[name] begin[{] method[updateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, accountName, assetName, parameters, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.updateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.accountName], member[.assetName], member[.parameters]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[AssetInner] operator[>] identifier[updateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[accountName] , identifier[String] identifier[assetName] , identifier[AssetInner] identifier[parameters] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[AssetInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[updateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[accountName] , identifier[assetName] , identifier[parameters] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public static <T, C extends Collection<T>> Stream<T> ifExistIntoStream(C collection) { return getOptional(collection).map(Collection::stream) .orElseGet(Stream::empty); }
class class_name[name] begin[{] method[ifExistIntoStream, return_type[type[Stream]], modifier[public static], parameter[collection]] begin[{] return[call[.getOptional, parameter[member[.collection]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] , identifier[C] Keyword[extends] identifier[Collection] operator[<] identifier[T] operator[>] operator[>] identifier[Stream] operator[<] identifier[T] operator[>] identifier[ifExistIntoStream] operator[SEP] identifier[C] identifier[collection] operator[SEP] { Keyword[return] identifier[getOptional] operator[SEP] identifier[collection] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[Collection] operator[::] identifier[stream] operator[SEP] operator[SEP] identifier[orElseGet] operator[SEP] identifier[Stream] operator[::] identifier[empty] operator[SEP] operator[SEP] }
protected void init() throws IOException { if (isInited) return; byte bom[] = new byte[BOM_SIZE]; int n, unread; n = internalIn.read(bom, 0, bom.length); if ( (bom[0] == (byte)0x00) && (bom[1] == (byte)0x00) && (bom[2] == (byte)0xFE) && (bom[3] == (byte)0xFF) ) { encoding = "UTF-32BE"; unread = n - 4; } else if ( (bom[0] == (byte)0xFF) && (bom[1] == (byte)0xFE) && (bom[2] == (byte)0x00) && (bom[3] == (byte)0x00) ) { encoding = "UTF-32LE"; unread = n - 4; } else if ( (bom[0] == (byte)0xEF) && (bom[1] == (byte)0xBB) && (bom[2] == (byte)0xBF) ) { encoding = "UTF-8"; unread = n - 3; } else if ( (bom[0] == (byte)0xFE) && (bom[1] == (byte)0xFF) ) { encoding = "UTF-16BE"; unread = n - 2; } else if ( (bom[0] == (byte)0xFF) && (bom[1] == (byte)0xFE) ) { encoding = "UTF-16LE"; unread = n - 2; } else { // Unicode BOM mark not found, unread all bytes encoding = defaultEnc; unread = n; } //System.out.println("read=" + n + ", unread=" + unread); if (unread > 0) internalIn.unread(bom, (n - unread), unread); isInited = true; }
class class_name[name] begin[{] method[init, return_type[void], modifier[protected], parameter[]] begin[{] if[member[.isInited]] begin[{] return[None] else begin[{] None end[}] local_variable[type[byte], bom] local_variable[type[int], n] assign[member[.n], call[internalIn.read, parameter[member[.bom], literal[0], member[bom.length]]]] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x00), type=BasicType(dimensions=[], name=byte))], &&, binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x00), type=BasicType(dimensions=[], name=byte))]], &&, binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFE), type=BasicType(dimensions=[], name=byte))]], &&, binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), type=BasicType(dimensions=[], name=byte))]]] begin[{] assign[member[.encoding], literal["UTF-32BE"]] assign[member[.unread], binary_operation[member[.n], -, literal[4]]] else begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), type=BasicType(dimensions=[], name=byte))], &&, binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFE), type=BasicType(dimensions=[], name=byte))]], &&, binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x00), type=BasicType(dimensions=[], name=byte))]], &&, binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x00), type=BasicType(dimensions=[], name=byte))]]] begin[{] assign[member[.encoding], literal["UTF-32LE"]] assign[member[.unread], binary_operation[member[.n], -, literal[4]]] else begin[{] if[binary_operation[binary_operation[binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xEF), type=BasicType(dimensions=[], name=byte))], &&, binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xBB), type=BasicType(dimensions=[], name=byte))]], &&, binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xBF), type=BasicType(dimensions=[], name=byte))]]] begin[{] assign[member[.encoding], literal["UTF-8"]] assign[member[.unread], binary_operation[member[.n], -, literal[3]]] else begin[{] if[binary_operation[binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFE), type=BasicType(dimensions=[], name=byte))], &&, binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), type=BasicType(dimensions=[], name=byte))]]] begin[{] assign[member[.encoding], literal["UTF-16BE"]] assign[member[.unread], binary_operation[member[.n], -, literal[2]]] else begin[{] if[binary_operation[binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), type=BasicType(dimensions=[], name=byte))], &&, binary_operation[member[.bom], ==, Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFE), type=BasicType(dimensions=[], name=byte))]]] begin[{] assign[member[.encoding], literal["UTF-16LE"]] assign[member[.unread], binary_operation[member[.n], -, literal[2]]] else begin[{] assign[member[.encoding], member[.defaultEnc]] assign[member[.unread], member[.n]] end[}] end[}] end[}] end[}] end[}] if[binary_operation[member[.unread], >, literal[0]]] begin[{] call[internalIn.unread, parameter[member[.bom], binary_operation[member[.n], -, member[.unread]], member[.unread]]] else begin[{] None end[}] assign[member[.isInited], literal[true]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[init] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[isInited] operator[SEP] Keyword[return] operator[SEP] Keyword[byte] identifier[bom] operator[SEP] operator[SEP] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[BOM_SIZE] operator[SEP] operator[SEP] Keyword[int] identifier[n] , identifier[unread] operator[SEP] identifier[n] operator[=] identifier[internalIn] operator[SEP] identifier[read] operator[SEP] identifier[bom] , Other[0] , identifier[bom] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[bom] operator[SEP] Other[0] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[&&] operator[SEP] identifier[bom] operator[SEP] Other[1] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[&&] operator[SEP] identifier[bom] operator[SEP] Other[2] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[&&] operator[SEP] identifier[bom] operator[SEP] Other[3] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[SEP] { identifier[encoding] operator[=] literal[String] operator[SEP] identifier[unread] operator[=] identifier[n] operator[-] Other[4] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[bom] operator[SEP] Other[0] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[&&] operator[SEP] identifier[bom] operator[SEP] Other[1] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[&&] operator[SEP] identifier[bom] operator[SEP] Other[2] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[&&] operator[SEP] identifier[bom] operator[SEP] Other[3] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[SEP] { identifier[encoding] operator[=] literal[String] operator[SEP] identifier[unread] operator[=] identifier[n] operator[-] Other[4] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[bom] operator[SEP] Other[0] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[&&] operator[SEP] identifier[bom] operator[SEP] Other[1] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[&&] operator[SEP] identifier[bom] operator[SEP] Other[2] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[SEP] { identifier[encoding] operator[=] literal[String] operator[SEP] identifier[unread] operator[=] identifier[n] operator[-] Other[3] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[bom] operator[SEP] Other[0] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[&&] operator[SEP] identifier[bom] operator[SEP] Other[1] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[SEP] { identifier[encoding] operator[=] literal[String] operator[SEP] identifier[unread] operator[=] identifier[n] operator[-] Other[2] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[bom] operator[SEP] Other[0] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[&&] operator[SEP] identifier[bom] operator[SEP] Other[1] operator[SEP] operator[==] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[SEP] { identifier[encoding] operator[=] literal[String] operator[SEP] identifier[unread] operator[=] identifier[n] operator[-] Other[2] operator[SEP] } Keyword[else] { identifier[encoding] operator[=] identifier[defaultEnc] operator[SEP] identifier[unread] operator[=] identifier[n] operator[SEP] } Keyword[if] operator[SEP] identifier[unread] operator[>] Other[0] operator[SEP] identifier[internalIn] operator[SEP] identifier[unread] operator[SEP] identifier[bom] , operator[SEP] identifier[n] operator[-] identifier[unread] operator[SEP] , identifier[unread] operator[SEP] operator[SEP] identifier[isInited] operator[=] literal[boolean] operator[SEP] }