code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public Result json() { setContentType(MimeTypes.JSON); charset = Charsets.UTF_8; // If we already have a String content, we must set the type. // The renderable object checks whether or not the given String is a valid JSON string, // or if a transformation is required. if (getRenderable() instanceof RenderableString) { ((RenderableString) getRenderable()).setType(MimeTypes.JSON); } return this; }
class class_name[name] begin[{] method[json, return_type[type[Result]], modifier[public], parameter[]] begin[{] call[.setContentType, parameter[member[MimeTypes.JSON]]] assign[member[.charset], member[Charsets.UTF_8]] if[binary_operation[call[.getRenderable, parameter[]], instanceof, type[RenderableString]]] begin[{] Cast(expression=MethodInvocation(arguments=[], member=getRenderable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=RenderableString, sub_type=None)) else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Result] identifier[json] operator[SEP] operator[SEP] { identifier[setContentType] operator[SEP] identifier[MimeTypes] operator[SEP] identifier[JSON] operator[SEP] operator[SEP] identifier[charset] operator[=] identifier[Charsets] operator[SEP] identifier[UTF_8] operator[SEP] Keyword[if] operator[SEP] identifier[getRenderable] operator[SEP] operator[SEP] Keyword[instanceof] identifier[RenderableString] operator[SEP] { operator[SEP] operator[SEP] identifier[RenderableString] operator[SEP] identifier[getRenderable] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setType] operator[SEP] identifier[MimeTypes] operator[SEP] identifier[JSON] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public ObjectComposer<PARENT> putObject(String fieldName, Object value) throws IOException, JsonProcessingException { _generator.writeObjectField(fieldName, value); return this; }
class class_name[name] begin[{] method[putObject, return_type[type[ObjectComposer]], modifier[public], parameter[fieldName, value]] begin[{] call[_generator.writeObjectField, parameter[member[.fieldName], member[.value]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[ObjectComposer] operator[<] identifier[PARENT] operator[>] identifier[putObject] operator[SEP] identifier[String] identifier[fieldName] , identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JsonProcessingException] { identifier[_generator] operator[SEP] identifier[writeObjectField] operator[SEP] identifier[fieldName] , identifier[value] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@SuppressWarnings("unchecked") public final FindableDocument<? extends GedObject, ? extends GedDocument<?>> get(final Class<? extends GedObject> clazz) { return (FindableDocument<? extends GedObject, ? extends GedDocument<?>>) classToRepoMap .get(clazz); }
class class_name[name] begin[{] method[get, return_type[type[FindableDocument]], modifier[final public], parameter[clazz]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=classToRepoMap, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=extends, type=ReferenceType(arguments=None, dimensions=[], name=GedObject, sub_type=None)), TypeArgument(pattern_type=extends, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=GedDocument, sub_type=None))], dimensions=[], name=FindableDocument, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[final] identifier[FindableDocument] operator[<] operator[?] Keyword[extends] identifier[GedObject] , operator[?] Keyword[extends] identifier[GedDocument] operator[<] operator[?] operator[>] operator[>] identifier[get] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[GedObject] operator[>] identifier[clazz] operator[SEP] { Keyword[return] operator[SEP] identifier[FindableDocument] operator[<] operator[?] Keyword[extends] identifier[GedObject] , operator[?] Keyword[extends] identifier[GedDocument] operator[<] operator[?] operator[>] operator[>] operator[SEP] identifier[classToRepoMap] operator[SEP] identifier[get] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] }
public List<String> getVariables() { return this.templateChunks.stream() .filter(templateChunk -> Expression.class.isAssignableFrom(templateChunk.getClass())) .map(templateChunk -> ((Expression) templateChunk).getName()) .filter(Objects::nonNull) .collect(Collectors.toList()); }
class class_name[name] begin[{] method[getVariables, return_type[type[List]], modifier[public], parameter[]] begin[{] return[THIS[member[None.templateChunks]call[None.stream, parameter[]]call[None.filter, parameter[LambdaExpression(body=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=templateChunk, selectors=[], type_arguments=None)], member=isAssignableFrom, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Expression, sub_type=None)), parameters=[MemberReference(member=templateChunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]call[None.map, parameter[LambdaExpression(body=Cast(expression=MemberReference(member=templateChunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Expression, sub_type=None)), parameters=[MemberReference(member=templateChunk, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]call[None.filter, parameter[MethodReference(expression=MemberReference(member=Objects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=nonNull, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]]call[None.collect, parameter[call[Collectors.toList, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getVariables] operator[SEP] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[templateChunks] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[templateChunk] operator[->] identifier[Expression] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[templateChunk] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[templateChunk] operator[->] operator[SEP] operator[SEP] identifier[Expression] operator[SEP] identifier[templateChunk] operator[SEP] operator[SEP] identifier[getName] 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[toList] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void setEnabled (boolean enabled) { // report incorrect usage if (enabled && _target == null) { log.warning("Attempt to enable uninitialized keyboard manager!", new Exception()); return; } // ignore NOOPs if (enabled == _enabled) { return; } if (!enabled) { if (Keyboard.isAvailable()) { // restore the original key auto-repeat settings Keyboard.setKeyRepeat(_nativeRepeat); } // clear out all of our key states releaseAllKeys(); _keys.clear(); // cease listening to all of our business if (_window != null) { _window.removeWindowFocusListener(this); _window = null; } _target.removeAncestorListener(this); // note that we no longer have the focus _focus = false; } else { // listen to ancestor events so that we can cease our business // if we lose the focus _target.addAncestorListener(this); // if we're already showing, listen to window focus events, // else we have to wait until the target is added since it // doesn't currently have a window if (_target.isShowing() && _window == null) { _window = SwingUtilities.getWindowAncestor(_target); if (_window != null) { _window.addWindowFocusListener(this); } } // assume the keyboard focus since we were just enabled _focus = true; if (Keyboard.isAvailable()) { // note whether key auto-repeating was enabled _nativeRepeat = Keyboard.isKeyRepeatEnabled(); // Disable native key auto-repeating so that we can definitively ascertain key // pressed/released events. // Or not, if we've discovered we don't want to. Keyboard.setKeyRepeat(!_shouldDisableNativeRepeat); } } // save off our new enabled state _enabled = enabled; }
class class_name[name] begin[{] method[setEnabled, return_type[void], modifier[public], parameter[enabled]] begin[{] if[binary_operation[member[.enabled], &&, binary_operation[member[._target], ==, literal[null]]]] begin[{] call[log.warning, parameter[literal["Attempt to enable uninitialized keyboard manager!"], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Exception, sub_type=None))]] return[None] else begin[{] None end[}] if[binary_operation[member[.enabled], ==, member[._enabled]]] begin[{] return[None] else begin[{] None end[}] if[member[.enabled]] begin[{] if[call[Keyboard.isAvailable, parameter[]]] begin[{] call[Keyboard.setKeyRepeat, parameter[member[._nativeRepeat]]] else begin[{] None end[}] call[.releaseAllKeys, parameter[]] call[_keys.clear, parameter[]] if[binary_operation[member[._window], !=, literal[null]]] begin[{] call[_window.removeWindowFocusListener, parameter[THIS[]]] assign[member[._window], literal[null]] else begin[{] None end[}] call[_target.removeAncestorListener, parameter[THIS[]]] assign[member[._focus], literal[false]] else begin[{] call[_target.addAncestorListener, parameter[THIS[]]] if[binary_operation[call[_target.isShowing, parameter[]], &&, binary_operation[member[._window], ==, literal[null]]]] begin[{] assign[member[._window], call[SwingUtilities.getWindowAncestor, parameter[member[._target]]]] if[binary_operation[member[._window], !=, literal[null]]] begin[{] call[_window.addWindowFocusListener, parameter[THIS[]]] else begin[{] None end[}] else begin[{] None end[}] assign[member[._focus], literal[true]] if[call[Keyboard.isAvailable, parameter[]]] begin[{] assign[member[._nativeRepeat], call[Keyboard.isKeyRepeatEnabled, parameter[]]] call[Keyboard.setKeyRepeat, parameter[member[._shouldDisableNativeRepeat]]] else begin[{] None end[}] end[}] assign[member[._enabled], member[.enabled]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setEnabled] operator[SEP] Keyword[boolean] identifier[enabled] operator[SEP] { Keyword[if] operator[SEP] identifier[enabled] operator[&&] identifier[_target] operator[==] Other[null] operator[SEP] { identifier[log] operator[SEP] identifier[warning] operator[SEP] literal[String] , Keyword[new] identifier[Exception] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[enabled] operator[==] identifier[_enabled] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[enabled] operator[SEP] { Keyword[if] operator[SEP] identifier[Keyboard] operator[SEP] identifier[isAvailable] operator[SEP] operator[SEP] operator[SEP] { identifier[Keyboard] operator[SEP] identifier[setKeyRepeat] operator[SEP] identifier[_nativeRepeat] operator[SEP] operator[SEP] } identifier[releaseAllKeys] operator[SEP] operator[SEP] operator[SEP] identifier[_keys] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_window] operator[!=] Other[null] operator[SEP] { identifier[_window] operator[SEP] identifier[removeWindowFocusListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[_window] operator[=] Other[null] operator[SEP] } identifier[_target] operator[SEP] identifier[removeAncestorListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[_focus] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[_target] operator[SEP] identifier[addAncestorListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_target] operator[SEP] identifier[isShowing] operator[SEP] operator[SEP] operator[&&] identifier[_window] operator[==] Other[null] operator[SEP] { identifier[_window] operator[=] identifier[SwingUtilities] operator[SEP] identifier[getWindowAncestor] operator[SEP] identifier[_target] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[_window] operator[!=] Other[null] operator[SEP] { identifier[_window] operator[SEP] identifier[addWindowFocusListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] } } identifier[_focus] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[Keyboard] operator[SEP] identifier[isAvailable] operator[SEP] operator[SEP] operator[SEP] { identifier[_nativeRepeat] operator[=] identifier[Keyboard] operator[SEP] identifier[isKeyRepeatEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Keyboard] operator[SEP] identifier[setKeyRepeat] operator[SEP] operator[!] identifier[_shouldDisableNativeRepeat] operator[SEP] operator[SEP] } } identifier[_enabled] operator[=] identifier[enabled] operator[SEP] }
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) @Override int calculateEndTopBound(float yAxisDelta) { return (int) (getView().getY() + yAxisDelta); }
class class_name[name] begin[{] method[calculateEndTopBound, return_type[type[int]], modifier[default], parameter[yAxisDelta]] begin[{] return[Cast(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getView, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getY, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=MemberReference(member=yAxisDelta, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), type=BasicType(dimensions=[], name=int))] end[}] END[}]
annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[JELLY_BEAN] operator[SEP] annotation[@] identifier[Override] Keyword[int] identifier[calculateEndTopBound] operator[SEP] Keyword[float] identifier[yAxisDelta] operator[SEP] { Keyword[return] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[getView] operator[SEP] operator[SEP] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[+] identifier[yAxisDelta] operator[SEP] operator[SEP] }
public boolean compileFromPMML(final InputStream stream) { pmmlDocument = compiler.loadModel(PMML.class.getPackage().getName(), stream); return pmmlDocument != null; }
class class_name[name] begin[{] method[compileFromPMML, return_type[type[boolean]], modifier[public], parameter[stream]] begin[{] assign[member[.pmmlDocument], call[compiler.loadModel, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getPackage, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=PMML, sub_type=None)), member[.stream]]]] return[binary_operation[member[.pmmlDocument], !=, literal[null]]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[compileFromPMML] operator[SEP] Keyword[final] identifier[InputStream] identifier[stream] operator[SEP] { identifier[pmmlDocument] operator[=] identifier[compiler] operator[SEP] identifier[loadModel] operator[SEP] identifier[PMML] operator[SEP] Keyword[class] operator[SEP] identifier[getPackage] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[stream] operator[SEP] operator[SEP] Keyword[return] identifier[pmmlDocument] operator[!=] Other[null] operator[SEP] }
public void addItem(final InvoiceItem invoiceItem) { Preconditions.checkState(!isBuilt, "Tree already built, unable to add new invoiceItem=%s", invoiceItem); switch (invoiceItem.getInvoiceItemType()) { case RECURRING: if (invoiceItem.getAmount().compareTo(BigDecimal.ZERO) == 0) { // Nothing to repair -- https://github.com/killbill/killbill/issues/783 existingIgnoredItems.add(invoiceItem); } else { root.addExistingItem(new ItemsNodeInterval(root, new Item(invoiceItem, targetInvoiceId, ItemAction.ADD))); } break; case REPAIR_ADJ: root.addExistingItem(new ItemsNodeInterval(root, new Item(invoiceItem, targetInvoiceId, ItemAction.CANCEL))); break; case FIXED: existingIgnoredItems.add(invoiceItem); break; case ITEM_ADJ: pendingItemAdj.add(invoiceItem); break; default: break; } }
class class_name[name] begin[{] method[addItem, return_type[void], modifier[public], parameter[invoiceItem]] begin[{] call[Preconditions.checkState, parameter[member[.isBuilt], literal["Tree already built, unable to add new invoiceItem=%s"], member[.invoiceItem]]] SwitchStatement(cases=[SwitchStatementCase(case=['RECURRING'], statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getAmount, postfix_operators=[], prefix_operators=[], qualifier=invoiceItem, selectors=[MethodInvocation(arguments=[MemberReference(member=ZERO, postfix_operators=[], prefix_operators=[], qualifier=BigDecimal, selectors=[])], member=compareTo, 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=0), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=invoiceItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetInvoiceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ADD, postfix_operators=[], prefix_operators=[], qualifier=ItemAction, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Item, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ItemsNodeInterval, sub_type=None))], member=addExistingItem, postfix_operators=[], prefix_operators=[], qualifier=root, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=invoiceItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=existingIgnoredItems, selectors=[], type_arguments=None), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['REPAIR_ADJ'], statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=root, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MemberReference(member=invoiceItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=targetInvoiceId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CANCEL, postfix_operators=[], prefix_operators=[], qualifier=ItemAction, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Item, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ItemsNodeInterval, sub_type=None))], member=addExistingItem, postfix_operators=[], prefix_operators=[], qualifier=root, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['FIXED'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=invoiceItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=existingIgnoredItems, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['ITEM_ADJ'], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=invoiceItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=pendingItemAdj, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[], member=getInvoiceItemType, postfix_operators=[], prefix_operators=[], qualifier=invoiceItem, selectors=[], type_arguments=None), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[addItem] operator[SEP] Keyword[final] identifier[InvoiceItem] identifier[invoiceItem] operator[SEP] { identifier[Preconditions] operator[SEP] identifier[checkState] operator[SEP] operator[!] identifier[isBuilt] , literal[String] , identifier[invoiceItem] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[invoiceItem] operator[SEP] identifier[getInvoiceItemType] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[RECURRING] operator[:] Keyword[if] operator[SEP] identifier[invoiceItem] operator[SEP] identifier[getAmount] operator[SEP] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[BigDecimal] operator[SEP] identifier[ZERO] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[existingIgnoredItems] operator[SEP] identifier[add] operator[SEP] identifier[invoiceItem] operator[SEP] operator[SEP] } Keyword[else] { identifier[root] operator[SEP] identifier[addExistingItem] operator[SEP] Keyword[new] identifier[ItemsNodeInterval] operator[SEP] identifier[root] , Keyword[new] identifier[Item] operator[SEP] identifier[invoiceItem] , identifier[targetInvoiceId] , identifier[ItemAction] operator[SEP] identifier[ADD] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] identifier[REPAIR_ADJ] operator[:] identifier[root] operator[SEP] identifier[addExistingItem] operator[SEP] Keyword[new] identifier[ItemsNodeInterval] operator[SEP] identifier[root] , Keyword[new] identifier[Item] operator[SEP] identifier[invoiceItem] , identifier[targetInvoiceId] , identifier[ItemAction] operator[SEP] identifier[CANCEL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[FIXED] operator[:] identifier[existingIgnoredItems] operator[SEP] identifier[add] operator[SEP] identifier[invoiceItem] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[ITEM_ADJ] operator[:] identifier[pendingItemAdj] operator[SEP] identifier[add] operator[SEP] identifier[invoiceItem] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } }
private Object getFirstResult(KunderaQuery query, String field, SearchHits hits, Class clazz, Metamodel metaModel, EntityMetadata entityMetadata) { Object entity; if (query.getEntityAlias().equals(field)) { entity = getEntityObjects(clazz, entityMetadata, metaModel.entity(clazz), hits).get(0); } else { String jpaField = ((AbstractAttribute) metaModel.entity(clazz).getAttribute(field)).getJPAColumnName(); entity = query.getSelectStatement().hasGroupByClause() ? hits.getAt(0).sourceAsMap().get(jpaField) : hits .getAt(0).getFields().get(jpaField).getValue(); } return entity; }
class class_name[name] begin[{] method[getFirstResult, return_type[type[Object]], modifier[private], parameter[query, field, hits, clazz, metaModel, entityMetadata]] begin[{] local_variable[type[Object], entity] if[call[query.getEntityAlias, parameter[]]] begin[{] assign[member[.entity], call[.getEntityObjects, parameter[member[.clazz], member[.entityMetadata], call[metaModel.entity, parameter[member[.clazz]]], member[.hits]]]] else begin[{] local_variable[type[String], jpaField] assign[member[.entity], TernaryExpression(condition=MethodInvocation(arguments=[], member=getSelectStatement, postfix_operators=[], prefix_operators=[], qualifier=query, selectors=[MethodInvocation(arguments=[], member=hasGroupByClause, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAt, postfix_operators=[], prefix_operators=[], qualifier=hits, selectors=[MethodInvocation(arguments=[], member=getFields, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=jpaField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_true=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAt, postfix_operators=[], prefix_operators=[], qualifier=hits, selectors=[MethodInvocation(arguments=[], member=sourceAsMap, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=jpaField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None))] end[}] return[member[.entity]] end[}] END[}]
Keyword[private] identifier[Object] identifier[getFirstResult] operator[SEP] identifier[KunderaQuery] identifier[query] , identifier[String] identifier[field] , identifier[SearchHits] identifier[hits] , identifier[Class] identifier[clazz] , identifier[Metamodel] identifier[metaModel] , identifier[EntityMetadata] identifier[entityMetadata] operator[SEP] { identifier[Object] identifier[entity] operator[SEP] Keyword[if] operator[SEP] identifier[query] operator[SEP] identifier[getEntityAlias] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[field] operator[SEP] operator[SEP] { identifier[entity] operator[=] identifier[getEntityObjects] operator[SEP] identifier[clazz] , identifier[entityMetadata] , identifier[metaModel] operator[SEP] identifier[entity] operator[SEP] identifier[clazz] operator[SEP] , identifier[hits] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] } Keyword[else] { identifier[String] identifier[jpaField] operator[=] operator[SEP] operator[SEP] identifier[AbstractAttribute] operator[SEP] identifier[metaModel] operator[SEP] identifier[entity] operator[SEP] identifier[clazz] operator[SEP] operator[SEP] identifier[getAttribute] operator[SEP] identifier[field] operator[SEP] operator[SEP] operator[SEP] identifier[getJPAColumnName] operator[SEP] operator[SEP] operator[SEP] identifier[entity] operator[=] identifier[query] operator[SEP] identifier[getSelectStatement] operator[SEP] operator[SEP] operator[SEP] identifier[hasGroupByClause] operator[SEP] operator[SEP] operator[?] identifier[hits] operator[SEP] identifier[getAt] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[sourceAsMap] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[jpaField] operator[SEP] operator[:] identifier[hits] operator[SEP] identifier[getAt] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getFields] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[jpaField] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[entity] operator[SEP] }
public RequestResponse doDelete(String url, Map<String, Object> headers, Map<String, Object> urlParams) { return doDelete(url, headers, urlParams, null); }
class class_name[name] begin[{] method[doDelete, return_type[type[RequestResponse]], modifier[public], parameter[url, headers, urlParams]] begin[{] return[call[.doDelete, parameter[member[.url], member[.headers], member[.urlParams], literal[null]]]] end[}] END[}]
Keyword[public] identifier[RequestResponse] identifier[doDelete] operator[SEP] identifier[String] identifier[url] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[headers] , identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[urlParams] operator[SEP] { Keyword[return] identifier[doDelete] operator[SEP] identifier[url] , identifier[headers] , identifier[urlParams] , Other[null] operator[SEP] operator[SEP] }
public void marshall(StopStackRequest stopStackRequest, ProtocolMarshaller protocolMarshaller) { if (stopStackRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(stopStackRequest.getStackId(), STACKID_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[stopStackRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.stopStackRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStackId, postfix_operators=[], prefix_operators=[], qualifier=stopStackRequest, selectors=[], type_arguments=None), MemberReference(member=STACKID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[StopStackRequest] identifier[stopStackRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[stopStackRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[stopStackRequest] operator[SEP] identifier[getStackId] operator[SEP] operator[SEP] , identifier[STACKID_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static double latLonDist(double lon1, double lat1, double lon2, double lat2) { double[] aux; try { aux = PIGbsl(lon1, lat1, lon2, lat2, Ellipsoid.WGS84); } catch (Exception e) { // Calculator.debugThis(true, "Error while getting dist: " + // e.getMessage(), logger); return Double.MAX_VALUE; } return aux[2]; }
class class_name[name] begin[{] method[latLonDist, return_type[type[double]], modifier[public static], parameter[lon1, lat1, lon2, lat2]] begin[{] local_variable[type[double], aux] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=aux, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=lon1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lat1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lon2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=lat2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=WGS84, postfix_operators=[], prefix_operators=[], qualifier=Ellipsoid, selectors=[])], member=PIGbsl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.aux]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] identifier[latLonDist] operator[SEP] Keyword[double] identifier[lon1] , Keyword[double] identifier[lat1] , Keyword[double] identifier[lon2] , Keyword[double] identifier[lat2] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] identifier[aux] operator[SEP] Keyword[try] { identifier[aux] operator[=] identifier[PIGbsl] operator[SEP] identifier[lon1] , identifier[lat1] , identifier[lon2] , identifier[lat2] , identifier[Ellipsoid] operator[SEP] identifier[WGS84] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[return] identifier[Double] operator[SEP] identifier[MAX_VALUE] operator[SEP] } Keyword[return] identifier[aux] operator[SEP] Other[2] operator[SEP] operator[SEP] }
protected Article readArticleFromJson(String json) { Gson gson = new Gson(); Article article = gson.fromJson(json, Article.class); return article; }
class class_name[name] begin[{] method[readArticleFromJson, return_type[type[Article]], modifier[protected], parameter[json]] begin[{] local_variable[type[Gson], gson] local_variable[type[Article], article] return[member[.article]] end[}] END[}]
Keyword[protected] identifier[Article] identifier[readArticleFromJson] operator[SEP] identifier[String] identifier[json] operator[SEP] { identifier[Gson] identifier[gson] operator[=] Keyword[new] identifier[Gson] operator[SEP] operator[SEP] operator[SEP] identifier[Article] identifier[article] operator[=] identifier[gson] operator[SEP] identifier[fromJson] operator[SEP] identifier[json] , identifier[Article] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[article] operator[SEP] }
public List<String> getFieldValues(String fieldName) { Utils.require(!Utils.isEmpty(fieldName), "fieldName"); return m_valueMap.get(fieldName); }
class class_name[name] begin[{] method[getFieldValues, return_type[type[List]], modifier[public], parameter[fieldName]] begin[{] call[Utils.require, parameter[call[Utils.isEmpty, parameter[member[.fieldName]]], literal["fieldName"]]] return[call[m_valueMap.get, parameter[member[.fieldName]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getFieldValues] operator[SEP] identifier[String] identifier[fieldName] operator[SEP] { identifier[Utils] operator[SEP] identifier[require] operator[SEP] operator[!] identifier[Utils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[fieldName] operator[SEP] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[m_valueMap] operator[SEP] identifier[get] operator[SEP] identifier[fieldName] operator[SEP] operator[SEP] }
void parse(Reader reader) throws ParseException { if (reader == null) { //just log and return default properties Log.warn("parsing NULL reader, so fallback on default configuration!"); return; } BufferedReader br = new BufferedReader(reader); String line; try { while ((line = br.readLine()) != null) { int commentMarker = line.indexOf('#'); if (commentMarker != -1) { if (commentMarker == 0) { //skip its a comment continue; } else { //it's a malformed comment throw new ParseException(line, commentMarker); } } else { if (line.isEmpty() || line.matches("^\\s*$")) { //skip it's a black line continue; } //split till the first space int deilimiterIdx = line.indexOf(' '); String key = line.substring(0, deilimiterIdx).trim(); String value = line.substring(deilimiterIdx).trim(); m_properties.put(key, value); } } } catch (IOException ex) { throw new ParseException("Failed to read", 1); } }
class class_name[name] begin[{] method[parse, return_type[void], modifier[default], parameter[reader]] begin[{] if[binary_operation[member[.reader], ==, literal[null]]] begin[{] call[Log.warn, parameter[literal["parsing NULL reader, so fallback on default configuration!"]]] return[None] else begin[{] None end[}] local_variable[type[BufferedReader], br] local_variable[type[String], line] TryStatement(block=[WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='#')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), name=commentMarker)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=commentMarker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="^\\s*$")], member=matches, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), 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=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' ')], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[], type_arguments=None), name=deilimiterIdx)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=deilimiterIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=deilimiterIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=substring, postfix_operators=[], prefix_operators=[], qualifier=line, selectors=[MethodInvocation(arguments=[], member=trim, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=m_properties, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=commentMarker, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=commentMarker, 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=ParseException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)]))]))]), condition=BinaryOperation(operandl=Assignment(expressionl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readLine, postfix_operators=[], prefix_operators=[], qualifier=br, selectors=[], type_arguments=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to read"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ParseException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[void] identifier[parse] operator[SEP] identifier[Reader] identifier[reader] operator[SEP] Keyword[throws] identifier[ParseException] { Keyword[if] operator[SEP] identifier[reader] operator[==] Other[null] operator[SEP] { identifier[Log] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[BufferedReader] identifier[br] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[String] identifier[line] operator[SEP] Keyword[try] { Keyword[while] operator[SEP] operator[SEP] identifier[line] operator[=] identifier[br] operator[SEP] identifier[readLine] operator[SEP] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[int] identifier[commentMarker] operator[=] identifier[line] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[commentMarker] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[commentMarker] operator[==] Other[0] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] identifier[line] , identifier[commentMarker] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[if] operator[SEP] identifier[line] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] identifier[line] operator[SEP] identifier[matches] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } Keyword[int] identifier[deilimiterIdx] operator[=] identifier[line] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[key] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[deilimiterIdx] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[value] operator[=] identifier[line] operator[SEP] identifier[substring] operator[SEP] identifier[deilimiterIdx] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[m_properties] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[IOException] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[ParseException] operator[SEP] literal[String] , Other[1] operator[SEP] operator[SEP] } }
static Shell createTerminalConsoleShell(String prompt, String appName, ShellCommandHandler mainHandler, InputStream input, OutputStream output) { try { PrintStream out = new PrintStream(output); // Build jline terminal jline.Terminal term = TerminalFactory.get(); final ConsoleReader console = new ConsoleReader(input, output, term); console.setBellEnabled(true); console.setHistoryEnabled(true); // Build console BufferedReader in = new BufferedReader(new InputStreamReader( new ConsoleReaderInputStream(console))); ConsoleIO.PromptListener promptListener = new ConsoleIO.PromptListener() { @Override public boolean onPrompt(String prompt) { console.setPrompt(prompt); return true; // suppress normal prompt } }; return createConsoleShell(prompt, appName, mainHandler, in, out, out, promptListener); } catch (Exception e) { // Failover: use default shell BufferedReader in = new BufferedReader(new InputStreamReader(input)); PrintStream out = new PrintStream(output); return createConsoleShell(prompt, appName, mainHandler, in, out, out, null); } }
class class_name[name] begin[{] method[createTerminalConsoleShell, return_type[type[Shell]], modifier[static], parameter[prompt, appName, mainHandler, input, output]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=output, 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=PrintStream, sub_type=None)), name=out)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PrintStream, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=TerminalFactory, selectors=[], type_arguments=None), name=term)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=jline, sub_type=ReferenceType(arguments=None, dimensions=None, name=Terminal, sub_type=None))), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=term, 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=ConsoleReader, sub_type=None)), name=console)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=ConsoleReader, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setBellEnabled, postfix_operators=[], prefix_operators=[], qualifier=console, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setHistoryEnabled, postfix_operators=[], prefix_operators=[], qualifier=console, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=console, 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=ConsoleReaderInputStream, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InputStreamReader, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedReader, sub_type=None)), name=in)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BufferedReader, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=prompt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setPrompt, postfix_operators=[], prefix_operators=[], qualifier=console, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], documentation=None, modifiers={'public'}, name=onPrompt, parameters=[FormalParameter(annotations=[], modifiers=set(), name=prompt, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ConsoleIO, sub_type=ReferenceType(arguments=None, dimensions=None, name=PromptListener, sub_type=None))), name=promptListener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ConsoleIO, sub_type=ReferenceType(arguments=None, dimensions=None, name=PromptListener, sub_type=None))), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=prompt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=appName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mainHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=promptListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createConsoleShell, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=input, 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=InputStreamReader, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedReader, sub_type=None)), name=in)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BufferedReader, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=output, 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=PrintStream, sub_type=None)), name=out)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PrintStream, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=prompt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=appName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mainHandler, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=out, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=createConsoleShell, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[static] identifier[Shell] identifier[createTerminalConsoleShell] operator[SEP] identifier[String] identifier[prompt] , identifier[String] identifier[appName] , identifier[ShellCommandHandler] identifier[mainHandler] , identifier[InputStream] identifier[input] , identifier[OutputStream] identifier[output] operator[SEP] { Keyword[try] { identifier[PrintStream] identifier[out] operator[=] Keyword[new] identifier[PrintStream] operator[SEP] identifier[output] operator[SEP] operator[SEP] identifier[jline] operator[SEP] identifier[Terminal] identifier[term] operator[=] identifier[TerminalFactory] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[ConsoleReader] identifier[console] operator[=] Keyword[new] identifier[ConsoleReader] operator[SEP] identifier[input] , identifier[output] , identifier[term] operator[SEP] operator[SEP] identifier[console] operator[SEP] identifier[setBellEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[console] operator[SEP] identifier[setHistoryEnabled] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[BufferedReader] identifier[in] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] Keyword[new] identifier[ConsoleReaderInputStream] operator[SEP] identifier[console] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ConsoleIO] operator[SEP] identifier[PromptListener] identifier[promptListener] operator[=] Keyword[new] identifier[ConsoleIO] operator[SEP] identifier[PromptListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[onPrompt] operator[SEP] identifier[String] identifier[prompt] operator[SEP] { identifier[console] operator[SEP] identifier[setPrompt] operator[SEP] identifier[prompt] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } } operator[SEP] Keyword[return] identifier[createConsoleShell] operator[SEP] identifier[prompt] , identifier[appName] , identifier[mainHandler] , identifier[in] , identifier[out] , identifier[out] , identifier[promptListener] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[BufferedReader] identifier[in] operator[=] Keyword[new] identifier[BufferedReader] operator[SEP] Keyword[new] identifier[InputStreamReader] operator[SEP] identifier[input] operator[SEP] operator[SEP] operator[SEP] identifier[PrintStream] identifier[out] operator[=] Keyword[new] identifier[PrintStream] operator[SEP] identifier[output] operator[SEP] operator[SEP] Keyword[return] identifier[createConsoleShell] operator[SEP] identifier[prompt] , identifier[appName] , identifier[mainHandler] , identifier[in] , identifier[out] , identifier[out] , Other[null] operator[SEP] operator[SEP] } }
private static TagList getMonitorTags(Object obj) { try { Set<Field> fields = getFieldsAnnotatedBy(obj.getClass(), MonitorTags.class); for (Field field : fields) { field.setAccessible(true); return (TagList) field.get(obj); } Set<Method> methods = getMethodsAnnotatedBy(obj.getClass(), MonitorTags.class); for (Method method : methods) { method.setAccessible(true); return (TagList) method.invoke(obj); } } catch (Exception e) { throw Throwables.propagate(e); } return null; }
class class_name[name] begin[{] method[getMonitorTags, return_type[type[TagList]], modifier[private static], parameter[obj]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=obj, selectors=[], type_arguments=None), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MonitorTags, sub_type=None))], member=getFieldsAnnotatedBy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=fields)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))], dimensions=[], name=Set, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAccessible, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=TagList, sub_type=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=fields, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=obj, selectors=[], type_arguments=None), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MonitorTags, sub_type=None))], member=getMethodsAnnotatedBy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=methods)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))], dimensions=[], name=Set, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setAccessible, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=TagList, sub_type=None)), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=methods, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=propagate, postfix_operators=[], prefix_operators=[], qualifier=Throwables, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[literal[null]] end[}] END[}]
Keyword[private] Keyword[static] identifier[TagList] identifier[getMonitorTags] operator[SEP] identifier[Object] identifier[obj] operator[SEP] { Keyword[try] { identifier[Set] operator[<] identifier[Field] operator[>] identifier[fields] operator[=] identifier[getFieldsAnnotatedBy] operator[SEP] identifier[obj] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[MonitorTags] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Field] identifier[field] operator[:] identifier[fields] operator[SEP] { identifier[field] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[TagList] operator[SEP] identifier[field] operator[SEP] identifier[get] operator[SEP] identifier[obj] operator[SEP] operator[SEP] } identifier[Set] operator[<] identifier[Method] operator[>] identifier[methods] operator[=] identifier[getMethodsAnnotatedBy] operator[SEP] identifier[obj] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[MonitorTags] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Method] identifier[method] operator[:] identifier[methods] operator[SEP] { identifier[method] operator[SEP] identifier[setAccessible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[TagList] operator[SEP] identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[obj] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] identifier[Throwables] operator[SEP] identifier[propagate] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
@BetaApi public final ListAutoscalersPagedResponse listAutoscalers(ProjectZoneName zone) { ListAutoscalersHttpRequest request = ListAutoscalersHttpRequest.newBuilder() .setZone(zone == null ? null : zone.toString()) .build(); return listAutoscalers(request); }
class class_name[name] begin[{] method[listAutoscalers, return_type[type[ListAutoscalersPagedResponse]], modifier[final public], parameter[zone]] begin[{] local_variable[type[ListAutoscalersHttpRequest], request] return[call[.listAutoscalers, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[BetaApi] Keyword[public] Keyword[final] identifier[ListAutoscalersPagedResponse] identifier[listAutoscalers] operator[SEP] identifier[ProjectZoneName] identifier[zone] operator[SEP] { identifier[ListAutoscalersHttpRequest] identifier[request] operator[=] identifier[ListAutoscalersHttpRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setZone] operator[SEP] identifier[zone] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[zone] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[listAutoscalers] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public ReloadableType getReloadableType(String slashedClassName) { int id = getTypeIdFor(slashedClassName, true); if (id >= reloadableTypesSize) { return null; } return getReloadableType(id); }
class class_name[name] begin[{] method[getReloadableType, return_type[type[ReloadableType]], modifier[public], parameter[slashedClassName]] begin[{] local_variable[type[int], id] if[binary_operation[member[.id], >=, member[.reloadableTypesSize]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[.getReloadableType, parameter[member[.id]]]] end[}] END[}]
Keyword[public] identifier[ReloadableType] identifier[getReloadableType] operator[SEP] identifier[String] identifier[slashedClassName] operator[SEP] { Keyword[int] identifier[id] operator[=] identifier[getTypeIdFor] operator[SEP] identifier[slashedClassName] , literal[boolean] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[id] operator[>=] identifier[reloadableTypesSize] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[getReloadableType] operator[SEP] identifier[id] operator[SEP] operator[SEP] }
public void close() { synchronized (lock) { while (!available.isEmpty()) { PooledConnection pci = available.pop(); try { pci.close(); } catch (SQLException e) { } } available = null; while (!used.isEmpty()) { PooledConnection pci = used.pop(); pci.removeConnectionEventListener(connectionEventListener); try { pci.close(); } catch (SQLException e) { } } used = null; } removeStoredDataSource(); }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] SYNCHRONIZED[member[.lock]] BEGIN[{] while[call[available.isEmpty, parameter[]]] begin[{] local_variable[type[PooledConnection], pci] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=pci, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None) end[}] assign[member[.available], literal[null]] while[call[used.isEmpty, parameter[]]] begin[{] local_variable[type[PooledConnection], pci] call[pci.removeConnectionEventListener, parameter[member[.connectionEventListener]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=pci, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SQLException']))], finally_block=None, label=None, resources=None) end[}] assign[member[.used], literal[null]] END[}] call[.removeStoredDataSource, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[lock] operator[SEP] { Keyword[while] operator[SEP] operator[!] identifier[available] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[PooledConnection] identifier[pci] operator[=] identifier[available] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[pci] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { } } identifier[available] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[used] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[PooledConnection] identifier[pci] operator[=] identifier[used] operator[SEP] identifier[pop] operator[SEP] operator[SEP] operator[SEP] identifier[pci] operator[SEP] identifier[removeConnectionEventListener] operator[SEP] identifier[connectionEventListener] operator[SEP] operator[SEP] Keyword[try] { identifier[pci] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SQLException] identifier[e] operator[SEP] { } } identifier[used] operator[=] Other[null] operator[SEP] } identifier[removeStoredDataSource] operator[SEP] operator[SEP] operator[SEP] }
static CTFont resolveFont (Font font) { CTFont ctFont = fonts.get(font == null ? DEFAULT_FONT : font); if (ctFont == null) { String iosName = getVariant(font.name, font.style); fonts.put(font, ctFont = CTFont.create(iosName, font.size, CGAffineTransform.Identity())); } return ctFont; }
class class_name[name] begin[{] method[resolveFont, return_type[type[CTFont]], modifier[static], parameter[font]] begin[{] local_variable[type[CTFont], ctFont] if[binary_operation[member[.ctFont], ==, literal[null]]] begin[{] local_variable[type[String], iosName] call[fonts.put, parameter[member[.font], assign[member[.ctFont], call[CTFont.create, parameter[member[.iosName], member[font.size], call[CGAffineTransform.Identity, parameter[]]]]]]] else begin[{] None end[}] return[member[.ctFont]] end[}] END[}]
Keyword[static] identifier[CTFont] identifier[resolveFont] operator[SEP] identifier[Font] identifier[font] operator[SEP] { identifier[CTFont] identifier[ctFont] operator[=] identifier[fonts] operator[SEP] identifier[get] operator[SEP] identifier[font] operator[==] Other[null] operator[?] identifier[DEFAULT_FONT] operator[:] identifier[font] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ctFont] operator[==] Other[null] operator[SEP] { identifier[String] identifier[iosName] operator[=] identifier[getVariant] operator[SEP] identifier[font] operator[SEP] identifier[name] , identifier[font] operator[SEP] identifier[style] operator[SEP] operator[SEP] identifier[fonts] operator[SEP] identifier[put] operator[SEP] identifier[font] , identifier[ctFont] operator[=] identifier[CTFont] operator[SEP] identifier[create] operator[SEP] identifier[iosName] , identifier[font] operator[SEP] identifier[size] , identifier[CGAffineTransform] operator[SEP] identifier[Identity] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[ctFont] operator[SEP] }
public Observable<ServiceResponse<AppInner>> updateWithServiceResponseAsync(String resourceGroupName, String resourceName, AppPatch appPatch) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (resourceName == null) { throw new IllegalArgumentException("Parameter resourceName is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } if (appPatch == null) { throw new IllegalArgumentException("Parameter appPatch is required and cannot be null."); } Validator.validate(appPatch); Observable<Response<ResponseBody>> observable = service.update(this.client.subscriptionId(), resourceGroupName, resourceName, this.client.apiVersion(), appPatch, this.client.acceptLanguage(), this.client.userAgent()); return client.getAzureClient().getPutOrPatchResultAsync(observable, new TypeToken<AppInner>() { }.getType()); }
class class_name[name] begin[{] method[updateWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, resourceName, appPatch]] begin[{] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.resourceName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.apiVersion, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.apiVersion() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.appPatch], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter appPatch is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[Validator.validate, parameter[member[.appPatch]]] local_variable[type[Observable], observable] return[call[client.getAzureClient, parameter[]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[AppInner] operator[>] operator[>] identifier[updateWithServiceResponseAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] , identifier[AppPatch] identifier[appPatch] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[resourceName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[appPatch] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Validator] operator[SEP] identifier[validate] operator[SEP] identifier[appPatch] operator[SEP] operator[SEP] identifier[Observable] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] operator[>] identifier[observable] operator[=] identifier[service] operator[SEP] identifier[update] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , identifier[resourceGroupName] , identifier[resourceName] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] , identifier[appPatch] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[client] operator[SEP] identifier[getAzureClient] operator[SEP] operator[SEP] operator[SEP] identifier[getPutOrPatchResultAsync] operator[SEP] identifier[observable] , Keyword[new] identifier[TypeToken] operator[<] identifier[AppInner] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected RDFName getStateResource(String state) throws ResourceIndexException { if (state == null) { throw new ResourceIndexException("State cannot be null"); } else if (state.equals("A")) { return MODEL.ACTIVE; } else if (state.equals("D")) { return MODEL.DELETED; } else if (state.equals("I")) { return MODEL.INACTIVE; } else { throw new ResourceIndexException("Unrecognized state: " + state); } }
class class_name[name] begin[{] method[getStateResource, return_type[type[RDFName]], modifier[protected], parameter[state]] begin[{] if[binary_operation[member[.state], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="State cannot be null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ResourceIndexException, sub_type=None)), label=None) else begin[{] if[call[state.equals, parameter[literal["A"]]]] begin[{] return[member[MODEL.ACTIVE]] else begin[{] if[call[state.equals, parameter[literal["D"]]]] begin[{] return[member[MODEL.DELETED]] else begin[{] if[call[state.equals, parameter[literal["I"]]]] begin[{] return[member[MODEL.INACTIVE]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unrecognized state: "), operandr=MemberReference(member=state, 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=ResourceIndexException, sub_type=None)), label=None) end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[protected] identifier[RDFName] identifier[getStateResource] operator[SEP] identifier[String] identifier[state] operator[SEP] Keyword[throws] identifier[ResourceIndexException] { Keyword[if] operator[SEP] identifier[state] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[ResourceIndexException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[MODEL] operator[SEP] identifier[ACTIVE] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[MODEL] operator[SEP] identifier[DELETED] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[MODEL] operator[SEP] identifier[INACTIVE] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[ResourceIndexException] operator[SEP] literal[String] operator[+] identifier[state] operator[SEP] operator[SEP] } }
@Override protected void paintComponent(Graphics g) { final Graphics2D G2 = (Graphics2D) g.create(); G2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); G2.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY); G2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE); G2.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON); // Translate the coordinate system related to insets G2.translate(getInnerBounds().x, getInnerBounds().y); // Draw combined background image G2.drawImage(bImage, 0, 0, null); // Draw LCD display if (isLcdVisible() && bImage != null) { // Draw lcd text if (getLcdColor() == LcdColor.CUSTOM) { G2.setColor(getCustomLcdForeground()); } else { G2.setColor(getLcdColor().TEXT_COLOR); } G2.setFont(getLcdUnitFont()); final double UNIT_STRING_WIDTH; if (isLcdUnitStringVisible() && !getLcdUnitString().isEmpty()) { unitLayout = new TextLayout(getLcdUnitString(), G2.getFont(), RENDER_CONTEXT); UNIT_BOUNDARY.setFrame(unitLayout.getBounds()); //G2.drawString(getLcdUnitString(), (int) ((LCD.getWidth() - UNIT_BOUNDARY.getWidth()) - LCD.getWidth() * 0.03 + (getGaugeBounds().width - LCD.getWidth()) / 2.0), (int) (LCD.getHeight() * 0.6 + (getGaugeBounds().height - LCD.getHeight()) / 2.0)); G2.drawString(getLcdUnitString(), (int) ((LCD.getWidth() - UNIT_BOUNDARY.getWidth()) - LCD.getWidth() * 0.03 + (getGaugeBounds().width - LCD.getWidth()) / 2.0), (int) (LCD.getHeight() * lcdTextYPositionFactor + getGaugeBounds().height * 0.425)); UNIT_STRING_WIDTH = UNIT_BOUNDARY.getWidth(); } else { UNIT_STRING_WIDTH = 0; } // Draw value G2.setFont(getLcdValueFont()); switch (getLcdNumberSystem()) { case HEX: valueLayout = new TextLayout(Integer.toHexString((int) getLcdValue()).toUpperCase(), G2.getFont(), RENDER_CONTEXT); VALUE_BOUNDARY.setFrame(valueLayout.getBounds()); G2.drawString(Integer.toHexString((int) getLcdValue()).toUpperCase(), (int) ((LCD.getWidth() - UNIT_STRING_WIDTH - VALUE_BOUNDARY.getWidth()) - LCD.getWidth() * 0.09 + ((getGaugeBounds().width - LCD.getWidth()) / 2.0)), (int) (LCD.getHeight() * lcdTextYPositionFactor + getGaugeBounds().height * 0.425)); break; case OCT: valueLayout = new TextLayout(Integer.toOctalString((int) getLcdValue()), G2.getFont(), RENDER_CONTEXT); VALUE_BOUNDARY.setFrame(valueLayout.getBounds()); G2.drawString(Integer.toOctalString((int) getLcdValue()), (int) ((LCD.getWidth() - UNIT_STRING_WIDTH - VALUE_BOUNDARY.getWidth()) - LCD.getWidth() * 0.09 + ((getGaugeBounds().width - LCD.getWidth()) / 2.0)), (int) (LCD.getHeight() * lcdTextYPositionFactor + getGaugeBounds().height * 0.425)); break; case DEC: default: valueLayout = new TextLayout(formatLcdValue(getLcdValue()), G2.getFont(), RENDER_CONTEXT); VALUE_BOUNDARY.setFrame(valueLayout.getBounds()); G2.drawString(formatLcdValue(getLcdValue()), (int) ((LCD.getWidth() - UNIT_STRING_WIDTH - VALUE_BOUNDARY.getWidth()) - LCD.getWidth() * 0.09 + ((getGaugeBounds().width - LCD.getWidth()) / 2.0)), (int) (LCD.getHeight() * lcdTextYPositionFactor + getGaugeBounds().height * 0.425)); break; } // Draw lcd info string if (!getLcdInfoString().isEmpty() && !displayMulti) { G2.setFont(getLcdInfoFont()); infoLayout = new TextLayout(getLcdInfoString(), G2.getFont(), RENDER_CONTEXT); INFO_BOUNDARY.setFrame(infoLayout.getBounds()); G2.drawString(getLcdInfoString(), LCD.getBounds().x + 5, LCD.getBounds().y + (float) INFO_BOUNDARY.getHeight() + 5f); } if (displayMulti) { // Draw oldValue G2.setFont(lcdFormerValueFont); oldValueLayout = new TextLayout(formatLcdValue(oldValue), G2.getFont(), RENDER_CONTEXT); OLD_VALUE_BOUNDARY.setFrame(oldValueLayout.getBounds()); //G2.drawString(formatLcdValue(oldValue), (int) ((LCD.getWidth() - OLD_VALUE_BOUNDARY.getWidth()) / 2.0 + (getGaugeBounds().width - LCD.getWidth()) / 2.0), (int) (LCD.getHeight() * 0.9 + (getGaugeBounds().height - LCD.getHeight()) / 2.0)); G2.drawString(formatLcdValue(oldValue), (int) ((LCD.getWidth() - OLD_VALUE_BOUNDARY.getWidth()) / 2.0 + (getGaugeBounds().width - LCD.getWidth()) / 2.0), (int) (LCD.getHeight() * 0.9 + getGaugeBounds().height * 0.425)); } // Draw lcd threshold indicator if (getLcdNumberSystem() == NumberSystem.DEC && isLcdThresholdVisible() && getLcdValue() >= getLcdThreshold()) { G2.drawImage(lcdThresholdImage, (int) (LCD.getX() + LCD.getHeight() * 0.0568181818), (int) (LCD.getY() + LCD.getHeight() - lcdThresholdImage.getHeight() - LCD.getHeight() * 0.0568181818), null); } } // Draw user LED if enabled if (isUserLedVisible()) { G2.drawImage(getCurrentUserLedImage(), (int) (getGaugeBounds().width * getUserLedPosition().getX()), (int) (getGaugeBounds().height * getUserLedPosition().getY()), null); } // Draw combined foreground image G2.drawImage(fImage, 0, 0, null); if (!isEnabled()) { G2.drawImage(disabledImage, 0, 0, null); } // Translate the coordinate system back to original G2.translate(-getInnerBounds().x, -getInnerBounds().y); G2.dispose(); }
class class_name[name] begin[{] method[paintComponent, return_type[void], modifier[protected], parameter[g]] begin[{] local_variable[type[Graphics2D], G2] call[G2.setRenderingHint, parameter[member[RenderingHints.KEY_ANTIALIASING], member[RenderingHints.VALUE_ANTIALIAS_ON]]] call[G2.setRenderingHint, parameter[member[RenderingHints.KEY_RENDERING], member[RenderingHints.VALUE_RENDER_QUALITY]]] call[G2.setRenderingHint, parameter[member[RenderingHints.KEY_STROKE_CONTROL], member[RenderingHints.VALUE_STROKE_NORMALIZE]]] call[G2.setRenderingHint, parameter[member[RenderingHints.KEY_TEXT_ANTIALIASING], member[RenderingHints.VALUE_TEXT_ANTIALIAS_ON]]] call[G2.translate, parameter[call[.getInnerBounds, parameter[]], call[.getInnerBounds, parameter[]]]] call[G2.drawImage, parameter[member[.bImage], literal[0], literal[0], literal[null]]] if[binary_operation[call[.isLcdVisible, parameter[]], &&, binary_operation[member[.bImage], !=, literal[null]]]] begin[{] if[binary_operation[call[.getLcdColor, parameter[]], ==, member[LcdColor.CUSTOM]]] begin[{] call[G2.setColor, parameter[call[.getCustomLcdForeground, parameter[]]]] else begin[{] call[G2.setColor, parameter[call[.getLcdColor, parameter[]]]] end[}] call[G2.setFont, parameter[call[.getLcdUnitFont, parameter[]]]] local_variable[type[double], UNIT_STRING_WIDTH] if[binary_operation[call[.isLcdUnitStringVisible, parameter[]], &&, call[.getLcdUnitString, parameter[]]]] begin[{] assign[member[.unitLayout], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getLcdUnitString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFont, postfix_operators=[], prefix_operators=[], qualifier=G2, selectors=[], type_arguments=None), MemberReference(member=RENDER_CONTEXT, 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=TextLayout, sub_type=None))] call[UNIT_BOUNDARY.setFrame, parameter[call[unitLayout.getBounds, parameter[]]]] call[G2.drawString, parameter[call[.getLcdUnitString, parameter[]], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=UNIT_BOUNDARY, selectors=[], type_arguments=None), operator=-), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.03), operator=*), operator=-), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=width, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/), operator=+), type=BasicType(dimensions=[], name=int)), Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=MemberReference(member=lcdTextYPositionFactor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=height, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.425), operator=*), operator=+), type=BasicType(dimensions=[], name=int))]] assign[member[.UNIT_STRING_WIDTH], call[UNIT_BOUNDARY.getWidth, parameter[]]] else begin[{] assign[member[.UNIT_STRING_WIDTH], literal[0]] end[}] call[G2.setFont, parameter[call[.getLcdValueFont, parameter[]]]] SwitchStatement(cases=[SwitchStatementCase(case=['HEX'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=valueLayout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getLcdValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))], member=toHexString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[MethodInvocation(arguments=[], member=toUpperCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MethodInvocation(arguments=[], member=getFont, postfix_operators=[], prefix_operators=[], qualifier=G2, selectors=[], type_arguments=None), MemberReference(member=RENDER_CONTEXT, 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=TextLayout, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBounds, postfix_operators=[], prefix_operators=[], qualifier=valueLayout, selectors=[], type_arguments=None)], member=setFrame, postfix_operators=[], prefix_operators=[], qualifier=VALUE_BOUNDARY, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getLcdValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))], member=toHexString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[MethodInvocation(arguments=[], member=toUpperCase, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=MemberReference(member=UNIT_STRING_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=VALUE_BOUNDARY, selectors=[], type_arguments=None), operator=-), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.09), operator=*), operator=-), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=width, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/), operator=+), type=BasicType(dimensions=[], name=int)), Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=MemberReference(member=lcdTextYPositionFactor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=height, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.425), operator=*), operator=+), type=BasicType(dimensions=[], name=int))], member=drawString, postfix_operators=[], prefix_operators=[], qualifier=G2, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['OCT'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=valueLayout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getLcdValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))], member=toOctalString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFont, postfix_operators=[], prefix_operators=[], qualifier=G2, selectors=[], type_arguments=None), MemberReference(member=RENDER_CONTEXT, 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=TextLayout, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBounds, postfix_operators=[], prefix_operators=[], qualifier=valueLayout, selectors=[], type_arguments=None)], member=setFrame, postfix_operators=[], prefix_operators=[], qualifier=VALUE_BOUNDARY, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getLcdValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int))], member=toOctalString, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[], type_arguments=None), Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=MemberReference(member=UNIT_STRING_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=VALUE_BOUNDARY, selectors=[], type_arguments=None), operator=-), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.09), operator=*), operator=-), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=width, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/), operator=+), type=BasicType(dimensions=[], name=int)), Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=MemberReference(member=lcdTextYPositionFactor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=height, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.425), operator=*), operator=+), type=BasicType(dimensions=[], name=int))], member=drawString, postfix_operators=[], prefix_operators=[], qualifier=G2, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=['DEC'], statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=valueLayout, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLcdValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=formatLcdValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFont, postfix_operators=[], prefix_operators=[], qualifier=G2, selectors=[], type_arguments=None), MemberReference(member=RENDER_CONTEXT, 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=TextLayout, sub_type=None))), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBounds, postfix_operators=[], prefix_operators=[], qualifier=valueLayout, selectors=[], type_arguments=None)], member=setFrame, postfix_operators=[], prefix_operators=[], qualifier=VALUE_BOUNDARY, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLcdValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=formatLcdValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=MemberReference(member=UNIT_STRING_WIDTH, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=VALUE_BOUNDARY, selectors=[], type_arguments=None), operator=-), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.09), operator=*), operator=-), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=width, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/), operator=+), type=BasicType(dimensions=[], name=int)), Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=MemberReference(member=lcdTextYPositionFactor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=height, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.425), operator=*), operator=+), type=BasicType(dimensions=[], name=int))], member=drawString, postfix_operators=[], prefix_operators=[], qualifier=G2, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)])], expression=MethodInvocation(arguments=[], member=getLcdNumberSystem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None) if[binary_operation[call[.getLcdInfoString, parameter[]], &&, member[.displayMulti]]] begin[{] call[G2.setFont, parameter[call[.getLcdInfoFont, parameter[]]]] assign[member[.infoLayout], ClassCreator(arguments=[MethodInvocation(arguments=[], member=getLcdInfoString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFont, postfix_operators=[], prefix_operators=[], qualifier=G2, selectors=[], type_arguments=None), MemberReference(member=RENDER_CONTEXT, 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=TextLayout, sub_type=None))] call[INFO_BOUNDARY.setFrame, parameter[call[infoLayout.getBounds, parameter[]]]] call[G2.drawString, parameter[call[.getLcdInfoString, parameter[]], binary_operation[call[LCD.getBounds, parameter[]], +, literal[5]], binary_operation[binary_operation[call[LCD.getBounds, parameter[]], +, Cast(expression=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=INFO_BOUNDARY, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float))], +, literal[5f]]]] else begin[{] None end[}] if[member[.displayMulti]] begin[{] call[G2.setFont, parameter[member[.lcdFormerValueFont]]] assign[member[.oldValueLayout], ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=oldValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=formatLcdValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getFont, postfix_operators=[], prefix_operators=[], qualifier=G2, selectors=[], type_arguments=None), MemberReference(member=RENDER_CONTEXT, 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=TextLayout, sub_type=None))] call[OLD_VALUE_BOUNDARY.setFrame, parameter[call[oldValueLayout.getBounds, parameter[]]]] call[G2.drawString, parameter[call[.formatLcdValue, parameter[member[.oldValue]]], Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=OLD_VALUE_BOUNDARY, selectors=[], type_arguments=None), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=width, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getWidth, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operator=/), operator=+), type=BasicType(dimensions=[], name=int)), Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.9), operator=*), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=height, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.425), operator=*), operator=+), type=BasicType(dimensions=[], name=int))]] else begin[{] None end[}] if[binary_operation[binary_operation[binary_operation[call[.getLcdNumberSystem, parameter[]], ==, member[NumberSystem.DEC]], &&, call[.isLcdThresholdVisible, parameter[]]], &&, binary_operation[call[.getLcdValue, parameter[]], >=, call[.getLcdThreshold, parameter[]]]]] begin[{] call[G2.drawImage, parameter[member[.lcdThresholdImage], Cast(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getX, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0568181818), operator=*), operator=+), type=BasicType(dimensions=[], name=int)), Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getY, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operator=+), operandr=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=lcdThresholdImage, selectors=[], type_arguments=None), operator=-), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getHeight, postfix_operators=[], prefix_operators=[], qualifier=LCD, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.0568181818), operator=*), operator=-), type=BasicType(dimensions=[], name=int)), literal[null]]] else begin[{] None end[}] else begin[{] None end[}] if[call[.isUserLedVisible, parameter[]]] begin[{] call[G2.drawImage, parameter[call[.getCurrentUserLedImage, parameter[]], Cast(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=width, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getUserLedPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getX, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=*), type=BasicType(dimensions=[], name=int)), Cast(expression=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getGaugeBounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=height, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getUserLedPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getY, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=*), type=BasicType(dimensions=[], name=int)), literal[null]]] else begin[{] None end[}] call[G2.drawImage, parameter[member[.fImage], literal[0], literal[0], literal[null]]] if[call[.isEnabled, parameter[]]] begin[{] call[G2.drawImage, parameter[member[.disabledImage], literal[0], literal[0], literal[null]]] else begin[{] None end[}] call[G2.translate, parameter[call[.getInnerBounds, parameter[]], call[.getInnerBounds, parameter[]]]] call[G2.dispose, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[paintComponent] operator[SEP] identifier[Graphics] identifier[g] operator[SEP] { Keyword[final] identifier[Graphics2D] identifier[G2] operator[=] operator[SEP] identifier[Graphics2D] operator[SEP] identifier[g] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[setRenderingHint] operator[SEP] identifier[RenderingHints] operator[SEP] identifier[KEY_ANTIALIASING] , identifier[RenderingHints] operator[SEP] identifier[VALUE_ANTIALIAS_ON] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[setRenderingHint] operator[SEP] identifier[RenderingHints] operator[SEP] identifier[KEY_RENDERING] , identifier[RenderingHints] operator[SEP] identifier[VALUE_RENDER_QUALITY] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[setRenderingHint] operator[SEP] identifier[RenderingHints] operator[SEP] identifier[KEY_STROKE_CONTROL] , identifier[RenderingHints] operator[SEP] identifier[VALUE_STROKE_NORMALIZE] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[setRenderingHint] operator[SEP] identifier[RenderingHints] operator[SEP] identifier[KEY_TEXT_ANTIALIASING] , identifier[RenderingHints] operator[SEP] identifier[VALUE_TEXT_ANTIALIAS_ON] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[translate] operator[SEP] identifier[getInnerBounds] operator[SEP] operator[SEP] operator[SEP] identifier[x] , identifier[getInnerBounds] operator[SEP] operator[SEP] operator[SEP] identifier[y] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[drawImage] operator[SEP] identifier[bImage] , Other[0] , Other[0] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isLcdVisible] operator[SEP] operator[SEP] operator[&&] identifier[bImage] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[getLcdColor] operator[SEP] operator[SEP] operator[==] identifier[LcdColor] operator[SEP] identifier[CUSTOM] operator[SEP] { identifier[G2] operator[SEP] identifier[setColor] operator[SEP] identifier[getCustomLcdForeground] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[G2] operator[SEP] identifier[setColor] operator[SEP] identifier[getLcdColor] operator[SEP] operator[SEP] operator[SEP] identifier[TEXT_COLOR] operator[SEP] operator[SEP] } identifier[G2] operator[SEP] identifier[setFont] operator[SEP] identifier[getLcdUnitFont] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[double] identifier[UNIT_STRING_WIDTH] operator[SEP] Keyword[if] operator[SEP] identifier[isLcdUnitStringVisible] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[getLcdUnitString] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[unitLayout] operator[=] Keyword[new] identifier[TextLayout] operator[SEP] identifier[getLcdUnitString] operator[SEP] operator[SEP] , identifier[G2] operator[SEP] identifier[getFont] operator[SEP] operator[SEP] , identifier[RENDER_CONTEXT] operator[SEP] operator[SEP] identifier[UNIT_BOUNDARY] operator[SEP] identifier[setFrame] operator[SEP] identifier[unitLayout] operator[SEP] identifier[getBounds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[drawString] operator[SEP] identifier[getLcdUnitString] operator[SEP] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[-] identifier[UNIT_BOUNDARY] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[-] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[*] literal[Float] operator[+] operator[SEP] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[width] operator[-] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[/] literal[Float] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[*] identifier[lcdTextYPositionFactor] operator[+] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[height] operator[*] literal[Float] operator[SEP] operator[SEP] operator[SEP] identifier[UNIT_STRING_WIDTH] operator[=] identifier[UNIT_BOUNDARY] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[UNIT_STRING_WIDTH] operator[=] Other[0] operator[SEP] } identifier[G2] operator[SEP] identifier[setFont] operator[SEP] identifier[getLcdValueFont] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[getLcdNumberSystem] operator[SEP] operator[SEP] operator[SEP] { Keyword[case] identifier[HEX] operator[:] identifier[valueLayout] operator[=] Keyword[new] identifier[TextLayout] operator[SEP] identifier[Integer] operator[SEP] identifier[toHexString] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[getLcdValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] , identifier[G2] operator[SEP] identifier[getFont] operator[SEP] operator[SEP] , identifier[RENDER_CONTEXT] operator[SEP] operator[SEP] identifier[VALUE_BOUNDARY] operator[SEP] identifier[setFrame] operator[SEP] identifier[valueLayout] operator[SEP] identifier[getBounds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[drawString] operator[SEP] identifier[Integer] operator[SEP] identifier[toHexString] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[getLcdValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[toUpperCase] operator[SEP] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[-] identifier[UNIT_STRING_WIDTH] operator[-] identifier[VALUE_BOUNDARY] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[-] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[*] literal[Float] operator[+] operator[SEP] operator[SEP] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[width] operator[-] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[/] literal[Float] operator[SEP] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[*] identifier[lcdTextYPositionFactor] operator[+] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[height] operator[*] literal[Float] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[OCT] operator[:] identifier[valueLayout] operator[=] Keyword[new] identifier[TextLayout] operator[SEP] identifier[Integer] operator[SEP] identifier[toOctalString] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[getLcdValue] operator[SEP] operator[SEP] operator[SEP] , identifier[G2] operator[SEP] identifier[getFont] operator[SEP] operator[SEP] , identifier[RENDER_CONTEXT] operator[SEP] operator[SEP] identifier[VALUE_BOUNDARY] operator[SEP] identifier[setFrame] operator[SEP] identifier[valueLayout] operator[SEP] identifier[getBounds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[drawString] operator[SEP] identifier[Integer] operator[SEP] identifier[toOctalString] operator[SEP] operator[SEP] Keyword[int] operator[SEP] identifier[getLcdValue] operator[SEP] operator[SEP] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[-] identifier[UNIT_STRING_WIDTH] operator[-] identifier[VALUE_BOUNDARY] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[-] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[*] literal[Float] operator[+] operator[SEP] operator[SEP] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[width] operator[-] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[/] literal[Float] operator[SEP] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[*] identifier[lcdTextYPositionFactor] operator[+] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[height] operator[*] literal[Float] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[case] identifier[DEC] operator[:] Keyword[default] operator[:] identifier[valueLayout] operator[=] Keyword[new] identifier[TextLayout] operator[SEP] identifier[formatLcdValue] operator[SEP] identifier[getLcdValue] operator[SEP] operator[SEP] operator[SEP] , identifier[G2] operator[SEP] identifier[getFont] operator[SEP] operator[SEP] , identifier[RENDER_CONTEXT] operator[SEP] operator[SEP] identifier[VALUE_BOUNDARY] operator[SEP] identifier[setFrame] operator[SEP] identifier[valueLayout] operator[SEP] identifier[getBounds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[drawString] operator[SEP] identifier[formatLcdValue] operator[SEP] identifier[getLcdValue] operator[SEP] operator[SEP] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[-] identifier[UNIT_STRING_WIDTH] operator[-] identifier[VALUE_BOUNDARY] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[-] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[*] literal[Float] operator[+] operator[SEP] operator[SEP] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[width] operator[-] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[/] literal[Float] operator[SEP] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[*] identifier[lcdTextYPositionFactor] operator[+] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[height] operator[*] literal[Float] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[getLcdInfoString] operator[SEP] operator[SEP] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[displayMulti] operator[SEP] { identifier[G2] operator[SEP] identifier[setFont] operator[SEP] identifier[getLcdInfoFont] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[infoLayout] operator[=] Keyword[new] identifier[TextLayout] operator[SEP] identifier[getLcdInfoString] operator[SEP] operator[SEP] , identifier[G2] operator[SEP] identifier[getFont] operator[SEP] operator[SEP] , identifier[RENDER_CONTEXT] operator[SEP] operator[SEP] identifier[INFO_BOUNDARY] operator[SEP] identifier[setFrame] operator[SEP] identifier[infoLayout] operator[SEP] identifier[getBounds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[drawString] operator[SEP] identifier[getLcdInfoString] operator[SEP] operator[SEP] , identifier[LCD] operator[SEP] identifier[getBounds] operator[SEP] operator[SEP] operator[SEP] identifier[x] operator[+] Other[5] , identifier[LCD] operator[SEP] identifier[getBounds] operator[SEP] operator[SEP] operator[SEP] identifier[y] operator[+] operator[SEP] Keyword[float] operator[SEP] identifier[INFO_BOUNDARY] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[+] literal[Float] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[displayMulti] operator[SEP] { identifier[G2] operator[SEP] identifier[setFont] operator[SEP] identifier[lcdFormerValueFont] operator[SEP] operator[SEP] identifier[oldValueLayout] operator[=] Keyword[new] identifier[TextLayout] operator[SEP] identifier[formatLcdValue] operator[SEP] identifier[oldValue] operator[SEP] , identifier[G2] operator[SEP] identifier[getFont] operator[SEP] operator[SEP] , identifier[RENDER_CONTEXT] operator[SEP] operator[SEP] identifier[OLD_VALUE_BOUNDARY] operator[SEP] identifier[setFrame] operator[SEP] identifier[oldValueLayout] operator[SEP] identifier[getBounds] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[drawString] operator[SEP] identifier[formatLcdValue] operator[SEP] identifier[oldValue] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[-] identifier[OLD_VALUE_BOUNDARY] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[/] literal[Float] operator[+] operator[SEP] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[width] operator[-] identifier[LCD] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] operator[/] literal[Float] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[*] literal[Float] operator[+] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[height] operator[*] literal[Float] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[getLcdNumberSystem] operator[SEP] operator[SEP] operator[==] identifier[NumberSystem] operator[SEP] identifier[DEC] operator[&&] identifier[isLcdThresholdVisible] operator[SEP] operator[SEP] operator[&&] identifier[getLcdValue] operator[SEP] operator[SEP] operator[>=] identifier[getLcdThreshold] operator[SEP] operator[SEP] operator[SEP] { identifier[G2] operator[SEP] identifier[drawImage] operator[SEP] identifier[lcdThresholdImage] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[+] identifier[LCD] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[*] literal[Float] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[LCD] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[+] identifier[LCD] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[-] identifier[lcdThresholdImage] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[-] identifier[LCD] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[*] literal[Float] operator[SEP] , Other[null] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[isUserLedVisible] operator[SEP] operator[SEP] operator[SEP] { identifier[G2] operator[SEP] identifier[drawImage] operator[SEP] identifier[getCurrentUserLedImage] operator[SEP] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[width] operator[*] identifier[getUserLedPosition] operator[SEP] operator[SEP] operator[SEP] identifier[getX] operator[SEP] operator[SEP] operator[SEP] , operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[getGaugeBounds] operator[SEP] operator[SEP] operator[SEP] identifier[height] operator[*] identifier[getUserLedPosition] operator[SEP] operator[SEP] operator[SEP] identifier[getY] operator[SEP] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] } identifier[G2] operator[SEP] identifier[drawImage] operator[SEP] identifier[fImage] , Other[0] , Other[0] , Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[G2] operator[SEP] identifier[drawImage] operator[SEP] identifier[disabledImage] , Other[0] , Other[0] , Other[null] operator[SEP] operator[SEP] } identifier[G2] operator[SEP] identifier[translate] operator[SEP] operator[-] identifier[getInnerBounds] operator[SEP] operator[SEP] operator[SEP] identifier[x] , operator[-] identifier[getInnerBounds] operator[SEP] operator[SEP] operator[SEP] identifier[y] operator[SEP] operator[SEP] identifier[G2] operator[SEP] identifier[dispose] operator[SEP] operator[SEP] operator[SEP] }
public String consoleLogFormat(LogRecord logRecord, String txt) { StringBuilder sb = new StringBuilder(256); sb.append(BaseTraceFormatter.levelToString(logRecord.getLevel())); sb.append(txt); Throwable t = logRecord.getThrown(); if (t != null) { String s = t.getLocalizedMessage(); if (s == null) s = t.toString(); sb.append(LoggingConstants.nl).append(s); } return sb.toString(); }
class class_name[name] begin[{] method[consoleLogFormat, return_type[type[String]], modifier[public], parameter[logRecord, txt]] begin[{] local_variable[type[StringBuilder], sb] call[sb.append, parameter[call[BaseTraceFormatter.levelToString, parameter[call[logRecord.getLevel, parameter[]]]]]] call[sb.append, parameter[member[.txt]]] local_variable[type[Throwable], t] if[binary_operation[member[.t], !=, literal[null]]] begin[{] local_variable[type[String], s] if[binary_operation[member[.s], ==, literal[null]]] begin[{] assign[member[.s], call[t.toString, parameter[]]] else begin[{] None end[}] call[sb.append, parameter[member[LoggingConstants.nl]]] else begin[{] None end[}] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] identifier[String] identifier[consoleLogFormat] operator[SEP] identifier[LogRecord] identifier[logRecord] , identifier[String] identifier[txt] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[256] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[BaseTraceFormatter] operator[SEP] identifier[levelToString] operator[SEP] identifier[logRecord] operator[SEP] identifier[getLevel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[txt] operator[SEP] operator[SEP] identifier[Throwable] identifier[t] operator[=] identifier[logRecord] operator[SEP] identifier[getThrown] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[t] operator[!=] Other[null] operator[SEP] { identifier[String] identifier[s] operator[=] identifier[t] operator[SEP] identifier[getLocalizedMessage] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[s] operator[==] Other[null] operator[SEP] identifier[s] operator[=] identifier[t] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[LoggingConstants] operator[SEP] identifier[nl] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[s] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void doSuggestOpenSearch(StaplerRequest req, StaplerResponse rsp, @QueryParameter String q) throws IOException, ServletException { rsp.setContentType(Flavor.JSON.contentType); DataWriter w = Flavor.JSON.createDataWriter(null, rsp); w.startArray(); w.value(q); w.startArray(); for (SuggestedItem item : getSuggestions(req, q)) w.value(item.getPath()); w.endArray(); w.endArray(); }
class class_name[name] begin[{] method[doSuggestOpenSearch, return_type[void], modifier[public], parameter[req, rsp, q]] begin[{] call[rsp.setContentType, parameter[member[Flavor.JSON.contentType]]] local_variable[type[DataWriter], w] call[w.startArray, parameter[]] call[w.value, parameter[member[.q]]] call[w.startArray, parameter[]] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPath, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None)], member=value, postfix_operators=[], prefix_operators=[], qualifier=w, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=req, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=q, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSuggestions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SuggestedItem, sub_type=None))), label=None) call[w.endArray, parameter[]] call[w.endArray, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[doSuggestOpenSearch] operator[SEP] identifier[StaplerRequest] identifier[req] , identifier[StaplerResponse] identifier[rsp] , annotation[@] identifier[QueryParameter] identifier[String] identifier[q] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] { identifier[rsp] operator[SEP] identifier[setContentType] operator[SEP] identifier[Flavor] operator[SEP] identifier[JSON] operator[SEP] identifier[contentType] operator[SEP] operator[SEP] identifier[DataWriter] identifier[w] operator[=] identifier[Flavor] operator[SEP] identifier[JSON] operator[SEP] identifier[createDataWriter] operator[SEP] Other[null] , identifier[rsp] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[startArray] operator[SEP] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[value] operator[SEP] identifier[q] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[startArray] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[SuggestedItem] identifier[item] operator[:] identifier[getSuggestions] operator[SEP] identifier[req] , identifier[q] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[value] operator[SEP] identifier[item] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[endArray] operator[SEP] operator[SEP] operator[SEP] identifier[w] operator[SEP] identifier[endArray] operator[SEP] operator[SEP] operator[SEP] }
protected double[] aggregateInternal(double[][] descriptors) { double[] vlad = new double[numCentroids * descriptorLength]; // when there are 0 local descriptors extracted if (descriptors.length == 0) { return vlad; } for (double[] descriptor : descriptors) { int nnIndex = computeNearestCentroid(descriptor); for (int i = 0; i < descriptorLength; i++) { vlad[nnIndex * descriptorLength + i] += descriptor[i] - codebook[nnIndex][i]; } } return vlad; }
class class_name[name] begin[{] method[aggregateInternal, return_type[type[double]], modifier[protected], parameter[descriptors]] begin[{] local_variable[type[double], vlad] if[binary_operation[member[descriptors.length], ==, literal[0]]] begin[{] return[member[.vlad]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=descriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=computeNearestCentroid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=nnIndex)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=vlad, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=nnIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=descriptorLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+))]), type=+=, value=BinaryOperation(operandl=MemberReference(member=descriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=codebook, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=nnIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=-)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=descriptorLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=descriptors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=descriptor)], modifiers=set(), type=BasicType(dimensions=[None], name=double))), label=None) return[member[.vlad]] end[}] END[}]
Keyword[protected] Keyword[double] operator[SEP] operator[SEP] identifier[aggregateInternal] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[descriptors] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] identifier[vlad] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[numCentroids] operator[*] identifier[descriptorLength] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[descriptors] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[vlad] operator[SEP] } Keyword[for] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[descriptor] operator[:] identifier[descriptors] operator[SEP] { Keyword[int] identifier[nnIndex] operator[=] identifier[computeNearestCentroid] operator[SEP] identifier[descriptor] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[descriptorLength] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[vlad] operator[SEP] identifier[nnIndex] operator[*] identifier[descriptorLength] operator[+] identifier[i] operator[SEP] operator[+=] identifier[descriptor] operator[SEP] identifier[i] operator[SEP] operator[-] identifier[codebook] operator[SEP] identifier[nnIndex] operator[SEP] operator[SEP] identifier[i] operator[SEP] operator[SEP] } } Keyword[return] identifier[vlad] operator[SEP] }
private void parseClassList() { try { int classInfoLength = ByteUtils.byteToInt(this.value, this.count - classInfoByteLength, classInfoByteLength); this.index = this.count - classInfoLength - classInfoByteLength; this.dataEnd = this.index; int end = this.count - classInfoByteLength; classList = new ArrayList<Class<?>>(); String className = null; byte b; while (this.index < end) { b = this.value[this.index++]; if (b == XsonConst.CLASS_DES) { className = getString(); classList.add(XsonTypeUtils.findClass(className)); } else if (b == XsonConst.CLASS_REF) { className = getString(); Class<?> customType = XsonSupport.getCustomAgreementType(className); if (null == customType) { throw new XsonDeserializerException("Unknown user-defined types key : " + className); } classList.add(customType); } else { throw new XsonDeserializerException("Illegal class identity : " + (b & 0xFF)); } } } catch (Throwable e) { throw new XsonDeserializerException(e); } }
class class_name[name] begin[{] method[parseClassList, return_type[void], modifier[private], parameter[]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=value, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=count, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=classInfoByteLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), MemberReference(member=classInfoByteLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=byteToInt, postfix_operators=[], prefix_operators=[], qualifier=ByteUtils, selectors=[], type_arguments=None), name=classInfoLength)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=index, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=count, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=classInfoLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=MemberReference(member=classInfoByteLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-)), label=None), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=dataEnd, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=index, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=count, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=classInfoByteLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), name=end)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=classList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=className)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=b)], modifiers=set(), type=BasicType(dimensions=[], name=byte)), WhileStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=value, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), ArraySelector(index=This(postfix_operators=['++'], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=index, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]))])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=CLASS_DES, postfix_operators=[], prefix_operators=[], qualifier=XsonConst, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=CLASS_REF, postfix_operators=[], prefix_operators=[], qualifier=XsonConst, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal class identity : "), operandr=BinaryOperation(operandl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XsonDeserializerException, sub_type=None)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCustomAgreementType, postfix_operators=[], prefix_operators=[], qualifier=XsonSupport, selectors=[], type_arguments=None), name=customType)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=customType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown user-defined types key : "), operandr=MemberReference(member=className, 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=XsonDeserializerException, sub_type=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=customType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=classList, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findClass, postfix_operators=[], prefix_operators=[], qualifier=XsonTypeUtils, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=classList, selectors=[], type_arguments=None), label=None)]))]), condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=index, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operandr=MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), 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=XsonDeserializerException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[parseClassList] operator[SEP] operator[SEP] { Keyword[try] { Keyword[int] identifier[classInfoLength] operator[=] identifier[ByteUtils] operator[SEP] identifier[byteToInt] operator[SEP] Keyword[this] operator[SEP] identifier[value] , Keyword[this] operator[SEP] identifier[count] operator[-] identifier[classInfoByteLength] , identifier[classInfoByteLength] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[index] operator[=] Keyword[this] operator[SEP] identifier[count] operator[-] identifier[classInfoLength] operator[-] identifier[classInfoByteLength] operator[SEP] Keyword[this] operator[SEP] identifier[dataEnd] operator[=] Keyword[this] operator[SEP] identifier[index] operator[SEP] Keyword[int] identifier[end] operator[=] Keyword[this] operator[SEP] identifier[count] operator[-] identifier[classInfoByteLength] operator[SEP] identifier[classList] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[className] operator[=] Other[null] operator[SEP] Keyword[byte] identifier[b] operator[SEP] Keyword[while] operator[SEP] Keyword[this] operator[SEP] identifier[index] operator[<] identifier[end] operator[SEP] { identifier[b] operator[=] Keyword[this] operator[SEP] identifier[value] operator[SEP] Keyword[this] operator[SEP] identifier[index] operator[++] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[b] operator[==] identifier[XsonConst] operator[SEP] identifier[CLASS_DES] operator[SEP] { identifier[className] operator[=] identifier[getString] operator[SEP] operator[SEP] operator[SEP] identifier[classList] operator[SEP] identifier[add] operator[SEP] identifier[XsonTypeUtils] operator[SEP] identifier[findClass] operator[SEP] identifier[className] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[b] operator[==] identifier[XsonConst] operator[SEP] identifier[CLASS_REF] operator[SEP] { identifier[className] operator[=] identifier[getString] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[customType] operator[=] identifier[XsonSupport] operator[SEP] identifier[getCustomAgreementType] operator[SEP] identifier[className] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[customType] operator[SEP] { Keyword[throw] Keyword[new] identifier[XsonDeserializerException] operator[SEP] literal[String] operator[+] identifier[className] operator[SEP] operator[SEP] } identifier[classList] operator[SEP] identifier[add] operator[SEP] identifier[customType] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[XsonDeserializerException] operator[SEP] literal[String] operator[+] operator[SEP] identifier[b] operator[&] literal[Integer] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[XsonDeserializerException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public Guid append(Guid... guids) throws IOException { if (guids == null || guids.length == 0) { return this; } return combine(ArrayUtils.add(guids, this)); }
class class_name[name] begin[{] method[append, return_type[type[Guid]], modifier[public], parameter[guids]] begin[{] if[binary_operation[binary_operation[member[.guids], ==, literal[null]], ||, binary_operation[member[guids.length], ==, literal[0]]]] begin[{] return[THIS[]] else begin[{] None end[}] return[call[.combine, parameter[call[ArrayUtils.add, parameter[member[.guids], THIS[]]]]]] end[}] END[}]
Keyword[public] identifier[Guid] identifier[append] operator[SEP] identifier[Guid] operator[...] identifier[guids] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[guids] operator[==] Other[null] operator[||] identifier[guids] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } Keyword[return] identifier[combine] operator[SEP] identifier[ArrayUtils] operator[SEP] identifier[add] operator[SEP] identifier[guids] , Keyword[this] operator[SEP] operator[SEP] operator[SEP] }
public SQLException exceptionWithQuery(ParameterHolder[] parameters, SQLException sqlEx, PrepareResult serverPrepareResult) { if (sqlEx.getCause() instanceof SocketTimeoutException) { return new SQLException("Connection timed out", CONNECTION_EXCEPTION.getSqlState(), sqlEx); } if (options.dumpQueriesOnException) { return new SQLException(exWithQuery(sqlEx.getMessage(), serverPrepareResult, parameters), sqlEx.getSQLState(), sqlEx.getErrorCode(), sqlEx.getCause()); } return sqlEx; }
class class_name[name] begin[{] method[exceptionWithQuery, return_type[type[SQLException]], modifier[public], parameter[parameters, sqlEx, serverPrepareResult]] begin[{] if[binary_operation[call[sqlEx.getCause, parameter[]], instanceof, type[SocketTimeoutException]]] begin[{] return[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Connection timed out"), MethodInvocation(arguments=[], member=getSqlState, postfix_operators=[], prefix_operators=[], qualifier=CONNECTION_EXCEPTION, selectors=[], type_arguments=None), MemberReference(member=sqlEx, 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=SQLException, sub_type=None))] else begin[{] None end[}] if[member[options.dumpQueriesOnException]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=sqlEx, selectors=[], type_arguments=None), MemberReference(member=serverPrepareResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exWithQuery, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getSQLState, postfix_operators=[], prefix_operators=[], qualifier=sqlEx, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getErrorCode, postfix_operators=[], prefix_operators=[], qualifier=sqlEx, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=sqlEx, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SQLException, sub_type=None))] else begin[{] None end[}] return[member[.sqlEx]] end[}] END[}]
Keyword[public] identifier[SQLException] identifier[exceptionWithQuery] operator[SEP] identifier[ParameterHolder] operator[SEP] operator[SEP] identifier[parameters] , identifier[SQLException] identifier[sqlEx] , identifier[PrepareResult] identifier[serverPrepareResult] operator[SEP] { Keyword[if] operator[SEP] identifier[sqlEx] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] Keyword[instanceof] identifier[SocketTimeoutException] operator[SEP] { Keyword[return] Keyword[new] identifier[SQLException] operator[SEP] literal[String] , identifier[CONNECTION_EXCEPTION] operator[SEP] identifier[getSqlState] operator[SEP] operator[SEP] , identifier[sqlEx] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[options] operator[SEP] identifier[dumpQueriesOnException] operator[SEP] { Keyword[return] Keyword[new] identifier[SQLException] operator[SEP] identifier[exWithQuery] operator[SEP] identifier[sqlEx] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[serverPrepareResult] , identifier[parameters] operator[SEP] , identifier[sqlEx] operator[SEP] identifier[getSQLState] operator[SEP] operator[SEP] , identifier[sqlEx] operator[SEP] identifier[getErrorCode] operator[SEP] operator[SEP] , identifier[sqlEx] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[sqlEx] operator[SEP] }
private void setMessagingEngineUuid(SIBUuid8 uuid) { if (tc.isEntryEnabled()) SibTr.entry(tc, "setMessagingEngineUuid", new Object[] { uuid }); messagingEngineUuid = uuid; if (tc.isEntryEnabled()) SibTr.exit(tc, "setMessagingEngineUuid"); }
class class_name[name] begin[{] method[setMessagingEngineUuid, return_type[void], modifier[private], parameter[uuid]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["setMessagingEngineUuid"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=uuid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] assign[member[.messagingEngineUuid], member[.uuid]] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["setMessagingEngineUuid"]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[setMessagingEngineUuid] operator[SEP] identifier[SIBUuid8] identifier[uuid] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[uuid] } operator[SEP] operator[SEP] identifier[messagingEngineUuid] operator[=] identifier[uuid] operator[SEP] Keyword[if] operator[SEP] 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] }
@Override public void createPartControl(Composite parent) { Tree main = new Tree(parent, SWT.SINGLE | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL); main.setHeaderVisible(true); main.setLinesVisible(false); main.setLayoutData(new GridData(GridData.FILL_BOTH)); TreeColumn serverCol = new TreeColumn(main, SWT.SINGLE); serverCol.setText("Location"); serverCol.setWidth(300); serverCol.setResizable(true); TreeColumn locationCol = new TreeColumn(main, SWT.SINGLE); locationCol.setText("Master node"); locationCol.setWidth(185); locationCol.setResizable(true); TreeColumn stateCol = new TreeColumn(main, SWT.SINGLE); stateCol.setText("State"); stateCol.setWidth(95); stateCol.setResizable(true); TreeColumn statusCol = new TreeColumn(main, SWT.SINGLE); statusCol.setText("Status"); statusCol.setWidth(300); statusCol.setResizable(true); viewer = new TreeViewer(main); viewer.setContentProvider(this); viewer.setLabelProvider(this); viewer.setInput(CONTENT_ROOT); // don't care getViewSite().setSelectionProvider(viewer); getViewSite().getActionBars().setGlobalActionHandler( ActionFactory.DELETE.getId(), deleteAction); getViewSite().getActionBars().getToolBarManager().add(editServerAction); getViewSite().getActionBars().getToolBarManager().add(newLocationAction); createActions(); createContextMenu(); }
class class_name[name] begin[{] method[createPartControl, return_type[void], modifier[public], parameter[parent]] begin[{] local_variable[type[Tree], main] call[main.setHeaderVisible, parameter[literal[true]]] call[main.setLinesVisible, parameter[literal[false]]] call[main.setLayoutData, parameter[ClassCreator(arguments=[MemberReference(member=FILL_BOTH, postfix_operators=[], prefix_operators=[], qualifier=GridData, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridData, sub_type=None))]] local_variable[type[TreeColumn], serverCol] call[serverCol.setText, parameter[literal["Location"]]] call[serverCol.setWidth, parameter[literal[300]]] call[serverCol.setResizable, parameter[literal[true]]] local_variable[type[TreeColumn], locationCol] call[locationCol.setText, parameter[literal["Master node"]]] call[locationCol.setWidth, parameter[literal[185]]] call[locationCol.setResizable, parameter[literal[true]]] local_variable[type[TreeColumn], stateCol] call[stateCol.setText, parameter[literal["State"]]] call[stateCol.setWidth, parameter[literal[95]]] call[stateCol.setResizable, parameter[literal[true]]] local_variable[type[TreeColumn], statusCol] call[statusCol.setText, parameter[literal["Status"]]] call[statusCol.setWidth, parameter[literal[300]]] call[statusCol.setResizable, parameter[literal[true]]] assign[member[.viewer], ClassCreator(arguments=[MemberReference(member=main, 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=TreeViewer, sub_type=None))] call[viewer.setContentProvider, parameter[THIS[]]] call[viewer.setLabelProvider, parameter[THIS[]]] call[viewer.setInput, parameter[member[.CONTENT_ROOT]]] call[.getViewSite, parameter[]] call[.getViewSite, parameter[]] call[.getViewSite, parameter[]] call[.getViewSite, parameter[]] call[.createActions, parameter[]] call[.createContextMenu, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[createPartControl] operator[SEP] identifier[Composite] identifier[parent] operator[SEP] { identifier[Tree] identifier[main] operator[=] Keyword[new] identifier[Tree] operator[SEP] identifier[parent] , identifier[SWT] operator[SEP] identifier[SINGLE] operator[|] identifier[SWT] operator[SEP] identifier[FULL_SELECTION] operator[|] identifier[SWT] operator[SEP] identifier[H_SCROLL] operator[|] identifier[SWT] operator[SEP] identifier[V_SCROLL] operator[SEP] operator[SEP] identifier[main] operator[SEP] identifier[setHeaderVisible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[main] operator[SEP] identifier[setLinesVisible] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[main] operator[SEP] identifier[setLayoutData] operator[SEP] Keyword[new] identifier[GridData] operator[SEP] identifier[GridData] operator[SEP] identifier[FILL_BOTH] operator[SEP] operator[SEP] operator[SEP] identifier[TreeColumn] identifier[serverCol] operator[=] Keyword[new] identifier[TreeColumn] operator[SEP] identifier[main] , identifier[SWT] operator[SEP] identifier[SINGLE] operator[SEP] operator[SEP] identifier[serverCol] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[serverCol] operator[SEP] identifier[setWidth] operator[SEP] Other[300] operator[SEP] operator[SEP] identifier[serverCol] operator[SEP] identifier[setResizable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[TreeColumn] identifier[locationCol] operator[=] Keyword[new] identifier[TreeColumn] operator[SEP] identifier[main] , identifier[SWT] operator[SEP] identifier[SINGLE] operator[SEP] operator[SEP] identifier[locationCol] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[locationCol] operator[SEP] identifier[setWidth] operator[SEP] Other[185] operator[SEP] operator[SEP] identifier[locationCol] operator[SEP] identifier[setResizable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[TreeColumn] identifier[stateCol] operator[=] Keyword[new] identifier[TreeColumn] operator[SEP] identifier[main] , identifier[SWT] operator[SEP] identifier[SINGLE] operator[SEP] operator[SEP] identifier[stateCol] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[stateCol] operator[SEP] identifier[setWidth] operator[SEP] Other[95] operator[SEP] operator[SEP] identifier[stateCol] operator[SEP] identifier[setResizable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[TreeColumn] identifier[statusCol] operator[=] Keyword[new] identifier[TreeColumn] operator[SEP] identifier[main] , identifier[SWT] operator[SEP] identifier[SINGLE] operator[SEP] operator[SEP] identifier[statusCol] operator[SEP] identifier[setText] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[statusCol] operator[SEP] identifier[setWidth] operator[SEP] Other[300] operator[SEP] operator[SEP] identifier[statusCol] operator[SEP] identifier[setResizable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[viewer] operator[=] Keyword[new] identifier[TreeViewer] operator[SEP] identifier[main] operator[SEP] operator[SEP] identifier[viewer] operator[SEP] identifier[setContentProvider] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[viewer] operator[SEP] identifier[setLabelProvider] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[viewer] operator[SEP] identifier[setInput] operator[SEP] identifier[CONTENT_ROOT] operator[SEP] operator[SEP] identifier[getViewSite] operator[SEP] operator[SEP] operator[SEP] identifier[setSelectionProvider] operator[SEP] identifier[viewer] operator[SEP] operator[SEP] identifier[getViewSite] operator[SEP] operator[SEP] operator[SEP] identifier[getActionBars] operator[SEP] operator[SEP] operator[SEP] identifier[setGlobalActionHandler] operator[SEP] identifier[ActionFactory] operator[SEP] identifier[DELETE] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[deleteAction] operator[SEP] operator[SEP] identifier[getViewSite] operator[SEP] operator[SEP] operator[SEP] identifier[getActionBars] operator[SEP] operator[SEP] operator[SEP] identifier[getToolBarManager] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[editServerAction] operator[SEP] operator[SEP] identifier[getViewSite] operator[SEP] operator[SEP] operator[SEP] identifier[getActionBars] operator[SEP] operator[SEP] operator[SEP] identifier[getToolBarManager] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[newLocationAction] operator[SEP] operator[SEP] identifier[createActions] operator[SEP] operator[SEP] operator[SEP] identifier[createContextMenu] operator[SEP] operator[SEP] operator[SEP] }
public void setupSFields() { this.getRecord(UserGroup.USER_GROUP_FILE).getField(UserGroup.DESCRIPTION).setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.ANCHOR_DEFAULT), this, ScreenConstants.DEFAULT_DISPLAY); }
class class_name[name] begin[{] method[setupSFields, return_type[void], modifier[public], parameter[]] begin[{] THIS[call[None.getRecord, parameter[member[UserGroup.USER_GROUP_FILE]]]call[None.getField, parameter[member[UserGroup.DESCRIPTION]]]call[None.setupDefaultView, parameter[THIS[call[None.getNextLocation, parameter[member[ScreenConstants.NEXT_LOGICAL], member[ScreenConstants.ANCHOR_DEFAULT]]]], THIS[], member[ScreenConstants.DEFAULT_DISPLAY]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setupSFields] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[getRecord] operator[SEP] identifier[UserGroup] operator[SEP] identifier[USER_GROUP_FILE] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[UserGroup] operator[SEP] identifier[DESCRIPTION] operator[SEP] operator[SEP] identifier[setupDefaultView] operator[SEP] Keyword[this] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[ANCHOR_DEFAULT] operator[SEP] , Keyword[this] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] operator[SEP] operator[SEP] }
public final <TRight, TLeftEnd, TRightEnd, R> Flux<R> join( Publisher<? extends TRight> other, Function<? super T, ? extends Publisher<TLeftEnd>> leftEnd, Function<? super TRight, ? extends Publisher<TRightEnd>> rightEnd, BiFunction<? super T, ? super TRight, ? extends R> resultSelector ) { return onAssembly(new FluxJoin<T, TRight, TLeftEnd, TRightEnd, R>( this, other, leftEnd, rightEnd, resultSelector)); }
class class_name[name] begin[{] method[join, return_type[type[Flux]], modifier[final public], parameter[other, leftEnd, rightEnd, resultSelector]] begin[{] return[call[.onAssembly, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=other, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=leftEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=rightEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=resultSelector, 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=TRight, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TLeftEnd, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TRightEnd, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=R, sub_type=None))], dimensions=None, name=FluxJoin, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[final] operator[<] identifier[TRight] , identifier[TLeftEnd] , identifier[TRightEnd] , identifier[R] operator[>] identifier[Flux] operator[<] identifier[R] operator[>] identifier[join] operator[SEP] identifier[Publisher] operator[<] operator[?] Keyword[extends] identifier[TRight] operator[>] identifier[other] , identifier[Function] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[extends] identifier[Publisher] operator[<] identifier[TLeftEnd] operator[>] operator[>] identifier[leftEnd] , identifier[Function] operator[<] operator[?] Keyword[super] identifier[TRight] , operator[?] Keyword[extends] identifier[Publisher] operator[<] identifier[TRightEnd] operator[>] operator[>] identifier[rightEnd] , identifier[BiFunction] operator[<] operator[?] Keyword[super] identifier[T] , operator[?] Keyword[super] identifier[TRight] , operator[?] Keyword[extends] identifier[R] operator[>] identifier[resultSelector] operator[SEP] { Keyword[return] identifier[onAssembly] operator[SEP] Keyword[new] identifier[FluxJoin] operator[<] identifier[T] , identifier[TRight] , identifier[TLeftEnd] , identifier[TRightEnd] , identifier[R] operator[>] operator[SEP] Keyword[this] , identifier[other] , identifier[leftEnd] , identifier[rightEnd] , identifier[resultSelector] operator[SEP] operator[SEP] operator[SEP] }
private void addFunGroup(String funGroupToken, int addPos) { //BOND MODIFICATION //Alkanes - Single bond if ("an".equals(funGroupToken)) { //Do nothing since all bonds are single by default. } //Alkenes - Double bond else if ("en".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { //Set the first bond to an order of 2 (i.e. a double bond) currentMolecule.getBond(0).setOrder(IBond.Order.DOUBLE); } else { //Set the addPos'th bond to an order of 2 (i.e. a double bond) currentMolecule.getBond(addPos).setOrder(IBond.Order.DOUBLE); } } //Alkynes - Tripple bond else if ("yn".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { //Set the first bond to an order of 3 (i.e. a tripple bond) currentMolecule.getBond(0).setOrder(IBond.Order.TRIPLE); } else { //Set the addPos'th bond to an order of 3 (i.e. a tripple bond) currentMolecule.getBond(addPos).setOrder(IBond.Order.TRIPLE); } } //FUNCTIONAL GROUP SUFFIXES //Ending "e" else if ("e".equals(funGroupToken)) { //Do nothing, since the "e" is found at the end of chain names //with a bond modifer but no functional groups. } //Alcohols else if ("ol".equals(funGroupToken) || "hydroxy".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { addAtom("O", endOfChain, IBond.Order.SINGLE, 1); } else { addAtom("O", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 1); } } //Aldehydes else if ("al".equals(funGroupToken)) { addAtom("O", endOfChain, IBond.Order.DOUBLE, 0); } //Carboxylic acid else if ("oic acid".equals(funGroupToken)) { addAtom("O", endOfChain, IBond.Order.DOUBLE, 0); addAtom("O", endOfChain, IBond.Order.SINGLE, 1); } //Carboxylic Acid Chloride else if ("oyl chloride".equals(funGroupToken)) { addAtom("O", endOfChain, IBond.Order.DOUBLE, 0); addAtom("Cl", endOfChain, IBond.Order.SINGLE, 0); } //PREFIXES //Halogens //Chlorine else if ("chloro".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { addAtom("Cl", currentMolecule.isEmpty() ? null : currentMolecule.getAtom(0), IBond.Order.SINGLE, 0); } else { addAtom("Cl", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 0); } } //Fluorine else if ("fluoro".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { addAtom("F", currentMolecule.isEmpty() ? null : currentMolecule.getAtom(0), IBond.Order.SINGLE, 0); } else { addAtom("F", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 0); } } //Bromine else if ("bromo".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { addAtom("Br", currentMolecule.isEmpty() ? null : currentMolecule.getAtom(0), IBond.Order.SINGLE, 0); } else { addAtom("Br", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 0); } } //Iodine else if ("iodo".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { addAtom("I", currentMolecule.isEmpty() ? null : currentMolecule.getAtom(0), IBond.Order.SINGLE, 0); } else { addAtom("I", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 0); } } //Nitro else if ("nitro".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { addAtom("N", currentMolecule.isEmpty() ? null : currentMolecule.getAtom(0), IBond.Order.SINGLE, 0); } else { addAtom("N", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 0); } //Stuff which applied no matter where the N atom is: IAtom nitrogenAtom = currentMolecule.getAtom(currentMolecule.getAtomCount()); nitrogenAtom.setFormalCharge(+1); addAtom("O", nitrogenAtom, IBond.Order.SINGLE, 0); currentMolecule.getAtom(currentMolecule.getAtomCount()).setFormalCharge(-1); addAtom("O", nitrogenAtom, IBond.Order.DOUBLE, 0); } //Oxo else if ("oxo".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { addAtom("O", currentMolecule.isEmpty() ? null : currentMolecule.getAtom(0), IBond.Order.DOUBLE, 0); } else { addAtom("O", currentMolecule.getAtom(addPos), IBond.Order.DOUBLE, 0); } } //Nitrile else if ("nitrile".equals(funGroupToken)) { addAtom("N", currentMolecule.isEmpty() ? null : currentMolecule.getAtom(0), IBond.Order.TRIPLE, 0); } //Benzene else if ("phenyl".equals(funGroupToken)) { IAtomContainer benzene = makeBenzene(); //Detect Aromacity in the benzene ring. try { AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(benzene); Aromaticity.cdkLegacy().apply(benzene); } catch (CDKException exc) { // logger.debug("No atom detected"); } currentMolecule.add(benzene); IBond joiningBond; //If functional group hasn't had a location specified: if (addPos < 0) { joiningBond = currentMolecule.getBuilder().newInstance(IBond.class, currentMolecule.isEmpty() ? null : currentMolecule.getAtom(0), benzene.getAtom(0)); } else { joiningBond = currentMolecule.getBuilder().newInstance(IBond.class, currentMolecule.getAtom(addPos), benzene.getAtom(0)); } currentMolecule.addBond(joiningBond); } else if ("amino".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { addAtom("N", currentMolecule.isEmpty() ? null : currentMolecule.getAtom(0), IBond.Order.SINGLE, 2); } else { addAtom("N", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 2); } } //ORGANO METALLICS ADDED AS PREFIXES else if ("alumino".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { addAtom("Al", currentMolecule.isEmpty() ? null : currentMolecule.getAtom(0), IBond.Order.SINGLE, 2); } else { addAtom("Al", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 2); } } else if ("litho".equals(funGroupToken)) { //If functional group hasn't had a location specified: if (addPos < 0) { addAtom("Li", currentMolecule.isEmpty() ? null : currentMolecule.getAtom(0), IBond.Order.SINGLE, 2); } else { addAtom("Li", currentMolecule.getAtom(addPos), IBond.Order.SINGLE, 2); } } //PRIORITY SUBSTITUENTS //FUNCTIONAL GROUPS WHICH MAY HAVE THEIR OWN SUBSTITUENTS //Esters ("...oate") else if ("oate".equals(funGroupToken)) { addAtom("O", endOfChain, IBond.Order.DOUBLE, 0); addAtom("O", endOfChain, IBond.Order.SINGLE, 0); //Set the end of the chain to be built on for unspecified substituents. endOfChain = currentMolecule.getAtom(currentMolecule.getAtomCount()); } //Amines else if ("amine".equals(funGroupToken)) { addAtom("N", endOfChain, IBond.Order.SINGLE, 1); //Set the end of the chain to be built on for unspecified substituents. endOfChain = currentMolecule.getAtom(currentMolecule.getAtomCount()); } //Amides else if ("amide".equals(funGroupToken)) { addAtom("O", endOfChain, IBond.Order.DOUBLE, 0); addAtom("N", endOfChain, IBond.Order.SINGLE, 1); //Set the end of the chain to be built on for unspecified substituents. endOfChain = currentMolecule.getAtom(currentMolecule.getAtomCount()); } //Ketones else if ("one".equals(funGroupToken)) { addAtom("O", endOfChain, IBond.Order.DOUBLE, 2); //End of chain doesn't change in this case } //Organometals else if (getMetalAtomicSymbol(funGroupToken) != null) { currentMolecule.addAtom(currentMolecule.getBuilder().newInstance(IAtom.class, getMetalAtomicSymbol(funGroupToken))); endOfChain = currentMolecule.getAtom(currentMolecule.getAtomCount()); } else { // logger.debug("Encountered unknown group: " + funGroupToken + " at " + addPos + // "\nThe parser thinks this is valid but the molecule builder has no logic for it"); } }
class class_name[name] begin[{] method[addFunGroup, return_type[void], modifier[private], parameter[funGroupToken, addPos]] begin[{] if[literal["an"]] begin[{] else begin[{] if[literal["en"]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[currentMolecule.getBond, parameter[literal[0]]] else begin[{] call[currentMolecule.getBond, parameter[member[.addPos]]] end[}] else begin[{] if[literal["yn"]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[currentMolecule.getBond, parameter[literal[0]]] else begin[{] call[currentMolecule.getBond, parameter[member[.addPos]]] end[}] else begin[{] if[literal["e"]] begin[{] else begin[{] if[binary_operation[literal["ol"], ||, literal["hydroxy"]]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[.addAtom, parameter[literal["O"], member[.endOfChain], member[IBond.Order.SINGLE], literal[1]]] else begin[{] call[.addAtom, parameter[literal["O"], call[currentMolecule.getAtom, parameter[member[.addPos]]], member[IBond.Order.SINGLE], literal[1]]] end[}] else begin[{] if[literal["al"]] begin[{] call[.addAtom, parameter[literal["O"], member[.endOfChain], member[IBond.Order.DOUBLE], literal[0]]] else begin[{] if[literal["oic acid"]] begin[{] call[.addAtom, parameter[literal["O"], member[.endOfChain], member[IBond.Order.DOUBLE], literal[0]]] call[.addAtom, parameter[literal["O"], member[.endOfChain], member[IBond.Order.SINGLE], literal[1]]] else begin[{] if[literal["oyl chloride"]] begin[{] call[.addAtom, parameter[literal["O"], member[.endOfChain], member[IBond.Order.DOUBLE], literal[0]]] call[.addAtom, parameter[literal["Cl"], member[.endOfChain], member[IBond.Order.SINGLE], literal[0]]] else begin[{] if[literal["chloro"]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[.addAtom, parameter[literal["Cl"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), member[IBond.Order.SINGLE], literal[0]]] else begin[{] call[.addAtom, parameter[literal["Cl"], call[currentMolecule.getAtom, parameter[member[.addPos]]], member[IBond.Order.SINGLE], literal[0]]] end[}] else begin[{] if[literal["fluoro"]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[.addAtom, parameter[literal["F"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), member[IBond.Order.SINGLE], literal[0]]] else begin[{] call[.addAtom, parameter[literal["F"], call[currentMolecule.getAtom, parameter[member[.addPos]]], member[IBond.Order.SINGLE], literal[0]]] end[}] else begin[{] if[literal["bromo"]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[.addAtom, parameter[literal["Br"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), member[IBond.Order.SINGLE], literal[0]]] else begin[{] call[.addAtom, parameter[literal["Br"], call[currentMolecule.getAtom, parameter[member[.addPos]]], member[IBond.Order.SINGLE], literal[0]]] end[}] else begin[{] if[literal["iodo"]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[.addAtom, parameter[literal["I"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), member[IBond.Order.SINGLE], literal[0]]] else begin[{] call[.addAtom, parameter[literal["I"], call[currentMolecule.getAtom, parameter[member[.addPos]]], member[IBond.Order.SINGLE], literal[0]]] end[}] else begin[{] if[literal["nitro"]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[.addAtom, parameter[literal["N"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), member[IBond.Order.SINGLE], literal[0]]] else begin[{] call[.addAtom, parameter[literal["N"], call[currentMolecule.getAtom, parameter[member[.addPos]]], member[IBond.Order.SINGLE], literal[0]]] end[}] local_variable[type[IAtom], nitrogenAtom] call[nitrogenAtom.setFormalCharge, parameter[literal[1]]] call[.addAtom, parameter[literal["O"], member[.nitrogenAtom], member[IBond.Order.SINGLE], literal[0]]] call[currentMolecule.getAtom, parameter[call[currentMolecule.getAtomCount, parameter[]]]] call[.addAtom, parameter[literal["O"], member[.nitrogenAtom], member[IBond.Order.DOUBLE], literal[0]]] else begin[{] if[literal["oxo"]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[.addAtom, parameter[literal["O"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), member[IBond.Order.DOUBLE], literal[0]]] else begin[{] call[.addAtom, parameter[literal["O"], call[currentMolecule.getAtom, parameter[member[.addPos]]], member[IBond.Order.DOUBLE], literal[0]]] end[}] else begin[{] if[literal["nitrile"]] begin[{] call[.addAtom, parameter[literal["N"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), member[IBond.Order.TRIPLE], literal[0]]] else begin[{] if[literal["phenyl"]] begin[{] local_variable[type[IAtomContainer], benzene] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=benzene, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=percieveAtomTypesAndConfigureAtoms, postfix_operators=[], prefix_operators=[], qualifier=AtomContainerManipulator, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=cdkLegacy, postfix_operators=[], prefix_operators=[], qualifier=Aromaticity, selectors=[MethodInvocation(arguments=[MemberReference(member=benzene, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=apply, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=exc, types=['CDKException']))], finally_block=None, label=None, resources=None) call[currentMolecule.add, parameter[member[.benzene]]] local_variable[type[IBond], joiningBond] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] assign[member[.joiningBond], call[currentMolecule.getBuilder, parameter[]]] else begin[{] assign[member[.joiningBond], call[currentMolecule.getBuilder, parameter[]]] end[}] call[currentMolecule.addBond, parameter[member[.joiningBond]]] else begin[{] if[literal["amino"]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[.addAtom, parameter[literal["N"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), member[IBond.Order.SINGLE], literal[2]]] else begin[{] call[.addAtom, parameter[literal["N"], call[currentMolecule.getAtom, parameter[member[.addPos]]], member[IBond.Order.SINGLE], literal[2]]] end[}] else begin[{] if[literal["alumino"]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[.addAtom, parameter[literal["Al"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), member[IBond.Order.SINGLE], literal[2]]] else begin[{] call[.addAtom, parameter[literal["Al"], call[currentMolecule.getAtom, parameter[member[.addPos]]], member[IBond.Order.SINGLE], literal[2]]] end[}] else begin[{] if[literal["litho"]] begin[{] if[binary_operation[member[.addPos], <, literal[0]]] begin[{] call[.addAtom, parameter[literal["Li"], TernaryExpression(condition=MethodInvocation(arguments=[], member=isEmpty, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_false=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=getAtom, postfix_operators=[], prefix_operators=[], qualifier=currentMolecule, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), member[IBond.Order.SINGLE], literal[2]]] else begin[{] call[.addAtom, parameter[literal["Li"], call[currentMolecule.getAtom, parameter[member[.addPos]]], member[IBond.Order.SINGLE], literal[2]]] end[}] else begin[{] if[literal["oate"]] begin[{] call[.addAtom, parameter[literal["O"], member[.endOfChain], member[IBond.Order.DOUBLE], literal[0]]] call[.addAtom, parameter[literal["O"], member[.endOfChain], member[IBond.Order.SINGLE], literal[0]]] assign[member[.endOfChain], call[currentMolecule.getAtom, parameter[call[currentMolecule.getAtomCount, parameter[]]]]] else begin[{] if[literal["amine"]] begin[{] call[.addAtom, parameter[literal["N"], member[.endOfChain], member[IBond.Order.SINGLE], literal[1]]] assign[member[.endOfChain], call[currentMolecule.getAtom, parameter[call[currentMolecule.getAtomCount, parameter[]]]]] else begin[{] if[literal["amide"]] begin[{] call[.addAtom, parameter[literal["O"], member[.endOfChain], member[IBond.Order.DOUBLE], literal[0]]] call[.addAtom, parameter[literal["N"], member[.endOfChain], member[IBond.Order.SINGLE], literal[1]]] assign[member[.endOfChain], call[currentMolecule.getAtom, parameter[call[currentMolecule.getAtomCount, parameter[]]]]] else begin[{] if[literal["one"]] begin[{] call[.addAtom, parameter[literal["O"], member[.endOfChain], member[IBond.Order.DOUBLE], literal[2]]] else begin[{] if[binary_operation[call[.getMetalAtomicSymbol, parameter[member[.funGroupToken]]], !=, literal[null]]] begin[{] call[currentMolecule.addAtom, parameter[call[currentMolecule.getBuilder, parameter[]]]] assign[member[.endOfChain], call[currentMolecule.getAtom, parameter[call[currentMolecule.getAtomCount, parameter[]]]]] else begin[{] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[addFunGroup] operator[SEP] identifier[String] identifier[funGroupToken] , Keyword[int] identifier[addPos] operator[SEP] { Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[currentMolecule] operator[SEP] identifier[getBond] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[setOrder] operator[SEP] identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] operator[SEP] operator[SEP] } Keyword[else] { identifier[currentMolecule] operator[SEP] identifier[getBond] operator[SEP] identifier[addPos] operator[SEP] operator[SEP] identifier[setOrder] operator[SEP] identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[currentMolecule] operator[SEP] identifier[getBond] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[setOrder] operator[SEP] identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[TRIPLE] operator[SEP] operator[SEP] } Keyword[else] { identifier[currentMolecule] operator[SEP] identifier[getBond] operator[SEP] identifier[addPos] operator[SEP] operator[SEP] identifier[setOrder] operator[SEP] identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[TRIPLE] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[||] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[addPos] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[1] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] , Other[0] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] , Other[0] operator[SEP] operator[SEP] identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[1] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] , Other[0] operator[SEP] operator[SEP] identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] } Keyword[else] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[addPos] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] } Keyword[else] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[addPos] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] } Keyword[else] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[addPos] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] } Keyword[else] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[addPos] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] } Keyword[else] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[addPos] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] } identifier[IAtom] identifier[nitrogenAtom] operator[=] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[currentMolecule] operator[SEP] identifier[getAtomCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[nitrogenAtom] operator[SEP] identifier[setFormalCharge] operator[SEP] operator[+] Other[1] operator[SEP] operator[SEP] identifier[addAtom] operator[SEP] literal[String] , identifier[nitrogenAtom] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[currentMolecule] operator[SEP] identifier[getAtomCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[setFormalCharge] operator[SEP] operator[-] Other[1] operator[SEP] operator[SEP] identifier[addAtom] operator[SEP] literal[String] , identifier[nitrogenAtom] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] , Other[0] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] , Other[0] operator[SEP] operator[SEP] } Keyword[else] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[addPos] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] , Other[0] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[TRIPLE] , Other[0] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { identifier[IAtomContainer] identifier[benzene] operator[=] identifier[makeBenzene] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[AtomContainerManipulator] operator[SEP] identifier[percieveAtomTypesAndConfigureAtoms] operator[SEP] identifier[benzene] operator[SEP] operator[SEP] identifier[Aromaticity] operator[SEP] identifier[cdkLegacy] operator[SEP] operator[SEP] operator[SEP] identifier[apply] operator[SEP] identifier[benzene] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CDKException] identifier[exc] operator[SEP] { } identifier[currentMolecule] operator[SEP] identifier[add] operator[SEP] identifier[benzene] operator[SEP] operator[SEP] identifier[IBond] identifier[joiningBond] operator[SEP] Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[joiningBond] operator[=] identifier[currentMolecule] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IBond] operator[SEP] Keyword[class] , identifier[currentMolecule] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] , identifier[benzene] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[joiningBond] operator[=] identifier[currentMolecule] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IBond] operator[SEP] Keyword[class] , identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[addPos] operator[SEP] , identifier[benzene] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] } identifier[currentMolecule] operator[SEP] identifier[addBond] operator[SEP] identifier[joiningBond] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[2] operator[SEP] operator[SEP] } Keyword[else] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[addPos] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[2] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[2] operator[SEP] operator[SEP] } Keyword[else] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[addPos] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[2] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[addPos] operator[<] Other[0] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[?] Other[null] operator[:] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] Other[0] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[2] operator[SEP] operator[SEP] } Keyword[else] { identifier[addAtom] operator[SEP] literal[String] , identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[addPos] operator[SEP] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[2] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] , Other[0] operator[SEP] operator[SEP] identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[0] operator[SEP] operator[SEP] identifier[endOfChain] operator[=] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[currentMolecule] operator[SEP] identifier[getAtomCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[1] operator[SEP] operator[SEP] identifier[endOfChain] operator[=] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[currentMolecule] operator[SEP] identifier[getAtomCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] , Other[0] operator[SEP] operator[SEP] identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[SINGLE] , Other[1] operator[SEP] operator[SEP] identifier[endOfChain] operator[=] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[currentMolecule] operator[SEP] identifier[getAtomCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] literal[String] operator[SEP] identifier[equals] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] { identifier[addAtom] operator[SEP] literal[String] , identifier[endOfChain] , identifier[IBond] operator[SEP] identifier[Order] operator[SEP] identifier[DOUBLE] , Other[2] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[getMetalAtomicSymbol] operator[SEP] identifier[funGroupToken] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[currentMolecule] operator[SEP] identifier[addAtom] operator[SEP] identifier[currentMolecule] operator[SEP] identifier[getBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] identifier[IAtom] operator[SEP] Keyword[class] , identifier[getMetalAtomicSymbol] operator[SEP] identifier[funGroupToken] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[endOfChain] operator[=] identifier[currentMolecule] operator[SEP] identifier[getAtom] operator[SEP] identifier[currentMolecule] operator[SEP] identifier[getAtomCount] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { } }
@Override public List<Record> loadFromMetaData(List<RecordMetaData> recordMetaDatas) throws IOException { return recordReader.loadFromMetaData(recordMetaDatas); }
class class_name[name] begin[{] method[loadFromMetaData, return_type[type[List]], modifier[public], parameter[recordMetaDatas]] begin[{] return[call[recordReader.loadFromMetaData, parameter[member[.recordMetaDatas]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[List] operator[<] identifier[Record] operator[>] identifier[loadFromMetaData] operator[SEP] identifier[List] operator[<] identifier[RecordMetaData] operator[>] identifier[recordMetaDatas] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[recordReader] operator[SEP] identifier[loadFromMetaData] operator[SEP] identifier[recordMetaDatas] operator[SEP] operator[SEP] }
public static String getEsBuildVersion() { URL url = ApimanEmbeddedElastic.class.getResource("apiman-embedded-elastic.properties"); if (url == null) { throw new RuntimeException("embedded-elastic.properties missing."); } else { Properties allProperties = new Properties(); try(InputStream is = url.openStream()){ allProperties.load(is); return Optional .ofNullable(allProperties.getProperty("apiman.embedded-es-version")) .orElseThrow(() -> new RuntimeException("apiman.embedded-es-version")); } catch (IOException e) { throw new RuntimeException(e); } } }
class class_name[name] begin[{] method[getEsBuildVersion, return_type[type[String]], modifier[public static], parameter[]] begin[{] local_variable[type[URL], url] if[binary_operation[member[.url], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="embedded-elastic.properties missing.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None) else begin[{] local_variable[type[Properties], allProperties] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=is, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=load, postfix_operators=[], prefix_operators=[], qualifier=allProperties, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="apiman.embedded-es-version")], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=allProperties, selectors=[], type_arguments=None)], member=ofNullable, postfix_operators=[], prefix_operators=[], qualifier=Optional, selectors=[MethodInvocation(arguments=[LambdaExpression(body=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="apiman.embedded-es-version")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), parameters=[])], member=orElseThrow, 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=RuntimeException, sub_type=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=is, type=ReferenceType(arguments=None, dimensions=[], name=InputStream, sub_type=None), value=MethodInvocation(arguments=[], member=openStream, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None))]) end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getEsBuildVersion] operator[SEP] operator[SEP] { identifier[URL] identifier[url] operator[=] identifier[ApimanEmbeddedElastic] operator[SEP] Keyword[class] operator[SEP] identifier[getResource] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[url] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[else] { identifier[Properties] identifier[allProperties] operator[=] Keyword[new] identifier[Properties] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[InputStream] identifier[is] operator[=] identifier[url] operator[SEP] identifier[openStream] operator[SEP] operator[SEP] operator[SEP] { identifier[allProperties] operator[SEP] identifier[load] operator[SEP] identifier[is] operator[SEP] operator[SEP] Keyword[return] identifier[Optional] operator[SEP] identifier[ofNullable] operator[SEP] identifier[allProperties] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[orElseThrow] operator[SEP] operator[SEP] operator[SEP] operator[->] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } }
public BufferedImage createImage() { BufferedImage image = null; Graphics2D graphics = null; for (int layer = 0; layer < 4; layer++) { BufferedImage layerImage = layeredImage[layer]; if (layerImage != null) { if (image == null) { image = layerImage; graphics = layeredGraphics[layer]; } else { graphics.drawImage(layerImage, 0, 0, null); layeredGraphics[layer].dispose(); layerImage.flush(); } layeredImage[layer] = null; layeredGraphics[layer] = null; } } if (graphics != null) { graphics.dispose(); } return image; }
class class_name[name] begin[{] method[createImage, return_type[type[BufferedImage]], modifier[public], parameter[]] begin[{] local_variable[type[BufferedImage], image] local_variable[type[Graphics2D], graphics] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=layeredImage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=layer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=layerImage)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BufferedImage, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=layerImage, 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=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=image, 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=MethodInvocation(arguments=[MemberReference(member=layerImage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=drawImage, postfix_operators=[], prefix_operators=[], qualifier=graphics, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=layeredGraphics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=layer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=dispose, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=flush, postfix_operators=[], prefix_operators=[], qualifier=layerImage, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=image, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=layerImage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=graphics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=layeredGraphics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=layer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=layeredImage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=layer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=layeredGraphics, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=layer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=layer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=layer)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=layer, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[binary_operation[member[.graphics], !=, literal[null]]] begin[{] call[graphics.dispose, parameter[]] else begin[{] None end[}] return[member[.image]] end[}] END[}]
Keyword[public] identifier[BufferedImage] identifier[createImage] operator[SEP] operator[SEP] { identifier[BufferedImage] identifier[image] operator[=] Other[null] operator[SEP] identifier[Graphics2D] identifier[graphics] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[layer] operator[=] Other[0] operator[SEP] identifier[layer] operator[<] Other[4] operator[SEP] identifier[layer] operator[++] operator[SEP] { identifier[BufferedImage] identifier[layerImage] operator[=] identifier[layeredImage] operator[SEP] identifier[layer] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[layerImage] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[image] operator[==] Other[null] operator[SEP] { identifier[image] operator[=] identifier[layerImage] operator[SEP] identifier[graphics] operator[=] identifier[layeredGraphics] operator[SEP] identifier[layer] operator[SEP] operator[SEP] } Keyword[else] { identifier[graphics] operator[SEP] identifier[drawImage] operator[SEP] identifier[layerImage] , Other[0] , Other[0] , Other[null] operator[SEP] operator[SEP] identifier[layeredGraphics] operator[SEP] identifier[layer] operator[SEP] operator[SEP] identifier[dispose] operator[SEP] operator[SEP] operator[SEP] identifier[layerImage] operator[SEP] identifier[flush] operator[SEP] operator[SEP] operator[SEP] } identifier[layeredImage] operator[SEP] identifier[layer] operator[SEP] operator[=] Other[null] operator[SEP] identifier[layeredGraphics] operator[SEP] identifier[layer] operator[SEP] operator[=] Other[null] operator[SEP] } } Keyword[if] operator[SEP] identifier[graphics] operator[!=] Other[null] operator[SEP] { identifier[graphics] operator[SEP] identifier[dispose] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[image] operator[SEP] }
public static int readIntChild( Node node, String childNodeName, int defaultValue) { if (node == null) { throw new XmlException( "Tried to read int value from child of null node"); } Node child = XmlUtils.getFirstChild(node, childNodeName); if (child == null) { return defaultValue; } return XmlUtils.readInt(child); }
class class_name[name] begin[{] method[readIntChild, return_type[type[int]], modifier[public static], parameter[node, childNodeName, defaultValue]] begin[{] if[binary_operation[member[.node], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Tried to read int value from child of null node")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=XmlException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Node], child] if[binary_operation[member[.child], ==, literal[null]]] begin[{] return[member[.defaultValue]] else begin[{] None end[}] return[call[XmlUtils.readInt, parameter[member[.child]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[readIntChild] operator[SEP] identifier[Node] identifier[node] , identifier[String] identifier[childNodeName] , Keyword[int] identifier[defaultValue] operator[SEP] { Keyword[if] operator[SEP] identifier[node] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[XmlException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Node] identifier[child] operator[=] identifier[XmlUtils] operator[SEP] identifier[getFirstChild] operator[SEP] identifier[node] , identifier[childNodeName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[child] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[defaultValue] operator[SEP] } Keyword[return] identifier[XmlUtils] operator[SEP] identifier[readInt] operator[SEP] identifier[child] operator[SEP] operator[SEP] }
public String getLength(String imgName) { String ret = (String)m_lengths.get(imgName); if (ret == null) { return ""; } return ret; }
class class_name[name] begin[{] method[getLength, return_type[type[String]], modifier[public], parameter[imgName]] begin[{] local_variable[type[String], ret] if[binary_operation[member[.ret], ==, literal[null]]] begin[{] return[literal[""]] else begin[{] None end[}] return[member[.ret]] end[}] END[}]
Keyword[public] identifier[String] identifier[getLength] operator[SEP] identifier[String] identifier[imgName] operator[SEP] { identifier[String] identifier[ret] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[m_lengths] operator[SEP] identifier[get] operator[SEP] identifier[imgName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ret] operator[==] Other[null] operator[SEP] { Keyword[return] literal[String] operator[SEP] } Keyword[return] identifier[ret] operator[SEP] }
public com.google.protobuf.ByteString getPivotForPredNameBytes() { java.lang.Object ref = pivotForPredName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); pivotForPredName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } }
class class_name[name] begin[{] method[getPivotForPredNameBytes, return_type[type[com]], modifier[public], parameter[]] begin[{] local_variable[type[java], ref] if[binary_operation[member[.ref], instanceof, type[java]]] begin[{] local_variable[type[com], b] assign[member[.pivotForPredName_], member[.b]] return[member[.b]] else begin[{] return[Cast(expression=MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=google, sub_type=ReferenceType(arguments=None, dimensions=None, name=protobuf, sub_type=ReferenceType(arguments=None, dimensions=None, name=ByteString, sub_type=None)))))] end[}] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[getPivotForPredNameBytes] operator[SEP] operator[SEP] { identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identifier[pivotForPredName_] operator[SEP] Keyword[if] operator[SEP] identifier[ref] Keyword[instanceof] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] { identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[b] operator[=] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[copyFromUtf8] operator[SEP] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] identifier[ref] operator[SEP] operator[SEP] identifier[pivotForPredName_] operator[=] identifier[b] operator[SEP] Keyword[return] identifier[b] operator[SEP] } Keyword[else] { Keyword[return] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[ref] operator[SEP] } }
@Override public boolean relative(int rows) throws SQLException { checkClosed(); if (rowCount == 0) { return false; } if (cursorPosition == Position.afterLast && rows > 0) { return false; } if (cursorPosition == Position.beforeFirst && rows <= 0) { return false; } if (table.getActiveRowIndex() + rows >= rowCount) { cursorPosition = Position.afterLast; if (table.getActiveRowIndex() + rows == rowCount) { return true; } return false; } try { // for negative row numbers, resetRowPosition method is called // and the cursor advances to the desired row from top of the table int rowsToMove = table.getActiveRowIndex() + rows; if (cursorPosition == Position.beforeFirst || rows < 0) { if(cursorPosition == Position.afterLast) { rowsToMove = rowCount + rows; } else if(cursorPosition == Position.beforeFirst) { rowsToMove = rows - 1; } else { rowsToMove = table.getActiveRowIndex() + rows; } if(rowsToMove < 0){ beforeFirst(); return false; } table.resetRowPosition(); table.advanceToRow(0); } cursorPosition = Position.middle; return table.advanceToRow(rowsToMove); } catch (Exception x) { throw SQLError.get(x); } }
class class_name[name] begin[{] method[relative, return_type[type[boolean]], modifier[public], parameter[rows]] begin[{] call[.checkClosed, parameter[]] if[binary_operation[member[.rowCount], ==, literal[0]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.cursorPosition], ==, member[Position.afterLast]], &&, binary_operation[member[.rows], >, literal[0]]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.cursorPosition], ==, member[Position.beforeFirst]], &&, binary_operation[member[.rows], <=, literal[0]]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[binary_operation[call[table.getActiveRowIndex, parameter[]], +, member[.rows]], >=, member[.rowCount]]] begin[{] assign[member[.cursorPosition], member[Position.afterLast]] if[binary_operation[binary_operation[call[table.getActiveRowIndex, parameter[]], +, member[.rows]], ==, member[.rowCount]]] begin[{] return[literal[true]] else begin[{] None end[}] return[literal[false]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getActiveRowIndex, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None), operandr=MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=rowsToMove)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cursorPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=beforeFirst, postfix_operators=[], prefix_operators=[], qualifier=Position, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cursorPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=afterLast, postfix_operators=[], prefix_operators=[], qualifier=Position, selectors=[]), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=cursorPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=beforeFirst, postfix_operators=[], prefix_operators=[], qualifier=Position, selectors=[]), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rowsToMove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getActiveRowIndex, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None), operandr=MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rowsToMove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=rowsToMove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MemberReference(member=rowCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=rowsToMove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=beforeFirst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=resetRowPosition, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=advanceToRow, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=cursorPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=middle, postfix_operators=[], prefix_operators=[], qualifier=Position, selectors=[])), label=None), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=rowsToMove, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=advanceToRow, postfix_operators=[], prefix_operators=[], qualifier=table, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=SQLError, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=x, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[relative] operator[SEP] Keyword[int] identifier[rows] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[checkClosed] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rowCount] operator[==] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[cursorPosition] operator[==] identifier[Position] operator[SEP] identifier[afterLast] operator[&&] identifier[rows] operator[>] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[cursorPosition] operator[==] identifier[Position] operator[SEP] identifier[beforeFirst] operator[&&] identifier[rows] operator[<=] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[table] operator[SEP] identifier[getActiveRowIndex] operator[SEP] operator[SEP] operator[+] identifier[rows] operator[>=] identifier[rowCount] operator[SEP] { identifier[cursorPosition] operator[=] identifier[Position] operator[SEP] identifier[afterLast] operator[SEP] Keyword[if] operator[SEP] identifier[table] operator[SEP] identifier[getActiveRowIndex] operator[SEP] operator[SEP] operator[+] identifier[rows] operator[==] identifier[rowCount] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } Keyword[try] { Keyword[int] identifier[rowsToMove] operator[=] identifier[table] operator[SEP] identifier[getActiveRowIndex] operator[SEP] operator[SEP] operator[+] identifier[rows] operator[SEP] Keyword[if] operator[SEP] identifier[cursorPosition] operator[==] identifier[Position] operator[SEP] identifier[beforeFirst] operator[||] identifier[rows] operator[<] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[cursorPosition] operator[==] identifier[Position] operator[SEP] identifier[afterLast] operator[SEP] { identifier[rowsToMove] operator[=] identifier[rowCount] operator[+] identifier[rows] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[cursorPosition] operator[==] identifier[Position] operator[SEP] identifier[beforeFirst] operator[SEP] { identifier[rowsToMove] operator[=] identifier[rows] operator[-] Other[1] operator[SEP] } Keyword[else] { identifier[rowsToMove] operator[=] identifier[table] operator[SEP] identifier[getActiveRowIndex] operator[SEP] operator[SEP] operator[+] identifier[rows] operator[SEP] } Keyword[if] operator[SEP] identifier[rowsToMove] operator[<] Other[0] operator[SEP] { identifier[beforeFirst] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[table] operator[SEP] identifier[resetRowPosition] operator[SEP] operator[SEP] operator[SEP] identifier[table] operator[SEP] identifier[advanceToRow] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[cursorPosition] operator[=] identifier[Position] operator[SEP] identifier[middle] operator[SEP] Keyword[return] identifier[table] operator[SEP] identifier[advanceToRow] operator[SEP] identifier[rowsToMove] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[x] operator[SEP] { Keyword[throw] identifier[SQLError] operator[SEP] identifier[get] operator[SEP] identifier[x] operator[SEP] operator[SEP] } }
private void readFields() throws IOException, ClassfileFormatException { // Fields final int fieldCount = inputStreamOrByteBuffer.readUnsignedShort(); for (int i = 0; i < fieldCount; i++) { // Info on modifier flags: http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.5 final int fieldModifierFlags = inputStreamOrByteBuffer.readUnsignedShort(); final boolean isPublicField = ((fieldModifierFlags & 0x0001) == 0x0001); final boolean isStaticFinalField = ((fieldModifierFlags & 0x0018) == 0x0018); final boolean fieldIsVisible = isPublicField || scanSpec.ignoreFieldVisibility; final boolean getStaticFinalFieldConstValue = scanSpec.enableStaticFinalFieldConstantInitializerValues && isStaticFinalField && fieldIsVisible; if (!fieldIsVisible || (!scanSpec.enableFieldInfo && !getStaticFinalFieldConstValue)) { // Skip field inputStreamOrByteBuffer.readUnsignedShort(); // fieldNameCpIdx inputStreamOrByteBuffer.readUnsignedShort(); // fieldTypeDescriptorCpIdx final int attributesCount = inputStreamOrByteBuffer.readUnsignedShort(); for (int j = 0; j < attributesCount; j++) { inputStreamOrByteBuffer.readUnsignedShort(); // attributeNameCpIdx final int attributeLength = inputStreamOrByteBuffer.readInt(); // == 2 inputStreamOrByteBuffer.skip(attributeLength); } } else { final int fieldNameCpIdx = inputStreamOrByteBuffer.readUnsignedShort(); final String fieldName = getConstantPoolString(fieldNameCpIdx); final int fieldTypeDescriptorCpIdx = inputStreamOrByteBuffer.readUnsignedShort(); final char fieldTypeDescriptorFirstChar = (char) getConstantPoolStringFirstByte( fieldTypeDescriptorCpIdx); String fieldTypeDescriptor; String fieldTypeSignature = null; fieldTypeDescriptor = getConstantPoolString(fieldTypeDescriptorCpIdx); Object fieldConstValue = null; AnnotationInfoList fieldAnnotationInfo = null; final int attributesCount = inputStreamOrByteBuffer.readUnsignedShort(); for (int j = 0; j < attributesCount; j++) { final int attributeNameCpIdx = inputStreamOrByteBuffer.readUnsignedShort(); final int attributeLength = inputStreamOrByteBuffer.readInt(); // == 2 // See if field name matches one of the requested names for this class, and if it does, // check if it is initialized with a constant value if ((getStaticFinalFieldConstValue) && constantPoolStringEquals(attributeNameCpIdx, "ConstantValue")) { // http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.2 final int cpIdx = inputStreamOrByteBuffer.readUnsignedShort(); if (cpIdx < 1 || cpIdx >= cpCount) { throw new ClassfileFormatException("Constant pool index " + cpIdx + ", should be in range [1, " + (cpCount - 1) + "] -- cannot continue reading class. " + "Please report this at https://github.com/classgraph/classgraph/issues"); } fieldConstValue = getFieldConstantPoolValue(entryTag[cpIdx], fieldTypeDescriptorFirstChar, cpIdx); } else if (fieldIsVisible && constantPoolStringEquals(attributeNameCpIdx, "Signature")) { fieldTypeSignature = getConstantPoolString(inputStreamOrByteBuffer.readUnsignedShort()); } else if (scanSpec.enableAnnotationInfo // && (constantPoolStringEquals(attributeNameCpIdx, "RuntimeVisibleAnnotations") || (!scanSpec.disableRuntimeInvisibleAnnotations && constantPoolStringEquals( attributeNameCpIdx, "RuntimeInvisibleAnnotations")))) { // Read annotation names final int fieldAnnotationCount = inputStreamOrByteBuffer.readUnsignedShort(); if (fieldAnnotationCount > 0) { if (fieldAnnotationInfo == null) { fieldAnnotationInfo = new AnnotationInfoList(1); } for (int k = 0; k < fieldAnnotationCount; k++) { final AnnotationInfo fieldAnnotation = readAnnotation(); fieldAnnotationInfo.add(fieldAnnotation); } } } else { // No match, just skip attribute inputStreamOrByteBuffer.skip(attributeLength); } } if (scanSpec.enableFieldInfo && fieldIsVisible) { if (fieldInfoList == null) { fieldInfoList = new FieldInfoList(); } fieldInfoList.add(new FieldInfo(className, fieldName, fieldModifierFlags, fieldTypeDescriptor, fieldTypeSignature, fieldConstValue, fieldAnnotationInfo)); } } } }
class class_name[name] begin[{] method[readFields, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[int], fieldCount] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), name=fieldModifierFlags)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=fieldModifierFlags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0001), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0001), operator===), name=isPublicField)], modifiers={'final'}, type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=fieldModifierFlags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0018), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0018), operator===), name=isStaticFinalField)], modifiers={'final'}, type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=isPublicField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ignoreFieldVisibility, postfix_operators=[], prefix_operators=[], qualifier=scanSpec, selectors=[]), operator=||), name=fieldIsVisible)], modifiers={'final'}, type=BasicType(dimensions=[], name=boolean)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=enableStaticFinalFieldConstantInitializerValues, postfix_operators=[], prefix_operators=[], qualifier=scanSpec, selectors=[]), operandr=MemberReference(member=isStaticFinalField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), operandr=MemberReference(member=fieldIsVisible, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), name=getStaticFinalFieldConstValue)], modifiers={'final'}, type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=fieldIsVisible, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=enableFieldInfo, postfix_operators=[], prefix_operators=['!'], qualifier=scanSpec, selectors=[]), operandr=MemberReference(member=getStaticFinalFieldConstValue, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), operator=&&), operator=||), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), name=fieldNameCpIdx)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=fieldNameCpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getConstantPoolString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=fieldName)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), name=fieldTypeDescriptorCpIdx)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=fieldTypeDescriptorCpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getConstantPoolStringFirstByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=char)), name=fieldTypeDescriptorFirstChar)], modifiers={'final'}, type=BasicType(dimensions=[], name=char)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=None, name=fieldTypeDescriptor)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=fieldTypeSignature)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldTypeDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=fieldTypeDescriptorCpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getConstantPoolString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=fieldConstValue)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=fieldAnnotationInfo)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AnnotationInfoList, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), name=attributesCount)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), name=attributeNameCpIdx)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readInt, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), name=attributeLength)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=getStaticFinalFieldConstValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=attributeNameCpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ConstantValue")], member=constantPoolStringEquals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=fieldIsVisible, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=attributeNameCpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Signature")], member=constantPoolStringEquals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=enableAnnotationInfo, postfix_operators=[], prefix_operators=[], qualifier=scanSpec, selectors=[]), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=attributeNameCpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="RuntimeVisibleAnnotations")], member=constantPoolStringEquals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=BinaryOperation(operandl=MemberReference(member=disableRuntimeInvisibleAnnotations, postfix_operators=[], prefix_operators=['!'], qualifier=scanSpec, selectors=[]), operandr=MethodInvocation(arguments=[MemberReference(member=attributeNameCpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="RuntimeInvisibleAnnotations")], member=constantPoolStringEquals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=&&), operator=||), operator=&&), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attributeLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=skip, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), name=fieldAnnotationCount)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=fieldAnnotationCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=fieldAnnotationInfo, 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=fieldAnnotationInfo, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AnnotationInfoList, sub_type=None))), label=None)])), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readAnnotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=fieldAnnotation)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=AnnotationInfo, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=fieldAnnotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=fieldAnnotationInfo, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=k, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=fieldAnnotationCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=k)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=k, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]))])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldTypeSignature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None)], member=getConstantPoolString, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), name=cpIdx)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=cpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=cpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=cpCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), operator=||), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Constant pool index "), operandr=MemberReference(member=cpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", should be in range [1, "), operator=+), operandr=BinaryOperation(operandl=MemberReference(member=cpCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] -- cannot continue reading class. "), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Please report this at https://github.com/classgraph/classgraph/issues"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ClassfileFormatException, sub_type=None)), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldConstValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=entryTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=cpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=fieldTypeDescriptorFirstChar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cpIdx, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFieldConstantPoolValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=attributesCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=enableFieldInfo, postfix_operators=[], prefix_operators=[], qualifier=scanSpec, selectors=[]), operandr=MemberReference(member=fieldIsVisible, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=fieldInfoList, 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=fieldInfoList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FieldInfoList, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldModifierFlags, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldTypeDescriptor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldTypeSignature, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldConstValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fieldAnnotationInfo, 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=FieldInfo, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=fieldInfoList, selectors=[], type_arguments=None), label=None)]))]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), name=attributesCount)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=readUnsignedShort, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=readInt, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), name=attributeLength)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attributeLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=skip, postfix_operators=[], prefix_operators=[], qualifier=inputStreamOrByteBuffer, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=attributesCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=fieldCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[readFields] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ClassfileFormatException] { Keyword[final] Keyword[int] identifier[fieldCount] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[fieldCount] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[int] identifier[fieldModifierFlags] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[isPublicField] operator[=] operator[SEP] operator[SEP] identifier[fieldModifierFlags] operator[&] literal[Integer] operator[SEP] operator[==] literal[Integer] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[isStaticFinalField] operator[=] operator[SEP] operator[SEP] identifier[fieldModifierFlags] operator[&] literal[Integer] operator[SEP] operator[==] literal[Integer] operator[SEP] operator[SEP] Keyword[final] Keyword[boolean] identifier[fieldIsVisible] operator[=] identifier[isPublicField] operator[||] identifier[scanSpec] operator[SEP] identifier[ignoreFieldVisibility] operator[SEP] Keyword[final] Keyword[boolean] identifier[getStaticFinalFieldConstValue] operator[=] identifier[scanSpec] operator[SEP] identifier[enableStaticFinalFieldConstantInitializerValues] operator[&&] identifier[isStaticFinalField] operator[&&] identifier[fieldIsVisible] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[fieldIsVisible] operator[||] operator[SEP] operator[!] identifier[scanSpec] operator[SEP] identifier[enableFieldInfo] operator[&&] operator[!] identifier[getStaticFinalFieldConstValue] operator[SEP] operator[SEP] { identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[attributesCount] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[attributesCount] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[attributeLength] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readInt] operator[SEP] operator[SEP] operator[SEP] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[skip] operator[SEP] identifier[attributeLength] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[final] Keyword[int] identifier[fieldNameCpIdx] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[fieldName] operator[=] identifier[getConstantPoolString] operator[SEP] identifier[fieldNameCpIdx] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[fieldTypeDescriptorCpIdx] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[char] identifier[fieldTypeDescriptorFirstChar] operator[=] operator[SEP] Keyword[char] operator[SEP] identifier[getConstantPoolStringFirstByte] operator[SEP] identifier[fieldTypeDescriptorCpIdx] operator[SEP] operator[SEP] identifier[String] identifier[fieldTypeDescriptor] operator[SEP] identifier[String] identifier[fieldTypeSignature] operator[=] Other[null] operator[SEP] identifier[fieldTypeDescriptor] operator[=] identifier[getConstantPoolString] operator[SEP] identifier[fieldTypeDescriptorCpIdx] operator[SEP] operator[SEP] identifier[Object] identifier[fieldConstValue] operator[=] Other[null] operator[SEP] identifier[AnnotationInfoList] identifier[fieldAnnotationInfo] operator[=] Other[null] operator[SEP] Keyword[final] Keyword[int] identifier[attributesCount] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[attributesCount] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[final] Keyword[int] identifier[attributeNameCpIdx] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[attributeLength] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readInt] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[getStaticFinalFieldConstValue] operator[SEP] operator[&&] identifier[constantPoolStringEquals] operator[SEP] identifier[attributeNameCpIdx] , literal[String] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[cpIdx] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cpIdx] operator[<] Other[1] operator[||] identifier[cpIdx] operator[>=] identifier[cpCount] operator[SEP] { Keyword[throw] Keyword[new] identifier[ClassfileFormatException] operator[SEP] literal[String] operator[+] identifier[cpIdx] operator[+] literal[String] operator[+] operator[SEP] identifier[cpCount] operator[-] Other[1] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[fieldConstValue] operator[=] identifier[getFieldConstantPoolValue] operator[SEP] identifier[entryTag] operator[SEP] identifier[cpIdx] operator[SEP] , identifier[fieldTypeDescriptorFirstChar] , identifier[cpIdx] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[fieldIsVisible] operator[&&] identifier[constantPoolStringEquals] operator[SEP] identifier[attributeNameCpIdx] , literal[String] operator[SEP] operator[SEP] { identifier[fieldTypeSignature] operator[=] identifier[getConstantPoolString] operator[SEP] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[scanSpec] operator[SEP] identifier[enableAnnotationInfo] operator[&&] operator[SEP] identifier[constantPoolStringEquals] operator[SEP] identifier[attributeNameCpIdx] , literal[String] operator[SEP] operator[||] operator[SEP] operator[!] identifier[scanSpec] operator[SEP] identifier[disableRuntimeInvisibleAnnotations] operator[&&] identifier[constantPoolStringEquals] operator[SEP] identifier[attributeNameCpIdx] , literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] Keyword[int] identifier[fieldAnnotationCount] operator[=] identifier[inputStreamOrByteBuffer] operator[SEP] identifier[readUnsignedShort] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fieldAnnotationCount] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[fieldAnnotationInfo] operator[==] Other[null] operator[SEP] { identifier[fieldAnnotationInfo] operator[=] Keyword[new] identifier[AnnotationInfoList] operator[SEP] Other[1] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[k] operator[=] Other[0] operator[SEP] identifier[k] operator[<] identifier[fieldAnnotationCount] operator[SEP] identifier[k] operator[++] operator[SEP] { Keyword[final] identifier[AnnotationInfo] identifier[fieldAnnotation] operator[=] identifier[readAnnotation] operator[SEP] operator[SEP] operator[SEP] identifier[fieldAnnotationInfo] operator[SEP] identifier[add] operator[SEP] identifier[fieldAnnotation] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[inputStreamOrByteBuffer] operator[SEP] identifier[skip] operator[SEP] identifier[attributeLength] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[scanSpec] operator[SEP] identifier[enableFieldInfo] operator[&&] identifier[fieldIsVisible] operator[SEP] { Keyword[if] operator[SEP] identifier[fieldInfoList] operator[==] Other[null] operator[SEP] { identifier[fieldInfoList] operator[=] Keyword[new] identifier[FieldInfoList] operator[SEP] operator[SEP] operator[SEP] } identifier[fieldInfoList] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[FieldInfo] operator[SEP] identifier[className] , identifier[fieldName] , identifier[fieldModifierFlags] , identifier[fieldTypeDescriptor] , identifier[fieldTypeSignature] , identifier[fieldConstValue] , identifier[fieldAnnotationInfo] operator[SEP] operator[SEP] operator[SEP] } } } }
@Nullable public static ImmutablePair<Schema, Schema> findSchema(Set<Schema> output, Set<Schema> input) { ImmutablePair<Schema, Schema> compatibleSchema = null; for (Schema outputSchema : output) { for (Schema inputSchema : input) { if (outputSchema.equals(inputSchema)) { return new ImmutablePair<Schema, Schema>(inputSchema, outputSchema); } if (outputSchema.isCompatible(inputSchema)) { // If there are more than one compatible, then it's a problem // we should have only strictly one. if (compatibleSchema != null) { return null; } compatibleSchema = new ImmutablePair<Schema, Schema>(outputSchema, inputSchema); } } } return compatibleSchema; }
class class_name[name] begin[{] method[findSchema, return_type[type[ImmutablePair]], modifier[public static], parameter[output, input]] begin[{] local_variable[type[ImmutablePair], compatibleSchema] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=inputSchema, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=outputSchema, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=inputSchema, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=outputSchema, 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=Schema, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Schema, sub_type=None))], dimensions=None, name=ImmutablePair, sub_type=None)), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=inputSchema, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isCompatible, postfix_operators=[], prefix_operators=[], qualifier=outputSchema, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=compatibleSchema, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=compatibleSchema, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=outputSchema, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=inputSchema, 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=Schema, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Schema, sub_type=None))], dimensions=None, name=ImmutablePair, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=inputSchema)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Schema, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=outputSchema)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Schema, sub_type=None))), label=None) return[member[.compatibleSchema]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[static] identifier[ImmutablePair] operator[<] identifier[Schema] , identifier[Schema] operator[>] identifier[findSchema] operator[SEP] identifier[Set] operator[<] identifier[Schema] operator[>] identifier[output] , identifier[Set] operator[<] identifier[Schema] operator[>] identifier[input] operator[SEP] { identifier[ImmutablePair] operator[<] identifier[Schema] , identifier[Schema] operator[>] identifier[compatibleSchema] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Schema] identifier[outputSchema] operator[:] identifier[output] operator[SEP] { Keyword[for] operator[SEP] identifier[Schema] identifier[inputSchema] operator[:] identifier[input] operator[SEP] { Keyword[if] operator[SEP] identifier[outputSchema] operator[SEP] identifier[equals] operator[SEP] identifier[inputSchema] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[ImmutablePair] operator[<] identifier[Schema] , identifier[Schema] operator[>] operator[SEP] identifier[inputSchema] , identifier[outputSchema] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[outputSchema] operator[SEP] identifier[isCompatible] operator[SEP] identifier[inputSchema] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[compatibleSchema] operator[!=] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[compatibleSchema] operator[=] Keyword[new] identifier[ImmutablePair] operator[<] identifier[Schema] , identifier[Schema] operator[>] operator[SEP] identifier[outputSchema] , identifier[inputSchema] operator[SEP] operator[SEP] } } } Keyword[return] identifier[compatibleSchema] operator[SEP] }
private KeyPersons getKeyPersons(BudgetPeriodDto periodInfo) { KeyPersons keyPersons = KeyPersons.Factory.newInstance(); if (periodInfo != null) { if (periodInfo.getKeyPersons() != null) { KeyPersonDataType[] keyPersonDataTypeArray = new KeyPersonDataType[periodInfo.getKeyPersons().size()]; int keyPersonCount = 0; for (KeyPersonDto keyPerson : periodInfo.getKeyPersons()) { KeyPersonDataType keyPersonDataType = KeyPersonDataType.Factory.newInstance(); keyPersonDataType.setName(globLibV10Generator.getHumanNameDataType(keyPerson)); keyPersonDataType.setProjectRole(keyPerson.getRole()); keyPersonDataType.setCompensation(getCompensation(keyPerson)); keyPersonDataTypeArray[keyPersonCount] = keyPersonDataType; keyPersonCount++; LOG.info("keyPersonCount:" + keyPersonCount); } keyPersons.setKeyPersonArray(keyPersonDataTypeArray); } SummaryDataType summary = SummaryDataType.Factory.newInstance(); if (periodInfo.getTotalFundsKeyPersons() != null) { summary.setFederalSummary(periodInfo.getTotalFundsKeyPersons().bigDecimalValue()); } if (periodInfo.getTotalNonFundsKeyPersons() != null) { summary.setNonFederalSummary(periodInfo.getTotalNonFundsKeyPersons().bigDecimalValue()); if (periodInfo.getTotalFundsKeyPersons() != null) { summary.setTotalFedNonFedSummary(periodInfo.getTotalFundsKeyPersons().add( periodInfo.getTotalNonFundsKeyPersons()).bigDecimalValue()); } else { summary.setTotalFedNonFedSummary(periodInfo.getTotalNonFundsKeyPersons().bigDecimalValue()); } } keyPersons.setTotalFundForKeyPersons(summary); SummaryDataType summaryAttachedKey = SummaryDataType.Factory.newInstance(); if (periodInfo.getKeyPersons() != null && periodInfo.getKeyPersons().size() > 0) { if (periodInfo.getKeyPersons().get(0).getFundsRequested() != null) { summaryAttachedKey.setFederalSummary(periodInfo.getKeyPersons().get(0).getFundsRequested().bigDecimalValue()); } if (periodInfo.getKeyPersons().get(0).getNonFundsRequested() != null) { summaryAttachedKey.setNonFederalSummary(periodInfo.getKeyPersons().get(0).getNonFundsRequested() .bigDecimalValue()); if (periodInfo.getKeyPersons().get(0).getFundsRequested() != null) { summaryAttachedKey.setTotalFedNonFedSummary(periodInfo.getKeyPersons().get(0).getFundsRequested().add( periodInfo.getKeyPersons().get(0).getNonFundsRequested()).bigDecimalValue()); } else { summaryAttachedKey.setTotalFedNonFedSummary(periodInfo.getKeyPersons().get(0).getNonFundsRequested() .bigDecimalValue()); } } } keyPersons.setTotalFundForAttachedKeyPersons(summaryAttachedKey); } AttachedFileDataType attachedFileDataType = null; for (NarrativeContract narrative : pdDoc.getDevelopmentProposal().getNarratives()) { if (narrative.getNarrativeType().getCode() != null && Integer.parseInt(narrative.getNarrativeType().getCode()) == ADDITIONAL_KEYPERSONS_ATTACHMENT) { attachedFileDataType = getAttachedFileType(narrative); if(attachedFileDataType != null){ keyPersons.setAttachedKeyPersons(attachedFileDataType); break; } } } return keyPersons; }
class class_name[name] begin[{] method[getKeyPersons, return_type[type[KeyPersons]], modifier[private], parameter[periodInfo]] begin[{] local_variable[type[KeyPersons], keyPersons] if[binary_operation[member[.periodInfo], !=, literal[null]]] begin[{] if[binary_operation[call[periodInfo.getKeyPersons, parameter[]], !=, literal[null]]] begin[{] local_variable[type[KeyPersonDataType], keyPersonDataTypeArray] local_variable[type[int], keyPersonCount] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=KeyPersonDataType.Factory, selectors=[], type_arguments=None), name=keyPersonDataType)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=KeyPersonDataType, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=keyPerson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getHumanNameDataType, postfix_operators=[], prefix_operators=[], qualifier=globLibV10Generator, selectors=[], type_arguments=None)], member=setName, postfix_operators=[], prefix_operators=[], qualifier=keyPersonDataType, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRole, postfix_operators=[], prefix_operators=[], qualifier=keyPerson, selectors=[], type_arguments=None)], member=setProjectRole, postfix_operators=[], prefix_operators=[], qualifier=keyPersonDataType, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=keyPerson, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCompensation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setCompensation, postfix_operators=[], prefix_operators=[], qualifier=keyPersonDataType, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=keyPersonDataTypeArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=keyPersonCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=keyPersonDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MemberReference(member=keyPersonCount, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="keyPersonCount:"), operandr=MemberReference(member=keyPersonCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=info, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getKeyPersons, postfix_operators=[], prefix_operators=[], qualifier=periodInfo, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=keyPerson)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=KeyPersonDto, sub_type=None))), label=None) call[keyPersons.setKeyPersonArray, parameter[member[.keyPersonDataTypeArray]]] else begin[{] None end[}] local_variable[type[SummaryDataType], summary] if[binary_operation[call[periodInfo.getTotalFundsKeyPersons, parameter[]], !=, literal[null]]] begin[{] call[summary.setFederalSummary, parameter[call[periodInfo.getTotalFundsKeyPersons, parameter[]]]] else begin[{] None end[}] if[binary_operation[call[periodInfo.getTotalNonFundsKeyPersons, parameter[]], !=, literal[null]]] begin[{] call[summary.setNonFederalSummary, parameter[call[periodInfo.getTotalNonFundsKeyPersons, parameter[]]]] if[binary_operation[call[periodInfo.getTotalFundsKeyPersons, parameter[]], !=, literal[null]]] begin[{] call[summary.setTotalFedNonFedSummary, parameter[call[periodInfo.getTotalFundsKeyPersons, parameter[]]]] else begin[{] call[summary.setTotalFedNonFedSummary, parameter[call[periodInfo.getTotalNonFundsKeyPersons, parameter[]]]] end[}] else begin[{] None end[}] call[keyPersons.setTotalFundForKeyPersons, parameter[member[.summary]]] local_variable[type[SummaryDataType], summaryAttachedKey] if[binary_operation[binary_operation[call[periodInfo.getKeyPersons, parameter[]], !=, literal[null]], &&, binary_operation[call[periodInfo.getKeyPersons, parameter[]], >, literal[0]]]] begin[{] if[binary_operation[call[periodInfo.getKeyPersons, parameter[]], !=, literal[null]]] begin[{] call[summaryAttachedKey.setFederalSummary, parameter[call[periodInfo.getKeyPersons, parameter[]]]] else begin[{] None end[}] if[binary_operation[call[periodInfo.getKeyPersons, parameter[]], !=, literal[null]]] begin[{] call[summaryAttachedKey.setNonFederalSummary, parameter[call[periodInfo.getKeyPersons, parameter[]]]] if[binary_operation[call[periodInfo.getKeyPersons, parameter[]], !=, literal[null]]] begin[{] call[summaryAttachedKey.setTotalFedNonFedSummary, parameter[call[periodInfo.getKeyPersons, parameter[]]]] else begin[{] call[summaryAttachedKey.setTotalFedNonFedSummary, parameter[call[periodInfo.getKeyPersons, parameter[]]]] end[}] else begin[{] None end[}] else begin[{] None end[}] call[keyPersons.setTotalFundForAttachedKeyPersons, parameter[member[.summaryAttachedKey]]] else begin[{] None end[}] local_variable[type[AttachedFileDataType], attachedFileDataType] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=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=!=), operandr=BinaryOperation(operandl=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), operandr=MemberReference(member=ADDITIONAL_KEYPERSONS_ATTACHMENT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, 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=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=attachedFileDataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setAttachedKeyPersons, postfix_operators=[], prefix_operators=[], qualifier=keyPersons, selectors=[], type_arguments=None), label=None), BreakStatement(goto=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) return[member[.keyPersons]] end[}] END[}]
Keyword[private] identifier[KeyPersons] identifier[getKeyPersons] operator[SEP] identifier[BudgetPeriodDto] identifier[periodInfo] operator[SEP] { identifier[KeyPersons] identifier[keyPersons] operator[=] identifier[KeyPersons] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[periodInfo] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[KeyPersonDataType] operator[SEP] operator[SEP] identifier[keyPersonDataTypeArray] operator[=] Keyword[new] identifier[KeyPersonDataType] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[keyPersonCount] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[KeyPersonDto] identifier[keyPerson] operator[:] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[SEP] { identifier[KeyPersonDataType] identifier[keyPersonDataType] operator[=] identifier[KeyPersonDataType] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[keyPersonDataType] operator[SEP] identifier[setName] operator[SEP] identifier[globLibV10Generator] operator[SEP] identifier[getHumanNameDataType] operator[SEP] identifier[keyPerson] operator[SEP] operator[SEP] operator[SEP] identifier[keyPersonDataType] operator[SEP] identifier[setProjectRole] operator[SEP] identifier[keyPerson] operator[SEP] identifier[getRole] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[keyPersonDataType] operator[SEP] identifier[setCompensation] operator[SEP] identifier[getCompensation] operator[SEP] identifier[keyPerson] operator[SEP] operator[SEP] operator[SEP] identifier[keyPersonDataTypeArray] operator[SEP] identifier[keyPersonCount] operator[SEP] operator[=] identifier[keyPersonDataType] operator[SEP] identifier[keyPersonCount] operator[++] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[+] identifier[keyPersonCount] operator[SEP] operator[SEP] } identifier[keyPersons] operator[SEP] identifier[setKeyPersonArray] operator[SEP] identifier[keyPersonDataTypeArray] operator[SEP] operator[SEP] } identifier[SummaryDataType] identifier[summary] operator[=] identifier[SummaryDataType] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getTotalFundsKeyPersons] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[summary] operator[SEP] identifier[setFederalSummary] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getTotalFundsKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[bigDecimalValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getTotalNonFundsKeyPersons] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[summary] operator[SEP] identifier[setNonFederalSummary] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getTotalNonFundsKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[bigDecimalValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getTotalFundsKeyPersons] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[summary] operator[SEP] identifier[setTotalFedNonFedSummary] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getTotalFundsKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getTotalNonFundsKeyPersons] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bigDecimalValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[summary] operator[SEP] identifier[setTotalFedNonFedSummary] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getTotalNonFundsKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[bigDecimalValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[keyPersons] operator[SEP] identifier[setTotalFundForKeyPersons] operator[SEP] identifier[summary] operator[SEP] operator[SEP] identifier[SummaryDataType] identifier[summaryAttachedKey] operator[=] identifier[SummaryDataType] operator[SEP] identifier[Factory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getFundsRequested] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[summaryAttachedKey] operator[SEP] identifier[setFederalSummary] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getFundsRequested] operator[SEP] operator[SEP] operator[SEP] identifier[bigDecimalValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getNonFundsRequested] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[summaryAttachedKey] operator[SEP] identifier[setNonFederalSummary] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getNonFundsRequested] operator[SEP] operator[SEP] operator[SEP] identifier[bigDecimalValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getFundsRequested] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[summaryAttachedKey] operator[SEP] identifier[setTotalFedNonFedSummary] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getFundsRequested] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getNonFundsRequested] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[bigDecimalValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[summaryAttachedKey] operator[SEP] identifier[setTotalFedNonFedSummary] operator[SEP] identifier[periodInfo] operator[SEP] identifier[getKeyPersons] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getNonFundsRequested] operator[SEP] operator[SEP] operator[SEP] identifier[bigDecimalValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } identifier[keyPersons] operator[SEP] identifier[setTotalFundForAttachedKeyPersons] operator[SEP] identifier[summaryAttachedKey] 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[&&] 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[==] identifier[ADDITIONAL_KEYPERSONS_ATTACHMENT] operator[SEP] { identifier[attachedFileDataType] operator[=] identifier[getAttachedFileType] operator[SEP] identifier[narrative] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attachedFileDataType] operator[!=] Other[null] operator[SEP] { identifier[keyPersons] operator[SEP] identifier[setAttachedKeyPersons] operator[SEP] identifier[attachedFileDataType] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[return] identifier[keyPersons] operator[SEP] }
public void sleeShutdown() { logger.info("Undeploying all Deployable Units due to SLEE shutdown"); // undeploy each DU in reverse order while(!deployedDUs.isEmpty()) { DeployableUnit du = deployedDUs.removeLast(); try { uninstallDeployableUnit(du); } catch (Exception e) { logger.error("Failed to uninstall DU, in SLEE shutdown",e); } } }
class class_name[name] begin[{] method[sleeShutdown, return_type[void], modifier[public], parameter[]] begin[{] call[logger.info, parameter[literal["Undeploying all Deployable Units due to SLEE shutdown"]]] while[call[deployedDUs.isEmpty, parameter[]]] begin[{] local_variable[type[DeployableUnit], du] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=du, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=uninstallDeployableUnit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failed to uninstall DU, in SLEE shutdown"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[sleeShutdown] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[!] identifier[deployedDUs] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[DeployableUnit] identifier[du] operator[=] identifier[deployedDUs] operator[SEP] identifier[removeLast] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[uninstallDeployableUnit] operator[SEP] identifier[du] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } }
@Override public BundleEntry getEntry(String path) { path = preSlashify(path); if (path.equals("/")) { return new RootModuleEntry(container); } Entry entry = container.getEntry(path); return entry == null ? null : new ModuleEntry(entry, postSlashify(path, entry)); }
class class_name[name] begin[{] method[getEntry, return_type[type[BundleEntry]], modifier[public], parameter[path]] begin[{] assign[member[.path], call[.preSlashify, parameter[member[.path]]]] if[call[path.equals, parameter[literal["/"]]]] begin[{] return[ClassCreator(arguments=[MemberReference(member=container, 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=RootModuleEntry, sub_type=None))] else begin[{] None end[}] local_variable[type[Entry], entry] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=ClassCreator(arguments=[MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=path, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=entry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=postSlashify, 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=ModuleEntry, sub_type=None)), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[BundleEntry] identifier[getEntry] operator[SEP] identifier[String] identifier[path] operator[SEP] { identifier[path] operator[=] identifier[preSlashify] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[path] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[RootModuleEntry] operator[SEP] identifier[container] operator[SEP] operator[SEP] } identifier[Entry] identifier[entry] operator[=] identifier[container] operator[SEP] identifier[getEntry] operator[SEP] identifier[path] operator[SEP] operator[SEP] Keyword[return] identifier[entry] operator[==] Other[null] operator[?] Other[null] operator[:] Keyword[new] identifier[ModuleEntry] operator[SEP] identifier[entry] , identifier[postSlashify] operator[SEP] identifier[path] , identifier[entry] operator[SEP] operator[SEP] operator[SEP] }
@Override public boolean matches(TargetProperties targetConatiner, IBond targetBond) { if (this.smartQueryBond != null) { return smartQueryBond.matches(targetBond); } else { if (!isBondMatchFlag()) { return true; } if (isBondMatchFlag() && isBondTypeMatch(targetBond)) { return true; } if (isBondMatchFlag() && this.unsaturation == getUnsaturation(targetConatiner, targetBond)) { return true; } } return false; }
class class_name[name] begin[{] method[matches, return_type[type[boolean]], modifier[public], parameter[targetConatiner, targetBond]] begin[{] if[binary_operation[THIS[member[None.smartQueryBond]], !=, literal[null]]] begin[{] return[call[smartQueryBond.matches, parameter[member[.targetBond]]]] else begin[{] if[call[.isBondMatchFlag, parameter[]]] begin[{] return[literal[true]] else begin[{] None end[}] if[binary_operation[call[.isBondMatchFlag, parameter[]], &&, call[.isBondTypeMatch, parameter[member[.targetBond]]]]] begin[{] return[literal[true]] else begin[{] None end[}] if[binary_operation[call[.isBondMatchFlag, parameter[]], &&, binary_operation[THIS[member[None.unsaturation]], ==, call[.getUnsaturation, parameter[member[.targetConatiner], member[.targetBond]]]]]] begin[{] return[literal[true]] else begin[{] None end[}] end[}] return[literal[false]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[matches] operator[SEP] identifier[TargetProperties] identifier[targetConatiner] , identifier[IBond] identifier[targetBond] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[smartQueryBond] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[smartQueryBond] operator[SEP] identifier[matches] operator[SEP] identifier[targetBond] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] operator[!] identifier[isBondMatchFlag] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[isBondMatchFlag] operator[SEP] operator[SEP] operator[&&] identifier[isBondTypeMatch] operator[SEP] identifier[targetBond] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[isBondMatchFlag] operator[SEP] operator[SEP] operator[&&] Keyword[this] operator[SEP] identifier[unsaturation] operator[==] identifier[getUnsaturation] operator[SEP] identifier[targetConatiner] , identifier[targetBond] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public java.util.List<ListPoliciesGrantingServiceAccessEntry> getPoliciesGrantingServiceAccess() { if (policiesGrantingServiceAccess == null) { policiesGrantingServiceAccess = new com.amazonaws.internal.SdkInternalList<ListPoliciesGrantingServiceAccessEntry>(); } return policiesGrantingServiceAccess; }
class class_name[name] begin[{] method[getPoliciesGrantingServiceAccess, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.policiesGrantingServiceAccess], ==, literal[null]]] begin[{] assign[member[.policiesGrantingServiceAccess], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ListPoliciesGrantingServiceAccessEntry, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.policiesGrantingServiceAccess]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[ListPoliciesGrantingServiceAccessEntry] operator[>] identifier[getPoliciesGrantingServiceAccess] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[policiesGrantingServiceAccess] operator[==] Other[null] operator[SEP] { identifier[policiesGrantingServiceAccess] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[ListPoliciesGrantingServiceAccessEntry] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[policiesGrantingServiceAccess] operator[SEP] }
@Override public void start(PrintStream writer, String[] params) { parse(params); out = writer; if (getId() == 0) { Log.debug("round 1"); send(1, new Token2(1, 1)); } }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[writer, params]] begin[{] call[.parse, parameter[member[.params]]] assign[member[.out], member[.writer]] if[binary_operation[call[.getId, parameter[]], ==, literal[0]]] begin[{] call[Log.debug, parameter[literal["round 1"]]] call[.send, parameter[literal[1], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Token2, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] identifier[PrintStream] identifier[writer] , identifier[String] operator[SEP] operator[SEP] identifier[params] operator[SEP] { identifier[parse] operator[SEP] identifier[params] operator[SEP] operator[SEP] identifier[out] operator[=] identifier[writer] operator[SEP] Keyword[if] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] { identifier[Log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[send] operator[SEP] Other[1] , Keyword[new] identifier[Token2] operator[SEP] Other[1] , Other[1] operator[SEP] operator[SEP] operator[SEP] } }
@SuppressWarnings("unchecked") public static <T> T execMethod(Method method, Object target, Object... params) { allowAccess(method); try { return (T) method.invoke(target, params); } catch (Throwable e) { throw new ReflectException(e); } }
class class_name[name] begin[{] method[execMethod, return_type[type[T]], modifier[public static], parameter[method, target, params]] begin[{] call[.allowAccess, parameter[member[.method]]] TryStatement(block=[ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[MemberReference(member=target, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReflectException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[execMethod] operator[SEP] identifier[Method] identifier[method] , identifier[Object] identifier[target] , identifier[Object] operator[...] identifier[params] operator[SEP] { identifier[allowAccess] operator[SEP] identifier[method] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] operator[SEP] identifier[T] operator[SEP] identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[target] , identifier[params] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ReflectException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
private boolean validateAliasiablePrimitiveCall(NodeTraversal t, Node n, String methodName) { return validatePrimitiveCallWithMessage( t, n, methodName, ProcessClosurePrimitives.CLOSURE_CALL_CANNOT_BE_ALIASED_OUTSIDE_MODULE_ERROR); }
class class_name[name] begin[{] method[validateAliasiablePrimitiveCall, return_type[type[boolean]], modifier[private], parameter[t, n, methodName]] begin[{] return[call[.validatePrimitiveCallWithMessage, parameter[member[.t], member[.n], member[.methodName], member[ProcessClosurePrimitives.CLOSURE_CALL_CANNOT_BE_ALIASED_OUTSIDE_MODULE_ERROR]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[validateAliasiablePrimitiveCall] operator[SEP] identifier[NodeTraversal] identifier[t] , identifier[Node] identifier[n] , identifier[String] identifier[methodName] operator[SEP] { Keyword[return] identifier[validatePrimitiveCallWithMessage] operator[SEP] identifier[t] , identifier[n] , identifier[methodName] , identifier[ProcessClosurePrimitives] operator[SEP] identifier[CLOSURE_CALL_CANNOT_BE_ALIASED_OUTSIDE_MODULE_ERROR] operator[SEP] operator[SEP] }
public void marshall(BatchGetItemRequest batchGetItemRequest, ProtocolMarshaller protocolMarshaller) { if (batchGetItemRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(batchGetItemRequest.getRequestItems(), REQUESTITEMS_BINDING); protocolMarshaller.marshall(batchGetItemRequest.getReturnConsumedCapacity(), RETURNCONSUMEDCAPACITY_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[batchGetItemRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.batchGetItemRequest], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRequestItems, postfix_operators=[], prefix_operators=[], qualifier=batchGetItemRequest, selectors=[], type_arguments=None), MemberReference(member=REQUESTITEMS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getReturnConsumedCapacity, postfix_operators=[], prefix_operators=[], qualifier=batchGetItemRequest, selectors=[], type_arguments=None), MemberReference(member=RETURNCONSUMEDCAPACITY_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[BatchGetItemRequest] identifier[batchGetItemRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[batchGetItemRequest] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[batchGetItemRequest] operator[SEP] identifier[getRequestItems] operator[SEP] operator[SEP] , identifier[REQUESTITEMS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[batchGetItemRequest] operator[SEP] identifier[getReturnConsumedCapacity] operator[SEP] operator[SEP] , identifier[RETURNCONSUMEDCAPACITY_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@Override public EClass getIfcShapeRepresentation() { if (ifcShapeRepresentationEClass == null) { ifcShapeRepresentationEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(597); } return ifcShapeRepresentationEClass; }
class class_name[name] begin[{] method[getIfcShapeRepresentation, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcShapeRepresentationEClass], ==, literal[null]]] begin[{] assign[member[.ifcShapeRepresentationEClass], Cast(expression=MethodInvocation(arguments=[MemberReference(member=eNS_URI, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package, selectors=[])], member=getEPackage, postfix_operators=[], prefix_operators=[], qualifier=EPackage.Registry.INSTANCE, selectors=[MethodInvocation(arguments=[], member=getEClassifiers, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=597)], 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[.ifcShapeRepresentationEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcShapeRepresentation] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcShapeRepresentationEClass] operator[==] Other[null] operator[SEP] { identifier[ifcShapeRepresentationEClass] operator[=] operator[SEP] identifier[EClass] operator[SEP] identifier[EPackage] operator[SEP] identifier[Registry] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[getEPackage] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[eNS_URI] operator[SEP] operator[SEP] identifier[getEClassifiers] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] Other[597] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcShapeRepresentationEClass] operator[SEP] }
private void obtainNavigationSelectionColor() { int color; try { color = ThemeUtil.getColor(this, R.attr.navigationSelectionColor); } catch (NotFoundException e) { color = ContextCompat.getColor(this, R.color.preference_selection_color_light); } setNavigationSelectionColor(color); }
class class_name[name] begin[{] method[obtainNavigationSelectionColor, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[int], color] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=color, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=navigationSelectionColor, postfix_operators=[], prefix_operators=[], qualifier=R.attr, selectors=[])], member=getColor, postfix_operators=[], prefix_operators=[], qualifier=ThemeUtil, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=color, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=preference_selection_color_light, postfix_operators=[], prefix_operators=[], qualifier=R.color, selectors=[])], member=getColor, postfix_operators=[], prefix_operators=[], qualifier=ContextCompat, selectors=[], type_arguments=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NotFoundException']))], finally_block=None, label=None, resources=None) call[.setNavigationSelectionColor, parameter[member[.color]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[obtainNavigationSelectionColor] operator[SEP] operator[SEP] { Keyword[int] identifier[color] operator[SEP] Keyword[try] { identifier[color] operator[=] identifier[ThemeUtil] operator[SEP] identifier[getColor] operator[SEP] Keyword[this] , identifier[R] operator[SEP] identifier[attr] operator[SEP] identifier[navigationSelectionColor] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NotFoundException] identifier[e] operator[SEP] { identifier[color] operator[=] identifier[ContextCompat] operator[SEP] identifier[getColor] operator[SEP] Keyword[this] , identifier[R] operator[SEP] identifier[color] operator[SEP] identifier[preference_selection_color_light] operator[SEP] operator[SEP] } identifier[setNavigationSelectionColor] operator[SEP] identifier[color] operator[SEP] operator[SEP] }
@Override public void warn(final MessageItem messageItem) { getLogger().log(messageItem.getMarker(), FQCN, LocationAwareLogger.WARN_INT, messageItem.getText(), null, null); }
class class_name[name] begin[{] method[warn, return_type[void], modifier[public], parameter[messageItem]] begin[{] call[.getLogger, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[warn] operator[SEP] Keyword[final] identifier[MessageItem] identifier[messageItem] operator[SEP] { identifier[getLogger] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[messageItem] operator[SEP] identifier[getMarker] operator[SEP] operator[SEP] , identifier[FQCN] , identifier[LocationAwareLogger] operator[SEP] identifier[WARN_INT] , identifier[messageItem] operator[SEP] identifier[getText] operator[SEP] operator[SEP] , Other[null] , Other[null] operator[SEP] operator[SEP] }
public void save(@NonNull View view) { int viewId = view.getId(); Preconditions.checkArgument(viewId != 0, "Cannot save state for View with no id " + view.getClass().getSimpleName()); SparseArray<Parcelable> state = new SparseArray<>(); view.saveHierarchyState(state); viewStateById.put(viewId, state); }
class class_name[name] begin[{] method[save, return_type[void], modifier[public], parameter[view]] begin[{] local_variable[type[int], viewId] call[Preconditions.checkArgument, parameter[binary_operation[member[.viewId], !=, literal[0]], binary_operation[literal["Cannot save state for View with no id "], +, call[view.getClass, parameter[]]]]] local_variable[type[SparseArray], state] call[view.saveHierarchyState, parameter[member[.state]]] call[viewStateById.put, parameter[member[.viewId], member[.state]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[save] operator[SEP] annotation[@] identifier[NonNull] identifier[View] identifier[view] operator[SEP] { Keyword[int] identifier[viewId] operator[=] identifier[view] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[viewId] operator[!=] Other[0] , literal[String] operator[+] identifier[view] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[SparseArray] operator[<] identifier[Parcelable] operator[>] identifier[state] operator[=] Keyword[new] identifier[SparseArray] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[view] operator[SEP] identifier[saveHierarchyState] operator[SEP] identifier[state] operator[SEP] operator[SEP] identifier[viewStateById] operator[SEP] identifier[put] operator[SEP] identifier[viewId] , identifier[state] operator[SEP] operator[SEP] }
@Nonnull public <T> T getInstance(@Nonnull Class<T> type) { return getInstance(new Key<>(type)); }
class class_name[name] begin[{] method[getInstance, return_type[type[T]], modifier[public], parameter[type]] begin[{] return[call[.getInstance, parameter[ClassCreator(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Key, sub_type=None))]]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[getInstance] operator[SEP] annotation[@] identifier[Nonnull] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] operator[SEP] { Keyword[return] identifier[getInstance] operator[SEP] Keyword[new] identifier[Key] operator[<] operator[>] operator[SEP] identifier[type] operator[SEP] operator[SEP] operator[SEP] }
protected XmlElement checkArrayWhere(IntrospectedTable introspectedTable) { XmlElement where = new XmlElement("where"); XmlElement include = new XmlElement("include"); include.addAttribute(new Attribute("refid", IDENTIFIERS_ARRAY_CONDITIONS)); where.addElement(include); return where; }
class class_name[name] begin[{] method[checkArrayWhere, return_type[type[XmlElement]], modifier[protected], parameter[introspectedTable]] begin[{] local_variable[type[XmlElement], where] local_variable[type[XmlElement], include] call[include.addAttribute, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="refid"), MemberReference(member=IDENTIFIERS_ARRAY_CONDITIONS, 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=Attribute, sub_type=None))]] call[where.addElement, parameter[member[.include]]] return[member[.where]] end[}] END[}]
Keyword[protected] identifier[XmlElement] identifier[checkArrayWhere] operator[SEP] identifier[IntrospectedTable] identifier[introspectedTable] operator[SEP] { identifier[XmlElement] identifier[where] operator[=] Keyword[new] identifier[XmlElement] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[XmlElement] identifier[include] operator[=] Keyword[new] identifier[XmlElement] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[include] operator[SEP] identifier[addAttribute] operator[SEP] Keyword[new] identifier[Attribute] operator[SEP] literal[String] , identifier[IDENTIFIERS_ARRAY_CONDITIONS] operator[SEP] operator[SEP] operator[SEP] identifier[where] operator[SEP] identifier[addElement] operator[SEP] identifier[include] operator[SEP] operator[SEP] Keyword[return] identifier[where] operator[SEP] }
public InsertAllResponse insert(String rowId1, String rowId2) { // [START ] List<RowToInsert> rows = new ArrayList<>(); Map<String, Object> row1 = new HashMap<>(); row1.put("stringField", "value1"); row1.put("booleanField", true); Map<String, Object> row2 = new HashMap<>(); row2.put("stringField", "value2"); row2.put("booleanField", false); rows.add(RowToInsert.of(rowId1, row1)); rows.add(RowToInsert.of(rowId2, row2)); InsertAllResponse response = table.insert(rows); // do something with response // [END ] return response; }
class class_name[name] begin[{] method[insert, return_type[type[InsertAllResponse]], modifier[public], parameter[rowId1, rowId2]] begin[{] local_variable[type[List], rows] local_variable[type[Map], row1] call[row1.put, parameter[literal["stringField"], literal["value1"]]] call[row1.put, parameter[literal["booleanField"], literal[true]]] local_variable[type[Map], row2] call[row2.put, parameter[literal["stringField"], literal["value2"]]] call[row2.put, parameter[literal["booleanField"], literal[false]]] call[rows.add, parameter[call[RowToInsert.of, parameter[member[.rowId1], member[.row1]]]]] call[rows.add, parameter[call[RowToInsert.of, parameter[member[.rowId2], member[.row2]]]]] local_variable[type[InsertAllResponse], response] return[member[.response]] end[}] END[}]
Keyword[public] identifier[InsertAllResponse] identifier[insert] operator[SEP] identifier[String] identifier[rowId1] , identifier[String] identifier[rowId2] operator[SEP] { identifier[List] operator[<] identifier[RowToInsert] operator[>] identifier[rows] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[row1] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[row1] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[row1] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[row2] operator[=] Keyword[new] identifier[HashMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[row2] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[row2] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[rows] operator[SEP] identifier[add] operator[SEP] identifier[RowToInsert] operator[SEP] identifier[of] operator[SEP] identifier[rowId1] , identifier[row1] operator[SEP] operator[SEP] operator[SEP] identifier[rows] operator[SEP] identifier[add] operator[SEP] identifier[RowToInsert] operator[SEP] identifier[of] operator[SEP] identifier[rowId2] , identifier[row2] operator[SEP] operator[SEP] operator[SEP] identifier[InsertAllResponse] identifier[response] operator[=] identifier[table] operator[SEP] identifier[insert] operator[SEP] identifier[rows] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public UberNode getFirstByRel(String rel) { // TODO consider less naive impl for (UberNode node : data) { List<String> myRels = node.getRel(); if (myRels != null) { for (String myRel : myRels) { if (rel.equals(myRel)) { return node; } } } } return null; }
class class_name[name] begin[{] method[getFirstByRel, return_type[type[UberNode]], modifier[public], parameter[rel]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getRel, postfix_operators=[], prefix_operators=[], qualifier=node, selectors=[], type_arguments=None), name=myRels)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=[], name=List, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=myRels, 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=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=myRel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=[], qualifier=rel, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=myRels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=myRel)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=UberNode, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] identifier[UberNode] identifier[getFirstByRel] operator[SEP] identifier[String] identifier[rel] operator[SEP] { Keyword[for] operator[SEP] identifier[UberNode] identifier[node] operator[:] identifier[data] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[myRels] operator[=] identifier[node] operator[SEP] identifier[getRel] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[myRels] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[myRel] operator[:] identifier[myRels] operator[SEP] { Keyword[if] operator[SEP] identifier[rel] operator[SEP] identifier[equals] operator[SEP] identifier[myRel] operator[SEP] operator[SEP] { Keyword[return] identifier[node] operator[SEP] } } } } Keyword[return] Other[null] operator[SEP] }
public static boolean is_vargiya5(String str) { if (str.equals("Y") || str.equals("m") || str.equals("N") || str.equals("R") || str.equals("n")) return true; return false; }
class class_name[name] begin[{] method[is_vargiya5, return_type[type[boolean]], modifier[public static], parameter[str]] begin[{] if[binary_operation[binary_operation[binary_operation[binary_operation[call[str.equals, parameter[literal["Y"]]], ||, call[str.equals, parameter[literal["m"]]]], ||, call[str.equals, parameter[literal["N"]]]], ||, call[str.equals, parameter[literal["R"]]]], ||, call[str.equals, parameter[literal["n"]]]]] begin[{] return[literal[true]] else begin[{] None end[}] return[literal[false]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[is_vargiya5] operator[SEP] identifier[String] identifier[str] operator[SEP] { Keyword[if] operator[SEP] identifier[str] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[str] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[str] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[str] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[str] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
private void printPlugins() { final List<String> installedPlugins = Plugins.getInstalledPlugins(); for (final String plugin : installedPlugins) { System.out.println(plugin); } }
class class_name[name] begin[{] method[printPlugins, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[List], installedPlugins] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=plugin, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=installedPlugins, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=plugin)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[printPlugins] operator[SEP] operator[SEP] { Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[installedPlugins] operator[=] identifier[Plugins] operator[SEP] identifier[getInstalledPlugins] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[final] identifier[String] identifier[plugin] operator[:] identifier[installedPlugins] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[plugin] operator[SEP] operator[SEP] } }
public void marshall(EnvironmentPropertyUpdates environmentPropertyUpdates, ProtocolMarshaller protocolMarshaller) { if (environmentPropertyUpdates == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(environmentPropertyUpdates.getPropertyGroups(), PROPERTYGROUPS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[environmentPropertyUpdates, protocolMarshaller]] begin[{] if[binary_operation[member[.environmentPropertyUpdates], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getPropertyGroups, postfix_operators=[], prefix_operators=[], qualifier=environmentPropertyUpdates, selectors=[], type_arguments=None), MemberReference(member=PROPERTYGROUPS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[EnvironmentPropertyUpdates] identifier[environmentPropertyUpdates] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[environmentPropertyUpdates] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[environmentPropertyUpdates] operator[SEP] identifier[getPropertyGroups] operator[SEP] operator[SEP] , identifier[PROPERTYGROUPS_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@SuppressWarnings({ "unchecked", "rawtypes" }) private List<AnnotationResolver> getAnnotationResolvers(GeneratorContext context, TreeLogger logger) { java.lang.reflect.Method m; ArrayList args = new ArrayList(); ArrayList types = new ArrayList(); types.add(GeneratorContext.class); args.add(context); types.add(TreeLogger.class); args.add(logger); Object[] argValues = args.toArray(); Class[] argtypes = (Class[]) types.toArray(new Class[argValues.length]); try { m = BINDING_DEFAULTS.getMethod("getAnnotationResolvers", argtypes); } catch (SecurityException e) { throw new RuntimeException("could not call method `getAnnotationResolvers´ on " + BINDING_DEFAULTS, e); } catch (NoSuchMethodException e) { throw new RuntimeException("could not resolve method `getAnnotationResolvers´ on " + BINDING_DEFAULTS, e); } List<AnnotationResolver> l; try { l = (List<AnnotationResolver>) m.invoke(null, context, logger); } catch (IllegalArgumentException e) { throw new RuntimeException("could not call method `getAnnotationResolvers´ on " + BINDING_DEFAULTS, e); } catch (IllegalAccessException e) { throw new RuntimeException("could not call method `getAnnotationResolvers´ on " + BINDING_DEFAULTS, e); } catch (InvocationTargetException e) { throw new RuntimeException("could not call method `getAnnotationResolvers´ on " + BINDING_DEFAULTS, e); } return l; }
class class_name[name] begin[{] method[getAnnotationResolvers, return_type[type[List]], modifier[private], parameter[context, logger]] begin[{] local_variable[type[java], m] local_variable[type[ArrayList], args] local_variable[type[ArrayList], types] call[types.add, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GeneratorContext, sub_type=None))]] call[args.add, parameter[member[.context]]] call[types.add, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TreeLogger, sub_type=None))]] call[args.add, parameter[member[.logger]]] local_variable[type[Object], argValues] local_variable[type[Class], argtypes] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="getAnnotationResolvers"), MemberReference(member=argtypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getMethod, postfix_operators=[], prefix_operators=[], qualifier=BINDING_DEFAULTS, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="could not call method `getAnnotationResolvers´ on "), operandr=MemberReference(member=BINDING_DEFAULTS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['SecurityException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="could not resolve method `getAnnotationResolvers´ on "), operandr=MemberReference(member=BINDING_DEFAULTS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoSuchMethodException']))], finally_block=None, label=None, resources=None) local_variable[type[List], l] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Cast(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=logger, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=m, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=AnnotationResolver, sub_type=None))], dimensions=[], name=List, sub_type=None))), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="could not call method `getAnnotationResolvers´ on "), operandr=MemberReference(member=BINDING_DEFAULTS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalArgumentException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="could not call method `getAnnotationResolvers´ on "), operandr=MemberReference(member=BINDING_DEFAULTS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="could not call method `getAnnotationResolvers´ on "), operandr=MemberReference(member=BINDING_DEFAULTS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InvocationTargetException']))], finally_block=None, label=None, resources=None) return[member[.l]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[private] identifier[List] operator[<] identifier[AnnotationResolver] operator[>] identifier[getAnnotationResolvers] operator[SEP] identifier[GeneratorContext] identifier[context] , identifier[TreeLogger] identifier[logger] operator[SEP] { identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[reflect] operator[SEP] identifier[Method] identifier[m] operator[SEP] identifier[ArrayList] identifier[args] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayList] identifier[types] operator[=] Keyword[new] identifier[ArrayList] operator[SEP] operator[SEP] operator[SEP] identifier[types] operator[SEP] identifier[add] operator[SEP] identifier[GeneratorContext] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[args] operator[SEP] identifier[add] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[types] operator[SEP] identifier[add] operator[SEP] identifier[TreeLogger] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[args] operator[SEP] identifier[add] operator[SEP] identifier[logger] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[argValues] operator[=] identifier[args] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] identifier[Class] operator[SEP] operator[SEP] identifier[argtypes] operator[=] operator[SEP] identifier[Class] operator[SEP] operator[SEP] operator[SEP] identifier[types] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[Class] operator[SEP] identifier[argValues] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[m] operator[=] identifier[BINDING_DEFAULTS] operator[SEP] identifier[getMethod] operator[SEP] literal[String] , identifier[argtypes] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SecurityException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[BINDING_DEFAULTS] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[BINDING_DEFAULTS] , identifier[e] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[AnnotationResolver] operator[>] identifier[l] operator[SEP] Keyword[try] { identifier[l] operator[=] operator[SEP] identifier[List] operator[<] identifier[AnnotationResolver] operator[>] operator[SEP] identifier[m] operator[SEP] identifier[invoke] operator[SEP] Other[null] , identifier[context] , identifier[logger] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalArgumentException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[BINDING_DEFAULTS] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[BINDING_DEFAULTS] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvocationTargetException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[+] identifier[BINDING_DEFAULTS] , identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[l] operator[SEP] }
private void readCalendars(Project project, HashMap<BigInteger, ProjectCalendar> map) { Project.Calendars calendars = project.getCalendars(); if (calendars != null) { LinkedList<Pair<ProjectCalendar, BigInteger>> baseCalendars = new LinkedList<Pair<ProjectCalendar, BigInteger>>(); for (Project.Calendars.Calendar cal : calendars.getCalendar()) { readCalendar(cal, map, baseCalendars); } updateBaseCalendarNames(baseCalendars, map); } try { ProjectProperties properties = m_projectFile.getProjectProperties(); BigInteger calendarID = new BigInteger(properties.getDefaultCalendarName()); ProjectCalendar calendar = map.get(calendarID); m_projectFile.setDefaultCalendar(calendar); } catch (Exception ex) { // Ignore exceptions } }
class class_name[name] begin[{] method[readCalendars, return_type[void], modifier[private], parameter[project, map]] begin[{] local_variable[type[Project], calendars] if[binary_operation[member[.calendars], !=, literal[null]]] begin[{] local_variable[type[LinkedList], baseCalendars] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=map, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=baseCalendars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readCalendar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getCalendar, postfix_operators=[], prefix_operators=[], qualifier=calendars, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cal)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Project, sub_type=ReferenceType(arguments=None, dimensions=None, name=Calendars, sub_type=ReferenceType(arguments=None, dimensions=None, name=Calendar, sub_type=None))))), label=None) call[.updateBaseCalendarNames, parameter[member[.baseCalendars], member[.map]]] else begin[{] None end[}] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getProjectProperties, postfix_operators=[], prefix_operators=[], qualifier=m_projectFile, selectors=[], type_arguments=None), name=properties)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ProjectProperties, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getDefaultCalendarName, postfix_operators=[], prefix_operators=[], qualifier=properties, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BigInteger, sub_type=None)), name=calendarID)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BigInteger, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=calendarID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=None), name=calendar)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ProjectCalendar, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=calendar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setDefaultCalendar, postfix_operators=[], prefix_operators=[], qualifier=m_projectFile, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[readCalendars] operator[SEP] identifier[Project] identifier[project] , identifier[HashMap] operator[<] identifier[BigInteger] , identifier[ProjectCalendar] operator[>] identifier[map] operator[SEP] { identifier[Project] operator[SEP] identifier[Calendars] identifier[calendars] operator[=] identifier[project] operator[SEP] identifier[getCalendars] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[calendars] operator[!=] Other[null] operator[SEP] { identifier[LinkedList] operator[<] identifier[Pair] operator[<] identifier[ProjectCalendar] , identifier[BigInteger] operator[>] operator[>] identifier[baseCalendars] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[Pair] operator[<] identifier[ProjectCalendar] , identifier[BigInteger] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Project] operator[SEP] identifier[Calendars] operator[SEP] identifier[Calendar] identifier[cal] operator[:] identifier[calendars] operator[SEP] identifier[getCalendar] operator[SEP] operator[SEP] operator[SEP] { identifier[readCalendar] operator[SEP] identifier[cal] , identifier[map] , identifier[baseCalendars] operator[SEP] operator[SEP] } identifier[updateBaseCalendarNames] operator[SEP] identifier[baseCalendars] , identifier[map] operator[SEP] operator[SEP] } Keyword[try] { identifier[ProjectProperties] identifier[properties] operator[=] identifier[m_projectFile] operator[SEP] identifier[getProjectProperties] operator[SEP] operator[SEP] operator[SEP] identifier[BigInteger] identifier[calendarID] operator[=] Keyword[new] identifier[BigInteger] operator[SEP] identifier[properties] operator[SEP] identifier[getDefaultCalendarName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[ProjectCalendar] identifier[calendar] operator[=] identifier[map] operator[SEP] identifier[get] operator[SEP] identifier[calendarID] operator[SEP] operator[SEP] identifier[m_projectFile] operator[SEP] identifier[setDefaultCalendar] operator[SEP] identifier[calendar] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { } }
public static Path addExtension(Path path, String... extensions) { StringBuilder pathStringBuilder = new StringBuilder(path.toString()); for (String extension : extensions) { if (!Strings.isNullOrEmpty(extension)) { pathStringBuilder.append(extension); } } return new Path(pathStringBuilder.toString()); }
class class_name[name] begin[{] method[addExtension, return_type[type[Path]], modifier[public static], parameter[path, extensions]] begin[{] local_variable[type[StringBuilder], pathStringBuilder] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=extension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNullOrEmpty, postfix_operators=[], prefix_operators=['!'], qualifier=Strings, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=extension, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=pathStringBuilder, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=extensions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=extension)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=pathStringBuilder, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Path, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Path] identifier[addExtension] operator[SEP] identifier[Path] identifier[path] , identifier[String] operator[...] identifier[extensions] operator[SEP] { identifier[StringBuilder] identifier[pathStringBuilder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[path] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[extension] operator[:] identifier[extensions] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[extension] operator[SEP] operator[SEP] { identifier[pathStringBuilder] operator[SEP] identifier[append] operator[SEP] identifier[extension] operator[SEP] operator[SEP] } } Keyword[return] Keyword[new] identifier[Path] operator[SEP] identifier[pathStringBuilder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static void generateSerializeOnXml(BindTypeContext context, BindEntity entity) { // @formatter:off MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("serializeOnXml") .addJavadoc("method for xml serialization\n").addAnnotation(Override.class) .addModifiers(Modifier.PUBLIC) // .addParameter(typeName(KriptonXmlContext.class), "context") .addParameter(typeName(entity.getElement()), "object") .addParameter(typeName(XMLSerializer.class), "xmlSerializer") .addParameter(typeName(Integer.TYPE), "currentEventType").returns(Void.TYPE) .addException(Exception.class); // @formatter:on methodBuilder.beginControlFlow("if (currentEventType == 0)"); methodBuilder.addStatement("xmlSerializer.writeStartElement(\"$L\")", entity.xmlInfo.label); // write namespace for (Pair<String, String> namespace : entity.xmlInfo.namespaces) { if (StringUtils.hasText(namespace.value0)) { methodBuilder.addStatement("xmlSerializer.writeAttribute(\"\", $S, $S)", "xmlns:" + namespace.value0, namespace.value1); } else { methodBuilder.addStatement("xmlSerializer.writeAttribute(\"\", $S, $S)", "xmlns", namespace.value1); } } methodBuilder.endControlFlow(); BindTransform bindTransform; methodBuilder.addCode("\n"); // attributes methodBuilder.addCode("// Persisted fields:\n\n"); for (BindProperty item : entity.getCollection()) { bindTransform = BindTransformer.lookup(item); methodBuilder.addCode("// field $L (mapped with $S)\n", item.getName(), BindProperty.xmlName(item)); if (item.hasTypeAdapter()) { methodBuilder.addCode("// field trasformation $L $L \n", item.typeAdapter.dataType, item.typeAdapter.adapterClazz); } bindTransform.generateSerializeOnXml(context, methodBuilder, "xmlSerializer", item.getPropertyType().getTypeName(), "object", item); methodBuilder.addCode("\n"); } methodBuilder.beginControlFlow("if (currentEventType == 0)"); methodBuilder.addStatement("xmlSerializer.writeEndElement()"); methodBuilder.endControlFlow(); // methodBuilder.nextControlFlow("catch($T e)", // typeName(Exception.class)); // methodBuilder.addStatement("e.printStackTrace()"); // methodBuilder.addStatement("throw (new $T(e))", // typeName(KriptonRuntimeException.class)); // methodBuilder.endControlFlow(); context.builder.addMethod(methodBuilder.build()); }
class class_name[name] begin[{] method[generateSerializeOnXml, return_type[void], modifier[private static], parameter[context, entity]] begin[{] local_variable[type[MethodSpec], methodBuilder] call[methodBuilder.beginControlFlow, parameter[literal["if (currentEventType == 0)"]]] call[methodBuilder.addStatement, parameter[literal["xmlSerializer.writeStartElement(\"$L\")"], member[entity.xmlInfo.label]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=value0, postfix_operators=[], prefix_operators=[], qualifier=namespace, selectors=[])], member=hasText, postfix_operators=[], prefix_operators=[], qualifier=StringUtils, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="xmlSerializer.writeAttribute(\"\", $S, $S)"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="xmlns"), MemberReference(member=value1, postfix_operators=[], prefix_operators=[], qualifier=namespace, selectors=[])], member=addStatement, postfix_operators=[], prefix_operators=[], qualifier=methodBuilder, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="xmlSerializer.writeAttribute(\"\", $S, $S)"), BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="xmlns:"), operandr=MemberReference(member=value0, postfix_operators=[], prefix_operators=[], qualifier=namespace, selectors=[]), operator=+), MemberReference(member=value1, postfix_operators=[], prefix_operators=[], qualifier=namespace, selectors=[])], member=addStatement, postfix_operators=[], prefix_operators=[], qualifier=methodBuilder, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=namespaces, postfix_operators=[], prefix_operators=[], qualifier=entity.xmlInfo, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=namespace)], 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=Pair, sub_type=None))), label=None) call[methodBuilder.endControlFlow, parameter[]] local_variable[type[BindTransform], bindTransform] call[methodBuilder.addCode, parameter[literal["\n"]]] call[methodBuilder.addCode, parameter[literal["// Persisted fields:\n\n"]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=bindTransform, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=lookup, postfix_operators=[], prefix_operators=[], qualifier=BindTransformer, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="// field $L (mapped with $S)\n"), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), MethodInvocation(arguments=[MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=xmlName, postfix_operators=[], prefix_operators=[], qualifier=BindProperty, selectors=[], type_arguments=None)], member=addCode, postfix_operators=[], prefix_operators=[], qualifier=methodBuilder, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=hasTypeAdapter, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="// field trasformation $L $L \n"), MemberReference(member=dataType, postfix_operators=[], prefix_operators=[], qualifier=item.typeAdapter, selectors=[]), MemberReference(member=adapterClazz, postfix_operators=[], prefix_operators=[], qualifier=item.typeAdapter, selectors=[])], member=addCode, postfix_operators=[], prefix_operators=[], qualifier=methodBuilder, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=methodBuilder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="xmlSerializer"), MethodInvocation(arguments=[], member=getPropertyType, postfix_operators=[], prefix_operators=[], qualifier=item, selectors=[MethodInvocation(arguments=[], member=getTypeName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="object"), MemberReference(member=item, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateSerializeOnXml, postfix_operators=[], prefix_operators=[], qualifier=bindTransform, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="\n")], member=addCode, postfix_operators=[], prefix_operators=[], qualifier=methodBuilder, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getCollection, postfix_operators=[], prefix_operators=[], qualifier=entity, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=item)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=BindProperty, sub_type=None))), label=None) call[methodBuilder.beginControlFlow, parameter[literal["if (currentEventType == 0)"]]] call[methodBuilder.addStatement, parameter[literal["xmlSerializer.writeEndElement()"]]] call[methodBuilder.endControlFlow, parameter[]] call[context.builder.addMethod, parameter[call[methodBuilder.build, parameter[]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[generateSerializeOnXml] operator[SEP] identifier[BindTypeContext] identifier[context] , identifier[BindEntity] identifier[entity] operator[SEP] { identifier[MethodSpec] operator[SEP] identifier[Builder] identifier[methodBuilder] operator[=] identifier[MethodSpec] operator[SEP] identifier[methodBuilder] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[addJavadoc] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[addAnnotation] operator[SEP] identifier[Override] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[addModifiers] operator[SEP] identifier[Modifier] operator[SEP] identifier[PUBLIC] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[typeName] operator[SEP] identifier[entity] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[typeName] operator[SEP] identifier[XMLSerializer] operator[SEP] Keyword[class] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[typeName] operator[SEP] identifier[Integer] operator[SEP] identifier[TYPE] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[returns] operator[SEP] identifier[Void] operator[SEP] identifier[TYPE] operator[SEP] operator[SEP] identifier[addException] operator[SEP] identifier[Exception] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[methodBuilder] operator[SEP] identifier[beginControlFlow] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[methodBuilder] operator[SEP] identifier[addStatement] operator[SEP] literal[String] , identifier[entity] operator[SEP] identifier[xmlInfo] operator[SEP] identifier[label] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Pair] operator[<] identifier[String] , identifier[String] operator[>] identifier[namespace] operator[:] identifier[entity] operator[SEP] identifier[xmlInfo] operator[SEP] identifier[namespaces] operator[SEP] { Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[hasText] operator[SEP] identifier[namespace] operator[SEP] identifier[value0] operator[SEP] operator[SEP] { identifier[methodBuilder] operator[SEP] identifier[addStatement] operator[SEP] literal[String] , literal[String] operator[+] identifier[namespace] operator[SEP] identifier[value0] , identifier[namespace] operator[SEP] identifier[value1] operator[SEP] operator[SEP] } Keyword[else] { identifier[methodBuilder] operator[SEP] identifier[addStatement] operator[SEP] literal[String] , literal[String] , identifier[namespace] operator[SEP] identifier[value1] operator[SEP] operator[SEP] } } identifier[methodBuilder] operator[SEP] identifier[endControlFlow] operator[SEP] operator[SEP] operator[SEP] identifier[BindTransform] identifier[bindTransform] operator[SEP] identifier[methodBuilder] operator[SEP] identifier[addCode] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[methodBuilder] operator[SEP] identifier[addCode] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[BindProperty] identifier[item] operator[:] identifier[entity] operator[SEP] identifier[getCollection] operator[SEP] operator[SEP] operator[SEP] { identifier[bindTransform] operator[=] identifier[BindTransformer] operator[SEP] identifier[lookup] operator[SEP] identifier[item] operator[SEP] operator[SEP] identifier[methodBuilder] operator[SEP] identifier[addCode] operator[SEP] literal[String] , identifier[item] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[BindProperty] operator[SEP] identifier[xmlName] operator[SEP] identifier[item] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[item] operator[SEP] identifier[hasTypeAdapter] operator[SEP] operator[SEP] operator[SEP] { identifier[methodBuilder] operator[SEP] identifier[addCode] operator[SEP] literal[String] , identifier[item] operator[SEP] identifier[typeAdapter] operator[SEP] identifier[dataType] , identifier[item] operator[SEP] identifier[typeAdapter] operator[SEP] identifier[adapterClazz] operator[SEP] operator[SEP] } identifier[bindTransform] operator[SEP] identifier[generateSerializeOnXml] operator[SEP] identifier[context] , identifier[methodBuilder] , literal[String] , identifier[item] operator[SEP] identifier[getPropertyType] operator[SEP] operator[SEP] operator[SEP] identifier[getTypeName] operator[SEP] operator[SEP] , literal[String] , identifier[item] operator[SEP] operator[SEP] identifier[methodBuilder] operator[SEP] identifier[addCode] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[methodBuilder] operator[SEP] identifier[beginControlFlow] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[methodBuilder] operator[SEP] identifier[addStatement] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[methodBuilder] operator[SEP] identifier[endControlFlow] operator[SEP] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[builder] operator[SEP] identifier[addMethod] operator[SEP] identifier[methodBuilder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static Config parseResources(String resource, ConfigParseOptions options) { ConfigParseOptions withLoader = ensureClassLoader(options, "parseResources"); return Parseable.newResources(resource, withLoader).parse().toConfig(); }
class class_name[name] begin[{] method[parseResources, return_type[type[Config]], modifier[public static], parameter[resource, options]] begin[{] local_variable[type[ConfigParseOptions], withLoader] return[call[Parseable.newResources, parameter[member[.resource], member[.withLoader]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Config] identifier[parseResources] operator[SEP] identifier[String] identifier[resource] , identifier[ConfigParseOptions] identifier[options] operator[SEP] { identifier[ConfigParseOptions] identifier[withLoader] operator[=] identifier[ensureClassLoader] operator[SEP] identifier[options] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[Parseable] operator[SEP] identifier[newResources] operator[SEP] identifier[resource] , identifier[withLoader] operator[SEP] operator[SEP] identifier[parse] operator[SEP] operator[SEP] operator[SEP] identifier[toConfig] operator[SEP] operator[SEP] operator[SEP] }
public static Webcam openDevice( String deviceName , int desiredWidth , int desiredHeight ) { Webcam webcam = findDevice(deviceName); if( webcam == null ) throw new IllegalArgumentException("Can't find camera "+deviceName); adjustResolution(webcam,desiredWidth,desiredHeight); webcam.open(); return webcam; }
class class_name[name] begin[{] method[openDevice, return_type[type[Webcam]], modifier[public static], parameter[deviceName, desiredWidth, desiredHeight]] begin[{] local_variable[type[Webcam], webcam] if[binary_operation[member[.webcam], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Can't find camera "), operandr=MemberReference(member=deviceName, 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=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] call[.adjustResolution, parameter[member[.webcam], member[.desiredWidth], member[.desiredHeight]]] call[webcam.open, parameter[]] return[member[.webcam]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Webcam] identifier[openDevice] operator[SEP] identifier[String] identifier[deviceName] , Keyword[int] identifier[desiredWidth] , Keyword[int] identifier[desiredHeight] operator[SEP] { identifier[Webcam] identifier[webcam] operator[=] identifier[findDevice] operator[SEP] identifier[deviceName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[webcam] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[deviceName] operator[SEP] operator[SEP] identifier[adjustResolution] operator[SEP] identifier[webcam] , identifier[desiredWidth] , identifier[desiredHeight] operator[SEP] operator[SEP] identifier[webcam] operator[SEP] identifier[open] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[webcam] operator[SEP] }
@CheckResult @NonNull public final PowerAdapter prepend(@NonNull @LayoutRes int... layoutResources) { checkNotNull(layoutResources, "layoutResources"); if (layoutResources.length == 0) { return this; } return prepend(asAdapter(layoutResources)); }
class class_name[name] begin[{] method[prepend, return_type[type[PowerAdapter]], modifier[final public], parameter[layoutResources]] begin[{] call[.checkNotNull, parameter[member[.layoutResources], literal["layoutResources"]]] if[binary_operation[member[layoutResources.length], ==, literal[0]]] begin[{] return[THIS[]] else begin[{] None end[}] return[call[.prepend, parameter[call[.asAdapter, parameter[member[.layoutResources]]]]]] end[}] END[}]
annotation[@] identifier[CheckResult] annotation[@] identifier[NonNull] Keyword[public] Keyword[final] identifier[PowerAdapter] identifier[prepend] operator[SEP] annotation[@] identifier[NonNull] annotation[@] identifier[LayoutRes] Keyword[int] operator[...] identifier[layoutResources] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[layoutResources] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[layoutResources] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] } Keyword[return] identifier[prepend] operator[SEP] identifier[asAdapter] operator[SEP] identifier[layoutResources] operator[SEP] operator[SEP] operator[SEP] }
private boolean updateDelivered(Message message) { if (consumers.size() <= 1) { return true; } String pubid = (String) message.getMetadata("cwf.pub.event"); return deliveredMessageCache.putIfAbsent(pubid, "") == null; }
class class_name[name] begin[{] method[updateDelivered, return_type[type[boolean]], modifier[private], parameter[message]] begin[{] if[binary_operation[call[consumers.size, parameter[]], <=, literal[1]]] begin[{] return[literal[true]] else begin[{] None end[}] local_variable[type[String], pubid] return[binary_operation[call[deliveredMessageCache.putIfAbsent, parameter[member[.pubid], literal[""]]], ==, literal[null]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[updateDelivered] operator[SEP] identifier[Message] identifier[message] operator[SEP] { Keyword[if] operator[SEP] identifier[consumers] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[<=] Other[1] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[String] identifier[pubid] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[message] operator[SEP] identifier[getMetadata] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[deliveredMessageCache] operator[SEP] identifier[putIfAbsent] operator[SEP] identifier[pubid] , literal[String] operator[SEP] operator[==] Other[null] operator[SEP] }
public void setTimeZoneType(com.google.api.ads.admanager.axis.v201811.TimeZoneType timeZoneType) { this.timeZoneType = timeZoneType; }
class class_name[name] begin[{] method[setTimeZoneType, return_type[void], modifier[public], parameter[timeZoneType]] begin[{] assign[THIS[member[None.timeZoneType]], member[.timeZoneType]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setTimeZoneType] 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[v201811] operator[SEP] identifier[TimeZoneType] identifier[timeZoneType] operator[SEP] { Keyword[this] operator[SEP] identifier[timeZoneType] operator[=] identifier[timeZoneType] operator[SEP] }
public com.squareup.okhttp.Call optionsPutAsync(OptionsPut body, final ApiCallback<OptionsPutResponseStatusSuccess> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; if (callback != null) { progressListener = new ProgressResponseBody.ProgressListener() { @Override public void update(long bytesRead, long contentLength, boolean done) { callback.onDownloadProgress(bytesRead, contentLength, done); } }; progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { @Override public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { callback.onUploadProgress(bytesWritten, contentLength, done); } }; } com.squareup.okhttp.Call call = optionsPutValidateBeforeCall(body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken<OptionsPutResponseStatusSuccess>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; }
class class_name[name] begin[{] method[optionsPutAsync, return_type[type[com]], modifier[public], parameter[body, callback]] begin[{] local_variable[type[ProgressResponseBody], progressListener] local_variable[type[ProgressRequestBody], progressRequestListener] if[binary_operation[member[.callback], !=, literal[null]]] begin[{] assign[member[.progressListener], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytesRead, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contentLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=done, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onDownloadProgress, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=update, parameters=[FormalParameter(annotations=[], modifiers=set(), name=bytesRead, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=contentLength, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=done, type=BasicType(dimensions=[], name=boolean), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProgressResponseBody, sub_type=ReferenceType(arguments=None, dimensions=None, name=ProgressListener, sub_type=None)))] assign[member[.progressRequestListener], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytesWritten, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contentLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=done, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onUploadProgress, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onRequestProgress, parameters=[FormalParameter(annotations=[], modifiers=set(), name=bytesWritten, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=contentLength, type=BasicType(dimensions=[], name=long), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=done, type=BasicType(dimensions=[], name=boolean), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProgressRequestBody, sub_type=ReferenceType(arguments=None, dimensions=None, name=ProgressRequestListener, sub_type=None)))] else begin[{] None end[}] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] call[apiClient.executeAsync, parameter[member[.call], member[.localVarReturnType], member[.callback]]] return[member[.call]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[optionsPutAsync] operator[SEP] identifier[OptionsPut] identifier[body] , Keyword[final] identifier[ApiCallback] operator[<] identifier[OptionsPutResponseStatusSuccess] operator[>] identifier[callback] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ProgressResponseBody] operator[SEP] identifier[ProgressListener] identifier[progressListener] operator[=] Other[null] operator[SEP] identifier[ProgressRequestBody] operator[SEP] identifier[ProgressRequestListener] identifier[progressRequestListener] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[callback] operator[!=] Other[null] operator[SEP] { identifier[progressListener] operator[=] Keyword[new] identifier[ProgressResponseBody] operator[SEP] identifier[ProgressListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[update] operator[SEP] Keyword[long] identifier[bytesRead] , Keyword[long] identifier[contentLength] , Keyword[boolean] identifier[done] operator[SEP] { identifier[callback] operator[SEP] identifier[onDownloadProgress] operator[SEP] identifier[bytesRead] , identifier[contentLength] , identifier[done] operator[SEP] operator[SEP] } } operator[SEP] identifier[progressRequestListener] operator[=] Keyword[new] identifier[ProgressRequestBody] operator[SEP] identifier[ProgressRequestListener] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onRequestProgress] operator[SEP] Keyword[long] identifier[bytesWritten] , Keyword[long] identifier[contentLength] , Keyword[boolean] identifier[done] operator[SEP] { identifier[callback] operator[SEP] identifier[onUploadProgress] operator[SEP] identifier[bytesWritten] , identifier[contentLength] , identifier[done] operator[SEP] operator[SEP] } } operator[SEP] } identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[optionsPutValidateBeforeCall] operator[SEP] identifier[body] , identifier[progressListener] , identifier[progressRequestListener] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[OptionsPutResponseStatusSuccess] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[apiClient] operator[SEP] identifier[executeAsync] operator[SEP] identifier[call] , identifier[localVarReturnType] , identifier[callback] operator[SEP] operator[SEP] Keyword[return] identifier[call] operator[SEP] }
public void sort() { Arrays.sort(freeOrdinals, 0, size); /// reverse the ordering int midpoint = size / 2; for(int i=0;i<midpoint;i++) { int temp = freeOrdinals[i]; freeOrdinals[i] = freeOrdinals[size-i-1]; freeOrdinals[size-i-1] = temp; } }
class class_name[name] begin[{] method[sort, return_type[void], modifier[public], parameter[]] begin[{] call[Arrays.sort, parameter[member[.freeOrdinals], literal[0], member[.size]]] local_variable[type[int], midpoint] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=freeOrdinals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=temp)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=freeOrdinals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=freeOrdinals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=freeOrdinals, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), type==, value=MemberReference(member=temp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=midpoint, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[sort] operator[SEP] operator[SEP] { identifier[Arrays] operator[SEP] identifier[sort] operator[SEP] identifier[freeOrdinals] , Other[0] , identifier[size] operator[SEP] operator[SEP] Keyword[int] identifier[midpoint] operator[=] identifier[size] operator[/] Other[2] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[midpoint] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[temp] operator[=] identifier[freeOrdinals] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[freeOrdinals] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[freeOrdinals] operator[SEP] identifier[size] operator[-] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] identifier[freeOrdinals] operator[SEP] identifier[size] operator[-] identifier[i] operator[-] Other[1] operator[SEP] operator[=] identifier[temp] operator[SEP] } }
public Head createHead() { final Head head = new Head(getRoot(), "Head"); getRoot().insert(head); return head; }
class class_name[name] begin[{] method[createHead, return_type[type[Head]], modifier[public], parameter[]] begin[{] local_variable[type[Head], head] call[.getRoot, parameter[]] return[member[.head]] end[}] END[}]
Keyword[public] identifier[Head] identifier[createHead] operator[SEP] operator[SEP] { Keyword[final] identifier[Head] identifier[head] operator[=] Keyword[new] identifier[Head] operator[SEP] identifier[getRoot] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[getRoot] operator[SEP] operator[SEP] operator[SEP] identifier[insert] operator[SEP] identifier[head] operator[SEP] operator[SEP] Keyword[return] identifier[head] operator[SEP] }
protected Method findMatchingMethod() { String targetMethod = getTargetMethod(); Object[] arguments = getArguments(); int argCount = arguments.length; Method[] candidates = ReflectionUtils.getAllDeclaredMethods(getTargetClass()); int minTypeDiffWeight = Integer.MAX_VALUE; Method matchingMethod = null; for (Method candidate : candidates) { if (candidate.getName().equals(targetMethod)) { Class<?>[] paramTypes = candidate.getParameterTypes(); if (paramTypes.length == argCount) { int typeDiffWeight = getTypeDifferenceWeight(paramTypes, arguments); if (typeDiffWeight < minTypeDiffWeight) { minTypeDiffWeight = typeDiffWeight; matchingMethod = candidate; } } } } return matchingMethod; }
class class_name[name] begin[{] method[findMatchingMethod, return_type[type[Method]], modifier[protected], parameter[]] begin[{] local_variable[type[String], targetMethod] local_variable[type[Object], arguments] local_variable[type[int], argCount] local_variable[type[Method], candidates] local_variable[type[int], minTypeDiffWeight] local_variable[type[Method], matchingMethod] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=candidate, selectors=[MethodInvocation(arguments=[MemberReference(member=targetMethod, 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=[], member=getParameterTypes, postfix_operators=[], prefix_operators=[], qualifier=candidate, selectors=[], type_arguments=None), name=paramTypes)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[None], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=paramTypes, selectors=[]), operandr=MemberReference(member=argCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=paramTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=arguments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getTypeDifferenceWeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=typeDiffWeight)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=typeDiffWeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=minTypeDiffWeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=minTypeDiffWeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=typeDiffWeight, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=matchingMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=candidate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]))]))]))]), control=EnhancedForControl(iterable=MemberReference(member=candidates, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=candidate)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None) return[member[.matchingMethod]] end[}] END[}]
Keyword[protected] identifier[Method] identifier[findMatchingMethod] operator[SEP] operator[SEP] { identifier[String] identifier[targetMethod] operator[=] identifier[getTargetMethod] operator[SEP] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[arguments] operator[=] identifier[getArguments] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[argCount] operator[=] identifier[arguments] operator[SEP] identifier[length] operator[SEP] identifier[Method] operator[SEP] operator[SEP] identifier[candidates] operator[=] identifier[ReflectionUtils] operator[SEP] identifier[getAllDeclaredMethods] operator[SEP] identifier[getTargetClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[minTypeDiffWeight] operator[=] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] identifier[Method] identifier[matchingMethod] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Method] identifier[candidate] operator[:] identifier[candidates] operator[SEP] { Keyword[if] operator[SEP] identifier[candidate] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[targetMethod] operator[SEP] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[paramTypes] operator[=] identifier[candidate] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[paramTypes] operator[SEP] identifier[length] operator[==] identifier[argCount] operator[SEP] { Keyword[int] identifier[typeDiffWeight] operator[=] identifier[getTypeDifferenceWeight] operator[SEP] identifier[paramTypes] , identifier[arguments] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[typeDiffWeight] operator[<] identifier[minTypeDiffWeight] operator[SEP] { identifier[minTypeDiffWeight] operator[=] identifier[typeDiffWeight] operator[SEP] identifier[matchingMethod] operator[=] identifier[candidate] operator[SEP] } } } } Keyword[return] identifier[matchingMethod] operator[SEP] }
public static boolean isDateTime(String s) { DateFormat dateFormatter = new SimpleDateFormat(dateTimeFormat); try { dateFormatter.parse(s); return true; } catch (ParseException e) { // Exception noted so can be ignored. e = null; return false; } }
class class_name[name] begin[{] method[isDateTime, return_type[type[boolean]], modifier[public static], parameter[s]] begin[{] local_variable[type[DateFormat], dateFormatter] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=parse, postfix_operators=[], prefix_operators=[], qualifier=dateFormatter, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ParseException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isDateTime] operator[SEP] identifier[String] identifier[s] operator[SEP] { identifier[DateFormat] identifier[dateFormatter] operator[=] Keyword[new] identifier[SimpleDateFormat] operator[SEP] identifier[dateTimeFormat] operator[SEP] operator[SEP] Keyword[try] { identifier[dateFormatter] operator[SEP] identifier[parse] operator[SEP] identifier[s] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[catch] operator[SEP] identifier[ParseException] identifier[e] operator[SEP] { identifier[e] operator[=] Other[null] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } }
public static byte[] hexStringToByteArray(String s) throws IOException { int l = s.length(); byte[] data = new byte[l / 2 + (l % 2)]; int n, b = 0; boolean high = true; int i = 0; for (int j = 0; j < l; j++) { char c = s.charAt(j); if (c == ' ') { continue; } n = getNibble(c); if (n == -1) { throw new IOException( "hexadecimal string contains non hex character"); //NOI18N } if (high) { b = (n & 0xf) << 4; high = false; } else { b += (n & 0xf); high = true; data[i++] = (byte) b; } } if (!high) { throw new IOException( "hexadecimal string with odd number of characters"); //NOI18N } if (i < data.length) { data = (byte[]) ArrayUtil.resizeArray(data, i); } return data; }
class class_name[name] begin[{] method[hexStringToByteArray, return_type[type[byte]], modifier[public static], parameter[s]] begin[{] local_variable[type[int], l] local_variable[type[byte], data] local_variable[type[int], n] local_variable[type[boolean], high] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=char)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=' '), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ContinueStatement(goto=None, label=None)])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNibble, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="hexadecimal string contains non hex character")], 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)])), IfStatement(condition=MemberReference(member=high, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xf), operator=&)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=high, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=byte))), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=b, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xf), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=4), operator=<<)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=high, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=j)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=j, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[member[.high]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="hexadecimal string with odd number of characters")], 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) else begin[{] None end[}] if[binary_operation[member[.i], <, member[data.length]]] begin[{] assign[member[.data], Cast(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resizeArray, postfix_operators=[], prefix_operators=[], qualifier=ArrayUtil, selectors=[], type_arguments=None), type=BasicType(dimensions=[None], name=byte))] else begin[{] None end[}] return[member[.data]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[byte] operator[SEP] operator[SEP] identifier[hexStringToByteArray] operator[SEP] identifier[String] identifier[s] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[l] operator[=] identifier[s] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] operator[=] Keyword[new] Keyword[byte] operator[SEP] identifier[l] operator[/] Other[2] operator[+] operator[SEP] identifier[l] operator[%] Other[2] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[n] , identifier[b] operator[=] Other[0] operator[SEP] Keyword[boolean] identifier[high] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[l] operator[SEP] identifier[j] operator[++] operator[SEP] { Keyword[char] identifier[c] operator[=] identifier[s] operator[SEP] identifier[charAt] operator[SEP] identifier[j] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] literal[String] operator[SEP] { Keyword[continue] operator[SEP] } identifier[n] operator[=] identifier[getNibble] operator[SEP] identifier[c] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[==] operator[-] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[high] operator[SEP] { identifier[b] operator[=] operator[SEP] identifier[n] operator[&] literal[Integer] operator[SEP] operator[<<] Other[4] operator[SEP] identifier[high] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[b] operator[+=] operator[SEP] identifier[n] operator[&] literal[Integer] operator[SEP] operator[SEP] identifier[high] operator[=] literal[boolean] operator[SEP] identifier[data] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] identifier[b] operator[SEP] } } Keyword[if] operator[SEP] operator[!] identifier[high] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[i] operator[<] identifier[data] operator[SEP] identifier[length] operator[SEP] { identifier[data] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[ArrayUtil] operator[SEP] identifier[resizeArray] operator[SEP] identifier[data] , identifier[i] operator[SEP] operator[SEP] } Keyword[return] identifier[data] operator[SEP] }
DispatchKey newKey(final Object pDirectoryKey, final Path pRelativePath) { return fileKeyFactory.newKey(pDirectoryKey, pRelativePath); }
class class_name[name] begin[{] method[newKey, return_type[type[DispatchKey]], modifier[default], parameter[pDirectoryKey, pRelativePath]] begin[{] return[call[fileKeyFactory.newKey, parameter[member[.pDirectoryKey], member[.pRelativePath]]]] end[}] END[}]
identifier[DispatchKey] identifier[newKey] operator[SEP] Keyword[final] identifier[Object] identifier[pDirectoryKey] , Keyword[final] identifier[Path] identifier[pRelativePath] operator[SEP] { Keyword[return] identifier[fileKeyFactory] operator[SEP] identifier[newKey] operator[SEP] identifier[pDirectoryKey] , identifier[pRelativePath] operator[SEP] operator[SEP] }
public void setRules(java.util.Collection<ScalingRule> rules) { if (rules == null) { this.rules = null; return; } this.rules = new com.amazonaws.internal.SdkInternalList<ScalingRule>(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=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ScalingRule, sub_type=None))], dimensions=None, name=SdkInternalList, 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[ScalingRule] 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[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[ScalingRule] operator[>] operator[SEP] identifier[rules] operator[SEP] operator[SEP] }
@Override public void motionDetected(WebcamMotionEvent wme) { for (Point p : wme.getPoints()) { motionPoints.put(p, 0); } }
class class_name[name] begin[{] method[motionDetected, return_type[void], modifier[public], parameter[wme]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=put, postfix_operators=[], prefix_operators=[], qualifier=motionPoints, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getPoints, postfix_operators=[], prefix_operators=[], qualifier=wme, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Point, sub_type=None))), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[motionDetected] operator[SEP] identifier[WebcamMotionEvent] identifier[wme] operator[SEP] { Keyword[for] operator[SEP] identifier[Point] identifier[p] operator[:] identifier[wme] operator[SEP] identifier[getPoints] operator[SEP] operator[SEP] operator[SEP] { identifier[motionPoints] operator[SEP] identifier[put] operator[SEP] identifier[p] , Other[0] operator[SEP] operator[SEP] } }
public ServiceFuture<ManagedClusterUpgradeProfileInner> getUpgradeProfileAsync(String resourceGroupName, String resourceName, final ServiceCallback<ManagedClusterUpgradeProfileInner> serviceCallback) { return ServiceFuture.fromResponse(getUpgradeProfileWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); }
class class_name[name] begin[{] method[getUpgradeProfileAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, resourceName, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.getUpgradeProfileWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.resourceName]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[ManagedClusterUpgradeProfileInner] operator[>] identifier[getUpgradeProfileAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[ManagedClusterUpgradeProfileInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[getUpgradeProfileWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[resourceName] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
public void addMasterListeners() { super.addMasterListeners(); this.getField(UserInfo.USER_NAME).addListener(new CheckNonNumericListener(null)); this.addListener(new ReadOnlyRecordHandler(this.getField(UserInfo.READ_ONLY_RECORD), true)); this.addListener(new FileListener(null) { /** * Make sure the user group ID is non-null (set it to the anon group id) */ public int doRecordChange(FieldInfo field, int iChangeType, boolean bDisplayOption) { // Read a valid record switch (iChangeType) { case DBConstants.ADD_TYPE: case DBConstants.UPDATE_TYPE: if (this.getOwner().getField(UserInfo.USER_GROUP_ID).isNull()) if (this.getOwner().getRecordOwner() != null) { Record recUserControl = (Record)this.getOwner().getRecordOwner().getRecord(UserControl.USER_CONTROL_FILE); if (recUserControl == null) { recUserControl = new UserControl(this.getOwner().getRecordOwner()); this.getOwner().addListener(new FreeOnFreeHandler(recUserControl)); } this.getOwner().getField(UserInfo.USER_GROUP_ID).moveFieldToThis(recUserControl.getField(UserControl.ANON_USER_GROUP_ID)); } break; } return super.doRecordChange(field, iChangeType, bDisplayOption); // Initialize the record } }); }
class class_name[name] begin[{] method[addMasterListeners, return_type[void], modifier[public], parameter[]] begin[{] SuperMethodInvocation(arguments=[], member=addMasterListeners, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) THIS[call[None.getField, parameter[member[UserInfo.USER_NAME]]]call[None.addListener, parameter[ClassCreator(arguments=[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=CheckNonNumericListener, sub_type=None))]]] THIS[call[None.addListener, parameter[ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=READ_ONLY_RECORD, postfix_operators=[], prefix_operators=[], qualifier=UserInfo, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReadOnlyRecordHandler, sub_type=None))]]] THIS[call[None.addListener, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=[MethodDeclaration(annotations=[], body=[SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=ADD_TYPE, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[]), MemberReference(member=UPDATE_TYPE, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[])], statements=[IfStatement(condition=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=USER_GROUP_ID, postfix_operators=[], prefix_operators=[], qualifier=UserInfo, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=isNull, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), else_statement=None, label=None, then_statement=IfStatement(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getRecordOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=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=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getRecordOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=USER_CONTROL_FILE, postfix_operators=[], prefix_operators=[], qualifier=UserControl, selectors=[])], member=getRecord, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), type=ReferenceType(arguments=None, dimensions=[], name=Record, sub_type=None)), name=recUserControl)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Record, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=recUserControl, 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=recUserControl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getRecordOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UserControl, sub_type=None))), label=None), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=recUserControl, 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=FreeOnFreeHandler, sub_type=None))], member=addListener, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)])), StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getOwner, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=USER_GROUP_ID, postfix_operators=[], prefix_operators=[], qualifier=UserInfo, selectors=[])], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=ANON_USER_GROUP_ID, postfix_operators=[], prefix_operators=[], qualifier=UserControl, selectors=[])], member=getField, postfix_operators=[], prefix_operators=[], qualifier=recUserControl, selectors=[], type_arguments=None)], member=moveFieldToThis, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]))), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=iChangeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), ReturnStatement(expression=SuperMethodInvocation(arguments=[MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iChangeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bDisplayOption, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doRecordChange, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None)], documentation=/** * Make sure the user group ID is non-null (set it to the anon group id) */, modifiers={'public'}, name=doRecordChange, parameters=[FormalParameter(annotations=[], modifiers=set(), name=field, type=ReferenceType(arguments=None, dimensions=[], name=FieldInfo, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=iChangeType, type=BasicType(dimensions=[], name=int), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=bDisplayOption, type=BasicType(dimensions=[], name=boolean), varargs=False)], return_type=BasicType(dimensions=[], name=int), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileListener, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addMasterListeners] operator[SEP] operator[SEP] { Keyword[super] operator[SEP] identifier[addMasterListeners] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[UserInfo] operator[SEP] identifier[USER_NAME] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[CheckNonNumericListener] operator[SEP] Other[null] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[ReadOnlyRecordHandler] operator[SEP] Keyword[this] operator[SEP] identifier[getField] operator[SEP] identifier[UserInfo] operator[SEP] identifier[READ_ONLY_RECORD] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[FileListener] operator[SEP] Other[null] operator[SEP] { Keyword[public] Keyword[int] identifier[doRecordChange] operator[SEP] identifier[FieldInfo] identifier[field] , Keyword[int] identifier[iChangeType] , Keyword[boolean] identifier[bDisplayOption] operator[SEP] { Keyword[switch] operator[SEP] identifier[iChangeType] operator[SEP] { Keyword[case] identifier[DBConstants] operator[SEP] identifier[ADD_TYPE] operator[:] Keyword[case] identifier[DBConstants] operator[SEP] identifier[UPDATE_TYPE] operator[:] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[UserInfo] operator[SEP] identifier[USER_GROUP_ID] operator[SEP] operator[SEP] identifier[isNull] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] identifier[getRecordOwner] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[Record] identifier[recUserControl] operator[=] operator[SEP] identifier[Record] operator[SEP] Keyword[this] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] identifier[getRecordOwner] operator[SEP] operator[SEP] operator[SEP] identifier[getRecord] operator[SEP] identifier[UserControl] operator[SEP] identifier[USER_CONTROL_FILE] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[recUserControl] operator[==] Other[null] operator[SEP] { identifier[recUserControl] operator[=] Keyword[new] identifier[UserControl] operator[SEP] Keyword[this] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] identifier[getRecordOwner] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[FreeOnFreeHandler] operator[SEP] identifier[recUserControl] operator[SEP] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] identifier[getField] operator[SEP] identifier[UserInfo] operator[SEP] identifier[USER_GROUP_ID] operator[SEP] operator[SEP] identifier[moveFieldToThis] operator[SEP] identifier[recUserControl] operator[SEP] identifier[getField] operator[SEP] identifier[UserControl] operator[SEP] identifier[ANON_USER_GROUP_ID] operator[SEP] operator[SEP] operator[SEP] } Keyword[break] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[doRecordChange] operator[SEP] identifier[field] , identifier[iChangeType] , identifier[bDisplayOption] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static base_response unset(nitro_service client, nsacl resource, String[] args) throws Exception{ nsacl unsetresource = new nsacl(); unsetresource.aclname = resource.aclname; return unsetresource.unset_resource(client,args); }
class class_name[name] begin[{] method[unset, return_type[type[base_response]], modifier[public static], parameter[client, resource, args]] begin[{] local_variable[type[nsacl], unsetresource] assign[member[unsetresource.aclname], member[resource.aclname]] return[call[unsetresource.unset_resource, parameter[member[.client], member[.args]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[base_response] identifier[unset] operator[SEP] identifier[nitro_service] identifier[client] , identifier[nsacl] identifier[resource] , identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] Keyword[throws] identifier[Exception] { identifier[nsacl] identifier[unsetresource] operator[=] Keyword[new] identifier[nsacl] operator[SEP] operator[SEP] operator[SEP] identifier[unsetresource] operator[SEP] identifier[aclname] operator[=] identifier[resource] operator[SEP] identifier[aclname] operator[SEP] Keyword[return] identifier[unsetresource] operator[SEP] identifier[unset_resource] operator[SEP] identifier[client] , identifier[args] operator[SEP] operator[SEP] }
public void createEquiAngle(float radius, int numRotations, int numSamples, float jitter, Callback2d callback) { float spacing = radius / numRotations; for (int sample = 0; sample < numSamples; sample++) { float angle = 2.0f * (float) Math.PI * (sample * numRotations) / numSamples; float r = radius * sample / (numSamples - 1) + (rnd.nextFloat() * 2.0f - 1.0f) * spacing * jitter; float x = (float) Math.sin_roquen_9(angle + 0.5f * (float) Math.PI) * r; float y = (float) Math.sin_roquen_9(angle) * r; callback.onNewSample(x, y); } }
class class_name[name] begin[{] method[createEquiAngle, return_type[void], modifier[public], parameter[radius, numRotations, numSamples, jitter, callback]] begin[{] local_variable[type[float], spacing] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0f), operandr=Cast(expression=MemberReference(member=PI, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[]), type=BasicType(dimensions=[], name=float)), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=sample, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numRotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=*), operandr=MemberReference(member=numSamples, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=/), name=angle)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=radius, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=sample, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=BinaryOperation(operandl=MemberReference(member=numSamples, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=/), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=nextFloat, postfix_operators=[], prefix_operators=[], qualifier=rnd, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0f), operator=*), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1.0f), operator=-), operandr=MemberReference(member=spacing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operandr=MemberReference(member=jitter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), operator=+), name=r)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=angle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0.5f), operandr=Cast(expression=MemberReference(member=PI, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[]), type=BasicType(dimensions=[], name=float)), operator=*), operator=+)], member=sin_roquen_9, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float)), operandr=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), name=x)], modifiers=set(), type=BasicType(dimensions=[], name=float)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Cast(expression=MethodInvocation(arguments=[MemberReference(member=angle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sin_roquen_9, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=float)), operandr=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*), name=y)], modifiers=set(), type=BasicType(dimensions=[], name=float)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onNewSample, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=sample, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numSamples, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=sample)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=sample, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[createEquiAngle] operator[SEP] Keyword[float] identifier[radius] , Keyword[int] identifier[numRotations] , Keyword[int] identifier[numSamples] , Keyword[float] identifier[jitter] , identifier[Callback2d] identifier[callback] operator[SEP] { Keyword[float] identifier[spacing] operator[=] identifier[radius] operator[/] identifier[numRotations] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[sample] operator[=] Other[0] operator[SEP] identifier[sample] operator[<] identifier[numSamples] operator[SEP] identifier[sample] operator[++] operator[SEP] { Keyword[float] identifier[angle] operator[=] literal[Float] operator[*] operator[SEP] Keyword[float] operator[SEP] identifier[Math] operator[SEP] identifier[PI] operator[*] operator[SEP] identifier[sample] operator[*] identifier[numRotations] operator[SEP] operator[/] identifier[numSamples] operator[SEP] Keyword[float] identifier[r] operator[=] identifier[radius] operator[*] identifier[sample] operator[/] operator[SEP] identifier[numSamples] operator[-] Other[1] operator[SEP] operator[+] operator[SEP] identifier[rnd] operator[SEP] identifier[nextFloat] operator[SEP] operator[SEP] operator[*] literal[Float] operator[-] literal[Float] operator[SEP] operator[*] identifier[spacing] operator[*] identifier[jitter] operator[SEP] Keyword[float] identifier[x] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[Math] operator[SEP] identifier[sin_roquen_9] operator[SEP] identifier[angle] operator[+] literal[Float] operator[*] operator[SEP] Keyword[float] operator[SEP] identifier[Math] operator[SEP] identifier[PI] operator[SEP] operator[*] identifier[r] operator[SEP] Keyword[float] identifier[y] operator[=] operator[SEP] Keyword[float] operator[SEP] identifier[Math] operator[SEP] identifier[sin_roquen_9] operator[SEP] identifier[angle] operator[SEP] operator[*] identifier[r] operator[SEP] identifier[callback] operator[SEP] identifier[onNewSample] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] } }
@Override public PairSet<T, I> symmetricDifference(Collection<? extends Pair<T, I>> other) { return other == null ? clone() : createFromIndices(matrix.symmetricDifference(convert(other).matrix)); }
class class_name[name] begin[{] method[symmetricDifference, return_type[type[PairSet]], modifier[public], parameter[other]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=other, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=other, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convert, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MemberReference(member=matrix, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)], type_arguments=None)], member=symmetricDifference, postfix_operators=[], prefix_operators=[], qualifier=matrix, selectors=[], type_arguments=None)], member=createFromIndices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), if_true=MethodInvocation(arguments=[], member=clone, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[PairSet] operator[<] identifier[T] , identifier[I] operator[>] identifier[symmetricDifference] operator[SEP] identifier[Collection] operator[<] operator[?] Keyword[extends] identifier[Pair] operator[<] identifier[T] , identifier[I] operator[>] operator[>] identifier[other] operator[SEP] { Keyword[return] identifier[other] operator[==] Other[null] operator[?] identifier[clone] operator[SEP] operator[SEP] operator[:] identifier[createFromIndices] operator[SEP] identifier[matrix] operator[SEP] identifier[symmetricDifference] operator[SEP] identifier[convert] operator[SEP] identifier[other] operator[SEP] operator[SEP] identifier[matrix] operator[SEP] operator[SEP] operator[SEP] }
@Override public EJBHome getEJBHome() //d116376 { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) Tr.debug(tc, "getEJBHome"); Tr.error(tc, "METHOD_NOT_ALLOWED_CNTR0047E", "MessageDrivenBeanO.getEJBHome()"); throw new IllegalStateException("Method Not Allowed Exception: See Message-drive Bean Component Contract section of the applicable EJB Specification."); }
class class_name[name] begin[{] method[getEJBHome, return_type[type[EJBHome]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[Tr.debug, parameter[member[.tc], literal["getEJBHome"]]] else begin[{] None end[}] call[Tr.error, parameter[member[.tc], literal["METHOD_NOT_ALLOWED_CNTR0047E"], literal["MessageDrivenBeanO.getEJBHome()"]]] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Method Not Allowed Exception: See Message-drive Bean Component Contract section of the applicable EJB Specification.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EJBHome] identifier[getEJBHome] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[debug] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public static void verifyThrowableHierarchy(Throwable throwable, Class<? extends Throwable> expectedBaseType) { if (expectedBaseType == null) { return; } if (throwable == null) { throw new IllegalArgumentException("Invalid throwable: null"); } Class<? extends Throwable> throwableType = throwable.getClass(); if (!expectedBaseType.isAssignableFrom(throwableType)) { throw new IllegalArgumentException("Invalid type: '" + throwableType.getName() + "'. Has to be a subclass of '" + expectedBaseType.getName() + "'"); } }
class class_name[name] begin[{] method[verifyThrowableHierarchy, return_type[void], modifier[public static], parameter[throwable, expectedBaseType]] begin[{] if[binary_operation[member[.expectedBaseType], ==, literal[null]]] begin[{] return[None] else begin[{] None end[}] if[binary_operation[member[.throwable], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid throwable: null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Class], throwableType] if[call[expectedBaseType.isAssignableFrom, parameter[member[.throwableType]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid type: '"), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=throwableType, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'. Has to be a subclass of '"), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=expectedBaseType, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[verifyThrowableHierarchy] operator[SEP] identifier[Throwable] identifier[throwable] , identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Throwable] operator[>] identifier[expectedBaseType] operator[SEP] { Keyword[if] operator[SEP] identifier[expectedBaseType] operator[==] Other[null] operator[SEP] { Keyword[return] operator[SEP] } Keyword[if] operator[SEP] identifier[throwable] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Throwable] operator[>] identifier[throwableType] operator[=] identifier[throwable] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[expectedBaseType] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[throwableType] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[throwableType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[expectedBaseType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } }
public static Optional<ExecutableElement> override( TypeElement type, Types types, String methodName, TypeMirror... params) { return methodsIn(type.getEnclosedElements()) .stream() .filter(method -> signatureMatches(method, types, methodName, params)) .findAny(); }
class class_name[name] begin[{] method[override, return_type[type[Optional]], modifier[public static], parameter[type, types, methodName, params]] begin[{] return[call[.methodsIn, parameter[call[type.getEnclosedElements, parameter[]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Optional] operator[<] identifier[ExecutableElement] operator[>] identifier[override] operator[SEP] identifier[TypeElement] identifier[type] , identifier[Types] identifier[types] , identifier[String] identifier[methodName] , identifier[TypeMirror] operator[...] identifier[params] operator[SEP] { Keyword[return] identifier[methodsIn] operator[SEP] identifier[type] operator[SEP] identifier[getEnclosedElements] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[filter] operator[SEP] identifier[method] operator[->] identifier[signatureMatches] operator[SEP] identifier[method] , identifier[types] , identifier[methodName] , identifier[params] operator[SEP] operator[SEP] operator[SEP] identifier[findAny] operator[SEP] operator[SEP] operator[SEP] }
public static systemuser[] get(nitro_service service) throws Exception{ systemuser obj = new systemuser(); systemuser[] response = (systemuser[])obj.get_resources(service); return response; }
class class_name[name] begin[{] method[get, return_type[type[systemuser]], modifier[public static], parameter[service]] begin[{] local_variable[type[systemuser], obj] local_variable[type[systemuser], response] return[member[.response]] end[}] END[}]
Keyword[public] Keyword[static] identifier[systemuser] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[nitro_service] identifier[service] operator[SEP] Keyword[throws] identifier[Exception] { identifier[systemuser] identifier[obj] operator[=] Keyword[new] identifier[systemuser] operator[SEP] operator[SEP] operator[SEP] identifier[systemuser] operator[SEP] operator[SEP] identifier[response] operator[=] operator[SEP] identifier[systemuser] operator[SEP] operator[SEP] operator[SEP] identifier[obj] operator[SEP] identifier[get_resources] operator[SEP] identifier[service] operator[SEP] operator[SEP] Keyword[return] identifier[response] operator[SEP] }
public static CmsPermissionBean getBeanForPrincipal(Set<CmsPermissionBean> beans, String principalName) { for (CmsPermissionBean bean : beans) { if (bean.getPrincipalName().equals(principalName)) { return bean; } } return null; }
class class_name[name] begin[{] method[getBeanForPrincipal, return_type[type[CmsPermissionBean]], modifier[public static], parameter[beans, principalName]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=getPrincipalName, postfix_operators=[], prefix_operators=[], qualifier=bean, selectors=[MethodInvocation(arguments=[MemberReference(member=principalName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=bean, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=beans, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=bean)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsPermissionBean, sub_type=None))), label=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CmsPermissionBean] identifier[getBeanForPrincipal] operator[SEP] identifier[Set] operator[<] identifier[CmsPermissionBean] operator[>] identifier[beans] , identifier[String] identifier[principalName] operator[SEP] { Keyword[for] operator[SEP] identifier[CmsPermissionBean] identifier[bean] operator[:] identifier[beans] operator[SEP] { Keyword[if] operator[SEP] identifier[bean] operator[SEP] identifier[getPrincipalName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[principalName] operator[SEP] operator[SEP] { Keyword[return] identifier[bean] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public Set<ObjectInstance> queryMBeans(ObjectName name, QueryExp query) { return delegate.queryMBeans(name, query); }
class class_name[name] begin[{] method[queryMBeans, return_type[type[Set]], modifier[public], parameter[name, query]] begin[{] return[call[delegate.queryMBeans, parameter[member[.name], member[.query]]]] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[ObjectInstance] operator[>] identifier[queryMBeans] operator[SEP] identifier[ObjectName] identifier[name] , identifier[QueryExp] identifier[query] operator[SEP] { Keyword[return] identifier[delegate] operator[SEP] identifier[queryMBeans] operator[SEP] identifier[name] , identifier[query] operator[SEP] operator[SEP] }
@Override public String doOCR(List<IIOImage> imageList, String filename, Rectangle rect) throws TesseractException { init(); setTessVariables(); try { StringBuilder sb = new StringBuilder(); int pageNum = 0; for (IIOImage oimage : imageList) { pageNum++; try { setImage(oimage.getRenderedImage(), rect); sb.append(getOCRText(filename, pageNum)); } catch (IOException ioe) { // skip the problematic image logger.error(ioe.getMessage(), ioe); } } if (renderedFormat == RenderedFormat.HOCR) { sb.insert(0, htmlBeginTag).append(htmlEndTag); } return sb.toString(); } finally { dispose(); } }
class class_name[name] begin[{] method[doOCR, return_type[type[String]], modifier[public], parameter[imageList, filename, rect]] begin[{] call[.init, parameter[]] call[.setTessVariables, parameter[]] TryStatement(block=[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=StringBuilder, sub_type=None)), name=sb)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=pageNum)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=pageNum, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None), TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRenderedImage, postfix_operators=[], prefix_operators=[], qualifier=oimage, selectors=[], type_arguments=None), MemberReference(member=rect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setImage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pageNum, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getOCRText, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ioe, selectors=[], type_arguments=None), MemberReference(member=ioe, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ioe, types=['IOException']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MemberReference(member=imageList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=oimage)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IIOImage, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=renderedFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=HOCR, postfix_operators=[], prefix_operators=[], qualifier=RenderedFormat, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=htmlBeginTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=insert, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[MethodInvocation(arguments=[MemberReference(member=htmlEndTag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)])), ReturnStatement(expression=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=dispose, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[doOCR] operator[SEP] identifier[List] operator[<] identifier[IIOImage] operator[>] identifier[imageList] , identifier[String] identifier[filename] , identifier[Rectangle] identifier[rect] operator[SEP] Keyword[throws] identifier[TesseractException] { identifier[init] operator[SEP] operator[SEP] operator[SEP] identifier[setTessVariables] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[pageNum] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[IIOImage] identifier[oimage] operator[:] identifier[imageList] operator[SEP] { identifier[pageNum] operator[++] operator[SEP] Keyword[try] { identifier[setImage] operator[SEP] identifier[oimage] operator[SEP] identifier[getRenderedImage] operator[SEP] operator[SEP] , identifier[rect] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[getOCRText] operator[SEP] identifier[filename] , identifier[pageNum] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[ioe] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] identifier[ioe] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[ioe] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[renderedFormat] operator[==] identifier[RenderedFormat] operator[SEP] identifier[HOCR] operator[SEP] { identifier[sb] operator[SEP] identifier[insert] operator[SEP] Other[0] , identifier[htmlBeginTag] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[htmlEndTag] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[dispose] operator[SEP] operator[SEP] operator[SEP] } }
private String getSSLContextProperty(String propertyName, Properties prop) { String value = null; if (prop != null) { value = prop.getProperty(propertyName); } else { value = System.getProperty(propertyName); if (value == null) { value = SSLConfigManager.getInstance().getGlobalProperty(propertyName); } } return value; }
class class_name[name] begin[{] method[getSSLContextProperty, return_type[type[String]], modifier[private], parameter[propertyName, prop]] begin[{] local_variable[type[String], value] if[binary_operation[member[.prop], !=, literal[null]]] begin[{] assign[member[.value], call[prop.getProperty, parameter[member[.propertyName]]]] else begin[{] assign[member[.value], call[System.getProperty, parameter[member[.propertyName]]]] if[binary_operation[member[.value], ==, literal[null]]] begin[{] assign[member[.value], call[SSLConfigManager.getInstance, parameter[]]] else begin[{] None end[}] end[}] return[member[.value]] end[}] END[}]
Keyword[private] identifier[String] identifier[getSSLContextProperty] operator[SEP] identifier[String] identifier[propertyName] , identifier[Properties] identifier[prop] operator[SEP] { identifier[String] identifier[value] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[prop] operator[!=] Other[null] operator[SEP] { identifier[value] operator[=] identifier[prop] operator[SEP] identifier[getProperty] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] } Keyword[else] { identifier[value] operator[=] identifier[System] operator[SEP] identifier[getProperty] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { identifier[value] operator[=] identifier[SSLConfigManager] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getGlobalProperty] operator[SEP] identifier[propertyName] operator[SEP] operator[SEP] } } Keyword[return] identifier[value] operator[SEP] }
@Nullable static UfsJournalFile decodeLogFile(UfsJournal journal, String filename) { URI location = URIUtils.appendPathOrDie(journal.getLogDir(), filename); try { String[] parts = filename.split("-"); // There can be temporary files in logs directory. Skip them. if (parts.length != 2) { return null; } long start = Long.decode(parts[0]); long end = Long.decode(parts[1]); return UfsJournalFile.createLogFile(location, start, end); } catch (IllegalStateException e) { LOG.error("Illegal journal file {}.", location); throw e; } catch (NumberFormatException e) { // There can be temporary files (e.g. created for rename). return null; } }
class class_name[name] begin[{] method[decodeLogFile, return_type[type[UfsJournalFile]], modifier[static], parameter[journal, filename]] begin[{] local_variable[type[URI], location] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="-")], member=split, postfix_operators=[], prefix_operators=[], qualifier=filename, selectors=[], type_arguments=None), name=parts)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=parts, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))])], member=decode, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), name=start)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=parts, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))])], member=decode, postfix_operators=[], prefix_operators=[], qualifier=Long, selectors=[], type_arguments=None), name=end)], modifiers=set(), type=BasicType(dimensions=[], name=long)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=location, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=start, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=end, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createLogFile, postfix_operators=[], prefix_operators=[], qualifier=UfsJournalFile, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Illegal journal file {}."), MemberReference(member=location, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOG, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalStateException'])), CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NumberFormatException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Nullable] Keyword[static] identifier[UfsJournalFile] identifier[decodeLogFile] operator[SEP] identifier[UfsJournal] identifier[journal] , identifier[String] identifier[filename] operator[SEP] { identifier[URI] identifier[location] operator[=] identifier[URIUtils] operator[SEP] identifier[appendPathOrDie] operator[SEP] identifier[journal] operator[SEP] identifier[getLogDir] operator[SEP] operator[SEP] , identifier[filename] operator[SEP] operator[SEP] Keyword[try] { identifier[String] operator[SEP] operator[SEP] identifier[parts] operator[=] identifier[filename] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parts] operator[SEP] identifier[length] operator[!=] Other[2] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[long] identifier[start] operator[=] identifier[Long] operator[SEP] identifier[decode] operator[SEP] identifier[parts] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[end] operator[=] identifier[Long] operator[SEP] identifier[decode] operator[SEP] identifier[parts] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[UfsJournalFile] operator[SEP] identifier[createLogFile] operator[SEP] identifier[location] , identifier[start] , identifier[end] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalStateException] identifier[e] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[location] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } Keyword[catch] operator[SEP] identifier[NumberFormatException] identifier[e] operator[SEP] { Keyword[return] Other[null] operator[SEP] } }
public Pandas getList() throws JinxException { Map<String, String> params = new TreeMap<>(); params.put("method", "flickr.panda.getList"); return jinx.flickrGet(params, Pandas.class, false); }
class class_name[name] begin[{] method[getList, return_type[type[Pandas]], modifier[public], parameter[]] begin[{] local_variable[type[Map], params] call[params.put, parameter[literal["method"], literal["flickr.panda.getList"]]] return[call[jinx.flickrGet, parameter[member[.params], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Pandas, sub_type=None)), literal[false]]]] end[}] END[}]
Keyword[public] identifier[Pandas] identifier[getList] operator[SEP] operator[SEP] Keyword[throws] identifier[JinxException] { identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[params] operator[=] Keyword[new] identifier[TreeMap] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[params] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[jinx] operator[SEP] identifier[flickrGet] operator[SEP] identifier[params] , identifier[Pandas] operator[SEP] Keyword[class] , literal[boolean] operator[SEP] operator[SEP] }
public String getLocalizedResource(String namespace, String resourceId) throws Exception { String resourceValue = ""; Class r = Class.forName(namespace + "$string"); Field f = r.getField(resourceId); resourceValue = getCurrentActivity().getResources().getString(f.getInt(f)); return resourceValue; }
class class_name[name] begin[{] method[getLocalizedResource, return_type[type[String]], modifier[public], parameter[namespace, resourceId]] begin[{] local_variable[type[String], resourceValue] local_variable[type[Class], r] local_variable[type[Field], f] assign[member[.resourceValue], call[.getCurrentActivity, parameter[]]] return[member[.resourceValue]] end[}] END[}]
Keyword[public] identifier[String] identifier[getLocalizedResource] operator[SEP] identifier[String] identifier[namespace] , identifier[String] identifier[resourceId] operator[SEP] Keyword[throws] identifier[Exception] { identifier[String] identifier[resourceValue] operator[=] literal[String] operator[SEP] identifier[Class] identifier[r] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[namespace] operator[+] literal[String] operator[SEP] operator[SEP] identifier[Field] identifier[f] operator[=] identifier[r] operator[SEP] identifier[getField] operator[SEP] identifier[resourceId] operator[SEP] operator[SEP] identifier[resourceValue] operator[=] identifier[getCurrentActivity] operator[SEP] operator[SEP] operator[SEP] identifier[getResources] operator[SEP] operator[SEP] operator[SEP] identifier[getString] operator[SEP] identifier[f] operator[SEP] identifier[getInt] operator[SEP] identifier[f] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[resourceValue] operator[SEP] }
protected boolean doFirstValidationPass(final ProcessorData processorData) { final ContentSpec contentSpec = processorData.getContentSpec(); LOG.info("Starting first validation pass..."); // Validate the content spec syntax if (!validator.preValidateContentSpec(contentSpec)) { log.error(ProcessorConstants.ERROR_INVALID_CS_MSG); return false; } return true; }
class class_name[name] begin[{] method[doFirstValidationPass, return_type[type[boolean]], modifier[protected], parameter[processorData]] begin[{] local_variable[type[ContentSpec], contentSpec] call[LOG.info, parameter[literal["Starting first validation pass..."]]] if[call[validator.preValidateContentSpec, parameter[member[.contentSpec]]]] begin[{] call[log.error, parameter[member[ProcessorConstants.ERROR_INVALID_CS_MSG]]] return[literal[false]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[doFirstValidationPass] operator[SEP] Keyword[final] identifier[ProcessorData] identifier[processorData] operator[SEP] { Keyword[final] identifier[ContentSpec] identifier[contentSpec] operator[=] identifier[processorData] operator[SEP] identifier[getContentSpec] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[validator] operator[SEP] identifier[preValidateContentSpec] operator[SEP] identifier[contentSpec] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] identifier[ProcessorConstants] operator[SEP] identifier[ERROR_INVALID_CS_MSG] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
@Override public DescribeFleetHistoryResult describeFleetHistory(DescribeFleetHistoryRequest request) { request = beforeClientExecution(request); return executeDescribeFleetHistory(request); }
class class_name[name] begin[{] method[describeFleetHistory, return_type[type[DescribeFleetHistoryResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDescribeFleetHistory, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DescribeFleetHistoryResult] identifier[describeFleetHistory] operator[SEP] identifier[DescribeFleetHistoryRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDescribeFleetHistory] operator[SEP] identifier[request] operator[SEP] operator[SEP] }