code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) { if ((strCommand.equalsIgnoreCase(MenuConstants.FORM)) || (strCommand.equalsIgnoreCase(MenuConstants.FORMLINK))) { String strHandle = null; if (strCommand.equalsIgnoreCase(MenuConstants.FORMLINK)) { try { Record record = this.getMainRecord(); if ((record.getEditMode() == DBConstants.EDIT_CURRENT) || (record.getEditMode() == DBConstants.EDIT_IN_PROGRESS)) strHandle = record.getHandle(DBConstants.OBJECT_ID_HANDLE).toString(); } catch (DBException ex) { strHandle = null; // Ignore error - just go to form } } strCommand = Utility.addURLParam(null, DBParams.SCREEN, AccessScreen.class.getName()); // Screen class strCommand = Utility.addURLParam(strCommand, DBParams.RECORD, this.getProperty(DBParams.RECORD)); strCommand = Utility.addURLParam(strCommand, "package", this.getProperty("package")); if (strHandle != null) strCommand = Utility.addURLParam(strCommand, DBConstants.STRING_OBJECT_ID_HANDLE, strHandle); } return super.doCommand(strCommand, sourceSField, iCommandOptions); // This will send the command to my parent }
class class_name[name] begin[{] method[doCommand, return_type[type[boolean]], modifier[public], parameter[strCommand, sourceSField, iCommandOptions]] begin[{] if[binary_operation[call[strCommand.equalsIgnoreCase, parameter[member[MenuConstants.FORM]]], ||, call[strCommand.equalsIgnoreCase, parameter[member[MenuConstants.FORMLINK]]]]] begin[{] local_variable[type[String], strHandle] if[call[strCommand.equalsIgnoreCase, parameter[member[MenuConstants.FORMLINK]]]] begin[{] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=getMainRecord, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), name=record)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Record, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEditMode, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), operandr=MemberReference(member=EDIT_CURRENT, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[]), operator===), operandr=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getEditMode, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[], type_arguments=None), operandr=MemberReference(member=EDIT_IN_PROGRESS, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[]), operator===), operator=||), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=strHandle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=OBJECT_ID_HANDLE, postfix_operators=[], prefix_operators=[], qualifier=DBConstants, selectors=[])], member=getHandle, postfix_operators=[], prefix_operators=[], qualifier=record, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)), label=None))], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=strHandle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['DBException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] assign[member[.strCommand], call[Utility.addURLParam, parameter[literal[null], member[DBParams.SCREEN], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=AccessScreen, sub_type=None))]]] assign[member[.strCommand], call[Utility.addURLParam, parameter[member[.strCommand], member[DBParams.RECORD], THIS[call[None.getProperty, parameter[member[DBParams.RECORD]]]]]]] assign[member[.strCommand], call[Utility.addURLParam, parameter[member[.strCommand], literal["package"], THIS[call[None.getProperty, parameter[literal["package"]]]]]]] if[binary_operation[member[.strHandle], !=, literal[null]]] begin[{] assign[member[.strCommand], call[Utility.addURLParam, parameter[member[.strCommand], member[DBConstants.STRING_OBJECT_ID_HANDLE], member[.strHandle]]]] else begin[{] None end[}] else begin[{] None end[}] return[SuperMethodInvocation(arguments=[MemberReference(member=strCommand, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sourceSField, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=iCommandOptions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=doCommand, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[doCommand] operator[SEP] identifier[String] identifier[strCommand] , identifier[ScreenField] identifier[sourceSField] , Keyword[int] identifier[iCommandOptions] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[strCommand] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[MenuConstants] operator[SEP] identifier[FORM] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[strCommand] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[MenuConstants] operator[SEP] identifier[FORMLINK] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[strHandle] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[strCommand] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[MenuConstants] operator[SEP] identifier[FORMLINK] operator[SEP] operator[SEP] { Keyword[try] { identifier[Record] identifier[record] operator[=] Keyword[this] operator[SEP] identifier[getMainRecord] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[record] operator[SEP] identifier[getEditMode] operator[SEP] operator[SEP] operator[==] identifier[DBConstants] operator[SEP] identifier[EDIT_CURRENT] operator[SEP] operator[||] operator[SEP] identifier[record] operator[SEP] identifier[getEditMode] operator[SEP] operator[SEP] operator[==] identifier[DBConstants] operator[SEP] identifier[EDIT_IN_PROGRESS] operator[SEP] operator[SEP] identifier[strHandle] operator[=] identifier[record] operator[SEP] identifier[getHandle] operator[SEP] identifier[DBConstants] operator[SEP] identifier[OBJECT_ID_HANDLE] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[DBException] identifier[ex] operator[SEP] { identifier[strHandle] operator[=] Other[null] operator[SEP] } } identifier[strCommand] operator[=] identifier[Utility] operator[SEP] identifier[addURLParam] operator[SEP] Other[null] , identifier[DBParams] operator[SEP] identifier[SCREEN] , identifier[AccessScreen] operator[SEP] Keyword[class] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[strCommand] operator[=] identifier[Utility] operator[SEP] identifier[addURLParam] operator[SEP] identifier[strCommand] , identifier[DBParams] operator[SEP] identifier[RECORD] , Keyword[this] operator[SEP] identifier[getProperty] operator[SEP] identifier[DBParams] operator[SEP] identifier[RECORD] operator[SEP] operator[SEP] operator[SEP] identifier[strCommand] operator[=] identifier[Utility] operator[SEP] identifier[addURLParam] operator[SEP] identifier[strCommand] , literal[String] , Keyword[this] operator[SEP] identifier[getProperty] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[strHandle] operator[!=] Other[null] operator[SEP] identifier[strCommand] operator[=] identifier[Utility] operator[SEP] identifier[addURLParam] operator[SEP] identifier[strCommand] , identifier[DBConstants] operator[SEP] identifier[STRING_OBJECT_ID_HANDLE] , identifier[strHandle] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[doCommand] operator[SEP] identifier[strCommand] , identifier[sourceSField] , identifier[iCommandOptions] operator[SEP] operator[SEP] }
public <T> void putComputationalData(Class<T> key, T value) { this.computationalData.put(key, value); }
class class_name[name] begin[{] method[putComputationalData, return_type[void], modifier[public], parameter[key, value]] begin[{] THIS[member[None.computationalData]call[None.put, parameter[member[.key], member[.value]]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] Keyword[void] identifier[putComputationalData] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[key] , identifier[T] identifier[value] operator[SEP] { Keyword[this] operator[SEP] identifier[computationalData] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] }
public void deregisterTransaction(TransactionImpl tran, boolean recovered) { if (tc.isEntryEnabled()) Tr.entry(tc, "deregisterTransaction", new Object[] { this, tran, recovered }); //AJQ - use concurrent set on large SMP if (isConcurrent) _transactions.remove(tran); //AJQ - new gate for synchronized block if (!isConcurrent || recovered) { synchronized (this) { //AJQ - only if using standard hashset if (!isConcurrent) _transactions.remove(tran); if (recovered) { _recoveryManager.deregisterTransaction(tran); } } } if (tc.isEntryEnabled()) Tr.exit(tc, "deregisterTransaction"); }
class class_name[name] begin[{] method[deregisterTransaction, return_type[void], modifier[public], parameter[tran, recovered]] begin[{] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.entry, parameter[member[.tc], literal["deregisterTransaction"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tran, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=recovered, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] if[member[.isConcurrent]] begin[{] call[_transactions.remove, parameter[member[.tran]]] else begin[{] None end[}] if[binary_operation[member[.isConcurrent], ||, member[.recovered]]] begin[{] SYNCHRONIZED[THIS[]] BEGIN[{] if[member[.isConcurrent]] begin[{] call[_transactions.remove, parameter[member[.tran]]] else begin[{] None end[}] if[member[.recovered]] begin[{] call[_recoveryManager.deregisterTransaction, parameter[member[.tran]]] else begin[{] None end[}] END[}] else begin[{] None end[}] if[call[tc.isEntryEnabled, parameter[]]] begin[{] call[Tr.exit, parameter[member[.tc], literal["deregisterTransaction"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[deregisterTransaction] operator[SEP] identifier[TransactionImpl] identifier[tran] , Keyword[boolean] identifier[recovered] operator[SEP] { Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { Keyword[this] , identifier[tran] , identifier[recovered] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[isConcurrent] operator[SEP] identifier[_transactions] operator[SEP] identifier[remove] operator[SEP] identifier[tran] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isConcurrent] operator[||] identifier[recovered] operator[SEP] { Keyword[synchronized] operator[SEP] Keyword[this] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isConcurrent] operator[SEP] identifier[_transactions] operator[SEP] identifier[remove] operator[SEP] identifier[tran] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[recovered] operator[SEP] { identifier[_recoveryManager] operator[SEP] identifier[deregisterTransaction] operator[SEP] identifier[tran] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[Tr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public int kPercentileLatency(double percentile) { if (m_latencyHistogram.getTotalCount() == 0) return 0; percentile = Math.max(0.0D, percentile); //Convert from micros to millis for return value, round to nearest integer return (int) (Math.round(m_latencyHistogram.getValueAtPercentile(percentile * 100.0D)) / 1000.0); }
class class_name[name] begin[{] method[kPercentileLatency, return_type[type[int]], modifier[public], parameter[percentile]] begin[{] if[binary_operation[call[m_latencyHistogram.getTotalCount, parameter[]], ==, literal[0]]] begin[{] return[literal[0]] else begin[{] None end[}] assign[member[.percentile], call[Math.max, parameter[literal[0.0D], member[.percentile]]]] return[Cast(expression=BinaryOperation(operandl=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=percentile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=100.0D), operator=*)], member=getValueAtPercentile, postfix_operators=[], prefix_operators=[], qualifier=m_latencyHistogram, selectors=[], type_arguments=None)], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1000.0), operator=/), type=BasicType(dimensions=[], name=int))] end[}] END[}]
Keyword[public] Keyword[int] identifier[kPercentileLatency] operator[SEP] Keyword[double] identifier[percentile] operator[SEP] { Keyword[if] operator[SEP] identifier[m_latencyHistogram] operator[SEP] identifier[getTotalCount] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[return] Other[0] operator[SEP] identifier[percentile] operator[=] identifier[Math] operator[SEP] identifier[max] operator[SEP] literal[Float] , identifier[percentile] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[m_latencyHistogram] operator[SEP] identifier[getValueAtPercentile] operator[SEP] identifier[percentile] operator[*] literal[Float] operator[SEP] operator[SEP] operator[/] literal[Float] operator[SEP] operator[SEP] }
public org.tensorflow.framework.Summary.ValueOrBuilder getValueOrBuilder( int index) { return value_.get(index); }
class class_name[name] begin[{] method[getValueOrBuilder, return_type[type[org]], modifier[public], parameter[index]] begin[{] return[call[value_.get, parameter[member[.index]]]] end[}] END[}]
Keyword[public] identifier[org] operator[SEP] identifier[tensorflow] operator[SEP] identifier[framework] operator[SEP] identifier[Summary] operator[SEP] identifier[ValueOrBuilder] identifier[getValueOrBuilder] operator[SEP] Keyword[int] identifier[index] operator[SEP] { Keyword[return] identifier[value_] operator[SEP] identifier[get] operator[SEP] identifier[index] operator[SEP] operator[SEP] }
public static Delay constant(Duration delay) { LettuceAssert.notNull(delay, "Delay must not be null"); LettuceAssert.isTrue(delay.toNanos() >= 0, "Delay must be greater or equal to 0"); return new ConstantDelay(delay); }
class class_name[name] begin[{] method[constant, return_type[type[Delay]], modifier[public static], parameter[delay]] begin[{] call[LettuceAssert.notNull, parameter[member[.delay], literal["Delay must not be null"]]] call[LettuceAssert.isTrue, parameter[binary_operation[call[delay.toNanos, parameter[]], >=, literal[0]], literal["Delay must be greater or equal to 0"]]] return[ClassCreator(arguments=[MemberReference(member=delay, 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=ConstantDelay, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[Delay] identifier[constant] operator[SEP] identifier[Duration] identifier[delay] operator[SEP] { identifier[LettuceAssert] operator[SEP] identifier[notNull] operator[SEP] identifier[delay] , literal[String] operator[SEP] operator[SEP] identifier[LettuceAssert] operator[SEP] identifier[isTrue] operator[SEP] identifier[delay] operator[SEP] identifier[toNanos] operator[SEP] operator[SEP] operator[>=] Other[0] , literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[ConstantDelay] operator[SEP] identifier[delay] operator[SEP] operator[SEP] }
public java.util.List<java.nio.ByteBuffer> getBinaryListValues() { if (binaryListValues == null) { binaryListValues = new com.amazonaws.internal.SdkInternalList<java.nio.ByteBuffer>(); } return binaryListValues; }
class class_name[name] begin[{] method[getBinaryListValues, return_type[type[java]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.binaryListValues], ==, literal[null]]] begin[{] assign[member[.binaryListValues], 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=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=nio, sub_type=ReferenceType(arguments=None, dimensions=None, name=ByteBuffer, sub_type=None))))], dimensions=None, name=SdkInternalList, sub_type=None)))))] else begin[{] None end[}] return[member[.binaryListValues]] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[List] operator[<] identifier[java] operator[SEP] identifier[nio] operator[SEP] identifier[ByteBuffer] operator[>] identifier[getBinaryListValues] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[binaryListValues] operator[==] Other[null] operator[SEP] { identifier[binaryListValues] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[java] operator[SEP] identifier[nio] operator[SEP] identifier[ByteBuffer] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[binaryListValues] operator[SEP] }
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); int viewWidth = circleRadius + this.getPaddingLeft() + this.getPaddingRight(); int viewHeight = circleRadius + this.getPaddingTop() + this.getPaddingBottom(); int widthMode = MeasureSpec.getMode(widthMeasureSpec); int widthSize = MeasureSpec.getSize(widthMeasureSpec); int heightMode = MeasureSpec.getMode(heightMeasureSpec); int heightSize = MeasureSpec.getSize(heightMeasureSpec); int width; int height; //Measure Width if (widthMode == MeasureSpec.EXACTLY) { //Must be this size width = widthSize; } else if (widthMode == MeasureSpec.AT_MOST) { //Can't be bigger than... width = Math.min(viewWidth, widthSize); } else { //Be whatever you want width = viewWidth; } //Measure Height if (heightMode == MeasureSpec.EXACTLY || widthMode == MeasureSpec.EXACTLY) { //Must be this size height = heightSize; } else if (heightMode == MeasureSpec.AT_MOST) { //Can't be bigger than... height = Math.min(viewHeight, heightSize); } else { //Be whatever you want height = viewHeight; } setMeasuredDimension(width, height); }
class class_name[name] begin[{] method[onMeasure, return_type[void], modifier[protected], parameter[widthMeasureSpec, heightMeasureSpec]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=widthMeasureSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=heightMeasureSpec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onMeasure, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) local_variable[type[int], viewWidth] local_variable[type[int], viewHeight] local_variable[type[int], widthMode] local_variable[type[int], widthSize] local_variable[type[int], heightMode] local_variable[type[int], heightSize] local_variable[type[int], width] local_variable[type[int], height] if[binary_operation[member[.widthMode], ==, member[MeasureSpec.EXACTLY]]] begin[{] assign[member[.width], member[.widthSize]] else begin[{] if[binary_operation[member[.widthMode], ==, member[MeasureSpec.AT_MOST]]] begin[{] assign[member[.width], call[Math.min, parameter[member[.viewWidth], member[.widthSize]]]] else begin[{] assign[member[.width], member[.viewWidth]] end[}] end[}] if[binary_operation[binary_operation[member[.heightMode], ==, member[MeasureSpec.EXACTLY]], ||, binary_operation[member[.widthMode], ==, member[MeasureSpec.EXACTLY]]]] begin[{] assign[member[.height], member[.heightSize]] else begin[{] if[binary_operation[member[.heightMode], ==, member[MeasureSpec.AT_MOST]]] begin[{] assign[member[.height], call[Math.min, parameter[member[.viewHeight], member[.heightSize]]]] else begin[{] assign[member[.height], member[.viewHeight]] end[}] end[}] call[.setMeasuredDimension, parameter[member[.width], member[.height]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[onMeasure] operator[SEP] Keyword[int] identifier[widthMeasureSpec] , Keyword[int] identifier[heightMeasureSpec] operator[SEP] { Keyword[super] operator[SEP] identifier[onMeasure] operator[SEP] identifier[widthMeasureSpec] , identifier[heightMeasureSpec] operator[SEP] operator[SEP] Keyword[int] identifier[viewWidth] operator[=] identifier[circleRadius] operator[+] Keyword[this] operator[SEP] identifier[getPaddingLeft] operator[SEP] operator[SEP] operator[+] Keyword[this] operator[SEP] identifier[getPaddingRight] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[viewHeight] operator[=] identifier[circleRadius] operator[+] Keyword[this] operator[SEP] identifier[getPaddingTop] operator[SEP] operator[SEP] operator[+] Keyword[this] operator[SEP] identifier[getPaddingBottom] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[widthMode] operator[=] identifier[MeasureSpec] operator[SEP] identifier[getMode] operator[SEP] identifier[widthMeasureSpec] operator[SEP] operator[SEP] Keyword[int] identifier[widthSize] operator[=] identifier[MeasureSpec] operator[SEP] identifier[getSize] operator[SEP] identifier[widthMeasureSpec] operator[SEP] operator[SEP] Keyword[int] identifier[heightMode] operator[=] identifier[MeasureSpec] operator[SEP] identifier[getMode] operator[SEP] identifier[heightMeasureSpec] operator[SEP] operator[SEP] Keyword[int] identifier[heightSize] operator[=] identifier[MeasureSpec] operator[SEP] identifier[getSize] operator[SEP] identifier[heightMeasureSpec] operator[SEP] operator[SEP] Keyword[int] identifier[width] operator[SEP] Keyword[int] identifier[height] operator[SEP] Keyword[if] operator[SEP] identifier[widthMode] operator[==] identifier[MeasureSpec] operator[SEP] identifier[EXACTLY] operator[SEP] { identifier[width] operator[=] identifier[widthSize] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[widthMode] operator[==] identifier[MeasureSpec] operator[SEP] identifier[AT_MOST] operator[SEP] { identifier[width] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[viewWidth] , identifier[widthSize] operator[SEP] operator[SEP] } Keyword[else] { identifier[width] operator[=] identifier[viewWidth] operator[SEP] } Keyword[if] operator[SEP] identifier[heightMode] operator[==] identifier[MeasureSpec] operator[SEP] identifier[EXACTLY] operator[||] identifier[widthMode] operator[==] identifier[MeasureSpec] operator[SEP] identifier[EXACTLY] operator[SEP] { identifier[height] operator[=] identifier[heightSize] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[heightMode] operator[==] identifier[MeasureSpec] operator[SEP] identifier[AT_MOST] operator[SEP] { identifier[height] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[viewHeight] , identifier[heightSize] operator[SEP] operator[SEP] } Keyword[else] { identifier[height] operator[=] identifier[viewHeight] operator[SEP] } identifier[setMeasuredDimension] operator[SEP] identifier[width] , identifier[height] operator[SEP] operator[SEP] }
public com.google.api.ads.admanager.axis.v201902.RoadblockingType getBuiltInRoadblockingType() { return builtInRoadblockingType; }
class class_name[name] begin[{] method[getBuiltInRoadblockingType, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.builtInRoadblockingType]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201902] operator[SEP] identifier[RoadblockingType] identifier[getBuiltInRoadblockingType] operator[SEP] operator[SEP] { Keyword[return] identifier[builtInRoadblockingType] operator[SEP] }
public void addBroadcastSetForScatterFunction(String name, DataSet<?> data) { this.bcVarsScatter.add(new Tuple2<>(name, data)); }
class class_name[name] begin[{] method[addBroadcastSetForScatterFunction, return_type[void], modifier[public], parameter[name, data]] begin[{] THIS[member[None.bcVarsScatter]call[None.add, parameter[ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Tuple2, sub_type=None))]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addBroadcastSetForScatterFunction] operator[SEP] identifier[String] identifier[name] , identifier[DataSet] operator[<] operator[?] operator[>] identifier[data] operator[SEP] { Keyword[this] operator[SEP] identifier[bcVarsScatter] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[Tuple2] operator[<] operator[>] operator[SEP] identifier[name] , identifier[data] operator[SEP] operator[SEP] operator[SEP] }
public <T> T get(String name, Class<T> type){ Object o = context.get(name); return o == null? null : (T) o; }
class class_name[name] begin[{] method[get, return_type[type[T]], modifier[public], parameter[name, type]] begin[{] local_variable[type[Object], o] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=Cast(expression=MemberReference(member=o, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None)), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[get] operator[SEP] identifier[String] identifier[name] , identifier[Class] operator[<] identifier[T] operator[>] identifier[type] operator[SEP] { identifier[Object] identifier[o] operator[=] identifier[context] operator[SEP] identifier[get] operator[SEP] identifier[name] operator[SEP] operator[SEP] Keyword[return] identifier[o] operator[==] Other[null] operator[?] Other[null] operator[:] operator[SEP] identifier[T] operator[SEP] identifier[o] operator[SEP] }
public CuratorFramework newManagedCurator(LifecycleEnvironment env) { CuratorFramework curator = newCurator(); env.manage(new ManagedCuratorFramework(curator)); return curator; }
class class_name[name] begin[{] method[newManagedCurator, return_type[type[CuratorFramework]], modifier[public], parameter[env]] begin[{] local_variable[type[CuratorFramework], curator] call[env.manage, parameter[ClassCreator(arguments=[MemberReference(member=curator, 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=ManagedCuratorFramework, sub_type=None))]] return[member[.curator]] end[}] END[}]
Keyword[public] identifier[CuratorFramework] identifier[newManagedCurator] operator[SEP] identifier[LifecycleEnvironment] identifier[env] operator[SEP] { identifier[CuratorFramework] identifier[curator] operator[=] identifier[newCurator] operator[SEP] operator[SEP] operator[SEP] identifier[env] operator[SEP] identifier[manage] operator[SEP] Keyword[new] identifier[ManagedCuratorFramework] operator[SEP] identifier[curator] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[curator] operator[SEP] }
public <C extends PreClassLoaderInitiator> void removePreInitiator(Class<C> clazz) { this.preInitiators.remove(clazz.getName()); }
class class_name[name] begin[{] method[removePreInitiator, return_type[void], modifier[public], parameter[clazz]] begin[{] THIS[member[None.preInitiators]call[None.remove, parameter[call[clazz.getName, parameter[]]]]] end[}] END[}]
Keyword[public] operator[<] identifier[C] Keyword[extends] identifier[PreClassLoaderInitiator] operator[>] Keyword[void] identifier[removePreInitiator] operator[SEP] identifier[Class] operator[<] identifier[C] operator[>] identifier[clazz] operator[SEP] { Keyword[this] operator[SEP] identifier[preInitiators] operator[SEP] identifier[remove] operator[SEP] identifier[clazz] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
protected void addTagsInfo(Element e, Content htmltree) { if (configuration.nocomment) { return; } Content dl = new HtmlTree(HtmlTag.DL); if (utils.isExecutableElement(e) && !utils.isConstructor(e)) { addMethodInfo((ExecutableElement)e, dl); } Content output = new ContentBuilder(); TagletWriter.genTagOutput(configuration.tagletManager, e, configuration.tagletManager.getCustomTaglets(e), getTagletWriterInstance(false), output); dl.addContent(output); htmltree.addContent(dl); }
class class_name[name] begin[{] method[addTagsInfo, return_type[void], modifier[protected], parameter[e, htmltree]] begin[{] if[member[configuration.nocomment]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Content], dl] if[binary_operation[call[utils.isExecutableElement, parameter[member[.e]]], &&, call[utils.isConstructor, parameter[member[.e]]]]] begin[{] call[.addMethodInfo, parameter[Cast(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=ExecutableElement, sub_type=None)), member[.dl]]] else begin[{] None end[}] local_variable[type[Content], output] call[TagletWriter.genTagOutput, parameter[member[configuration.tagletManager], member[.e], call[configuration.tagletManager.getCustomTaglets, parameter[member[.e]]], call[.getTagletWriterInstance, parameter[literal[false]]], member[.output]]] call[dl.addContent, parameter[member[.output]]] call[htmltree.addContent, parameter[member[.dl]]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[addTagsInfo] operator[SEP] identifier[Element] identifier[e] , identifier[Content] identifier[htmltree] operator[SEP] { Keyword[if] operator[SEP] identifier[configuration] operator[SEP] identifier[nocomment] operator[SEP] { Keyword[return] operator[SEP] } identifier[Content] identifier[dl] operator[=] Keyword[new] identifier[HtmlTree] operator[SEP] identifier[HtmlTag] operator[SEP] identifier[DL] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[utils] operator[SEP] identifier[isExecutableElement] operator[SEP] identifier[e] operator[SEP] operator[&&] operator[!] identifier[utils] operator[SEP] identifier[isConstructor] operator[SEP] identifier[e] operator[SEP] operator[SEP] { identifier[addMethodInfo] operator[SEP] operator[SEP] identifier[ExecutableElement] operator[SEP] identifier[e] , identifier[dl] operator[SEP] operator[SEP] } identifier[Content] identifier[output] operator[=] Keyword[new] identifier[ContentBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[TagletWriter] operator[SEP] identifier[genTagOutput] operator[SEP] identifier[configuration] operator[SEP] identifier[tagletManager] , identifier[e] , identifier[configuration] operator[SEP] identifier[tagletManager] operator[SEP] identifier[getCustomTaglets] operator[SEP] identifier[e] operator[SEP] , identifier[getTagletWriterInstance] operator[SEP] literal[boolean] operator[SEP] , identifier[output] operator[SEP] operator[SEP] identifier[dl] operator[SEP] identifier[addContent] operator[SEP] identifier[output] operator[SEP] operator[SEP] identifier[htmltree] operator[SEP] identifier[addContent] operator[SEP] identifier[dl] operator[SEP] operator[SEP] }
public java.lang.String getContainer() { java.lang.Object ref = container_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); container_ = s; return s; } }
class class_name[name] begin[{] method[getContainer, return_type[type[java]], modifier[public], parameter[]] begin[{] local_variable[type[java], ref] if[binary_operation[member[.ref], instanceof, type[java]]] begin[{] return[Cast(expression=MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=lang, sub_type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))))] else begin[{] local_variable[type[com], bs] local_variable[type[java], s] assign[member[.container_], member[.s]] return[member[.s]] end[}] end[}] END[}]
Keyword[public] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[getContainer] operator[SEP] operator[SEP] { identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[Object] identifier[ref] operator[=] identifier[container_] operator[SEP] Keyword[if] operator[SEP] identifier[ref] Keyword[instanceof] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] { Keyword[return] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] operator[SEP] identifier[ref] operator[SEP] } Keyword[else] { identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] identifier[bs] operator[=] operator[SEP] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[protobuf] operator[SEP] identifier[ByteString] operator[SEP] identifier[ref] operator[SEP] identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[s] operator[=] identifier[bs] operator[SEP] identifier[toStringUtf8] operator[SEP] operator[SEP] operator[SEP] identifier[container_] operator[=] identifier[s] operator[SEP] Keyword[return] identifier[s] operator[SEP] } }
public void setResourceTypes(List<String> resourceTypes) { if ((resourceTypes != null) && !resourceTypes.isEmpty()) { addFilterQuery(CmsSearchField.FIELD_TYPE, resourceTypes, false, false); } }
class class_name[name] begin[{] method[setResourceTypes, return_type[void], modifier[public], parameter[resourceTypes]] begin[{] if[binary_operation[binary_operation[member[.resourceTypes], !=, literal[null]], &&, call[resourceTypes.isEmpty, parameter[]]]] begin[{] call[.addFilterQuery, parameter[member[CmsSearchField.FIELD_TYPE], member[.resourceTypes], literal[false], literal[false]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setResourceTypes] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[resourceTypes] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[resourceTypes] operator[!=] Other[null] operator[SEP] operator[&&] operator[!] identifier[resourceTypes] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[addFilterQuery] operator[SEP] identifier[CmsSearchField] operator[SEP] identifier[FIELD_TYPE] , identifier[resourceTypes] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] } }
public void marshall(ListLicenseSpecificationsForResourceRequest listLicenseSpecificationsForResourceRequest, ProtocolMarshaller protocolMarshaller) { if (listLicenseSpecificationsForResourceRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(listLicenseSpecificationsForResourceRequest.getResourceArn(), RESOURCEARN_BINDING); protocolMarshaller.marshall(listLicenseSpecificationsForResourceRequest.getMaxResults(), MAXRESULTS_BINDING); protocolMarshaller.marshall(listLicenseSpecificationsForResourceRequest.getNextToken(), NEXTTOKEN_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[listLicenseSpecificationsForResourceRequest, protocolMarshaller]] begin[{] if[binary_operation[member[.listLicenseSpecificationsForResourceRequest], ==, 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=getResourceArn, postfix_operators=[], prefix_operators=[], qualifier=listLicenseSpecificationsForResourceRequest, 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=getMaxResults, postfix_operators=[], prefix_operators=[], qualifier=listLicenseSpecificationsForResourceRequest, selectors=[], type_arguments=None), MemberReference(member=MAXRESULTS_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=getNextToken, postfix_operators=[], prefix_operators=[], qualifier=listLicenseSpecificationsForResourceRequest, selectors=[], type_arguments=None), MemberReference(member=NEXTTOKEN_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[ListLicenseSpecificationsForResourceRequest] identifier[listLicenseSpecificationsForResourceRequest] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[listLicenseSpecificationsForResourceRequest] 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[listLicenseSpecificationsForResourceRequest] operator[SEP] identifier[getResourceArn] operator[SEP] operator[SEP] , identifier[RESOURCEARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listLicenseSpecificationsForResourceRequest] operator[SEP] identifier[getMaxResults] operator[SEP] operator[SEP] , identifier[MAXRESULTS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[listLicenseSpecificationsForResourceRequest] operator[SEP] identifier[getNextToken] operator[SEP] operator[SEP] , identifier[NEXTTOKEN_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static short readShortLittleEndian(InputStream io) throws IOException { int value = io.read(); if (value < 0) throw new EOFException(); int i = io.read(); if (i < 0) throw new EOFException(); return (short)(value | (i << 8)); }
class class_name[name] begin[{] method[readShortLittleEndian, return_type[type[short]], modifier[public static], parameter[io]] begin[{] local_variable[type[int], value] if[binary_operation[member[.value], <, literal[0]]] 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=EOFException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[int], i] if[binary_operation[member[.i], <, literal[0]]] 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=EOFException, sub_type=None)), label=None) else begin[{] None end[}] return[Cast(expression=BinaryOperation(operandl=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8), operator=<<), operator=|), type=BasicType(dimensions=[], name=short))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[short] identifier[readShortLittleEndian] operator[SEP] identifier[InputStream] identifier[io] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[int] identifier[value] operator[=] identifier[io] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[value] operator[<] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[EOFException] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] identifier[io] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[i] operator[<] Other[0] operator[SEP] Keyword[throw] Keyword[new] identifier[EOFException] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[short] operator[SEP] operator[SEP] identifier[value] operator[|] operator[SEP] identifier[i] operator[<<] Other[8] operator[SEP] operator[SEP] operator[SEP] }
private static String requireJsConfigErrorMessage(Map.Entry<String, String> webJar) { return "Could not read WebJar RequireJS config for: " + webJar.getKey() + " " + webJar.getValue() + "\n" + "Please file a bug at: http://github.com/webjars/" + webJar.getKey() + "/issues/new"; }
class class_name[name] begin[{] method[requireJsConfigErrorMessage, return_type[type[String]], modifier[private static], parameter[webJar]] begin[{] return[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["Could not read WebJar RequireJS config for: "], +, call[webJar.getKey, parameter[]]], +, literal[" "]], +, call[webJar.getValue, parameter[]]], +, literal["\n"]], +, literal["Please file a bug at: http://github.com/webjars/"]], +, call[webJar.getKey, parameter[]]], +, literal["/issues/new"]]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[requireJsConfigErrorMessage] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[String] operator[>] identifier[webJar] operator[SEP] { Keyword[return] literal[String] operator[+] identifier[webJar] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[webJar] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] literal[String] operator[+] identifier[webJar] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] }
public static <R, T> R[] apply(R[] result, T[] array, Functor<R, T> functor) { for (int i = 0; i < array.length; ++i) result[i] = functor.invoke(array[i]); return result; }
class class_name[name] begin[{] method[apply, return_type[type[R]], modifier[public static], parameter[result, array, functor]] begin[{] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=invoke, postfix_operators=[], prefix_operators=[], qualifier=functor, 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=array, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[R] , identifier[T] operator[>] identifier[R] operator[SEP] operator[SEP] identifier[apply] operator[SEP] identifier[R] operator[SEP] operator[SEP] identifier[result] , identifier[T] operator[SEP] operator[SEP] identifier[array] , identifier[Functor] operator[<] identifier[R] , identifier[T] operator[>] identifier[functor] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[array] operator[SEP] identifier[length] operator[SEP] operator[++] identifier[i] operator[SEP] identifier[result] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[functor] operator[SEP] identifier[invoke] operator[SEP] identifier[array] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] }
@Override protected boolean checkResourcePermissions(CmsPermissionSet required, boolean neededForFolder) { if (isMultiOperation()) { // for multi resource operation, return always true return true; } else { // check for single resource operation return super.checkResourcePermissions(required, neededForFolder); } }
class class_name[name] begin[{] method[checkResourcePermissions, return_type[type[boolean]], modifier[protected], parameter[required, neededForFolder]] begin[{] if[call[.isMultiOperation, parameter[]]] begin[{] return[literal[true]] else begin[{] return[SuperMethodInvocation(arguments=[MemberReference(member=required, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=neededForFolder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=checkResourcePermissions, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[boolean] identifier[checkResourcePermissions] operator[SEP] identifier[CmsPermissionSet] identifier[required] , Keyword[boolean] identifier[neededForFolder] operator[SEP] { Keyword[if] operator[SEP] identifier[isMultiOperation] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] Keyword[super] operator[SEP] identifier[checkResourcePermissions] operator[SEP] identifier[required] , identifier[neededForFolder] operator[SEP] operator[SEP] } }
private boolean hasAbstractPackagePrivateSuperClassWithImplementation(Class<?> clazz, BridgeMethod bridgeMethod) { Class<?> superClass = clazz.getSuperclass(); while (superClass != null) { if (Modifier.isAbstract(superClass.getModifiers()) && Reflections.isPackagePrivate(superClass.getModifiers())) { // if superclass is abstract, we need to dig deeper for (Method method : superClass.getDeclaredMethods()) { if (bridgeMethod.signature.matches(method) && method.getGenericReturnType().equals(bridgeMethod.returnType) && !Reflections.isAbstract(method)) { // this is the case we are after -> methods have same signature and the one in super class has actual implementation return true; } } } superClass = superClass.getSuperclass(); } return false; }
class class_name[name] begin[{] method[hasAbstractPackagePrivateSuperClassWithImplementation, return_type[type[boolean]], modifier[private], parameter[clazz, bridgeMethod]] begin[{] local_variable[type[Class], superClass] while[binary_operation[member[.superClass], !=, literal[null]]] begin[{] if[binary_operation[call[Modifier.isAbstract, parameter[call[superClass.getModifiers, parameter[]]]], &&, call[Reflections.isPackagePrivate, parameter[call[superClass.getModifiers, parameter[]]]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=matches, postfix_operators=[], prefix_operators=[], qualifier=bridgeMethod.signature, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=getGenericReturnType, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[MethodInvocation(arguments=[MemberReference(member=returnType, postfix_operators=[], prefix_operators=[], qualifier=bridgeMethod, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), operandr=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isAbstract, postfix_operators=[], prefix_operators=['!'], qualifier=Reflections, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getDeclaredMethods, postfix_operators=[], prefix_operators=[], qualifier=superClass, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=method)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Method, sub_type=None))), label=None) else begin[{] None end[}] assign[member[.superClass], call[superClass.getSuperclass, parameter[]]] end[}] return[literal[false]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[hasAbstractPackagePrivateSuperClassWithImplementation] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] , identifier[BridgeMethod] identifier[bridgeMethod] operator[SEP] { identifier[Class] operator[<] operator[?] operator[>] identifier[superClass] operator[=] identifier[clazz] operator[SEP] identifier[getSuperclass] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[superClass] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[Modifier] operator[SEP] identifier[isAbstract] operator[SEP] identifier[superClass] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] operator[&&] identifier[Reflections] operator[SEP] identifier[isPackagePrivate] operator[SEP] identifier[superClass] operator[SEP] identifier[getModifiers] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Method] identifier[method] operator[:] identifier[superClass] operator[SEP] identifier[getDeclaredMethods] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[bridgeMethod] operator[SEP] identifier[signature] operator[SEP] identifier[matches] operator[SEP] identifier[method] operator[SEP] operator[&&] identifier[method] operator[SEP] identifier[getGenericReturnType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[bridgeMethod] operator[SEP] identifier[returnType] operator[SEP] operator[&&] operator[!] identifier[Reflections] operator[SEP] identifier[isAbstract] operator[SEP] identifier[method] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } } identifier[superClass] operator[=] identifier[superClass] operator[SEP] identifier[getSuperclass] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public Collection<HotlistTag> getHotList(String period, int count) throws FlickrException { Map<String, Object> parameters = new HashMap<String, Object>(); parameters.put("method", METHOD_GET_HOT_LIST); parameters.put("period", period); parameters.put("count", "" + count); Response response = transportAPI.get(transportAPI.getPath(), parameters, apiKey, sharedSecret); if (response.isError()) { throw new FlickrException(response.getErrorCode(), response.getErrorMessage()); } Element tagsElement = response.getPayload(); List<HotlistTag> tags = new ArrayList<HotlistTag>(); NodeList tagElements = tagsElement.getElementsByTagName("tag"); for (int i = 0; i < tagElements.getLength(); i++) { Element tagElement = (Element) tagElements.item(i); HotlistTag tag = new HotlistTag(); tag.setScore(tagElement.getAttribute("score")); tag.setValue(((Text) tagElement.getFirstChild()).getData()); tags.add(tag); } return tags; }
class class_name[name] begin[{] method[getHotList, return_type[type[Collection]], modifier[public], parameter[period, count]] begin[{] local_variable[type[Map], parameters] call[parameters.put, parameter[literal["method"], member[.METHOD_GET_HOT_LIST]]] call[parameters.put, parameter[literal["period"], member[.period]]] call[parameters.put, parameter[literal["count"], binary_operation[literal[""], +, member[.count]]]] local_variable[type[Response], response] if[call[response.isError, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getErrorCode, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getErrorMessage, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FlickrException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Element], tagsElement] local_variable[type[List], tags] local_variable[type[NodeList], tagElements] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=item, postfix_operators=[], prefix_operators=[], qualifier=tagElements, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), name=tagElement)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Element, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HotlistTag, sub_type=None)), name=tag)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HotlistTag, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="score")], member=getAttribute, postfix_operators=[], prefix_operators=[], qualifier=tagElement, selectors=[], type_arguments=None)], member=setScore, postfix_operators=[], prefix_operators=[], qualifier=tag, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getFirstChild, postfix_operators=[], prefix_operators=[], qualifier=tagElement, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Text, sub_type=None))], member=setValue, postfix_operators=[], prefix_operators=[], qualifier=tag, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=tags, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=getLength, postfix_operators=[], prefix_operators=[], qualifier=tagElements, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.tags]] end[}] END[}]
Keyword[public] identifier[Collection] operator[<] identifier[HotlistTag] operator[>] identifier[getHotList] operator[SEP] identifier[String] identifier[period] , Keyword[int] identifier[count] operator[SEP] Keyword[throws] identifier[FlickrException] { identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[parameters] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[METHOD_GET_HOT_LIST] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[period] operator[SEP] operator[SEP] identifier[parameters] operator[SEP] identifier[put] operator[SEP] literal[String] , literal[String] operator[+] identifier[count] operator[SEP] operator[SEP] identifier[Response] identifier[response] operator[=] identifier[transportAPI] operator[SEP] identifier[get] operator[SEP] identifier[transportAPI] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] , identifier[parameters] , identifier[apiKey] , identifier[sharedSecret] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[response] operator[SEP] identifier[isError] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[FlickrException] operator[SEP] identifier[response] operator[SEP] identifier[getErrorCode] operator[SEP] operator[SEP] , identifier[response] operator[SEP] identifier[getErrorMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[Element] identifier[tagsElement] operator[=] identifier[response] operator[SEP] identifier[getPayload] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[HotlistTag] operator[>] identifier[tags] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[HotlistTag] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[NodeList] identifier[tagElements] operator[=] identifier[tagsElement] operator[SEP] identifier[getElementsByTagName] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[tagElements] operator[SEP] identifier[getLength] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Element] identifier[tagElement] operator[=] operator[SEP] identifier[Element] operator[SEP] identifier[tagElements] operator[SEP] identifier[item] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[HotlistTag] identifier[tag] operator[=] Keyword[new] identifier[HotlistTag] operator[SEP] operator[SEP] operator[SEP] identifier[tag] operator[SEP] identifier[setScore] operator[SEP] identifier[tagElement] operator[SEP] identifier[getAttribute] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[tag] operator[SEP] identifier[setValue] operator[SEP] operator[SEP] operator[SEP] identifier[Text] operator[SEP] identifier[tagElement] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[tags] operator[SEP] identifier[add] operator[SEP] identifier[tag] operator[SEP] operator[SEP] } Keyword[return] identifier[tags] operator[SEP] }
public static String tr(String input, String from, String to) { assert from.length() == to.length(); StringBuilder sb = null; int len = input.length(); for (int i = 0; i < len; i++) { int ind = from.indexOf(input.charAt(i)); if (ind >= 0) { if (sb == null) { sb = new StringBuilder(input); } sb.setCharAt(i, to.charAt(ind)); } } if (sb == null) { return input; } else { return sb.toString(); } }
class class_name[name] begin[{] method[tr, return_type[type[String]], modifier[public static], parameter[input, from, to]] begin[{] AssertStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=to, selectors=[], type_arguments=None), operator===), label=None, value=None) local_variable[type[StringBuilder], sb] local_variable[type[int], len] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)], member=indexOf, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), name=ind)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=ind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=sb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=ClassCreator(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuilder, sub_type=None))), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=ind, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=to, selectors=[], type_arguments=None)], member=setCharAt, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=len, 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) if[binary_operation[member[.sb], ==, literal[null]]] begin[{] return[member[.input]] else begin[{] return[call[sb.toString, parameter[]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[tr] operator[SEP] identifier[String] identifier[input] , identifier[String] identifier[from] , identifier[String] identifier[to] operator[SEP] { Keyword[assert] identifier[from] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[==] identifier[to] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] Other[null] operator[SEP] Keyword[int] identifier[len] operator[=] identifier[input] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[len] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[ind] operator[=] identifier[from] operator[SEP] identifier[indexOf] operator[SEP] identifier[input] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ind] operator[>=] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[sb] operator[==] Other[null] operator[SEP] { identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[input] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[setCharAt] operator[SEP] identifier[i] , identifier[to] operator[SEP] identifier[charAt] operator[SEP] identifier[ind] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[sb] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[input] operator[SEP] } Keyword[else] { Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } }
@Override protected Connection getReadConnection() throws CpoException { Connection connection = getStaticConnection(); setConnectionBusy(connection); return connection; }
class class_name[name] begin[{] method[getReadConnection, return_type[type[Connection]], modifier[protected], parameter[]] begin[{] local_variable[type[Connection], connection] call[.setConnectionBusy, parameter[member[.connection]]] return[member[.connection]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] identifier[Connection] identifier[getReadConnection] operator[SEP] operator[SEP] Keyword[throws] identifier[CpoException] { identifier[Connection] identifier[connection] operator[=] identifier[getStaticConnection] operator[SEP] operator[SEP] operator[SEP] identifier[setConnectionBusy] operator[SEP] identifier[connection] operator[SEP] operator[SEP] Keyword[return] identifier[connection] operator[SEP] }
@Override public String toJSON() { JSONObject o = new JSONObject(); try { o.put(KEY_TYPE, mType); o.put(KEY_ACTION, mAction); return o.toString(); } catch (JSONException e) { Log.e(TAG, "Error marshalling action:", e); return ""; } }
class class_name[name] begin[{] method[toJSON, return_type[type[String]], modifier[public], parameter[]] begin[{] local_variable[type[JSONObject], o] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=KEY_TYPE, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=KEY_ACTION, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=mAction, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=o, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=TAG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error marshalling action:"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=e, postfix_operators=[], prefix_operators=[], qualifier=Log, selectors=[], type_arguments=None), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['JSONException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[String] identifier[toJSON] operator[SEP] operator[SEP] { identifier[JSONObject] identifier[o] operator[=] Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[o] operator[SEP] identifier[put] operator[SEP] identifier[KEY_TYPE] , identifier[mType] operator[SEP] operator[SEP] identifier[o] operator[SEP] identifier[put] operator[SEP] identifier[KEY_ACTION] , identifier[mAction] operator[SEP] operator[SEP] Keyword[return] identifier[o] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[JSONException] identifier[e] operator[SEP] { identifier[Log] operator[SEP] identifier[e] operator[SEP] identifier[TAG] , literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[return] literal[String] operator[SEP] } }
public static StringBuilder appendFunctionArgs(StringBuilder sb, List<Term<?>> list) { Term<?> prev = null, pprev = null; for (Term<?> elem : list) { boolean sep = true; if (elem instanceof TermOperator && ((TermOperator) elem).getValue() == ',') sep = false; //no spaces before commas if ((prev != null && prev instanceof TermOperator && ((TermOperator) prev).getValue() == '-') && (pprev == null || pprev instanceof TermOperator)) //nothing or an operator before - sep = false; //no spaces after unary minus if (prev != null && sep) sb.append(SPACE_DELIM); pprev = prev; prev = elem; sb.append(elem.toString()); } return sb; }
class class_name[name] begin[{] method[appendFunctionArgs, return_type[type[StringBuilder]], modifier[public static], parameter[sb, list]] begin[{] local_variable[type[Term], prev] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), name=sep)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=elem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=TermOperator, sub_type=None), operator=instanceof), operandr=BinaryOperation(operandl=Cast(expression=MemberReference(member=elem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=TermOperator, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=','), operator===), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=sep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=prev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=prev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=TermOperator, sub_type=None), operator=instanceof), operator=&&), operandr=BinaryOperation(operandl=Cast(expression=MemberReference(member=prev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=TermOperator, sub_type=None)), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='-'), operator===), operator=&&), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=pprev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), operandr=BinaryOperation(operandl=MemberReference(member=pprev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=TermOperator, sub_type=None), operator=instanceof), operator=||), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=Assignment(expressionl=MemberReference(member=sep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=prev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MemberReference(member=sep, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SPACE_DELIM, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)), StatementExpression(expression=Assignment(expressionl=MemberReference(member=pprev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=prev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=prev, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=elem, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=elem, selectors=[], type_arguments=None)], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=list, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=elem)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Term, sub_type=None))), label=None) return[member[.sb]] end[}] END[}]
Keyword[public] Keyword[static] identifier[StringBuilder] identifier[appendFunctionArgs] operator[SEP] identifier[StringBuilder] identifier[sb] , identifier[List] operator[<] identifier[Term] operator[<] operator[?] operator[>] operator[>] identifier[list] operator[SEP] { identifier[Term] operator[<] operator[?] operator[>] identifier[prev] operator[=] Other[null] , identifier[pprev] operator[=] Other[null] operator[SEP] Keyword[for] operator[SEP] identifier[Term] operator[<] operator[?] operator[>] identifier[elem] operator[:] identifier[list] operator[SEP] { Keyword[boolean] identifier[sep] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[elem] Keyword[instanceof] identifier[TermOperator] operator[&&] operator[SEP] operator[SEP] identifier[TermOperator] operator[SEP] identifier[elem] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[==] literal[String] operator[SEP] identifier[sep] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[prev] operator[!=] Other[null] operator[&&] identifier[prev] Keyword[instanceof] identifier[TermOperator] operator[&&] operator[SEP] operator[SEP] identifier[TermOperator] operator[SEP] identifier[prev] operator[SEP] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[==] literal[String] operator[SEP] operator[&&] operator[SEP] identifier[pprev] operator[==] Other[null] operator[||] identifier[pprev] Keyword[instanceof] identifier[TermOperator] operator[SEP] operator[SEP] identifier[sep] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[prev] operator[!=] Other[null] operator[&&] identifier[sep] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[SPACE_DELIM] operator[SEP] operator[SEP] identifier[pprev] operator[=] identifier[prev] operator[SEP] identifier[prev] operator[=] identifier[elem] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[elem] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] }
public void setGrants(java.util.Collection<GrantListEntry> grants) { if (grants == null) { this.grants = null; return; } this.grants = new com.amazonaws.internal.SdkInternalList<GrantListEntry>(grants); }
class class_name[name] begin[{] method[setGrants, return_type[void], modifier[public], parameter[grants]] begin[{] if[binary_operation[member[.grants], ==, literal[null]]] begin[{] assign[THIS[member[None.grants]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.grants]], ClassCreator(arguments=[MemberReference(member=grants, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=com, sub_type=ReferenceType(arguments=None, dimensions=None, name=amazonaws, sub_type=ReferenceType(arguments=None, dimensions=None, name=internal, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=GrantListEntry, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setGrants] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[GrantListEntry] operator[>] identifier[grants] operator[SEP] { Keyword[if] operator[SEP] identifier[grants] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[grants] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[grants] operator[=] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[GrantListEntry] operator[>] operator[SEP] identifier[grants] operator[SEP] operator[SEP] }
@Deprecated public static Builder builder(FileSystem originFs, FileStatus origin, Path datasetRoot, CopyConfiguration copyConfiguration) { Path relativePath = PathUtils.relativizePath(origin.getPath(), datasetRoot); Path targetRoot = new Path(copyConfiguration.getPublishDir(), datasetRoot.getName()); Path targetPath = new Path(targetRoot, relativePath); return _hiddenBuilder().originFS(originFs).origin(origin).destination(targetPath) .preserve(copyConfiguration.getPreserve()).configuration(copyConfiguration); }
class class_name[name] begin[{] method[builder, return_type[type[Builder]], modifier[public static], parameter[originFs, origin, datasetRoot, copyConfiguration]] begin[{] local_variable[type[Path], relativePath] local_variable[type[Path], targetRoot] local_variable[type[Path], targetPath] return[call[._hiddenBuilder, parameter[]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[Builder] identifier[builder] operator[SEP] identifier[FileSystem] identifier[originFs] , identifier[FileStatus] identifier[origin] , identifier[Path] identifier[datasetRoot] , identifier[CopyConfiguration] identifier[copyConfiguration] operator[SEP] { identifier[Path] identifier[relativePath] operator[=] identifier[PathUtils] operator[SEP] identifier[relativizePath] operator[SEP] identifier[origin] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] , identifier[datasetRoot] operator[SEP] operator[SEP] identifier[Path] identifier[targetRoot] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[copyConfiguration] operator[SEP] identifier[getPublishDir] operator[SEP] operator[SEP] , identifier[datasetRoot] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Path] identifier[targetPath] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[targetRoot] , identifier[relativePath] operator[SEP] operator[SEP] Keyword[return] identifier[_hiddenBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[originFS] operator[SEP] identifier[originFs] operator[SEP] operator[SEP] identifier[origin] operator[SEP] identifier[origin] operator[SEP] operator[SEP] identifier[destination] operator[SEP] identifier[targetPath] operator[SEP] operator[SEP] identifier[preserve] operator[SEP] identifier[copyConfiguration] operator[SEP] identifier[getPreserve] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[configuration] operator[SEP] identifier[copyConfiguration] operator[SEP] operator[SEP] }
@EventListener public void logAuthenticationTransactionFailureEvent(final CasAuthenticationTransactionFailureEvent e) { LOGGER.debug(AUTHN_TX_FAIL_MSG, e.getCredential(), e.getFailures()); }
class class_name[name] begin[{] method[logAuthenticationTransactionFailureEvent, return_type[void], modifier[public], parameter[e]] begin[{] call[LOGGER.debug, parameter[member[.AUTHN_TX_FAIL_MSG], call[e.getCredential, parameter[]], call[e.getFailures, parameter[]]]] end[}] END[}]
annotation[@] identifier[EventListener] Keyword[public] Keyword[void] identifier[logAuthenticationTransactionFailureEvent] operator[SEP] Keyword[final] identifier[CasAuthenticationTransactionFailureEvent] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] identifier[AUTHN_TX_FAIL_MSG] , identifier[e] operator[SEP] identifier[getCredential] operator[SEP] operator[SEP] , identifier[e] operator[SEP] identifier[getFailures] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Nullable protected de.uniulm.omi.cloudiator.flexiant.client.domain.Server searchByIp( Set<de.uniulm.omi.cloudiator.flexiant.client.domain.Server> servers, String ip) { for (de.uniulm.omi.cloudiator.flexiant.client.domain.Server server : servers) { if (server.getPublicIpAddress() != null && server.getPublicIpAddress().equals(ip)) { return server; } if (server.getPrivateIpAddress() != null && server.getPrivateIpAddress().equals(ip)) { return server; } } return null; }
class class_name[name] begin[{] method[searchByIp, return_type[type[de]], modifier[protected], parameter[servers, ip]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPublicIpAddress, postfix_operators=[], prefix_operators=[], qualifier=server, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=getPublicIpAddress, postfix_operators=[], prefix_operators=[], qualifier=server, selectors=[MethodInvocation(arguments=[MemberReference(member=ip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=server, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getPrivateIpAddress, postfix_operators=[], prefix_operators=[], qualifier=server, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=MethodInvocation(arguments=[], member=getPrivateIpAddress, postfix_operators=[], prefix_operators=[], qualifier=server, selectors=[MethodInvocation(arguments=[MemberReference(member=ip, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=server, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=servers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=server)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=de, sub_type=ReferenceType(arguments=None, dimensions=None, name=uniulm, sub_type=ReferenceType(arguments=None, dimensions=None, name=omi, sub_type=ReferenceType(arguments=None, dimensions=None, name=cloudiator, sub_type=ReferenceType(arguments=None, dimensions=None, name=flexiant, sub_type=ReferenceType(arguments=None, dimensions=None, name=client, sub_type=ReferenceType(arguments=None, dimensions=None, name=domain, sub_type=ReferenceType(arguments=None, dimensions=None, name=Server, sub_type=None)))))))))), label=None) return[literal[null]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[protected] identifier[de] operator[SEP] identifier[uniulm] operator[SEP] identifier[omi] operator[SEP] identifier[cloudiator] operator[SEP] identifier[flexiant] operator[SEP] identifier[client] operator[SEP] identifier[domain] operator[SEP] identifier[Server] identifier[searchByIp] operator[SEP] identifier[Set] operator[<] identifier[de] operator[SEP] identifier[uniulm] operator[SEP] identifier[omi] operator[SEP] identifier[cloudiator] operator[SEP] identifier[flexiant] operator[SEP] identifier[client] operator[SEP] identifier[domain] operator[SEP] identifier[Server] operator[>] identifier[servers] , identifier[String] identifier[ip] operator[SEP] { Keyword[for] operator[SEP] identifier[de] operator[SEP] identifier[uniulm] operator[SEP] identifier[omi] operator[SEP] identifier[cloudiator] operator[SEP] identifier[flexiant] operator[SEP] identifier[client] operator[SEP] identifier[domain] operator[SEP] identifier[Server] identifier[server] operator[:] identifier[servers] operator[SEP] { Keyword[if] operator[SEP] identifier[server] operator[SEP] identifier[getPublicIpAddress] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[server] operator[SEP] identifier[getPublicIpAddress] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[ip] operator[SEP] operator[SEP] { Keyword[return] identifier[server] operator[SEP] } Keyword[if] operator[SEP] identifier[server] operator[SEP] identifier[getPrivateIpAddress] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[server] operator[SEP] identifier[getPrivateIpAddress] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[ip] operator[SEP] operator[SEP] { Keyword[return] identifier[server] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public static <TERM> Iterable<Map<TERM, Double>> tfs(Iterable<Collection<TERM>> documents, TfType type) { List<Map<TERM, Double>> tfs = new ArrayList<Map<TERM, Double>>(); for (Collection<TERM> document : documents) { tfs.add(tf(document, type)); } return tfs; }
class class_name[name] begin[{] method[tfs, return_type[type[Iterable]], modifier[public static], parameter[documents, type]] begin[{] local_variable[type[List], tfs] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=document, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=tf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=tfs, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=documents, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=document)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=TERM, sub_type=None))], dimensions=[], name=Collection, sub_type=None))), label=None) return[member[.tfs]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[TERM] operator[>] identifier[Iterable] operator[<] identifier[Map] operator[<] identifier[TERM] , identifier[Double] operator[>] operator[>] identifier[tfs] operator[SEP] identifier[Iterable] operator[<] identifier[Collection] operator[<] identifier[TERM] operator[>] operator[>] identifier[documents] , identifier[TfType] identifier[type] operator[SEP] { identifier[List] operator[<] identifier[Map] operator[<] identifier[TERM] , identifier[Double] operator[>] operator[>] identifier[tfs] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Map] operator[<] identifier[TERM] , identifier[Double] operator[>] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Collection] operator[<] identifier[TERM] operator[>] identifier[document] operator[:] identifier[documents] operator[SEP] { identifier[tfs] operator[SEP] identifier[add] operator[SEP] identifier[tf] operator[SEP] identifier[document] , identifier[type] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[tfs] operator[SEP] }
public void setUnitsString( String units) { this.units = units; forVar.addAttribute( new Attribute(CDM.UNITS, units)); }
class class_name[name] begin[{] method[setUnitsString, return_type[void], modifier[public], parameter[units]] begin[{] assign[THIS[member[None.units]], member[.units]] call[forVar.addAttribute, parameter[ClassCreator(arguments=[MemberReference(member=UNITS, postfix_operators=[], prefix_operators=[], qualifier=CDM, selectors=[]), MemberReference(member=units, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setUnitsString] operator[SEP] identifier[String] identifier[units] operator[SEP] { Keyword[this] operator[SEP] identifier[units] operator[=] identifier[units] operator[SEP] identifier[forVar] operator[SEP] identifier[addAttribute] operator[SEP] Keyword[new] identifier[Attribute] operator[SEP] identifier[CDM] operator[SEP] identifier[UNITS] , identifier[units] operator[SEP] operator[SEP] operator[SEP] }
@Override public SpatialReferenceSystem queryForSameId(SpatialReferenceSystem data) throws SQLException { SpatialReferenceSystem srs = super.queryForSameId(data); setDefinition_12_063(srs); return srs; }
class class_name[name] begin[{] method[queryForSameId, return_type[type[SpatialReferenceSystem]], modifier[public], parameter[data]] begin[{] local_variable[type[SpatialReferenceSystem], srs] call[.setDefinition_12_063, parameter[member[.srs]]] return[member[.srs]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[SpatialReferenceSystem] identifier[queryForSameId] operator[SEP] identifier[SpatialReferenceSystem] identifier[data] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[SpatialReferenceSystem] identifier[srs] operator[=] Keyword[super] operator[SEP] identifier[queryForSameId] operator[SEP] identifier[data] operator[SEP] operator[SEP] identifier[setDefinition_12_063] operator[SEP] identifier[srs] operator[SEP] operator[SEP] Keyword[return] identifier[srs] operator[SEP] }
public void toFile(File file) throws IOException { String[] sitemap = toStringArray(); try(BufferedWriter writer = new BufferedWriter(new FileWriter(file))) { for (String string : sitemap) { writer.write(string); } } }
class class_name[name] begin[{] method[toFile, return_type[void], modifier[public], parameter[file]] begin[{] local_variable[type[String], sitemap] TryStatement(block=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=string, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=writer, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=sitemap, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=string)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None)], catches=None, finally_block=None, label=None, resources=[TryResource(annotations=[], modifiers=set(), name=writer, type=ReferenceType(arguments=None, dimensions=[], name=BufferedWriter, sub_type=None), value=ClassCreator(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=FileWriter, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BufferedWriter, sub_type=None)))]) end[}] END[}]
Keyword[public] Keyword[void] identifier[toFile] operator[SEP] identifier[File] identifier[file] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] operator[SEP] operator[SEP] identifier[sitemap] operator[=] identifier[toStringArray] operator[SEP] operator[SEP] operator[SEP] Keyword[try] operator[SEP] identifier[BufferedWriter] identifier[writer] operator[=] Keyword[new] identifier[BufferedWriter] operator[SEP] Keyword[new] identifier[FileWriter] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[string] operator[:] identifier[sitemap] operator[SEP] { identifier[writer] operator[SEP] identifier[write] operator[SEP] identifier[string] operator[SEP] operator[SEP] } } }
public void prepare(StringDistance[] innerDistances) { if (!fieldsPrepared) { for (int i=0; i<size(); i++) { StringDistance d = innerDistances[ getDistanceLearnerIndex(i) ]; set( i, d.prepare( get(i).unwrap() ) ); } } }
class class_name[name] begin[{] method[prepare, return_type[void], modifier[public], parameter[innerDistances]] begin[{] if[member[.fieldsPrepared]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=innerDistances, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDistanceLearnerIndex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None))]), name=d)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StringDistance, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=unwrap, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=prepare, postfix_operators=[], prefix_operators=[], qualifier=d, selectors=[], type_arguments=None)], member=set, 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=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[prepare] operator[SEP] identifier[StringDistance] operator[SEP] operator[SEP] identifier[innerDistances] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[fieldsPrepared] operator[SEP] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[StringDistance] identifier[d] operator[=] identifier[innerDistances] operator[SEP] identifier[getDistanceLearnerIndex] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[i] , identifier[d] operator[SEP] identifier[prepare] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[unwrap] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
@Override public final synchronized void makeWith(final Map<String, Object> pReqVars, final FactoryAndServlet pFactoryAndServlet) throws Exception { @SuppressWarnings("unchecked") AFactoryAppBeans<RS> factoryAppBeans = (AFactoryAppBeans<RS>) pFactoryAndServlet.getFactoryAppBeans(); File webAppPath = new File(pFactoryAndServlet.getHttpServlet(). getServletContext().getRealPath("")); factoryAppBeans.setWebAppPath(webAppPath.getPath()); String isShowDebugMessagesStr = pFactoryAndServlet.getHttpServlet() .getInitParameter("isShowDebugMessages"); factoryAppBeans.setIsShowDebugMessages(Boolean .valueOf(isShowDebugMessagesStr)); String detailLevelStr = pFactoryAndServlet.getHttpServlet() .getInitParameter("detailLevel"); factoryAppBeans.setDetailLevel(Integer.parseInt(detailLevelStr)); String newDatabaseIdStr = pFactoryAndServlet.getHttpServlet() .getInitParameter("newDatabaseId"); factoryAppBeans.setNewDatabaseId(Integer.parseInt(newDatabaseIdStr)); String ormSettingsDir = pFactoryAndServlet.getHttpServlet() .getInitParameter("ormSettingsDir"); factoryAppBeans.setOrmSettingsDir(ormSettingsDir); String ormSettingsBaseFile = pFactoryAndServlet.getHttpServlet() .getInitParameter("ormSettingsBaseFile"); factoryAppBeans.setOrmSettingsBaseFile(ormSettingsBaseFile); String uvdSettingsDir = pFactoryAndServlet.getHttpServlet() .getInitParameter("uvdSettingsDir"); factoryAppBeans.setUvdSettingsDir(uvdSettingsDir); String uvdSettingsBaseFile = pFactoryAndServlet.getHttpServlet() .getInitParameter("uvdSettingsBaseFile"); factoryAppBeans.setUvdSettingsBaseFile(uvdSettingsBaseFile); String writeTi = pFactoryAndServlet.getHttpServlet() .getInitParameter("writeTi"); factoryAppBeans.setWriteTi(Integer.parseInt(writeTi)); String readTi = pFactoryAndServlet.getHttpServlet() .getInitParameter("readTi"); factoryAppBeans.setReadTi(Integer.parseInt(readTi)); String writeReTi = pFactoryAndServlet.getHttpServlet() .getInitParameter("writeReTi"); factoryAppBeans.setWriteReTi(Integer.parseInt(writeReTi)); String wrReSpTr = pFactoryAndServlet.getHttpServlet() .getInitParameter("wrReSpTr"); factoryAppBeans.setWrReSpTr(Boolean.valueOf(wrReSpTr)); String fastLoc = pFactoryAndServlet.getHttpServlet() .getInitParameter("fastLoc"); factoryAppBeans.setFastLoc(Boolean.parseBoolean(fastLoc)); String jdbcUrl = pFactoryAndServlet.getHttpServlet() .getInitParameter("databaseName"); if (jdbcUrl != null && jdbcUrl.contains(ASrvOrm.WORD_CURRENT_DIR)) { jdbcUrl = jdbcUrl.replace(ASrvOrm.WORD_CURRENT_DIR, factoryAppBeans.getWebAppPath() + File.separator); } else if (jdbcUrl != null && jdbcUrl.contains(ASrvOrm.WORD_CURRENT_PARENT_DIR)) { File fcd = new File(factoryAppBeans.getWebAppPath()); jdbcUrl = jdbcUrl.replace(ASrvOrm.WORD_CURRENT_PARENT_DIR, fcd.getParent() + File.separator); } String langCountriesStr = pFactoryAndServlet.getHttpServlet() .getInitParameter("langCountries"); List<String> lngCntLst = new ArrayList<String>(); for (String str : langCountriesStr.split(",")) { lngCntLst.add(str); } String[] lngCntArr = new String[lngCntLst.size()]; factoryAppBeans.lazyGetSrvI18n().add(lngCntLst.toArray(lngCntArr)); LstnDbChanged<RS> lstnDbChanged = new LstnDbChanged<RS>(); lstnDbChanged.setFactoryAndServlet(pFactoryAndServlet); factoryAppBeans.getListenersDbChanged().add(lstnDbChanged); factoryAppBeans.setDatabaseName(jdbcUrl); String databaseUser = pFactoryAndServlet.getHttpServlet() .getInitParameter("databaseUser"); factoryAppBeans.setDatabaseUser(databaseUser); String databasePassword = pFactoryAndServlet.getHttpServlet() .getInitParameter("databasePassword"); factoryAppBeans.setDatabasePassword(databasePassword); pFactoryAndServlet.getHttpServlet().getServletContext() .setAttribute("srvI18n", factoryAppBeans.lazyGet("ISrvI18n")); pFactoryAndServlet.getHttpServlet().getServletContext() .setAttribute("sessionTracker", factoryAppBeans.lazyGet("ISessionTracker")); //to create/initialize database if need: factoryAppBeans.lazyGet("ISrvOrm"); }
class class_name[name] begin[{] method[makeWith, return_type[void], modifier[synchronized final public], parameter[pReqVars, pFactoryAndServlet]] begin[{] local_variable[type[AFactoryAppBeans], factoryAppBeans] local_variable[type[File], webAppPath] call[factoryAppBeans.setWebAppPath, parameter[call[webAppPath.getPath, parameter[]]]] local_variable[type[String], isShowDebugMessagesStr] call[factoryAppBeans.setIsShowDebugMessages, parameter[call[Boolean.valueOf, parameter[member[.isShowDebugMessagesStr]]]]] local_variable[type[String], detailLevelStr] call[factoryAppBeans.setDetailLevel, parameter[call[Integer.parseInt, parameter[member[.detailLevelStr]]]]] local_variable[type[String], newDatabaseIdStr] call[factoryAppBeans.setNewDatabaseId, parameter[call[Integer.parseInt, parameter[member[.newDatabaseIdStr]]]]] local_variable[type[String], ormSettingsDir] call[factoryAppBeans.setOrmSettingsDir, parameter[member[.ormSettingsDir]]] local_variable[type[String], ormSettingsBaseFile] call[factoryAppBeans.setOrmSettingsBaseFile, parameter[member[.ormSettingsBaseFile]]] local_variable[type[String], uvdSettingsDir] call[factoryAppBeans.setUvdSettingsDir, parameter[member[.uvdSettingsDir]]] local_variable[type[String], uvdSettingsBaseFile] call[factoryAppBeans.setUvdSettingsBaseFile, parameter[member[.uvdSettingsBaseFile]]] local_variable[type[String], writeTi] call[factoryAppBeans.setWriteTi, parameter[call[Integer.parseInt, parameter[member[.writeTi]]]]] local_variable[type[String], readTi] call[factoryAppBeans.setReadTi, parameter[call[Integer.parseInt, parameter[member[.readTi]]]]] local_variable[type[String], writeReTi] call[factoryAppBeans.setWriteReTi, parameter[call[Integer.parseInt, parameter[member[.writeReTi]]]]] local_variable[type[String], wrReSpTr] call[factoryAppBeans.setWrReSpTr, parameter[call[Boolean.valueOf, parameter[member[.wrReSpTr]]]]] local_variable[type[String], fastLoc] call[factoryAppBeans.setFastLoc, parameter[call[Boolean.parseBoolean, parameter[member[.fastLoc]]]]] local_variable[type[String], jdbcUrl] if[binary_operation[binary_operation[member[.jdbcUrl], !=, literal[null]], &&, call[jdbcUrl.contains, parameter[member[ASrvOrm.WORD_CURRENT_DIR]]]]] begin[{] assign[member[.jdbcUrl], call[jdbcUrl.replace, parameter[member[ASrvOrm.WORD_CURRENT_DIR], binary_operation[call[factoryAppBeans.getWebAppPath, parameter[]], +, member[File.separator]]]]] else begin[{] if[binary_operation[binary_operation[member[.jdbcUrl], !=, literal[null]], &&, call[jdbcUrl.contains, parameter[member[ASrvOrm.WORD_CURRENT_PARENT_DIR]]]]] begin[{] local_variable[type[File], fcd] assign[member[.jdbcUrl], call[jdbcUrl.replace, parameter[member[ASrvOrm.WORD_CURRENT_PARENT_DIR], binary_operation[call[fcd.getParent, parameter[]], +, member[File.separator]]]]] else begin[{] None end[}] end[}] local_variable[type[String], langCountriesStr] local_variable[type[List], lngCntLst] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=lngCntLst, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=",")], member=split, postfix_operators=[], prefix_operators=[], qualifier=langCountriesStr, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=str)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) local_variable[type[String], lngCntArr] call[factoryAppBeans.lazyGetSrvI18n, parameter[]] local_variable[type[LstnDbChanged], lstnDbChanged] call[lstnDbChanged.setFactoryAndServlet, parameter[member[.pFactoryAndServlet]]] call[factoryAppBeans.getListenersDbChanged, parameter[]] call[factoryAppBeans.setDatabaseName, parameter[member[.jdbcUrl]]] local_variable[type[String], databaseUser] call[factoryAppBeans.setDatabaseUser, parameter[member[.databaseUser]]] local_variable[type[String], databasePassword] call[factoryAppBeans.setDatabasePassword, parameter[member[.databasePassword]]] call[pFactoryAndServlet.getHttpServlet, parameter[]] call[pFactoryAndServlet.getHttpServlet, parameter[]] call[factoryAppBeans.lazyGet, parameter[literal["ISrvOrm"]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[synchronized] Keyword[void] identifier[makeWith] operator[SEP] Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[pReqVars] , Keyword[final] identifier[FactoryAndServlet] identifier[pFactoryAndServlet] operator[SEP] Keyword[throws] identifier[Exception] { annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] identifier[AFactoryAppBeans] operator[<] identifier[RS] operator[>] identifier[factoryAppBeans] operator[=] operator[SEP] identifier[AFactoryAppBeans] operator[<] identifier[RS] operator[>] operator[SEP] identifier[pFactoryAndServlet] operator[SEP] identifier[getFactoryAppBeans] operator[SEP] operator[SEP] operator[SEP] identifier[File] identifier[webAppPath] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] identifier[getRealPath] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setWebAppPath] operator[SEP] identifier[webAppPath] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[isShowDebugMessagesStr] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setIsShowDebugMessages] operator[SEP] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[isShowDebugMessagesStr] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[detailLevelStr] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setDetailLevel] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[detailLevelStr] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[newDatabaseIdStr] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setNewDatabaseId] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[newDatabaseIdStr] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[ormSettingsDir] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setOrmSettingsDir] operator[SEP] identifier[ormSettingsDir] operator[SEP] operator[SEP] identifier[String] identifier[ormSettingsBaseFile] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setOrmSettingsBaseFile] operator[SEP] identifier[ormSettingsBaseFile] operator[SEP] operator[SEP] identifier[String] identifier[uvdSettingsDir] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setUvdSettingsDir] operator[SEP] identifier[uvdSettingsDir] operator[SEP] operator[SEP] identifier[String] identifier[uvdSettingsBaseFile] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setUvdSettingsBaseFile] operator[SEP] identifier[uvdSettingsBaseFile] operator[SEP] operator[SEP] identifier[String] identifier[writeTi] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setWriteTi] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[writeTi] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[readTi] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setReadTi] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[readTi] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[writeReTi] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setWriteReTi] operator[SEP] identifier[Integer] operator[SEP] identifier[parseInt] operator[SEP] identifier[writeReTi] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[wrReSpTr] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setWrReSpTr] operator[SEP] identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[wrReSpTr] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[fastLoc] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setFastLoc] operator[SEP] identifier[Boolean] operator[SEP] identifier[parseBoolean] operator[SEP] identifier[fastLoc] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[jdbcUrl] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jdbcUrl] operator[!=] Other[null] operator[&&] identifier[jdbcUrl] operator[SEP] identifier[contains] operator[SEP] identifier[ASrvOrm] operator[SEP] identifier[WORD_CURRENT_DIR] operator[SEP] operator[SEP] { identifier[jdbcUrl] operator[=] identifier[jdbcUrl] operator[SEP] identifier[replace] operator[SEP] identifier[ASrvOrm] operator[SEP] identifier[WORD_CURRENT_DIR] , identifier[factoryAppBeans] operator[SEP] identifier[getWebAppPath] operator[SEP] operator[SEP] operator[+] identifier[File] operator[SEP] identifier[separator] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[jdbcUrl] operator[!=] Other[null] operator[&&] identifier[jdbcUrl] operator[SEP] identifier[contains] operator[SEP] identifier[ASrvOrm] operator[SEP] identifier[WORD_CURRENT_PARENT_DIR] operator[SEP] operator[SEP] { identifier[File] identifier[fcd] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[getWebAppPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[jdbcUrl] operator[=] identifier[jdbcUrl] operator[SEP] identifier[replace] operator[SEP] identifier[ASrvOrm] operator[SEP] identifier[WORD_CURRENT_PARENT_DIR] , identifier[fcd] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[+] identifier[File] operator[SEP] identifier[separator] operator[SEP] operator[SEP] } identifier[String] identifier[langCountriesStr] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[lngCntLst] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[str] operator[:] identifier[langCountriesStr] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[lngCntLst] operator[SEP] identifier[add] operator[SEP] identifier[str] operator[SEP] operator[SEP] } identifier[String] operator[SEP] operator[SEP] identifier[lngCntArr] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[lngCntLst] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[lazyGetSrvI18n] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[lngCntLst] operator[SEP] identifier[toArray] operator[SEP] identifier[lngCntArr] operator[SEP] operator[SEP] operator[SEP] identifier[LstnDbChanged] operator[<] identifier[RS] operator[>] identifier[lstnDbChanged] operator[=] Keyword[new] identifier[LstnDbChanged] operator[<] identifier[RS] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[lstnDbChanged] operator[SEP] identifier[setFactoryAndServlet] operator[SEP] identifier[pFactoryAndServlet] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[getListenersDbChanged] operator[SEP] operator[SEP] operator[SEP] identifier[add] operator[SEP] identifier[lstnDbChanged] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setDatabaseName] operator[SEP] identifier[jdbcUrl] operator[SEP] operator[SEP] identifier[String] identifier[databaseUser] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setDatabaseUser] operator[SEP] identifier[databaseUser] operator[SEP] operator[SEP] identifier[String] identifier[databasePassword] operator[=] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getInitParameter] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[setDatabasePassword] operator[SEP] identifier[databasePassword] operator[SEP] operator[SEP] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[factoryAppBeans] operator[SEP] identifier[lazyGet] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[pFactoryAndServlet] operator[SEP] identifier[getHttpServlet] operator[SEP] operator[SEP] operator[SEP] identifier[getServletContext] operator[SEP] operator[SEP] operator[SEP] identifier[setAttribute] operator[SEP] literal[String] , identifier[factoryAppBeans] operator[SEP] identifier[lazyGet] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[factoryAppBeans] operator[SEP] identifier[lazyGet] operator[SEP] literal[String] operator[SEP] operator[SEP] }
private String encodeURL(String url) { return url.startsWith("/") || url.startsWith(".") ? url : url.startsWith("web/") ? "/" + url : "/web/" + url; }
class class_name[name] begin[{] method[encodeURL, return_type[type[String]], modifier[private], parameter[url]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None), operator=||), if_false=TernaryExpression(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="web/")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=url, selectors=[], type_arguments=None), if_false=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/web/"), operandr=MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), if_true=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operandr=MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), if_true=MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] end[}] END[}]
Keyword[private] identifier[String] identifier[encodeURL] operator[SEP] identifier[String] identifier[url] operator[SEP] { Keyword[return] identifier[url] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[||] identifier[url] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[?] identifier[url] operator[:] identifier[url] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[?] literal[String] operator[+] identifier[url] operator[:] literal[String] operator[+] identifier[url] operator[SEP] }
public static Scriptable getFunctionPrototype(Scriptable scope) { return TopLevel.getBuiltinPrototype(getTopLevelScope(scope), TopLevel.Builtins.Function); }
class class_name[name] begin[{] method[getFunctionPrototype, return_type[type[Scriptable]], modifier[public static], parameter[scope]] begin[{] return[call[TopLevel.getBuiltinPrototype, parameter[call[.getTopLevelScope, parameter[member[.scope]]], member[TopLevel.Builtins.Function]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Scriptable] identifier[getFunctionPrototype] operator[SEP] identifier[Scriptable] identifier[scope] operator[SEP] { Keyword[return] identifier[TopLevel] operator[SEP] identifier[getBuiltinPrototype] operator[SEP] identifier[getTopLevelScope] operator[SEP] identifier[scope] operator[SEP] , identifier[TopLevel] operator[SEP] identifier[Builtins] operator[SEP] identifier[Function] operator[SEP] operator[SEP] }
public BankcardRecognitionResponse bankcardRecognition(BankcardRecognitionRequest request) { checkNotNull(request, "request should not be null."); checkStringNotEmpty(request.getImage(), "Image should not be null or empty!"); InternalRequest internalRequest = createRequest(HttpMethodName.POST, request, PARA_BANK); return invokeHttpClient(internalRequest, BankcardRecognitionResponse.class); }
class class_name[name] begin[{] method[bankcardRecognition, return_type[type[BankcardRecognitionResponse]], modifier[public], parameter[request]] begin[{] call[.checkNotNull, parameter[member[.request], literal["request should not be null."]]] call[.checkStringNotEmpty, parameter[call[request.getImage, parameter[]], literal["Image should not be null or empty!"]]] local_variable[type[InternalRequest], internalRequest] return[call[.invokeHttpClient, parameter[member[.internalRequest], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BankcardRecognitionResponse, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[BankcardRecognitionResponse] identifier[bankcardRecognition] operator[SEP] identifier[BankcardRecognitionRequest] identifier[request] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[request] , literal[String] operator[SEP] operator[SEP] identifier[checkStringNotEmpty] operator[SEP] identifier[request] operator[SEP] identifier[getImage] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[InternalRequest] identifier[internalRequest] operator[=] identifier[createRequest] operator[SEP] identifier[HttpMethodName] operator[SEP] identifier[POST] , identifier[request] , identifier[PARA_BANK] operator[SEP] operator[SEP] Keyword[return] identifier[invokeHttpClient] operator[SEP] identifier[internalRequest] , identifier[BankcardRecognitionResponse] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public static File writeUtf8String(String content, String path) throws IORuntimeException { return writeString(content, path, CharsetUtil.CHARSET_UTF_8); }
class class_name[name] begin[{] method[writeUtf8String, return_type[type[File]], modifier[public static], parameter[content, path]] begin[{] return[call[.writeString, parameter[member[.content], member[.path], member[CharsetUtil.CHARSET_UTF_8]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[File] identifier[writeUtf8String] operator[SEP] identifier[String] identifier[content] , identifier[String] identifier[path] operator[SEP] Keyword[throws] identifier[IORuntimeException] { Keyword[return] identifier[writeString] operator[SEP] identifier[content] , identifier[path] , identifier[CharsetUtil] operator[SEP] identifier[CHARSET_UTF_8] operator[SEP] operator[SEP] }
public static String createTypeSignature(final String methodName, final Class<?>[] paramTypes) { final StringBuffer sb = new StringBuffer(); sb.append(methodName); sb.append("("); for (int i = 0; i < paramTypes.length; i++) { if (i > 0) { sb.append(", "); } sb.append(paramTypes[i].getSimpleName()); } sb.append(")"); return sb.toString(); }
class class_name[name] begin[{] method[createTypeSignature, return_type[type[String]], modifier[public static], parameter[methodName, paramTypes]] begin[{] local_variable[type[StringBuffer], sb] call[sb.append, parameter[member[.methodName]]] call[sb.append, parameter[literal["("]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=", ")], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=paramTypes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[], member=getSimpleName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], member=append, postfix_operators=[], prefix_operators=[], qualifier=sb, 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=paramTypes, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[sb.append, parameter[literal[")"]]] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[createTypeSignature] operator[SEP] Keyword[final] identifier[String] identifier[methodName] , Keyword[final] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[paramTypes] operator[SEP] { Keyword[final] identifier[StringBuffer] identifier[sb] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[methodName] operator[SEP] operator[SEP] identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[paramTypes] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[i] operator[>] Other[0] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[paramTypes] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getSimpleName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
private void handleAsyncError(boolean forceQueue, IOException exception, TCPReadCompletedCallback inCallback) { boolean fireHere = true; if (forceQueue) { // Error must be returned on a separate thread. // Reuse queuedWork object (performance), but reset the error parameters. queuedWork.setErrorParameters(getConnLink().getVirtualConnection(), this, inCallback, exception); EventEngine events = SSLChannelProvider.getEventService(); if (null == events) { Exception e = new Exception("missing event service"); FFDCFilter.processException(e, getClass().getName(), "503", this); // fall-thru below and use callback here regardless } else { // fire an event to continue this queued work Event event = events.createEvent(SSLEventHandler.TOPIC_QUEUED_WORK); event.setProperty(SSLEventHandler.KEY_RUNNABLE, this.queuedWork); events.postEvent(event); fireHere = false; } } if (fireHere) { // Call the callback right here. inCallback.error(getConnLink().getVirtualConnection(), this, exception); } }
class class_name[name] begin[{] method[handleAsyncError, return_type[void], modifier[private], parameter[forceQueue, exception, inCallback]] begin[{] local_variable[type[boolean], fireHere] if[member[.forceQueue]] begin[{] call[queuedWork.setErrorParameters, parameter[call[.getConnLink, parameter[]], THIS[], member[.inCallback], member[.exception]]] local_variable[type[EventEngine], events] if[binary_operation[literal[null], ==, member[.events]]] begin[{] local_variable[type[Exception], e] call[FFDCFilter.processException, parameter[member[.e], call[.getClass, parameter[]], literal["503"], THIS[]]] else begin[{] local_variable[type[Event], event] call[event.setProperty, parameter[member[SSLEventHandler.KEY_RUNNABLE], THIS[member[None.queuedWork]]]] call[events.postEvent, parameter[member[.event]]] assign[member[.fireHere], literal[false]] end[}] else begin[{] None end[}] if[member[.fireHere]] begin[{] call[inCallback.error, parameter[call[.getConnLink, parameter[]], THIS[], member[.exception]]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[handleAsyncError] operator[SEP] Keyword[boolean] identifier[forceQueue] , identifier[IOException] identifier[exception] , identifier[TCPReadCompletedCallback] identifier[inCallback] operator[SEP] { Keyword[boolean] identifier[fireHere] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[forceQueue] operator[SEP] { identifier[queuedWork] operator[SEP] identifier[setErrorParameters] operator[SEP] identifier[getConnLink] operator[SEP] operator[SEP] operator[SEP] identifier[getVirtualConnection] operator[SEP] operator[SEP] , Keyword[this] , identifier[inCallback] , identifier[exception] operator[SEP] operator[SEP] identifier[EventEngine] identifier[events] operator[=] identifier[SSLChannelProvider] operator[SEP] identifier[getEventService] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Other[null] operator[==] identifier[events] operator[SEP] { identifier[Exception] identifier[e] operator[=] Keyword[new] identifier[Exception] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , literal[String] , Keyword[this] operator[SEP] operator[SEP] } Keyword[else] { identifier[Event] identifier[event] operator[=] identifier[events] operator[SEP] identifier[createEvent] operator[SEP] identifier[SSLEventHandler] operator[SEP] identifier[TOPIC_QUEUED_WORK] operator[SEP] operator[SEP] identifier[event] operator[SEP] identifier[setProperty] operator[SEP] identifier[SSLEventHandler] operator[SEP] identifier[KEY_RUNNABLE] , Keyword[this] operator[SEP] identifier[queuedWork] operator[SEP] operator[SEP] identifier[events] operator[SEP] identifier[postEvent] operator[SEP] identifier[event] operator[SEP] operator[SEP] identifier[fireHere] operator[=] literal[boolean] operator[SEP] } } Keyword[if] operator[SEP] identifier[fireHere] operator[SEP] { identifier[inCallback] operator[SEP] identifier[error] operator[SEP] identifier[getConnLink] operator[SEP] operator[SEP] operator[SEP] identifier[getVirtualConnection] operator[SEP] operator[SEP] , Keyword[this] , identifier[exception] operator[SEP] operator[SEP] } }
public AclActions getPermission(String user, List<String> groups) { if (user.equals(mOwningUser)) { return new AclActions(getOwningUserActions()); } if (hasExtended()) { AclActions actions = mExtendedEntries.getNamedUser(user); if (actions != null) { AclActions result = new AclActions(actions); result.mask(mExtendedEntries.mMaskActions); return result; } } boolean isGroupKnown = false; AclActions groupActions = new AclActions(); if (groups.contains(mOwningGroup)) { isGroupKnown = true; groupActions.merge(getOwningGroupActions()); } if (hasExtended()) { for (String group : groups) { AclActions actions = mExtendedEntries.getNamedGroup(group); if (actions != null) { isGroupKnown = true; groupActions.merge(actions); } } } if (isGroupKnown) { if (hasExtended()) { groupActions.mask(mExtendedEntries.mMaskActions); } return groupActions; } return getOtherActions(); }
class class_name[name] begin[{] method[getPermission, return_type[type[AclActions]], modifier[public], parameter[user, groups]] begin[{] if[call[user.equals, parameter[member[.mOwningUser]]]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getOwningUserActions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AclActions, sub_type=None))] else begin[{] None end[}] if[call[.hasExtended, parameter[]]] begin[{] local_variable[type[AclActions], actions] if[binary_operation[member[.actions], !=, literal[null]]] begin[{] local_variable[type[AclActions], result] call[result.mask, parameter[member[mExtendedEntries.mMaskActions]]] return[member[.result]] else begin[{] None end[}] else begin[{] None end[}] local_variable[type[boolean], isGroupKnown] local_variable[type[AclActions], groupActions] if[call[groups.contains, parameter[member[.mOwningGroup]]]] begin[{] assign[member[.isGroupKnown], literal[true]] call[groupActions.merge, parameter[call[.getOwningGroupActions, parameter[]]]] else begin[{] None end[}] if[call[.hasExtended, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=group, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getNamedGroup, postfix_operators=[], prefix_operators=[], qualifier=mExtendedEntries, selectors=[], type_arguments=None), name=actions)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=AclActions, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=actions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=isGroupKnown, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=actions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=merge, postfix_operators=[], prefix_operators=[], qualifier=groupActions, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=groups, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=group)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) else begin[{] None end[}] if[member[.isGroupKnown]] begin[{] if[call[.hasExtended, parameter[]]] begin[{] call[groupActions.mask, parameter[member[mExtendedEntries.mMaskActions]]] else begin[{] None end[}] return[member[.groupActions]] else begin[{] None end[}] return[call[.getOtherActions, parameter[]]] end[}] END[}]
Keyword[public] identifier[AclActions] identifier[getPermission] operator[SEP] identifier[String] identifier[user] , identifier[List] operator[<] identifier[String] operator[>] identifier[groups] operator[SEP] { Keyword[if] operator[SEP] identifier[user] operator[SEP] identifier[equals] operator[SEP] identifier[mOwningUser] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[AclActions] operator[SEP] identifier[getOwningUserActions] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[hasExtended] operator[SEP] operator[SEP] operator[SEP] { identifier[AclActions] identifier[actions] operator[=] identifier[mExtendedEntries] operator[SEP] identifier[getNamedUser] operator[SEP] identifier[user] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[actions] operator[!=] Other[null] operator[SEP] { identifier[AclActions] identifier[result] operator[=] Keyword[new] identifier[AclActions] operator[SEP] identifier[actions] operator[SEP] operator[SEP] identifier[result] operator[SEP] identifier[mask] operator[SEP] identifier[mExtendedEntries] operator[SEP] identifier[mMaskActions] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] } } Keyword[boolean] identifier[isGroupKnown] operator[=] literal[boolean] operator[SEP] identifier[AclActions] identifier[groupActions] operator[=] Keyword[new] identifier[AclActions] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[groups] operator[SEP] identifier[contains] operator[SEP] identifier[mOwningGroup] operator[SEP] operator[SEP] { identifier[isGroupKnown] operator[=] literal[boolean] operator[SEP] identifier[groupActions] operator[SEP] identifier[merge] operator[SEP] identifier[getOwningGroupActions] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[hasExtended] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[String] identifier[group] operator[:] identifier[groups] operator[SEP] { identifier[AclActions] identifier[actions] operator[=] identifier[mExtendedEntries] operator[SEP] identifier[getNamedGroup] operator[SEP] identifier[group] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[actions] operator[!=] Other[null] operator[SEP] { identifier[isGroupKnown] operator[=] literal[boolean] operator[SEP] identifier[groupActions] operator[SEP] identifier[merge] operator[SEP] identifier[actions] operator[SEP] operator[SEP] } } } Keyword[if] operator[SEP] identifier[isGroupKnown] operator[SEP] { Keyword[if] operator[SEP] identifier[hasExtended] operator[SEP] operator[SEP] operator[SEP] { identifier[groupActions] operator[SEP] identifier[mask] operator[SEP] identifier[mExtendedEntries] operator[SEP] identifier[mMaskActions] operator[SEP] operator[SEP] } Keyword[return] identifier[groupActions] operator[SEP] } Keyword[return] identifier[getOtherActions] operator[SEP] operator[SEP] operator[SEP] }
public void password(final String password) { SetupHelper helper = DependencyManager.getOrCreate(SetupHelper.class); helper.setPassword(password); }
class class_name[name] begin[{] method[password, return_type[void], modifier[public], parameter[password]] begin[{] local_variable[type[SetupHelper], helper] call[helper.setPassword, parameter[member[.password]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[password] operator[SEP] Keyword[final] identifier[String] identifier[password] operator[SEP] { identifier[SetupHelper] identifier[helper] operator[=] identifier[DependencyManager] operator[SEP] identifier[getOrCreate] operator[SEP] identifier[SetupHelper] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[helper] operator[SEP] identifier[setPassword] operator[SEP] identifier[password] operator[SEP] operator[SEP] }
public static CqlDuration from(@NonNull String input) { boolean isNegative = input.startsWith("-"); String source = isNegative ? input.substring(1) : input; if (source.startsWith("P")) { if (source.endsWith("W")) { return parseIso8601WeekFormat(isNegative, source); } if (source.contains("-")) { return parseIso8601AlternativeFormat(isNegative, source); } return parseIso8601Format(isNegative, source); } return parseStandardFormat(isNegative, source); }
class class_name[name] begin[{] method[from, return_type[type[CqlDuration]], modifier[public static], parameter[input]] begin[{] local_variable[type[boolean], isNegative] local_variable[type[String], source] if[call[source.startsWith, parameter[literal["P"]]]] begin[{] if[call[source.endsWith, parameter[literal["W"]]]] begin[{] return[call[.parseIso8601WeekFormat, parameter[member[.isNegative], member[.source]]]] else begin[{] None end[}] if[call[source.contains, parameter[literal["-"]]]] begin[{] return[call[.parseIso8601AlternativeFormat, parameter[member[.isNegative], member[.source]]]] else begin[{] None end[}] return[call[.parseIso8601Format, parameter[member[.isNegative], member[.source]]]] else begin[{] None end[}] return[call[.parseStandardFormat, parameter[member[.isNegative], member[.source]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CqlDuration] identifier[from] operator[SEP] annotation[@] identifier[NonNull] identifier[String] identifier[input] operator[SEP] { Keyword[boolean] identifier[isNegative] operator[=] identifier[input] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[source] operator[=] identifier[isNegative] operator[?] identifier[input] operator[SEP] identifier[substring] operator[SEP] Other[1] operator[SEP] operator[:] identifier[input] operator[SEP] Keyword[if] operator[SEP] identifier[source] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[source] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[parseIso8601WeekFormat] operator[SEP] identifier[isNegative] , identifier[source] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[source] operator[SEP] identifier[contains] operator[SEP] literal[String] operator[SEP] operator[SEP] { Keyword[return] identifier[parseIso8601AlternativeFormat] operator[SEP] identifier[isNegative] , identifier[source] operator[SEP] operator[SEP] } Keyword[return] identifier[parseIso8601Format] operator[SEP] identifier[isNegative] , identifier[source] operator[SEP] operator[SEP] } Keyword[return] identifier[parseStandardFormat] operator[SEP] identifier[isNegative] , identifier[source] operator[SEP] operator[SEP] }
public void marshall(ReplicationTaskStats replicationTaskStats, ProtocolMarshaller protocolMarshaller) { if (replicationTaskStats == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(replicationTaskStats.getFullLoadProgressPercent(), FULLLOADPROGRESSPERCENT_BINDING); protocolMarshaller.marshall(replicationTaskStats.getElapsedTimeMillis(), ELAPSEDTIMEMILLIS_BINDING); protocolMarshaller.marshall(replicationTaskStats.getTablesLoaded(), TABLESLOADED_BINDING); protocolMarshaller.marshall(replicationTaskStats.getTablesLoading(), TABLESLOADING_BINDING); protocolMarshaller.marshall(replicationTaskStats.getTablesQueued(), TABLESQUEUED_BINDING); protocolMarshaller.marshall(replicationTaskStats.getTablesErrored(), TABLESERRORED_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[replicationTaskStats, protocolMarshaller]] begin[{] if[binary_operation[member[.replicationTaskStats], ==, 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=getFullLoadProgressPercent, postfix_operators=[], prefix_operators=[], qualifier=replicationTaskStats, selectors=[], type_arguments=None), MemberReference(member=FULLLOADPROGRESSPERCENT_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=getElapsedTimeMillis, postfix_operators=[], prefix_operators=[], qualifier=replicationTaskStats, selectors=[], type_arguments=None), MemberReference(member=ELAPSEDTIMEMILLIS_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=getTablesLoaded, postfix_operators=[], prefix_operators=[], qualifier=replicationTaskStats, selectors=[], type_arguments=None), MemberReference(member=TABLESLOADED_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=getTablesLoading, postfix_operators=[], prefix_operators=[], qualifier=replicationTaskStats, selectors=[], type_arguments=None), MemberReference(member=TABLESLOADING_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=getTablesQueued, postfix_operators=[], prefix_operators=[], qualifier=replicationTaskStats, selectors=[], type_arguments=None), MemberReference(member=TABLESQUEUED_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=getTablesErrored, postfix_operators=[], prefix_operators=[], qualifier=replicationTaskStats, selectors=[], type_arguments=None), MemberReference(member=TABLESERRORED_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[ReplicationTaskStats] identifier[replicationTaskStats] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[replicationTaskStats] 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[replicationTaskStats] operator[SEP] identifier[getFullLoadProgressPercent] operator[SEP] operator[SEP] , identifier[FULLLOADPROGRESSPERCENT_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[replicationTaskStats] operator[SEP] identifier[getElapsedTimeMillis] operator[SEP] operator[SEP] , identifier[ELAPSEDTIMEMILLIS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[replicationTaskStats] operator[SEP] identifier[getTablesLoaded] operator[SEP] operator[SEP] , identifier[TABLESLOADED_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[replicationTaskStats] operator[SEP] identifier[getTablesLoading] operator[SEP] operator[SEP] , identifier[TABLESLOADING_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[replicationTaskStats] operator[SEP] identifier[getTablesQueued] operator[SEP] operator[SEP] , identifier[TABLESQUEUED_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[replicationTaskStats] operator[SEP] identifier[getTablesErrored] operator[SEP] operator[SEP] , identifier[TABLESERRORED_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
public static void loadFromDiskAnd( DataFileManager manager, IndyObjectMapper serializer, final ChangeSummary summary, Consumer<ArtifactStore> consumer ) { loadFromDiskAnd( manager, serializer, null, summary, consumer ); }
class class_name[name] begin[{] method[loadFromDiskAnd, return_type[void], modifier[public static], parameter[manager, serializer, summary, consumer]] begin[{] call[.loadFromDiskAnd, parameter[member[.manager], member[.serializer], literal[null], member[.summary], member[.consumer]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[loadFromDiskAnd] operator[SEP] identifier[DataFileManager] identifier[manager] , identifier[IndyObjectMapper] identifier[serializer] , Keyword[final] identifier[ChangeSummary] identifier[summary] , identifier[Consumer] operator[<] identifier[ArtifactStore] operator[>] identifier[consumer] operator[SEP] { identifier[loadFromDiskAnd] operator[SEP] identifier[manager] , identifier[serializer] , Other[null] , identifier[summary] , identifier[consumer] operator[SEP] operator[SEP] }
public static <T> Stream<T> cycle(T...items) { return IntStream.iterate(0, i -> i == items.length - 1 ? 0 : i + 1).mapToObj(i -> items[i]); }
class class_name[name] begin[{] method[cycle, return_type[type[Stream]], modifier[public static], parameter[items]] begin[{] return[call[IntStream.iterate, parameter[literal[0], LambdaExpression(body=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=items, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator===), if_false=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), parameters=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[Stream] operator[<] identifier[T] operator[>] identifier[cycle] operator[SEP] identifier[T] operator[...] identifier[items] operator[SEP] { Keyword[return] identifier[IntStream] operator[SEP] identifier[iterate] operator[SEP] Other[0] , identifier[i] operator[->] identifier[i] operator[==] identifier[items] operator[SEP] identifier[length] operator[-] Other[1] operator[?] Other[0] operator[:] identifier[i] operator[+] Other[1] operator[SEP] operator[SEP] identifier[mapToObj] operator[SEP] identifier[i] operator[->] identifier[items] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] }
@SafeVarargs public static <T> UnmodIterable<T> xformArray(T... items) { return Xform.of(Arrays.asList(items)); }
class class_name[name] begin[{] method[xformArray, return_type[type[UnmodIterable]], modifier[public static], parameter[items]] begin[{] return[call[Xform.of, parameter[call[Arrays.asList, parameter[member[.items]]]]]] end[}] END[}]
annotation[@] identifier[SafeVarargs] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] identifier[UnmodIterable] operator[<] identifier[T] operator[>] identifier[xformArray] operator[SEP] identifier[T] operator[...] identifier[items] operator[SEP] { Keyword[return] identifier[Xform] operator[SEP] identifier[of] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[items] operator[SEP] operator[SEP] operator[SEP] }
public void createUniqueData() { LoginGenerator.LoginRecord unique_login; unique_login = random_login_generator.createUniqueLogin("voltdb", true); doLogin(unique_login); unique_login = random_login_generator.createUniqueLogin("voltdb2", false); doLogin(unique_login); }
class class_name[name] begin[{] method[createUniqueData, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[LoginGenerator], unique_login] assign[member[.unique_login], call[random_login_generator.createUniqueLogin, parameter[literal["voltdb"], literal[true]]]] call[.doLogin, parameter[member[.unique_login]]] assign[member[.unique_login], call[random_login_generator.createUniqueLogin, parameter[literal["voltdb2"], literal[false]]]] call[.doLogin, parameter[member[.unique_login]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[createUniqueData] operator[SEP] operator[SEP] { identifier[LoginGenerator] operator[SEP] identifier[LoginRecord] identifier[unique_login] operator[SEP] identifier[unique_login] operator[=] identifier[random_login_generator] operator[SEP] identifier[createUniqueLogin] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[doLogin] operator[SEP] identifier[unique_login] operator[SEP] operator[SEP] identifier[unique_login] operator[=] identifier[random_login_generator] operator[SEP] identifier[createUniqueLogin] operator[SEP] literal[String] , literal[boolean] operator[SEP] operator[SEP] identifier[doLogin] operator[SEP] identifier[unique_login] operator[SEP] operator[SEP] }
public boolean contains(int o) { if (isEmpty() || o > last || o < 0) { return false; } // check if the element is within a literal word int block = maxLiteralLengthDivision(o); int bit = maxLiteralLengthModulus(o); for (int i = 0; i <= lastWordIndex; i++) { final int w = words[i]; final int t = w & 0xC0000000; // the first two bits... switch (t) { case 0x80000000: // LITERAL case 0xC0000000: // LITERAL // check if the current literal word is the "right" one if (block == 0) { return (w & (1 << bit)) != 0; } block--; break; case 0x00000000: // ZERO SEQUENCE if (!simulateWAH) { if (block == 0 && ((w >> 25) - 1) == bit) { return true; } } block -= getSequenceCount(w) + 1; if (block < 0) { return false; } break; case 0x40000000: // ONE SEQUENCE if (!simulateWAH) { if (block == 0 && (0x0000001F & (w >> 25) - 1) == bit) { return false; } } block -= getSequenceCount(w) + 1; if (block < 0) { return true; } break; } } // no more words return false; }
class class_name[name] begin[{] method[contains, return_type[type[boolean]], modifier[public], parameter[o]] begin[{] if[binary_operation[binary_operation[call[.isEmpty, parameter[]], ||, binary_operation[member[.o], >, member[.last]]], ||, binary_operation[member[.o], <, literal[0]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[int], block] local_variable[type[int], bit] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=words, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=w)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xC0000000), operator=&), name=t)], modifiers={'final'}, type=BasicType(dimensions=[], name=int)), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x80000000), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xC0000000)], statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=MemberReference(member=bit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<<), operator=&), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=!=), label=None)])), StatementExpression(expression=MemberReference(member=block, postfix_operators=['--'], prefix_operators=[], qualifier=, selectors=[]), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x00000000)], statements=[IfStatement(condition=MemberReference(member=simulateWAH, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25), operator=>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operandr=MemberReference(member=bit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSequenceCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)])), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x40000000)], statements=[IfStatement(condition=MemberReference(member=simulateWAH, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[]), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), operandr=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0x0000001F), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25), operator=>>), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=-), operator=&), operandr=MemberReference(member=bit, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))])), StatementExpression(expression=Assignment(expressionl=MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=-=, value=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=w, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSequenceCount, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=+)), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=<), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)])), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=t, 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=lastWordIndex, 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) return[literal[false]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[contains] operator[SEP] Keyword[int] identifier[o] operator[SEP] { Keyword[if] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[||] identifier[o] operator[>] identifier[last] operator[||] identifier[o] operator[<] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[int] identifier[block] operator[=] identifier[maxLiteralLengthDivision] operator[SEP] identifier[o] operator[SEP] operator[SEP] Keyword[int] identifier[bit] operator[=] identifier[maxLiteralLengthModulus] operator[SEP] identifier[o] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<=] identifier[lastWordIndex] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[final] Keyword[int] identifier[w] operator[=] identifier[words] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[t] operator[=] identifier[w] operator[&] literal[Integer] operator[SEP] Keyword[switch] operator[SEP] identifier[t] operator[SEP] { Keyword[case] literal[Integer] operator[:] Keyword[case] literal[Integer] operator[:] Keyword[if] operator[SEP] identifier[block] operator[==] Other[0] operator[SEP] { Keyword[return] operator[SEP] identifier[w] operator[&] operator[SEP] Other[1] operator[<<] identifier[bit] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] } identifier[block] operator[--] operator[SEP] Keyword[break] operator[SEP] Keyword[case] literal[Integer] operator[:] Keyword[if] operator[SEP] operator[!] identifier[simulateWAH] operator[SEP] { Keyword[if] operator[SEP] identifier[block] operator[==] Other[0] operator[&&] operator[SEP] operator[SEP] identifier[w] operator[>] operator[>] Other[25] operator[SEP] operator[-] Other[1] operator[SEP] operator[==] identifier[bit] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } identifier[block] operator[-=] identifier[getSequenceCount] operator[SEP] identifier[w] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[block] operator[<] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[break] operator[SEP] Keyword[case] literal[Integer] operator[:] Keyword[if] operator[SEP] operator[!] identifier[simulateWAH] operator[SEP] { Keyword[if] operator[SEP] identifier[block] operator[==] Other[0] operator[&&] operator[SEP] literal[Integer] operator[&] operator[SEP] identifier[w] operator[>] operator[>] Other[25] operator[SEP] operator[-] Other[1] operator[SEP] operator[==] identifier[bit] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } identifier[block] operator[-=] identifier[getSequenceCount] operator[SEP] identifier[w] operator[SEP] operator[+] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[block] operator[<] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[break] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public void populate() throws Exception { for (int i = 0; i < _initialCapacity; i++) { String str = "key." + i; byte[] key = str.getBytes(); byte[] value = createDataForKey(str); _store.put(key, value); } _store.sync(); }
class class_name[name] begin[{] method[populate, return_type[void], modifier[public], parameter[]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="key."), operandr=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), name=str)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getBytes, postfix_operators=[], prefix_operators=[], qualifier=str, selectors=[], type_arguments=None), name=key)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=str, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createDataForKey, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=_store, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=_initialCapacity, 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) call[_store.sync, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[populate] operator[SEP] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[_initialCapacity] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[String] identifier[str] operator[=] literal[String] operator[+] identifier[i] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[key] operator[=] identifier[str] operator[SEP] identifier[getBytes] operator[SEP] operator[SEP] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[value] operator[=] identifier[createDataForKey] operator[SEP] identifier[str] operator[SEP] operator[SEP] identifier[_store] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[value] operator[SEP] operator[SEP] } identifier[_store] operator[SEP] identifier[sync] operator[SEP] operator[SEP] operator[SEP] }
public void grantOwnership(Jid jid) throws XMPPErrorException, NoResponseException, NotConnectedException, InterruptedException { changeAffiliationByAdmin(jid, MUCAffiliation.owner, null); }
class class_name[name] begin[{] method[grantOwnership, return_type[void], modifier[public], parameter[jid]] begin[{] call[.changeAffiliationByAdmin, parameter[member[.jid], member[MUCAffiliation.owner], literal[null]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[grantOwnership] operator[SEP] identifier[Jid] identifier[jid] operator[SEP] Keyword[throws] identifier[XMPPErrorException] , identifier[NoResponseException] , identifier[NotConnectedException] , identifier[InterruptedException] { identifier[changeAffiliationByAdmin] operator[SEP] identifier[jid] , identifier[MUCAffiliation] operator[SEP] identifier[owner] , Other[null] operator[SEP] operator[SEP] }
public static BitString convertDoubleToFixedPointBits(double value) { if (value < 0.0d || value >= 1.0d) { throw new IllegalArgumentException("Value must be between 0 and 1."); } StringBuilder bits = new StringBuilder(64); double bitValue = 0.5d; double d = value; while (d > 0) { if (d >= bitValue) { bits.append('1'); d -= bitValue; } else { bits.append('0'); } bitValue /= 2; } return new BitString(bits.toString()); }
class class_name[name] begin[{] method[convertDoubleToFixedPointBits, return_type[type[BitString]], modifier[public static], parameter[value]] begin[{] if[binary_operation[binary_operation[member[.value], <, literal[0.0d]], ||, binary_operation[member[.value], >=, literal[1.0d]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Value must be between 0 and 1.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[StringBuilder], bits] local_variable[type[double], bitValue] local_variable[type[double], d] while[binary_operation[member[.d], >, literal[0]]] begin[{] if[binary_operation[member[.d], >=, member[.bitValue]]] begin[{] call[bits.append, parameter[literal['1']]] assign[member[.d], member[.bitValue]] else begin[{] call[bits.append, parameter[literal['0']]] end[}] assign[member[.bitValue], literal[2]] end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=bits, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BitString, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[BitString] identifier[convertDoubleToFixedPointBits] operator[SEP] Keyword[double] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[<] literal[Float] operator[||] identifier[value] operator[>=] literal[Float] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[StringBuilder] identifier[bits] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] Other[64] operator[SEP] operator[SEP] Keyword[double] identifier[bitValue] operator[=] literal[Float] operator[SEP] Keyword[double] identifier[d] operator[=] identifier[value] operator[SEP] Keyword[while] operator[SEP] identifier[d] operator[>] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[d] operator[>=] identifier[bitValue] operator[SEP] { identifier[bits] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[d] operator[-=] identifier[bitValue] operator[SEP] } Keyword[else] { identifier[bits] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[bitValue] operator[/=] Other[2] operator[SEP] } Keyword[return] Keyword[new] identifier[BitString] operator[SEP] identifier[bits] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
private static <K, V> Set<K> synchronizedCopyKeys(Map<K, V> map) { if (map == null) { return new HashSet<K>(); } synchronized (map) { return new HashSet<K>(map.keySet()); } }
class class_name[name] begin[{] method[synchronizedCopyKeys, return_type[type[Set]], modifier[private static], parameter[map]] begin[{] if[binary_operation[member[.map], ==, literal[null]]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None))], dimensions=None, name=HashSet, sub_type=None))] else begin[{] None end[}] SYNCHRONIZED[member[.map]] BEGIN[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=map, selectors=[], type_arguments=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=K, sub_type=None))], dimensions=None, name=HashSet, sub_type=None))] END[}] end[}] END[}]
Keyword[private] Keyword[static] operator[<] identifier[K] , identifier[V] operator[>] identifier[Set] operator[<] identifier[K] operator[>] identifier[synchronizedCopyKeys] operator[SEP] identifier[Map] operator[<] identifier[K] , identifier[V] operator[>] identifier[map] operator[SEP] { Keyword[if] operator[SEP] identifier[map] operator[==] Other[null] operator[SEP] { Keyword[return] Keyword[new] identifier[HashSet] operator[<] identifier[K] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[synchronized] operator[SEP] identifier[map] operator[SEP] { Keyword[return] Keyword[new] identifier[HashSet] operator[<] identifier[K] operator[>] operator[SEP] identifier[map] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
public SDVariable conv1d(SDVariable input, SDVariable weights, Conv1DConfig conv1DConfig) { Conv1D conv1D = Conv1D.builder() .inputFunctions(new SDVariable[]{input, weights}) .sameDiff(sameDiff()) .config(conv1DConfig) .build(); return conv1D.outputVariable(); }
class class_name[name] begin[{] method[conv1d, return_type[type[SDVariable]], modifier[public], parameter[input, weights, conv1DConfig]] begin[{] local_variable[type[Conv1D], conv1D] return[call[conv1D.outputVariable, parameter[]]] end[}] END[}]
Keyword[public] identifier[SDVariable] identifier[conv1d] operator[SEP] identifier[SDVariable] identifier[input] , identifier[SDVariable] identifier[weights] , identifier[Conv1DConfig] identifier[conv1DConfig] operator[SEP] { identifier[Conv1D] identifier[conv1D] operator[=] identifier[Conv1D] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] identifier[inputFunctions] operator[SEP] Keyword[new] identifier[SDVariable] operator[SEP] operator[SEP] { identifier[input] , identifier[weights] } operator[SEP] operator[SEP] identifier[sameDiff] operator[SEP] identifier[sameDiff] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[config] operator[SEP] identifier[conv1DConfig] operator[SEP] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[conv1D] operator[SEP] identifier[outputVariable] operator[SEP] operator[SEP] operator[SEP] }
public com.google.api.ads.admanager.axis.v201811.Money getBillableRevenueOverride() { return billableRevenueOverride; }
class class_name[name] begin[{] method[getBillableRevenueOverride, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.billableRevenueOverride]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201811] operator[SEP] identifier[Money] identifier[getBillableRevenueOverride] operator[SEP] operator[SEP] { Keyword[return] identifier[billableRevenueOverride] operator[SEP] }
private void readFieldValues(EmulatedFieldsForLoading emulatedFields) throws OptionalDataException, InvalidClassException, IOException { EmulatedFields.ObjectSlot[] slots = emulatedFields.emulatedFields().slots(); for (ObjectSlot element : slots) { element.defaulted = false; Class<?> type = element.field.getType(); if (type == int.class) { element.fieldValue = input.readInt(); } else if (type == byte.class) { element.fieldValue = input.readByte(); } else if (type == char.class) { element.fieldValue = input.readChar(); } else if (type == short.class) { element.fieldValue = input.readShort(); } else if (type == boolean.class) { element.fieldValue = input.readBoolean(); } else if (type == long.class) { element.fieldValue = input.readLong(); } else if (type == float.class) { element.fieldValue = input.readFloat(); } else if (type == double.class) { element.fieldValue = input.readDouble(); } else { // Either array or Object try { element.fieldValue = readObject(); } catch (ClassNotFoundException cnf) { // WARNING- Not sure this is the right thing to do. Write // test case. throw new InvalidClassException(cnf.toString()); } } } }
class class_name[name] begin[{] method[readFieldValues, return_type[void], modifier[private], parameter[emulatedFields]] begin[{] local_variable[type[EmulatedFields], slots] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=defaulted, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getType, postfix_operators=[], prefix_operators=[], qualifier=element.field, selectors=[], type_arguments=None), name=type)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=int)), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=byte)), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=char)), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=short)), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=boolean)), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=long)), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=float)), operator===), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ClassReference(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=[], name=double)), operator===), else_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readObject, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=cnf, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvalidClassException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=cnf, types=['ClassNotFoundException']))], finally_block=None, label=None, resources=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readDouble, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readFloat, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readLong, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readBoolean, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readShort, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readChar, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readByte, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=fieldValue, postfix_operators=[], prefix_operators=[], qualifier=element, selectors=[]), type==, value=MethodInvocation(arguments=[], member=readInt, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None)), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=slots, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=element)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ObjectSlot, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[readFieldValues] operator[SEP] identifier[EmulatedFieldsForLoading] identifier[emulatedFields] operator[SEP] Keyword[throws] identifier[OptionalDataException] , identifier[InvalidClassException] , identifier[IOException] { identifier[EmulatedFields] operator[SEP] identifier[ObjectSlot] operator[SEP] operator[SEP] identifier[slots] operator[=] identifier[emulatedFields] operator[SEP] identifier[emulatedFields] operator[SEP] operator[SEP] operator[SEP] identifier[slots] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ObjectSlot] identifier[element] operator[:] identifier[slots] operator[SEP] { identifier[element] operator[SEP] identifier[defaulted] operator[=] literal[boolean] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[type] operator[=] identifier[element] operator[SEP] identifier[field] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[type] operator[==] Keyword[int] operator[SEP] Keyword[class] operator[SEP] { identifier[element] operator[SEP] identifier[fieldValue] operator[=] identifier[input] operator[SEP] identifier[readInt] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] Keyword[byte] operator[SEP] Keyword[class] operator[SEP] { identifier[element] operator[SEP] identifier[fieldValue] operator[=] identifier[input] operator[SEP] identifier[readByte] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] Keyword[char] operator[SEP] Keyword[class] operator[SEP] { identifier[element] operator[SEP] identifier[fieldValue] operator[=] identifier[input] operator[SEP] identifier[readChar] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] Keyword[short] operator[SEP] Keyword[class] operator[SEP] { identifier[element] operator[SEP] identifier[fieldValue] operator[=] identifier[input] operator[SEP] identifier[readShort] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] Keyword[boolean] operator[SEP] Keyword[class] operator[SEP] { identifier[element] operator[SEP] identifier[fieldValue] operator[=] identifier[input] operator[SEP] identifier[readBoolean] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] Keyword[long] operator[SEP] Keyword[class] operator[SEP] { identifier[element] operator[SEP] identifier[fieldValue] operator[=] identifier[input] operator[SEP] identifier[readLong] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] Keyword[float] operator[SEP] Keyword[class] operator[SEP] { identifier[element] operator[SEP] identifier[fieldValue] operator[=] identifier[input] operator[SEP] identifier[readFloat] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[type] operator[==] Keyword[double] operator[SEP] Keyword[class] operator[SEP] { identifier[element] operator[SEP] identifier[fieldValue] operator[=] identifier[input] operator[SEP] identifier[readDouble] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[try] { identifier[element] operator[SEP] identifier[fieldValue] operator[=] identifier[readObject] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[ClassNotFoundException] identifier[cnf] operator[SEP] { Keyword[throw] Keyword[new] identifier[InvalidClassException] operator[SEP] identifier[cnf] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } }
public static MozuUrl deletePriceListEntryUrl(String currencyCode, String priceListCode, String productCode, DateTime startDate) { UrlFormatter formatter = new UrlFormatter("/api/commerce/catalog/admin/pricelists/{priceListCode}/entries/{productCode}/{currencyCode}?startDate={startDate}"); formatter.formatUrl("currencyCode", currencyCode); formatter.formatUrl("priceListCode", priceListCode); formatter.formatUrl("productCode", productCode); formatter.formatUrl("startDate", startDate); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; }
class class_name[name] begin[{] method[deletePriceListEntryUrl, return_type[type[MozuUrl]], modifier[public static], parameter[currencyCode, priceListCode, productCode, startDate]] begin[{] local_variable[type[UrlFormatter], formatter] call[formatter.formatUrl, parameter[literal["currencyCode"], member[.currencyCode]]] call[formatter.formatUrl, parameter[literal["priceListCode"], member[.priceListCode]]] call[formatter.formatUrl, parameter[literal["productCode"], member[.productCode]]] call[formatter.formatUrl, parameter[literal["startDate"], member[.startDate]]] 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[deletePriceListEntryUrl] operator[SEP] identifier[String] identifier[currencyCode] , identifier[String] identifier[priceListCode] , identifier[String] identifier[productCode] , identifier[DateTime] identifier[startDate] 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[currencyCode] operator[SEP] operator[SEP] identifier[formatter] operator[SEP] identifier[formatUrl] operator[SEP] literal[String] , identifier[priceListCode] 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[startDate] 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] }
@SuppressWarnings("unchecked") <HK> byte[] rawHashKey(HK hashKey) { Assert.notNull(hashKey, "non null hash key required"); return hashKeySerializer().serialize(hashKey); }
class class_name[name] begin[{] method[rawHashKey, return_type[type[byte]], modifier[default], parameter[hashKey]] begin[{] call[Assert.notNull, parameter[member[.hashKey], literal["non null hash key required"]]] return[call[.hashKeySerializer, parameter[]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] operator[<] identifier[HK] operator[>] Keyword[byte] operator[SEP] operator[SEP] identifier[rawHashKey] operator[SEP] identifier[HK] identifier[hashKey] operator[SEP] { identifier[Assert] operator[SEP] identifier[notNull] operator[SEP] identifier[hashKey] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[hashKeySerializer] operator[SEP] operator[SEP] operator[SEP] identifier[serialize] operator[SEP] identifier[hashKey] operator[SEP] operator[SEP] }
@Urlencoded static private ServiceType decodeLeadProtocol(String protocol) throws IOException { if (protocol.equals("dods")) return ServiceType.OPENDAP; else if (protocol.equals("dap4")) return ServiceType.DAP4; else if (protocol.equals("httpserver") || protocol.equals("nodods")) return ServiceType.HTTPServer; else if (protocol.equals(CdmRemote.PROTOCOL)) return ServiceType.CdmRemote; else if (protocol.equals(DataFactory.PROTOCOL)) //thredds return ServiceType.THREDDS; return null; }
class class_name[name] begin[{] method[decodeLeadProtocol, return_type[type[ServiceType]], modifier[private static], parameter[protocol]] begin[{] if[call[protocol.equals, parameter[literal["dods"]]]] begin[{] return[member[ServiceType.OPENDAP]] else begin[{] if[call[protocol.equals, parameter[literal["dap4"]]]] begin[{] return[member[ServiceType.DAP4]] else begin[{] if[binary_operation[call[protocol.equals, parameter[literal["httpserver"]]], ||, call[protocol.equals, parameter[literal["nodods"]]]]] begin[{] return[member[ServiceType.HTTPServer]] else begin[{] if[call[protocol.equals, parameter[member[CdmRemote.PROTOCOL]]]] begin[{] return[member[ServiceType.CdmRemote]] else begin[{] if[call[protocol.equals, parameter[member[DataFactory.PROTOCOL]]]] begin[{] return[member[ServiceType.THREDDS]] else begin[{] None end[}] end[}] end[}] end[}] end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[Urlencoded] Keyword[static] Keyword[private] identifier[ServiceType] identifier[decodeLeadProtocol] operator[SEP] identifier[String] identifier[protocol] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[protocol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[ServiceType] operator[SEP] identifier[OPENDAP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[protocol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[ServiceType] operator[SEP] identifier[DAP4] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[protocol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[||] identifier[protocol] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[ServiceType] operator[SEP] identifier[HTTPServer] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[protocol] operator[SEP] identifier[equals] operator[SEP] identifier[CdmRemote] operator[SEP] identifier[PROTOCOL] operator[SEP] operator[SEP] Keyword[return] identifier[ServiceType] operator[SEP] identifier[CdmRemote] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[protocol] operator[SEP] identifier[equals] operator[SEP] identifier[DataFactory] operator[SEP] identifier[PROTOCOL] operator[SEP] operator[SEP] Keyword[return] identifier[ServiceType] operator[SEP] identifier[THREDDS] operator[SEP] Keyword[return] Other[null] operator[SEP] }
static ValidatorFactory createValidatorFactory() { Configuration configuration = Validation.byDefaultProvider().configure(); Configuration<?> conf = configuration.traversableResolver(new IronJacamarTraversableResolver()); return conf.buildValidatorFactory(); }
class class_name[name] begin[{] method[createValidatorFactory, return_type[type[ValidatorFactory]], modifier[static], parameter[]] begin[{] local_variable[type[Configuration], configuration] local_variable[type[Configuration], conf] return[call[conf.buildValidatorFactory, parameter[]]] end[}] END[}]
Keyword[static] identifier[ValidatorFactory] identifier[createValidatorFactory] operator[SEP] operator[SEP] { identifier[Configuration] identifier[configuration] operator[=] identifier[Validation] operator[SEP] identifier[byDefaultProvider] operator[SEP] operator[SEP] operator[SEP] identifier[configure] operator[SEP] operator[SEP] operator[SEP] identifier[Configuration] operator[<] operator[?] operator[>] identifier[conf] operator[=] identifier[configuration] operator[SEP] identifier[traversableResolver] operator[SEP] Keyword[new] identifier[IronJacamarTraversableResolver] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[conf] operator[SEP] identifier[buildValidatorFactory] operator[SEP] operator[SEP] operator[SEP] }
private void firePieceCompleted(Piece piece) throws IOException { for (PeerActivityListener listener : this.listeners) { listener.handlePieceCompleted(this, piece); } }
class class_name[name] begin[{] method[firePieceCompleted, return_type[void], modifier[private], parameter[piece]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=piece, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=handlePieceCompleted, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=listeners, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=listener)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PeerActivityListener, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[firePieceCompleted] operator[SEP] identifier[Piece] identifier[piece] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[for] operator[SEP] identifier[PeerActivityListener] identifier[listener] operator[:] Keyword[this] operator[SEP] identifier[listeners] operator[SEP] { identifier[listener] operator[SEP] identifier[handlePieceCompleted] operator[SEP] Keyword[this] , identifier[piece] operator[SEP] operator[SEP] } }
private void calculateStrategy(final Strategy strategy, final int o1, final int o2) { if (Strategy.OFFSET == strategy) { this.offset = o1; this.limit = o2; } else if (Strategy.PAGES == strategy) { this.offset = (o1 * o2) - o2; this.limit = o2; } }
class class_name[name] begin[{] method[calculateStrategy, return_type[void], modifier[private], parameter[strategy, o1, o2]] begin[{] if[binary_operation[member[Strategy.OFFSET], ==, member[.strategy]]] begin[{] assign[THIS[member[None.offset]], member[.o1]] assign[THIS[member[None.limit]], member[.o2]] else begin[{] if[binary_operation[member[Strategy.PAGES], ==, member[.strategy]]] begin[{] assign[THIS[member[None.offset]], binary_operation[binary_operation[member[.o1], *, member[.o2]], -, member[.o2]]] assign[THIS[member[None.limit]], member[.o2]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[calculateStrategy] operator[SEP] Keyword[final] identifier[Strategy] identifier[strategy] , Keyword[final] Keyword[int] identifier[o1] , Keyword[final] Keyword[int] identifier[o2] operator[SEP] { Keyword[if] operator[SEP] identifier[Strategy] operator[SEP] identifier[OFFSET] operator[==] identifier[strategy] operator[SEP] { Keyword[this] operator[SEP] identifier[offset] operator[=] identifier[o1] operator[SEP] Keyword[this] operator[SEP] identifier[limit] operator[=] identifier[o2] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Strategy] operator[SEP] identifier[PAGES] operator[==] identifier[strategy] operator[SEP] { Keyword[this] operator[SEP] identifier[offset] operator[=] operator[SEP] identifier[o1] operator[*] identifier[o2] operator[SEP] operator[-] identifier[o2] operator[SEP] Keyword[this] operator[SEP] identifier[limit] operator[=] identifier[o2] operator[SEP] } }
public List<String> getSearchDimensions() { List<String> dimensions = new ArrayList<String>(); for (int i = 0; i < m_Space.dimensions(); ++i) { dimensions.add(m_Space.getDimension(i).getLabel()); } return dimensions; }
class class_name[name] begin[{] method[getSearchDimensions, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], dimensions] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDimension, postfix_operators=[], prefix_operators=[], qualifier=m_Space, selectors=[MethodInvocation(arguments=[], member=getLabel, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=dimensions, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=dimensions, postfix_operators=[], prefix_operators=[], qualifier=m_Space, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=[], prefix_operators=['++'], qualifier=, selectors=[])]), label=None) return[member[.dimensions]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[String] operator[>] identifier[getSearchDimensions] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[String] operator[>] identifier[dimensions] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[m_Space] operator[SEP] identifier[dimensions] operator[SEP] operator[SEP] operator[SEP] operator[++] identifier[i] operator[SEP] { identifier[dimensions] operator[SEP] identifier[add] operator[SEP] identifier[m_Space] operator[SEP] identifier[getDimension] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[getLabel] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[dimensions] operator[SEP] }
public static ParticipantCreator creator(final String pathServiceSid, final String pathSessionSid, final String identifier) { return new ParticipantCreator(pathServiceSid, pathSessionSid, identifier); }
class class_name[name] begin[{] method[creator, return_type[type[ParticipantCreator]], modifier[public static], parameter[pathServiceSid, pathSessionSid, identifier]] begin[{] return[ClassCreator(arguments=[MemberReference(member=pathServiceSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=pathSessionSid, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=identifier, 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=ParticipantCreator, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ParticipantCreator] identifier[creator] operator[SEP] Keyword[final] identifier[String] identifier[pathServiceSid] , Keyword[final] identifier[String] identifier[pathSessionSid] , Keyword[final] identifier[String] identifier[identifier] operator[SEP] { Keyword[return] Keyword[new] identifier[ParticipantCreator] operator[SEP] identifier[pathServiceSid] , identifier[pathSessionSid] , identifier[identifier] operator[SEP] operator[SEP] }
@Override public void close() throws IOException { if (!closed) { closed = true; nodeCursor = null; _currToken = null; } }
class class_name[name] begin[{] method[close, return_type[void], modifier[public], parameter[]] begin[{] if[member[.closed]] begin[{] assign[member[.closed], literal[true]] assign[member[.nodeCursor], literal[null]] assign[member[._currToken], literal[null]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[close] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] operator[!] identifier[closed] operator[SEP] { identifier[closed] operator[=] literal[boolean] operator[SEP] identifier[nodeCursor] operator[=] Other[null] operator[SEP] identifier[_currToken] operator[=] Other[null] operator[SEP] } }
@Override public <C, R> SimpleCase<C, R> selectCase(Expression<? extends C> arg0) { // TODO Auto-generated method stub return null; }
class class_name[name] begin[{] method[selectCase, return_type[type[SimpleCase]], modifier[public], parameter[arg0]] begin[{] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] operator[<] identifier[C] , identifier[R] operator[>] identifier[SimpleCase] operator[<] identifier[C] , identifier[R] operator[>] identifier[selectCase] operator[SEP] identifier[Expression] operator[<] operator[?] Keyword[extends] identifier[C] operator[>] identifier[arg0] operator[SEP] { Keyword[return] Other[null] operator[SEP] }
public Object remove(Object key) { if (key instanceof Number) { return remove( ((Number)key).intValue() ); } else { return null; } }
class class_name[name] begin[{] method[remove, return_type[type[Object]], modifier[public], parameter[key]] begin[{] if[binary_operation[member[.key], instanceof, type[Number]]] begin[{] return[call[.remove, parameter[Cast(expression=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None))]]] else begin[{] return[literal[null]] end[}] end[}] END[}]
Keyword[public] identifier[Object] identifier[remove] operator[SEP] identifier[Object] identifier[key] operator[SEP] { Keyword[if] operator[SEP] identifier[key] Keyword[instanceof] identifier[Number] operator[SEP] { Keyword[return] identifier[remove] operator[SEP] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
public void addStore(InstructionHandle handle, XField field) { getLoadStoreCount(field).storeCount++; handleToFieldMap.put(handle, field); }
class class_name[name] begin[{] method[addStore, return_type[void], modifier[public], parameter[handle, field]] begin[{] call[.getLoadStoreCount, parameter[member[.field]]] call[handleToFieldMap.put, parameter[member[.handle], member[.field]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addStore] operator[SEP] identifier[InstructionHandle] identifier[handle] , identifier[XField] identifier[field] operator[SEP] { identifier[getLoadStoreCount] operator[SEP] identifier[field] operator[SEP] operator[SEP] identifier[storeCount] operator[++] operator[SEP] identifier[handleToFieldMap] operator[SEP] identifier[put] operator[SEP] identifier[handle] , identifier[field] operator[SEP] operator[SEP] }
public static JsonPullParser newParser(Reader reader) { if (reader == null) { throw new IllegalArgumentException("'reader' must not be null."); } BufferedReader br = (reader instanceof BufferedReader) ? (BufferedReader) reader : new BufferedReader( reader); JsonPullParser parser = new JsonPullParser(); parser.setSource(br); return parser; }
class class_name[name] begin[{] method[newParser, return_type[type[JsonPullParser]], modifier[public static], parameter[reader]] begin[{] if[binary_operation[member[.reader], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="'reader' must not be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[BufferedReader], br] local_variable[type[JsonPullParser], parser] call[parser.setSource, parameter[member[.br]]] return[member[.parser]] end[}] END[}]
Keyword[public] Keyword[static] identifier[JsonPullParser] identifier[newParser] operator[SEP] identifier[Reader] identifier[reader] operator[SEP] { Keyword[if] operator[SEP] identifier[reader] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[BufferedReader] identifier[br] operator[=] operator[SEP] identifier[reader] Keyword[instanceof] identifier[BufferedReader] operator[SEP] operator[?] operator[SEP] identifier[BufferedReader] operator[SEP] identifier[reader] operator[:] Keyword[new] identifier[BufferedReader] operator[SEP] identifier[reader] operator[SEP] operator[SEP] identifier[JsonPullParser] identifier[parser] operator[=] Keyword[new] identifier[JsonPullParser] operator[SEP] operator[SEP] operator[SEP] identifier[parser] operator[SEP] identifier[setSource] operator[SEP] identifier[br] operator[SEP] operator[SEP] Keyword[return] identifier[parser] operator[SEP] }
public static int cudnnGetFilter4dDescriptor( cudnnFilterDescriptor filterDesc, int[] dataType, /** image data type */ int[] format, int[] k, /** number of output feature maps */ int[] c, /** number of input feature maps */ int[] h, /** height of each input filter */ int[] w)/** width of each input filter */ { return checkResult(cudnnGetFilter4dDescriptorNative(filterDesc, dataType, format, k, c, h, w)); }
class class_name[name] begin[{] method[cudnnGetFilter4dDescriptor, return_type[type[int]], modifier[public static], parameter[filterDesc, dataType, format, k, c, h, w]] begin[{] return[call[.checkResult, parameter[call[.cudnnGetFilter4dDescriptorNative, parameter[member[.filterDesc], member[.dataType], member[.format], member[.k], member[.c], member[.h], member[.w]]]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[int] identifier[cudnnGetFilter4dDescriptor] operator[SEP] identifier[cudnnFilterDescriptor] identifier[filterDesc] , Keyword[int] operator[SEP] operator[SEP] identifier[dataType] , Keyword[int] operator[SEP] operator[SEP] identifier[format] , Keyword[int] operator[SEP] operator[SEP] identifier[k] , Keyword[int] operator[SEP] operator[SEP] identifier[c] , Keyword[int] operator[SEP] operator[SEP] identifier[h] , Keyword[int] operator[SEP] operator[SEP] identifier[w] operator[SEP] { Keyword[return] identifier[checkResult] operator[SEP] identifier[cudnnGetFilter4dDescriptorNative] operator[SEP] identifier[filterDesc] , identifier[dataType] , identifier[format] , identifier[k] , identifier[c] , identifier[h] , identifier[w] operator[SEP] operator[SEP] operator[SEP] }
public void getService(String serviceName, final GetServiceCallback cb, Object context){ ProtocolHeader header = new ProtocolHeader(); header.setType(ProtocolType.GetService); GetServiceProtocol p = new GetServiceProtocol(serviceName); p.setWatcher(false); ProtocolCallback pcb = new ProtocolCallback(){ @Override public void call(boolean result, Response response, ErrorCode error, Object ctx) { ModelService rsp = null; if(response != null){ rsp = ((GetServiceResponse) response).getService(); } cb.call(result, rsp, error, ctx); } }; connection.submitCallbackRequest(header, p, pcb, context); }
class class_name[name] begin[{] method[getService, return_type[void], modifier[public], parameter[serviceName, cb, context]] begin[{] local_variable[type[ProtocolHeader], header] call[header.setType, parameter[member[ProtocolType.GetService]]] local_variable[type[GetServiceProtocol], p] call[p.setWatcher, parameter[literal[false]]] local_variable[type[ProtocolCallback], pcb] call[connection.submitCallbackRequest, parameter[member[.header], member[.p], member[.pcb], member[.context]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[getService] operator[SEP] identifier[String] identifier[serviceName] , Keyword[final] identifier[GetServiceCallback] identifier[cb] , identifier[Object] identifier[context] operator[SEP] { identifier[ProtocolHeader] identifier[header] operator[=] Keyword[new] identifier[ProtocolHeader] operator[SEP] operator[SEP] operator[SEP] identifier[header] operator[SEP] identifier[setType] operator[SEP] identifier[ProtocolType] operator[SEP] identifier[GetService] operator[SEP] operator[SEP] identifier[GetServiceProtocol] identifier[p] operator[=] Keyword[new] identifier[GetServiceProtocol] operator[SEP] identifier[serviceName] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[setWatcher] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[ProtocolCallback] identifier[pcb] operator[=] Keyword[new] identifier[ProtocolCallback] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[call] operator[SEP] Keyword[boolean] identifier[result] , identifier[Response] identifier[response] , identifier[ErrorCode] identifier[error] , identifier[Object] identifier[ctx] operator[SEP] { identifier[ModelService] identifier[rsp] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[response] operator[!=] Other[null] operator[SEP] { identifier[rsp] operator[=] operator[SEP] operator[SEP] identifier[GetServiceResponse] operator[SEP] identifier[response] operator[SEP] operator[SEP] identifier[getService] operator[SEP] operator[SEP] operator[SEP] } identifier[cb] operator[SEP] identifier[call] operator[SEP] identifier[result] , identifier[rsp] , identifier[error] , identifier[ctx] operator[SEP] operator[SEP] } } operator[SEP] identifier[connection] operator[SEP] identifier[submitCallbackRequest] operator[SEP] identifier[header] , identifier[p] , identifier[pcb] , identifier[context] operator[SEP] operator[SEP] }
public void receiveResultcteRecepcaoOS( com.fincatto.documentofiscal.cte300.webservices.recepcaoOS.CteRecepcaoOSStub.CteRecepcaoOSResult result ) { }
class class_name[name] begin[{] method[receiveResultcteRecepcaoOS, return_type[void], modifier[public], parameter[result]] begin[{] end[}] END[}]
Keyword[public] Keyword[void] identifier[receiveResultcteRecepcaoOS] operator[SEP] identifier[com] operator[SEP] identifier[fincatto] operator[SEP] identifier[documentofiscal] operator[SEP] identifier[cte300] operator[SEP] identifier[webservices] operator[SEP] identifier[recepcaoOS] operator[SEP] identifier[CteRecepcaoOSStub] operator[SEP] identifier[CteRecepcaoOSResult] identifier[result] operator[SEP] { }
public static void main(String args[]) { SmapGenerator g = new SmapGenerator(); g.setOutputFileName("foo.java"); SmapStratum s = new SmapStratum("JSP"); s.addFile("foo.jsp"); s.addFile("bar.jsp", "/foo/foo/bar.jsp"); s.addLineData(1, "foo.jsp", 1, 1, 1); s.addLineData(2, "foo.jsp", 1, 6, 1); s.addLineData(3, "foo.jsp", 2, 10, 5); s.addLineData(20, "bar.jsp", 1, 30, 1); g.addStratum(s, true); System.out.print(g); System.out.println("---"); SmapGenerator embedded = new SmapGenerator(); embedded.setOutputFileName("blargh.tier2"); s = new SmapStratum("Tier2"); s.addFile("1.tier2"); s.addLineData(1, "1.tier2", 1, 1, 1); embedded.addStratum(s, true); g.addSmap(embedded.toString(), "JSP"); System.out.println(g); }
class class_name[name] begin[{] method[main, return_type[void], modifier[public static], parameter[args]] begin[{] local_variable[type[SmapGenerator], g] call[g.setOutputFileName, parameter[literal["foo.java"]]] local_variable[type[SmapStratum], s] call[s.addFile, parameter[literal["foo.jsp"]]] call[s.addFile, parameter[literal["bar.jsp"], literal["/foo/foo/bar.jsp"]]] call[s.addLineData, parameter[literal[1], literal["foo.jsp"], literal[1], literal[1], literal[1]]] call[s.addLineData, parameter[literal[2], literal["foo.jsp"], literal[1], literal[6], literal[1]]] call[s.addLineData, parameter[literal[3], literal["foo.jsp"], literal[2], literal[10], literal[5]]] call[s.addLineData, parameter[literal[20], literal["bar.jsp"], literal[1], literal[30], literal[1]]] call[g.addStratum, parameter[member[.s], literal[true]]] call[System.out.print, parameter[member[.g]]] call[System.out.println, parameter[literal["---"]]] local_variable[type[SmapGenerator], embedded] call[embedded.setOutputFileName, parameter[literal["blargh.tier2"]]] assign[member[.s], ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Tier2")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SmapStratum, sub_type=None))] call[s.addFile, parameter[literal["1.tier2"]]] call[s.addLineData, parameter[literal[1], literal["1.tier2"], literal[1], literal[1], literal[1]]] call[embedded.addStratum, parameter[member[.s], literal[true]]] call[g.addSmap, parameter[call[embedded.toString, parameter[]], literal["JSP"]]] call[System.out.println, parameter[member[.g]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[main] operator[SEP] identifier[String] identifier[args] operator[SEP] operator[SEP] operator[SEP] { identifier[SmapGenerator] identifier[g] operator[=] Keyword[new] identifier[SmapGenerator] operator[SEP] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[setOutputFileName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[SmapStratum] identifier[s] operator[=] Keyword[new] identifier[SmapStratum] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[s] operator[SEP] identifier[addFile] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[s] operator[SEP] identifier[addFile] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[s] operator[SEP] identifier[addLineData] operator[SEP] Other[1] , literal[String] , Other[1] , Other[1] , Other[1] operator[SEP] operator[SEP] identifier[s] operator[SEP] identifier[addLineData] operator[SEP] Other[2] , literal[String] , Other[1] , Other[6] , Other[1] operator[SEP] operator[SEP] identifier[s] operator[SEP] identifier[addLineData] operator[SEP] Other[3] , literal[String] , Other[2] , Other[10] , Other[5] operator[SEP] operator[SEP] identifier[s] operator[SEP] identifier[addLineData] operator[SEP] Other[20] , literal[String] , Other[1] , Other[30] , Other[1] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[addStratum] operator[SEP] identifier[s] , literal[boolean] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[g] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[SmapGenerator] identifier[embedded] operator[=] Keyword[new] identifier[SmapGenerator] operator[SEP] operator[SEP] operator[SEP] identifier[embedded] operator[SEP] identifier[setOutputFileName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[s] operator[=] Keyword[new] identifier[SmapStratum] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[s] operator[SEP] identifier[addFile] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[s] operator[SEP] identifier[addLineData] operator[SEP] Other[1] , literal[String] , Other[1] , Other[1] , Other[1] operator[SEP] operator[SEP] identifier[embedded] operator[SEP] identifier[addStratum] operator[SEP] identifier[s] , literal[boolean] operator[SEP] operator[SEP] identifier[g] operator[SEP] identifier[addSmap] operator[SEP] identifier[embedded] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] identifier[g] operator[SEP] operator[SEP] }
private void processElementTranslate(GeneratorSingleCluster cluster, Node cur) { double[] offset = null; String vstr = ((Element) cur).getAttribute(ATTR_VECTOR); if(vstr != null && vstr.length() > 0) { offset = parseVector(vstr); } if(offset == null) { throw new AbortException("No translation vector given."); } // *** add new translation cluster.addTranslation(offset); // TODO: check for unknown attributes. XMLNodeIterator iter = new XMLNodeIterator(cur.getFirstChild()); while(iter.hasNext()) { Node child = iter.next(); if(child.getNodeType() == Node.ELEMENT_NODE) { LOG.warning("Unknown element in XML specification file: " + child.getNodeName()); } } }
class class_name[name] begin[{] method[processElementTranslate, return_type[void], modifier[private], parameter[cluster, cur]] begin[{] local_variable[type[double], offset] local_variable[type[String], vstr] if[binary_operation[binary_operation[member[.vstr], !=, literal[null]], &&, binary_operation[call[vstr.length, parameter[]], >, literal[0]]]] begin[{] assign[member[.offset], call[.parseVector, parameter[member[.vstr]]]] else begin[{] None end[}] if[binary_operation[member[.offset], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No translation vector given.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AbortException, sub_type=None)), label=None) else begin[{] None end[}] call[cluster.addTranslation, parameter[member[.offset]]] local_variable[type[XMLNodeIterator], iter] while[call[iter.hasNext, parameter[]]] begin[{] local_variable[type[Node], child] if[binary_operation[call[child.getNodeType, parameter[]], ==, member[Node.ELEMENT_NODE]]] begin[{] call[LOG.warning, parameter[binary_operation[literal["Unknown element in XML specification file: "], +, call[child.getNodeName, parameter[]]]]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[processElementTranslate] operator[SEP] identifier[GeneratorSingleCluster] identifier[cluster] , identifier[Node] identifier[cur] operator[SEP] { Keyword[double] operator[SEP] operator[SEP] identifier[offset] operator[=] Other[null] operator[SEP] identifier[String] identifier[vstr] operator[=] operator[SEP] operator[SEP] identifier[Element] operator[SEP] identifier[cur] operator[SEP] operator[SEP] identifier[getAttribute] operator[SEP] identifier[ATTR_VECTOR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[vstr] operator[!=] Other[null] operator[&&] identifier[vstr] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[offset] operator[=] identifier[parseVector] operator[SEP] identifier[vstr] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[offset] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[AbortException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[cluster] operator[SEP] identifier[addTranslation] operator[SEP] identifier[offset] operator[SEP] operator[SEP] identifier[XMLNodeIterator] identifier[iter] operator[=] Keyword[new] identifier[XMLNodeIterator] operator[SEP] identifier[cur] operator[SEP] identifier[getFirstChild] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[Node] identifier[child] operator[=] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[child] operator[SEP] identifier[getNodeType] operator[SEP] operator[SEP] operator[==] identifier[Node] operator[SEP] identifier[ELEMENT_NODE] operator[SEP] { identifier[LOG] operator[SEP] identifier[warning] operator[SEP] literal[String] operator[+] identifier[child] operator[SEP] identifier[getNodeName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> listSiteDiagnosticCategoriesSlotSinglePageAsync(final String resourceGroupName, final String siteName, final String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (siteName == null) { throw new IllegalArgumentException("Parameter siteName is required and cannot be null."); } if (slot == null) { throw new IllegalArgumentException("Parameter slot is required and cannot be null."); } if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null."); } if (this.client.apiVersion() == null) { throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null."); } return service.listSiteDiagnosticCategoriesSlot(resourceGroupName, siteName, slot, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent()) .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<Page<DiagnosticCategoryInner>>>>() { @Override public Observable<ServiceResponse<Page<DiagnosticCategoryInner>>> call(Response<ResponseBody> response) { try { ServiceResponse<PageImpl<DiagnosticCategoryInner>> result = listSiteDiagnosticCategoriesSlotDelegate(response); return Observable.just(new ServiceResponse<Page<DiagnosticCategoryInner>>(result.body(), result.response())); } catch (Throwable t) { return Observable.error(t); } } }); }
class class_name[name] begin[{] method[listSiteDiagnosticCategoriesSlotSinglePageAsync, return_type[type[Observable]], modifier[public], parameter[resourceGroupName, siteName, slot]] begin[{] if[binary_operation[member[.resourceGroupName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter resourceGroupName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.siteName], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter siteName is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.slot], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter slot is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.subscriptionId, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.subscriptionId() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[THIS[member[None.client]call[None.apiVersion, parameter[]]], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Parameter this.client.apiVersion() is required and cannot be null.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[call[service.listSiteDiagnosticCategoriesSlot, parameter[member[.resourceGroupName], member[.siteName], member[.slot], THIS[member[None.client]call[None.subscriptionId, parameter[]]], THIS[member[None.client]call[None.apiVersion, parameter[]]], THIS[member[None.client]call[None.acceptLanguage, parameter[]]], THIS[member[None.client]call[None.userAgent, parameter[]]]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[DiagnosticCategoryInner] operator[>] operator[>] operator[>] identifier[listSiteDiagnosticCategoriesSlotSinglePageAsync] operator[SEP] Keyword[final] identifier[String] identifier[resourceGroupName] , Keyword[final] identifier[String] identifier[siteName] , Keyword[final] identifier[String] identifier[slot] operator[SEP] { Keyword[if] operator[SEP] identifier[resourceGroupName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[siteName] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[slot] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[service] operator[SEP] identifier[listSiteDiagnosticCategoriesSlot] operator[SEP] identifier[resourceGroupName] , identifier[siteName] , identifier[slot] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[subscriptionId] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[apiVersion] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[acceptLanguage] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[client] operator[SEP] identifier[userAgent] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[Response] operator[<] identifier[ResponseBody] operator[>] , identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[DiagnosticCategoryInner] operator[>] operator[>] operator[>] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Observable] operator[<] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[DiagnosticCategoryInner] operator[>] operator[>] operator[>] identifier[call] operator[SEP] identifier[Response] operator[<] identifier[ResponseBody] operator[>] identifier[response] operator[SEP] { Keyword[try] { identifier[ServiceResponse] operator[<] identifier[PageImpl] operator[<] identifier[DiagnosticCategoryInner] operator[>] operator[>] identifier[result] operator[=] identifier[listSiteDiagnosticCategoriesSlotDelegate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[Observable] operator[SEP] identifier[just] operator[SEP] Keyword[new] identifier[ServiceResponse] operator[<] identifier[Page] operator[<] identifier[DiagnosticCategoryInner] operator[>] operator[>] operator[SEP] identifier[result] operator[SEP] identifier[body] operator[SEP] operator[SEP] , identifier[result] operator[SEP] identifier[response] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[t] operator[SEP] { Keyword[return] identifier[Observable] operator[SEP] identifier[error] operator[SEP] identifier[t] operator[SEP] operator[SEP] } } } operator[SEP] operator[SEP] }
private MethodSpec buildWrapTimeZoneGMTMethod(TimeZoneData data) { String[] hourFormat = data.hourFormat.split(";"); List<Node> positive = DATETIME_PARSER.parse(hourFormat[0]); List<Node> negative = DATETIME_PARSER.parse(hourFormat[1]); List<Node> format = WRAPPER_PARSER.parseWrapper(data.gmtFormat); MethodSpec.Builder method = MethodSpec.methodBuilder("wrapTimeZoneGMT") .addModifiers(PROTECTED) .addParameter(StringBuilder.class, "b") .addParameter(boolean.class, "neg") .addParameter(int.class, "hours") .addParameter(int.class, "mins") .addParameter(boolean.class, "_short"); // Special format for zero method.beginControlFlow("if (hours == 0 && mins == 0)"); method.addStatement("b.append($S)", data.gmtZeroFormat); method.addStatement("return"); method.endControlFlow(); method.addStatement("boolean emitMins = !_short || mins > 0"); for (Node node : format) { if (node instanceof Text) { Text text = (Text) node; method.addStatement("b.append($S)", text.text()); } else { method.beginControlFlow("if (neg)"); appendHourFormat(method, negative); method.endControlFlow(); method.beginControlFlow("else"); appendHourFormat(method, positive); method.endControlFlow(); } } return method.build(); }
class class_name[name] begin[{] method[buildWrapTimeZoneGMTMethod, return_type[type[MethodSpec]], modifier[private], parameter[data]] begin[{] local_variable[type[String], hourFormat] local_variable[type[List], positive] local_variable[type[List], negative] local_variable[type[List], format] local_variable[type[MethodSpec], method] call[method.beginControlFlow, parameter[literal["if (hours == 0 && mins == 0)"]]] call[method.addStatement, parameter[literal["b.append($S)"], member[data.gmtZeroFormat]]] call[method.addStatement, parameter[literal["return"]]] call[method.endControlFlow, parameter[]] call[method.addStatement, parameter[literal["boolean emitMins = !_short || mins > 0"]]] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=Text, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="if (neg)")], member=beginControlFlow, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=negative, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendHourFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=endControlFlow, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="else")], member=beginControlFlow, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=method, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=positive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appendHourFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=endControlFlow, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=node, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=Text, sub_type=None)), name=text)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Text, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="b.append($S)"), MethodInvocation(arguments=[], member=text, postfix_operators=[], prefix_operators=[], qualifier=text, selectors=[], type_arguments=None)], member=addStatement, postfix_operators=[], prefix_operators=[], qualifier=method, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=format, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=node)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Node, sub_type=None))), label=None) return[call[method.build, parameter[]]] end[}] END[}]
Keyword[private] identifier[MethodSpec] identifier[buildWrapTimeZoneGMTMethod] operator[SEP] identifier[TimeZoneData] identifier[data] operator[SEP] { identifier[String] operator[SEP] operator[SEP] identifier[hourFormat] operator[=] identifier[data] operator[SEP] identifier[hourFormat] operator[SEP] identifier[split] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Node] operator[>] identifier[positive] operator[=] identifier[DATETIME_PARSER] operator[SEP] identifier[parse] operator[SEP] identifier[hourFormat] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Node] operator[>] identifier[negative] operator[=] identifier[DATETIME_PARSER] operator[SEP] identifier[parse] operator[SEP] identifier[hourFormat] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[Node] operator[>] identifier[format] operator[=] identifier[WRAPPER_PARSER] operator[SEP] identifier[parseWrapper] operator[SEP] identifier[data] operator[SEP] identifier[gmtFormat] operator[SEP] operator[SEP] identifier[MethodSpec] operator[SEP] identifier[Builder] identifier[method] operator[=] identifier[MethodSpec] operator[SEP] identifier[methodBuilder] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[addModifiers] operator[SEP] identifier[PROTECTED] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] identifier[StringBuilder] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] Keyword[boolean] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] Keyword[int] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] Keyword[int] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[addParameter] operator[SEP] Keyword[boolean] operator[SEP] Keyword[class] , literal[String] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[beginControlFlow] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[addStatement] operator[SEP] literal[String] , identifier[data] operator[SEP] identifier[gmtZeroFormat] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[addStatement] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[endControlFlow] operator[SEP] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[addStatement] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Node] identifier[node] operator[:] identifier[format] operator[SEP] { Keyword[if] operator[SEP] identifier[node] Keyword[instanceof] identifier[Text] operator[SEP] { identifier[Text] identifier[text] operator[=] operator[SEP] identifier[Text] operator[SEP] identifier[node] operator[SEP] identifier[method] operator[SEP] identifier[addStatement] operator[SEP] literal[String] , identifier[text] operator[SEP] identifier[text] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[method] operator[SEP] identifier[beginControlFlow] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[appendHourFormat] operator[SEP] identifier[method] , identifier[negative] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[endControlFlow] operator[SEP] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[beginControlFlow] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[appendHourFormat] operator[SEP] identifier[method] , identifier[positive] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[endControlFlow] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] identifier[method] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public void addToolbarButtons(ToolScreen toolScreen) { new SCannedBox(toolScreen.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), toolScreen, null, ScreenConstants.DEFAULT_DISPLAY, null, JnlpFileScreen.WRITE_FILE, MenuConstants.PRINT, JnlpFileScreen.WRITE_FILE, null); }
class class_name[name] begin[{] method[addToolbarButtons, return_type[void], modifier[public], parameter[toolScreen]] begin[{] ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=NEXT_LOGICAL, postfix_operators=[], prefix_operators=[], qualifier=ScreenConstants, selectors=[]), MemberReference(member=SET_ANCHOR, postfix_operators=[], prefix_operators=[], qualifier=ScreenConstants, selectors=[])], member=getNextLocation, postfix_operators=[], prefix_operators=[], qualifier=toolScreen, selectors=[], type_arguments=None), MemberReference(member=toolScreen, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=DEFAULT_DISPLAY, postfix_operators=[], prefix_operators=[], qualifier=ScreenConstants, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=WRITE_FILE, postfix_operators=[], prefix_operators=[], qualifier=JnlpFileScreen, selectors=[]), MemberReference(member=PRINT, postfix_operators=[], prefix_operators=[], qualifier=MenuConstants, selectors=[]), MemberReference(member=WRITE_FILE, postfix_operators=[], prefix_operators=[], qualifier=JnlpFileScreen, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SCannedBox, sub_type=None)) end[}] END[}]
Keyword[public] Keyword[void] identifier[addToolbarButtons] operator[SEP] identifier[ToolScreen] identifier[toolScreen] operator[SEP] { Keyword[new] identifier[SCannedBox] operator[SEP] identifier[toolScreen] operator[SEP] identifier[getNextLocation] operator[SEP] identifier[ScreenConstants] operator[SEP] identifier[NEXT_LOGICAL] , identifier[ScreenConstants] operator[SEP] identifier[SET_ANCHOR] operator[SEP] , identifier[toolScreen] , Other[null] , identifier[ScreenConstants] operator[SEP] identifier[DEFAULT_DISPLAY] , Other[null] , identifier[JnlpFileScreen] operator[SEP] identifier[WRITE_FILE] , identifier[MenuConstants] operator[SEP] identifier[PRINT] , identifier[JnlpFileScreen] operator[SEP] identifier[WRITE_FILE] , Other[null] operator[SEP] operator[SEP] }
@RequestMapping("/authenticate") public String authenticate(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { boolean authenticate = request.authenticate(response); return authenticate ? "index" : null; }
class class_name[name] begin[{] method[authenticate, return_type[type[String]], modifier[public], parameter[request, response]] begin[{] local_variable[type[boolean], authenticate] return[TernaryExpression(condition=MemberReference(member=authenticate, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="index"))] end[}] END[}]
annotation[@] identifier[RequestMapping] operator[SEP] literal[String] operator[SEP] Keyword[public] identifier[String] identifier[authenticate] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] operator[SEP] Keyword[throws] identifier[ServletException] , identifier[IOException] { Keyword[boolean] identifier[authenticate] operator[=] identifier[request] operator[SEP] identifier[authenticate] operator[SEP] identifier[response] operator[SEP] operator[SEP] Keyword[return] identifier[authenticate] operator[?] literal[String] operator[:] Other[null] operator[SEP] }
public void cancel() { DistributeJobMonitor jobMonitor = getJobMonitor(); if (jobMonitor != null) { synchronized (GobblinHelixDistributeJobExecutionLauncher.this.cancellationRequest) { if (GobblinHelixDistributeJobExecutionLauncher.this.cancellationRequested) { // Return immediately if a cancellation has already been requested return; } GobblinHelixDistributeJobExecutionLauncher.this.cancellationRequested = true; } jobMonitor.cancel(true); GobblinHelixDistributeJobExecutionLauncher.this.cancellationExecuted = true; } }
class class_name[name] begin[{] method[cancel, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[DistributeJobMonitor], jobMonitor] if[binary_operation[member[.jobMonitor], !=, literal[null]]] begin[{] SYNCHRONIZED[THIS[member[None.cancellationRequest]]] BEGIN[{] if[THIS[member[None.cancellationRequested]]] begin[{] return[None] else begin[{] None end[}] assign[THIS[member[None.cancellationRequested]], literal[true]] END[}] call[jobMonitor.cancel, parameter[literal[true]]] assign[THIS[member[None.cancellationExecuted]], literal[true]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[cancel] operator[SEP] operator[SEP] { identifier[DistributeJobMonitor] identifier[jobMonitor] operator[=] identifier[getJobMonitor] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jobMonitor] operator[!=] Other[null] operator[SEP] { Keyword[synchronized] operator[SEP] identifier[GobblinHelixDistributeJobExecutionLauncher] operator[SEP] Keyword[this] operator[SEP] identifier[cancellationRequest] operator[SEP] { Keyword[if] operator[SEP] identifier[GobblinHelixDistributeJobExecutionLauncher] operator[SEP] Keyword[this] operator[SEP] identifier[cancellationRequested] operator[SEP] { Keyword[return] operator[SEP] } identifier[GobblinHelixDistributeJobExecutionLauncher] operator[SEP] Keyword[this] operator[SEP] identifier[cancellationRequested] operator[=] literal[boolean] operator[SEP] } identifier[jobMonitor] operator[SEP] identifier[cancel] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[GobblinHelixDistributeJobExecutionLauncher] operator[SEP] Keyword[this] operator[SEP] identifier[cancellationExecuted] operator[=] literal[boolean] operator[SEP] } }
public Collection<ServletTimer> getTimers() { if(!isValid()) { throw new IllegalStateException("SipApplicationSession already invalidated !"); } if(servletTimers != null) { return servletTimers.values(); } return new HashMap<String, ServletTimer>().values(); }
class class_name[name] begin[{] method[getTimers, return_type[type[Collection]], modifier[public], parameter[]] begin[{] if[call[.isValid, parameter[]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SipApplicationSession already invalidated !")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.servletTimers], !=, literal[null]]] begin[{] return[call[servletTimers.values, parameter[]]] else begin[{] None end[}] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[], member=values, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=ServletTimer, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] end[}] END[}]
Keyword[public] identifier[Collection] operator[<] identifier[ServletTimer] operator[>] identifier[getTimers] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isValid] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[servletTimers] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[servletTimers] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[ServletTimer] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] }
public static com.liferay.commerce.notification.model.CommerceNotificationQueueEntry updateCommerceNotificationQueueEntry( com.liferay.commerce.notification.model.CommerceNotificationQueueEntry commerceNotificationQueueEntry) { return getService() .updateCommerceNotificationQueueEntry(commerceNotificationQueueEntry); }
class class_name[name] begin[{] method[updateCommerceNotificationQueueEntry, return_type[type[com]], modifier[public static], parameter[commerceNotificationQueueEntry]] begin[{] return[call[.getService, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[notification] operator[SEP] identifier[model] operator[SEP] identifier[CommerceNotificationQueueEntry] identifier[updateCommerceNotificationQueueEntry] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[notification] operator[SEP] identifier[model] operator[SEP] identifier[CommerceNotificationQueueEntry] identifier[commerceNotificationQueueEntry] operator[SEP] { Keyword[return] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[updateCommerceNotificationQueueEntry] operator[SEP] identifier[commerceNotificationQueueEntry] operator[SEP] operator[SEP] }
public void start() { setStatus(ConnectionStatus.NOT_CONNECTED); InetSocketAddress address = directoryServer; clientSocket.connect(address); eventThread.start(); connectionThread = new Thread(new ConnectTask()); connectionThread.setDaemon(true); connectionThread.setName(ServiceDirectoryThread.getThreadName("Client_Connect_Thread")); connectionThread.start(); }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[]] begin[{] call[.setStatus, parameter[member[ConnectionStatus.NOT_CONNECTED]]] local_variable[type[InetSocketAddress], address] call[clientSocket.connect, parameter[member[.address]]] call[eventThread.start, parameter[]] assign[member[.connectionThread], ClassCreator(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ConnectTask, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Thread, sub_type=None))] call[connectionThread.setDaemon, parameter[literal[true]]] call[connectionThread.setName, parameter[call[ServiceDirectoryThread.getThreadName, parameter[literal["Client_Connect_Thread"]]]]] call[connectionThread.start, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[start] operator[SEP] operator[SEP] { identifier[setStatus] operator[SEP] identifier[ConnectionStatus] operator[SEP] identifier[NOT_CONNECTED] operator[SEP] operator[SEP] identifier[InetSocketAddress] identifier[address] operator[=] identifier[directoryServer] operator[SEP] identifier[clientSocket] operator[SEP] identifier[connect] operator[SEP] identifier[address] operator[SEP] operator[SEP] identifier[eventThread] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] identifier[connectionThread] operator[=] Keyword[new] identifier[Thread] operator[SEP] Keyword[new] identifier[ConnectTask] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[connectionThread] operator[SEP] identifier[setDaemon] operator[SEP] literal[boolean] operator[SEP] operator[SEP] identifier[connectionThread] operator[SEP] identifier[setName] operator[SEP] identifier[ServiceDirectoryThread] operator[SEP] identifier[getThreadName] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] identifier[connectionThread] operator[SEP] identifier[start] operator[SEP] operator[SEP] operator[SEP] }
protected <T> Request doInvoke(ResponseReader responseReader, String methodName, RpcStatsContext statsContext, String requestData, AsyncCallback<T> callback) { RequestBuilder rb = doPrepareRequestBuilderImpl(responseReader, methodName, statsContext, requestData, callback); try { return rb.send(); } catch (RequestException ex) { InvocationException iex = new InvocationException( "Unable to initiate the asynchronous service invocation (" + methodName + ") -- check the network connection", ex); callback.onFailure(iex); } finally { if (statsContext.isStatsAvailable()) { statsContext.stats(statsContext.bytesStat(methodName, requestData.length(), "requestSent")); } } return null; }
class class_name[name] begin[{] method[doInvoke, return_type[type[Request]], modifier[protected], parameter[responseReader, methodName, statsContext, requestData, callback]] begin[{] local_variable[type[RequestBuilder], rb] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[], member=send, postfix_operators=[], prefix_operators=[], qualifier=rb, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to initiate the asynchronous service invocation ("), operandr=MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=") -- check the network connection"), operator=+), MemberReference(member=ex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InvocationException, sub_type=None)), name=iex)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=InvocationException, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=iex, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=onFailure, postfix_operators=[], prefix_operators=[], qualifier=callback, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['RequestException']))], finally_block=[IfStatement(condition=MethodInvocation(arguments=[], member=isStatsAvailable, postfix_operators=[], prefix_operators=[], qualifier=statsContext, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=methodName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=requestData, selectors=[], type_arguments=None), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="requestSent")], member=bytesStat, postfix_operators=[], prefix_operators=[], qualifier=statsContext, selectors=[], type_arguments=None)], member=stats, postfix_operators=[], prefix_operators=[], qualifier=statsContext, selectors=[], type_arguments=None), label=None)]))], label=None, resources=None) return[literal[null]] end[}] END[}]
Keyword[protected] operator[<] identifier[T] operator[>] identifier[Request] identifier[doInvoke] operator[SEP] identifier[ResponseReader] identifier[responseReader] , identifier[String] identifier[methodName] , identifier[RpcStatsContext] identifier[statsContext] , identifier[String] identifier[requestData] , identifier[AsyncCallback] operator[<] identifier[T] operator[>] identifier[callback] operator[SEP] { identifier[RequestBuilder] identifier[rb] operator[=] identifier[doPrepareRequestBuilderImpl] operator[SEP] identifier[responseReader] , identifier[methodName] , identifier[statsContext] , identifier[requestData] , identifier[callback] operator[SEP] operator[SEP] Keyword[try] { Keyword[return] identifier[rb] operator[SEP] identifier[send] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[RequestException] identifier[ex] operator[SEP] { identifier[InvocationException] identifier[iex] operator[=] Keyword[new] identifier[InvocationException] operator[SEP] literal[String] operator[+] identifier[methodName] operator[+] literal[String] , identifier[ex] operator[SEP] operator[SEP] identifier[callback] operator[SEP] identifier[onFailure] operator[SEP] identifier[iex] operator[SEP] operator[SEP] } Keyword[finally] { Keyword[if] operator[SEP] identifier[statsContext] operator[SEP] identifier[isStatsAvailable] operator[SEP] operator[SEP] operator[SEP] { identifier[statsContext] operator[SEP] identifier[stats] operator[SEP] identifier[statsContext] operator[SEP] identifier[bytesStat] operator[SEP] identifier[methodName] , identifier[requestData] operator[SEP] identifier[length] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
public com.google.api.ads.admanager.axis.v201805.Date getEndDate() { return endDate; }
class class_name[name] begin[{] method[getEndDate, return_type[type[com]], modifier[public], parameter[]] begin[{] return[member[.endDate]] end[}] END[}]
Keyword[public] identifier[com] operator[SEP] identifier[google] operator[SEP] identifier[api] operator[SEP] identifier[ads] operator[SEP] identifier[admanager] operator[SEP] identifier[axis] operator[SEP] identifier[v201805] operator[SEP] identifier[Date] identifier[getEndDate] operator[SEP] operator[SEP] { Keyword[return] identifier[endDate] operator[SEP] }
protected List<MetricDatum> metricOfRequestOrRetryCount( Field metricType, Request<?> req, Object resp) { AWSRequestMetrics m = req.getAWSRequestMetrics(); TimingInfo ti = m.getTimingInfo(); // Always retrieve the request count even for retry which is equivalent // to the number of requests minus one. Number counter = ti.getCounter(Field.RequestCount.name()); if (counter == null) { // this is possible if one of the request handlers screwed up return Collections.emptyList(); } int requestCount = counter.intValue(); if (requestCount < 1) { LogFactory.getLog(getClass()).debug( "request count must be at least one"); return Collections.emptyList(); } final double count = metricType == Field.RequestCount ? requestCount : requestCount-1 // retryCount = requestCount - 1 ; if (count < 1) { return Collections.emptyList(); } else { return Collections.singletonList(new MetricDatum() .withMetricName(req.getServiceName()) .withDimensions(new Dimension() .withName(Dimensions.MetricType.name()) .withValue(metricType.name())) .withUnit(StandardUnit.Count) .withValue(Double.valueOf(count)) .withTimestamp(endTimestamp(ti))) ; } }
class class_name[name] begin[{] method[metricOfRequestOrRetryCount, return_type[type[List]], modifier[protected], parameter[metricType, req, resp]] begin[{] local_variable[type[AWSRequestMetrics], m] local_variable[type[TimingInfo], ti] local_variable[type[Number], counter] if[binary_operation[member[.counter], ==, literal[null]]] begin[{] return[call[Collections.emptyList, parameter[]]] else begin[{] None end[}] local_variable[type[int], requestCount] if[binary_operation[member[.requestCount], <, literal[1]]] begin[{] call[LogFactory.getLog, parameter[call[.getClass, parameter[]]]] return[call[Collections.emptyList, parameter[]]] else begin[{] None end[}] local_variable[type[double], count] if[binary_operation[member[.count], <, literal[1]]] begin[{] return[call[Collections.emptyList, parameter[]]] else begin[{] return[call[Collections.singletonList, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getServiceName, postfix_operators=[], prefix_operators=[], qualifier=req, selectors=[], type_arguments=None)], member=withMetricName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=Dimensions.MetricType, selectors=[], type_arguments=None)], member=withName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=metricType, selectors=[], type_arguments=None)], member=withValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Dimension, sub_type=None))], member=withDimensions, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=Count, postfix_operators=[], prefix_operators=[], qualifier=StandardUnit, selectors=[])], member=withUnit, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Double, selectors=[], type_arguments=None)], member=withValue, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=ti, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=endTimestamp, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=withTimestamp, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=MetricDatum, sub_type=None))]]] end[}] end[}] END[}]
Keyword[protected] identifier[List] operator[<] identifier[MetricDatum] operator[>] identifier[metricOfRequestOrRetryCount] operator[SEP] identifier[Field] identifier[metricType] , identifier[Request] operator[<] operator[?] operator[>] identifier[req] , identifier[Object] identifier[resp] operator[SEP] { identifier[AWSRequestMetrics] identifier[m] operator[=] identifier[req] operator[SEP] identifier[getAWSRequestMetrics] operator[SEP] operator[SEP] operator[SEP] identifier[TimingInfo] identifier[ti] operator[=] identifier[m] operator[SEP] identifier[getTimingInfo] operator[SEP] operator[SEP] operator[SEP] identifier[Number] identifier[counter] operator[=] identifier[ti] operator[SEP] identifier[getCounter] operator[SEP] identifier[Field] operator[SEP] identifier[RequestCount] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[counter] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } Keyword[int] identifier[requestCount] operator[=] identifier[counter] operator[SEP] identifier[intValue] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[requestCount] operator[<] Other[1] operator[SEP] { identifier[LogFactory] operator[SEP] identifier[getLog] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] Keyword[double] identifier[count] operator[=] identifier[metricType] operator[==] identifier[Field] operator[SEP] identifier[RequestCount] operator[?] identifier[requestCount] operator[:] identifier[requestCount] operator[-] Other[1] operator[SEP] Keyword[if] operator[SEP] identifier[count] operator[<] Other[1] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptyList] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[Collections] operator[SEP] identifier[singletonList] operator[SEP] Keyword[new] identifier[MetricDatum] operator[SEP] operator[SEP] operator[SEP] identifier[withMetricName] operator[SEP] identifier[req] operator[SEP] identifier[getServiceName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withDimensions] operator[SEP] Keyword[new] identifier[Dimension] operator[SEP] operator[SEP] operator[SEP] identifier[withName] operator[SEP] identifier[Dimensions] operator[SEP] identifier[MetricType] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withValue] operator[SEP] identifier[metricType] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[withUnit] operator[SEP] identifier[StandardUnit] operator[SEP] identifier[Count] operator[SEP] operator[SEP] identifier[withValue] operator[SEP] identifier[Double] operator[SEP] identifier[valueOf] operator[SEP] identifier[count] operator[SEP] operator[SEP] operator[SEP] identifier[withTimestamp] operator[SEP] identifier[endTimestamp] operator[SEP] identifier[ti] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
private boolean isRestorable(HivePartitionDataset dataset, HivePartitionVersion version) throws IOException { if (version.getLocation().toString().equalsIgnoreCase(dataset.getLocation().toString())) { return false; } FileSystem fs = ProxyUtils.getOwnerFs(new State(this.state), version.getOwner()); if (!HadoopUtils.hasContent(fs, version.getLocation())) { return false; } return true; }
class class_name[name] begin[{] method[isRestorable, return_type[type[boolean]], modifier[private], parameter[dataset, version]] begin[{] if[call[version.getLocation, parameter[]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[FileSystem], fs] if[call[HadoopUtils.hasContent, parameter[member[.fs], call[version.getLocation, parameter[]]]]] begin[{] return[literal[false]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isRestorable] operator[SEP] identifier[HivePartitionDataset] identifier[dataset] , identifier[HivePartitionVersion] identifier[version] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[version] operator[SEP] identifier[getLocation] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[dataset] operator[SEP] identifier[getLocation] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[FileSystem] identifier[fs] operator[=] identifier[ProxyUtils] operator[SEP] identifier[getOwnerFs] operator[SEP] Keyword[new] identifier[State] operator[SEP] Keyword[this] operator[SEP] identifier[state] operator[SEP] , identifier[version] operator[SEP] identifier[getOwner] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[HadoopUtils] operator[SEP] identifier[hasContent] operator[SEP] identifier[fs] , identifier[version] operator[SEP] identifier[getLocation] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
public Span[] tag(final String[] tokens, final String[][] additionalContext) { this.additionalContextFeatureGenerator.setCurrentContext(additionalContext); this.bestSequence = this.model.bestSequence(tokens, additionalContext, this.contextGenerator, this.sequenceValidator); final List<String> c = this.bestSequence.getOutcomes(); this.contextGenerator.updateAdaptiveData(tokens, c.toArray(new String[c.size()])); Span[] spans = this.seqCodec.decode(c); spans = setProbs(spans); return spans; }
class class_name[name] begin[{] method[tag, return_type[type[Span]], modifier[public], parameter[tokens, additionalContext]] begin[{] THIS[member[None.additionalContextFeatureGenerator]call[None.setCurrentContext, parameter[member[.additionalContext]]]] assign[THIS[member[None.bestSequence]], THIS[member[None.model]call[None.bestSequence, parameter[member[.tokens], member[.additionalContext], THIS[member[None.contextGenerator]], THIS[member[None.sequenceValidator]]]]]] local_variable[type[List], c] THIS[member[None.contextGenerator]call[None.updateAdaptiveData, parameter[member[.tokens], call[c.toArray, parameter[ArrayCreator(dimensions=[MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))]]]]] local_variable[type[Span], spans] assign[member[.spans], call[.setProbs, parameter[member[.spans]]]] return[member[.spans]] end[}] END[}]
Keyword[public] identifier[Span] operator[SEP] operator[SEP] identifier[tag] operator[SEP] Keyword[final] identifier[String] operator[SEP] operator[SEP] identifier[tokens] , Keyword[final] identifier[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[additionalContext] operator[SEP] { Keyword[this] operator[SEP] identifier[additionalContextFeatureGenerator] operator[SEP] identifier[setCurrentContext] operator[SEP] identifier[additionalContext] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[bestSequence] operator[=] Keyword[this] operator[SEP] identifier[model] operator[SEP] identifier[bestSequence] operator[SEP] identifier[tokens] , identifier[additionalContext] , Keyword[this] operator[SEP] identifier[contextGenerator] , Keyword[this] operator[SEP] identifier[sequenceValidator] operator[SEP] operator[SEP] Keyword[final] identifier[List] operator[<] identifier[String] operator[>] identifier[c] operator[=] Keyword[this] operator[SEP] identifier[bestSequence] operator[SEP] identifier[getOutcomes] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[contextGenerator] operator[SEP] identifier[updateAdaptiveData] operator[SEP] identifier[tokens] , identifier[c] operator[SEP] identifier[toArray] operator[SEP] Keyword[new] identifier[String] operator[SEP] identifier[c] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Span] operator[SEP] operator[SEP] identifier[spans] operator[=] Keyword[this] operator[SEP] identifier[seqCodec] operator[SEP] identifier[decode] operator[SEP] identifier[c] operator[SEP] operator[SEP] identifier[spans] operator[=] identifier[setProbs] operator[SEP] identifier[spans] operator[SEP] operator[SEP] Keyword[return] identifier[spans] operator[SEP] }
public SymbolScope getEnclosingScope(Node n) { Node current = n.getParent(); if (n.isName() && n.getParent().isFunction()) { current = current.getParent(); } for (; current != null; current = current.getParent()) { if (scopes.containsKey(current)) { return scopes.get(current); } } return null; }
class class_name[name] begin[{] method[getEnclosingScope, return_type[type[SymbolScope]], modifier[public], parameter[n]] begin[{] local_variable[type[Node], current] if[binary_operation[call[n.isName, parameter[]], &&, call[n.getParent, parameter[]]]] begin[{] assign[member[.current], call[current.getParent, parameter[]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=containsKey, postfix_operators=[], prefix_operators=[], qualifier=scopes, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=scopes, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), init=None, update=[Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=getParent, postfix_operators=[], prefix_operators=[], qualifier=current, selectors=[], type_arguments=None))]), label=None) return[literal[null]] end[}] END[}]
Keyword[public] identifier[SymbolScope] identifier[getEnclosingScope] operator[SEP] identifier[Node] identifier[n] operator[SEP] { identifier[Node] identifier[current] operator[=] identifier[n] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[n] operator[SEP] identifier[isName] operator[SEP] operator[SEP] operator[&&] identifier[n] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] identifier[isFunction] operator[SEP] operator[SEP] operator[SEP] { identifier[current] operator[=] identifier[current] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] operator[SEP] identifier[current] operator[!=] Other[null] operator[SEP] identifier[current] operator[=] identifier[current] operator[SEP] identifier[getParent] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[scopes] operator[SEP] identifier[containsKey] operator[SEP] identifier[current] operator[SEP] operator[SEP] { Keyword[return] identifier[scopes] operator[SEP] identifier[get] operator[SEP] identifier[current] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
protected String readTableInit() throws IOException { boolean more = readRow(rowIn, 0); if (!more) { return null; } String s = rowIn.readString(); // operation is always INSERT int checkOp = rowIn.readInt(); if (checkOp == ScriptWriterBase.INSERT_WITH_SCHEMA) { currentSchema = rowIn.readString(); } else { currentSchema = null; } if (checkOp != ScriptWriterBase.INSERT && checkOp != ScriptWriterBase.INSERT_WITH_SCHEMA) { throw Error.error(ErrorCode.ERROR_IN_SCRIPT_FILE, ErrorCode.M_ERROR_IN_BINARY_SCRIPT_2); } return s; }
class class_name[name] begin[{] method[readTableInit, return_type[type[String]], modifier[protected], parameter[]] begin[{] local_variable[type[boolean], more] if[member[.more]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[String], s] local_variable[type[int], checkOp] if[binary_operation[member[.checkOp], ==, member[ScriptWriterBase.INSERT_WITH_SCHEMA]]] begin[{] assign[member[.currentSchema], call[rowIn.readString, parameter[]]] else begin[{] assign[member[.currentSchema], literal[null]] end[}] if[binary_operation[binary_operation[member[.checkOp], !=, member[ScriptWriterBase.INSERT]], &&, binary_operation[member[.checkOp], !=, member[ScriptWriterBase.INSERT_WITH_SCHEMA]]]] begin[{] ThrowStatement(expression=MethodInvocation(arguments=[MemberReference(member=ERROR_IN_SCRIPT_FILE, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[]), MemberReference(member=M_ERROR_IN_BINARY_SCRIPT_2, postfix_operators=[], prefix_operators=[], qualifier=ErrorCode, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=Error, selectors=[], type_arguments=None), label=None) else begin[{] None end[}] return[member[.s]] end[}] END[}]
Keyword[protected] identifier[String] identifier[readTableInit] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[boolean] identifier[more] operator[=] identifier[readRow] operator[SEP] identifier[rowIn] , Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[more] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[String] identifier[s] operator[=] identifier[rowIn] operator[SEP] identifier[readString] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[checkOp] operator[=] identifier[rowIn] operator[SEP] identifier[readInt] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[checkOp] operator[==] identifier[ScriptWriterBase] operator[SEP] identifier[INSERT_WITH_SCHEMA] operator[SEP] { identifier[currentSchema] operator[=] identifier[rowIn] operator[SEP] identifier[readString] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[currentSchema] operator[=] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[checkOp] operator[!=] identifier[ScriptWriterBase] operator[SEP] identifier[INSERT] operator[&&] identifier[checkOp] operator[!=] identifier[ScriptWriterBase] operator[SEP] identifier[INSERT_WITH_SCHEMA] operator[SEP] { Keyword[throw] identifier[Error] operator[SEP] identifier[error] operator[SEP] identifier[ErrorCode] operator[SEP] identifier[ERROR_IN_SCRIPT_FILE] , identifier[ErrorCode] operator[SEP] identifier[M_ERROR_IN_BINARY_SCRIPT_2] operator[SEP] operator[SEP] } Keyword[return] identifier[s] operator[SEP] }
public static String encodeStringURL(ByteBuffer source, boolean wrap) { return Encoder.encodeString(source, wrap, true); }
class class_name[name] begin[{] method[encodeStringURL, return_type[type[String]], modifier[public static], parameter[source, wrap]] begin[{] return[call[Encoder.encodeString, parameter[member[.source], member[.wrap], literal[true]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[encodeStringURL] operator[SEP] identifier[ByteBuffer] identifier[source] , Keyword[boolean] identifier[wrap] operator[SEP] { Keyword[return] identifier[Encoder] operator[SEP] identifier[encodeString] operator[SEP] identifier[source] , identifier[wrap] , literal[boolean] operator[SEP] operator[SEP] }
private static String getBOMEncoding(final BufferedInputStream is) throws IOException { String encoding = null; final int[] bytes = new int[3]; is.mark(3); bytes[0] = is.read(); bytes[1] = is.read(); bytes[2] = is.read(); if (bytes[0] == 0xFE && bytes[1] == 0xFF) { encoding = UTF_16BE; is.reset(); is.read(); is.read(); } else if (bytes[0] == 0xFF && bytes[1] == 0xFE) { encoding = UTF_16LE; is.reset(); is.read(); is.read(); } else if (bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) { encoding = UTF_8; } else { is.reset(); } return encoding; }
class class_name[name] begin[{] method[getBOMEncoding, return_type[type[String]], modifier[private static], parameter[is]] begin[{] local_variable[type[String], encoding] local_variable[type[int], bytes] call[is.mark, parameter[literal[3]]] assign[member[.bytes], call[is.read, parameter[]]] assign[member[.bytes], call[is.read, parameter[]]] assign[member[.bytes], call[is.read, parameter[]]] if[binary_operation[binary_operation[member[.bytes], ==, literal[0xFE]], &&, binary_operation[member[.bytes], ==, literal[0xFF]]]] begin[{] assign[member[.encoding], member[.UTF_16BE]] call[is.reset, parameter[]] call[is.read, parameter[]] call[is.read, parameter[]] else begin[{] if[binary_operation[binary_operation[member[.bytes], ==, literal[0xFF]], &&, binary_operation[member[.bytes], ==, literal[0xFE]]]] begin[{] assign[member[.encoding], member[.UTF_16LE]] call[is.reset, parameter[]] call[is.read, parameter[]] call[is.read, parameter[]] else begin[{] if[binary_operation[binary_operation[binary_operation[member[.bytes], ==, literal[0xEF]], &&, binary_operation[member[.bytes], ==, literal[0xBB]]], &&, binary_operation[member[.bytes], ==, literal[0xBF]]]] begin[{] assign[member[.encoding], member[.UTF_8]] else begin[{] call[is.reset, parameter[]] end[}] end[}] end[}] return[member[.encoding]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[getBOMEncoding] operator[SEP] Keyword[final] identifier[BufferedInputStream] identifier[is] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[encoding] operator[=] Other[null] operator[SEP] Keyword[final] Keyword[int] operator[SEP] operator[SEP] identifier[bytes] operator[=] Keyword[new] Keyword[int] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[is] operator[SEP] identifier[mark] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] Other[0] operator[SEP] operator[=] identifier[is] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] Other[1] operator[SEP] operator[=] identifier[is] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[bytes] operator[SEP] Other[2] operator[SEP] operator[=] identifier[is] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bytes] operator[SEP] Other[0] operator[SEP] operator[==] literal[Integer] operator[&&] identifier[bytes] operator[SEP] Other[1] operator[SEP] operator[==] literal[Integer] operator[SEP] { identifier[encoding] operator[=] identifier[UTF_16BE] operator[SEP] identifier[is] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[is] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[is] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[bytes] operator[SEP] Other[0] operator[SEP] operator[==] literal[Integer] operator[&&] identifier[bytes] operator[SEP] Other[1] operator[SEP] operator[==] literal[Integer] operator[SEP] { identifier[encoding] operator[=] identifier[UTF_16LE] operator[SEP] identifier[is] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] identifier[is] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] identifier[is] operator[SEP] identifier[read] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[bytes] operator[SEP] Other[0] operator[SEP] operator[==] literal[Integer] operator[&&] identifier[bytes] operator[SEP] Other[1] operator[SEP] operator[==] literal[Integer] operator[&&] identifier[bytes] operator[SEP] Other[2] operator[SEP] operator[==] literal[Integer] operator[SEP] { identifier[encoding] operator[=] identifier[UTF_8] operator[SEP] } Keyword[else] { identifier[is] operator[SEP] identifier[reset] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[encoding] operator[SEP] }
public int commandToDocType(String strCommand) // Standard file maint for this record (returns new record) { int iDocMode = ScreenConstants.MAINT_MODE; if ((MenuConstants.FORM.equalsIgnoreCase(strCommand)) || (MenuConstants.FORMLINK.equalsIgnoreCase(strCommand))) iDocMode = ScreenConstants.MAINT_MODE; else if ((MenuConstants.LOOKUP.equalsIgnoreCase(strCommand)) || (MenuConstants.LOOKUPCLONE.equalsIgnoreCase(strCommand))) iDocMode = ScreenConstants.DISPLAY_MODE; else if (MenuConstants.FORMDETAIL.equalsIgnoreCase(strCommand)) iDocMode = ScreenConstants.DISPLAY_MODE | 64; else if (MenuConstants.POST.equalsIgnoreCase(strCommand)) iDocMode = ScreenConstants.DISPLAY_MODE | 128; else if (MenuConstants.MENUREC.equalsIgnoreCase(strCommand)) iDocMode = ScreenConstants.MENU_MODE; return iDocMode; }
class class_name[name] begin[{] method[commandToDocType, return_type[type[int]], modifier[public], parameter[strCommand]] begin[{] local_variable[type[int], iDocMode] if[binary_operation[call[MenuConstants.FORM.equalsIgnoreCase, parameter[member[.strCommand]]], ||, call[MenuConstants.FORMLINK.equalsIgnoreCase, parameter[member[.strCommand]]]]] begin[{] assign[member[.iDocMode], member[ScreenConstants.MAINT_MODE]] else begin[{] if[binary_operation[call[MenuConstants.LOOKUP.equalsIgnoreCase, parameter[member[.strCommand]]], ||, call[MenuConstants.LOOKUPCLONE.equalsIgnoreCase, parameter[member[.strCommand]]]]] begin[{] assign[member[.iDocMode], member[ScreenConstants.DISPLAY_MODE]] else begin[{] if[call[MenuConstants.FORMDETAIL.equalsIgnoreCase, parameter[member[.strCommand]]]] begin[{] assign[member[.iDocMode], binary_operation[member[ScreenConstants.DISPLAY_MODE], |, literal[64]]] else begin[{] if[call[MenuConstants.POST.equalsIgnoreCase, parameter[member[.strCommand]]]] begin[{] assign[member[.iDocMode], binary_operation[member[ScreenConstants.DISPLAY_MODE], |, literal[128]]] else begin[{] if[call[MenuConstants.MENUREC.equalsIgnoreCase, parameter[member[.strCommand]]]] begin[{] assign[member[.iDocMode], member[ScreenConstants.MENU_MODE]] else begin[{] None end[}] end[}] end[}] end[}] end[}] return[member[.iDocMode]] end[}] END[}]
Keyword[public] Keyword[int] identifier[commandToDocType] operator[SEP] identifier[String] identifier[strCommand] operator[SEP] { Keyword[int] identifier[iDocMode] operator[=] identifier[ScreenConstants] operator[SEP] identifier[MAINT_MODE] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[MenuConstants] operator[SEP] identifier[FORM] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[strCommand] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[MenuConstants] operator[SEP] identifier[FORMLINK] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[strCommand] operator[SEP] operator[SEP] operator[SEP] identifier[iDocMode] operator[=] identifier[ScreenConstants] operator[SEP] identifier[MAINT_MODE] operator[SEP] Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[MenuConstants] operator[SEP] identifier[LOOKUP] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[strCommand] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[MenuConstants] operator[SEP] identifier[LOOKUPCLONE] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[strCommand] operator[SEP] operator[SEP] operator[SEP] identifier[iDocMode] operator[=] identifier[ScreenConstants] operator[SEP] identifier[DISPLAY_MODE] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[MenuConstants] operator[SEP] identifier[FORMDETAIL] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[strCommand] operator[SEP] operator[SEP] identifier[iDocMode] operator[=] identifier[ScreenConstants] operator[SEP] identifier[DISPLAY_MODE] operator[|] Other[64] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[MenuConstants] operator[SEP] identifier[POST] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[strCommand] operator[SEP] operator[SEP] identifier[iDocMode] operator[=] identifier[ScreenConstants] operator[SEP] identifier[DISPLAY_MODE] operator[|] Other[128] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[MenuConstants] operator[SEP] identifier[MENUREC] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[strCommand] operator[SEP] operator[SEP] identifier[iDocMode] operator[=] identifier[ScreenConstants] operator[SEP] identifier[MENU_MODE] operator[SEP] Keyword[return] identifier[iDocMode] operator[SEP] }
protected void writeItem(Object datas) { HSSFRow row = sheet.createRow(index); // 建立新行 if (datas != null) { if (datas.getClass().isArray()) { Object[] values = (Object[]) datas; for (int i = 0; i < values.length; i++) { HSSFCell cell = row.createCell(i); if (values[i] instanceof Number) { cell.setCellType(CellType.NUMERIC); cell.setCellValue(((Number) values[i]).doubleValue()); } else if (values[i] instanceof java.sql.Date) { cell.setCellValue((Date) values[i]); cell.setCellStyle(getDateStyle()); } else if (values[i] instanceof java.util.Date) { cell.setCellValue((Date) values[i]); cell.setCellStyle(getTimeStyle()); } else if (values[i] instanceof Calendar) { cell.setCellValue((Calendar) values[i]); cell.setCellStyle(getTimeStyle()); } else { cell.setCellValue(new HSSFRichTextString((values[i] == null) ? "" : values[i].toString())); } } } else { HSSFCell cell = row.createCell(0); if (datas instanceof Number) { cell.setCellType(CellType.NUMERIC); } cell.setCellValue(new HSSFRichTextString(datas.toString())); } } }
class class_name[name] begin[{] method[writeItem, return_type[void], modifier[protected], parameter[datas]] begin[{] local_variable[type[HSSFRow], row] if[binary_operation[member[.datas], !=, literal[null]]] begin[{] if[call[datas.getClass, parameter[]]] begin[{] local_variable[type[Object], values] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=createCell, postfix_operators=[], prefix_operators=[], qualifier=row, selectors=[], type_arguments=None), name=cell)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HSSFCell, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=sql, sub_type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=ReferenceType(arguments=None, dimensions=[], name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=None, dimensions=None, name=Date, sub_type=None))), operator=instanceof), else_statement=IfStatement(condition=BinaryOperation(operandl=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=ReferenceType(arguments=None, dimensions=[], name=Calendar, sub_type=None), operator=instanceof), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=values, 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=null), operator===), if_false=MemberReference(member=values, 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)]), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HSSFRichTextString, sub_type=None))], member=setCellValue, postfix_operators=[], prefix_operators=[], qualifier=cell, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=ReferenceType(arguments=None, dimensions=[], name=Calendar, sub_type=None))], member=setCellValue, postfix_operators=[], prefix_operators=[], qualifier=cell, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTimeStyle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setCellStyle, postfix_operators=[], prefix_operators=[], qualifier=cell, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None))], member=setCellValue, postfix_operators=[], prefix_operators=[], qualifier=cell, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getTimeStyle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setCellStyle, postfix_operators=[], prefix_operators=[], qualifier=cell, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None))], member=setCellValue, postfix_operators=[], prefix_operators=[], qualifier=cell, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDateStyle, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=setCellStyle, postfix_operators=[], prefix_operators=[], qualifier=cell, selectors=[], type_arguments=None), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=NUMERIC, postfix_operators=[], prefix_operators=[], qualifier=CellType, selectors=[])], member=setCellType, postfix_operators=[], prefix_operators=[], qualifier=cell, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=ReferenceType(arguments=None, dimensions=[], name=Number, sub_type=None))], member=setCellValue, postfix_operators=[], prefix_operators=[], qualifier=cell, 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=values, 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[{] local_variable[type[HSSFCell], cell] if[binary_operation[member[.datas], instanceof, type[Number]]] begin[{] call[cell.setCellType, parameter[member[CellType.NUMERIC]]] else begin[{] None end[}] call[cell.setCellValue, parameter[ClassCreator(arguments=[MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=datas, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HSSFRichTextString, sub_type=None))]] end[}] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[writeItem] operator[SEP] identifier[Object] identifier[datas] operator[SEP] { identifier[HSSFRow] identifier[row] operator[=] identifier[sheet] operator[SEP] identifier[createRow] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[datas] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[datas] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[isArray] operator[SEP] operator[SEP] operator[SEP] { identifier[Object] operator[SEP] operator[SEP] identifier[values] operator[=] operator[SEP] identifier[Object] operator[SEP] operator[SEP] operator[SEP] identifier[datas] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[values] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[HSSFCell] identifier[cell] operator[=] identifier[row] operator[SEP] identifier[createCell] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[i] operator[SEP] Keyword[instanceof] identifier[Number] operator[SEP] { identifier[cell] operator[SEP] identifier[setCellType] operator[SEP] identifier[CellType] operator[SEP] identifier[NUMERIC] operator[SEP] operator[SEP] identifier[cell] operator[SEP] identifier[setCellValue] operator[SEP] operator[SEP] operator[SEP] identifier[Number] operator[SEP] identifier[values] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[doubleValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[i] operator[SEP] Keyword[instanceof] identifier[java] operator[SEP] identifier[sql] operator[SEP] identifier[Date] operator[SEP] { identifier[cell] operator[SEP] identifier[setCellValue] operator[SEP] operator[SEP] identifier[Date] operator[SEP] identifier[values] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[cell] operator[SEP] identifier[setCellStyle] operator[SEP] identifier[getDateStyle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[i] operator[SEP] Keyword[instanceof] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Date] operator[SEP] { identifier[cell] operator[SEP] identifier[setCellValue] operator[SEP] operator[SEP] identifier[Date] operator[SEP] identifier[values] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[cell] operator[SEP] identifier[setCellStyle] operator[SEP] identifier[getTimeStyle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[values] operator[SEP] identifier[i] operator[SEP] Keyword[instanceof] identifier[Calendar] operator[SEP] { identifier[cell] operator[SEP] identifier[setCellValue] operator[SEP] operator[SEP] identifier[Calendar] operator[SEP] identifier[values] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] identifier[cell] operator[SEP] identifier[setCellStyle] operator[SEP] identifier[getTimeStyle] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[cell] operator[SEP] identifier[setCellValue] operator[SEP] Keyword[new] identifier[HSSFRichTextString] operator[SEP] operator[SEP] identifier[values] operator[SEP] identifier[i] operator[SEP] operator[==] Other[null] operator[SEP] operator[?] literal[String] operator[:] identifier[values] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[else] { identifier[HSSFCell] identifier[cell] operator[=] identifier[row] operator[SEP] identifier[createCell] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[datas] Keyword[instanceof] identifier[Number] operator[SEP] { identifier[cell] operator[SEP] identifier[setCellType] operator[SEP] identifier[CellType] operator[SEP] identifier[NUMERIC] operator[SEP] operator[SEP] } identifier[cell] operator[SEP] identifier[setCellValue] operator[SEP] Keyword[new] identifier[HSSFRichTextString] operator[SEP] identifier[datas] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
@Override public BatchGetQueryExecutionResult batchGetQueryExecution(BatchGetQueryExecutionRequest request) { request = beforeClientExecution(request); return executeBatchGetQueryExecution(request); }
class class_name[name] begin[{] method[batchGetQueryExecution, return_type[type[BatchGetQueryExecutionResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeBatchGetQueryExecution, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[BatchGetQueryExecutionResult] identifier[batchGetQueryExecution] operator[SEP] identifier[BatchGetQueryExecutionRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeBatchGetQueryExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public IfcProjectOrderTypeEnum createIfcProjectOrderTypeEnumFromString(EDataType eDataType, String initialValue) { IfcProjectOrderTypeEnum result = IfcProjectOrderTypeEnum.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[createIfcProjectOrderTypeEnumFromString, return_type[type[IfcProjectOrderTypeEnum]], modifier[public], parameter[eDataType, initialValue]] begin[{] local_variable[type[IfcProjectOrderTypeEnum], 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[IfcProjectOrderTypeEnum] identifier[createIfcProjectOrderTypeEnumFromString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[String] identifier[initialValue] operator[SEP] { identifier[IfcProjectOrderTypeEnum] identifier[result] operator[=] identifier[IfcProjectOrderTypeEnum] 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] }
@Override public XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) { return new Stax2FilteredEventReader(Stax2EventReaderAdapter.wrapIfNecessary(reader), filter); }
class class_name[name] begin[{] method[createFilteredReader, return_type[type[XMLEventReader]], modifier[public], parameter[reader, filter]] begin[{] return[ClassCreator(arguments=[MethodInvocation(arguments=[MemberReference(member=reader, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=wrapIfNecessary, postfix_operators=[], prefix_operators=[], qualifier=Stax2EventReaderAdapter, selectors=[], type_arguments=None), MemberReference(member=filter, 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=Stax2FilteredEventReader, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[XMLEventReader] identifier[createFilteredReader] operator[SEP] identifier[XMLEventReader] identifier[reader] , identifier[EventFilter] identifier[filter] operator[SEP] { Keyword[return] Keyword[new] identifier[Stax2FilteredEventReader] operator[SEP] identifier[Stax2EventReaderAdapter] operator[SEP] identifier[wrapIfNecessary] operator[SEP] identifier[reader] operator[SEP] , identifier[filter] operator[SEP] operator[SEP] }
public final EObject ruleJvmTypeReference() throws RecognitionException { EObject current = null; EObject this_JvmParameterizedTypeReference_0 = null; EObject this_XFunctionTypeRef_3 = null; enterRule(); try { // InternalSARL.g:15881:2: ( ( (this_JvmParameterizedTypeReference_0= ruleJvmParameterizedTypeReference ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* ) | this_XFunctionTypeRef_3= ruleXFunctionTypeRef ) ) // InternalSARL.g:15882:2: ( (this_JvmParameterizedTypeReference_0= ruleJvmParameterizedTypeReference ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* ) | this_XFunctionTypeRef_3= ruleXFunctionTypeRef ) { // InternalSARL.g:15882:2: ( (this_JvmParameterizedTypeReference_0= ruleJvmParameterizedTypeReference ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* ) | this_XFunctionTypeRef_3= ruleXFunctionTypeRef ) int alt366=2; int LA366_0 = input.LA(1); if ( (LA366_0==RULE_ID||LA366_0==44||(LA366_0>=92 && LA366_0<=95)) ) { alt366=1; } else if ( (LA366_0==49||LA366_0==76) ) { alt366=2; } else { if (state.backtracking>0) {state.failed=true; return current;} NoViableAltException nvae = new NoViableAltException("", 366, 0, input); throw nvae; } switch (alt366) { case 1 : // InternalSARL.g:15883:3: (this_JvmParameterizedTypeReference_0= ruleJvmParameterizedTypeReference ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* ) { // InternalSARL.g:15883:3: (this_JvmParameterizedTypeReference_0= ruleJvmParameterizedTypeReference ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* ) // InternalSARL.g:15884:4: this_JvmParameterizedTypeReference_0= ruleJvmParameterizedTypeReference ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getJvmTypeReferenceAccess().getJvmParameterizedTypeReferenceParserRuleCall_0_0()); } pushFollow(FOLLOW_89); this_JvmParameterizedTypeReference_0=ruleJvmParameterizedTypeReference(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current = this_JvmParameterizedTypeReference_0; afterParserOrEnumRuleCall(); } // InternalSARL.g:15892:4: ( ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) )* loop365: do { int alt365=2; int LA365_0 = input.LA(1); if ( (LA365_0==55) ) { int LA365_2 = input.LA(2); if ( (LA365_2==56) ) { int LA365_3 = input.LA(3); if ( (synpred61_InternalSARL()) ) { alt365=1; } } } switch (alt365) { case 1 : // InternalSARL.g:15893:5: ( ( () ruleArrayBrackets ) )=> ( () ruleArrayBrackets ) { // InternalSARL.g:15899:5: ( () ruleArrayBrackets ) // InternalSARL.g:15900:6: () ruleArrayBrackets { // InternalSARL.g:15900:6: () // InternalSARL.g:15901:7: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getJvmTypeReferenceAccess().getJvmGenericArrayTypeReferenceComponentTypeAction_0_1_0_0(), current); } } if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getJvmTypeReferenceAccess().getArrayBracketsParserRuleCall_0_1_0_1()); } pushFollow(FOLLOW_89); ruleArrayBrackets(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { afterParserOrEnumRuleCall(); } } } break; default : break loop365; } } while (true); } } break; case 2 : // InternalSARL.g:15918:3: this_XFunctionTypeRef_3= ruleXFunctionTypeRef { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getJvmTypeReferenceAccess().getXFunctionTypeRefParserRuleCall_1()); } pushFollow(FOLLOW_2); this_XFunctionTypeRef_3=ruleXFunctionTypeRef(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current = this_XFunctionTypeRef_3; afterParserOrEnumRuleCall(); } } break; } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleJvmTypeReference, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[EObject], this_JvmParameterizedTypeReference_0] local_variable[type[EObject], this_XFunctionTypeRef_3] call[.enterRule, parameter[]] TryStatement(block=[BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt366)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA366_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA366_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=RULE_ID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operandr=BinaryOperation(operandl=MemberReference(member=LA366_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=44), operator===), operator=||), operandr=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA366_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=92), operator=>=), operandr=BinaryOperation(operandl=MemberReference(member=LA366_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=95), operator=<=), operator=&&), operator=||), else_statement=IfStatement(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=LA366_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=49), operator===), operandr=BinaryOperation(operandl=MemberReference(member=LA366_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=76), operator===), operator=||), else_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=""), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=366), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=NoViableAltException, sub_type=None)), name=nvae)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=NoViableAltException, sub_type=None)), ThrowStatement(expression=MemberReference(member=nvae, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt366, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)), label=None)])), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt366, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJvmTypeReferenceAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getJvmParameterizedTypeReferenceParserRuleCall_0_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_89, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=this_JvmParameterizedTypeReference_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleJvmParameterizedTypeReference, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=this_JvmParameterizedTypeReference_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt365)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA365_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA365_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=55), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA365_2)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA365_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=56), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=3)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA365_3)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred61_InternalSARL, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt365, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]))])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJvmTypeReferenceAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getJvmGenericArrayTypeReferenceComponentTypeAction_0_1_0_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forceCreateModelElementAndSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJvmTypeReferenceAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getArrayBracketsParserRuleCall_0_1_0_1, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_89, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=ruleArrayBrackets, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop365, label=None)])], expression=MemberReference(member=alt365, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop365)])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getJvmTypeReferenceAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getXFunctionTypeRefParserRuleCall_1, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=this_XFunctionTypeRef_3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXFunctionTypeRef, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=this_XFunctionTypeRef_3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), BreakStatement(goto=None, label=None)])], expression=MemberReference(member=alt366, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=leaveRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[EObject] identifier[ruleJvmTypeReference] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[this_JvmParameterizedTypeReference_0] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[this_XFunctionTypeRef_3] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { Keyword[int] identifier[alt366] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA366_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA366_0] operator[==] identifier[RULE_ID] operator[||] identifier[LA366_0] operator[==] Other[44] operator[||] operator[SEP] identifier[LA366_0] operator[>=] Other[92] operator[&&] identifier[LA366_0] operator[<=] Other[95] operator[SEP] operator[SEP] operator[SEP] { identifier[alt366] operator[=] Other[1] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] operator[SEP] identifier[LA366_0] operator[==] Other[49] operator[||] identifier[LA366_0] operator[==] Other[76] operator[SEP] operator[SEP] { identifier[alt366] operator[=] Other[2] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[>] Other[0] operator[SEP] { identifier[state] operator[SEP] identifier[failed] operator[=] literal[boolean] operator[SEP] Keyword[return] identifier[current] operator[SEP] } identifier[NoViableAltException] identifier[nvae] operator[=] Keyword[new] identifier[NoViableAltException] operator[SEP] literal[String] , Other[366] , Other[0] , identifier[input] operator[SEP] operator[SEP] Keyword[throw] identifier[nvae] operator[SEP] } Keyword[switch] operator[SEP] identifier[alt366] operator[SEP] { Keyword[case] Other[1] operator[:] { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getJvmTypeReferenceAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getJvmParameterizedTypeReferenceParserRuleCall_0_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_89] operator[SEP] operator[SEP] identifier[this_JvmParameterizedTypeReference_0] operator[=] identifier[ruleJvmParameterizedTypeReference] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[this_JvmParameterizedTypeReference_0] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } identifier[loop365] operator[:] Keyword[do] { Keyword[int] identifier[alt365] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA365_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA365_0] operator[==] Other[55] operator[SEP] operator[SEP] { Keyword[int] identifier[LA365_2] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA365_2] operator[==] Other[56] operator[SEP] operator[SEP] { Keyword[int] identifier[LA365_3] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred61_InternalSARL] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt365] operator[=] Other[1] operator[SEP] } } } Keyword[switch] operator[SEP] identifier[alt365] operator[SEP] { Keyword[case] Other[1] operator[:] { { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[forceCreateModelElementAndSet] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getJvmTypeReferenceAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getJvmGenericArrayTypeReferenceComponentTypeAction_0_1_0_0] operator[SEP] operator[SEP] , identifier[current] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getJvmTypeReferenceAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getArrayBracketsParserRuleCall_0_1_0_1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_89] operator[SEP] operator[SEP] identifier[ruleArrayBrackets] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop365] operator[SEP] } } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] Keyword[case] Other[2] operator[:] { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getJvmTypeReferenceAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getXFunctionTypeRefParserRuleCall_1] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_2] operator[SEP] operator[SEP] identifier[this_XFunctionTypeRef_3] operator[=] identifier[ruleXFunctionTypeRef] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[this_XFunctionTypeRef_3] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } Keyword[break] operator[SEP] } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[leaveRule] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }