code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public HttpRequest form(String name, Object value, Object... parameters) { form(name, value); for (int i = 0; i < parameters.length; i += 2) { name = parameters[i].toString(); form(name, parameters[i + 1]); } return this; }
class class_name[name] begin[{] method[form, return_type[type[HttpRequest]], modifier[public], parameter[name, value, parameters]] begin[{] call[.form, parameter[member[.name], member[.value]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=parameters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+))])], member=form, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=parameters, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2))]), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[HttpRequest] identifier[form] operator[SEP] identifier[String] identifier[name] , identifier[Object] identifier[value] , identifier[Object] operator[...] identifier[parameters] operator[SEP] { identifier[form] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[parameters] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[+=] Other[2] operator[SEP] { identifier[name] operator[=] identifier[parameters] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[form] operator[SEP] identifier[name] , identifier[parameters] operator[SEP] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public static Method getAccessibleMethod(Class<?> clazz, String methodName, Class<?>[] argTypes) { assertObjectNotNull("clazz", clazz); assertStringNotNullAndNotTrimmedEmpty("methodName", methodName); return findMethod(clazz, methodName, argTypes, VisibilityType.ACCESSIBLE, false); }
class class_name[name] begin[{] method[getAccessibleMethod, return_type[type[Method]], modifier[public static], parameter[clazz, methodName, argTypes]] begin[{] call[.assertObjectNotNull, parameter[literal["clazz"], member[.clazz]]] call[.assertStringNotNullAndNotTrimmedEmpty, parameter[literal["methodName"], member[.methodName]]] return[call[.findMethod, parameter[member[.clazz], member[.methodName], member[.argTypes], member[VisibilityType.ACCESSIBLE], literal[false]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Method] identifier[getAccessibleMethod] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[String] identifier[methodName] , identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[argTypes] operator[SEP] { identifier[assertObjectNotNull] operator[SEP] literal[String] , identifier[clazz] operator[SEP] operator[SEP] identifier[assertStringNotNullAndNotTrimmedEmpty] operator[SEP] literal[String] , identifier[methodName] operator[SEP] operator[SEP] Keyword[return] identifier[findMethod] operator[SEP] identifier[clazz] , identifier[methodName] , identifier[argTypes] , identifier[VisibilityType] operator[SEP] identifier[ACCESSIBLE] , literal[boolean] operator[SEP] operator[SEP] }
public INDArray scoreExamples(DataSet data, boolean addRegularizationTerms) { try{ return scoreExamplesHelper(data, addRegularizationTerms); } catch (OutOfMemoryError e){ CrashReportingUtil.writeMemoryCrashDump(this, e); throw e; } }
class class_name[name] begin[{] method[scoreExamples, return_type[type[INDArray]], modifier[public], parameter[data, addRegularizationTerms]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=addRegularizationTerms, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=scoreExamplesHelper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=writeMemoryCrashDump, postfix_operators=[], prefix_operators=[], qualifier=CrashReportingUtil, 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=['OutOfMemoryError']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] identifier[INDArray] identifier[scoreExamples] operator[SEP] identifier[DataSet] identifier[data] , Keyword[boolean] identifier[addRegularizationTerms] operator[SEP] { Keyword[try] { Keyword[return] identifier[scoreExamplesHelper] operator[SEP] identifier[data] , identifier[addRegularizationTerms] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[OutOfMemoryError] identifier[e] operator[SEP] { identifier[CrashReportingUtil] operator[SEP] identifier[writeMemoryCrashDump] operator[SEP] Keyword[this] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } }
private ComboBox createSiteSelect(CmsObject cms) { final IndexedContainer availableSites = CmsVaadinUtils.getAvailableSitesContainer(cms, SITE_CAPTION); ComboBox combo = new ComboBox(null, availableSites); combo.setTextInputAllowed(true); combo.setNullSelectionAllowed(false); combo.setWidth("200px"); combo.setInputPrompt( Messages.get().getBundle(UI.getCurrent().getLocale()).key(Messages.GUI_EXPLORER_CLICK_TO_EDIT_0)); combo.setItemCaptionPropertyId(SITE_CAPTION); combo.select(cms.getRequestContext().getSiteRoot()); combo.setFilteringMode(FilteringMode.CONTAINS); combo.addValueChangeListener(new ValueChangeListener() { private static final long serialVersionUID = 1L; public void valueChange(ValueChangeEvent event) { String value = (String)event.getProperty().getValue(); if (availableSites.containsId(value)) { changeSite(value, null); m_appContext.updateOnChange(); availableSites.removeAllContainerFilters(); } } }); if (Page.getCurrent().getBrowserWindowHeight() > 650) { combo.setPageLength(20); } return combo; }
class class_name[name] begin[{] method[createSiteSelect, return_type[type[ComboBox]], modifier[private], parameter[cms]] begin[{] local_variable[type[IndexedContainer], availableSites] local_variable[type[ComboBox], combo] call[combo.setTextInputAllowed, parameter[literal[true]]] call[combo.setNullSelectionAllowed, parameter[literal[false]]] call[combo.setWidth, parameter[literal["200px"]]] call[combo.setInputPrompt, parameter[call[Messages.get, parameter[]]]] call[combo.setItemCaptionPropertyId, parameter[member[.SITE_CAPTION]]] call[combo.select, parameter[call[cms.getRequestContext, parameter[]]]] call[combo.setFilteringMode, parameter[member[FilteringMode.CONTAINS]]] call[combo.addValueChangeListener, parameter[ClassCreator(arguments=[], body=[FieldDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1L), name=serialVersionUID)], documentation=None, modifiers={'final', 'private', 'static'}, type=BasicType(dimensions=[], name=long)), MethodDeclaration(annotations=[], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[], member=getProperty, postfix_operators=[], prefix_operators=[], qualifier=event, selectors=[MethodInvocation(arguments=[], member=getValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsId, postfix_operators=[], prefix_operators=[], qualifier=availableSites, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=changeSite, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=updateOnChange, postfix_operators=[], prefix_operators=[], qualifier=m_appContext, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=removeAllContainerFilters, postfix_operators=[], prefix_operators=[], qualifier=availableSites, selectors=[], type_arguments=None), label=None)]))], documentation=None, modifiers={'public'}, name=valueChange, parameters=[FormalParameter(annotations=[], modifiers=set(), name=event, type=ReferenceType(arguments=None, dimensions=[], name=ValueChangeEvent, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ValueChangeListener, sub_type=None))]] if[binary_operation[call[Page.getCurrent, parameter[]], >, literal[650]]] begin[{] call[combo.setPageLength, parameter[literal[20]]] else begin[{] None end[}] return[member[.combo]] end[}] END[}]
Keyword[private] identifier[ComboBox] identifier[createSiteSelect] operator[SEP] identifier[CmsObject] identifier[cms] operator[SEP] { Keyword[final] identifier[IndexedContainer] identifier[availableSites] operator[=] identifier[CmsVaadinUtils] operator[SEP] identifier[getAvailableSitesContainer] operator[SEP] identifier[cms] , identifier[SITE_CAPTION] operator[SEP] operator[SEP] identifier[ComboBox] identifier[combo] operator[=] Keyword[new] identifier[ComboBox] operator[SEP] Other[null] , identifier[availableSites] operator[SEP] operator[SEP] identifier[combo] operator[SEP] identifier[setTextInputAllowed] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[combo] operator[SEP] identifier[setNullSelectionAllowed] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[combo] operator[SEP] identifier[setWidth] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[combo] operator[SEP] identifier[setInputPrompt] operator[SEP] identifier[Messages] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[getBundle] operator[SEP] identifier[UI] operator[SEP] identifier[getCurrent] operator[SEP] operator[SEP] operator[SEP] identifier[getLocale] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[key] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_EXPLORER_CLICK_TO_EDIT_0] operator[SEP] operator[SEP] operator[SEP] identifier[combo] operator[SEP] identifier[setItemCaptionPropertyId] operator[SEP] identifier[SITE_CAPTION] operator[SEP] operator[SEP] identifier[combo] operator[SEP] identifier[select] operator[SEP] identifier[cms] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] identifier[getSiteRoot] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[combo] operator[SEP] identifier[setFilteringMode] operator[SEP] identifier[FilteringMode] operator[SEP] identifier[CONTAINS] operator[SEP] operator[SEP] identifier[combo] operator[SEP] identifier[addValueChangeListener] operator[SEP] Keyword[new] identifier[ValueChangeListener] operator[SEP] operator[SEP] { Keyword[private] Keyword[static] Keyword[final] Keyword[long] identifier[serialVersionUID] operator[=] Other[1L] operator[SEP] Keyword[public] Keyword[void] identifier[valueChange] operator[SEP] identifier[ValueChangeEvent] identifier[event] operator[SEP] { identifier[String] identifier[value] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[event] operator[SEP] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[availableSites] operator[SEP] identifier[containsId] operator[SEP] identifier[value] operator[SEP] operator[SEP] { identifier[changeSite] operator[SEP] identifier[value] , Other[null] operator[SEP] operator[SEP] identifier[m_appContext] operator[SEP] identifier[updateOnChange] operator[SEP] operator[SEP] operator[SEP] identifier[availableSites] operator[SEP] identifier[removeAllContainerFilters] operator[SEP] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Page] operator[SEP] identifier[getCurrent] operator[SEP] operator[SEP] operator[SEP] identifier[getBrowserWindowHeight] operator[SEP] operator[SEP] operator[>] Other[650] operator[SEP] { identifier[combo] operator[SEP] identifier[setPageLength] operator[SEP] Other[20] operator[SEP] operator[SEP] } Keyword[return] identifier[combo] operator[SEP] }
public static GrammaticalRelation getPrep(String prepositionString) { GrammaticalRelation result = preps.get(prepositionString); if (result == null) { synchronized(preps) { result = preps.get(prepositionString); if (result == null) { result = new GrammaticalRelation(Language.English, "prep", "prep_collapsed", null, PREPOSITIONAL_MODIFIER, prepositionString); preps.put(prepositionString, result); threadSafeAddRelation(result); } } } return result; }
class class_name[name] begin[{] method[getPrep, return_type[type[GrammaticalRelation]], modifier[public static], parameter[prepositionString]] begin[{] local_variable[type[GrammaticalRelation], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] SYNCHRONIZED[member[.preps]] BEGIN[{] assign[member[.result], call[preps.get, parameter[member[.prepositionString]]]] if[binary_operation[member[.result], ==, literal[null]]] begin[{] assign[member[.result], ClassCreator(arguments=[MemberReference(member=English, postfix_operators=[], prefix_operators=[], qualifier=Language, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="prep"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="prep_collapsed"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=PREPOSITIONAL_MODIFIER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=prepositionString, 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=GrammaticalRelation, sub_type=None))] call[preps.put, parameter[member[.prepositionString], member[.result]]] call[.threadSafeAddRelation, parameter[member[.result]]] else begin[{] None end[}] END[}] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[GrammaticalRelation] identifier[getPrep] operator[SEP] identifier[String] identifier[prepositionString] operator[SEP] { identifier[GrammaticalRelation] identifier[result] operator[=] identifier[preps] operator[SEP] identifier[get] operator[SEP] identifier[prepositionString] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[preps] operator[SEP] { identifier[result] operator[=] identifier[preps] operator[SEP] identifier[get] operator[SEP] identifier[prepositionString] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { identifier[result] operator[=] Keyword[new] identifier[GrammaticalRelation] operator[SEP] identifier[Language] operator[SEP] identifier[English] , literal[String] , literal[String] , Other[null] , identifier[PREPOSITIONAL_MODIFIER] , identifier[prepositionString] operator[SEP] operator[SEP] identifier[preps] operator[SEP] identifier[put] operator[SEP] identifier[prepositionString] , identifier[result] operator[SEP] operator[SEP] identifier[threadSafeAddRelation] operator[SEP] identifier[result] operator[SEP] operator[SEP] } } } Keyword[return] identifier[result] operator[SEP] }
private void printDoubleWithFields(String name, String fields, double value) { print(METRIC_PREFIX); print(name); if (fields != null) { print(fields); } print(' '); println(decimalFormat.format(value)); }
class class_name[name] begin[{] method[printDoubleWithFields, return_type[void], modifier[private], parameter[name, fields, value]] begin[{] call[.print, parameter[member[.METRIC_PREFIX]]] call[.print, parameter[member[.name]]] if[binary_operation[member[.fields], !=, literal[null]]] begin[{] call[.print, parameter[member[.fields]]] else begin[{] None end[}] call[.print, parameter[literal[' ']]] call[.println, parameter[call[decimalFormat.format, parameter[member[.value]]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[printDoubleWithFields] operator[SEP] identifier[String] identifier[name] , identifier[String] identifier[fields] , Keyword[double] identifier[value] operator[SEP] { identifier[print] operator[SEP] identifier[METRIC_PREFIX] operator[SEP] operator[SEP] identifier[print] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[fields] operator[!=] Other[null] operator[SEP] { identifier[print] operator[SEP] identifier[fields] operator[SEP] operator[SEP] } identifier[print] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[println] operator[SEP] identifier[decimalFormat] operator[SEP] identifier[format] operator[SEP] identifier[value] operator[SEP] operator[SEP] operator[SEP] }
public void restoreCurrentRecord(FieldList fieldList) { m_buffCurrentLockedData.bufferToFields(fieldList, Constants.DONT_DISPLAY, Constants.READ_MOVE); int iColumnCount = this.getColumnCount(); for (int i = 0; i < iColumnCount; i++) { // Cache the non-field data Field field = null; if (this.getFieldInfo(i) != null) field = this.getFieldInfo(i).getField(); if ((field != null) && (field.getRecord() != fieldList)) field.setString(m_buffCurrentLockedData.getNextString(), Constants.DONT_DISPLAY, Constants.READ_MOVE); } }
class class_name[name] begin[{] method[restoreCurrentRecord, return_type[void], modifier[public], parameter[fieldList]] begin[{] call[m_buffCurrentLockedData.bufferToFields, parameter[member[.fieldList], member[Constants.DONT_DISPLAY], member[Constants.READ_MOVE]]] local_variable[type[int], iColumnCount] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), name=field)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Field, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFieldInfo, 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=StatementExpression(expression=Assignment(expressionl=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getFieldInfo, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=getField, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getRecord, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), operandr=MemberReference(member=fieldList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=!=), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getNextString, postfix_operators=[], prefix_operators=[], qualifier=m_buffCurrentLockedData, selectors=[], type_arguments=None), MemberReference(member=DONT_DISPLAY, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[]), MemberReference(member=READ_MOVE, postfix_operators=[], prefix_operators=[], qualifier=Constants, selectors=[])], member=setString, postfix_operators=[], prefix_operators=[], qualifier=field, selectors=[], type_arguments=None), label=None))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=iColumnCount, 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[restoreCurrentRecord] operator[SEP] identifier[FieldList] identifier[fieldList] operator[SEP] { identifier[m_buffCurrentLockedData] operator[SEP] identifier[bufferToFields] operator[SEP] identifier[fieldList] , identifier[Constants] operator[SEP] identifier[DONT_DISPLAY] , identifier[Constants] operator[SEP] identifier[READ_MOVE] operator[SEP] operator[SEP] Keyword[int] identifier[iColumnCount] operator[=] Keyword[this] operator[SEP] identifier[getColumnCount] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[iColumnCount] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Field] identifier[field] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[getFieldInfo] operator[SEP] identifier[i] operator[SEP] operator[!=] Other[null] operator[SEP] identifier[field] operator[=] Keyword[this] operator[SEP] identifier[getFieldInfo] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getField] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[field] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[field] operator[SEP] identifier[getRecord] operator[SEP] operator[SEP] operator[!=] identifier[fieldList] operator[SEP] operator[SEP] identifier[field] operator[SEP] identifier[setString] operator[SEP] identifier[m_buffCurrentLockedData] operator[SEP] identifier[getNextString] operator[SEP] operator[SEP] , identifier[Constants] operator[SEP] identifier[DONT_DISPLAY] , identifier[Constants] operator[SEP] identifier[READ_MOVE] operator[SEP] operator[SEP] } }
public void showFeedbackSubmitted() { if (!isEnabled) { return; } show(getContext().getString(R.string.feedback_submitted), THREE_SECOND_DELAY_IN_MILLIS, false); }
class class_name[name] begin[{] method[showFeedbackSubmitted, return_type[void], modifier[public], parameter[]] begin[{] if[member[.isEnabled]] begin[{] return[None] else begin[{] None end[}] call[.show, parameter[call[.getContext, parameter[]], member[.THREE_SECOND_DELAY_IN_MILLIS], literal[false]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[showFeedbackSubmitted] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isEnabled] operator[SEP] { Keyword[return] operator[SEP] } identifier[show] operator[SEP] identifier[getContext] operator[SEP] operator[SEP] operator[SEP] identifier[getString] operator[SEP] identifier[R] operator[SEP] identifier[string] operator[SEP] identifier[feedback_submitted] operator[SEP] , identifier[THREE_SECOND_DELAY_IN_MILLIS] , literal[boolean] operator[SEP] operator[SEP] }
@Override public Feature create(org.geomajas.layer.feature.Feature feature, FeaturesSupported layer) { Map<String, Attribute<?>> attributes = new HashMap<String, Attribute<?>>(); for (String key : feature.getAttributes().keySet()) { attributes.put(key, new AttributeImpl(feature.getAttributes().get(key))); } return new FeatureImpl(layer, feature.getId(), attributes, feature.getGeometry(), feature.getLabel()); }
class class_name[name] begin[{] method[create, return_type[type[Feature]], modifier[public], parameter[feature, layer]] begin[{] local_variable[type[Map], attributes] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassCreator(arguments=[MethodInvocation(arguments=[], member=getAttributes, postfix_operators=[], prefix_operators=[], qualifier=feature, selectors=[MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AttributeImpl, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=attributes, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAttributes, postfix_operators=[], prefix_operators=[], qualifier=feature, selectors=[MethodInvocation(arguments=[], member=keySet, 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=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[ClassCreator(arguments=[MemberReference(member=layer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=feature, selectors=[], type_arguments=None), MemberReference(member=attributes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getGeometry, postfix_operators=[], prefix_operators=[], qualifier=feature, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getLabel, postfix_operators=[], prefix_operators=[], qualifier=feature, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FeatureImpl, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Feature] identifier[create] operator[SEP] identifier[org] operator[SEP] identifier[geomajas] operator[SEP] identifier[layer] operator[SEP] identifier[feature] operator[SEP] identifier[Feature] identifier[feature] , identifier[FeaturesSupported] identifier[layer] operator[SEP] { identifier[Map] operator[<] identifier[String] , identifier[Attribute] operator[<] operator[?] operator[>] operator[>] identifier[attributes] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Attribute] operator[<] operator[?] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[feature] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[attributes] operator[SEP] identifier[put] operator[SEP] identifier[key] , Keyword[new] identifier[AttributeImpl] operator[SEP] identifier[feature] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[FeatureImpl] operator[SEP] identifier[layer] , identifier[feature] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[attributes] , identifier[feature] operator[SEP] identifier[getGeometry] operator[SEP] operator[SEP] , identifier[feature] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static PublicKey decryptPublicKey(String publicKeyStr) { try { KeyFactory keyFactory = KeyFactory.getInstance(algorithm); X509EncodedKeySpec keySpec = new X509EncodedKeySpec(Base64Util.decode(publicKeyStr)); return keyFactory.generatePublic(keySpec); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (InvalidKeySpecException e) { e.printStackTrace(); } return null; }
class class_name[name] begin[{] method[decryptPublicKey, return_type[type[PublicKey]], modifier[public static], parameter[publicKeyStr]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=algorithm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getInstance, postfix_operators=[], prefix_operators=[], qualifier=KeyFactory, selectors=[], type_arguments=None), name=keyFactory)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=KeyFactory, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=publicKeyStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decode, postfix_operators=[], prefix_operators=[], qualifier=Base64Util, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=X509EncodedKeySpec, sub_type=None)), name=keySpec)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=X509EncodedKeySpec, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=keySpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generatePublic, postfix_operators=[], prefix_operators=[], qualifier=keyFactory, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoSuchAlgorithmException'])), CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InvalidKeySpecException']))], finally_block=None, label=None, resources=None) return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PublicKey] identifier[decryptPublicKey] operator[SEP] identifier[String] identifier[publicKeyStr] operator[SEP] { Keyword[try] { identifier[KeyFactory] identifier[keyFactory] operator[=] identifier[KeyFactory] operator[SEP] identifier[getInstance] operator[SEP] identifier[algorithm] operator[SEP] operator[SEP] identifier[X509EncodedKeySpec] identifier[keySpec] operator[=] Keyword[new] identifier[X509EncodedKeySpec] operator[SEP] identifier[Base64Util] operator[SEP] identifier[decode] operator[SEP] identifier[publicKeyStr] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[keyFactory] operator[SEP] identifier[generatePublic] operator[SEP] identifier[keySpec] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchAlgorithmException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvalidKeySpecException] identifier[e] operator[SEP] { identifier[e] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
protected boolean checkChannelId(final int id, final String svcType) { if (id == channelId) return true; logger.warn("received service " + svcType + " with wrong channel ID " + id + ", expected " + channelId + " - ignored"); return false; }
class class_name[name] begin[{] method[checkChannelId, return_type[type[boolean]], modifier[protected], parameter[id, svcType]] begin[{] if[binary_operation[member[.id], ==, member[.channelId]]] begin[{] return[literal[true]] else begin[{] None end[}] call[logger.warn, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["received service "], +, member[.svcType]], +, literal[" with wrong channel ID "]], +, member[.id]], +, literal[", expected "]], +, member[.channelId]], +, literal[" - ignored"]]]] return[literal[false]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[checkChannelId] operator[SEP] Keyword[final] Keyword[int] identifier[id] , Keyword[final] identifier[String] identifier[svcType] operator[SEP] { Keyword[if] operator[SEP] identifier[id] operator[==] identifier[channelId] operator[SEP] Keyword[return] literal[boolean] operator[SEP] identifier[logger] operator[SEP] identifier[warn] operator[SEP] literal[String] operator[+] identifier[svcType] operator[+] literal[String] operator[+] identifier[id] operator[+] literal[String] operator[+] identifier[channelId] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
public void setFullName(String fullName) { int ind = fullName.indexOf(' '); if (ind != -1) { this.firstName = fullName.substring(0, ind); this.lastName = fullName.substring(ind + 1); } else { this.firstName = fullName; } }
class class_name[name] begin[{] method[setFullName, return_type[void], modifier[public], parameter[fullName]] begin[{] local_variable[type[int], ind] if[binary_operation[member[.ind], !=, literal[1]]] begin[{] assign[THIS[member[None.firstName]], call[fullName.substring, parameter[literal[0], member[.ind]]]] assign[THIS[member[None.lastName]], call[fullName.substring, parameter[binary_operation[member[.ind], +, literal[1]]]]] else begin[{] assign[THIS[member[None.firstName]], member[.fullName]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setFullName] operator[SEP] identifier[String] identifier[fullName] operator[SEP] { Keyword[int] identifier[ind] operator[=] identifier[fullName] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ind] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[this] operator[SEP] identifier[firstName] operator[=] identifier[fullName] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[ind] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[lastName] operator[=] identifier[fullName] operator[SEP] identifier[substring] operator[SEP] identifier[ind] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[else] { Keyword[this] operator[SEP] identifier[firstName] operator[=] identifier[fullName] operator[SEP] } }
public Observable<ServiceResponse<Page<FileServerInner>>> listByWorkspaceNextWithServiceResponseAsync(final String nextPageLink) { return listByWorkspaceNextSinglePageAsync(nextPageLink) .concatMap(new Func1<ServiceResponse<Page<FileServerInner>>, Observable<ServiceResponse<Page<FileServerInner>>>>() { @Override public Observable<ServiceResponse<Page<FileServerInner>>> call(ServiceResponse<Page<FileServerInner>> page) { String nextPageLink = page.body().nextPageLink(); if (nextPageLink == null) { return Observable.just(page); } return Observable.just(page).concatWith(listByWorkspaceNextWithServiceResponseAsync(nextPageLink)); } }); }
class class_name[name] begin[{] method[listByWorkspaceNextWithServiceResponseAsync, return_type[type[Observable]], modifier[public], parameter[nextPageLink]] begin[{] return[call[.listByWorkspaceNextSinglePageAsync, parameter[member[.nextPageLink]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[FileServerInner] operator[>] operator[>] operator[>] identifier[listByWorkspaceNextWithServiceResponseAsync] operator[SEP] Keyword[final] identifier[String] identifier[nextPageLink] operator[SEP] { Keyword[return] identifier[listByWorkspaceNextSinglePageAsync] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] identifier[concatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[FileServerInner] operator[>] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[FileServerInner] operator[>] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[FileServerInner] operator[>] operator[>] operator[>] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[FileServerInner] operator[>] operator[>] identifier[page] operator[SEP] { identifier[String] identifier[nextPageLink] operator[=] identifier[page] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nextPageLink] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] identifier[page] operator[SEP] operator[SEP] } Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] identifier[page] operator[SEP] operator[SEP] identifier[concatWith] operator[SEP] identifier[listByWorkspaceNextWithServiceResponseAsync] operator[SEP] identifier[nextPageLink] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
private static String byteToStr(byte[] byteArray) { int len = byteArray.length; StringBuilder strDigest = new StringBuilder(len * 2); for (byte aByteArray : byteArray) { strDigest.append(byteToHexStr(aByteArray)); } return strDigest.toString(); }
class class_name[name] begin[{] method[byteToStr, return_type[type[String]], modifier[private static], parameter[byteArray]] begin[{] local_variable[type[int], len] local_variable[type[StringBuilder], strDigest] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=aByteArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=byteToHexStr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=strDigest, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=byteArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=aByteArray)], modifiers=set(), type=BasicType(dimensions=[], name=byte))), label=None) return[call[strDigest.toString, parameter[]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[byteToStr] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[byteArray] operator[SEP] { Keyword[int] identifier[len] operator[=] identifier[byteArray] operator[SEP] identifier[length] operator[SEP] identifier[StringBuilder] identifier[strDigest] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[len] operator[*] Other[2] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[byte] identifier[aByteArray] operator[:] identifier[byteArray] operator[SEP] { identifier[strDigest] operator[SEP] identifier[append] operator[SEP] identifier[byteToHexStr] operator[SEP] identifier[aByteArray] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[strDigest] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings({"SuspiciousSystemArraycopy"}) @Override public void setTo(T orig) { if (orig.width != width || orig.height != height || orig.numBands != numBands ) reshape(orig.width,orig.height,orig.numBands); if (!orig.isSubimage() && !isSubimage()) { System.arraycopy(orig._getData(), orig.startIndex, _getData(), startIndex, stride * height); } else { int indexSrc = orig.startIndex; int indexDst = startIndex; for (int y = 0; y < height; y++) { System.arraycopy(orig._getData(), indexSrc, _getData(), indexDst, width * numBands); indexSrc += orig.stride; indexDst += stride; } } }
class class_name[name] begin[{] method[setTo, return_type[void], modifier[public], parameter[orig]] begin[{] if[binary_operation[binary_operation[binary_operation[member[orig.width], !=, member[.width]], ||, binary_operation[member[orig.height], !=, member[.height]]], ||, binary_operation[member[orig.numBands], !=, member[.numBands]]]] begin[{] call[.reshape, parameter[member[orig.width], member[orig.height], member[orig.numBands]]] else begin[{] None end[}] if[binary_operation[call[orig.isSubimage, parameter[]], &&, call[.isSubimage, parameter[]]]] begin[{] call[System.arraycopy, parameter[call[orig._getData, parameter[]], member[orig.startIndex], call[._getData, parameter[]], member[.startIndex], binary_operation[member[.stride], *, member[.height]]]] else begin[{] local_variable[type[int], indexSrc] local_variable[type[int], indexDst] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=_getData, postfix_operators=[], prefix_operators=[], qualifier=orig, selectors=[], type_arguments=None), MemberReference(member=indexSrc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=_getData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=indexDst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=width, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=numBands, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)], member=arraycopy, postfix_operators=[], prefix_operators=[], qualifier=System, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=indexSrc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=stride, postfix_operators=[], prefix_operators=[], qualifier=orig, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=indexDst, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=stride, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=height, 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=y)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=y, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] } operator[SEP] annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setTo] operator[SEP] identifier[T] identifier[orig] operator[SEP] { Keyword[if] operator[SEP] identifier[orig] operator[SEP] identifier[width] operator[!=] identifier[width] operator[||] identifier[orig] operator[SEP] identifier[height] operator[!=] identifier[height] operator[||] identifier[orig] operator[SEP] identifier[numBands] operator[!=] identifier[numBands] operator[SEP] identifier[reshape] operator[SEP] identifier[orig] operator[SEP] identifier[width] , identifier[orig] operator[SEP] identifier[height] , identifier[orig] operator[SEP] identifier[numBands] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[orig] operator[SEP] identifier[isSubimage] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[isSubimage] operator[SEP] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[orig] operator[SEP] identifier[_getData] operator[SEP] operator[SEP] , identifier[orig] operator[SEP] identifier[startIndex] , identifier[_getData] operator[SEP] operator[SEP] , identifier[startIndex] , identifier[stride] operator[*] identifier[height] operator[SEP] operator[SEP] } Keyword[else] { Keyword[int] identifier[indexSrc] operator[=] identifier[orig] operator[SEP] identifier[startIndex] operator[SEP] Keyword[int] identifier[indexDst] operator[=] identifier[startIndex] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[y] operator[=] Other[0] operator[SEP] identifier[y] operator[<] identifier[height] operator[SEP] identifier[y] operator[++] operator[SEP] { identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[orig] operator[SEP] identifier[_getData] operator[SEP] operator[SEP] , identifier[indexSrc] , identifier[_getData] operator[SEP] operator[SEP] , identifier[indexDst] , identifier[width] operator[*] identifier[numBands] operator[SEP] operator[SEP] identifier[indexSrc] operator[+=] identifier[orig] operator[SEP] identifier[stride] operator[SEP] identifier[indexDst] operator[+=] identifier[stride] operator[SEP] } } }
protected void addViolation(MethodNode node, String message) { addViolation((ASTNode) node, String.format( "Violation in class %s. %s", node.getDeclaringClass().getNameWithoutPackage(), message )); }
class class_name[name] begin[{] method[addViolation, return_type[void], modifier[protected], parameter[node, message]] begin[{] call[.addViolation, parameter[Cast(expression=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ASTNode, sub_type=None)), call[String.format, parameter[literal["Violation in class %s. %s"], call[node.getDeclaringClass, parameter[]], member[.message]]]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addViolation] operator[SEP] identifier[MethodNode] identifier[node] , identifier[String] identifier[message] operator[SEP] { identifier[addViolation] operator[SEP] operator[SEP] identifier[ASTNode] operator[SEP] identifier[node] , identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[node] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] operator[SEP] identifier[getNameWithoutPackage] operator[SEP] operator[SEP] , identifier[message] operator[SEP] operator[SEP] operator[SEP] }
private Duration getRangeDurationSubDay(ProjectCalendar projectCalendar, TimescaleUnits rangeUnits, DateRange range, List<TimephasedWork> assignments, int startIndex) { throw new UnsupportedOperationException("Please request this functionality from the MPXJ maintainer"); }
class class_name[name] begin[{] method[getRangeDurationSubDay, return_type[type[Duration]], modifier[private], parameter[projectCalendar, rangeUnits, range, assignments, startIndex]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Please request this functionality from the MPXJ maintainer")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=UnsupportedOperationException, sub_type=None)), label=None) end[}] END[}]
Keyword[private] identifier[Duration] identifier[getRangeDurationSubDay] operator[SEP] identifier[ProjectCalendar] identifier[projectCalendar] , identifier[TimescaleUnits] identifier[rangeUnits] , identifier[DateRange] identifier[range] , identifier[List] operator[<] identifier[TimephasedWork] operator[>] identifier[assignments] , Keyword[int] identifier[startIndex] operator[SEP] { Keyword[throw] Keyword[new] identifier[UnsupportedOperationException] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public static Object readAnnotationValue(final Annotation annotation, final String name) { try { Method method = annotation.annotationType().getDeclaredMethod(name); return method.invoke(annotation); } catch (Exception ignore) { return null; } }
class class_name[name] begin[{] method[readAnnotationValue, return_type[type[Object]], modifier[public static], parameter[annotation, name]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=annotationType, postfix_operators=[], prefix_operators=[], qualifier=annotation, selectors=[MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDeclaredMethod, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None)), ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=annotation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ignore, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Object] identifier[readAnnotationValue] operator[SEP] Keyword[final] identifier[Annotation] identifier[annotation] , Keyword[final] identifier[String] identifier[name] operator[SEP] { Keyword[try] { identifier[Method] identifier[method] operator[=] identifier[annotation] operator[SEP] identifier[annotationType] operator[SEP] operator[SEP] operator[SEP] identifier[getDeclaredMethod] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[return] identifier[method] operator[SEP] identifier[invoke] operator[SEP] identifier[annotation] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ignore] operator[SEP] { Keyword[return] Other[null] operator[SEP] } }
public void setBarBorderColor(final Color COLOR) { if (null == barBorderColor) { _barBorderColor = null == COLOR ? Color.TRANSPARENT : COLOR; fireUpdateEvent(REDRAW_EVENT); } else { barBorderColor.set(COLOR); } }
class class_name[name] begin[{] method[setBarBorderColor, return_type[void], modifier[public], parameter[COLOR]] begin[{] if[binary_operation[literal[null], ==, member[.barBorderColor]]] begin[{] assign[member[._barBorderColor], TernaryExpression(condition=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operandr=MemberReference(member=COLOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), if_false=MemberReference(member=COLOR, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MemberReference(member=TRANSPARENT, postfix_operators=[], prefix_operators=[], qualifier=Color, selectors=[]))] call[.fireUpdateEvent, parameter[member[.REDRAW_EVENT]]] else begin[{] call[barBorderColor.set, parameter[member[.COLOR]]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setBarBorderColor] operator[SEP] Keyword[final] identifier[Color] identifier[COLOR] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[barBorderColor] operator[SEP] { identifier[_barBorderColor] operator[=] Other[null] operator[==] identifier[COLOR] operator[?] identifier[Color] operator[SEP] identifier[TRANSPARENT] operator[:] identifier[COLOR] operator[SEP] identifier[fireUpdateEvent] operator[SEP] identifier[REDRAW_EVENT] operator[SEP] operator[SEP] } Keyword[else] { identifier[barBorderColor] operator[SEP] identifier[set] operator[SEP] identifier[COLOR] operator[SEP] operator[SEP] } }
@SuppressWarnings("unchecked") // This is not good code, but what's there to be done? TODO public static <T> T sample(Counter<T> c, Random rand) { Iterable<T> objects; Set<T> keySet = c.keySet(); objects = c.keySet(); if (rand == null) { rand = new Random(); } else { // TODO: Seems like there should be a way to directly check if T is // comparable if (!keySet.isEmpty() && keySet.iterator().next() instanceof Comparable) { List l = new ArrayList<T>(keySet); Collections.sort(l); objects = l; } else { throw new RuntimeException("Results won't be stable since Counters keys are comparable."); } } double r = rand.nextDouble() * c.totalCount(); double total = 0.0; for (T t : objects) { // arbitrary ordering total += c.getCount(t); if (total >= r) return t; } // only chance of reaching here is if c isn't properly normalized, or if // double math makes total<1.0 return c.keySet().iterator().next(); }
class class_name[name] begin[{] method[sample, return_type[type[T]], modifier[public static], parameter[c, rand]] begin[{] local_variable[type[Iterable], objects] local_variable[type[Set], keySet] assign[member[.objects], call[c.keySet, parameter[]]] if[binary_operation[member[.rand], ==, literal[null]]] begin[{] assign[member[.rand], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Random, sub_type=None))] else begin[{] if[binary_operation[call[keySet.isEmpty, parameter[]], &&, binary_operation[call[keySet.iterator, parameter[]], instanceof, type[Comparable]]]] begin[{] local_variable[type[List], l] call[Collections.sort, parameter[member[.l]]] assign[member[.objects], member[.l]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Results won't be stable since Counters keys are comparable.")], 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) end[}] end[}] local_variable[type[double], r] local_variable[type[double], total] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=total, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCount, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=total, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=>=), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None))]), control=EnhancedForControl(iterable=MemberReference(member=objects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=t)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))), label=None) return[call[c.keySet, parameter[]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[T] identifier[sample] operator[SEP] identifier[Counter] operator[<] identifier[T] operator[>] identifier[c] , identifier[Random] identifier[rand] operator[SEP] { identifier[Iterable] operator[<] identifier[T] operator[>] identifier[objects] operator[SEP] identifier[Set] operator[<] identifier[T] operator[>] identifier[keySet] operator[=] identifier[c] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[objects] operator[=] identifier[c] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[rand] operator[==] Other[null] operator[SEP] { identifier[rand] operator[=] Keyword[new] identifier[Random] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] operator[!] identifier[keySet] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[&&] identifier[keySet] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] Keyword[instanceof] identifier[Comparable] operator[SEP] { identifier[List] identifier[l] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[T] operator[>] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] identifier[Collections] operator[SEP] identifier[sort] operator[SEP] identifier[l] operator[SEP] operator[SEP] identifier[objects] operator[=] identifier[l] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[RuntimeException] operator[SEP] literal[String] operator[SEP] operator[SEP] } } Keyword[double] identifier[r] operator[=] identifier[rand] operator[SEP] identifier[nextDouble] operator[SEP] operator[SEP] operator[*] identifier[c] operator[SEP] identifier[totalCount] operator[SEP] operator[SEP] operator[SEP] Keyword[double] identifier[total] operator[=] literal[Float] operator[SEP] Keyword[for] operator[SEP] identifier[T] identifier[t] operator[:] identifier[objects] operator[SEP] { identifier[total] operator[+=] identifier[c] operator[SEP] identifier[getCount] operator[SEP] identifier[t] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[total] operator[>=] identifier[r] operator[SEP] Keyword[return] identifier[t] operator[SEP] } Keyword[return] identifier[c] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] }
public String getInsertMNStatement(String table, String[] pkColumns1, String[] pkColumns2) { SqlStatement sql; String result; String[] cols = new String[pkColumns1.length + pkColumns2.length]; System.arraycopy(pkColumns1, 0, cols, 0, pkColumns1.length); System.arraycopy(pkColumns2, 0, cols, pkColumns1.length, pkColumns2.length); sql = new SqlInsertMNStatement(table, cols, logger); result = sql.getStatement(); if (logger.isDebugEnabled()) { logger.debug("SQL:" + result); } return result; }
class class_name[name] begin[{] method[getInsertMNStatement, return_type[type[String]], modifier[public], parameter[table, pkColumns1, pkColumns2]] begin[{] local_variable[type[SqlStatement], sql] local_variable[type[String], result] local_variable[type[String], cols] call[System.arraycopy, parameter[member[.pkColumns1], literal[0], member[.cols], literal[0], member[pkColumns1.length]]] call[System.arraycopy, parameter[member[.pkColumns2], literal[0], member[.cols], member[pkColumns1.length], member[pkColumns2.length]]] assign[member[.sql], ClassCreator(arguments=[MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cols, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=logger, 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=SqlInsertMNStatement, sub_type=None))] assign[member[.result], call[sql.getStatement, parameter[]]] if[call[logger.isDebugEnabled, parameter[]]] begin[{] call[logger.debug, parameter[binary_operation[literal["SQL:"], +, member[.result]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[String] identifier[getInsertMNStatement] operator[SEP] identifier[String] identifier[table] , identifier[String] operator[SEP] operator[SEP] identifier[pkColumns1] , identifier[String] operator[SEP] operator[SEP] identifier[pkColumns2] operator[SEP] { identifier[SqlStatement] identifier[sql] operator[SEP] identifier[String] identifier[result] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[cols] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[pkColumns1] operator[SEP] identifier[length] operator[+] identifier[pkColumns2] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[pkColumns1] , Other[0] , identifier[cols] , Other[0] , identifier[pkColumns1] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[arraycopy] operator[SEP] identifier[pkColumns2] , Other[0] , identifier[cols] , identifier[pkColumns1] operator[SEP] identifier[length] , identifier[pkColumns2] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[sql] operator[=] Keyword[new] identifier[SqlInsertMNStatement] operator[SEP] identifier[table] , identifier[cols] , identifier[logger] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[sql] operator[SEP] identifier[getStatement] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[logger] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[result] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
public static SimpleModule getModule(final ObjectMapper mapper) { SimpleModule module = new SimpleModule(); module.setDeserializerModifier(new BeanDeserializerModifier() { @Override public JsonDeserializer<?> modifyDeserializer(DeserializationConfig config, BeanDescription beanDesc, JsonDeserializer<?> deserializer) { if (BeanDeserializer.class.isAssignableFrom(deserializer.getClass())) { // Apply flattening deserializer on all POJO types. return new FlatteningDeserializer(beanDesc.getBeanClass(), deserializer, mapper); } else { return deserializer; } } }); return module; }
class class_name[name] begin[{] method[getModule, return_type[type[SimpleModule]], modifier[public static], parameter[mapper]] begin[{] local_variable[type[SimpleModule], module] call[module.setDeserializerModifier, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=deserializer, 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=BeanDeserializer, sub_type=None)), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=deserializer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getBeanClass, postfix_operators=[], prefix_operators=[], qualifier=beanDesc, selectors=[], type_arguments=None), MemberReference(member=deserializer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FlatteningDeserializer, sub_type=None)), label=None)]))], documentation=None, modifiers={'public'}, name=modifyDeserializer, parameters=[FormalParameter(annotations=[], modifiers=set(), name=config, type=ReferenceType(arguments=None, dimensions=[], name=DeserializationConfig, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=beanDesc, type=ReferenceType(arguments=None, dimensions=[], name=BeanDescription, sub_type=None), varargs=False), FormalParameter(annotations=[], modifiers=set(), name=deserializer, type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=JsonDeserializer, sub_type=None), varargs=False)], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=JsonDeserializer, sub_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=BeanDeserializerModifier, sub_type=None))]] return[member[.module]] end[}] END[}]
Keyword[public] Keyword[static] identifier[SimpleModule] identifier[getModule] operator[SEP] Keyword[final] identifier[ObjectMapper] identifier[mapper] operator[SEP] { identifier[SimpleModule] identifier[module] operator[=] Keyword[new] identifier[SimpleModule] operator[SEP] operator[SEP] operator[SEP] identifier[module] operator[SEP] identifier[setDeserializerModifier] operator[SEP] Keyword[new] identifier[BeanDeserializerModifier] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[JsonDeserializer] operator[<] operator[?] operator[>] identifier[modifyDeserializer] operator[SEP] identifier[DeserializationConfig] identifier[config] , identifier[BeanDescription] identifier[beanDesc] , identifier[JsonDeserializer] operator[<] operator[?] operator[>] identifier[deserializer] operator[SEP] { Keyword[if] operator[SEP] identifier[BeanDeserializer] operator[SEP] Keyword[class] operator[SEP] identifier[isAssignableFrom] operator[SEP] identifier[deserializer] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[FlatteningDeserializer] operator[SEP] identifier[beanDesc] operator[SEP] identifier[getBeanClass] operator[SEP] operator[SEP] , identifier[deserializer] , identifier[mapper] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[deserializer] operator[SEP] } } } operator[SEP] operator[SEP] Keyword[return] identifier[module] operator[SEP] }
private TreeBuilder<T> listen(Listener<T> listener, String resourceSelector) { return TreeBuilder.<T>builder(new ListenerTree<T>(build(), listener, PathUtil.<T>resourceSelector(resourceSelector))); }
class class_name[name] begin[{] method[listen, return_type[type[TreeBuilder]], modifier[private], parameter[listener, resourceSelector]] begin[{] return[call[.TreeBuilder, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=build, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=resourceSelector, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=PathUtil, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=ListenerTree, sub_type=None))]]] end[}] END[}]
Keyword[private] identifier[TreeBuilder] operator[<] identifier[T] operator[>] identifier[listen] operator[SEP] identifier[Listener] operator[<] identifier[T] operator[>] identifier[listener] , identifier[String] identifier[resourceSelector] operator[SEP] { Keyword[return] identifier[TreeBuilder] operator[SEP] operator[<] identifier[T] operator[>] identifier[builder] operator[SEP] Keyword[new] identifier[ListenerTree] operator[<] identifier[T] operator[>] operator[SEP] identifier[build] operator[SEP] operator[SEP] , identifier[listener] , identifier[PathUtil] operator[SEP] operator[<] identifier[T] operator[>] identifier[resourceSelector] operator[SEP] identifier[resourceSelector] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Deprecated public static int compare(CharSequence string, int codePoint) { if (codePoint < Character.MIN_CODE_POINT || codePoint > Character.MAX_CODE_POINT) { throw new IllegalArgumentException(); } int stringLength = string.length(); if (stringLength == 0) { return -1; } char firstChar = string.charAt(0); int offset = codePoint - Character.MIN_SUPPLEMENTARY_CODE_POINT; if (offset < 0) { // BMP codePoint int result = firstChar - codePoint; if (result != 0) { return result; } return stringLength - 1; } // non BMP char lead = (char)((offset >>> 10) + Character.MIN_HIGH_SURROGATE); int result = firstChar - lead; if (result != 0) { return result; } if (stringLength > 1) { char trail = (char)((offset & 0x3ff) + Character.MIN_LOW_SURROGATE); result = string.charAt(1) - trail; if (result != 0) { return result; } } return stringLength - 2; }
class class_name[name] begin[{] method[compare, return_type[type[int]], modifier[public static], parameter[string, codePoint]] begin[{] if[binary_operation[binary_operation[member[.codePoint], <, member[Character.MIN_CODE_POINT]], ||, binary_operation[member[.codePoint], >, member[Character.MAX_CODE_POINT]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], stringLength] if[binary_operation[member[.stringLength], ==, literal[0]]] begin[{] return[literal[1]] else begin[{] None end[}] local_variable[type[char], firstChar] local_variable[type[int], offset] if[binary_operation[member[.offset], <, literal[0]]] begin[{] local_variable[type[int], result] if[binary_operation[member[.result], !=, literal[0]]] begin[{] return[member[.result]] else begin[{] None end[}] return[binary_operation[member[.stringLength], -, literal[1]]] else begin[{] None end[}] local_variable[type[char], lead] local_variable[type[int], result] if[binary_operation[member[.result], !=, literal[0]]] begin[{] return[member[.result]] else begin[{] None end[}] if[binary_operation[member[.stringLength], >, literal[1]]] begin[{] local_variable[type[char], trail] assign[member[.result], binary_operation[call[string.charAt, parameter[literal[1]]], -, member[.trail]]] if[binary_operation[member[.result], !=, literal[0]]] begin[{] return[member[.result]] else begin[{] None end[}] else begin[{] None end[}] return[binary_operation[member[.stringLength], -, literal[2]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] Keyword[int] identifier[compare] operator[SEP] identifier[CharSequence] identifier[string] , Keyword[int] identifier[codePoint] operator[SEP] { Keyword[if] operator[SEP] identifier[codePoint] operator[<] identifier[Character] operator[SEP] identifier[MIN_CODE_POINT] operator[||] identifier[codePoint] operator[>] identifier[Character] operator[SEP] identifier[MAX_CODE_POINT] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[stringLength] operator[=] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[stringLength] operator[==] Other[0] operator[SEP] { Keyword[return] operator[-] Other[1] operator[SEP] } Keyword[char] identifier[firstChar] operator[=] identifier[string] operator[SEP] identifier[charAt] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[int] identifier[offset] operator[=] identifier[codePoint] operator[-] identifier[Character] operator[SEP] identifier[MIN_SUPPLEMENTARY_CODE_POINT] operator[SEP] Keyword[if] operator[SEP] identifier[offset] operator[<] Other[0] operator[SEP] { Keyword[int] identifier[result] operator[=] identifier[firstChar] operator[-] identifier[codePoint] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[result] operator[SEP] } Keyword[return] identifier[stringLength] operator[-] Other[1] operator[SEP] } Keyword[char] identifier[lead] operator[=] operator[SEP] Keyword[char] operator[SEP] operator[SEP] operator[SEP] identifier[offset] operator[>] operator[>] operator[>] Other[10] operator[SEP] operator[+] identifier[Character] operator[SEP] identifier[MIN_HIGH_SURROGATE] operator[SEP] operator[SEP] Keyword[int] identifier[result] operator[=] identifier[firstChar] operator[-] identifier[lead] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[result] operator[SEP] } Keyword[if] operator[SEP] identifier[stringLength] operator[>] Other[1] operator[SEP] { Keyword[char] identifier[trail] operator[=] operator[SEP] Keyword[char] operator[SEP] operator[SEP] operator[SEP] identifier[offset] operator[&] literal[Integer] operator[SEP] operator[+] identifier[Character] operator[SEP] identifier[MIN_LOW_SURROGATE] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[string] operator[SEP] identifier[charAt] operator[SEP] Other[1] operator[SEP] operator[-] identifier[trail] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[0] operator[SEP] { Keyword[return] identifier[result] operator[SEP] } } Keyword[return] identifier[stringLength] operator[-] Other[2] operator[SEP] }
public void registerCommand(String node, String name, final Class<? extends LocalCommand> clazz) { registerCommand(node, name, new LocalCommandFactory() { @Override public LocalCommand getInstance() throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException { return clazz.getConstructor().newInstance(); } }); }
class class_name[name] begin[{] method[registerCommand, return_type[void], modifier[public], parameter[node, name, clazz]] begin[{] call[.registerCommand, parameter[member[.node], member[.name], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=MethodInvocation(arguments=[], member=getConstructor, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[MethodInvocation(arguments=[], member=newInstance, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=getInstance, parameters=[], return_type=ReferenceType(arguments=None, dimensions=[], name=LocalCommand, sub_type=None), throws=['InstantiationException', 'IllegalAccessException', 'IllegalArgumentException', 'InvocationTargetException', 'NoSuchMethodException', 'SecurityException'], type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LocalCommandFactory, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[registerCommand] operator[SEP] identifier[String] identifier[node] , identifier[String] identifier[name] , Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[LocalCommand] operator[>] identifier[clazz] operator[SEP] { identifier[registerCommand] operator[SEP] identifier[node] , identifier[name] , Keyword[new] identifier[LocalCommandFactory] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[LocalCommand] identifier[getInstance] operator[SEP] operator[SEP] Keyword[throws] identifier[InstantiationException] , identifier[IllegalAccessException] , identifier[IllegalArgumentException] , identifier[InvocationTargetException] , identifier[NoSuchMethodException] , identifier[SecurityException] { Keyword[return] identifier[clazz] operator[SEP] identifier[getConstructor] operator[SEP] operator[SEP] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public Geometry makeInnerFootprint(double x, double y, double theta) { AffineTransformation at = new AffineTransformation(); at.rotate(theta); at.translate(x,y); Geometry rect = at.transform(innerFootprint); return rect; }
class class_name[name] begin[{] method[makeInnerFootprint, return_type[type[Geometry]], modifier[public], parameter[x, y, theta]] begin[{] local_variable[type[AffineTransformation], at] call[at.rotate, parameter[member[.theta]]] call[at.translate, parameter[member[.x], member[.y]]] local_variable[type[Geometry], rect] return[member[.rect]] end[}] END[}]
Keyword[public] identifier[Geometry] identifier[makeInnerFootprint] operator[SEP] Keyword[double] identifier[x] , Keyword[double] identifier[y] , Keyword[double] identifier[theta] operator[SEP] { identifier[AffineTransformation] identifier[at] operator[=] Keyword[new] identifier[AffineTransformation] operator[SEP] operator[SEP] operator[SEP] identifier[at] operator[SEP] identifier[rotate] operator[SEP] identifier[theta] operator[SEP] operator[SEP] identifier[at] operator[SEP] identifier[translate] operator[SEP] identifier[x] , identifier[y] operator[SEP] operator[SEP] identifier[Geometry] identifier[rect] operator[=] identifier[at] operator[SEP] identifier[transform] operator[SEP] identifier[innerFootprint] operator[SEP] operator[SEP] Keyword[return] identifier[rect] operator[SEP] }
public static boolean save(Bitmap orgBitmap, String filePath) throws IOException { long start = System.currentTimeMillis(); if (orgBitmap == null) { return false; } if (filePath == null) { return false; } boolean isSaveSuccess = true; //image size int width = orgBitmap.getWidth(); int height = orgBitmap.getHeight(); //image dummy data size //reason : the amount of bytes per image row must be a multiple of 4 (requirements of bmp format) byte[] dummyBytesPerRow = null; boolean hasDummy = false; int rowWidthInBytes = BYTE_PER_PIXEL * width; //source image width * number of bytes to encode one pixel. if (rowWidthInBytes % BMP_WIDTH_OF_TIMES > 0) { hasDummy = true; //the number of dummy bytes we need to add on each row dummyBytesPerRow = new byte[(BMP_WIDTH_OF_TIMES - (rowWidthInBytes % BMP_WIDTH_OF_TIMES))]; //just fill an array with the dummy bytes we need to append at the end of each row for (int i = 0; i < dummyBytesPerRow.length; i++) { dummyBytesPerRow[i] = (byte) 0xFF; } } //an array to receive the pixels from the source image int[] pixels = new int[width * height]; //the number of bytes used in the file to store raw image data (excluding file headers) int imageSize = (rowWidthInBytes + (hasDummy ? dummyBytesPerRow.length : 0)) * height; //file headers size int imageDataOffset = 0x36; //final size of the file int fileSize = imageSize + imageDataOffset; //Android Bitmap Image Data orgBitmap.getPixels(pixels, 0, width, 0, 0, width, height); //ByteArrayOutputStream baos = new ByteArrayOutputStream(fileSize); ByteBuffer buffer = ByteBuffer.allocate(fileSize); /** * BITMAP FILE HEADER Write Start **/ buffer.put((byte) 0x42); buffer.put((byte) 0x4D); //size buffer.put(writeInt(fileSize)); //reserved buffer.put(writeShort((short) 0)); buffer.put(writeShort((short) 0)); //image data start offset buffer.put(writeInt(imageDataOffset)); /** BITMAP FILE HEADER Write End */ //******************************************* /** BITMAP INFO HEADER Write Start */ //size buffer.put(writeInt(0x28)); //width, height //if we add 3 dummy bytes per row : it means we add a pixel (and the image width is modified. buffer.put(writeInt(width + (hasDummy ? (dummyBytesPerRow.length == 3 ? 1 : 0) : 0))); buffer.put(writeInt(height)); //planes buffer.put(writeShort((short) 1)); //bit count buffer.put(writeShort((short) 24)); //bit compression buffer.put(writeInt(0)); //image data size buffer.put(writeInt(imageSize)); //horizontal resolution in pixels per meter buffer.put(writeInt(0)); //vertical resolution in pixels per meter (unreliable) buffer.put(writeInt(0)); buffer.put(writeInt(0)); buffer.put(writeInt(0)); /** BITMAP INFO HEADER Write End */ int row = height; int col = width; int startPosition = (row - 1) * col; int endPosition = row * col; while (row > 0) { for (int i = startPosition; i < endPosition; i++) { buffer.put((byte) (pixels[i] & 0x000000FF)); buffer.put((byte) ((pixels[i] & 0x0000FF00) >> 8)); buffer.put((byte) ((pixels[i] & 0x00FF0000) >> 16)); } if (hasDummy) { buffer.put(dummyBytesPerRow); } row--; endPosition = startPosition; startPosition = startPosition - col; } FileOutputStream fos = new FileOutputStream(filePath); fos.write(buffer.array()); fos.close(); Log.v("AndroidBmpUtil", System.currentTimeMillis() - start + " ms"); return isSaveSuccess; }
class class_name[name] begin[{] method[save, return_type[type[boolean]], modifier[public static], parameter[orgBitmap, filePath]] begin[{] local_variable[type[long], start] if[binary_operation[member[.orgBitmap], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] if[binary_operation[member[.filePath], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[boolean], isSaveSuccess] local_variable[type[int], width] local_variable[type[int], height] local_variable[type[byte], dummyBytesPerRow] local_variable[type[boolean], hasDummy] local_variable[type[int], rowWidthInBytes] if[binary_operation[binary_operation[member[.rowWidthInBytes], %, member[.BMP_WIDTH_OF_TIMES]], >, literal[0]]] begin[{] assign[member[.hasDummy], literal[true]] assign[member[.dummyBytesPerRow], ArrayCreator(dimensions=[BinaryOperation(operandl=MemberReference(member=BMP_WIDTH_OF_TIMES, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=rowWidthInBytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BMP_WIDTH_OF_TIMES, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=%), operator=-)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte))] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=dummyBytesPerRow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), type=BasicType(dimensions=[], name=byte))), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=dummyBytesPerRow, 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) else begin[{] None end[}] local_variable[type[int], pixels] local_variable[type[int], imageSize] local_variable[type[int], imageDataOffset] local_variable[type[int], fileSize] call[orgBitmap.getPixels, parameter[member[.pixels], literal[0], member[.width], literal[0], literal[0], member[.width], member[.height]]] local_variable[type[ByteBuffer], buffer] call[buffer.put, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x42), type=BasicType(dimensions=[], name=byte))]] call[buffer.put, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x4D), type=BasicType(dimensions=[], name=byte))]] call[buffer.put, parameter[call[.writeInt, parameter[member[.fileSize]]]]] call[buffer.put, parameter[call[.writeShort, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), type=BasicType(dimensions=[], name=short))]]]] call[buffer.put, parameter[call[.writeShort, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), type=BasicType(dimensions=[], name=short))]]]] call[buffer.put, parameter[call[.writeInt, parameter[member[.imageDataOffset]]]]] call[buffer.put, parameter[call[.writeInt, parameter[literal[0x28]]]]] call[buffer.put, parameter[call[.writeInt, parameter[binary_operation[member[.width], +, TernaryExpression(condition=MemberReference(member=hasDummy, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=dummyBytesPerRow, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3), operator===), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)))]]]]] call[buffer.put, parameter[call[.writeInt, parameter[member[.height]]]]] call[buffer.put, parameter[call[.writeShort, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), type=BasicType(dimensions=[], name=short))]]]] call[buffer.put, parameter[call[.writeShort, parameter[Cast(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), type=BasicType(dimensions=[], name=short))]]]] call[buffer.put, parameter[call[.writeInt, parameter[literal[0]]]]] call[buffer.put, parameter[call[.writeInt, parameter[member[.imageSize]]]]] call[buffer.put, parameter[call[.writeInt, parameter[literal[0]]]]] call[buffer.put, parameter[call[.writeInt, parameter[literal[0]]]]] call[buffer.put, parameter[call[.writeInt, parameter[literal[0]]]]] call[buffer.put, parameter[call[.writeInt, parameter[literal[0]]]]] local_variable[type[int], row] local_variable[type[int], col] local_variable[type[int], startPosition] local_variable[type[int], endPosition] while[binary_operation[member[.row], >, literal[0]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=BinaryOperation(operandl=MemberReference(member=pixels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x000000FF), operator=&), type=BasicType(dimensions=[], name=byte))], member=put, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pixels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0000FF00), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=>>), type=BasicType(dimensions=[], name=byte))], member=put, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pixels, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x00FF0000), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=16), operator=>>), type=BasicType(dimensions=[], name=byte))], member=put, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=endPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=startPosition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) if[member[.hasDummy]] begin[{] call[buffer.put, parameter[member[.dummyBytesPerRow]]] else begin[{] None end[}] member[.row] assign[member[.endPosition], member[.startPosition]] assign[member[.startPosition], binary_operation[member[.startPosition], -, member[.col]]] end[}] local_variable[type[FileOutputStream], fos] call[fos.write, parameter[call[buffer.array, parameter[]]]] call[fos.close, parameter[]] call[Log.v, parameter[literal["AndroidBmpUtil"], binary_operation[binary_operation[call[System.currentTimeMillis, parameter[]], -, member[.start]], +, literal[" ms"]]]] return[member[.isSaveSuccess]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[save] operator[SEP] identifier[Bitmap] identifier[orgBitmap] , identifier[String] identifier[filePath] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[long] identifier[start] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[orgBitmap] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[filePath] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[boolean] identifier[isSaveSuccess] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[width] operator[=] identifier[orgBitmap] operator[SEP] identifier[getWidth] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[height] operator[=] identifier[orgBitmap] operator[SEP] identifier[getHeight] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[dummyBytesPerRow] operator[=] Other[null] operator[SEP] Keyword[boolean] identifier[hasDummy] operator[=] literal[boolean] operator[SEP] Keyword[int] identifier[rowWidthInBytes] operator[=] identifier[BYTE_PER_PIXEL] operator[*] identifier[width] operator[SEP] Keyword[if] operator[SEP] identifier[rowWidthInBytes] operator[%] identifier[BMP_WIDTH_OF_TIMES] operator[>] Other[0] operator[SEP] { identifier[hasDummy] operator[=] literal[boolean] operator[SEP] identifier[dummyBytesPerRow] operator[=] Keyword[new] Keyword[byte] operator[SEP] operator[SEP] identifier[BMP_WIDTH_OF_TIMES] operator[-] operator[SEP] identifier[rowWidthInBytes] operator[%] identifier[BMP_WIDTH_OF_TIMES] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[dummyBytesPerRow] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[dummyBytesPerRow] operator[SEP] identifier[i] operator[SEP] operator[=] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] } } Keyword[int] operator[SEP] operator[SEP] identifier[pixels] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[width] operator[*] identifier[height] operator[SEP] operator[SEP] Keyword[int] identifier[imageSize] operator[=] operator[SEP] identifier[rowWidthInBytes] operator[+] operator[SEP] identifier[hasDummy] operator[?] identifier[dummyBytesPerRow] operator[SEP] identifier[length] operator[:] Other[0] operator[SEP] operator[SEP] operator[*] identifier[height] operator[SEP] Keyword[int] identifier[imageDataOffset] operator[=] literal[Integer] operator[SEP] Keyword[int] identifier[fileSize] operator[=] identifier[imageSize] operator[+] identifier[imageDataOffset] operator[SEP] identifier[orgBitmap] operator[SEP] identifier[getPixels] operator[SEP] identifier[pixels] , Other[0] , identifier[width] , Other[0] , Other[0] , identifier[width] , identifier[height] operator[SEP] operator[SEP] identifier[ByteBuffer] identifier[buffer] operator[=] identifier[ByteBuffer] operator[SEP] identifier[allocate] operator[SEP] identifier[fileSize] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] literal[Integer] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeInt] operator[SEP] identifier[fileSize] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeShort] operator[SEP] operator[SEP] Keyword[short] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeShort] operator[SEP] operator[SEP] Keyword[short] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeInt] operator[SEP] identifier[imageDataOffset] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeInt] operator[SEP] literal[Integer] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeInt] operator[SEP] identifier[width] operator[+] operator[SEP] identifier[hasDummy] operator[?] operator[SEP] identifier[dummyBytesPerRow] operator[SEP] identifier[length] operator[==] Other[3] operator[?] Other[1] operator[:] Other[0] operator[SEP] operator[:] Other[0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeInt] operator[SEP] identifier[height] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeShort] operator[SEP] operator[SEP] Keyword[short] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeShort] operator[SEP] operator[SEP] Keyword[short] operator[SEP] Other[24] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeInt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeInt] operator[SEP] identifier[imageSize] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeInt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeInt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeInt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[writeInt] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[row] operator[=] identifier[height] operator[SEP] Keyword[int] identifier[col] operator[=] identifier[width] operator[SEP] Keyword[int] identifier[startPosition] operator[=] operator[SEP] identifier[row] operator[-] Other[1] operator[SEP] operator[*] identifier[col] operator[SEP] Keyword[int] identifier[endPosition] operator[=] identifier[row] operator[*] identifier[col] operator[SEP] Keyword[while] operator[SEP] identifier[row] operator[>] Other[0] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[startPosition] operator[SEP] identifier[i] operator[<] identifier[endPosition] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[buffer] operator[SEP] identifier[put] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[pixels] operator[SEP] identifier[i] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[pixels] operator[SEP] identifier[i] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[>] operator[>] Other[8] operator[SEP] operator[SEP] operator[SEP] identifier[buffer] operator[SEP] identifier[put] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[pixels] operator[SEP] identifier[i] operator[SEP] operator[&] literal[Integer] operator[SEP] operator[>] operator[>] Other[16] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[hasDummy] operator[SEP] { identifier[buffer] operator[SEP] identifier[put] operator[SEP] identifier[dummyBytesPerRow] operator[SEP] operator[SEP] } identifier[row] operator[--] operator[SEP] identifier[endPosition] operator[=] identifier[startPosition] operator[SEP] identifier[startPosition] operator[=] identifier[startPosition] operator[-] identifier[col] operator[SEP] } identifier[FileOutputStream] identifier[fos] operator[=] Keyword[new] identifier[FileOutputStream] operator[SEP] identifier[filePath] operator[SEP] operator[SEP] identifier[fos] operator[SEP] identifier[write] operator[SEP] identifier[buffer] operator[SEP] identifier[array] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[fos] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] identifier[Log] operator[SEP] identifier[v] operator[SEP] literal[String] , identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[-] identifier[start] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[isSaveSuccess] operator[SEP] }
public <T> void execute(Command<T> cmd, int title, final CommandCallback<T> callback) { final ProgressDialog progressDialog = new ProgressDialog(this); progressDialog.setMessage(getString(title)); progressDialog.setCancelable(false); progressDialog.setCanceledOnTouchOutside(false); progressDialog.show(); cmd.start(new CommandCallback<T>() { @Override public void onResult(T res) { dismissDialog(progressDialog); callback.onResult(res); } @Override public void onError(Exception e) { dismissDialog(progressDialog); callback.onError(e); } }); }
class class_name[name] begin[{] method[execute, return_type[void], modifier[public], parameter[cmd, title, callback]] begin[{] local_variable[type[ProgressDialog], progressDialog] call[progressDialog.setMessage, parameter[call[.getString, parameter[member[.title]]]]] call[progressDialog.setCancelable, parameter[literal[false]]] call[progressDialog.setCanceledOnTouchOutside, parameter[literal[false]]] call[progressDialog.show, parameter[]] call[cmd.start, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=progressDialog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=dismissDialog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onResult, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onResult, parameters=[FormalParameter(annotations=[], modifiers=set(), name=res, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None), MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=progressDialog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=dismissDialog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onError, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=onError, parameters=[FormalParameter(annotations=[], modifiers=set(), name=e, type=ReferenceType(arguments=None, dimensions=[], name=Exception, sub_type=None), varargs=False)], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=CommandCallback, sub_type=None))]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[execute] operator[SEP] identifier[Command] operator[<] identifier[T] operator[>] identifier[cmd] , Keyword[int] identifier[title] , Keyword[final] identifier[CommandCallback] operator[<] identifier[T] operator[>] identifier[callback] operator[SEP] { Keyword[final] identifier[ProgressDialog] identifier[progressDialog] operator[=] Keyword[new] identifier[ProgressDialog] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[progressDialog] operator[SEP] identifier[setMessage] operator[SEP] identifier[getString] operator[SEP] identifier[title] operator[SEP] operator[SEP] operator[SEP] identifier[progressDialog] operator[SEP] identifier[setCancelable] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[progressDialog] operator[SEP] identifier[setCanceledOnTouchOutside] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[progressDialog] operator[SEP] identifier[show] operator[SEP] operator[SEP] operator[SEP] identifier[cmd] operator[SEP] identifier[start] operator[SEP] Keyword[new] identifier[CommandCallback] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onResult] operator[SEP] identifier[T] identifier[res] operator[SEP] { identifier[dismissDialog] operator[SEP] identifier[progressDialog] operator[SEP] operator[SEP] identifier[callback] operator[SEP] identifier[onResult] operator[SEP] identifier[res] operator[SEP] operator[SEP] } annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[onError] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[dismissDialog] operator[SEP] identifier[progressDialog] operator[SEP] operator[SEP] identifier[callback] operator[SEP] identifier[onError] operator[SEP] identifier[e] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static String getClassNameWithExtension(final String className) { return new StringBuilder().append(className).append(Kind.SOURCE.extension).toString(); }
class class_name[name] begin[{] method[getClassNameWithExtension, return_type[type[String]], modifier[public static], parameter[className]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=extension, postfix_operators=[], prefix_operators=[], qualifier=Kind.SOURCE, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getClassNameWithExtension] operator[SEP] Keyword[final] identifier[String] identifier[className] operator[SEP] { Keyword[return] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[className] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[Kind] operator[SEP] identifier[SOURCE] operator[SEP] identifier[extension] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@CheckReturnValue @SchedulerSupport(SchedulerSupport.COMPUTATION) public final Single<T> delay(long time, TimeUnit unit) { return delay(time, unit, Schedulers.computation(), false); }
class class_name[name] begin[{] method[delay, return_type[type[Single]], modifier[final public], parameter[time, unit]] begin[{] return[call[.delay, parameter[member[.time], member[.unit], call[Schedulers.computation, parameter[]], literal[false]]]] end[}] END[}]
annotation[@] identifier[CheckReturnValue] annotation[@] identifier[SchedulerSupport] operator[SEP] identifier[SchedulerSupport] operator[SEP] identifier[COMPUTATION] operator[SEP] Keyword[public] Keyword[final] identifier[Single] operator[<] identifier[T] operator[>] identifier[delay] operator[SEP] Keyword[long] identifier[time] , identifier[TimeUnit] identifier[unit] operator[SEP] { Keyword[return] identifier[delay] operator[SEP] identifier[time] , identifier[unit] , identifier[Schedulers] operator[SEP] identifier[computation] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] }
public Annotation[] getAnnotations() { final XAnnotation<?>[] xannotations = getXAnnotations(); final Annotation[] annotations = new Annotation[xannotations.length]; for (int index = 0; index < xannotations.length; index++) { annotations[index] = xannotations[index].getResult(); } return annotations; }
class class_name[name] begin[{] method[getAnnotations, return_type[type[Annotation]], modifier[public], parameter[]] begin[{] local_variable[type[XAnnotation], xannotations] local_variable[type[Annotation], annotations] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=annotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=xannotations, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getResult, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=xannotations, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.annotations]] end[}] END[}]
Keyword[public] identifier[Annotation] operator[SEP] operator[SEP] identifier[getAnnotations] operator[SEP] operator[SEP] { Keyword[final] identifier[XAnnotation] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[xannotations] operator[=] identifier[getXAnnotations] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[Annotation] operator[SEP] operator[SEP] identifier[annotations] operator[=] Keyword[new] identifier[Annotation] operator[SEP] identifier[xannotations] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[index] operator[=] Other[0] operator[SEP] identifier[index] operator[<] identifier[xannotations] operator[SEP] identifier[length] operator[SEP] identifier[index] operator[++] operator[SEP] { identifier[annotations] operator[SEP] identifier[index] operator[SEP] operator[=] identifier[xannotations] operator[SEP] identifier[index] operator[SEP] operator[SEP] identifier[getResult] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[annotations] operator[SEP] }
public ServiceFuture<ApplicationGatewayInner> createOrUpdateAsync(String resourceGroupName, String applicationGatewayName, ApplicationGatewayInner parameters, final ServiceCallback<ApplicationGatewayInner> serviceCallback) { return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, applicationGatewayName, parameters), serviceCallback); }
class class_name[name] begin[{] method[createOrUpdateAsync, return_type[type[ServiceFuture]], modifier[public], parameter[resourceGroupName, applicationGatewayName, parameters, serviceCallback]] begin[{] return[call[ServiceFuture.fromResponse, parameter[call[.createOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.applicationGatewayName], member[.parameters]]], member[.serviceCallback]]]] end[}] END[}]
Keyword[public] identifier[ServiceFuture] operator[<] identifier[ApplicationGatewayInner] operator[>] identifier[createOrUpdateAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[applicationGatewayName] , identifier[ApplicationGatewayInner] identifier[parameters] , Keyword[final] identifier[ServiceCallback] operator[<] identifier[ApplicationGatewayInner] operator[>] identifier[serviceCallback] operator[SEP] { Keyword[return] identifier[ServiceFuture] operator[SEP] identifier[fromResponse] operator[SEP] identifier[createOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[applicationGatewayName] , identifier[parameters] operator[SEP] , identifier[serviceCallback] operator[SEP] operator[SEP] }
@Override public final Object[] toArray() { this.readLock.lock(); try { return this.toArray(new Object[this.size]); } finally { this.readLock.unlock(); } }
class class_name[name] begin[{] method[toArray, return_type[type[Object]], modifier[final public], parameter[]] begin[{] THIS[member[None.readLock]call[None.lock, parameter[]]] TryStatement(block=[ReturnStatement(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[ArrayCreator(dimensions=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=size, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=toArray, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], catches=None, finally_block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=readLock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=unlock, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[Object] operator[SEP] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] { Keyword[this] operator[SEP] identifier[readLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] Keyword[this] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[Object] operator[SEP] Keyword[this] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[this] operator[SEP] identifier[readLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
public View waitForView(int id, int index, int timeout){ if(timeout == 0){ timeout = Timeout.getSmallTimeout(); } return waitForView(id, index, timeout, false); }
class class_name[name] begin[{] method[waitForView, return_type[type[View]], modifier[public], parameter[id, index, timeout]] begin[{] if[binary_operation[member[.timeout], ==, literal[0]]] begin[{] assign[member[.timeout], call[Timeout.getSmallTimeout, parameter[]]] else begin[{] None end[}] return[call[.waitForView, parameter[member[.id], member[.index], member[.timeout], literal[false]]]] end[}] END[}]
Keyword[public] identifier[View] identifier[waitForView] operator[SEP] Keyword[int] identifier[id] , Keyword[int] identifier[index] , Keyword[int] identifier[timeout] operator[SEP] { Keyword[if] operator[SEP] identifier[timeout] operator[==] Other[0] operator[SEP] { identifier[timeout] operator[=] identifier[Timeout] operator[SEP] identifier[getSmallTimeout] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[waitForView] operator[SEP] identifier[id] , identifier[index] , identifier[timeout] , literal[boolean] operator[SEP] operator[SEP] }
public TBMDIRCTION createTBMDIRCTIONFromString(EDataType eDataType, String initialValue) { TBMDIRCTION result = TBMDIRCTION.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; }
class class_name[name] begin[{] method[createTBMDIRCTIONFromString, return_type[type[TBMDIRCTION]], modifier[public], parameter[eDataType, initialValue]] begin[{] local_variable[type[TBMDIRCTION], result] if[binary_operation[member[.result], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="The value '"), operandr=MemberReference(member=initialValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' is not a valid enumerator of '"), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=eDataType, 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[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[TBMDIRCTION] identifier[createTBMDIRCTIONFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] { identifier[TBMDIRCTION] identifier[result] operator[=] identifier[TBMDIRCTION] operator[SEP] identifier[get] operator[SEP] identifier[initialValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[initialValue] operator[+] literal[String] operator[+] identifier[eDataType] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
public static String[] getNames(JSONObject jo) { int length = jo.length(); if (length == 0) { return null; } Iterator<String> i = jo.keys(); String[] names = new String[length]; int j = 0; while (i.hasNext()) { names[j] = i.next(); j += 1; } return names; }
class class_name[name] begin[{] method[getNames, return_type[type[String]], modifier[public static], parameter[jo]] begin[{] local_variable[type[int], length] if[binary_operation[member[.length], ==, literal[0]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[Iterator], i] local_variable[type[String], names] local_variable[type[int], j] while[call[i.hasNext, parameter[]]] begin[{] assign[member[.names], call[i.next, parameter[]]] assign[member[.j], literal[1]] end[}] return[member[.names]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] operator[SEP] operator[SEP] identifier[getNames] operator[SEP] identifier[JSONObject] identifier[jo] operator[SEP] { Keyword[int] identifier[length] operator[=] identifier[jo] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[Iterator] operator[<] identifier[String] operator[>] identifier[i] operator[=] identifier[jo] operator[SEP] identifier[keys] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[names] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[names] operator[SEP] identifier[j] operator[SEP] operator[=] identifier[i] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[j] operator[+=] Other[1] operator[SEP] } Keyword[return] identifier[names] operator[SEP] }
static void addIfSupported(Set<String> supported, List<String> enabled, String... names) { for (String n: names) { if (supported.contains(n)) { enabled.add(n); } } }
class class_name[name] begin[{] method[addIfSupported, return_type[void], modifier[static], parameter[supported, enabled, names]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=contains, postfix_operators=[], prefix_operators=[], qualifier=supported, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=enabled, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=names, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=n)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[static] Keyword[void] identifier[addIfSupported] operator[SEP] identifier[Set] operator[<] identifier[String] operator[>] identifier[supported] , identifier[List] operator[<] identifier[String] operator[>] identifier[enabled] , identifier[String] operator[...] identifier[names] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[n] operator[:] identifier[names] operator[SEP] { Keyword[if] operator[SEP] identifier[supported] operator[SEP] identifier[contains] operator[SEP] identifier[n] operator[SEP] operator[SEP] { identifier[enabled] operator[SEP] identifier[add] operator[SEP] identifier[n] operator[SEP] operator[SEP] } } }
private static void toAbsoluteFreeResources(TIntIntHashMap changes, int[] sortedMoments) { for (int i = 1; i < sortedMoments.length; i++) { int t = sortedMoments[i]; int lastT = sortedMoments[i - 1]; int lastFree = changes.get(lastT); changes.put(t, changes.get(t) + lastFree); } }
class class_name[name] begin[{] method[toAbsoluteFreeResources, return_type[void], modifier[private static], parameter[changes, sortedMoments]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=sortedMoments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=t)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=sortedMoments, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), name=lastT)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=lastT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=changes, selectors=[], type_arguments=None), name=lastFree)], modifiers=set(), type=BasicType(dimensions=[], name=int)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=changes, selectors=[], type_arguments=None), operandr=MemberReference(member=lastFree, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=put, postfix_operators=[], prefix_operators=[], qualifier=changes, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=sortedMoments, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[toAbsoluteFreeResources] operator[SEP] identifier[TIntIntHashMap] identifier[changes] , Keyword[int] operator[SEP] operator[SEP] identifier[sortedMoments] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[1] operator[SEP] identifier[i] operator[<] identifier[sortedMoments] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[t] operator[=] identifier[sortedMoments] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[int] identifier[lastT] operator[=] identifier[sortedMoments] operator[SEP] identifier[i] operator[-] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[lastFree] operator[=] identifier[changes] operator[SEP] identifier[get] operator[SEP] identifier[lastT] operator[SEP] operator[SEP] identifier[changes] operator[SEP] identifier[put] operator[SEP] identifier[t] , identifier[changes] operator[SEP] identifier[get] operator[SEP] identifier[t] operator[SEP] operator[+] identifier[lastFree] operator[SEP] operator[SEP] } }
public void attachPlainText(String filenameOnHeader, InputStream resourceStream, String textEncoding) { assertArgumentNotEmpty("filenameOnHeader", filenameOnHeader); assertArgumentNotNull("resourceStream", resourceStream); assertArgumentNotEmpty("textEncoding", textEncoding); postcard.attachPlainText(filenameOnHeader, resourceStream, textEncoding); }
class class_name[name] begin[{] method[attachPlainText, return_type[void], modifier[public], parameter[filenameOnHeader, resourceStream, textEncoding]] begin[{] call[.assertArgumentNotEmpty, parameter[literal["filenameOnHeader"], member[.filenameOnHeader]]] call[.assertArgumentNotNull, parameter[literal["resourceStream"], member[.resourceStream]]] call[.assertArgumentNotEmpty, parameter[literal["textEncoding"], member[.textEncoding]]] call[postcard.attachPlainText, parameter[member[.filenameOnHeader], member[.resourceStream], member[.textEncoding]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[attachPlainText] operator[SEP] identifier[String] identifier[filenameOnHeader] , identifier[InputStream] identifier[resourceStream] , identifier[String] identifier[textEncoding] operator[SEP] { identifier[assertArgumentNotEmpty] operator[SEP] literal[String] , identifier[filenameOnHeader] operator[SEP] operator[SEP] identifier[assertArgumentNotNull] operator[SEP] literal[String] , identifier[resourceStream] operator[SEP] operator[SEP] identifier[assertArgumentNotEmpty] operator[SEP] literal[String] , identifier[textEncoding] operator[SEP] operator[SEP] identifier[postcard] operator[SEP] identifier[attachPlainText] operator[SEP] identifier[filenameOnHeader] , identifier[resourceStream] , identifier[textEncoding] operator[SEP] operator[SEP] }
public java.util.List<String> getLoadBalancerNames() { if (loadBalancerNames == null) { loadBalancerNames = new com.amazonaws.internal.SdkInternalList<String>(); } return loadBalancerNames; }
class class_name[name] begin[{] method[getLoadBalancerNames, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.loadBalancerNames], ==, literal[null]]] begin[{] assign[member[.loadBalancerNames], 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=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.loadBalancerNames]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getLoadBalancerNames] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[loadBalancerNames] operator[==] Other[null] operator[SEP] { identifier[loadBalancerNames] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[loadBalancerNames] operator[SEP] }
public UploadResult upload(final String accountId, final String vaultName, final String archiveDescription, final File file, ProgressListener progressListener) throws AmazonServiceException, AmazonClientException { if (file.length() > MULTIPART_UPLOAD_SIZE_THRESHOLD) { return uploadInMultipleParts(accountId, vaultName, archiveDescription, file, progressListener); } else { return uploadInSinglePart(accountId, vaultName, archiveDescription, file, progressListener); } }
class class_name[name] begin[{] method[upload, return_type[type[UploadResult]], modifier[public], parameter[accountId, vaultName, archiveDescription, file, progressListener]] begin[{] if[binary_operation[call[file.length, parameter[]], >, member[.MULTIPART_UPLOAD_SIZE_THRESHOLD]]] begin[{] return[call[.uploadInMultipleParts, parameter[member[.accountId], member[.vaultName], member[.archiveDescription], member[.file], member[.progressListener]]]] else begin[{] return[call[.uploadInSinglePart, parameter[member[.accountId], member[.vaultName], member[.archiveDescription], member[.file], member[.progressListener]]]] end[}] end[}] END[}]
Keyword[public] identifier[UploadResult] identifier[upload] operator[SEP] Keyword[final] identifier[String] identifier[accountId] , Keyword[final] identifier[String] identifier[vaultName] , Keyword[final] identifier[String] identifier[archiveDescription] , Keyword[final] identifier[File] identifier[file] , identifier[ProgressListener] identifier[progressListener] operator[SEP] Keyword[throws] identifier[AmazonServiceException] , identifier[AmazonClientException] { Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] identifier[MULTIPART_UPLOAD_SIZE_THRESHOLD] operator[SEP] { Keyword[return] identifier[uploadInMultipleParts] operator[SEP] identifier[accountId] , identifier[vaultName] , identifier[archiveDescription] , identifier[file] , identifier[progressListener] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[uploadInSinglePart] operator[SEP] identifier[accountId] , identifier[vaultName] , identifier[archiveDescription] , identifier[file] , identifier[progressListener] operator[SEP] operator[SEP] } }
protected static DataBuffer createSparseInformationBuffer(int rank){ int[] flags = new int[rank]; long[] sparseOffsets = new long[rank]; int[] hiddenDimension = new int[] {-1}; return Nd4j.getSparseInfoProvider().createSparseInformation(flags, sparseOffsets, hiddenDimension, rank); }
class class_name[name] begin[{] method[createSparseInformationBuffer, return_type[type[DataBuffer]], modifier[static protected], parameter[rank]] begin[{] local_variable[type[int], flags] local_variable[type[long], sparseOffsets] local_variable[type[int], hiddenDimension] return[call[Nd4j.getSparseInfoProvider, parameter[]]] end[}] END[}]
Keyword[protected] Keyword[static] identifier[DataBuffer] identifier[createSparseInformationBuffer] operator[SEP] Keyword[int] identifier[rank] operator[SEP] { Keyword[int] operator[SEP] operator[SEP] identifier[flags] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[rank] operator[SEP] operator[SEP] Keyword[long] operator[SEP] operator[SEP] identifier[sparseOffsets] operator[=] Keyword[new] Keyword[long] operator[SEP] identifier[rank] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[hiddenDimension] operator[=] Keyword[new] Keyword[int] operator[SEP] operator[SEP] { operator[-] Other[1] } operator[SEP] Keyword[return] identifier[Nd4j] operator[SEP] identifier[getSparseInfoProvider] operator[SEP] operator[SEP] operator[SEP] identifier[createSparseInformation] operator[SEP] identifier[flags] , identifier[sparseOffsets] , identifier[hiddenDimension] , identifier[rank] operator[SEP] operator[SEP] }
@Override public ListJobsResult listJobs(ListJobsRequest request) { request = beforeClientExecution(request); return executeListJobs(request); }
class class_name[name] begin[{] method[listJobs, return_type[type[ListJobsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeListJobs, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ListJobsResult] identifier[listJobs] operator[SEP] identifier[ListJobsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeListJobs] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
private void checkRange(List<ValidationMessage> errors, String path, Element focus, Range fixed) { checkFixedValue(errors, path + ".low", focus.getNamedChild("low"), fixed.getLow(), "low"); checkFixedValue(errors, path + ".high", focus.getNamedChild("high"), fixed.getHigh(), "high"); }
class class_name[name] begin[{] method[checkRange, return_type[void], modifier[private], parameter[errors, path, focus, fixed]] begin[{] call[.checkFixedValue, parameter[member[.errors], binary_operation[member[.path], +, literal[".low"]], call[focus.getNamedChild, parameter[literal["low"]]], call[fixed.getLow, parameter[]], literal["low"]]] call[.checkFixedValue, parameter[member[.errors], binary_operation[member[.path], +, literal[".high"]], call[focus.getNamedChild, parameter[literal["high"]]], call[fixed.getHigh, parameter[]], literal["high"]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[checkRange] operator[SEP] identifier[List] operator[<] identifier[ValidationMessage] operator[>] identifier[errors] , identifier[String] identifier[path] , identifier[Element] identifier[focus] , identifier[Range] identifier[fixed] operator[SEP] { identifier[checkFixedValue] operator[SEP] identifier[errors] , identifier[path] operator[+] literal[String] , identifier[focus] operator[SEP] identifier[getNamedChild] operator[SEP] literal[String] operator[SEP] , identifier[fixed] operator[SEP] identifier[getLow] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[checkFixedValue] operator[SEP] identifier[errors] , identifier[path] operator[+] literal[String] , identifier[focus] operator[SEP] identifier[getNamedChild] operator[SEP] literal[String] operator[SEP] , identifier[fixed] operator[SEP] identifier[getHigh] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] }
private JestClient createJestClient(String uri) { HttpClientConfig.Builder builder = new HttpClientConfig.Builder(uri) .maxTotalConnection(properties.getMaxTotalConnection()) .defaultMaxTotalConnectionPerRoute(properties.getDefaultMaxTotalConnectionPerRoute()) .maxConnectionIdleTime(properties.getMaxConnectionIdleTime(), TimeUnit.MILLISECONDS) .readTimeout(properties.getReadTimeout()) .multiThreaded(properties.getMultiThreaded()); if (StringUtils.hasText(this.properties.getUsername())) { builder.defaultCredentials(this.properties.getUsername(), this.properties.getPassword()); } String proxyHost = this.properties.getProxy().getHost(); if (StringUtils.hasText(proxyHost)) { Integer proxyPort = this.properties.getProxy().getPort(); Assert.notNull(proxyPort, "Proxy port must not be null"); builder.proxy(new HttpHost(proxyHost, proxyPort)); } List<HttpClientConfigBuilderCustomizer> configBuilderCustomizers = builderCustomizers != null ? builderCustomizers.getIfAvailable() : new ArrayList<>(); if (!CollectionUtils.isEmpty(configBuilderCustomizers)) { logger.info("Custom HttpClientConfigBuilderCustomizers detected. Applying these to the HttpClientConfig builder."); configBuilderCustomizers.stream().forEach(customizer -> customizer.customize(builder)); logger.info("Custom HttpClientConfigBuilderCustomizers applied."); } JestClientFactory factory = jestClientFactory != null ? jestClientFactory : new JestClientFactory(); factory.setHttpClientConfig(builder.build()); return factory.getObject(); }
class class_name[name] begin[{] method[createJestClient, return_type[type[JestClient]], modifier[private], parameter[uri]] begin[{] local_variable[type[HttpClientConfig], builder] if[call[StringUtils.hasText, parameter[THIS[member[None.properties]call[None.getUsername, parameter[]]]]]] begin[{] call[builder.defaultCredentials, parameter[THIS[member[None.properties]call[None.getUsername, parameter[]]], THIS[member[None.properties]call[None.getPassword, parameter[]]]]] else begin[{] None end[}] local_variable[type[String], proxyHost] if[call[StringUtils.hasText, parameter[member[.proxyHost]]]] begin[{] local_variable[type[Integer], proxyPort] call[Assert.notNull, parameter[member[.proxyPort], literal["Proxy port must not be null"]]] call[builder.proxy, parameter[ClassCreator(arguments=[MemberReference(member=proxyHost, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=proxyPort, 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=HttpHost, sub_type=None))]] else begin[{] None end[}] local_variable[type[List], configBuilderCustomizers] if[call[CollectionUtils.isEmpty, parameter[member[.configBuilderCustomizers]]]] begin[{] call[logger.info, parameter[literal["Custom HttpClientConfigBuilderCustomizers detected. Applying these to the HttpClientConfig builder."]]] call[configBuilderCustomizers.stream, parameter[]] call[logger.info, parameter[literal["Custom HttpClientConfigBuilderCustomizers applied."]]] else begin[{] None end[}] local_variable[type[JestClientFactory], factory] call[factory.setHttpClientConfig, parameter[call[builder.build, parameter[]]]] return[call[factory.getObject, parameter[]]] end[}] END[}]
Keyword[private] identifier[JestClient] identifier[createJestClient] operator[SEP] identifier[String] identifier[uri] operator[SEP] { identifier[HttpClientConfig] operator[SEP] identifier[Builder] identifier[builder] operator[=] Keyword[new] identifier[HttpClientConfig] operator[SEP] identifier[Builder] operator[SEP] identifier[uri] operator[SEP] operator[SEP] identifier[maxTotalConnection] operator[SEP] identifier[properties] operator[SEP] identifier[getMaxTotalConnection] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[defaultMaxTotalConnectionPerRoute] operator[SEP] identifier[properties] operator[SEP] identifier[getDefaultMaxTotalConnectionPerRoute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[maxConnectionIdleTime] operator[SEP] identifier[properties] operator[SEP] identifier[getMaxConnectionIdleTime] operator[SEP] operator[SEP] , identifier[TimeUnit] operator[SEP] identifier[MILLISECONDS] operator[SEP] operator[SEP] identifier[readTimeout] operator[SEP] identifier[properties] operator[SEP] identifier[getReadTimeout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[multiThreaded] operator[SEP] identifier[properties] operator[SEP] identifier[getMultiThreaded] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[hasText] operator[SEP] Keyword[this] operator[SEP] identifier[properties] operator[SEP] identifier[getUsername] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[builder] operator[SEP] identifier[defaultCredentials] operator[SEP] Keyword[this] operator[SEP] identifier[properties] operator[SEP] identifier[getUsername] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[properties] operator[SEP] identifier[getPassword] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[String] identifier[proxyHost] operator[=] Keyword[this] operator[SEP] identifier[properties] operator[SEP] identifier[getProxy] operator[SEP] operator[SEP] operator[SEP] identifier[getHost] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[hasText] operator[SEP] identifier[proxyHost] operator[SEP] operator[SEP] { identifier[Integer] identifier[proxyPort] operator[=] Keyword[this] operator[SEP] identifier[properties] operator[SEP] identifier[getProxy] operator[SEP] operator[SEP] operator[SEP] identifier[getPort] operator[SEP] operator[SEP] operator[SEP] identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[proxyPort] , literal[String] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[proxy] operator[SEP] Keyword[new] identifier[HttpHost] operator[SEP] identifier[proxyHost] , identifier[proxyPort] operator[SEP] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[HttpClientConfigBuilderCustomizer] operator[>] identifier[configBuilderCustomizers] operator[=] identifier[builderCustomizers] operator[!=] Other[null] operator[?] identifier[builderCustomizers] operator[SEP] identifier[getIfAvailable] operator[SEP] operator[SEP] operator[:] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[CollectionUtils] operator[SEP] identifier[isEmpty] operator[SEP] identifier[configBuilderCustomizers] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[configBuilderCustomizers] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] identifier[forEach] operator[SEP] identifier[customizer] operator[->] identifier[customizer] operator[SEP] identifier[customize] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[JestClientFactory] identifier[factory] operator[=] identifier[jestClientFactory] operator[!=] Other[null] operator[?] identifier[jestClientFactory] operator[:] Keyword[new] identifier[JestClientFactory] operator[SEP] operator[SEP] operator[SEP] identifier[factory] operator[SEP] identifier[setHttpClientConfig] operator[SEP] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[factory] operator[SEP] identifier[getObject] operator[SEP] operator[SEP] operator[SEP] }
public static MozuUrl configuredProductUrl(Boolean includeOptionDetails, String productCode, String purchaseLocation, Integer quantity, String responseFields, Boolean skipInventoryCheck, String variationProductCodeFilter) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/storefront/products/{productCode}/configure?includeOptionDetails={includeOptionDetails}&skipInventoryCheck={skipInventoryCheck}&quantity={quantity}&purchaseLocation={purchaseLocation}&variationProductCodeFilter={variationProductCodeFilter}&responseFields={responseFields}"); formatter.formatUrl("includeOptionDetails", includeOptionDetails); formatter.formatUrl("productCode", productCode); formatter.formatUrl("purchaseLocation", purchaseLocation); formatter.formatUrl("quantity", quantity); formatter.formatUrl("responseFields", responseFields); formatter.formatUrl("skipInventoryCheck", skipInventoryCheck); formatter.formatUrl("variationProductCodeFilter", variationProductCodeFilter); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
class class_name[name] begin[{] method[configuredProductUrl, return_type[type[MozuUrl]], modifier[public static], parameter[includeOptionDetails, productCode, purchaseLocation, quantity, responseFields, skipInventoryCheck, variationProductCodeFilter]] begin[{] local_variable[type[UrlFormatter], formatter] call[formatter.formatUrl, parameter[literal["includeOptionDetails"], member[.includeOptionDetails]]] call[formatter.formatUrl, parameter[literal["productCode"], member[.productCode]]] call[formatter.formatUrl, parameter[literal["purchaseLocation"], member[.purchaseLocation]]] call[formatter.formatUrl, parameter[literal["quantity"], member[.quantity]]] call[formatter.formatUrl, parameter[literal["responseFields"], member[.responseFields]]] call[formatter.formatUrl, parameter[literal["skipInventoryCheck"], member[.skipInventoryCheck]]] call[formatter.formatUrl, parameter[literal["variationProductCodeFilter"], member[.variationProductCodeFilter]]] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getResourceUrl, postfix_operators=[], prefix_operators=[], qualifier=formatter, selectors=[], type_arguments=None), MemberReference(member=TENANT_POD, postfix_operators=[], prefix_operators=[], qualifier=MozuUrl.UrlLocation, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MozuUrl, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[MozuUrl] identifier[configuredProductUrl] operator[SEP] identifier[Boolean] identifier[includeOptionDetails] , identifier[String] identifier[productCode] , identifier[String] identifier[purchaseLocation] , identifier[Integer] identifier[quantity] , identifier[String] identifier[responseFields] , identifier[Boolean] identifier[skipInventoryCheck] , identifier[String] identifier[variationProductCodeFilter] operator[SEP] { identifier[UrlFormatter] identifier[formatter] operator[=] Keyword[new] identifier[UrlFormatter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[includeOptionDetails] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[productCode] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[purchaseLocation] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[quantity] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[responseFields] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[skipInventoryCheck] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[variationProductCodeFilter] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[MozuUrl] operator[SEP] identifier[formatter] operator[SEP] identifier[getResourceUrl] operator[SEP] operator[SEP] , identifier[MozuUrl] operator[SEP] identifier[UrlLocation] operator[SEP] identifier[TENANT_POD] operator[SEP] operator[SEP] }
public static HttpRequestor.Response startPostNoAuth(DbxRequestConfig requestConfig, String sdkUserAgentIdentifier, String host, String path, /*@Nullable*/String/*@Nullable*/[] params, /*@Nullable*/List<HttpRequestor.Header> headers) throws NetworkIOException { byte[] encodedParams = StringUtil.stringToUtf8(encodeUrlParams(requestConfig.getUserLocale(), params)); headers = copyHeaders(headers); headers.add(new HttpRequestor.Header("Content-Type", "application/x-www-form-urlencoded; charset=utf-8")); return startPostRaw(requestConfig, sdkUserAgentIdentifier, host, path, encodedParams, headers); }
class class_name[name] begin[{] method[startPostNoAuth, return_type[type[HttpRequestor]], modifier[public static], parameter[requestConfig, sdkUserAgentIdentifier, host, path, params, headers]] begin[{] local_variable[type[byte], encodedParams] assign[member[.headers], call[.copyHeaders, parameter[member[.headers]]]] call[headers.add, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Content-Type"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="application/x-www-form-urlencoded; charset=utf-8")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HttpRequestor, sub_type=ReferenceType(arguments=None, dimensions=None, name=Header, sub_type=None)))]] return[call[.startPostRaw, parameter[member[.requestConfig], member[.sdkUserAgentIdentifier], member[.host], member[.path], member[.encodedParams], member[.headers]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HttpRequestor] operator[SEP] identifier[Response] identifier[startPostNoAuth] operator[SEP] identifier[DbxRequestConfig] identifier[requestConfig] , identifier[String] identifier[sdkUserAgentIdentifier] , identifier[String] identifier[host] , identifier[String] identifier[path] , identifier[String] operator[SEP] operator[SEP] identifier[params] , identifier[List] operator[<] identifier[HttpRequestor] operator[SEP] identifier[Header] operator[>] identifier[headers] operator[SEP] Keyword[throws] identifier[NetworkIOException] { Keyword[byte] operator[SEP] operator[SEP] identifier[encodedParams] operator[=] identifier[StringUtil] operator[SEP] identifier[stringToUtf8] operator[SEP] identifier[encodeUrlParams] operator[SEP] identifier[requestConfig] operator[SEP] identifier[getUserLocale] operator[SEP] operator[SEP] , identifier[params] operator[SEP] operator[SEP] operator[SEP] identifier[headers] operator[=] identifier[copyHeaders] operator[SEP] identifier[headers] operator[SEP] operator[SEP] identifier[headers] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[HttpRequestor] operator[SEP] identifier[Header] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[startPostRaw] operator[SEP] identifier[requestConfig] , identifier[sdkUserAgentIdentifier] , identifier[host] , identifier[path] , identifier[encodedParams] , identifier[headers] operator[SEP] operator[SEP] }
@Override public void handleResponse(final HttpProxyResponse response) throws ProxyAuthException { if (step == 0) { String challengeResponse = getNTLMHeader(response); step = 1; if (challengeResponse == null || challengeResponse.length() < 5) { // Nothing to handle at this step. // Just need to send a reply type 1 message in doHandshake(). return; } // else there was no step 0 so continue to step 1. } if (step == 1) { // Header should look like : // Proxy-Authenticate: NTLM still_some_more_stuff String challengeResponse = getNTLMHeader(response); if (challengeResponse == null || challengeResponse.length() < 5) { throw new ProxyAuthException( "Unexpected error while reading server challenge !"); } try { challengePacket = Base64 .decodeBase64(challengeResponse.substring(5).getBytes( proxyIoSession.getCharsetName())); } catch (IOException e) { throw new ProxyAuthException( "Unable to decode the base64 encoded NTLM challenge", e); } step = 2; } else { throw new ProxyAuthException("Received unexpected response code (" + response.getStatusLine() + ")."); } }
class class_name[name] begin[{] method[handleResponse, return_type[void], modifier[public], parameter[response]] begin[{] if[binary_operation[member[.step], ==, literal[0]]] begin[{] local_variable[type[String], challengeResponse] assign[member[.step], literal[1]] if[binary_operation[binary_operation[member[.challengeResponse], ==, literal[null]], ||, binary_operation[call[challengeResponse.length, parameter[]], <, literal[5]]]] begin[{] return[None] else begin[{] None end[}] else begin[{] None end[}] if[binary_operation[member[.step], ==, literal[1]]] begin[{] local_variable[type[String], challengeResponse] if[binary_operation[binary_operation[member[.challengeResponse], ==, literal[null]], ||, binary_operation[call[challengeResponse.length, parameter[]], <, literal[5]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unexpected error while reading server challenge !")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ProxyAuthException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=challengePacket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=challengeResponse, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCharsetName, postfix_operators=[], prefix_operators=[], qualifier=proxyIoSession, selectors=[], type_arguments=None)], member=getBytes, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=decodeBase64, postfix_operators=[], prefix_operators=[], qualifier=Base64, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to decode the base64 encoded NTLM challenge"), 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=ProxyAuthException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) assign[member[.step], literal[2]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Received unexpected response code ("), operandr=MethodInvocation(arguments=[], member=getStatusLine, postfix_operators=[], prefix_operators=[], qualifier=response, 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=ProxyAuthException, sub_type=None)), label=None) end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[handleResponse] operator[SEP] Keyword[final] identifier[HttpProxyResponse] identifier[response] operator[SEP] Keyword[throws] identifier[ProxyAuthException] { Keyword[if] operator[SEP] identifier[step] operator[==] Other[0] operator[SEP] { identifier[String] identifier[challengeResponse] operator[=] identifier[getNTLMHeader] operator[SEP] identifier[response] operator[SEP] operator[SEP] identifier[step] operator[=] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[challengeResponse] operator[==] Other[null] operator[||] identifier[challengeResponse] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] Other[5] operator[SEP] { Keyword[return] operator[SEP] } } Keyword[if] operator[SEP] identifier[step] operator[==] Other[1] operator[SEP] { identifier[String] identifier[challengeResponse] operator[=] identifier[getNTLMHeader] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[challengeResponse] operator[==] Other[null] operator[||] identifier[challengeResponse] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] Other[5] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProxyAuthException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[challengePacket] operator[=] identifier[Base64] operator[SEP] identifier[decodeBase64] operator[SEP] identifier[challengeResponse] operator[SEP] identifier[substring] operator[SEP] Other[5] operator[SEP] operator[SEP] identifier[getBytes] operator[SEP] identifier[proxyIoSession] operator[SEP] identifier[getCharsetName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ProxyAuthException] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } identifier[step] operator[=] Other[2] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[ProxyAuthException] operator[SEP] literal[String] operator[+] identifier[response] operator[SEP] identifier[getStatusLine] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } }
public static <C extends Compound> int countCompounds( Sequence<C> sequence, C... compounds) { int count = 0; Map<C, Integer> compositon = getComposition(sequence); for (C compound : compounds) { if(compositon.containsKey(compound)) { count = compositon.get(compound) + count; } } return count; }
class class_name[name] begin[{] method[countCompounds, return_type[type[int]], modifier[public static], parameter[sequence, compounds]] begin[{] local_variable[type[int], count] local_variable[type[Map], compositon] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=compound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=compositon, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=compound, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=compositon, selectors=[], type_arguments=None), operandr=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=compounds, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=compound)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=C, sub_type=None))), label=None) return[member[.count]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[C] Keyword[extends] identifier[Compound] operator[>] Keyword[int] identifier[countCompounds] operator[SEP] identifier[Sequence] operator[<] identifier[C] operator[>] identifier[sequence] , identifier[C] operator[...] identifier[compounds] operator[SEP] { Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] identifier[Map] operator[<] identifier[C] , identifier[Integer] operator[>] identifier[compositon] operator[=] identifier[getComposition] operator[SEP] identifier[sequence] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[C] identifier[compound] operator[:] identifier[compounds] operator[SEP] { Keyword[if] operator[SEP] identifier[compositon] operator[SEP] identifier[containsKey] operator[SEP] identifier[compound] operator[SEP] operator[SEP] { identifier[count] operator[=] identifier[compositon] operator[SEP] identifier[get] operator[SEP] identifier[compound] operator[SEP] operator[+] identifier[count] operator[SEP] } } Keyword[return] identifier[count] operator[SEP] }
void submit() { try { saveData(); m_context.finish(null); } catch (Exception e) { m_context.error(e); } }
class class_name[name] begin[{] method[submit, return_type[void], modifier[default], parameter[]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=saveData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=finish, postfix_operators=[], prefix_operators=[], qualifier=m_context, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=m_context, 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[void] identifier[submit] operator[SEP] operator[SEP] { Keyword[try] { identifier[saveData] operator[SEP] operator[SEP] operator[SEP] identifier[m_context] operator[SEP] identifier[finish] operator[SEP] Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[m_context] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public <T> ESDatas<T> searchAllParallel(String index, final int fetchSize ,ScrollHandler<T> scrollHandler,final Class<T> type,int max) throws ElasticSearchException{ if(!this.client.isV1()) { SliceScroll sliceScroll = new SliceScroll() { @Override public String buildSliceDsl(int sliceId, int max) { StringBuilder builder = new StringBuilder(); String sliceDsl = builder.append("{\"slice\": {\"id\": ").append(sliceId).append(",\"max\": ") .append(max).append("},\"size\":").append(fetchSize).append(",\"query\": {\"match_all\": {}},\"sort\": [\"_doc\"]}").toString(); return sliceDsl; // return buildSliceDsl(i,max, params, dslTemplate); } }; return _slice(index + "/_search", scrollHandler, type, max, "1m", sliceScroll); } else{ StringBuilder builder = new StringBuilder(); String queryAll = builder.append("{ \"size\":").append(fetchSize).append(",\"query\": {\"match_all\": {}},\"sort\": [\"_doc\"]}").toString(); builder.setLength(0); return this.scrollParallel(builder.append(index).append("/_search").toString(),queryAll,"10m",type,scrollHandler); } }
class class_name[name] begin[{] method[searchAllParallel, return_type[type[ESDatas]], modifier[public], parameter[index, fetchSize, scrollHandler, type, max]] begin[{] if[THIS[member[None.client]call[None.isV1, parameter[]]]] begin[{] local_variable[type[SliceScroll], sliceScroll] return[call[._slice, parameter[binary_operation[member[.index], +, literal["/_search"]], member[.scrollHandler], member[.type], member[.max], literal["1m"], member[.sliceScroll]]]] else begin[{] local_variable[type[StringBuilder], builder] local_variable[type[String], queryAll] call[builder.setLength, parameter[literal[0]]] return[THIS[call[None.scrollParallel, parameter[call[builder.append, parameter[member[.index]]], member[.queryAll], literal["10m"], member[.type], member[.scrollHandler]]]]] end[}] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[ESDatas] operator[<] identifier[T] operator[>] identifier[searchAllParallel] operator[SEP] identifier[String] identifier[index] , Keyword[final] Keyword[int] identifier[fetchSize] , identifier[ScrollHandler] operator[<] identifier[T] operator[>] identifier[scrollHandler] , Keyword[final] identifier[Class] operator[<] identifier[T] operator[>] identifier[type] , Keyword[int] identifier[max] operator[SEP] Keyword[throws] identifier[ElasticSearchException] { Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[isV1] operator[SEP] operator[SEP] operator[SEP] { identifier[SliceScroll] identifier[sliceScroll] operator[=] Keyword[new] identifier[SliceScroll] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[buildSliceDsl] operator[SEP] Keyword[int] identifier[sliceId] , Keyword[int] identifier[max] operator[SEP] { identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[sliceDsl] operator[=] identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[sliceId] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[max] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[fetchSize] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[sliceDsl] operator[SEP] } } operator[SEP] Keyword[return] identifier[_slice] operator[SEP] identifier[index] operator[+] literal[String] , identifier[scrollHandler] , identifier[type] , identifier[max] , literal[String] , identifier[sliceScroll] operator[SEP] operator[SEP] } Keyword[else] { identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[queryAll] operator[=] identifier[builder] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[append] operator[SEP] identifier[fetchSize] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setLength] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[scrollParallel] operator[SEP] identifier[builder] operator[SEP] identifier[append] operator[SEP] identifier[index] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[queryAll] , literal[String] , identifier[type] , identifier[scrollHandler] operator[SEP] operator[SEP] } }
public final Group updateGroup(Group group) { UpdateGroupRequest request = UpdateGroupRequest.newBuilder().setGroup(group).build(); return updateGroup(request); }
class class_name[name] begin[{] method[updateGroup, return_type[type[Group]], modifier[final public], parameter[group]] begin[{] local_variable[type[UpdateGroupRequest], request] return[call[.updateGroup, parameter[member[.request]]]] end[}] END[}]
Keyword[public] Keyword[final] identifier[Group] identifier[updateGroup] operator[SEP] identifier[Group] identifier[group] operator[SEP] { identifier[UpdateGroupRequest] identifier[request] operator[=] identifier[UpdateGroupRequest] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[setGroup] operator[SEP] identifier[group] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[updateGroup] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public java.util.List<String> getCommandIds() { if (commandIds == null) { commandIds = new com.amazonaws.internal.SdkInternalList<String>(); } return commandIds; }
class class_name[name] begin[{] method[getCommandIds, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.commandIds], ==, literal[null]]] begin[{] assign[member[.commandIds], 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=String, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.commandIds]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[getCommandIds] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[commandIds] operator[==] Other[null] operator[SEP] { identifier[commandIds] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[commandIds] operator[SEP] }
public static HttpServletResponse getHttpServletResponse(ExternalContext ec) { if (isHttpServletRequest(ec)) { return (HttpServletResponse) ec.getResponse(); } return null; }
class class_name[name] begin[{] method[getHttpServletResponse, return_type[type[HttpServletResponse]], modifier[public static], parameter[ec]] begin[{] if[call[.isHttpServletRequest, parameter[member[.ec]]]] begin[{] return[Cast(expression=MethodInvocation(arguments=[], member=getResponse, postfix_operators=[], prefix_operators=[], qualifier=ec, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=HttpServletResponse, sub_type=None))] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[HttpServletResponse] identifier[getHttpServletResponse] operator[SEP] identifier[ExternalContext] identifier[ec] operator[SEP] { Keyword[if] operator[SEP] identifier[isHttpServletRequest] operator[SEP] identifier[ec] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[HttpServletResponse] operator[SEP] identifier[ec] operator[SEP] identifier[getResponse] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private void cleanupJob(JobInProgress job) { cleanupQueue.add(job.getJobID()); while(cleanupQueue.size()> JOBS_IN_MUMAK_MEMORY) { JobID removedJob = cleanupQueue.poll(); // retireJob(removedJob, ""); } }
class class_name[name] begin[{] method[cleanupJob, return_type[void], modifier[private], parameter[job]] begin[{] call[cleanupQueue.add, parameter[call[job.getJobID, parameter[]]]] while[binary_operation[call[cleanupQueue.size, parameter[]], >, member[.JOBS_IN_MUMAK_MEMORY]]] begin[{] local_variable[type[JobID], removedJob] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[cleanupJob] operator[SEP] identifier[JobInProgress] identifier[job] operator[SEP] { identifier[cleanupQueue] operator[SEP] identifier[add] operator[SEP] identifier[job] operator[SEP] identifier[getJobID] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[cleanupQueue] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] identifier[JOBS_IN_MUMAK_MEMORY] operator[SEP] { identifier[JobID] identifier[removedJob] operator[=] identifier[cleanupQueue] operator[SEP] identifier[poll] operator[SEP] operator[SEP] operator[SEP] } }
@Override protected T readCacheDataFromFile(File file) throws CacheLoadingException { try { JsonParser jsonParser = jsonFactory.createJsonParser(new FileReader(file)); T result = jsonParser.parse(getHandledClass(), null); jsonParser.close(); return result; } catch (FileNotFoundException e) { // Should not occur (we test before if file exists) // Do not throw, file is not cached Ln.w("file " + file.getAbsolutePath() + " does not exists", e); return null; } catch (Exception e) { throw new CacheLoadingException(e); } }
class class_name[name] begin[{] method[readCacheDataFromFile, return_type[type[T]], modifier[protected], parameter[file]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FileReader, sub_type=None))], member=createJsonParser, postfix_operators=[], prefix_operators=[], qualifier=jsonFactory, selectors=[], type_arguments=None), name=jsonParser)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=JsonParser, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getHandledClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=parse, postfix_operators=[], prefix_operators=[], qualifier=jsonParser, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[], member=close, postfix_operators=[], prefix_operators=[], qualifier=jsonParser, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="file "), operandr=MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" does not exists"), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=w, postfix_operators=[], prefix_operators=[], qualifier=Ln, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['FileNotFoundException'])), CatchClause(block=[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=CacheLoadingException, 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[}]
annotation[@] identifier[Override] Keyword[protected] identifier[T] identifier[readCacheDataFromFile] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[CacheLoadingException] { Keyword[try] { identifier[JsonParser] identifier[jsonParser] operator[=] identifier[jsonFactory] operator[SEP] identifier[createJsonParser] operator[SEP] Keyword[new] identifier[FileReader] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] identifier[T] identifier[result] operator[=] identifier[jsonParser] operator[SEP] identifier[parse] operator[SEP] identifier[getHandledClass] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] identifier[jsonParser] operator[SEP] identifier[close] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] } Keyword[catch] operator[SEP] identifier[FileNotFoundException] identifier[e] operator[SEP] { identifier[Ln] operator[SEP] identifier[w] operator[SEP] literal[String] operator[+] identifier[file] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] operator[+] literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CacheLoadingException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public Converter getConverter(String operation) { //First we check "covnerters" list Converter c = getConverters().getConverterForOperation(operation); if (c == null) { // if not found, we check configs for (FieldOperationConfig config : getConfigs()) { if (config.includes(operation)) { c = getPm().findExternalConverter(config.getEconverter()); break; } } } if (c == null) { // If not found, we check class level converters final String _property = getProperty(); try { final String[] _properties = _property.split("[.]"); Class<?> clazz = Class.forName(getEntity().getClazz()); for (int i = 0; i < _properties.length - 1; i++) { clazz = FieldUtils.getField(clazz, _properties[i], true).getType(); } final String className = FieldUtils.getField(clazz, _properties[_properties.length - 1], true).getType().getName(); c = getPm().getClassConverters().getConverter(operation, className); } catch (Exception ex) { getPm().info(String.format("Unable to introspect field '%s' on entity '%s'", _property, getEntity().getId())); } } return c; }
class class_name[name] begin[{] method[getConverter, return_type[type[Converter]], modifier[public], parameter[operation]] begin[{] local_variable[type[Converter], c] if[binary_operation[member[.c], ==, literal[null]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=operation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=includes, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getPm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEconverter, postfix_operators=[], prefix_operators=[], qualifier=config, selectors=[], type_arguments=None)], member=findExternalConverter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None), BreakStatement(goto=None, label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getConfigs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=config)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=FieldOperationConfig, sub_type=None))), label=None) else begin[{] None end[}] if[binary_operation[member[.c], ==, literal[null]]] begin[{] local_variable[type[String], _property] 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=_property, selectors=[], type_arguments=None), name=_properties)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[None], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEntity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getClazz, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=forName, postfix_operators=[], prefix_operators=[], qualifier=Class, selectors=[], type_arguments=None), name=clazz)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=_properties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=getField, postfix_operators=[], prefix_operators=[], qualifier=FieldUtils, selectors=[MethodInvocation(arguments=[], member=getType, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=_properties, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=_properties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=_properties, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-))]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=getField, postfix_operators=[], prefix_operators=[], qualifier=FieldUtils, selectors=[MethodInvocation(arguments=[], member=getType, 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_arguments=None), name=className)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getPm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getClassConverters, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=operation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getConverter, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=getPm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to introspect field '%s' on entity '%s'"), MemberReference(member=_property, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getEntity, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=format, postfix_operators=[], prefix_operators=[], qualifier=String, selectors=[], type_arguments=None)], member=info, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Exception']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] return[member[.c]] end[}] END[}]
Keyword[public] identifier[Converter] identifier[getConverter] operator[SEP] identifier[String] identifier[operation] operator[SEP] { identifier[Converter] identifier[c] operator[=] identifier[getConverters] operator[SEP] operator[SEP] operator[SEP] identifier[getConverterForOperation] operator[SEP] identifier[operation] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[FieldOperationConfig] identifier[config] operator[:] identifier[getConfigs] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[config] operator[SEP] identifier[includes] operator[SEP] identifier[operation] operator[SEP] operator[SEP] { identifier[c] operator[=] identifier[getPm] operator[SEP] operator[SEP] operator[SEP] identifier[findExternalConverter] operator[SEP] identifier[config] operator[SEP] identifier[getEconverter] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } } } Keyword[if] operator[SEP] identifier[c] operator[==] Other[null] operator[SEP] { Keyword[final] identifier[String] identifier[_property] operator[=] identifier[getProperty] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[_properties] operator[=] identifier[_property] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[=] identifier[Class] operator[SEP] identifier[forName] operator[SEP] identifier[getEntity] operator[SEP] operator[SEP] operator[SEP] identifier[getClazz] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[_properties] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[clazz] operator[=] identifier[FieldUtils] operator[SEP] identifier[getField] operator[SEP] identifier[clazz] , identifier[_properties] operator[SEP] identifier[i] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[className] operator[=] identifier[FieldUtils] operator[SEP] identifier[getField] operator[SEP] identifier[clazz] , identifier[_properties] operator[SEP] identifier[_properties] operator[SEP] identifier[length] operator[-] Other[1] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[=] identifier[getPm] operator[SEP] operator[SEP] operator[SEP] identifier[getClassConverters] operator[SEP] operator[SEP] operator[SEP] identifier[getConverter] operator[SEP] identifier[operation] , identifier[className] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[ex] operator[SEP] { identifier[getPm] operator[SEP] operator[SEP] operator[SEP] identifier[info] operator[SEP] identifier[String] operator[SEP] identifier[format] operator[SEP] literal[String] , identifier[_property] , identifier[getEntity] operator[SEP] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[c] operator[SEP] }
public DBObject toDBObject(final Object entity, final Map<Object, DBObject> involvedObjects) { return toDBObject(entity, involvedObjects, true); }
class class_name[name] begin[{] method[toDBObject, return_type[type[DBObject]], modifier[public], parameter[entity, involvedObjects]] begin[{] return[call[.toDBObject, parameter[member[.entity], member[.involvedObjects], literal[true]]]] end[}] END[}]
Keyword[public] identifier[DBObject] identifier[toDBObject] operator[SEP] Keyword[final] identifier[Object] identifier[entity] , Keyword[final] identifier[Map] operator[<] identifier[Object] , identifier[DBObject] operator[>] identifier[involvedObjects] operator[SEP] { Keyword[return] identifier[toDBObject] operator[SEP] identifier[entity] , identifier[involvedObjects] , literal[boolean] operator[SEP] operator[SEP] }
private static void addFrameOutput(FramingContext state, Object parent, String property, Object output) { if (parent instanceof Map) { List<Object> prop = (List<Object>) ((Map<String, Object>) parent).get(property); if (prop == null) { prop = new ArrayList<Object>(); ((Map<String, Object>) parent).put(property, prop); } prop.add(output); } else { ((List) parent).add(output); } }
class class_name[name] begin[{] method[addFrameOutput, return_type[void], modifier[private static], parameter[state, parent, property, output]] begin[{] if[binary_operation[member[.parent], instanceof, type[Map]]] begin[{] local_variable[type[List], prop] if[binary_operation[member[.prop], ==, literal[null]]] begin[{] assign[member[.prop], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] Cast(expression=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=[], name=Map, sub_type=None)) else begin[{] None end[}] call[prop.add, parameter[member[.output]]] else begin[{] Cast(expression=MemberReference(member=parent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=List, sub_type=None)) end[}] end[}] END[}]
Keyword[private] Keyword[static] Keyword[void] identifier[addFrameOutput] operator[SEP] identifier[FramingContext] identifier[state] , identifier[Object] identifier[parent] , identifier[String] identifier[property] , identifier[Object] identifier[output] operator[SEP] { Keyword[if] operator[SEP] identifier[parent] Keyword[instanceof] identifier[Map] operator[SEP] { identifier[List] operator[<] identifier[Object] operator[>] identifier[prop] operator[=] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] identifier[parent] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[property] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[prop] operator[==] Other[null] operator[SEP] { identifier[prop] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] identifier[parent] operator[SEP] operator[SEP] identifier[put] operator[SEP] identifier[property] , identifier[prop] operator[SEP] operator[SEP] } identifier[prop] operator[SEP] identifier[add] operator[SEP] identifier[output] operator[SEP] operator[SEP] } Keyword[else] { operator[SEP] operator[SEP] identifier[List] operator[SEP] identifier[parent] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[output] operator[SEP] operator[SEP] } }
public static void runExample(AdManagerServices adManagerServices, AdManagerSession session) throws RemoteException { // Get the CompanyService. CompanyServiceInterface companyService = adManagerServices.get(session, CompanyServiceInterface.class); // Create an advertiser. Company advertiser = new Company(); advertiser.setName("Advertiser #" + new Random().nextInt(Integer.MAX_VALUE)); advertiser.setType(CompanyType.ADVERTISER); // Create an agency. Company agency = new Company(); agency.setName("Agency #" + new Random().nextInt(Integer.MAX_VALUE)); agency.setType(CompanyType.AGENCY); // Create the companies on the server. Company[] companies = companyService.createCompanies(new Company[] {advertiser, agency}); for (Company createdCompany : companies) { System.out.printf( "A company with ID %d, name '%s', and type '%s' was created.%n", createdCompany.getId(), createdCompany.getName(), createdCompany.getType()); } }
class class_name[name] begin[{] method[runExample, return_type[void], modifier[public static], parameter[adManagerServices, session]] begin[{] local_variable[type[CompanyServiceInterface], companyService] local_variable[type[Company], advertiser] call[advertiser.setName, parameter[binary_operation[literal["Advertiser #"], +, ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[])], member=nextInt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Random, sub_type=None))]]] call[advertiser.setType, parameter[member[CompanyType.ADVERTISER]]] local_variable[type[Company], agency] call[agency.setName, parameter[binary_operation[literal["Agency #"], +, ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=MAX_VALUE, postfix_operators=[], prefix_operators=[], qualifier=Integer, selectors=[])], member=nextInt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Random, sub_type=None))]]] call[agency.setType, parameter[member[CompanyType.AGENCY]]] local_variable[type[Company], companies] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="A company with ID %d, name '%s', and type '%s' was created.%n"), MethodInvocation(arguments=[], member=getId, postfix_operators=[], prefix_operators=[], qualifier=createdCompany, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=createdCompany, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=createdCompany, selectors=[], type_arguments=None)], member=printf, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=companies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=createdCompany)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Company, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[runExample] operator[SEP] identifier[AdManagerServices] identifier[adManagerServices] , identifier[AdManagerSession] identifier[session] operator[SEP] Keyword[throws] identifier[RemoteException] { identifier[CompanyServiceInterface] identifier[companyService] operator[=] identifier[adManagerServices] operator[SEP] identifier[get] operator[SEP] identifier[session] , identifier[CompanyServiceInterface] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[Company] identifier[advertiser] operator[=] Keyword[new] identifier[Company] operator[SEP] operator[SEP] operator[SEP] identifier[advertiser] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[+] Keyword[new] identifier[Random] operator[SEP] operator[SEP] operator[SEP] identifier[nextInt] operator[SEP] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] operator[SEP] identifier[advertiser] operator[SEP] identifier[setType] operator[SEP] identifier[CompanyType] operator[SEP] identifier[ADVERTISER] operator[SEP] operator[SEP] identifier[Company] identifier[agency] operator[=] Keyword[new] identifier[Company] operator[SEP] operator[SEP] operator[SEP] identifier[agency] operator[SEP] identifier[setName] operator[SEP] literal[String] operator[+] Keyword[new] identifier[Random] operator[SEP] operator[SEP] operator[SEP] identifier[nextInt] operator[SEP] identifier[Integer] operator[SEP] identifier[MAX_VALUE] operator[SEP] operator[SEP] operator[SEP] identifier[agency] operator[SEP] identifier[setType] operator[SEP] identifier[CompanyType] operator[SEP] identifier[AGENCY] operator[SEP] operator[SEP] identifier[Company] operator[SEP] operator[SEP] identifier[companies] operator[=] identifier[companyService] operator[SEP] identifier[createCompanies] operator[SEP] Keyword[new] identifier[Company] operator[SEP] operator[SEP] { identifier[advertiser] , identifier[agency] } operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Company] identifier[createdCompany] operator[:] identifier[companies] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[printf] operator[SEP] literal[String] , identifier[createdCompany] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[createdCompany] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[createdCompany] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@Override public EClass getIfcRelDefinesByObject() { if (ifcRelDefinesByObjectEClass == null) { ifcRelDefinesByObjectEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(548); } return ifcRelDefinesByObjectEClass; }
class class_name[name] begin[{] method[getIfcRelDefinesByObject, return_type[type[EClass]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.ifcRelDefinesByObjectEClass], ==, literal[null]]] begin[{] assign[member[.ifcRelDefinesByObjectEClass], 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=548)], member=get, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=EClass, sub_type=None))] else begin[{] None end[}] return[member[.ifcRelDefinesByObjectEClass]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[EClass] identifier[getIfcRelDefinesByObject] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ifcRelDefinesByObjectEClass] operator[==] Other[null] operator[SEP] { identifier[ifcRelDefinesByObjectEClass] 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[548] operator[SEP] operator[SEP] } Keyword[return] identifier[ifcRelDefinesByObjectEClass] operator[SEP] }
public java.util.List<Object> getListItemOrX() { if (listItemOrX == null) { listItemOrX = new ArrayList<Object>(); } return this.listItemOrX; }
class class_name[name] begin[{] method[getListItemOrX, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.listItemOrX], ==, literal[null]]] begin[{] assign[member[.listItemOrX], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] return[THIS[member[None.listItemOrX]]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[Object] operator[>] identifier[getListItemOrX] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[listItemOrX] operator[==] Other[null] operator[SEP] { identifier[listItemOrX] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] identifier[listItemOrX] operator[SEP] }
public static void addEarToServerApps(LibertyServer server, String dir, String earName) throws Exception { server.copyFileToLibertyServerRoot(DIR_PUBLISH + server.getServerName() + "/" + dir, DIR_APPS, earName); }
class class_name[name] begin[{] method[addEarToServerApps, return_type[void], modifier[public static], parameter[server, dir, earName]] begin[{] call[server.copyFileToLibertyServerRoot, parameter[binary_operation[binary_operation[binary_operation[member[.DIR_PUBLISH], +, call[server.getServerName, parameter[]]], +, literal["/"]], +, member[.dir]], member[.DIR_APPS], member[.earName]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[addEarToServerApps] operator[SEP] identifier[LibertyServer] identifier[server] , identifier[String] identifier[dir] , identifier[String] identifier[earName] operator[SEP] Keyword[throws] identifier[Exception] { identifier[server] operator[SEP] identifier[copyFileToLibertyServerRoot] operator[SEP] identifier[DIR_PUBLISH] operator[+] identifier[server] operator[SEP] identifier[getServerName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[dir] , identifier[DIR_APPS] , identifier[earName] operator[SEP] operator[SEP] }
@Override public HandlerRegistration addBlurHandler(final BlurHandler handler) { this.blurHandler = handler; clearBlurHandlers(); addRadiosBlurHandler(handler); return null; }
class class_name[name] begin[{] method[addBlurHandler, return_type[type[HandlerRegistration]], modifier[public], parameter[handler]] begin[{] assign[THIS[member[None.blurHandler]], member[.handler]] call[.clearBlurHandlers, parameter[]] call[.addRadiosBlurHandler, parameter[member[.handler]]] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[HandlerRegistration] identifier[addBlurHandler] operator[SEP] Keyword[final] identifier[BlurHandler] identifier[handler] operator[SEP] { Keyword[this] operator[SEP] identifier[blurHandler] operator[=] identifier[handler] operator[SEP] identifier[clearBlurHandlers] operator[SEP] operator[SEP] operator[SEP] identifier[addRadiosBlurHandler] operator[SEP] identifier[handler] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
private void processCalendars() throws Exception { List<Row> rows = getRows("select * from zcalendar where zproject=?", m_projectID); for (Row row : rows) { ProjectCalendar calendar = m_project.addCalendar(); calendar.setUniqueID(row.getInteger("Z_PK")); calendar.setName(row.getString("ZTITLE")); processDays(calendar); processExceptions(calendar); m_eventManager.fireCalendarReadEvent(calendar); } }
class class_name[name] begin[{] method[processCalendars, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[List], rows] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=addCalendar, postfix_operators=[], prefix_operators=[], qualifier=m_project, selectors=[], type_arguments=None), name=calendar)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ProjectCalendar, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Z_PK")], member=getInteger, postfix_operators=[], prefix_operators=[], qualifier=row, selectors=[], type_arguments=None)], member=setUniqueID, postfix_operators=[], prefix_operators=[], qualifier=calendar, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ZTITLE")], member=getString, postfix_operators=[], prefix_operators=[], qualifier=row, selectors=[], type_arguments=None)], member=setName, postfix_operators=[], prefix_operators=[], qualifier=calendar, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=calendar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processDays, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=calendar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processExceptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=calendar, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fireCalendarReadEvent, postfix_operators=[], prefix_operators=[], qualifier=m_eventManager, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=rows, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=row)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Row, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[processCalendars] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { identifier[List] operator[<] identifier[Row] operator[>] identifier[rows] operator[=] identifier[getRows] operator[SEP] literal[String] , identifier[m_projectID] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Row] identifier[row] operator[:] identifier[rows] operator[SEP] { identifier[ProjectCalendar] identifier[calendar] operator[=] identifier[m_project] operator[SEP] identifier[addCalendar] operator[SEP] operator[SEP] operator[SEP] identifier[calendar] operator[SEP] identifier[setUniqueID] operator[SEP] identifier[row] operator[SEP] identifier[getInteger] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[calendar] operator[SEP] identifier[setName] operator[SEP] identifier[row] operator[SEP] identifier[getString] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[processDays] operator[SEP] identifier[calendar] operator[SEP] operator[SEP] identifier[processExceptions] operator[SEP] identifier[calendar] operator[SEP] operator[SEP] identifier[m_eventManager] operator[SEP] identifier[fireCalendarReadEvent] operator[SEP] identifier[calendar] operator[SEP] operator[SEP] } }
public void marshall(ApplicationRestoreConfiguration applicationRestoreConfiguration, ProtocolMarshaller protocolMarshaller) { if (applicationRestoreConfiguration == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(applicationRestoreConfiguration.getApplicationRestoreType(), APPLICATIONRESTORETYPE_BINDING); protocolMarshaller.marshall(applicationRestoreConfiguration.getSnapshotName(), SNAPSHOTNAME_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[applicationRestoreConfiguration, protocolMarshaller]] begin[{] if[binary_operation[member[.applicationRestoreConfiguration], ==, 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=getApplicationRestoreType, postfix_operators=[], prefix_operators=[], qualifier=applicationRestoreConfiguration, selectors=[], type_arguments=None), MemberReference(member=APPLICATIONRESTORETYPE_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=getSnapshotName, postfix_operators=[], prefix_operators=[], qualifier=applicationRestoreConfiguration, selectors=[], type_arguments=None), MemberReference(member=SNAPSHOTNAME_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[ApplicationRestoreConfiguration] identifier[applicationRestoreConfiguration] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[applicationRestoreConfiguration] 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[applicationRestoreConfiguration] operator[SEP] identifier[getApplicationRestoreType] operator[SEP] operator[SEP] , identifier[APPLICATIONRESTORETYPE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[applicationRestoreConfiguration] operator[SEP] identifier[getSnapshotName] operator[SEP] operator[SEP] , identifier[SNAPSHOTNAME_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
private int[][] initializeHydrogenPairCheck(int[][] pairCheck) { for (int i = 0; i < pairCheck.length; i++) { for (int j = 0; j < pairCheck[0].length; j++) { pairCheck[i][j] = 0; } } return pairCheck; }
class class_name[name] begin[{] method[initializeHydrogenPairCheck, return_type[type[int]], modifier[private], parameter[pairCheck]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=pairCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), ArraySelector(index=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=j, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=pairCheck, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=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=length, postfix_operators=[], prefix_operators=[], qualifier=pairCheck, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.pairCheck]] end[}] END[}]
Keyword[private] Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[initializeHydrogenPairCheck] operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[pairCheck] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[pairCheck] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[j] operator[=] Other[0] operator[SEP] identifier[j] operator[<] identifier[pairCheck] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[length] operator[SEP] identifier[j] operator[++] operator[SEP] { identifier[pairCheck] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[j] operator[SEP] operator[=] Other[0] operator[SEP] } } Keyword[return] identifier[pairCheck] operator[SEP] }
CdmrFeatureProto.Coverage.Builder encodeGrid(Coverage grid) { CdmrFeatureProto.Coverage.Builder builder = CdmrFeatureProto.Coverage.newBuilder(); builder.setName(grid.getName()); builder.setDataType(NcStream.convertDataType(grid.getDataType())); for (Attribute att : grid.getAttributes()) builder.addAtts(NcStream.encodeAtt(att)); builder.setUnits(grid.getUnitsString()); builder.setDescription(grid.getDescription()); builder.setCoordSys(grid.getCoordSysName()); return builder; }
class class_name[name] begin[{] method[encodeGrid, return_type[type[CdmrFeatureProto]], modifier[default], parameter[grid]] begin[{] local_variable[type[CdmrFeatureProto], builder] call[builder.setName, parameter[call[grid.getName, parameter[]]]] call[builder.setDataType, parameter[call[NcStream.convertDataType, parameter[call[grid.getDataType, parameter[]]]]]] ForStatement(body=StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=att, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=encodeAtt, postfix_operators=[], prefix_operators=[], qualifier=NcStream, selectors=[], type_arguments=None)], member=addAtts, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAttributes, postfix_operators=[], prefix_operators=[], qualifier=grid, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=att)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Attribute, sub_type=None))), label=None) call[builder.setUnits, parameter[call[grid.getUnitsString, parameter[]]]] call[builder.setDescription, parameter[call[grid.getDescription, parameter[]]]] call[builder.setCoordSys, parameter[call[grid.getCoordSysName, parameter[]]]] return[member[.builder]] end[}] END[}]
identifier[CdmrFeatureProto] operator[SEP] identifier[Coverage] operator[SEP] identifier[Builder] identifier[encodeGrid] operator[SEP] identifier[Coverage] identifier[grid] operator[SEP] { identifier[CdmrFeatureProto] operator[SEP] identifier[Coverage] operator[SEP] identifier[Builder] identifier[builder] operator[=] identifier[CdmrFeatureProto] operator[SEP] identifier[Coverage] operator[SEP] identifier[newBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setName] operator[SEP] identifier[grid] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setDataType] operator[SEP] identifier[NcStream] operator[SEP] identifier[convertDataType] operator[SEP] identifier[grid] operator[SEP] identifier[getDataType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Attribute] identifier[att] operator[:] identifier[grid] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[addAtts] operator[SEP] identifier[NcStream] operator[SEP] identifier[encodeAtt] operator[SEP] identifier[att] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setUnits] operator[SEP] identifier[grid] operator[SEP] identifier[getUnitsString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setDescription] operator[SEP] identifier[grid] operator[SEP] identifier[getDescription] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[setCoordSys] operator[SEP] identifier[grid] operator[SEP] identifier[getCoordSysName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] }
public Dispatchable addDispatchableForLocalTransaction(int clientTransactionId) { if (tc.isEntryEnabled()) SibTr.entry(this, tc, "addDispatchableForLocalTransaction", "" + clientTransactionId); if (idToFirstLevelEntryMap.containsKey(clientTransactionId)) { final SIErrorException exception = new SIErrorException(CommsConstants.TRANTODISPATCHMAP_ADDDISPATCHLOCALTX_01); FFDCFilter.processException(exception, CLASS_NAME + ".addDispatchableForLocalTransaction", CommsConstants.TRANTODISPATCHMAP_ADDDISPATCHLOCALTX_01, new Object[] { "" + clientTransactionId, idToFirstLevelEntryMap, this }); if (tc.isEventEnabled()) SibTr.exception(this, tc, exception); throw exception; } LocalFirstLevelMapEntry entry = new LocalFirstLevelMapEntry(); Dispatchable result = entry.getDispatchable(); idToFirstLevelEntryMap.put(clientTransactionId, entry); if (tc.isEntryEnabled()) SibTr.exit(this, tc, "addDispatchableForLocalTransaction", result); return result; }
class class_name[name] begin[{] method[addDispatchableForLocalTransaction, return_type[type[Dispatchable]], modifier[public], parameter[clientTransactionId]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["addDispatchableForLocalTransaction"], binary_operation[literal[""], +, member[.clientTransactionId]]]] else begin[{] None end[}] if[call[idToFirstLevelEntryMap.containsKey, parameter[member[.clientTransactionId]]]] begin[{] local_variable[type[SIErrorException], exception] call[FFDCFilter.processException, parameter[member[.exception], binary_operation[member[.CLASS_NAME], +, literal[".addDispatchableForLocalTransaction"]], member[CommsConstants.TRANTODISPATCHMAP_ADDDISPATCHLOCALTX_01], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), operandr=MemberReference(member=clientTransactionId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), MemberReference(member=idToFirstLevelEntryMap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] if[call[tc.isEventEnabled, parameter[]]] begin[{] call[SibTr.exception, parameter[THIS[], member[.tc], member[.exception]]] else begin[{] None end[}] ThrowStatement(expression=MemberReference(member=exception, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) else begin[{] None end[}] local_variable[type[LocalFirstLevelMapEntry], entry] local_variable[type[Dispatchable], result] call[idToFirstLevelEntryMap.put, parameter[member[.clientTransactionId], member[.entry]]] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["addDispatchableForLocalTransaction"], member[.result]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[Dispatchable] identifier[addDispatchableForLocalTransaction] operator[SEP] Keyword[int] identifier[clientTransactionId] 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] Keyword[this] , identifier[tc] , literal[String] , literal[String] operator[+] identifier[clientTransactionId] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[idToFirstLevelEntryMap] operator[SEP] identifier[containsKey] operator[SEP] identifier[clientTransactionId] operator[SEP] operator[SEP] { Keyword[final] identifier[SIErrorException] identifier[exception] operator[=] Keyword[new] identifier[SIErrorException] operator[SEP] identifier[CommsConstants] operator[SEP] identifier[TRANTODISPATCHMAP_ADDDISPATCHLOCALTX_01] operator[SEP] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[exception] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[CommsConstants] operator[SEP] identifier[TRANTODISPATCHMAP_ADDDISPATCHLOCALTX_01] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { literal[String] operator[+] identifier[clientTransactionId] , identifier[idToFirstLevelEntryMap] , Keyword[this] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEventEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exception] operator[SEP] Keyword[this] , identifier[tc] , identifier[exception] operator[SEP] operator[SEP] Keyword[throw] identifier[exception] operator[SEP] } identifier[LocalFirstLevelMapEntry] identifier[entry] operator[=] Keyword[new] identifier[LocalFirstLevelMapEntry] operator[SEP] operator[SEP] operator[SEP] identifier[Dispatchable] identifier[result] operator[=] identifier[entry] operator[SEP] identifier[getDispatchable] operator[SEP] operator[SEP] operator[SEP] identifier[idToFirstLevelEntryMap] operator[SEP] identifier[put] operator[SEP] identifier[clientTransactionId] , identifier[entry] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[result] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@Deprecated public static String collect(String string, CharToCharFunction function) { return StringIterate.collectChar(string, function); }
class class_name[name] begin[{] method[collect, return_type[type[String]], modifier[public static], parameter[string, function]] begin[{] return[call[StringIterate.collectChar, parameter[member[.string], member[.function]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[String] identifier[collect] operator[SEP] identifier[String] identifier[string] , identifier[CharToCharFunction] identifier[function] operator[SEP] { Keyword[return] identifier[StringIterate] operator[SEP] identifier[collectChar] operator[SEP] identifier[string] , identifier[function] operator[SEP] operator[SEP] }
public void loadRefasterJsTemplate(String refasterjsTemplate) throws IOException { checkState( templateJs == null, "Can't load RefasterJs template since a template is already loaded."); this.templateJs = Thread.currentThread().getContextClassLoader().getResource(refasterjsTemplate) != null ? Resources.toString(Resources.getResource(refasterjsTemplate), UTF_8) : Files.asCharSource(new File(refasterjsTemplate), UTF_8).read(); }
class class_name[name] begin[{] method[loadRefasterJsTemplate, return_type[void], modifier[public], parameter[refasterjsTemplate]] begin[{] call[.checkState, parameter[binary_operation[member[.templateJs], ==, literal[null]], literal["Can't load RefasterJs template since a template is already loaded."]]] assign[THIS[member[None.templateJs]], TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=currentThread, postfix_operators=[], prefix_operators=[], qualifier=Thread, selectors=[MethodInvocation(arguments=[], member=getContextClassLoader, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=refasterjsTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResource, 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=!=), if_false=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=refasterjsTemplate, 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=File, sub_type=None)), MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=asCharSource, postfix_operators=[], prefix_operators=[], qualifier=Files, selectors=[MethodInvocation(arguments=[], member=read, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), if_true=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=refasterjsTemplate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getResource, postfix_operators=[], prefix_operators=[], qualifier=Resources, selectors=[], type_arguments=None), MemberReference(member=UTF_8, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=toString, postfix_operators=[], prefix_operators=[], qualifier=Resources, selectors=[], type_arguments=None))] end[}] END[}]
Keyword[public] Keyword[void] identifier[loadRefasterJsTemplate] operator[SEP] identifier[String] identifier[refasterjsTemplate] operator[SEP] Keyword[throws] identifier[IOException] { identifier[checkState] operator[SEP] identifier[templateJs] operator[==] Other[null] , literal[String] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[templateJs] operator[=] identifier[Thread] operator[SEP] identifier[currentThread] operator[SEP] operator[SEP] operator[SEP] identifier[getContextClassLoader] operator[SEP] operator[SEP] operator[SEP] identifier[getResource] operator[SEP] identifier[refasterjsTemplate] operator[SEP] operator[!=] Other[null] operator[?] identifier[Resources] operator[SEP] identifier[toString] operator[SEP] identifier[Resources] operator[SEP] identifier[getResource] operator[SEP] identifier[refasterjsTemplate] operator[SEP] , identifier[UTF_8] operator[SEP] operator[:] identifier[Files] operator[SEP] identifier[asCharSource] operator[SEP] Keyword[new] identifier[File] operator[SEP] identifier[refasterjsTemplate] operator[SEP] , identifier[UTF_8] operator[SEP] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] }
public Set<IConnection> getClientConnections() { Set<IConnection> result = new HashSet<IConnection>(3); log.debug("Client count: {}", clients.size()); for (IClient cli : clients) { Set<IConnection> set = cli.getConnections(); log.debug("Client connection count: {}", set.size()); if (set.size() > 1) { log.warn("Client connections exceeded expected single count; size: {}", set.size()); } for (IConnection conn : set) { result.add(conn); } } return result; }
class class_name[name] begin[{] method[getClientConnections, return_type[type[Set]], modifier[public], parameter[]] begin[{] local_variable[type[Set], result] call[log.debug, parameter[literal["Client count: {}"], call[clients.size, parameter[]]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getConnections, postfix_operators=[], prefix_operators=[], qualifier=cli, selectors=[], type_arguments=None), name=set)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IConnection, sub_type=None))], dimensions=[], name=Set, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Client connection count: {}"), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=set, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=set, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), 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="Client connections exceeded expected single count; size: {}"), MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=set, selectors=[], type_arguments=None)], member=warn, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)])), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=conn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=conn)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IConnection, sub_type=None))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=clients, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=cli)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=IClient, sub_type=None))), label=None) return[member[.result]] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[IConnection] operator[>] identifier[getClientConnections] operator[SEP] operator[SEP] { identifier[Set] operator[<] identifier[IConnection] operator[>] identifier[result] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[IConnection] operator[>] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[clients] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[IClient] identifier[cli] operator[:] identifier[clients] operator[SEP] { identifier[Set] operator[<] identifier[IConnection] operator[>] identifier[set] operator[=] identifier[cli] operator[SEP] identifier[getConnections] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[set] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[set] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[log] operator[SEP] identifier[warn] operator[SEP] literal[String] , identifier[set] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[IConnection] identifier[conn] operator[:] identifier[set] operator[SEP] { identifier[result] operator[SEP] identifier[add] operator[SEP] identifier[conn] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
public int getNbRead() throws DevFailed { manageExceptions("getNbRead"); int ySize = attributeValue_5.r_dim.dim_y; return attributeValue_5.r_dim.dim_x * DIM_MINI(ySize); }
class class_name[name] begin[{] method[getNbRead, return_type[type[int]], modifier[public], parameter[]] begin[{] call[.manageExceptions, parameter[literal["getNbRead"]]] local_variable[type[int], ySize] return[binary_operation[member[attributeValue_5.r_dim.dim_x], *, call[.DIM_MINI, parameter[member[.ySize]]]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getNbRead] operator[SEP] operator[SEP] Keyword[throws] identifier[DevFailed] { identifier[manageExceptions] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[int] identifier[ySize] operator[=] identifier[attributeValue_5] operator[SEP] identifier[r_dim] operator[SEP] identifier[dim_y] operator[SEP] Keyword[return] identifier[attributeValue_5] operator[SEP] identifier[r_dim] operator[SEP] identifier[dim_x] operator[*] identifier[DIM_MINI] operator[SEP] identifier[ySize] operator[SEP] operator[SEP] }
public static boolean isSameWeek(final Date date1, final Date date2) { final Calendar cal1 = Calendar.getInstance(); cal1.setFirstDayOfWeek(Calendar.MONDAY); cal1.setTime(date1); final Calendar cal2 = Calendar.getInstance(); cal2.setFirstDayOfWeek(Calendar.MONDAY); cal2.setTime(date2); return cal1.get(Calendar.ERA) == cal2.get(Calendar.ERA) && cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) && cal1.get(Calendar.WEEK_OF_YEAR) == cal2.get(Calendar.WEEK_OF_YEAR); }
class class_name[name] begin[{] method[isSameWeek, return_type[type[boolean]], modifier[public static], parameter[date1, date2]] begin[{] local_variable[type[Calendar], cal1] call[cal1.setFirstDayOfWeek, parameter[member[Calendar.MONDAY]]] call[cal1.setTime, parameter[member[.date1]]] local_variable[type[Calendar], cal2] call[cal2.setFirstDayOfWeek, parameter[member[Calendar.MONDAY]]] call[cal2.setTime, parameter[member[.date2]]] return[binary_operation[binary_operation[binary_operation[call[cal1.get, parameter[member[Calendar.ERA]]], ==, call[cal2.get, parameter[member[Calendar.ERA]]]], &&, binary_operation[call[cal1.get, parameter[member[Calendar.YEAR]]], ==, call[cal2.get, parameter[member[Calendar.YEAR]]]]], &&, binary_operation[call[cal1.get, parameter[member[Calendar.WEEK_OF_YEAR]]], ==, call[cal2.get, parameter[member[Calendar.WEEK_OF_YEAR]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[isSameWeek] operator[SEP] Keyword[final] identifier[Date] identifier[date1] , Keyword[final] identifier[Date] identifier[date2] operator[SEP] { Keyword[final] identifier[Calendar] identifier[cal1] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[cal1] operator[SEP] identifier[setFirstDayOfWeek] operator[SEP] identifier[Calendar] operator[SEP] identifier[MONDAY] operator[SEP] operator[SEP] identifier[cal1] operator[SEP] identifier[setTime] operator[SEP] identifier[date1] operator[SEP] operator[SEP] Keyword[final] identifier[Calendar] identifier[cal2] operator[=] identifier[Calendar] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[cal2] operator[SEP] identifier[setFirstDayOfWeek] operator[SEP] identifier[Calendar] operator[SEP] identifier[MONDAY] operator[SEP] operator[SEP] identifier[cal2] operator[SEP] identifier[setTime] operator[SEP] identifier[date2] operator[SEP] operator[SEP] Keyword[return] identifier[cal1] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[ERA] operator[SEP] operator[==] identifier[cal2] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[ERA] operator[SEP] operator[&&] identifier[cal1] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] operator[SEP] operator[==] identifier[cal2] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[YEAR] operator[SEP] operator[&&] identifier[cal1] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[WEEK_OF_YEAR] operator[SEP] operator[==] identifier[cal2] operator[SEP] identifier[get] operator[SEP] identifier[Calendar] operator[SEP] identifier[WEEK_OF_YEAR] operator[SEP] operator[SEP] }
public List<IndexInfo> getIndexInfo(final String catalog, final String schema, final String table, final boolean unique, final boolean approximate) throws SQLException { final List<IndexInfo> list = new ArrayList<>(); try (ResultSet results = databaseMetadata.getIndexInfo(catalog, schema, table, unique, approximate)) { if (results != null) { bind(results, IndexInfo.class, list); } } return list; }
class class_name[name] begin[{] method[getIndexInfo, return_type[type[List]], modifier[public], parameter[catalog, schema, table, unique, approximate]] begin[{] local_variable[type[List], list] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=results, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IndexInfo, sub_type=None)), MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=bind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=results, type=ReferenceType(arguments=None, dimensions=[], name=ResultSet, sub_type=None), value=MethodInvocation(arguments=[MemberReference(member=catalog, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=schema, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=table, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=unique, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=approximate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getIndexInfo, postfix_operators=[], prefix_operators=[], qualifier=databaseMetadata, selectors=[], type_arguments=None))]) return[member[.list]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[IndexInfo] operator[>] identifier[getIndexInfo] operator[SEP] Keyword[final] identifier[String] identifier[catalog] , Keyword[final] identifier[String] identifier[schema] , Keyword[final] identifier[String] identifier[table] , Keyword[final] Keyword[boolean] identifier[unique] , Keyword[final] Keyword[boolean] identifier[approximate] operator[SEP] Keyword[throws] identifier[SQLException] { Keyword[final] identifier[List] operator[<] identifier[IndexInfo] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[ResultSet] identifier[results] operator[=] identifier[databaseMetadata] operator[SEP] identifier[getIndexInfo] operator[SEP] identifier[catalog] , identifier[schema] , identifier[table] , identifier[unique] , identifier[approximate] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[results] operator[!=] Other[null] operator[SEP] { identifier[bind] operator[SEP] identifier[results] , identifier[IndexInfo] operator[SEP] Keyword[class] , identifier[list] operator[SEP] operator[SEP] } } Keyword[return] identifier[list] operator[SEP] }
private void writeToImpl(Writer out, long writeStart, long writeEnd) throws IOException { try ( // TODO: If copying to another SegmentedBufferedWriter or AutoTempFileWriter, we have a chance here for disk-to-disk block level copying instead of going through all the conversions. RandomAccessFile raf = new RandomAccessFile(tempFile.getFile(), "r")) { byte[] bytes = BufferManager.getBytes(); try { char[] chars = BufferManager.getChars(); try { long index = writeStart; raf.seek(index<<1); while(index<writeEnd) { // Read a block long blockSizeLong = (writeEnd - index)<<1; int blockSize = blockSizeLong > BufferManager.BUFFER_SIZE ? BufferManager.BUFFER_SIZE : (int)blockSizeLong; assert (blockSize&1) == 0 : "Must be an even number for UTF-16 conversion"; raf.readFully(bytes, 0, blockSize); // Convert to characters for( int bpos=0, cpos=0; bpos<blockSize; bpos+=2, cpos++ ) { chars[cpos] = IoUtils.bufferToChar(bytes, bpos); } // Write to output out.write(chars, 0, blockSize>>1); // Update location index += blockSize>>1; } } finally { BufferManager.release(chars, false); } } finally { BufferManager.release(bytes, false); } } }
class class_name[name] begin[{] method[writeToImpl, return_type[void], modifier[private], parameter[out, writeStart, writeEnd]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=BufferManager, selectors=[], type_arguments=None), name=bytes)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getChars, postfix_operators=[], prefix_operators=[], qualifier=BufferManager, selectors=[], type_arguments=None), name=chars)], modifiers=set(), type=BasicType(dimensions=[None], name=char)), TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=writeStart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=long)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=<<)], member=seek, postfix_operators=[], prefix_operators=[], qualifier=raf, selectors=[], type_arguments=None), label=None), WhileStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=writeEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=-), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=<<), name=blockSizeLong)], modifiers=set(), type=BasicType(dimensions=[], name=long)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=blockSizeLong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=BUFFER_SIZE, postfix_operators=[], prefix_operators=[], qualifier=BufferManager, selectors=[]), operator=>), if_false=Cast(expression=MemberReference(member=blockSizeLong, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), if_true=MemberReference(member=BUFFER_SIZE, postfix_operators=[], prefix_operators=[], qualifier=BufferManager, selectors=[])), name=blockSize)], modifiers=set(), type=BasicType(dimensions=[], name=int)), AssertStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=blockSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), label=None, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Must be an even number for UTF-16 conversion")), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=blockSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=readFully, postfix_operators=[], prefix_operators=[], qualifier=raf, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=chars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=cpos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=bpos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=bufferToChar, postfix_operators=[], prefix_operators=[], qualifier=IoUtils, selectors=[], type_arguments=None)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=bpos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=blockSize, 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=bpos), VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=cpos)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[Assignment(expressionl=MemberReference(member=bpos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), MemberReference(member=cpos, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=chars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MemberReference(member=blockSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>>)], member=write, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=BinaryOperation(operandl=MemberReference(member=blockSize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>>)), label=None)]), condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=writeEnd, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=chars, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=release, postfix_operators=[], prefix_operators=[], qualifier=BufferManager, selectors=[], type_arguments=None), label=None)], label=None, resources=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=bytes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], member=release, postfix_operators=[], prefix_operators=[], qualifier=BufferManager, selectors=[], type_arguments=None), label=None)], label=None, resources=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=raf, type=ReferenceType(arguments=None, dimensions=[], name=RandomAccessFile, sub_type=None), value=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getFile, postfix_operators=[], prefix_operators=[], qualifier=tempFile, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="r")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RandomAccessFile, sub_type=None)))]) end[}] END[}]
Keyword[private] Keyword[void] identifier[writeToImpl] operator[SEP] identifier[Writer] identifier[out] , Keyword[long] identifier[writeStart] , Keyword[long] identifier[writeEnd] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[try] operator[SEP] identifier[RandomAccessFile] identifier[raf] operator[=] Keyword[new] identifier[RandomAccessFile] operator[SEP] identifier[tempFile] operator[SEP] identifier[getFile] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[bytes] operator[=] identifier[BufferManager] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[char] operator[SEP] operator[SEP] identifier[chars] operator[=] identifier[BufferManager] operator[SEP] identifier[getChars] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[long] identifier[index] operator[=] identifier[writeStart] operator[SEP] identifier[raf] operator[SEP] identifier[seek] operator[SEP] identifier[index] operator[<<] Other[1] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[index] operator[<] identifier[writeEnd] operator[SEP] { Keyword[long] identifier[blockSizeLong] operator[=] operator[SEP] identifier[writeEnd] operator[-] identifier[index] operator[SEP] operator[<<] Other[1] operator[SEP] Keyword[int] identifier[blockSize] operator[=] identifier[blockSizeLong] operator[>] identifier[BufferManager] operator[SEP] identifier[BUFFER_SIZE] operator[?] identifier[BufferManager] operator[SEP] identifier[BUFFER_SIZE] operator[:] operator[SEP] Keyword[int] operator[SEP] identifier[blockSizeLong] operator[SEP] Keyword[assert] operator[SEP] identifier[blockSize] operator[&] Other[1] operator[SEP] operator[==] Other[0] operator[:] literal[String] operator[SEP] identifier[raf] operator[SEP] identifier[readFully] operator[SEP] identifier[bytes] , Other[0] , identifier[blockSize] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[bpos] operator[=] Other[0] , identifier[cpos] operator[=] Other[0] operator[SEP] identifier[bpos] operator[<] identifier[blockSize] operator[SEP] identifier[bpos] operator[+=] Other[2] , identifier[cpos] operator[++] operator[SEP] { identifier[chars] operator[SEP] identifier[cpos] operator[SEP] operator[=] identifier[IoUtils] operator[SEP] identifier[bufferToChar] operator[SEP] identifier[bytes] , identifier[bpos] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[write] operator[SEP] identifier[chars] , Other[0] , identifier[blockSize] operator[>] operator[>] Other[1] operator[SEP] operator[SEP] identifier[index] operator[+=] identifier[blockSize] operator[>] operator[>] Other[1] operator[SEP] } } Keyword[finally] { identifier[BufferManager] operator[SEP] identifier[release] operator[SEP] identifier[chars] , literal[boolean] operator[SEP] operator[SEP] } } Keyword[finally] { identifier[BufferManager] operator[SEP] identifier[release] operator[SEP] identifier[bytes] , literal[boolean] operator[SEP] operator[SEP] } } }
@Override public void start() { synchronized (this.lifecycleMonitor) { if (!isRunning()) { log.info("start: Starting ConnectorManager"); try { connector.start(); } catch (ConfigError | RuntimeError ex) { throw new ConfigurationException(ex.getMessage(), ex); } catch (Throwable ex) { throw new IllegalStateException("Could not start the connector", ex); } running = true; } } }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[]] begin[{] SYNCHRONIZED[THIS[member[None.lifecycleMonitor]]] BEGIN[{] if[call[.isRunning, parameter[]]] begin[{] call[log.info, parameter[literal["start: Starting ConnectorManager"]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=start, postfix_operators=[], prefix_operators=[], qualifier=connector, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=ex, selectors=[], type_arguments=None), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ConfigurationException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['ConfigError', 'RuntimeError'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Could not start the connector"), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Throwable']))], finally_block=None, label=None, resources=None) assign[member[.running], literal[true]] else begin[{] None end[}] END[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[start] operator[SEP] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] identifier[lifecycleMonitor] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isRunning] operator[SEP] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[try] { identifier[connector] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ConfigError] operator[|] identifier[RuntimeError] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[ConfigurationException] operator[SEP] identifier[ex] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] , identifier[ex] operator[SEP] operator[SEP] } identifier[running] operator[=] literal[boolean] operator[SEP] } } }
protected void parsePage(final char[] pageContent, final DecoraTag[] decoraTags) { LagartoParser lagartoParser = new LagartoParser(pageContent); PageRegionExtractor writer = new PageRegionExtractor(decoraTags); lagartoParser.parse(writer); }
class class_name[name] begin[{] method[parsePage, return_type[void], modifier[protected], parameter[pageContent, decoraTags]] begin[{] local_variable[type[LagartoParser], lagartoParser] local_variable[type[PageRegionExtractor], writer] call[lagartoParser.parse, parameter[member[.writer]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[parsePage] operator[SEP] Keyword[final] Keyword[char] operator[SEP] operator[SEP] identifier[pageContent] , Keyword[final] identifier[DecoraTag] operator[SEP] operator[SEP] identifier[decoraTags] operator[SEP] { identifier[LagartoParser] identifier[lagartoParser] operator[=] Keyword[new] identifier[LagartoParser] operator[SEP] identifier[pageContent] operator[SEP] operator[SEP] identifier[PageRegionExtractor] identifier[writer] operator[=] Keyword[new] identifier[PageRegionExtractor] operator[SEP] identifier[decoraTags] operator[SEP] operator[SEP] identifier[lagartoParser] operator[SEP] identifier[parse] operator[SEP] identifier[writer] operator[SEP] operator[SEP] }
static List<IA1Address> resolveCellDependencies(IA1Address cellAddress, Sheet sheet, FormulaParsingWorkbook workbook) { Row row = sheet.getRow(cellAddress.row()); if (row == null) { return emptyList(); } Cell cell = row.getCell(cellAddress.column()); if (cell == null) { return emptyList(); } if (CELL_TYPE_FORMULA != cell.getCellType()) { return singletonList(cellAddress); } List<IA1Address> dependencies = new LinkedList<>(); for (Ptg ptg : parse(cell.getCellFormula(), workbook, CELL, 0)) { /* TODO: only one sheet is supported */ if (ptg instanceof RefPtg) { RefPtg ref = (RefPtg) ptg; dependencies.addAll(resolveCellDependencies(fromRowColumn(ref.getRow(), ref.getColumn()), sheet, workbook)); } else if (ptg instanceof AreaPtg) { AreaPtg area = (AreaPtg) ptg; for (int r = area.getFirstRow(); r <= area.getLastRow(); r++) { for (int c = area.getFirstColumn(); c <= area.getLastColumn(); c++) { dependencies.addAll(resolveCellDependencies(fromRowColumn(r, c), sheet, workbook)); } } } dependencies.add(cellAddress); } return dependencies; }
class class_name[name] begin[{] method[resolveCellDependencies, return_type[type[List]], modifier[static], parameter[cellAddress, sheet, workbook]] begin[{] local_variable[type[Row], row] if[binary_operation[member[.row], ==, literal[null]]] begin[{] return[call[.emptyList, parameter[]]] else begin[{] None end[}] local_variable[type[Cell], cell] if[binary_operation[member[.cell], ==, literal[null]]] begin[{] return[call[.emptyList, parameter[]]] else begin[{] None end[}] if[binary_operation[member[.CELL_TYPE_FORMULA], !=, call[cell.getCellType, parameter[]]]] begin[{] return[call[.singletonList, parameter[member[.cellAddress]]]] else begin[{] None end[}] local_variable[type[List], dependencies] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ptg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=RefPtg, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ptg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=AreaPtg, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=ptg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=AreaPtg, sub_type=None)), name=area)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AreaPtg, sub_type=None)), ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=fromRowColumn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=sheet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=workbook, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveCellDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=dependencies, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLastColumn, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=getFirstColumn, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), name=c)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=c, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLastRow, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), operator=<=), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MethodInvocation(arguments=[], member=getFirstRow, postfix_operators=[], prefix_operators=[], qualifier=area, selectors=[], type_arguments=None), name=r)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=r, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=ptg, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=RefPtg, sub_type=None)), name=ref)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RefPtg, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getRow, postfix_operators=[], prefix_operators=[], qualifier=ref, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getColumn, postfix_operators=[], prefix_operators=[], qualifier=ref, selectors=[], type_arguments=None)], member=fromRowColumn, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=sheet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=workbook, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveCellDependencies, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=dependencies, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=cellAddress, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=dependencies, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCellFormula, postfix_operators=[], prefix_operators=[], qualifier=cell, selectors=[], type_arguments=None), MemberReference(member=workbook, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=CELL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=parse, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ptg)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Ptg, sub_type=None))), label=None) return[member[.dependencies]] end[}] END[}]
Keyword[static] identifier[List] operator[<] identifier[IA1Address] operator[>] identifier[resolveCellDependencies] operator[SEP] identifier[IA1Address] identifier[cellAddress] , identifier[Sheet] identifier[sheet] , identifier[FormulaParsingWorkbook] identifier[workbook] operator[SEP] { identifier[Row] identifier[row] operator[=] identifier[sheet] operator[SEP] identifier[getRow] operator[SEP] identifier[cellAddress] operator[SEP] identifier[row] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[row] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } identifier[Cell] identifier[cell] operator[=] identifier[row] operator[SEP] identifier[getCell] operator[SEP] identifier[cellAddress] operator[SEP] identifier[column] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[cell] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[CELL_TYPE_FORMULA] operator[!=] identifier[cell] operator[SEP] identifier[getCellType] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[singletonList] operator[SEP] identifier[cellAddress] operator[SEP] operator[SEP] } identifier[List] operator[<] identifier[IA1Address] operator[>] identifier[dependencies] operator[=] Keyword[new] identifier[LinkedList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Ptg] identifier[ptg] operator[:] identifier[parse] operator[SEP] identifier[cell] operator[SEP] identifier[getCellFormula] operator[SEP] operator[SEP] , identifier[workbook] , identifier[CELL] , Other[0] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[ptg] Keyword[instanceof] identifier[RefPtg] operator[SEP] { identifier[RefPtg] identifier[ref] operator[=] operator[SEP] identifier[RefPtg] operator[SEP] identifier[ptg] operator[SEP] identifier[dependencies] operator[SEP] identifier[addAll] operator[SEP] identifier[resolveCellDependencies] operator[SEP] identifier[fromRowColumn] operator[SEP] identifier[ref] operator[SEP] identifier[getRow] operator[SEP] operator[SEP] , identifier[ref] operator[SEP] identifier[getColumn] operator[SEP] operator[SEP] operator[SEP] , identifier[sheet] , identifier[workbook] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ptg] Keyword[instanceof] identifier[AreaPtg] operator[SEP] { identifier[AreaPtg] identifier[area] operator[=] operator[SEP] identifier[AreaPtg] operator[SEP] identifier[ptg] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[r] operator[=] identifier[area] operator[SEP] identifier[getFirstRow] operator[SEP] operator[SEP] operator[SEP] identifier[r] operator[<=] identifier[area] operator[SEP] identifier[getLastRow] operator[SEP] operator[SEP] operator[SEP] identifier[r] operator[++] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[c] operator[=] identifier[area] operator[SEP] identifier[getFirstColumn] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[<=] identifier[area] operator[SEP] identifier[getLastColumn] operator[SEP] operator[SEP] operator[SEP] identifier[c] operator[++] operator[SEP] { identifier[dependencies] operator[SEP] identifier[addAll] operator[SEP] identifier[resolveCellDependencies] operator[SEP] identifier[fromRowColumn] operator[SEP] identifier[r] , identifier[c] operator[SEP] , identifier[sheet] , identifier[workbook] operator[SEP] operator[SEP] operator[SEP] } } } identifier[dependencies] operator[SEP] identifier[add] operator[SEP] identifier[cellAddress] operator[SEP] operator[SEP] } Keyword[return] identifier[dependencies] operator[SEP] }
private boolean existsAndIsExpectedFile(FileStatus status) throws IOException { if (!getFS().exists(status.getPath())) { return false; } FileStatus currentFileStatus = getFS().getFileStatus(status.getPath()); if (currentFileStatus.getLen() != status.getLen() || currentFileStatus.getModificationTime() > status.getModificationTime()) { return false; } return true; }
class class_name[name] begin[{] method[existsAndIsExpectedFile, return_type[type[boolean]], modifier[private], parameter[status]] begin[{] if[call[.getFS, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[FileStatus], currentFileStatus] if[binary_operation[binary_operation[call[currentFileStatus.getLen, parameter[]], !=, call[status.getLen, parameter[]]], ||, binary_operation[call[currentFileStatus.getModificationTime, parameter[]], >, call[status.getModificationTime, parameter[]]]]] begin[{] return[literal[false]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[existsAndIsExpectedFile] operator[SEP] identifier[FileStatus] identifier[status] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[getFS] operator[SEP] operator[SEP] operator[SEP] identifier[exists] operator[SEP] identifier[status] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[FileStatus] identifier[currentFileStatus] operator[=] identifier[getFS] operator[SEP] operator[SEP] operator[SEP] identifier[getFileStatus] operator[SEP] identifier[status] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentFileStatus] operator[SEP] identifier[getLen] operator[SEP] operator[SEP] operator[!=] identifier[status] operator[SEP] identifier[getLen] operator[SEP] operator[SEP] operator[||] identifier[currentFileStatus] operator[SEP] identifier[getModificationTime] operator[SEP] operator[SEP] operator[>] identifier[status] operator[SEP] identifier[getModificationTime] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
@Override public void dumpJPAEntityManagerFactoryState(final Object emf, final PrintWriter out) { dumpECLJPAEntityManagerFactoryState(emf, out); try { // Dump Collected Info About Session Objects out.println(); out.println("Session Objects (" + sessionDiagMap.size() + "):"); for (Map.Entry<Object, String> entry : sessionDiagMap.entrySet()) { out.println(entry.getValue()); out.println(); } // Dump Collected Info About Project Objects out.println("Project Objects (" + projectDiagMap.size() + "):"); for (Map.Entry<Object, String> entry : projectDiagMap.entrySet()) { out.println(entry.getValue()); out.println(); } // Dump Collected Info About ClassDescriptor Objects out.println("ClassDescriptor Objects (" + classDescriptorDiagMap.size() + "):"); for (Map.Entry<Object, String> entry : classDescriptorDiagMap.entrySet()) { out.println(entry.getValue()); out.println(); } // Dump Collected Info About DatabaseTable Objects out.println("DatabaseTable Objects (" + databaseTableDiagMap.size() + "):"); for (Map.Entry<Object, String> entry : databaseTableDiagMap.entrySet()) { out.println(entry.getValue()); out.println(); } // Dump Collected Info About DatabaseField Objects out.println("DatabaseField Objects (" + databaseFieldDiagMap.size() + "):"); for (Map.Entry<Object, String> entry : databaseFieldDiagMap.entrySet()) { out.println(entry.getValue()); out.println(); } // Dump Collected Info About DatabaseMapping Objects out.println("DatabaseMapping Objects (" + databaseMappingDiagMap.size() + "):"); for (Map.Entry<Object, String> entry : databaseMappingDiagMap.entrySet()) { out.println(entry.getValue()); out.println(); } } catch (Throwable t) { FFDCFilter.processException(t, FFDCCN + ".dumpJPAEntityManagerFactoryState", "39"); } }
class class_name[name] begin[{] method[dumpJPAEntityManagerFactoryState, return_type[void], modifier[public], parameter[emf, out]] begin[{] call[.dumpECLJPAEntityManagerFactoryState, parameter[member[.emf], member[.out]]] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Session Objects ("), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=sessionDiagMap, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="):"), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=sessionDiagMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Project Objects ("), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=projectDiagMap, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="):"), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=projectDiagMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="ClassDescriptor Objects ("), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=classDescriptorDiagMap, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="):"), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=classDescriptorDiagMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DatabaseTable Objects ("), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=databaseTableDiagMap, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="):"), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=databaseTableDiagMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DatabaseField Objects ("), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=databaseFieldDiagMap, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="):"), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=databaseFieldDiagMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="DatabaseMapping Objects ("), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=databaseMappingDiagMap, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="):"), operator=+)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=println, postfix_operators=[], prefix_operators=[], qualifier=out, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=databaseMappingDiagMap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=FFDCCN, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".dumpJPAEntityManagerFactoryState"), operator=+), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="39")], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=t, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[dumpJPAEntityManagerFactoryState] operator[SEP] Keyword[final] identifier[Object] identifier[emf] , Keyword[final] identifier[PrintWriter] identifier[out] operator[SEP] { identifier[dumpECLJPAEntityManagerFactoryState] operator[SEP] identifier[emf] , identifier[out] operator[SEP] operator[SEP] Keyword[try] { identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[sessionDiagMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Object] , identifier[String] operator[>] identifier[entry] operator[:] identifier[sessionDiagMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[projectDiagMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Object] , identifier[String] operator[>] identifier[entry] operator[:] identifier[projectDiagMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[classDescriptorDiagMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Object] , identifier[String] operator[>] identifier[entry] operator[:] identifier[classDescriptorDiagMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[databaseTableDiagMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Object] , identifier[String] operator[>] identifier[entry] operator[:] identifier[databaseTableDiagMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[databaseFieldDiagMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Object] , identifier[String] operator[>] identifier[entry] operator[:] identifier[databaseFieldDiagMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] } identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[databaseMappingDiagMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[Object] , identifier[String] operator[>] identifier[entry] operator[:] identifier[databaseMappingDiagMap] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[t] , identifier[FFDCCN] operator[+] literal[String] , literal[String] operator[SEP] operator[SEP] } }
public void marshall(FileSystem fileSystem, ProtocolMarshaller protocolMarshaller) { if (fileSystem == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(fileSystem.getOwnerId(), OWNERID_BINDING); protocolMarshaller.marshall(fileSystem.getCreationTime(), CREATIONTIME_BINDING); protocolMarshaller.marshall(fileSystem.getFileSystemId(), FILESYSTEMID_BINDING); protocolMarshaller.marshall(fileSystem.getFileSystemType(), FILESYSTEMTYPE_BINDING); protocolMarshaller.marshall(fileSystem.getLifecycle(), LIFECYCLE_BINDING); protocolMarshaller.marshall(fileSystem.getFailureDetails(), FAILUREDETAILS_BINDING); protocolMarshaller.marshall(fileSystem.getStorageCapacity(), STORAGECAPACITY_BINDING); protocolMarshaller.marshall(fileSystem.getVpcId(), VPCID_BINDING); protocolMarshaller.marshall(fileSystem.getSubnetIds(), SUBNETIDS_BINDING); protocolMarshaller.marshall(fileSystem.getNetworkInterfaceIds(), NETWORKINTERFACEIDS_BINDING); protocolMarshaller.marshall(fileSystem.getDNSName(), DNSNAME_BINDING); protocolMarshaller.marshall(fileSystem.getKmsKeyId(), KMSKEYID_BINDING); protocolMarshaller.marshall(fileSystem.getResourceARN(), RESOURCEARN_BINDING); protocolMarshaller.marshall(fileSystem.getTags(), TAGS_BINDING); protocolMarshaller.marshall(fileSystem.getWindowsConfiguration(), WINDOWSCONFIGURATION_BINDING); protocolMarshaller.marshall(fileSystem.getLustreConfiguration(), LUSTRECONFIGURATION_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[fileSystem, protocolMarshaller]] begin[{] if[binary_operation[member[.fileSystem], ==, 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=getOwnerId, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=OWNERID_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=getCreationTime, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=CREATIONTIME_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=getFileSystemId, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=FILESYSTEMID_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=getFileSystemType, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=FILESYSTEMTYPE_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=getLifecycle, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=LIFECYCLE_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=getFailureDetails, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=FAILUREDETAILS_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=getStorageCapacity, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=STORAGECAPACITY_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=getVpcId, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=VPCID_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=getSubnetIds, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=SUBNETIDS_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=getNetworkInterfaceIds, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=NETWORKINTERFACEIDS_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=getDNSName, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=DNSNAME_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=getKmsKeyId, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=KMSKEYID_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=getResourceARN, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=RESOURCEARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTags, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=TAGS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getWindowsConfiguration, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=WINDOWSCONFIGURATION_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=getLustreConfiguration, postfix_operators=[], prefix_operators=[], qualifier=fileSystem, selectors=[], type_arguments=None), MemberReference(member=LUSTRECONFIGURATION_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[FileSystem] identifier[fileSystem] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[fileSystem] 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[fileSystem] operator[SEP] identifier[getOwnerId] operator[SEP] operator[SEP] , identifier[OWNERID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getCreationTime] operator[SEP] operator[SEP] , identifier[CREATIONTIME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getFileSystemId] operator[SEP] operator[SEP] , identifier[FILESYSTEMID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getFileSystemType] operator[SEP] operator[SEP] , identifier[FILESYSTEMTYPE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getLifecycle] operator[SEP] operator[SEP] , identifier[LIFECYCLE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getFailureDetails] operator[SEP] operator[SEP] , identifier[FAILUREDETAILS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getStorageCapacity] operator[SEP] operator[SEP] , identifier[STORAGECAPACITY_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getVpcId] operator[SEP] operator[SEP] , identifier[VPCID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getSubnetIds] operator[SEP] operator[SEP] , identifier[SUBNETIDS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getNetworkInterfaceIds] operator[SEP] operator[SEP] , identifier[NETWORKINTERFACEIDS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getDNSName] operator[SEP] operator[SEP] , identifier[DNSNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getKmsKeyId] operator[SEP] operator[SEP] , identifier[KMSKEYID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getResourceARN] operator[SEP] operator[SEP] , identifier[RESOURCEARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getTags] operator[SEP] operator[SEP] , identifier[TAGS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getWindowsConfiguration] operator[SEP] operator[SEP] , identifier[WINDOWSCONFIGURATION_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[fileSystem] operator[SEP] identifier[getLustreConfiguration] operator[SEP] operator[SEP] , identifier[LUSTRECONFIGURATION_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 Observable<Void> stopAsync(String resourceGroupName, String containerGroupName) { return stopWithServiceResponseAsync(resourceGroupName, containerGroupName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
class class_name[name] begin[{] method[stopAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, containerGroupName]] begin[{] return[call[.stopWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.containerGroupName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Void] operator[>] identifier[stopAsync] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[containerGroupName] operator[SEP] { Keyword[return] identifier[stopWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[containerGroupName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] , identifier[Void] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Void] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public Matrix4x3d m11(double m11) { this.m11 = m11; properties &= ~PROPERTY_ORTHONORMAL; if (m11 != 1.0) properties &= ~(PROPERTY_IDENTITY | PROPERTY_TRANSLATION); return this; }
class class_name[name] begin[{] method[m11, return_type[type[Matrix4x3d]], modifier[public], parameter[m11]] begin[{] assign[THIS[member[None.m11]], member[.m11]] assign[member[.properties], member[.PROPERTY_ORTHONORMAL]] if[binary_operation[member[.m11], !=, literal[1.0]]] begin[{] assign[member[.properties], binary_operation[member[.PROPERTY_IDENTITY], |, member[.PROPERTY_TRANSLATION]]] else begin[{] None end[}] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Matrix4x3d] identifier[m11] operator[SEP] Keyword[double] identifier[m11] operator[SEP] { Keyword[this] operator[SEP] identifier[m11] operator[=] identifier[m11] operator[SEP] identifier[properties] operator[&=] operator[~] identifier[PROPERTY_ORTHONORMAL] operator[SEP] Keyword[if] operator[SEP] identifier[m11] operator[!=] literal[Float] operator[SEP] identifier[properties] operator[&=] operator[~] operator[SEP] identifier[PROPERTY_IDENTITY] operator[|] identifier[PROPERTY_TRANSLATION] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
@Override public void eUnset(int featureID) { switch (featureID) { case AfplibPackage.FNG__PAT_DATA: setPatData(PAT_DATA_EDEFAULT); return; } super.eUnset(featureID); }
class class_name[name] begin[{] method[eUnset, return_type[void], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=FNG__PAT_DATA, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=PAT_DATA_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setPatData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=None, label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eUnset, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[eUnset] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[FNG__PAT_DATA] operator[:] identifier[setPatData] operator[SEP] identifier[PAT_DATA_EDEFAULT] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[super] operator[SEP] identifier[eUnset] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
public static String getContentSpecChecksum(final String contentSpecString) { final Matcher matcher = CS_CHECKSUM_PATTERN.matcher(contentSpecString); if (matcher.find()) { return matcher.group("Checksum"); } return null; }
class class_name[name] begin[{] method[getContentSpecChecksum, return_type[type[String]], modifier[public static], parameter[contentSpecString]] begin[{] local_variable[type[Matcher], matcher] if[call[matcher.find, parameter[]]] begin[{] return[call[matcher.group, parameter[literal["Checksum"]]]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[getContentSpecChecksum] operator[SEP] Keyword[final] identifier[String] identifier[contentSpecString] operator[SEP] { Keyword[final] identifier[Matcher] identifier[matcher] operator[=] identifier[CS_CHECKSUM_PATTERN] operator[SEP] identifier[matcher] operator[SEP] identifier[contentSpecString] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[find] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[matcher] operator[SEP] identifier[group] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static VerificationCodePayload from(Map<String, String> queryStringParameters) { VerificationCodePayload payload = new VerificationCodePayload(); payload.setCode(queryStringParameters.get("code")); payload.setState(queryStringParameters.get("state")); payload.setError(queryStringParameters.get("error")); return payload; }
class class_name[name] begin[{] method[from, return_type[type[VerificationCodePayload]], modifier[public static], parameter[queryStringParameters]] begin[{] local_variable[type[VerificationCodePayload], payload] call[payload.setCode, parameter[call[queryStringParameters.get, parameter[literal["code"]]]]] call[payload.setState, parameter[call[queryStringParameters.get, parameter[literal["state"]]]]] call[payload.setError, parameter[call[queryStringParameters.get, parameter[literal["error"]]]]] return[member[.payload]] end[}] END[}]
Keyword[public] Keyword[static] identifier[VerificationCodePayload] identifier[from] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[queryStringParameters] operator[SEP] { identifier[VerificationCodePayload] identifier[payload] operator[=] Keyword[new] identifier[VerificationCodePayload] operator[SEP] operator[SEP] operator[SEP] identifier[payload] operator[SEP] identifier[setCode] operator[SEP] identifier[queryStringParameters] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[payload] operator[SEP] identifier[setState] operator[SEP] identifier[queryStringParameters] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[payload] operator[SEP] identifier[setError] operator[SEP] identifier[queryStringParameters] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[payload] operator[SEP] }
public static TieCell getOrAddTieCellInMap(final Cell poiCell, HashMap<String, TieCell> tieCells) { String skey = CellUtility.getSkeyFromPoiCell(poiCell); TieCell tieCell = tieCells.get(skey); if (tieCell == null) { tieCell = new TieCell(); tieCell.setSkey(skey); tieCells.put(skey, tieCell); } return tieCell; }
class class_name[name] begin[{] method[getOrAddTieCellInMap, return_type[type[TieCell]], modifier[public static], parameter[poiCell, tieCells]] begin[{] local_variable[type[String], skey] local_variable[type[TieCell], tieCell] if[binary_operation[member[.tieCell], ==, literal[null]]] begin[{] assign[member[.tieCell], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TieCell, sub_type=None))] call[tieCell.setSkey, parameter[member[.skey]]] call[tieCells.put, parameter[member[.skey], member[.tieCell]]] else begin[{] None end[}] return[member[.tieCell]] end[}] END[}]
Keyword[public] Keyword[static] identifier[TieCell] identifier[getOrAddTieCellInMap] operator[SEP] Keyword[final] identifier[Cell] identifier[poiCell] , identifier[HashMap] operator[<] identifier[String] , identifier[TieCell] operator[>] identifier[tieCells] operator[SEP] { identifier[String] identifier[skey] operator[=] identifier[CellUtility] operator[SEP] identifier[getSkeyFromPoiCell] operator[SEP] identifier[poiCell] operator[SEP] operator[SEP] identifier[TieCell] identifier[tieCell] operator[=] identifier[tieCells] operator[SEP] identifier[get] operator[SEP] identifier[skey] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tieCell] operator[==] Other[null] operator[SEP] { identifier[tieCell] operator[=] Keyword[new] identifier[TieCell] operator[SEP] operator[SEP] operator[SEP] identifier[tieCell] operator[SEP] identifier[setSkey] operator[SEP] identifier[skey] operator[SEP] operator[SEP] identifier[tieCells] operator[SEP] identifier[put] operator[SEP] identifier[skey] , identifier[tieCell] operator[SEP] operator[SEP] } Keyword[return] identifier[tieCell] operator[SEP] }
public void addItems(final List<SuggestTokenDto> suggestions, final VTextField textFieldWidget, final PopupPanel popupPanel, final TextFieldSuggestionBoxServerRpc suggestionServerRpc) { for (int index = 0; index < suggestions.size(); index++) { final SuggestTokenDto suggestToken = suggestions.get(index); final MenuItem mi = new MenuItem(suggestToken.getSuggestion(), true, new ScheduledCommand() { @Override public void execute() { final String tmpSuggestion = suggestToken.getSuggestion(); final TokenStartEnd tokenStartEnd = tokenMap.get(tmpSuggestion); final String text = textFieldWidget.getValue(); final StringBuilder builder = new StringBuilder(text); builder.replace(tokenStartEnd.getStart(), tokenStartEnd.getEnd() + 1, tmpSuggestion); textFieldWidget.setValue(builder.toString(), true); popupPanel.hide(); textFieldWidget.setFocus(true); suggestionServerRpc.suggest(builder.toString(), textFieldWidget.getCursorPos()); } }); tokenMap.put(suggestToken.getSuggestion(), new TokenStartEnd(suggestToken.getStart(), suggestToken.getEnd())); Roles.getListitemRole().set(mi.getElement()); WidgetUtil.sinkOnloadForImages(mi.getElement()); addItem(mi); } }
class class_name[name] begin[{] method[addItems, return_type[void], modifier[public], parameter[suggestions, textFieldWidget, popupPanel, suggestionServerRpc]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=suggestions, selectors=[], type_arguments=None), name=suggestToken)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=SuggestTokenDto, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getSuggestion, postfix_operators=[], prefix_operators=[], qualifier=suggestToken, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSuggestion, postfix_operators=[], prefix_operators=[], qualifier=suggestToken, selectors=[], type_arguments=None), name=tmpSuggestion)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=tmpSuggestion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=tokenMap, selectors=[], type_arguments=None), name=tokenStartEnd)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=TokenStartEnd, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=textFieldWidget, selectors=[], type_arguments=None), name=text)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=text, 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=StringBuilder, sub_type=None)), name=builder)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=StringBuilder, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=tokenStartEnd, selectors=[], type_arguments=None), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEnd, postfix_operators=[], prefix_operators=[], qualifier=tokenStartEnd, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), MemberReference(member=tmpSuggestion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=replace, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=textFieldWidget, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=hide, postfix_operators=[], prefix_operators=[], qualifier=popupPanel, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=setFocus, postfix_operators=[], prefix_operators=[], qualifier=textFieldWidget, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getCursorPos, postfix_operators=[], prefix_operators=[], qualifier=textFieldWidget, selectors=[], type_arguments=None)], member=suggest, postfix_operators=[], prefix_operators=[], qualifier=suggestionServerRpc, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=execute, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ScheduledCommand, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MenuItem, sub_type=None)), name=mi)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=MenuItem, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSuggestion, postfix_operators=[], prefix_operators=[], qualifier=suggestToken, selectors=[], type_arguments=None), ClassCreator(arguments=[MethodInvocation(arguments=[], member=getStart, postfix_operators=[], prefix_operators=[], qualifier=suggestToken, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getEnd, postfix_operators=[], prefix_operators=[], qualifier=suggestToken, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TokenStartEnd, sub_type=None))], member=put, postfix_operators=[], prefix_operators=[], qualifier=tokenMap, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=getListitemRole, postfix_operators=[], prefix_operators=[], qualifier=Roles, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getElement, postfix_operators=[], prefix_operators=[], qualifier=mi, selectors=[], type_arguments=None)], member=set, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getElement, postfix_operators=[], prefix_operators=[], qualifier=mi, selectors=[], type_arguments=None)], member=sinkOnloadForImages, postfix_operators=[], prefix_operators=[], qualifier=WidgetUtil, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=mi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addItem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=index, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=suggestions, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=index)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=index, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[addItems] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[SuggestTokenDto] operator[>] identifier[suggestions] , Keyword[final] identifier[VTextField] identifier[textFieldWidget] , Keyword[final] identifier[PopupPanel] identifier[popupPanel] , Keyword[final] identifier[TextFieldSuggestionBoxServerRpc] identifier[suggestionServerRpc] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[index] operator[=] Other[0] operator[SEP] identifier[index] operator[<] identifier[suggestions] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[index] operator[++] operator[SEP] { Keyword[final] identifier[SuggestTokenDto] identifier[suggestToken] operator[=] identifier[suggestions] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[final] identifier[MenuItem] identifier[mi] operator[=] Keyword[new] identifier[MenuItem] operator[SEP] identifier[suggestToken] operator[SEP] identifier[getSuggestion] operator[SEP] operator[SEP] , literal[boolean] , Keyword[new] identifier[ScheduledCommand] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[execute] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[tmpSuggestion] operator[=] identifier[suggestToken] operator[SEP] identifier[getSuggestion] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[TokenStartEnd] identifier[tokenStartEnd] operator[=] identifier[tokenMap] operator[SEP] identifier[get] operator[SEP] identifier[tmpSuggestion] operator[SEP] operator[SEP] Keyword[final] identifier[String] identifier[text] operator[=] identifier[textFieldWidget] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] Keyword[final] identifier[StringBuilder] identifier[builder] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[text] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[replace] operator[SEP] identifier[tokenStartEnd] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[tokenStartEnd] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[+] Other[1] , identifier[tmpSuggestion] operator[SEP] operator[SEP] identifier[textFieldWidget] operator[SEP] identifier[setValue] operator[SEP] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] identifier[popupPanel] operator[SEP] identifier[hide] operator[SEP] operator[SEP] operator[SEP] identifier[textFieldWidget] operator[SEP] identifier[setFocus] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[suggestionServerRpc] operator[SEP] identifier[suggest] operator[SEP] identifier[builder] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[textFieldWidget] operator[SEP] identifier[getCursorPos] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] identifier[tokenMap] operator[SEP] identifier[put] operator[SEP] identifier[suggestToken] operator[SEP] identifier[getSuggestion] operator[SEP] operator[SEP] , Keyword[new] identifier[TokenStartEnd] operator[SEP] identifier[suggestToken] operator[SEP] identifier[getStart] operator[SEP] operator[SEP] , identifier[suggestToken] operator[SEP] identifier[getEnd] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Roles] operator[SEP] identifier[getListitemRole] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[mi] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[WidgetUtil] operator[SEP] identifier[sinkOnloadForImages] operator[SEP] identifier[mi] operator[SEP] identifier[getElement] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addItem] operator[SEP] identifier[mi] operator[SEP] operator[SEP] } }
@Override public final Bitmap remove(String key) { if (key == null) { throw new NullPointerException("key == null"); } synchronized (this) { Bitmap previous = map.remove(key); if (previous != null) { size -= sizeOf(key, previous); } return previous; } }
class class_name[name] begin[{] method[remove, return_type[type[Bitmap]], modifier[final public], parameter[key]] begin[{] if[binary_operation[member[.key], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="key == null")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] SYNCHRONIZED[THIS[]] BEGIN[{] local_variable[type[Bitmap], previous] if[binary_operation[member[.previous], !=, literal[null]]] begin[{] assign[member[.size], call[.sizeOf, parameter[member[.key], member[.previous]]]] else begin[{] None end[}] return[member[.previous]] END[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[Bitmap] identifier[remove] operator[SEP] identifier[String] identifier[key] operator[SEP] { Keyword[if] operator[SEP] identifier[key] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { identifier[Bitmap] identifier[previous] operator[=] identifier[map] operator[SEP] identifier[remove] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[previous] operator[!=] Other[null] operator[SEP] { identifier[size] operator[-=] identifier[sizeOf] operator[SEP] identifier[key] , identifier[previous] operator[SEP] operator[SEP] } Keyword[return] identifier[previous] operator[SEP] } }
@Override public DeleteDirectConnectGatewayResult deleteDirectConnectGateway(DeleteDirectConnectGatewayRequest request) { request = beforeClientExecution(request); return executeDeleteDirectConnectGateway(request); }
class class_name[name] begin[{] method[deleteDirectConnectGateway, return_type[type[DeleteDirectConnectGatewayResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDeleteDirectConnectGateway, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DeleteDirectConnectGatewayResult] identifier[deleteDirectConnectGateway] operator[SEP] identifier[DeleteDirectConnectGatewayRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDeleteDirectConnectGateway] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
private int nextBoundaryAfter(int startIndex) { BreakIterator breakiterator = search_.breakIter(); if (breakiterator == null) { breakiterator = search_.internalBreakIter_; } if (breakiterator != null) { return breakiterator.following(startIndex); } return startIndex; }
class class_name[name] begin[{] method[nextBoundaryAfter, return_type[type[int]], modifier[private], parameter[startIndex]] begin[{] local_variable[type[BreakIterator], breakiterator] if[binary_operation[member[.breakiterator], ==, literal[null]]] begin[{] assign[member[.breakiterator], member[search_.internalBreakIter_]] else begin[{] None end[}] if[binary_operation[member[.breakiterator], !=, literal[null]]] begin[{] return[call[breakiterator.following, parameter[member[.startIndex]]]] else begin[{] None end[}] return[member[.startIndex]] end[}] END[}]
Keyword[private] Keyword[int] identifier[nextBoundaryAfter] operator[SEP] Keyword[int] identifier[startIndex] operator[SEP] { identifier[BreakIterator] identifier[breakiterator] operator[=] identifier[search_] operator[SEP] identifier[breakIter] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[breakiterator] operator[==] Other[null] operator[SEP] { identifier[breakiterator] operator[=] identifier[search_] operator[SEP] identifier[internalBreakIter_] operator[SEP] } Keyword[if] operator[SEP] identifier[breakiterator] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[breakiterator] operator[SEP] identifier[following] operator[SEP] identifier[startIndex] operator[SEP] operator[SEP] } Keyword[return] identifier[startIndex] operator[SEP] }
public static String encodeBase32(long i, int length) { char[] buf = new char[65]; int charPos = 64; boolean negative = (i < 0); if (!negative) i = -i; while (i <= -32) { buf[charPos--] = characters[(int) (-(i % 32))]; i /= 32; } buf[charPos] = characters[(int) (-i)]; String result = padLeftWithZerosToLength(new String(buf, charPos, (65 - charPos)), length); if (negative) return "-" + result; else return result; }
class class_name[name] begin[{] method[encodeBase32, return_type[type[String]], modifier[public static], parameter[i, length]] begin[{] local_variable[type[char], buf] local_variable[type[int], charPos] local_variable[type[boolean], negative] if[member[.negative]] begin[{] assign[member[.i], member[.i]] else begin[{] None end[}] while[binary_operation[member[.i], <=, literal[32]]] begin[{] assign[member[.buf], member[.characters]] assign[member[.i], literal[32]] end[}] assign[member[.buf], member[.characters]] local_variable[type[String], result] if[member[.negative]] begin[{] return[binary_operation[literal["-"], +, member[.result]]] else begin[{] return[member[.result]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[encodeBase32] operator[SEP] Keyword[long] identifier[i] , Keyword[int] identifier[length] operator[SEP] { Keyword[char] operator[SEP] operator[SEP] identifier[buf] operator[=] Keyword[new] Keyword[char] operator[SEP] Other[65] operator[SEP] operator[SEP] Keyword[int] identifier[charPos] operator[=] Other[64] operator[SEP] Keyword[boolean] identifier[negative] operator[=] operator[SEP] identifier[i] operator[<] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[negative] operator[SEP] identifier[i] operator[=] operator[-] identifier[i] operator[SEP] Keyword[while] operator[SEP] identifier[i] operator[<=] operator[-] Other[32] operator[SEP] { identifier[buf] operator[SEP] identifier[charPos] operator[--] operator[SEP] operator[=] identifier[characters] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[-] operator[SEP] identifier[i] operator[%] Other[32] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[/=] Other[32] operator[SEP] } identifier[buf] operator[SEP] identifier[charPos] operator[SEP] operator[=] identifier[characters] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] operator[-] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[result] operator[=] identifier[padLeftWithZerosToLength] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[buf] , identifier[charPos] , operator[SEP] Other[65] operator[-] identifier[charPos] operator[SEP] operator[SEP] , identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[negative] operator[SEP] Keyword[return] literal[String] operator[+] identifier[result] operator[SEP] Keyword[else] Keyword[return] identifier[result] operator[SEP] }
private static String extractFaultDetail(SoapFaultDetailElement detail) { StringResult detailResult = new StringResult(); try { TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); transformer.transform(detail.getSource(), detailResult); } catch (TransformerException e) { throw new CitrusRuntimeException(e); } return detailResult.toString(); }
class class_name[name] begin[{] method[extractFaultDetail, return_type[type[String]], modifier[private static], parameter[detail]] begin[{] local_variable[type[StringResult], detailResult] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=TransformerFactory, selectors=[], type_arguments=None), name=transformerFactory)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=TransformerFactory, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=newTransformer, postfix_operators=[], prefix_operators=[], qualifier=transformerFactory, selectors=[], type_arguments=None), name=transformer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Transformer, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=OMIT_XML_DECLARATION, postfix_operators=[], prefix_operators=[], qualifier=OutputKeys, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="yes")], member=setOutputProperty, postfix_operators=[], prefix_operators=[], qualifier=transformer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getSource, postfix_operators=[], prefix_operators=[], qualifier=detail, selectors=[], type_arguments=None), MemberReference(member=detailResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=transform, postfix_operators=[], prefix_operators=[], qualifier=transformer, selectors=[], 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=CitrusRuntimeException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['TransformerException']))], finally_block=None, label=None, resources=None) return[call[detailResult.toString, parameter[]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[extractFaultDetail] operator[SEP] identifier[SoapFaultDetailElement] identifier[detail] operator[SEP] { identifier[StringResult] identifier[detailResult] operator[=] Keyword[new] identifier[StringResult] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[TransformerFactory] identifier[transformerFactory] operator[=] identifier[TransformerFactory] operator[SEP] identifier[newInstance] operator[SEP] operator[SEP] operator[SEP] identifier[Transformer] identifier[transformer] operator[=] identifier[transformerFactory] operator[SEP] identifier[newTransformer] operator[SEP] operator[SEP] operator[SEP] identifier[transformer] operator[SEP] identifier[setOutputProperty] operator[SEP] identifier[OutputKeys] operator[SEP] identifier[OMIT_XML_DECLARATION] , literal[String] operator[SEP] operator[SEP] identifier[transformer] operator[SEP] identifier[transform] operator[SEP] identifier[detail] operator[SEP] identifier[getSource] operator[SEP] operator[SEP] , identifier[detailResult] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[TransformerException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CitrusRuntimeException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } Keyword[return] identifier[detailResult] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public CreateUserPoolRequest withUserPoolTags(java.util.Map<String, String> userPoolTags) { setUserPoolTags(userPoolTags); return this; }
class class_name[name] begin[{] method[withUserPoolTags, return_type[type[CreateUserPoolRequest]], modifier[public], parameter[userPoolTags]] begin[{] call[.setUserPoolTags, parameter[member[.userPoolTags]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[CreateUserPoolRequest] identifier[withUserPoolTags] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[userPoolTags] operator[SEP] { identifier[setUserPoolTags] operator[SEP] identifier[userPoolTags] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static CharacterGene of(final CharSeq validCharacters) { return new CharacterGene( validCharacters, RandomRegistry.getRandom().nextInt(validCharacters.length()) ); }
class class_name[name] begin[{] method[of, return_type[type[CharacterGene]], modifier[public static], parameter[validCharacters]] begin[{] return[ClassCreator(arguments=[MemberReference(member=validCharacters, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getRandom, postfix_operators=[], prefix_operators=[], qualifier=RandomRegistry, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=validCharacters, selectors=[], type_arguments=None)], member=nextInt, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CharacterGene, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[CharacterGene] identifier[of] operator[SEP] Keyword[final] identifier[CharSeq] identifier[validCharacters] operator[SEP] { Keyword[return] Keyword[new] identifier[CharacterGene] operator[SEP] identifier[validCharacters] , identifier[RandomRegistry] operator[SEP] identifier[getRandom] operator[SEP] operator[SEP] operator[SEP] identifier[nextInt] operator[SEP] identifier[validCharacters] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override public final ResultSet executeQuery(String sql) throws SQLException { Split s = prepare(sql); try { return new SimonResultSet(stmt.executeQuery(sql), this, prefix, s.getStopwatch().getName()); } finally { finish(s); } }
class class_name[name] begin[{] method[executeQuery, return_type[type[ResultSet]], modifier[final public], parameter[sql]] begin[{] local_variable[type[Split], s] TryStatement(block=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=sql, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=executeQuery, postfix_operators=[], prefix_operators=[], qualifier=stmt, selectors=[], type_arguments=None), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=prefix, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getStopwatch, postfix_operators=[], prefix_operators=[], qualifier=s, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SimonResultSet, sub_type=None)), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=s, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=finish, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] identifier[ResultSet] identifier[executeQuery] operator[SEP] identifier[String] identifier[sql] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[Split] identifier[s] operator[=] identifier[prepare] operator[SEP] identifier[sql] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] Keyword[new] identifier[SimonResultSet] operator[SEP] identifier[stmt] operator[SEP] identifier[executeQuery] operator[SEP] identifier[sql] operator[SEP] , Keyword[this] , identifier[prefix] , identifier[s] operator[SEP] identifier[getStopwatch] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { identifier[finish] operator[SEP] identifier[s] operator[SEP] operator[SEP] } }
public void setInterval(ReadableInstant start, ReadableInstant end) { if (start == null && end == null) { long now = DateTimeUtils.currentTimeMillis(); setInterval(now, now); } else { long startMillis = DateTimeUtils.getInstantMillis(start); long endMillis = DateTimeUtils.getInstantMillis(end); Chronology chrono = DateTimeUtils.getInstantChronology(start); super.setInterval(startMillis, endMillis, chrono); } }
class class_name[name] begin[{] method[setInterval, return_type[void], modifier[public], parameter[start, end]] begin[{] if[binary_operation[binary_operation[member[.start], ==, literal[null]], &&, binary_operation[member[.end], ==, literal[null]]]] begin[{] local_variable[type[long], now] call[.setInterval, parameter[member[.now], member[.now]]] else begin[{] local_variable[type[long], startMillis] local_variable[type[long], endMillis] local_variable[type[Chronology], chrono] SuperMethodInvocation(arguments=[MemberReference(member=startMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=endMillis, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=chrono, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setInterval, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setInterval] operator[SEP] identifier[ReadableInstant] identifier[start] , identifier[ReadableInstant] identifier[end] operator[SEP] { Keyword[if] operator[SEP] identifier[start] operator[==] Other[null] operator[&&] identifier[end] operator[==] Other[null] operator[SEP] { Keyword[long] identifier[now] operator[=] identifier[DateTimeUtils] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] identifier[setInterval] operator[SEP] identifier[now] , identifier[now] operator[SEP] operator[SEP] } Keyword[else] { Keyword[long] identifier[startMillis] operator[=] identifier[DateTimeUtils] operator[SEP] identifier[getInstantMillis] operator[SEP] identifier[start] operator[SEP] operator[SEP] Keyword[long] identifier[endMillis] operator[=] identifier[DateTimeUtils] operator[SEP] identifier[getInstantMillis] operator[SEP] identifier[end] operator[SEP] operator[SEP] identifier[Chronology] identifier[chrono] operator[=] identifier[DateTimeUtils] operator[SEP] identifier[getInstantChronology] operator[SEP] identifier[start] operator[SEP] operator[SEP] Keyword[super] operator[SEP] identifier[setInterval] operator[SEP] identifier[startMillis] , identifier[endMillis] , identifier[chrono] operator[SEP] operator[SEP] } }
@SuppressWarnings({ "unchecked", "rawtypes" }) public String marshal(Object jaxbObject, String namespaceURI, String localPart) { jaxbObject = new JAXBElement(new QName(namespaceURI, localPart), jaxbObject.getClass(), jaxbObject); return marshal(jaxbObject); }
class class_name[name] begin[{] method[marshal, return_type[type[String]], modifier[public], parameter[jaxbObject, namespaceURI, localPart]] begin[{] assign[member[.jaxbObject], ClassCreator(arguments=[ClassCreator(arguments=[MemberReference(member=namespaceURI, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=localPart, 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=QName, sub_type=None)), MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=jaxbObject, selectors=[], type_arguments=None), MemberReference(member=jaxbObject, 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=JAXBElement, sub_type=None))] return[call[.marshal, parameter[member[.jaxbObject]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[public] identifier[String] identifier[marshal] operator[SEP] identifier[Object] identifier[jaxbObject] , identifier[String] identifier[namespaceURI] , identifier[String] identifier[localPart] operator[SEP] { identifier[jaxbObject] operator[=] Keyword[new] identifier[JAXBElement] operator[SEP] Keyword[new] identifier[QName] operator[SEP] identifier[namespaceURI] , identifier[localPart] operator[SEP] , identifier[jaxbObject] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , identifier[jaxbObject] operator[SEP] operator[SEP] Keyword[return] identifier[marshal] operator[SEP] identifier[jaxbObject] operator[SEP] operator[SEP] }
public void process() throws ReadExcelException { MissingRecordAwareHSSFListener listener = new MissingRecordAwareHSSFListener(this); formatListener = new FormatTrackingHSSFListenerPlus(listener); HSSFEventFactory factory = new HSSFEventFactory(); HSSFRequest request = new HSSFRequest(); if (outputFormulaValues) { request.addListenerForAllRecords(formatListener); } else { workbookBuildingListener = new EventWorkbookBuilder.SheetRecordCollectingListener(formatListener); request.addListenerForAllRecords(workbookBuildingListener); } try { factory.processWorkbookEvents(request, fs); } catch (IOException e) { throw new ReadExcelException(e.getMessage()); } //解析完后,判断用户是否设置了limit,若设置了执行以下操作 if (this.limit > 0) { if (!this.datas.isEmpty()) { if (this.callback != null) { //若数据不为空且回调函数被设置,则调用回调函数 this.callback.callback(this.currentRowInSheet, this.currentSheetInExcel, this.realRowInSheet, this.realRowInExcel, this.allSheetInExcel, this.titles, this.columns, this.datas); } this.datas.clear(); } } }
class class_name[name] begin[{] method[process, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[MissingRecordAwareHSSFListener], listener] assign[member[.formatListener], ClassCreator(arguments=[MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FormatTrackingHSSFListenerPlus, sub_type=None))] local_variable[type[HSSFEventFactory], factory] local_variable[type[HSSFRequest], request] if[member[.outputFormulaValues]] begin[{] call[request.addListenerForAllRecords, parameter[member[.formatListener]]] else begin[{] assign[member[.workbookBuildingListener], ClassCreator(arguments=[MemberReference(member=formatListener, 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=EventWorkbookBuilder, sub_type=ReferenceType(arguments=None, dimensions=None, name=SheetRecordCollectingListener, sub_type=None)))] call[request.addListenerForAllRecords, parameter[member[.workbookBuildingListener]]] end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=request, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=fs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=processWorkbookEvents, postfix_operators=[], prefix_operators=[], qualifier=factory, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ReadExcelException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) if[binary_operation[THIS[member[None.limit]], >, literal[0]]] begin[{] if[THIS[member[None.datas]call[None.isEmpty, parameter[]]]] begin[{] if[binary_operation[THIS[member[None.callback]], !=, literal[null]]] begin[{] THIS[member[None.callback]call[None.callback, parameter[THIS[member[None.currentRowInSheet]], THIS[member[None.currentSheetInExcel]], THIS[member[None.realRowInSheet]], THIS[member[None.realRowInExcel]], THIS[member[None.allSheetInExcel]], THIS[member[None.titles]], THIS[member[None.columns]], THIS[member[None.datas]]]]] else begin[{] None end[}] THIS[member[None.datas]call[None.clear, parameter[]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[process] operator[SEP] operator[SEP] Keyword[throws] identifier[ReadExcelException] { identifier[MissingRecordAwareHSSFListener] identifier[listener] operator[=] Keyword[new] identifier[MissingRecordAwareHSSFListener] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[formatListener] operator[=] Keyword[new] identifier[FormatTrackingHSSFListenerPlus] operator[SEP] identifier[listener] operator[SEP] operator[SEP] identifier[HSSFEventFactory] identifier[factory] operator[=] Keyword[new] identifier[HSSFEventFactory] operator[SEP] operator[SEP] operator[SEP] identifier[HSSFRequest] identifier[request] operator[=] Keyword[new] identifier[HSSFRequest] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[outputFormulaValues] operator[SEP] { identifier[request] operator[SEP] identifier[addListenerForAllRecords] operator[SEP] identifier[formatListener] operator[SEP] operator[SEP] } Keyword[else] { identifier[workbookBuildingListener] operator[=] Keyword[new] identifier[EventWorkbookBuilder] operator[SEP] identifier[SheetRecordCollectingListener] operator[SEP] identifier[formatListener] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[addListenerForAllRecords] operator[SEP] identifier[workbookBuildingListener] operator[SEP] operator[SEP] } Keyword[try] { identifier[factory] operator[SEP] identifier[processWorkbookEvents] operator[SEP] identifier[request] , identifier[fs] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ReadExcelException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[limit] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] operator[!] Keyword[this] operator[SEP] identifier[datas] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[callback] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[callback] operator[SEP] identifier[callback] operator[SEP] Keyword[this] operator[SEP] identifier[currentRowInSheet] , Keyword[this] operator[SEP] identifier[currentSheetInExcel] , Keyword[this] operator[SEP] identifier[realRowInSheet] , Keyword[this] operator[SEP] identifier[realRowInExcel] , Keyword[this] operator[SEP] identifier[allSheetInExcel] , Keyword[this] operator[SEP] identifier[titles] , Keyword[this] operator[SEP] identifier[columns] , Keyword[this] operator[SEP] identifier[datas] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[datas] operator[SEP] identifier[clear] operator[SEP] operator[SEP] operator[SEP] } } }