code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public static Expression nowStr(String format) { if (format == null || format.isEmpty()) { return x("NOW_STR()"); } return x("NOW_STR(\"" + format + "\")"); }
class class_name[name] begin[{] method[nowStr, return_type[type[Expression]], modifier[public static], parameter[format]] begin[{] if[binary_operation[binary_operation[member[.format], ==, literal[null]], ||, call[format.isEmpty, parameter[]]]] begin[{] return[call[.x, parameter[literal["NOW_STR()"]]]] else begin[{] None end[}] return[call[.x, parameter[binary_operation[binary_operation[literal["NOW_STR(\""], +, member[.format]], +, literal["\")"]]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[Expression] identifier[nowStr] operator[SEP] identifier[String] identifier[format] operator[SEP] { Keyword[if] operator[SEP] identifier[format] operator[==] Other[null] operator[||] identifier[format] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[x] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[x] operator[SEP] literal[String] operator[+] identifier[format] operator[+] literal[String] operator[SEP] operator[SEP] }
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.ESG__REG_NAME: return REG_NAME_EDEFAULT == null ? regName != null : !REG_NAME_EDEFAULT.equals(regName); } return super.eIsSet(featureID); }
class class_name[name] begin[{] method[eIsSet, return_type[type[boolean]], modifier[public], parameter[featureID]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=ESG__REG_NAME, postfix_operators=[], prefix_operators=[], qualifier=AfplibPackage, selectors=[])], statements=[ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=REG_NAME_EDEFAULT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=regName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=[], prefix_operators=['!'], qualifier=REG_NAME_EDEFAULT, selectors=[], type_arguments=None), if_true=BinaryOperation(operandl=MemberReference(member=regName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=)), label=None)])], expression=MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) return[SuperMethodInvocation(arguments=[MemberReference(member=featureID, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=eIsSet, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[eIsSet] operator[SEP] Keyword[int] identifier[featureID] operator[SEP] { Keyword[switch] operator[SEP] identifier[featureID] operator[SEP] { Keyword[case] identifier[AfplibPackage] operator[SEP] identifier[ESG__REG_NAME] operator[:] Keyword[return] identifier[REG_NAME_EDEFAULT] operator[==] Other[null] operator[?] identifier[regName] operator[!=] Other[null] operator[:] operator[!] identifier[REG_NAME_EDEFAULT] operator[SEP] identifier[equals] operator[SEP] identifier[regName] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[eIsSet] operator[SEP] identifier[featureID] operator[SEP] operator[SEP] }
private static int scanArrayTypeSignature(String string, int start) { int length = string.length(); // need a minimum 2 char if (start >= length - 1) { throw new IllegalArgumentException(); } char c = string.charAt(start); if (c != C_ARRAY) { throw new IllegalArgumentException(); } c = string.charAt(++start); while(c == C_ARRAY) { // need a minimum 2 char if (start >= length - 1) { throw new IllegalArgumentException(); } c = string.charAt(++start); } return scanTypeSignature(string, start); }
class class_name[name] begin[{] method[scanArrayTypeSignature, return_type[type[int]], modifier[private static], parameter[string, start]] begin[{] local_variable[type[int], length] if[binary_operation[member[.start], >=, binary_operation[member[.length], -, literal[1]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[char], c] if[binary_operation[member[.c], !=, member[.C_ARRAY]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.c], call[string.charAt, parameter[member[.start]]]] while[binary_operation[member[.c], ==, member[.C_ARRAY]]] begin[{] if[binary_operation[member[.start], >=, binary_operation[member[.length], -, literal[1]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.c], call[string.charAt, parameter[member[.start]]]] end[}] return[call[.scanTypeSignature, parameter[member[.string], member[.start]]]] end[}] END[}]
Keyword[private] Keyword[static] Keyword[int] identifier[scanArrayTypeSignature] operator[SEP] identifier[String] identifier[string] , Keyword[int] identifier[start] operator[SEP] { Keyword[int] identifier[length] operator[=] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[start] operator[>=] identifier[length] operator[-] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } Keyword[char] identifier[c] operator[=] identifier[string] operator[SEP] identifier[charAt] operator[SEP] identifier[start] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[!=] identifier[C_ARRAY] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } identifier[c] operator[=] identifier[string] operator[SEP] identifier[charAt] operator[SEP] operator[++] identifier[start] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[c] operator[==] identifier[C_ARRAY] operator[SEP] { Keyword[if] operator[SEP] identifier[start] operator[>=] identifier[length] operator[-] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } identifier[c] operator[=] identifier[string] operator[SEP] identifier[charAt] operator[SEP] operator[++] identifier[start] operator[SEP] operator[SEP] } Keyword[return] identifier[scanTypeSignature] operator[SEP] identifier[string] , identifier[start] operator[SEP] operator[SEP] }
public static CmsResource initResource( CmsObject cms, String resourceName, HttpServletRequest req, HttpServletResponse res) throws CmsException { return OpenCmsCore.getInstance().initResource(cms, resourceName, req, res); }
class class_name[name] begin[{] method[initResource, return_type[type[CmsResource]], modifier[public static], parameter[cms, resourceName, req, res]] begin[{] return[call[OpenCmsCore.getInstance, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CmsResource] identifier[initResource] operator[SEP] identifier[CmsObject] identifier[cms] , identifier[String] identifier[resourceName] , identifier[HttpServletRequest] identifier[req] , identifier[HttpServletResponse] identifier[res] operator[SEP] Keyword[throws] identifier[CmsException] { Keyword[return] identifier[OpenCmsCore] operator[SEP] identifier[getInstance] operator[SEP] operator[SEP] operator[SEP] identifier[initResource] operator[SEP] identifier[cms] , identifier[resourceName] , identifier[req] , identifier[res] operator[SEP] operator[SEP] }
public <T> T invoke(ForkJoinTask<T> task) { if (task == null) throw new NullPointerException(); externalSubmit(task); return task.join(); }
class class_name[name] begin[{] method[invoke, return_type[type[T]], modifier[public], parameter[task]] begin[{] if[binary_operation[member[.task], ==, literal[null]]] 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=NullPointerException, sub_type=None)), label=None) else begin[{] None end[}] call[.externalSubmit, parameter[member[.task]]] return[call[task.join, parameter[]]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[invoke] operator[SEP] identifier[ForkJoinTask] operator[<] identifier[T] operator[>] identifier[task] operator[SEP] { Keyword[if] operator[SEP] identifier[task] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[NullPointerException] operator[SEP] operator[SEP] operator[SEP] identifier[externalSubmit] operator[SEP] identifier[task] operator[SEP] operator[SEP] Keyword[return] identifier[task] operator[SEP] identifier[join] operator[SEP] operator[SEP] operator[SEP] }
private boolean isCql3Enabled(TableInfo tableInfo) { Properties cfProperties = getColumnFamilyProperties(tableInfo); String defaultValidationClass = cfProperties != null ? cfProperties .getProperty(CassandraConstants.DEFAULT_VALIDATION_CLASS) : null; // For normal columns boolean isCounterColumnType = isCounterColumnType(tableInfo, defaultValidationClass); return containsCompositeKey(tableInfo) || containsCollectionColumns(tableInfo) || ((cql_version != null && cql_version.equals(CassandraConstants.CQL_VERSION_3_0)) && (containsEmbeddedColumns(tableInfo) || containsElementCollectionColumns(tableInfo))) && !isCounterColumnType || ((cql_version != null && cql_version.equals(CassandraConstants.CQL_VERSION_3_0)) && !tableInfo .getType().equals(Type.SUPER_COLUMN_FAMILY.name())); }
class class_name[name] begin[{] method[isCql3Enabled, return_type[type[boolean]], modifier[private], parameter[tableInfo]] begin[{] local_variable[type[Properties], cfProperties] local_variable[type[String], defaultValidationClass] local_variable[type[boolean], isCounterColumnType] return[binary_operation[binary_operation[binary_operation[call[.containsCompositeKey, parameter[member[.tableInfo]]], ||, call[.containsCollectionColumns, parameter[member[.tableInfo]]]], ||, binary_operation[binary_operation[binary_operation[binary_operation[member[.cql_version], !=, literal[null]], &&, call[cql_version.equals, parameter[member[CassandraConstants.CQL_VERSION_3_0]]]], &&, binary_operation[call[.containsEmbeddedColumns, parameter[member[.tableInfo]]], ||, call[.containsElementCollectionColumns, parameter[member[.tableInfo]]]]], &&, member[.isCounterColumnType]]], ||, binary_operation[binary_operation[binary_operation[member[.cql_version], !=, literal[null]], &&, call[cql_version.equals, parameter[member[CassandraConstants.CQL_VERSION_3_0]]]], &&, call[tableInfo.getType, parameter[]]]]] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[isCql3Enabled] operator[SEP] identifier[TableInfo] identifier[tableInfo] operator[SEP] { identifier[Properties] identifier[cfProperties] operator[=] identifier[getColumnFamilyProperties] operator[SEP] identifier[tableInfo] operator[SEP] operator[SEP] identifier[String] identifier[defaultValidationClass] operator[=] identifier[cfProperties] operator[!=] Other[null] operator[?] identifier[cfProperties] operator[SEP] identifier[getProperty] operator[SEP] identifier[CassandraConstants] operator[SEP] identifier[DEFAULT_VALIDATION_CLASS] operator[SEP] operator[:] Other[null] operator[SEP] Keyword[boolean] identifier[isCounterColumnType] operator[=] identifier[isCounterColumnType] operator[SEP] identifier[tableInfo] , identifier[defaultValidationClass] operator[SEP] operator[SEP] Keyword[return] identifier[containsCompositeKey] operator[SEP] identifier[tableInfo] operator[SEP] operator[||] identifier[containsCollectionColumns] operator[SEP] identifier[tableInfo] operator[SEP] operator[||] operator[SEP] operator[SEP] identifier[cql_version] operator[!=] Other[null] operator[&&] identifier[cql_version] operator[SEP] identifier[equals] operator[SEP] identifier[CassandraConstants] operator[SEP] identifier[CQL_VERSION_3_0] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[containsEmbeddedColumns] operator[SEP] identifier[tableInfo] operator[SEP] operator[||] identifier[containsElementCollectionColumns] operator[SEP] identifier[tableInfo] operator[SEP] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[isCounterColumnType] operator[||] operator[SEP] operator[SEP] identifier[cql_version] operator[!=] Other[null] operator[&&] identifier[cql_version] operator[SEP] identifier[equals] operator[SEP] identifier[CassandraConstants] operator[SEP] identifier[CQL_VERSION_3_0] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[tableInfo] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[Type] operator[SEP] identifier[SUPER_COLUMN_FAMILY] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
static public JobConf createJob(String[] argv) throws IOException { StreamJob job = new StreamJob(); job.argv_ = argv; job.init(); job.preProcessArgs(); job.parseArgv(); job.postProcessArgs(); job.setJobConf(); return job.jobConf_; }
class class_name[name] begin[{] method[createJob, return_type[type[JobConf]], modifier[public static], parameter[argv]] begin[{] local_variable[type[StreamJob], job] assign[member[job.argv_], member[.argv]] call[job.init, parameter[]] call[job.preProcessArgs, parameter[]] call[job.parseArgv, parameter[]] call[job.postProcessArgs, parameter[]] call[job.setJobConf, parameter[]] return[member[job.jobConf_]] end[}] END[}]
Keyword[static] Keyword[public] identifier[JobConf] identifier[createJob] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[argv] operator[SEP] Keyword[throws] identifier[IOException] { identifier[StreamJob] identifier[job] operator[=] Keyword[new] identifier[StreamJob] operator[SEP] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[argv_] operator[=] identifier[argv] operator[SEP] identifier[job] operator[SEP] identifier[init] operator[SEP] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[preProcessArgs] operator[SEP] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[parseArgv] operator[SEP] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[postProcessArgs] operator[SEP] operator[SEP] operator[SEP] identifier[job] operator[SEP] identifier[setJobConf] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[job] operator[SEP] identifier[jobConf_] operator[SEP] }
public int queryObjJoinCountByCondition(String sql){ /* JdbcTemplate jdbcTemplate = (JdbcTemplate) MicroDbHolder .getDbSource(dbName);*/ JdbcTemplate jdbcTemplate = getMicroJdbcTemplate(); logger.debug(sql); Integer total=jdbcTemplate.queryForObject(sql,Integer.class); return total; }
class class_name[name] begin[{] method[queryObjJoinCountByCondition, return_type[type[int]], modifier[public], parameter[sql]] begin[{] local_variable[type[JdbcTemplate], jdbcTemplate] call[logger.debug, parameter[member[.sql]]] local_variable[type[Integer], total] return[member[.total]] end[}] END[}]
Keyword[public] Keyword[int] identifier[queryObjJoinCountByCondition] operator[SEP] identifier[String] identifier[sql] operator[SEP] { identifier[JdbcTemplate] identifier[jdbcTemplate] operator[=] identifier[getMicroJdbcTemplate] operator[SEP] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] identifier[sql] operator[SEP] operator[SEP] identifier[Integer] identifier[total] operator[=] identifier[jdbcTemplate] operator[SEP] identifier[queryForObject] operator[SEP] identifier[sql] , identifier[Integer] operator[SEP] Keyword[class] operator[SEP] operator[SEP] Keyword[return] identifier[total] operator[SEP] }
@Override public JobIntentService.GenericWorkItem dequeueWork() { JobWorkItem work = null; synchronized (mLock) { if (mParams == null) { return null; } try { work = mParams.dequeueWork(); } catch (SecurityException se) { //ignore se.printStackTrace(); } } if (work != null) { work.getIntent().setExtrasClassLoader(mService.getClassLoader()); return new WrapperWorkItem(work); } else { return null; } }
class class_name[name] begin[{] method[dequeueWork, return_type[type[JobIntentService]], modifier[public], parameter[]] begin[{] local_variable[type[JobWorkItem], work] SYNCHRONIZED[member[.mLock]] BEGIN[{] if[binary_operation[member[.mParams], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=work, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=dequeueWork, postfix_operators=[], prefix_operators=[], qualifier=mParams, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=printStackTrace, postfix_operators=[], prefix_operators=[], qualifier=se, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=se, types=['SecurityException']))], finally_block=None, label=None, resources=None) END[}] if[binary_operation[member[.work], !=, literal[null]]] begin[{] call[work.getIntent, parameter[]] return[ClassCreator(arguments=[MemberReference(member=work, 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=WrapperWorkItem, sub_type=None))] else begin[{] return[literal[null]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[JobIntentService] operator[SEP] identifier[GenericWorkItem] identifier[dequeueWork] operator[SEP] operator[SEP] { identifier[JobWorkItem] identifier[work] operator[=] Other[null] operator[SEP] Keyword[synchronized] operator[SEP] identifier[mLock] operator[SEP] { Keyword[if] operator[SEP] identifier[mParams] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[try] { identifier[work] operator[=] identifier[mParams] operator[SEP] identifier[dequeueWork] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[SecurityException] identifier[se] operator[SEP] { identifier[se] operator[SEP] identifier[printStackTrace] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[work] operator[!=] Other[null] operator[SEP] { identifier[work] operator[SEP] identifier[getIntent] operator[SEP] operator[SEP] operator[SEP] identifier[setExtrasClassLoader] operator[SEP] identifier[mService] operator[SEP] identifier[getClassLoader] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[WrapperWorkItem] operator[SEP] identifier[work] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] Other[null] operator[SEP] } }
public LocalDateTime getOldDateTimeStrict() { // If there is no change event, then the old value is the same as the current value. LocalDate oldDateValue = datePicker.getDate(); LocalTime oldTimeValue = timePicker.getTime(); // If a change event exists, then the old value can be retrieved from the change event. oldDateValue = (dateChangeEvent != null) ? dateChangeEvent.getOldDate() : oldDateValue; oldTimeValue = (timeChangeEvent != null) ? timeChangeEvent.getOldTime() : oldTimeValue; // If either will value is null, then this function will return null. if (oldDateValue == null || oldTimeValue == null) { return null; } // Return the combination of the two values. return LocalDateTime.of(oldDateValue, oldTimeValue); }
class class_name[name] begin[{] method[getOldDateTimeStrict, return_type[type[LocalDateTime]], modifier[public], parameter[]] begin[{] local_variable[type[LocalDate], oldDateValue] local_variable[type[LocalTime], oldTimeValue] assign[member[.oldDateValue], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=dateChangeEvent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MemberReference(member=oldDateValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=getOldDate, postfix_operators=[], prefix_operators=[], qualifier=dateChangeEvent, selectors=[], type_arguments=None))] assign[member[.oldTimeValue], TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=timeChangeEvent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), if_false=MemberReference(member=oldTimeValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_true=MethodInvocation(arguments=[], member=getOldTime, postfix_operators=[], prefix_operators=[], qualifier=timeChangeEvent, selectors=[], type_arguments=None))] if[binary_operation[binary_operation[member[.oldDateValue], ==, literal[null]], ||, binary_operation[member[.oldTimeValue], ==, literal[null]]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[LocalDateTime.of, parameter[member[.oldDateValue], member[.oldTimeValue]]]] end[}] END[}]
Keyword[public] identifier[LocalDateTime] identifier[getOldDateTimeStrict] operator[SEP] operator[SEP] { identifier[LocalDate] identifier[oldDateValue] operator[=] identifier[datePicker] operator[SEP] identifier[getDate] operator[SEP] operator[SEP] operator[SEP] identifier[LocalTime] identifier[oldTimeValue] operator[=] identifier[timePicker] operator[SEP] identifier[getTime] operator[SEP] operator[SEP] operator[SEP] identifier[oldDateValue] operator[=] operator[SEP] identifier[dateChangeEvent] operator[!=] Other[null] operator[SEP] operator[?] identifier[dateChangeEvent] operator[SEP] identifier[getOldDate] operator[SEP] operator[SEP] operator[:] identifier[oldDateValue] operator[SEP] identifier[oldTimeValue] operator[=] operator[SEP] identifier[timeChangeEvent] operator[!=] Other[null] operator[SEP] operator[?] identifier[timeChangeEvent] operator[SEP] identifier[getOldTime] operator[SEP] operator[SEP] operator[:] identifier[oldTimeValue] operator[SEP] Keyword[if] operator[SEP] identifier[oldDateValue] operator[==] Other[null] operator[||] identifier[oldTimeValue] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[LocalDateTime] operator[SEP] identifier[of] operator[SEP] identifier[oldDateValue] , identifier[oldTimeValue] operator[SEP] operator[SEP] }
public int send (Connection connection, Object object) throws IOException { SocketChannel socketChannel = this.socketChannel; if (socketChannel == null) throw new SocketException("Connection is closed."); synchronized (writeLock) { int start = writeBuffer.position(); int lengthLength = serialization.getLengthLength(); try { // Leave room for length. writeBuffer.position(writeBuffer.position() + lengthLength); // Write data. serialization.write(connection, writeBuffer, object); } catch (Throwable ex) { throw new KryoNetException("Error serializing object of type: " + object.getClass().getName(), ex); } int end = writeBuffer.position(); // Write data length. writeBuffer.position(start); serialization.writeLength(writeBuffer, end - lengthLength - start); writeBuffer.position(end); // Write to socket if no data was queued. if (start == 0 && !writeToSocket()) { // A partial write, set OP_WRITE to be notified when more writing can occur. selectionKey.interestOps(SelectionKey.OP_READ | SelectionKey.OP_WRITE); } else { // Full write, wake up selector so idle event will be fired. selectionKey.selector().wakeup(); } if (DEBUG || TRACE) { float percentage = writeBuffer.position() / (float)writeBuffer.capacity(); if (DEBUG && percentage > 0.75f) debug("kryonet", connection + " TCP write buffer is approaching capacity: " + percentage + "%"); else if (TRACE && percentage > 0.25f) trace("kryonet", connection + " TCP write buffer utilization: " + percentage + "%"); } lastWriteTime = System.currentTimeMillis(); return end - start; } }
class class_name[name] begin[{] method[send, return_type[type[int]], modifier[public], parameter[connection, object]] begin[{] local_variable[type[SocketChannel], socketChannel] if[binary_operation[member[.socketChannel], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Connection is closed.")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SocketException, sub_type=None)), label=None) else begin[{] None end[}] SYNCHRONIZED[member[.writeLock]] BEGIN[{] local_variable[type[int], start] local_variable[type[int], lengthLength] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MethodInvocation(arguments=[], member=position, postfix_operators=[], prefix_operators=[], qualifier=writeBuffer, selectors=[], type_arguments=None), operandr=MemberReference(member=lengthLength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=position, postfix_operators=[], prefix_operators=[], qualifier=writeBuffer, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=connection, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=writeBuffer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=write, postfix_operators=[], prefix_operators=[], qualifier=serialization, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Error serializing object of type: "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=object, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), 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=KryoNetException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ex, types=['Throwable']))], finally_block=None, label=None, resources=None) local_variable[type[int], end] call[writeBuffer.position, parameter[member[.start]]] call[serialization.writeLength, parameter[member[.writeBuffer], binary_operation[binary_operation[member[.end], -, member[.lengthLength]], -, member[.start]]]] call[writeBuffer.position, parameter[member[.end]]] if[binary_operation[binary_operation[member[.start], ==, literal[0]], &&, call[.writeToSocket, parameter[]]]] begin[{] call[selectionKey.interestOps, parameter[binary_operation[member[SelectionKey.OP_READ], |, member[SelectionKey.OP_WRITE]]]] else begin[{] call[selectionKey.selector, parameter[]] end[}] if[binary_operation[member[.DEBUG], ||, member[.TRACE]]] begin[{] local_variable[type[float], percentage] if[binary_operation[member[.DEBUG], &&, binary_operation[member[.percentage], >, literal[0.75f]]]] begin[{] call[.debug, parameter[literal["kryonet"], binary_operation[binary_operation[binary_operation[member[.connection], +, literal[" TCP write buffer is approaching capacity: "]], +, member[.percentage]], +, literal["%"]]]] else begin[{] if[binary_operation[member[.TRACE], &&, binary_operation[member[.percentage], >, literal[0.25f]]]] begin[{] call[.trace, parameter[literal["kryonet"], binary_operation[binary_operation[binary_operation[member[.connection], +, literal[" TCP write buffer utilization: "]], +, member[.percentage]], +, literal["%"]]]] else begin[{] None end[}] end[}] else begin[{] None end[}] assign[member[.lastWriteTime], call[System.currentTimeMillis, parameter[]]] return[binary_operation[member[.end], -, member[.start]]] END[}] end[}] END[}]
Keyword[public] Keyword[int] identifier[send] operator[SEP] identifier[Connection] identifier[connection] , identifier[Object] identifier[object] operator[SEP] Keyword[throws] identifier[IOException] { identifier[SocketChannel] identifier[socketChannel] operator[=] Keyword[this] operator[SEP] identifier[socketChannel] operator[SEP] Keyword[if] operator[SEP] identifier[socketChannel] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[SocketException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[writeLock] operator[SEP] { Keyword[int] identifier[start] operator[=] identifier[writeBuffer] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[lengthLength] operator[=] identifier[serialization] operator[SEP] identifier[getLengthLength] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[writeBuffer] operator[SEP] identifier[position] operator[SEP] identifier[writeBuffer] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[+] identifier[lengthLength] operator[SEP] operator[SEP] identifier[serialization] operator[SEP] identifier[write] operator[SEP] identifier[connection] , identifier[writeBuffer] , identifier[object] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[ex] operator[SEP] { Keyword[throw] Keyword[new] identifier[KryoNetException] operator[SEP] literal[String] operator[+] identifier[object] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[ex] operator[SEP] operator[SEP] } Keyword[int] identifier[end] operator[=] identifier[writeBuffer] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[SEP] identifier[writeBuffer] operator[SEP] identifier[position] operator[SEP] identifier[start] operator[SEP] operator[SEP] identifier[serialization] operator[SEP] identifier[writeLength] operator[SEP] identifier[writeBuffer] , identifier[end] operator[-] identifier[lengthLength] operator[-] identifier[start] operator[SEP] operator[SEP] identifier[writeBuffer] operator[SEP] identifier[position] operator[SEP] identifier[end] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[start] operator[==] Other[0] operator[&&] operator[!] identifier[writeToSocket] operator[SEP] operator[SEP] operator[SEP] { identifier[selectionKey] operator[SEP] identifier[interestOps] operator[SEP] identifier[SelectionKey] operator[SEP] identifier[OP_READ] operator[|] identifier[SelectionKey] operator[SEP] identifier[OP_WRITE] operator[SEP] operator[SEP] } Keyword[else] { identifier[selectionKey] operator[SEP] identifier[selector] operator[SEP] operator[SEP] operator[SEP] identifier[wakeup] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[DEBUG] operator[||] identifier[TRACE] operator[SEP] { Keyword[float] identifier[percentage] operator[=] identifier[writeBuffer] operator[SEP] identifier[position] operator[SEP] operator[SEP] operator[/] operator[SEP] Keyword[float] operator[SEP] identifier[writeBuffer] operator[SEP] identifier[capacity] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[DEBUG] operator[&&] identifier[percentage] operator[>] literal[Float] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[connection] operator[+] literal[String] operator[+] identifier[percentage] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[else] Keyword[if] operator[SEP] identifier[TRACE] operator[&&] identifier[percentage] operator[>] literal[Float] operator[SEP] identifier[trace] operator[SEP] literal[String] , identifier[connection] operator[+] literal[String] operator[+] identifier[percentage] operator[+] literal[String] operator[SEP] operator[SEP] } identifier[lastWriteTime] operator[=] identifier[System] operator[SEP] identifier[currentTimeMillis] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[end] operator[-] identifier[start] operator[SEP] } }
@Override public synchronized AuthInfo auth() throws AuthenticationException { GameProfile selectedProfile = session().getSelectedProfile(); if (selectedProfile == null) { throw new AuthenticationException("no profile is available"); } Map<String, String> properties = authResult.getProperties(); if (properties == null) { properties = Collections.emptyMap(); } return new AuthInfo(selectedProfile.getName(), authResult.getAccessToken(), selectedProfile.getUUID(), properties, authResult.getUserType().getName()); }
class class_name[name] begin[{] method[auth, return_type[type[AuthInfo]], modifier[synchronized public], parameter[]] begin[{] local_variable[type[GameProfile], selectedProfile] if[binary_operation[member[.selectedProfile], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="no profile is available")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AuthenticationException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Map], properties] if[binary_operation[member[.properties], ==, literal[null]]] begin[{] assign[member[.properties], call[Collections.emptyMap, parameter[]]] else begin[{] None end[}] return[ClassCreator(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=selectedProfile, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getAccessToken, postfix_operators=[], prefix_operators=[], qualifier=authResult, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getUUID, postfix_operators=[], prefix_operators=[], qualifier=selectedProfile, selectors=[], type_arguments=None), MemberReference(member=properties, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getUserType, postfix_operators=[], prefix_operators=[], qualifier=authResult, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AuthInfo, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[synchronized] identifier[AuthInfo] identifier[auth] operator[SEP] operator[SEP] Keyword[throws] identifier[AuthenticationException] { identifier[GameProfile] identifier[selectedProfile] operator[=] identifier[session] operator[SEP] operator[SEP] operator[SEP] identifier[getSelectedProfile] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[selectedProfile] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[AuthenticationException] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[properties] operator[=] identifier[authResult] operator[SEP] identifier[getProperties] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[properties] operator[==] Other[null] operator[SEP] { identifier[properties] operator[=] identifier[Collections] operator[SEP] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[AuthInfo] operator[SEP] identifier[selectedProfile] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[authResult] operator[SEP] identifier[getAccessToken] operator[SEP] operator[SEP] , identifier[selectedProfile] operator[SEP] identifier[getUUID] operator[SEP] operator[SEP] , identifier[properties] , identifier[authResult] operator[SEP] identifier[getUserType] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@CanIgnoreReturnValue @Override public V get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, ExecutionException { // NOTE: if timeout < 0, remainingNanos will be < 0 and we will fall into the while(true) loop // at the bottom and throw a timeoutexception. long remainingNanos = unit.toNanos(timeout); // we rely on the implicit null check on unit. if (Thread.interrupted()) { throw new InterruptedException(); } Object localValue = value; if (localValue != null & !(localValue instanceof AbstractFuture.SetFuture)) { return getDoneValue(localValue); } // we delay calling nanoTime until we know we will need to either park or spin final long endNanos = remainingNanos > 0 ? System.nanoTime() + remainingNanos : 0; long_wait_loop: if (remainingNanos >= SPIN_THRESHOLD_NANOS) { Waiter oldHead = waiters; if (oldHead != Waiter.TOMBSTONE) { Waiter node = new Waiter(); do { node.setNext(oldHead); if (ATOMIC_HELPER.casWaiters(this, oldHead, node)) { while (true) { LockSupport.parkNanos(this, remainingNanos); // Check interruption first, if we woke up due to interruption we need to honor that. if (Thread.interrupted()) { removeWaiter(node); throw new InterruptedException(); } // Otherwise re-read and check doneness. If we loop then it must have been a spurious // wakeup localValue = value; if (localValue != null & !(localValue instanceof AbstractFuture.SetFuture)) { return getDoneValue(localValue); } // timed out? remainingNanos = endNanos - System.nanoTime(); if (remainingNanos < SPIN_THRESHOLD_NANOS) { // Remove the waiter, one way or another we are done parking this thread. removeWaiter(node); break long_wait_loop; // jump down to the busy wait loop } } } oldHead = waiters; // re-read and loop. } while (oldHead != Waiter.TOMBSTONE); } // re-read value, if we get here then we must have observed a TOMBSTONE while trying to add a // waiter. return getDoneValue(value); } // If we get here then we have remainingNanos < SPIN_THRESHOLD_NANOS and there is no node on the // waiters list while (remainingNanos > 0) { localValue = value; if (localValue != null & !(localValue instanceof AbstractFuture.SetFuture)) { return getDoneValue(localValue); } if (Thread.interrupted()) { throw new InterruptedException(); } remainingNanos = endNanos - System.nanoTime(); } throw new TimeoutException(); }
class class_name[name] begin[{] method[get, return_type[type[V]], modifier[public], parameter[timeout, unit]] begin[{] local_variable[type[long], remainingNanos] if[call[Thread.interrupted, parameter[]]] 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=InterruptedException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[Object], localValue] if[binary_operation[binary_operation[member[.localValue], !=, literal[null]], &, binary_operation[member[.localValue], instanceof, type[AbstractFuture]]]] begin[{] return[call[.getDoneValue, parameter[member[.localValue]]]] else begin[{] None end[}] local_variable[type[long], endNanos] if[binary_operation[member[.remainingNanos], >=, member[.SPIN_THRESHOLD_NANOS]]] begin[{] local_variable[type[Waiter], oldHead] if[binary_operation[member[.oldHead], !=, member[Waiter.TOMBSTONE]]] begin[{] local_variable[type[Waiter], node] do[binary_operation[member[.oldHead], !=, member[Waiter.TOMBSTONE]]] begin[{] call[node.setNext, parameter[member[.oldHead]]] if[call[ATOMIC_HELPER.casWaiters, parameter[THIS[], member[.oldHead], member[.node]]]] begin[{] while[literal[true]] begin[{] call[LockSupport.parkNanos, parameter[THIS[], member[.remainingNanos]]] if[call[Thread.interrupted, parameter[]]] begin[{] call[.removeWaiter, parameter[member[.node]]] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=InterruptedException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.localValue], member[.value]] if[binary_operation[binary_operation[member[.localValue], !=, literal[null]], &, binary_operation[member[.localValue], instanceof, type[AbstractFuture]]]] begin[{] return[call[.getDoneValue, parameter[member[.localValue]]]] else begin[{] None end[}] assign[member[.remainingNanos], binary_operation[member[.endNanos], -, call[System.nanoTime, parameter[]]]] if[binary_operation[member[.remainingNanos], <, member[.SPIN_THRESHOLD_NANOS]]] begin[{] call[.removeWaiter, parameter[member[.node]]] BreakStatement(goto=long_wait_loop, label=None) else begin[{] None end[}] end[}] else begin[{] None end[}] assign[member[.oldHead], member[.waiters]] end[}] else begin[{] None end[}] return[call[.getDoneValue, parameter[member[.value]]]] else begin[{] None end[}] while[binary_operation[member[.remainingNanos], >, literal[0]]] begin[{] assign[member[.localValue], member[.value]] if[binary_operation[binary_operation[member[.localValue], !=, literal[null]], &, binary_operation[member[.localValue], instanceof, type[AbstractFuture]]]] begin[{] return[call[.getDoneValue, parameter[member[.localValue]]]] else begin[{] None end[}] if[call[Thread.interrupted, parameter[]]] 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=InterruptedException, sub_type=None)), label=None) else begin[{] None end[}] assign[member[.remainingNanos], binary_operation[member[.endNanos], -, call[System.nanoTime, parameter[]]]] end[}] ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=TimeoutException, sub_type=None)), label=None) end[}] END[}]
annotation[@] identifier[CanIgnoreReturnValue] annotation[@] identifier[Override] Keyword[public] identifier[V] identifier[get] operator[SEP] Keyword[long] identifier[timeout] , identifier[TimeUnit] identifier[unit] operator[SEP] Keyword[throws] identifier[InterruptedException] , identifier[TimeoutException] , identifier[ExecutionException] { Keyword[long] identifier[remainingNanos] operator[=] identifier[unit] operator[SEP] identifier[toNanos] operator[SEP] identifier[timeout] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Thread] operator[SEP] identifier[interrupted] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[InterruptedException] operator[SEP] operator[SEP] operator[SEP] } identifier[Object] identifier[localValue] operator[=] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[localValue] operator[!=] Other[null] operator[&] operator[!] operator[SEP] identifier[localValue] Keyword[instanceof] identifier[AbstractFuture] operator[SEP] identifier[SetFuture] operator[SEP] operator[SEP] { Keyword[return] identifier[getDoneValue] operator[SEP] identifier[localValue] operator[SEP] operator[SEP] } Keyword[final] Keyword[long] identifier[endNanos] operator[=] identifier[remainingNanos] operator[>] Other[0] operator[?] identifier[System] operator[SEP] identifier[nanoTime] operator[SEP] operator[SEP] operator[+] identifier[remainingNanos] operator[:] Other[0] operator[SEP] identifier[long_wait_loop] operator[:] Keyword[if] operator[SEP] identifier[remainingNanos] operator[>=] identifier[SPIN_THRESHOLD_NANOS] operator[SEP] { identifier[Waiter] identifier[oldHead] operator[=] identifier[waiters] operator[SEP] Keyword[if] operator[SEP] identifier[oldHead] operator[!=] identifier[Waiter] operator[SEP] identifier[TOMBSTONE] operator[SEP] { identifier[Waiter] identifier[node] operator[=] Keyword[new] identifier[Waiter] operator[SEP] operator[SEP] operator[SEP] Keyword[do] { identifier[node] operator[SEP] identifier[setNext] operator[SEP] identifier[oldHead] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ATOMIC_HELPER] operator[SEP] identifier[casWaiters] operator[SEP] Keyword[this] , identifier[oldHead] , identifier[node] operator[SEP] operator[SEP] { Keyword[while] operator[SEP] literal[boolean] operator[SEP] { identifier[LockSupport] operator[SEP] identifier[parkNanos] operator[SEP] Keyword[this] , identifier[remainingNanos] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[Thread] operator[SEP] identifier[interrupted] operator[SEP] operator[SEP] operator[SEP] { identifier[removeWaiter] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[InterruptedException] operator[SEP] operator[SEP] operator[SEP] } identifier[localValue] operator[=] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[localValue] operator[!=] Other[null] operator[&] operator[!] operator[SEP] identifier[localValue] Keyword[instanceof] identifier[AbstractFuture] operator[SEP] identifier[SetFuture] operator[SEP] operator[SEP] { Keyword[return] identifier[getDoneValue] operator[SEP] identifier[localValue] operator[SEP] operator[SEP] } identifier[remainingNanos] operator[=] identifier[endNanos] operator[-] identifier[System] operator[SEP] identifier[nanoTime] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[remainingNanos] operator[<] identifier[SPIN_THRESHOLD_NANOS] operator[SEP] { identifier[removeWaiter] operator[SEP] identifier[node] operator[SEP] operator[SEP] Keyword[break] identifier[long_wait_loop] operator[SEP] } } } identifier[oldHead] operator[=] identifier[waiters] operator[SEP] } Keyword[while] operator[SEP] identifier[oldHead] operator[!=] identifier[Waiter] operator[SEP] identifier[TOMBSTONE] operator[SEP] operator[SEP] } Keyword[return] identifier[getDoneValue] operator[SEP] identifier[value] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] identifier[remainingNanos] operator[>] Other[0] operator[SEP] { identifier[localValue] operator[=] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[localValue] operator[!=] Other[null] operator[&] operator[!] operator[SEP] identifier[localValue] Keyword[instanceof] identifier[AbstractFuture] operator[SEP] identifier[SetFuture] operator[SEP] operator[SEP] { Keyword[return] identifier[getDoneValue] operator[SEP] identifier[localValue] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[Thread] operator[SEP] identifier[interrupted] operator[SEP] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[InterruptedException] operator[SEP] operator[SEP] operator[SEP] } identifier[remainingNanos] operator[=] identifier[endNanos] operator[-] identifier[System] operator[SEP] identifier[nanoTime] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[TimeoutException] operator[SEP] operator[SEP] operator[SEP] }
@Override public boolean shouldStyle(Object data, Object element) { for (StylingCondition sc : conditions) { if (!sc.shouldStyle(data, null)) { return false; } } return true; }
class class_name[name] begin[{] method[shouldStyle, return_type[type[boolean]], modifier[public], parameter[data, element]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=shouldStyle, postfix_operators=[], prefix_operators=['!'], qualifier=sc, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=conditions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=StylingCondition, sub_type=None))), label=None) return[literal[true]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[shouldStyle] operator[SEP] identifier[Object] identifier[data] , identifier[Object] identifier[element] operator[SEP] { Keyword[for] operator[SEP] identifier[StylingCondition] identifier[sc] operator[:] identifier[conditions] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[sc] operator[SEP] identifier[shouldStyle] operator[SEP] identifier[data] , Other[null] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public void serviceName_envVar_key_PUT(String serviceName, String key, OvhEnvVar body) throws IOException { String qPath = "/hosting/web/{serviceName}/envVar/{key}"; StringBuilder sb = path(qPath, serviceName, key); exec(qPath, "PUT", sb.toString(), body); }
class class_name[name] begin[{] method[serviceName_envVar_key_PUT, return_type[void], modifier[public], parameter[serviceName, key, body]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] call[.exec, parameter[member[.qPath], literal["PUT"], call[sb.toString, parameter[]], member[.body]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[serviceName_envVar_key_PUT] operator[SEP] identifier[String] identifier[serviceName] , identifier[String] identifier[key] , identifier[OvhEnvVar] identifier[body] operator[SEP] Keyword[throws] identifier[IOException] { identifier[String] identifier[qPath] operator[=] literal[String] operator[SEP] identifier[StringBuilder] identifier[sb] operator[=] identifier[path] operator[SEP] identifier[qPath] , identifier[serviceName] , identifier[key] operator[SEP] operator[SEP] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[body] operator[SEP] operator[SEP] }
@Override public DescribeConfigurationsResult describeConfigurations(DescribeConfigurationsRequest request) { request = beforeClientExecution(request); return executeDescribeConfigurations(request); }
class class_name[name] begin[{] method[describeConfigurations, return_type[type[DescribeConfigurationsResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDescribeConfigurations, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DescribeConfigurationsResult] identifier[describeConfigurations] operator[SEP] identifier[DescribeConfigurationsRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDescribeConfigurations] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
protected boolean routingToAction(HttpServletRequest request, HttpServletResponse response, String contextPath, String requestPath, String actionName, String paramPath, ActionExecute execByParam) throws IOException, ServletException { if (execByParam != null) { // already found processAction(request, response, execByParam, paramPath); // #to_action return true; } final OptionalThing<ActionExecute> found = LaActionExecuteUtil.findActionExecute(actionName, request); if (found.isPresent()) { // not use lambda because of throws definition final ActionExecute execute = found.get(); if (needsTrailingSlashRedirect(request, requestPath, execute)) { // index() or by request parameter redirectWithTrailingSlash(request, response, contextPath, requestPath); } else { processAction(request, response, execute, null); // #to_action } return true; } else { // e.g. not found index() return false; } }
class class_name[name] begin[{] method[routingToAction, return_type[type[boolean]], modifier[protected], parameter[request, response, contextPath, requestPath, actionName, paramPath, execByParam]] begin[{] if[binary_operation[member[.execByParam], !=, literal[null]]] begin[{] call[.processAction, parameter[member[.request], member[.response], member[.execByParam], member[.paramPath]]] return[literal[true]] else begin[{] None end[}] local_variable[type[OptionalThing], found] if[call[found.isPresent, parameter[]]] begin[{] local_variable[type[ActionExecute], execute] if[call[.needsTrailingSlashRedirect, parameter[member[.request], member[.requestPath], member[.execute]]]] begin[{] call[.redirectWithTrailingSlash, parameter[member[.request], member[.response], member[.contextPath], member[.requestPath]]] else begin[{] call[.processAction, parameter[member[.request], member[.response], member[.execute], literal[null]]] end[}] return[literal[true]] else begin[{] return[literal[false]] end[}] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[routingToAction] operator[SEP] identifier[HttpServletRequest] identifier[request] , identifier[HttpServletResponse] identifier[response] , identifier[String] identifier[contextPath] , identifier[String] identifier[requestPath] , identifier[String] identifier[actionName] , identifier[String] identifier[paramPath] , identifier[ActionExecute] identifier[execByParam] operator[SEP] Keyword[throws] identifier[IOException] , identifier[ServletException] { Keyword[if] operator[SEP] identifier[execByParam] operator[!=] Other[null] operator[SEP] { identifier[processAction] operator[SEP] identifier[request] , identifier[response] , identifier[execByParam] , identifier[paramPath] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[final] identifier[OptionalThing] operator[<] identifier[ActionExecute] operator[>] identifier[found] operator[=] identifier[LaActionExecuteUtil] operator[SEP] identifier[findActionExecute] operator[SEP] identifier[actionName] , identifier[request] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[found] operator[SEP] identifier[isPresent] operator[SEP] operator[SEP] operator[SEP] { Keyword[final] identifier[ActionExecute] identifier[execute] operator[=] identifier[found] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[needsTrailingSlashRedirect] operator[SEP] identifier[request] , identifier[requestPath] , identifier[execute] operator[SEP] operator[SEP] { identifier[redirectWithTrailingSlash] operator[SEP] identifier[request] , identifier[response] , identifier[contextPath] , identifier[requestPath] operator[SEP] operator[SEP] } Keyword[else] { identifier[processAction] operator[SEP] identifier[request] , identifier[response] , identifier[execute] , Other[null] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } }
@Override public Object get(SynthContext ctx, Object key) { return style.get(ctx, key); }
class class_name[name] begin[{] method[get, return_type[type[Object]], modifier[public], parameter[ctx, key]] begin[{] return[call[style.get, parameter[member[.ctx], member[.key]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Object] identifier[get] operator[SEP] identifier[SynthContext] identifier[ctx] , identifier[Object] identifier[key] operator[SEP] { Keyword[return] identifier[style] operator[SEP] identifier[get] operator[SEP] identifier[ctx] , identifier[key] operator[SEP] operator[SEP] }
@Nonnull private static RuleEvaluator makeRuleEvaluator(final ExpressionFactory expressionFactory, final FunctionMapper functionMapper) { // Make the expression evaluation context. final Map<String, Object> testConstants = Collections.emptyMap(); return new RuleEvaluator(expressionFactory, functionMapper, testConstants); }
class class_name[name] begin[{] method[makeRuleEvaluator, return_type[type[RuleEvaluator]], modifier[private static], parameter[expressionFactory, functionMapper]] begin[{] local_variable[type[Map], testConstants] return[ClassCreator(arguments=[MemberReference(member=expressionFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=functionMapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=testConstants, 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=RuleEvaluator, sub_type=None))] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[private] Keyword[static] identifier[RuleEvaluator] identifier[makeRuleEvaluator] operator[SEP] Keyword[final] identifier[ExpressionFactory] identifier[expressionFactory] , Keyword[final] identifier[FunctionMapper] identifier[functionMapper] operator[SEP] { Keyword[final] identifier[Map] operator[<] identifier[String] , identifier[Object] operator[>] identifier[testConstants] operator[=] identifier[Collections] operator[SEP] identifier[emptyMap] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[RuleEvaluator] operator[SEP] identifier[expressionFactory] , identifier[functionMapper] , identifier[testConstants] operator[SEP] operator[SEP] }
public HttpChallengeFactory lookup(String authScheme) { HttpChallengeFactory result; if (authScheme == null) return null; result = challengeFactoriesByAuthScheme.get(authScheme); if (result == null) { if (authScheme.startsWith(AUTH_SCHEME_APPLICATION_PREFIX)) { authScheme = authScheme.replaceFirst(AUTH_SCHEME_APPLICATION_PREFIX, ""); } result = challengeFactoriesByAuthScheme.get(authScheme); } return result; }
class class_name[name] begin[{] method[lookup, return_type[type[HttpChallengeFactory]], modifier[public], parameter[authScheme]] begin[{] local_variable[type[HttpChallengeFactory], result] if[binary_operation[member[.authScheme], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] assign[member[.result], call[challengeFactoriesByAuthScheme.get, parameter[member[.authScheme]]]] if[binary_operation[member[.result], ==, literal[null]]] begin[{] if[call[authScheme.startsWith, parameter[member[.AUTH_SCHEME_APPLICATION_PREFIX]]]] begin[{] assign[member[.authScheme], call[authScheme.replaceFirst, parameter[member[.AUTH_SCHEME_APPLICATION_PREFIX], literal[""]]]] else begin[{] None end[}] assign[member[.result], call[challengeFactoriesByAuthScheme.get, parameter[member[.authScheme]]]] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[HttpChallengeFactory] identifier[lookup] operator[SEP] identifier[String] identifier[authScheme] operator[SEP] { identifier[HttpChallengeFactory] identifier[result] operator[SEP] Keyword[if] operator[SEP] identifier[authScheme] operator[==] Other[null] operator[SEP] Keyword[return] Other[null] operator[SEP] identifier[result] operator[=] identifier[challengeFactoriesByAuthScheme] operator[SEP] identifier[get] operator[SEP] identifier[authScheme] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[authScheme] operator[SEP] identifier[startsWith] operator[SEP] identifier[AUTH_SCHEME_APPLICATION_PREFIX] operator[SEP] operator[SEP] { identifier[authScheme] operator[=] identifier[authScheme] operator[SEP] identifier[replaceFirst] operator[SEP] identifier[AUTH_SCHEME_APPLICATION_PREFIX] , literal[String] operator[SEP] operator[SEP] } identifier[result] operator[=] identifier[challengeFactoriesByAuthScheme] operator[SEP] identifier[get] operator[SEP] identifier[authScheme] operator[SEP] operator[SEP] } Keyword[return] identifier[result] operator[SEP] }
@Override public boolean clientUpsertByExampleSelectiveMethodGenerated(Method method, Interface interfaze, IntrospectedTable introspectedTable) { // column枚举 // 找出全字段对应的Model FullyQualifiedJavaType fullFieldModel = introspectedTable.getRules().calculateAllFieldsClass(); FullyQualifiedJavaType selectiveType = new FullyQualifiedJavaType(fullFieldModel.getShortName() + "." + ModelColumnPlugin.ENUM_NAME); method.addParameter(new Parameter(selectiveType, "selective", "@Param(\"selective\")", true)); return true; }
class class_name[name] begin[{] method[clientUpsertByExampleSelectiveMethodGenerated, return_type[type[boolean]], modifier[public], parameter[method, interfaze, introspectedTable]] begin[{] local_variable[type[FullyQualifiedJavaType], fullFieldModel] local_variable[type[FullyQualifiedJavaType], selectiveType] call[method.addParameter, parameter[ClassCreator(arguments=[MemberReference(member=selectiveType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="selective"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="@Param(\"selective\")"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Parameter, sub_type=None))]] return[literal[true]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[clientUpsertByExampleSelectiveMethodGenerated] operator[SEP] identifier[Method] identifier[method] , identifier[Interface] identifier[interfaze] , identifier[IntrospectedTable] identifier[introspectedTable] operator[SEP] { identifier[FullyQualifiedJavaType] identifier[fullFieldModel] operator[=] identifier[introspectedTable] operator[SEP] identifier[getRules] operator[SEP] operator[SEP] operator[SEP] identifier[calculateAllFieldsClass] operator[SEP] operator[SEP] operator[SEP] identifier[FullyQualifiedJavaType] identifier[selectiveType] operator[=] Keyword[new] identifier[FullyQualifiedJavaType] operator[SEP] identifier[fullFieldModel] operator[SEP] identifier[getShortName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[ModelColumnPlugin] operator[SEP] identifier[ENUM_NAME] operator[SEP] operator[SEP] identifier[method] operator[SEP] identifier[addParameter] operator[SEP] Keyword[new] identifier[Parameter] operator[SEP] identifier[selectiveType] , literal[String] , literal[String] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
private static String getResultSetValue(ResultSet rs, int index) throws SQLException { Object obj = rs.getObject(index); return (obj == null) ? null : convertUtilsBean.convert(obj); }
class class_name[name] begin[{] method[getResultSetValue, return_type[type[String]], modifier[private static], parameter[rs, index]] begin[{] local_variable[type[Object], obj] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[MemberReference(member=obj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=convert, postfix_operators=[], prefix_operators=[], qualifier=convertUtilsBean, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[getResultSetValue] operator[SEP] identifier[ResultSet] identifier[rs] , Keyword[int] identifier[index] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[Object] identifier[obj] operator[=] identifier[rs] operator[SEP] identifier[getObject] operator[SEP] identifier[index] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[obj] operator[==] Other[null] operator[SEP] operator[?] Other[null] operator[:] identifier[convertUtilsBean] operator[SEP] identifier[convert] operator[SEP] identifier[obj] operator[SEP] operator[SEP] }
public static List<File> listFileWithRegexFileName(final File rootDir, final String regexFileNamePattern) { return Files.fileTreeTraverser().preOrderTraversal(rootDir) .filter(new RegexFileNameFilter(regexFileNamePattern)).toList(); }
class class_name[name] begin[{] method[listFileWithRegexFileName, return_type[type[List]], modifier[public static], parameter[rootDir, regexFileNamePattern]] begin[{] return[call[Files.fileTreeTraverser, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[File] operator[>] identifier[listFileWithRegexFileName] operator[SEP] Keyword[final] identifier[File] identifier[rootDir] , Keyword[final] identifier[String] identifier[regexFileNamePattern] operator[SEP] { Keyword[return] identifier[Files] operator[SEP] identifier[fileTreeTraverser] operator[SEP] operator[SEP] operator[SEP] identifier[preOrderTraversal] operator[SEP] identifier[rootDir] operator[SEP] operator[SEP] identifier[filter] operator[SEP] Keyword[new] identifier[RegexFileNameFilter] operator[SEP] identifier[regexFileNamePattern] operator[SEP] operator[SEP] operator[SEP] identifier[toList] operator[SEP] operator[SEP] operator[SEP] }
private File getFile(String pid, String dsId, String dsVersionId) { File dir = new File(baseDir, getPath(pid)); String filename = encode(pid, dsId, dsVersionId); return new File(dir, filename); }
class class_name[name] begin[{] method[getFile, return_type[type[File]], modifier[private], parameter[pid, dsId, dsVersionId]] begin[{] local_variable[type[File], dir] local_variable[type[String], filename] return[ClassCreator(arguments=[MemberReference(member=dir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=filename, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=File, sub_type=None))] end[}] END[}]
Keyword[private] identifier[File] identifier[getFile] operator[SEP] identifier[String] identifier[pid] , identifier[String] identifier[dsId] , identifier[String] identifier[dsVersionId] operator[SEP] { identifier[File] identifier[dir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[baseDir] , identifier[getPath] operator[SEP] identifier[pid] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[filename] operator[=] identifier[encode] operator[SEP] identifier[pid] , identifier[dsId] , identifier[dsVersionId] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[File] operator[SEP] identifier[dir] , identifier[filename] operator[SEP] operator[SEP] }
public Legislators searchByState( String state ) throws OpenStatesException { return api.query( new MethodMap("legislators"), new ArgMap( "state", state ), Legislators.class ); }
class class_name[name] begin[{] method[searchByState, return_type[type[Legislators]], modifier[public], parameter[state]] begin[{] return[call[api.query, parameter[ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="legislators")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MethodMap, sub_type=None)), ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="state"), MemberReference(member=state, 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=ArgMap, sub_type=None)), ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Legislators, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[Legislators] identifier[searchByState] operator[SEP] identifier[String] identifier[state] operator[SEP] Keyword[throws] identifier[OpenStatesException] { Keyword[return] identifier[api] operator[SEP] identifier[query] operator[SEP] Keyword[new] identifier[MethodMap] operator[SEP] literal[String] operator[SEP] , Keyword[new] identifier[ArgMap] operator[SEP] literal[String] , identifier[state] operator[SEP] , identifier[Legislators] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public static <F, T> Iterable<T> map(final Iterable<F> from, final Mapper<? super F, T> mapper) { return new Iterable<T>() { @Override public Iterator<T> iterator() { return new MappingIterator<F, T>(from.iterator(), mapper); } }; }
class class_name[name] begin[{] method[map, return_type[type[Iterable]], modifier[public static], parameter[from, mapper]] begin[{] return[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[ReturnStatement(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=iterator, postfix_operators=[], prefix_operators=[], qualifier=from, selectors=[], type_arguments=None), MemberReference(member=mapper, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=F, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=MappingIterator, sub_type=None)), label=None)], documentation=None, modifiers={'public'}, name=iterator, parameters=[], return_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=Iterator, sub_type=None), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=None, name=Iterable, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[F] , identifier[T] operator[>] identifier[Iterable] operator[<] identifier[T] operator[>] identifier[map] operator[SEP] Keyword[final] identifier[Iterable] operator[<] identifier[F] operator[>] identifier[from] , Keyword[final] identifier[Mapper] operator[<] operator[?] Keyword[super] identifier[F] , identifier[T] operator[>] identifier[mapper] operator[SEP] { Keyword[return] Keyword[new] identifier[Iterable] operator[<] identifier[T] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Iterator] operator[<] identifier[T] operator[>] identifier[iterator] operator[SEP] operator[SEP] { Keyword[return] Keyword[new] identifier[MappingIterator] operator[<] identifier[F] , identifier[T] operator[>] operator[SEP] identifier[from] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] , identifier[mapper] operator[SEP] operator[SEP] } } operator[SEP] }
public void setAsynchConsumerCallback(int requestNumber, int maxActiveMessages, long messageLockExpiry, int batchsize, OrderingContext orderContext, boolean stoppable, //SIB0115d.comms int maxSequentialFailures, long hiddenMessageDelay) //SIB0115d.comms { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "setAsynchConsumerCallback", new Object[] { requestNumber, maxActiveMessages, messageLockExpiry, batchsize, orderContext, stoppable, //SIB0115d.comms maxSequentialFailures, //SIB0115d.comms hiddenMessageDelay }); try { // Note: per the design document, a readahead consumer callback should always be created // with a batch size of 1 - this case should never happen. if (batchsize > 1) { if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) { SibTr.debug(this, tc, "*** The batch size submitted to CATProxyConsumer was great than 1"); } } getConsumerSession().registerAsynchConsumerCallback(callback, maxActiveMessages, messageLockExpiry, batchsize, null); } catch (Exception e) { // No FFDC code needed // Any exceptions we get, throw back to the caller (us) so that // we are aware that something went wrong RuntimeException r = new RuntimeException(e.getMessage(), e); throw r; } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "setAsynchConsumerCallback"); }
class class_name[name] begin[{] method[setAsynchConsumerCallback, return_type[void], modifier[public], parameter[requestNumber, maxActiveMessages, messageLockExpiry, batchsize, orderContext, stoppable, maxSequentialFailures, hiddenMessageDelay]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["setAsynchConsumerCallback"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxActiveMessages, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=messageLockExpiry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=batchsize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=orderContext, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=stoppable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxSequentialFailures, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=hiddenMessageDelay, 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[}] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=batchsize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isDebugEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=tc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="*** The batch size submitted to CATProxyConsumer was great than 1")], member=debug, postfix_operators=[], prefix_operators=[], qualifier=SibTr, selectors=[], type_arguments=None), label=None)]))])), StatementExpression(expression=MethodInvocation(arguments=[], member=getConsumerSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=callback, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxActiveMessages, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=messageLockExpiry, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=batchsize, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], member=registerAsynchConsumerCallback, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RuntimeException, sub_type=None)), name=r)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=RuntimeException, sub_type=None)), ThrowStatement(expression=MemberReference(member=r, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["setAsynchConsumerCallback"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setAsynchConsumerCallback] operator[SEP] Keyword[int] identifier[requestNumber] , Keyword[int] identifier[maxActiveMessages] , Keyword[long] identifier[messageLockExpiry] , Keyword[int] identifier[batchsize] , identifier[OrderingContext] identifier[orderContext] , Keyword[boolean] identifier[stoppable] , Keyword[int] identifier[maxSequentialFailures] , Keyword[long] identifier[hiddenMessageDelay] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[requestNumber] , identifier[maxActiveMessages] , identifier[messageLockExpiry] , identifier[batchsize] , identifier[orderContext] , identifier[stoppable] , identifier[maxSequentialFailures] , identifier[hiddenMessageDelay] } operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[batchsize] operator[>] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isDebugEnabled] operator[SEP] operator[SEP] operator[SEP] { identifier[SibTr] operator[SEP] identifier[debug] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] } } identifier[getConsumerSession] operator[SEP] operator[SEP] operator[SEP] identifier[registerAsynchConsumerCallback] operator[SEP] identifier[callback] , identifier[maxActiveMessages] , identifier[messageLockExpiry] , identifier[batchsize] , Other[null] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[RuntimeException] identifier[r] operator[=] Keyword[new] identifier[RuntimeException] operator[SEP] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[r] operator[SEP] } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
private void setupVersionSettingsLabel() { int numberHistoryVersions = OpenCms.getSystemInfo().getHistoryVersions(); //Convert int number to readable Text String numberString = String.valueOf(numberHistoryVersions); if (numberHistoryVersions == CmsFileHistoryApp.NUMBER_VERSIONS_DISABLED) { numberString = CmsVaadinUtils.getMessageText(Messages.GUI_FILEHISTORY_SETTINGS_VERSIONS_DISABLED_0); } if (numberHistoryVersions == CmsFileHistoryApp.NUMBER_VERSIONS_UNLIMITED) { numberString = CmsVaadinUtils.getMessageText(Messages.GUI_FILEHISTORY_SETTINGS_VERSIONS_UNLIMITED_0); } m_settedVersions.setContentMode(ContentMode.HTML); m_settedVersions.setValue( CmsVaadinUtils.getMessageText(Messages.GUI_FILEHISTORY_DELETE_VERSIONINFO_1, numberString)); }
class class_name[name] begin[{] method[setupVersionSettingsLabel, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[int], numberHistoryVersions] local_variable[type[String], numberString] if[binary_operation[member[.numberHistoryVersions], ==, member[CmsFileHistoryApp.NUMBER_VERSIONS_DISABLED]]] begin[{] assign[member[.numberString], call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_FILEHISTORY_SETTINGS_VERSIONS_DISABLED_0]]]] else begin[{] None end[}] if[binary_operation[member[.numberHistoryVersions], ==, member[CmsFileHistoryApp.NUMBER_VERSIONS_UNLIMITED]]] begin[{] assign[member[.numberString], call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_FILEHISTORY_SETTINGS_VERSIONS_UNLIMITED_0]]]] else begin[{] None end[}] call[m_settedVersions.setContentMode, parameter[member[ContentMode.HTML]]] call[m_settedVersions.setValue, parameter[call[CmsVaadinUtils.getMessageText, parameter[member[Messages.GUI_FILEHISTORY_DELETE_VERSIONINFO_1], member[.numberString]]]]] end[}] END[}]
Keyword[private] Keyword[void] identifier[setupVersionSettingsLabel] operator[SEP] operator[SEP] { Keyword[int] identifier[numberHistoryVersions] operator[=] identifier[OpenCms] operator[SEP] identifier[getSystemInfo] operator[SEP] operator[SEP] operator[SEP] identifier[getHistoryVersions] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[numberString] operator[=] identifier[String] operator[SEP] identifier[valueOf] operator[SEP] identifier[numberHistoryVersions] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[numberHistoryVersions] operator[==] identifier[CmsFileHistoryApp] operator[SEP] identifier[NUMBER_VERSIONS_DISABLED] operator[SEP] { identifier[numberString] operator[=] identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_FILEHISTORY_SETTINGS_VERSIONS_DISABLED_0] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[numberHistoryVersions] operator[==] identifier[CmsFileHistoryApp] operator[SEP] identifier[NUMBER_VERSIONS_UNLIMITED] operator[SEP] { identifier[numberString] operator[=] identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_FILEHISTORY_SETTINGS_VERSIONS_UNLIMITED_0] operator[SEP] operator[SEP] } identifier[m_settedVersions] operator[SEP] identifier[setContentMode] operator[SEP] identifier[ContentMode] operator[SEP] identifier[HTML] operator[SEP] operator[SEP] identifier[m_settedVersions] operator[SEP] identifier[setValue] operator[SEP] identifier[CmsVaadinUtils] operator[SEP] identifier[getMessageText] operator[SEP] identifier[Messages] operator[SEP] identifier[GUI_FILEHISTORY_DELETE_VERSIONINFO_1] , identifier[numberString] operator[SEP] operator[SEP] operator[SEP] }
public static synchronized void suppressConstructor(Constructor<?>... constructors) { if (constructors == null) { throw new IllegalArgumentException("constructors cannot be null."); } for (Constructor<?> constructor : constructors) { MockRepository.addConstructorToSuppress(constructor); // Also suppress all parent constructors Class<?> declaringClass = constructor.getDeclaringClass(); if (declaringClass != null) { suppressConstructor((Class<?>) declaringClass.getSuperclass()); } } }
class class_name[name] begin[{] method[suppressConstructor, return_type[void], modifier[synchronized public static], parameter[constructors]] begin[{] if[binary_operation[member[.constructors], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="constructors 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[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=constructor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addConstructorToSuppress, postfix_operators=[], prefix_operators=[], qualifier=MockRepository, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getDeclaringClass, postfix_operators=[], prefix_operators=[], qualifier=constructor, selectors=[], type_arguments=None), name=declaringClass)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=declaringClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Cast(expression=MethodInvocation(arguments=[], member=getSuperclass, postfix_operators=[], prefix_operators=[], qualifier=declaringClass, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))], member=suppressConstructor, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=constructors, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=constructor)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Constructor, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[static] Keyword[synchronized] Keyword[void] identifier[suppressConstructor] operator[SEP] identifier[Constructor] operator[<] operator[?] operator[>] operator[...] identifier[constructors] operator[SEP] { Keyword[if] operator[SEP] identifier[constructors] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[Constructor] operator[<] operator[?] operator[>] identifier[constructor] operator[:] identifier[constructors] operator[SEP] { identifier[MockRepository] operator[SEP] identifier[addConstructorToSuppress] operator[SEP] identifier[constructor] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[declaringClass] operator[=] identifier[constructor] operator[SEP] identifier[getDeclaringClass] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[declaringClass] operator[!=] Other[null] operator[SEP] { identifier[suppressConstructor] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] identifier[declaringClass] operator[SEP] identifier[getSuperclass] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public Observable<OperationStatus> deleteAsync(UUID appId, String versionId, int exampleId) { return deleteWithServiceResponseAsync(appId, versionId, exampleId).map(new Func1<ServiceResponse<OperationStatus>, OperationStatus>() { @Override public OperationStatus call(ServiceResponse<OperationStatus> response) { return response.body(); } }); }
class class_name[name] begin[{] method[deleteAsync, return_type[type[Observable]], modifier[public], parameter[appId, versionId, exampleId]] begin[{] return[call[.deleteWithServiceResponseAsync, parameter[member[.appId], member[.versionId], member[.exampleId]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[OperationStatus] operator[>] identifier[deleteAsync] operator[SEP] identifier[UUID] identifier[appId] , identifier[String] identifier[versionId] , Keyword[int] identifier[exampleId] operator[SEP] { Keyword[return] identifier[deleteWithServiceResponseAsync] operator[SEP] identifier[appId] , identifier[versionId] , identifier[exampleId] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[OperationStatus] operator[>] , identifier[OperationStatus] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[OperationStatus] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[OperationStatus] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public static <T extends MapElement> void readGISElementContainer(Element xmlNode, GISElementContainer<T> primitive, PathBuilder pathBuilder, XMLResources resources) throws IOException { readGISElementContainer(xmlNode, primitive, null, pathBuilder, resources); }
class class_name[name] begin[{] method[readGISElementContainer, return_type[void], modifier[public static], parameter[xmlNode, primitive, pathBuilder, resources]] begin[{] call[.readGISElementContainer, parameter[member[.xmlNode], member[.primitive], literal[null], member[.pathBuilder], member[.resources]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[MapElement] operator[>] Keyword[void] identifier[readGISElementContainer] operator[SEP] identifier[Element] identifier[xmlNode] , identifier[GISElementContainer] operator[<] identifier[T] operator[>] identifier[primitive] , identifier[PathBuilder] identifier[pathBuilder] , identifier[XMLResources] identifier[resources] operator[SEP] Keyword[throws] identifier[IOException] { identifier[readGISElementContainer] operator[SEP] identifier[xmlNode] , identifier[primitive] , Other[null] , identifier[pathBuilder] , identifier[resources] operator[SEP] operator[SEP] }
public boolean isForeignBus() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "isForeignBus"); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "isForeignBus",Boolean.TRUE); return true; }
class class_name[name] begin[{] method[isForeignBus, return_type[type[boolean]], modifier[public], parameter[]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["isForeignBus"]]] else begin[{] None end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["isForeignBus"], member[Boolean.TRUE]]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isForeignBus] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[Boolean] operator[SEP] identifier[TRUE] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] }
private Entry<K, V> findEntry(final K key, Entry<K, V> def) { final int keyHash = key.hashCode(); findResult = def; probe(keyHash, new BucketVisitor() { @Override public boolean visitAndGetContinuity(int pos) { if (bucket[pos] != null) { if (isKeyInBucket(pos, key, keyHash)) { findResult = bucket[pos]; return false; } else { return true; } } else { return false; } } }); return findResult; }
class class_name[name] begin[{] method[findEntry, return_type[type[Entry]], modifier[private], parameter[key, def]] begin[{] local_variable[type[int], keyHash] assign[member[.findResult], member[.def]] call[.probe, parameter[member[.keyHash], ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=bucket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=keyHash, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isKeyInBucket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=findResult, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=bucket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=pos, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), ReturnStatement(expression=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), label=None)]))]))], documentation=None, modifiers={'public'}, name=visitAndGetContinuity, parameters=[FormalParameter(annotations=[], modifiers=set(), name=pos, type=BasicType(dimensions=[], name=int), varargs=False)], return_type=BasicType(dimensions=[], name=boolean), throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=BucketVisitor, sub_type=None))]] return[member[.findResult]] end[}] END[}]
Keyword[private] identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] identifier[findEntry] operator[SEP] Keyword[final] identifier[K] identifier[key] , identifier[Entry] operator[<] identifier[K] , identifier[V] operator[>] identifier[def] operator[SEP] { Keyword[final] Keyword[int] identifier[keyHash] operator[=] identifier[key] operator[SEP] identifier[hashCode] operator[SEP] operator[SEP] operator[SEP] identifier[findResult] operator[=] identifier[def] operator[SEP] identifier[probe] operator[SEP] identifier[keyHash] , Keyword[new] identifier[BucketVisitor] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[visitAndGetContinuity] operator[SEP] Keyword[int] identifier[pos] operator[SEP] { Keyword[if] operator[SEP] identifier[bucket] operator[SEP] identifier[pos] operator[SEP] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[isKeyInBucket] operator[SEP] identifier[pos] , identifier[key] , identifier[keyHash] operator[SEP] operator[SEP] { identifier[findResult] operator[=] identifier[bucket] operator[SEP] identifier[pos] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } } Keyword[else] { Keyword[return] literal[boolean] operator[SEP] } } } operator[SEP] operator[SEP] Keyword[return] identifier[findResult] operator[SEP] }
public StartExportTaskRequest withExportDataFormat(String... exportDataFormat) { if (this.exportDataFormat == null) { setExportDataFormat(new java.util.ArrayList<String>(exportDataFormat.length)); } for (String ele : exportDataFormat) { this.exportDataFormat.add(ele); } return this; }
class class_name[name] begin[{] method[withExportDataFormat, return_type[type[StartExportTaskRequest]], modifier[public], parameter[exportDataFormat]] begin[{] if[binary_operation[THIS[member[None.exportDataFormat]], ==, literal[null]]] begin[{] call[.setExportDataFormat, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=exportDataFormat, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=exportDataFormat, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=exportDataFormat, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[StartExportTaskRequest] identifier[withExportDataFormat] operator[SEP] identifier[String] operator[...] identifier[exportDataFormat] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[exportDataFormat] operator[==] Other[null] operator[SEP] { identifier[setExportDataFormat] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[String] operator[>] operator[SEP] identifier[exportDataFormat] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[String] identifier[ele] operator[:] identifier[exportDataFormat] operator[SEP] { Keyword[this] operator[SEP] identifier[exportDataFormat] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
public int column(int pos) { int currPrePos = 0; while ((pos + currPrePos) > 0 && !sequence.peek(pos, currPrePos).startsWith("\n")) { currPrePos--; } return (currPrePos * -1); }
class class_name[name] begin[{] method[column, return_type[type[int]], modifier[public], parameter[pos]] begin[{] local_variable[type[int], currPrePos] while[binary_operation[binary_operation[binary_operation[member[.pos], +, member[.currPrePos]], >, literal[0]], &&, call[sequence.peek, parameter[member[.pos], member[.currPrePos]]]]] begin[{] member[.currPrePos] end[}] return[binary_operation[member[.currPrePos], *, literal[1]]] end[}] END[}]
Keyword[public] Keyword[int] identifier[column] operator[SEP] Keyword[int] identifier[pos] operator[SEP] { Keyword[int] identifier[currPrePos] operator[=] Other[0] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[pos] operator[+] identifier[currPrePos] operator[SEP] operator[>] Other[0] operator[&&] operator[!] identifier[sequence] operator[SEP] identifier[peek] operator[SEP] identifier[pos] , identifier[currPrePos] operator[SEP] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[currPrePos] operator[--] operator[SEP] } Keyword[return] operator[SEP] identifier[currPrePos] operator[*] operator[-] Other[1] operator[SEP] operator[SEP] }
protected void workspaceAdded( String workspaceName ) { String workspaceKey = NodeKey.keyForWorkspaceName(workspaceName); if (systemWorkspaceKey.equals(workspaceKey)) { // No sequencers for the system workspace! return; } Collection<SequencingConfiguration> configs = new LinkedList<SequencingConfiguration>(); // Go through the sequencers to see which apply to this workspace ... for (Sequencer sequencer : sequencersById.values()) { boolean updated = false; for (SequencerPathExpression expression : pathExpressionsBySequencerId.get(sequencer.getUniqueId())) { if (expression.appliesToWorkspace(workspaceName)) { updated = true; configs.add(new SequencingConfiguration(expression, sequencer)); } } if (DEBUG && updated) { LOGGER.debug("Updated sequencer '{0}' (id={1}) configuration due to new workspace '{2}' in repository '{3}'", sequencer.getName(), sequencer.getUniqueId(), workspaceName, repository.name()); } } if (configs.isEmpty()) return; // Otherwise, update the configs by workspace key ... try { configChangeLock.lock(); // Make a copy of the existing map ... Map<String, Collection<SequencingConfiguration>> configByWorkspaceName = new HashMap<String, Collection<SequencingConfiguration>>( this.configByWorkspaceName); // Insert the new information ... configByWorkspaceName.put(workspaceName, configs); // Replace the exisiting map (which is used without a lock) ... this.configByWorkspaceName = configByWorkspaceName; } finally { configChangeLock.unlock(); } }
class class_name[name] begin[{] method[workspaceAdded, return_type[void], modifier[protected], parameter[workspaceName]] begin[{] local_variable[type[String], workspaceKey] if[call[systemWorkspaceKey.equals, parameter[member[.workspaceKey]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Collection], configs] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), name=updated)], modifiers=set(), type=BasicType(dimensions=[], name=boolean)), ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=workspaceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=appliesToWorkspace, postfix_operators=[], prefix_operators=[], qualifier=expression, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=updated, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)), label=None), StatementExpression(expression=MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=expression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sequencer, 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=SequencingConfiguration, sub_type=None))], member=add, postfix_operators=[], prefix_operators=[], qualifier=configs, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getUniqueId, postfix_operators=[], prefix_operators=[], qualifier=sequencer, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=pathExpressionsBySequencerId, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=expression)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SequencerPathExpression, sub_type=None))), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=DEBUG, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=updated, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=&&), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Updated sequencer '{0}' (id={1}) configuration due to new workspace '{2}' in repository '{3}'"), MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=sequencer, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getUniqueId, postfix_operators=[], prefix_operators=[], qualifier=sequencer, selectors=[], type_arguments=None), MemberReference(member=workspaceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=name, postfix_operators=[], prefix_operators=[], qualifier=repository, selectors=[], type_arguments=None)], member=debug, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=sequencersById, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=sequencer)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Sequencer, sub_type=None))), label=None) if[call[configs.isEmpty, parameter[]]] begin[{] return[None] else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=lock, postfix_operators=[], prefix_operators=[], qualifier=configChangeLock, selectors=[], type_arguments=None), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=configByWorkspaceName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SequencingConfiguration, sub_type=None))], dimensions=[], name=Collection, sub_type=None))], dimensions=None, name=HashMap, sub_type=None)), name=configByWorkspaceName)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=SequencingConfiguration, sub_type=None))], dimensions=[], name=Collection, sub_type=None))], dimensions=[], name=Map, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=workspaceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=configs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=configByWorkspaceName, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=configByWorkspaceName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MemberReference(member=configByWorkspaceName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)], catches=None, finally_block=[StatementExpression(expression=MethodInvocation(arguments=[], member=unlock, postfix_operators=[], prefix_operators=[], qualifier=configChangeLock, selectors=[], type_arguments=None), label=None)], label=None, resources=None) end[}] END[}]
Keyword[protected] Keyword[void] identifier[workspaceAdded] operator[SEP] identifier[String] identifier[workspaceName] operator[SEP] { identifier[String] identifier[workspaceKey] operator[=] identifier[NodeKey] operator[SEP] identifier[keyForWorkspaceName] operator[SEP] identifier[workspaceName] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[systemWorkspaceKey] operator[SEP] identifier[equals] operator[SEP] identifier[workspaceKey] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[Collection] operator[<] identifier[SequencingConfiguration] operator[>] identifier[configs] operator[=] Keyword[new] identifier[LinkedList] operator[<] identifier[SequencingConfiguration] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Sequencer] identifier[sequencer] operator[:] identifier[sequencersById] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { Keyword[boolean] identifier[updated] operator[=] literal[boolean] operator[SEP] Keyword[for] operator[SEP] identifier[SequencerPathExpression] identifier[expression] operator[:] identifier[pathExpressionsBySequencerId] operator[SEP] identifier[get] operator[SEP] identifier[sequencer] operator[SEP] identifier[getUniqueId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[expression] operator[SEP] identifier[appliesToWorkspace] operator[SEP] identifier[workspaceName] operator[SEP] operator[SEP] { identifier[updated] operator[=] literal[boolean] operator[SEP] identifier[configs] operator[SEP] identifier[add] operator[SEP] Keyword[new] identifier[SequencingConfiguration] operator[SEP] identifier[expression] , identifier[sequencer] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[DEBUG] operator[&&] identifier[updated] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[sequencer] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[sequencer] operator[SEP] identifier[getUniqueId] operator[SEP] operator[SEP] , identifier[workspaceName] , identifier[repository] operator[SEP] identifier[name] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[configs] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[SEP] Keyword[try] { identifier[configChangeLock] operator[SEP] identifier[lock] operator[SEP] operator[SEP] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Collection] operator[<] identifier[SequencingConfiguration] operator[>] operator[>] identifier[configByWorkspaceName] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[Collection] operator[<] identifier[SequencingConfiguration] operator[>] operator[>] operator[SEP] Keyword[this] operator[SEP] identifier[configByWorkspaceName] operator[SEP] operator[SEP] identifier[configByWorkspaceName] operator[SEP] identifier[put] operator[SEP] identifier[workspaceName] , identifier[configs] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[configByWorkspaceName] operator[=] identifier[configByWorkspaceName] operator[SEP] } Keyword[finally] { identifier[configChangeLock] operator[SEP] identifier[unlock] operator[SEP] operator[SEP] operator[SEP] } }
public static <Message extends PMessage<Message, Field>, Field extends PField> Message readMessage(BigEndianBinaryReader input, PMessageDescriptor<Message, Field> descriptor, boolean strict) throws IOException { PMessageBuilder<Message, Field> builder = descriptor.builder(); if (builder instanceof BinaryReader) { ((BinaryReader) builder).readBinary(input, strict); } else { FieldInfo fieldInfo = readFieldInfo(input); while (fieldInfo != null) { PField field = descriptor.findFieldById(fieldInfo.getId()); if (field != null) { Object value = readFieldValue(input, fieldInfo, field.getDescriptor(), strict); builder.set(field.getId(), value); } else { readFieldValue(input, fieldInfo, null, false); } fieldInfo = readFieldInfo(input); } if (strict) { try { builder.validate(); } catch (IllegalStateException e) { throw new SerializerException(e, e.getMessage()); } } } return builder.build(); }
class class_name[name] begin[{] method[readMessage, return_type[type[Message]], modifier[public static], parameter[input, descriptor, strict]] begin[{] local_variable[type[PMessageBuilder], builder] if[binary_operation[member[.builder], instanceof, type[BinaryReader]]] begin[{] Cast(expression=MemberReference(member=builder, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BinaryReader, sub_type=None)) else begin[{] local_variable[type[FieldInfo], fieldInfo] while[binary_operation[member[.fieldInfo], !=, literal[null]]] begin[{] local_variable[type[PField], field] if[binary_operation[member[.field], !=, literal[null]]] begin[{] local_variable[type[Object], value] call[builder.set, parameter[call[field.getId, parameter[]], member[.value]]] else begin[{] call[.readFieldValue, parameter[member[.input], member[.fieldInfo], literal[null], literal[false]]] end[}] assign[member[.fieldInfo], call[.readFieldInfo, parameter[member[.input]]]] end[}] if[member[.strict]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=validate, postfix_operators=[], prefix_operators=[], qualifier=builder, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SerializerException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalStateException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] end[}] return[call[builder.build, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[Message] Keyword[extends] identifier[PMessage] operator[<] identifier[Message] , identifier[Field] operator[>] , identifier[Field] Keyword[extends] identifier[PField] operator[>] identifier[Message] identifier[readMessage] operator[SEP] identifier[BigEndianBinaryReader] identifier[input] , identifier[PMessageDescriptor] operator[<] identifier[Message] , identifier[Field] operator[>] identifier[descriptor] , Keyword[boolean] identifier[strict] operator[SEP] Keyword[throws] identifier[IOException] { identifier[PMessageBuilder] operator[<] identifier[Message] , identifier[Field] operator[>] identifier[builder] operator[=] identifier[descriptor] operator[SEP] identifier[builder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[builder] Keyword[instanceof] identifier[BinaryReader] operator[SEP] { operator[SEP] operator[SEP] identifier[BinaryReader] operator[SEP] identifier[builder] operator[SEP] operator[SEP] identifier[readBinary] operator[SEP] identifier[input] , identifier[strict] operator[SEP] operator[SEP] } Keyword[else] { identifier[FieldInfo] identifier[fieldInfo] operator[=] identifier[readFieldInfo] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[fieldInfo] operator[!=] Other[null] operator[SEP] { identifier[PField] identifier[field] operator[=] identifier[descriptor] operator[SEP] identifier[findFieldById] operator[SEP] identifier[fieldInfo] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[field] operator[!=] Other[null] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[readFieldValue] operator[SEP] identifier[input] , identifier[fieldInfo] , identifier[field] operator[SEP] identifier[getDescriptor] operator[SEP] operator[SEP] , identifier[strict] operator[SEP] operator[SEP] identifier[builder] operator[SEP] identifier[set] operator[SEP] identifier[field] operator[SEP] identifier[getId] operator[SEP] operator[SEP] , identifier[value] operator[SEP] operator[SEP] } Keyword[else] { identifier[readFieldValue] operator[SEP] identifier[input] , identifier[fieldInfo] , Other[null] , literal[boolean] operator[SEP] operator[SEP] } identifier[fieldInfo] operator[=] identifier[readFieldInfo] operator[SEP] identifier[input] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[strict] operator[SEP] { Keyword[try] { identifier[builder] operator[SEP] identifier[validate] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalStateException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SerializerException] operator[SEP] identifier[e] , identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } } Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
@Indexable(type = IndexableType.DELETE) @Override public CPDefinitionOptionRel deleteCPDefinitionOptionRel( long CPDefinitionOptionRelId) throws PortalException { return cpDefinitionOptionRelPersistence.remove(CPDefinitionOptionRelId); }
class class_name[name] begin[{] method[deleteCPDefinitionOptionRel, return_type[type[CPDefinitionOptionRel]], modifier[public], parameter[CPDefinitionOptionRelId]] begin[{] return[call[cpDefinitionOptionRelPersistence.remove, parameter[member[.CPDefinitionOptionRelId]]]] end[}] END[}]
annotation[@] identifier[Indexable] operator[SEP] identifier[type] operator[=] identifier[IndexableType] operator[SEP] identifier[DELETE] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[CPDefinitionOptionRel] identifier[deleteCPDefinitionOptionRel] operator[SEP] Keyword[long] identifier[CPDefinitionOptionRelId] operator[SEP] Keyword[throws] identifier[PortalException] { Keyword[return] identifier[cpDefinitionOptionRelPersistence] operator[SEP] identifier[remove] operator[SEP] identifier[CPDefinitionOptionRelId] operator[SEP] operator[SEP] }
public static String genLimitSQL(Integer offset, Integer limit) { StringBuilder sb = new StringBuilder(); if (limit != null) { sb.append(" limit "); if(offset != null) { sb.append(offset).append(","); } sb.append(limit); } return sb.toString(); }
class class_name[name] begin[{] method[genLimitSQL, return_type[type[String]], modifier[public static], parameter[offset, limit]] begin[{] local_variable[type[StringBuilder], sb] if[binary_operation[member[.limit], !=, literal[null]]] begin[{] call[sb.append, parameter[literal[" limit "]]] if[binary_operation[member[.offset], !=, literal[null]]] begin[{] call[sb.append, parameter[member[.offset]]] else begin[{] None end[}] call[sb.append, parameter[member[.limit]]] else begin[{] None end[}] return[call[sb.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[genLimitSQL] operator[SEP] identifier[Integer] identifier[offset] , identifier[Integer] identifier[limit] operator[SEP] { identifier[StringBuilder] identifier[sb] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[limit] operator[!=] Other[null] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[offset] operator[!=] Other[null] operator[SEP] { identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[offset] operator[SEP] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[sb] operator[SEP] identifier[append] operator[SEP] identifier[limit] operator[SEP] operator[SEP] } Keyword[return] identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void composeRightLeft(IntBitRelation left, IntBitRelation right) { int i, ele; IntBitSet li; for (i = 0; i < left.line.length; i++) { li = left.line[i]; if (li != null) { for (ele = li.first(); ele != -1; ele = li.next(ele)) { if (right.line[ele] != null) { add(i, right.line[ele]); } } } } }
class class_name[name] begin[{] method[composeRightLeft, return_type[void], modifier[public], parameter[left, right]] begin[{] local_variable[type[int], i] local_variable[type[IntBitSet], li] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=li, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=left, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])), label=None), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=li, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=right, selectors=[ArraySelector(index=MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=line, postfix_operators=[], prefix_operators=[], qualifier=right, selectors=[ArraySelector(index=MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=add, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1), operator=!=), init=[Assignment(expressionl=MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=first, postfix_operators=[], prefix_operators=[], qualifier=li, selectors=[], type_arguments=None))], update=[Assignment(expressionl=MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=next, postfix_operators=[], prefix_operators=[], qualifier=li, 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=left.line, selectors=[]), operator=<), init=[Assignment(expressionl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0))], update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[composeRightLeft] operator[SEP] identifier[IntBitRelation] identifier[left] , identifier[IntBitRelation] identifier[right] operator[SEP] { Keyword[int] identifier[i] , identifier[ele] operator[SEP] identifier[IntBitSet] identifier[li] operator[SEP] Keyword[for] operator[SEP] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[left] operator[SEP] identifier[line] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[li] operator[=] identifier[left] operator[SEP] identifier[line] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[li] operator[!=] Other[null] operator[SEP] { Keyword[for] operator[SEP] identifier[ele] operator[=] identifier[li] operator[SEP] identifier[first] operator[SEP] operator[SEP] operator[SEP] identifier[ele] operator[!=] operator[-] Other[1] operator[SEP] identifier[ele] operator[=] identifier[li] operator[SEP] identifier[next] operator[SEP] identifier[ele] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[right] operator[SEP] identifier[line] operator[SEP] identifier[ele] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[add] operator[SEP] identifier[i] , identifier[right] operator[SEP] identifier[line] operator[SEP] identifier[ele] operator[SEP] operator[SEP] operator[SEP] } } } } }
public ManagedClusterInner beginCreateOrUpdate(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).toBlocking().single().body(); }
class class_name[name] begin[{] method[beginCreateOrUpdate, return_type[type[ManagedClusterInner]], modifier[public], parameter[resourceGroupName, resourceName, parameters]] begin[{] return[call[.beginCreateOrUpdateWithServiceResponseAsync, parameter[member[.resourceGroupName], member[.resourceName], member[.parameters]]]] end[}] END[}]
Keyword[public] identifier[ManagedClusterInner] identifier[beginCreateOrUpdate] operator[SEP] identifier[String] identifier[resourceGroupName] , identifier[String] identifier[resourceName] , identifier[ManagedClusterInner] identifier[parameters] operator[SEP] { Keyword[return] identifier[beginCreateOrUpdateWithServiceResponseAsync] operator[SEP] identifier[resourceGroupName] , identifier[resourceName] , identifier[parameters] operator[SEP] operator[SEP] identifier[toBlocking] operator[SEP] operator[SEP] operator[SEP] identifier[single] operator[SEP] operator[SEP] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] }
public static JavaPairRDD<Text, BytesPairWritable> combineFilesForSequenceFile(JavaSparkContext sc, String path1, String path2, PathToKeyConverter converter) { return combineFilesForSequenceFile(sc, path1, path2, converter, converter); }
class class_name[name] begin[{] method[combineFilesForSequenceFile, return_type[type[JavaPairRDD]], modifier[public static], parameter[sc, path1, path2, converter]] begin[{] return[call[.combineFilesForSequenceFile, parameter[member[.sc], member[.path1], member[.path2], member[.converter], member[.converter]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[JavaPairRDD] operator[<] identifier[Text] , identifier[BytesPairWritable] operator[>] identifier[combineFilesForSequenceFile] operator[SEP] identifier[JavaSparkContext] identifier[sc] , identifier[String] identifier[path1] , identifier[String] identifier[path2] , identifier[PathToKeyConverter] identifier[converter] operator[SEP] { Keyword[return] identifier[combineFilesForSequenceFile] operator[SEP] identifier[sc] , identifier[path1] , identifier[path2] , identifier[converter] , identifier[converter] operator[SEP] operator[SEP] }
private static Table getTable(char t) { switch (t) { case 'L': return Table.LOWER; case 'P': return Table.PUNCT; case 'M': return Table.MIXED; case 'D': return Table.DIGIT; case 'B': return Table.BINARY; case 'U': default: return Table.UPPER; } }
class class_name[name] begin[{] method[getTable, return_type[type[Table]], modifier[private static], parameter[t]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='L')], statements=[ReturnStatement(expression=MemberReference(member=LOWER, postfix_operators=[], prefix_operators=[], qualifier=Table, selectors=[]), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='P')], statements=[ReturnStatement(expression=MemberReference(member=PUNCT, postfix_operators=[], prefix_operators=[], qualifier=Table, selectors=[]), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='M')], statements=[ReturnStatement(expression=MemberReference(member=MIXED, postfix_operators=[], prefix_operators=[], qualifier=Table, selectors=[]), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='D')], statements=[ReturnStatement(expression=MemberReference(member=DIGIT, postfix_operators=[], prefix_operators=[], qualifier=Table, selectors=[]), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='B')], statements=[ReturnStatement(expression=MemberReference(member=BINARY, postfix_operators=[], prefix_operators=[], qualifier=Table, selectors=[]), label=None)]), SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='U')], statements=[ReturnStatement(expression=MemberReference(member=UPPER, postfix_operators=[], prefix_operators=[], qualifier=Table, selectors=[]), label=None)])], expression=MemberReference(member=t, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[private] Keyword[static] identifier[Table] identifier[getTable] operator[SEP] Keyword[char] identifier[t] operator[SEP] { Keyword[switch] operator[SEP] identifier[t] operator[SEP] { Keyword[case] literal[String] operator[:] Keyword[return] identifier[Table] operator[SEP] identifier[LOWER] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[return] identifier[Table] operator[SEP] identifier[PUNCT] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[return] identifier[Table] operator[SEP] identifier[MIXED] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[return] identifier[Table] operator[SEP] identifier[DIGIT] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[return] identifier[Table] operator[SEP] identifier[BINARY] operator[SEP] Keyword[case] literal[String] operator[:] Keyword[default] operator[:] Keyword[return] identifier[Table] operator[SEP] identifier[UPPER] operator[SEP] } }
public List<ISubmission> getExternalSubmissions(String resourceUrl) throws Exception{ return new SubmitterSubmissionsFilter().omit(getSubmissions(resourceUrl), submitter); }
class class_name[name] begin[{] method[getExternalSubmissions, return_type[type[List]], modifier[public], parameter[resourceUrl]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=resourceUrl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getSubmissions, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=submitter, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=omit, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=SubmitterSubmissionsFilter, sub_type=None))] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[ISubmission] operator[>] identifier[getExternalSubmissions] operator[SEP] identifier[String] identifier[resourceUrl] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[return] Keyword[new] identifier[SubmitterSubmissionsFilter] operator[SEP] operator[SEP] operator[SEP] identifier[omit] operator[SEP] identifier[getSubmissions] operator[SEP] identifier[resourceUrl] operator[SEP] , identifier[submitter] operator[SEP] operator[SEP] }
public boolean validateVersionType(String versionType, DiagnosticChain diagnostics, Map<Object, Object> context) { return true; }
class class_name[name] begin[{] method[validateVersionType, return_type[type[boolean]], modifier[public], parameter[versionType, diagnostics, context]] begin[{] return[literal[true]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[validateVersionType] operator[SEP] identifier[String] identifier[versionType] , identifier[DiagnosticChain] identifier[diagnostics] , identifier[Map] operator[<] identifier[Object] , identifier[Object] operator[>] identifier[context] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] }
public static String escape(String theValue) { if (theValue == null) { return null; } StringBuilder b = new StringBuilder(); for (int i = 0; i < theValue.length(); i++) { char next = theValue.charAt(i); switch (next) { case '$': case ',': case '|': case '\\': b.append('\\'); break; default: break; } b.append(next); } return b.toString(); }
class class_name[name] begin[{] method[escape, return_type[type[String]], modifier[public static], parameter[theValue]] begin[{] if[binary_operation[member[.theValue], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[StringBuilder], b] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=theValue, selectors=[], type_arguments=None), name=next)], modifiers=set(), type=BasicType(dimensions=[], name=char)), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='$'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=','), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='|'), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\')], statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='\\')], member=append, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), label=None), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=None, label=None)])], expression=MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=next, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=append, postfix_operators=[], prefix_operators=[], qualifier=b, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=theValue, 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[call[b.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[escape] operator[SEP] identifier[String] identifier[theValue] operator[SEP] { Keyword[if] operator[SEP] identifier[theValue] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[StringBuilder] identifier[b] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[theValue] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[char] identifier[next] operator[=] identifier[theValue] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[switch] operator[SEP] identifier[next] operator[SEP] { Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] Keyword[case] literal[String] operator[:] identifier[b] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] operator[SEP] } identifier[b] operator[SEP] identifier[append] operator[SEP] identifier[next] operator[SEP] operator[SEP] } Keyword[return] identifier[b] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
@SuppressWarnings("unchecked") private void addToRootList(Node<K, V> n) { if (minRoot == null) { n.next = n; n.prev = n; minRoot = n; roots = 1; } else { n.next = minRoot.next; n.prev = minRoot; minRoot.next.prev = n; minRoot.next = n; int c; if (comparator == null) { c = ((Comparable<? super K>) n.key).compareTo(minRoot.key); } else { c = comparator.compare(n.key, minRoot.key); } if (c < 0) { minRoot = n; } roots++; } }
class class_name[name] begin[{] method[addToRootList, return_type[void], modifier[private], parameter[n]] begin[{] if[binary_operation[member[.minRoot], ==, literal[null]]] begin[{] assign[member[n.next], member[.n]] assign[member[n.prev], member[.n]] assign[member[.minRoot], member[.n]] assign[member[.roots], literal[1]] else begin[{] assign[member[n.next], member[minRoot.next]] assign[member[n.prev], member[.minRoot]] assign[member[minRoot.next.prev], member[.n]] assign[member[minRoot.next], member[.n]] local_variable[type[int], c] if[binary_operation[member[.comparator], ==, literal[null]]] begin[{] assign[member[.c], Cast(expression=MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=n, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=super, type=ReferenceType(arguments=None, dimensions=[], name=K, sub_type=None))], dimensions=[], name=Comparable, sub_type=None))] else begin[{] assign[member[.c], call[comparator.compare, parameter[member[n.key], member[minRoot.key]]]] end[}] if[binary_operation[member[.c], <, literal[0]]] begin[{] assign[member[.minRoot], member[.n]] else begin[{] None end[}] member[.roots] end[}] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] Keyword[private] Keyword[void] identifier[addToRootList] operator[SEP] identifier[Node] operator[<] identifier[K] , identifier[V] operator[>] identifier[n] operator[SEP] { Keyword[if] operator[SEP] identifier[minRoot] operator[==] Other[null] operator[SEP] { identifier[n] operator[SEP] identifier[next] operator[=] identifier[n] operator[SEP] identifier[n] operator[SEP] identifier[prev] operator[=] identifier[n] operator[SEP] identifier[minRoot] operator[=] identifier[n] operator[SEP] identifier[roots] operator[=] Other[1] operator[SEP] } Keyword[else] { identifier[n] operator[SEP] identifier[next] operator[=] identifier[minRoot] operator[SEP] identifier[next] operator[SEP] identifier[n] operator[SEP] identifier[prev] operator[=] identifier[minRoot] operator[SEP] identifier[minRoot] operator[SEP] identifier[next] operator[SEP] identifier[prev] operator[=] identifier[n] operator[SEP] identifier[minRoot] operator[SEP] identifier[next] operator[=] identifier[n] operator[SEP] Keyword[int] identifier[c] operator[SEP] Keyword[if] operator[SEP] identifier[comparator] operator[==] Other[null] operator[SEP] { identifier[c] operator[=] operator[SEP] operator[SEP] identifier[Comparable] operator[<] operator[?] Keyword[super] identifier[K] operator[>] operator[SEP] identifier[n] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[compareTo] operator[SEP] identifier[minRoot] operator[SEP] identifier[key] operator[SEP] operator[SEP] } Keyword[else] { identifier[c] operator[=] identifier[comparator] operator[SEP] identifier[compare] operator[SEP] identifier[n] operator[SEP] identifier[key] , identifier[minRoot] operator[SEP] identifier[key] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[c] operator[<] Other[0] operator[SEP] { identifier[minRoot] operator[=] identifier[n] operator[SEP] } identifier[roots] operator[++] operator[SEP] } }
public boolean add(Boolean value) { if (value == null) { stateList.add(Type.NULL); } else { stateList.add(Type.BOOLEAN); } return super.add(value); }
class class_name[name] begin[{] method[add, return_type[type[boolean]], modifier[public], parameter[value]] begin[{] if[binary_operation[member[.value], ==, literal[null]]] begin[{] call[stateList.add, parameter[member[Type.NULL]]] else begin[{] call[stateList.add, parameter[member[Type.BOOLEAN]]] end[}] return[SuperMethodInvocation(arguments=[MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[add] operator[SEP] identifier[Boolean] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] operator[==] Other[null] operator[SEP] { identifier[stateList] operator[SEP] identifier[add] operator[SEP] identifier[Type] operator[SEP] identifier[NULL] operator[SEP] operator[SEP] } Keyword[else] { identifier[stateList] operator[SEP] identifier[add] operator[SEP] identifier[Type] operator[SEP] identifier[BOOLEAN] operator[SEP] operator[SEP] } Keyword[return] Keyword[super] operator[SEP] identifier[add] operator[SEP] identifier[value] operator[SEP] operator[SEP] }
public Observable<Void> completeRestoreAsync(String locationName, UUID operationId, String lastBackupName) { return completeRestoreWithServiceResponseAsync(locationName, operationId, lastBackupName).map(new Func1<ServiceResponse<Void>, Void>() { @Override public Void call(ServiceResponse<Void> response) { return response.body(); } }); }
class class_name[name] begin[{] method[completeRestoreAsync, return_type[type[Observable]], modifier[public], parameter[locationName, operationId, lastBackupName]] begin[{] return[call[.completeRestoreWithServiceResponseAsync, parameter[member[.locationName], member[.operationId], member[.lastBackupName]]]] end[}] END[}]
Keyword[public] identifier[Observable] operator[<] identifier[Void] operator[>] identifier[completeRestoreAsync] operator[SEP] identifier[String] identifier[locationName] , identifier[UUID] identifier[operationId] , identifier[String] identifier[lastBackupName] operator[SEP] { Keyword[return] identifier[completeRestoreWithServiceResponseAsync] operator[SEP] identifier[locationName] , identifier[operationId] , identifier[lastBackupName] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[Func1] operator[<] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] , identifier[Void] operator[>] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] identifier[Void] identifier[call] operator[SEP] identifier[ServiceResponse] operator[<] identifier[Void] operator[>] identifier[response] operator[SEP] { Keyword[return] identifier[response] operator[SEP] identifier[body] operator[SEP] operator[SEP] operator[SEP] } } operator[SEP] operator[SEP] }
public List<Integer> getRouteOriginDestination(Integer destination, Integer origin, List<Integer> avoid, List<List<Integer>> connections, String datasource, String flag, String ifNoneMatch) throws ApiException { ApiResponse<List<Integer>> resp = getRouteOriginDestinationWithHttpInfo(destination, origin, avoid, connections, datasource, flag, ifNoneMatch); return resp.getData(); }
class class_name[name] begin[{] method[getRouteOriginDestination, return_type[type[List]], modifier[public], parameter[destination, origin, avoid, connections, datasource, flag, ifNoneMatch]] begin[{] local_variable[type[ApiResponse], resp] return[call[resp.getData, parameter[]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[Integer] operator[>] identifier[getRouteOriginDestination] operator[SEP] identifier[Integer] identifier[destination] , identifier[Integer] identifier[origin] , identifier[List] operator[<] identifier[Integer] operator[>] identifier[avoid] , identifier[List] operator[<] identifier[List] operator[<] identifier[Integer] operator[>] operator[>] identifier[connections] , identifier[String] identifier[datasource] , identifier[String] identifier[flag] , identifier[String] identifier[ifNoneMatch] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[ApiResponse] operator[<] identifier[List] operator[<] identifier[Integer] operator[>] operator[>] identifier[resp] operator[=] identifier[getRouteOriginDestinationWithHttpInfo] operator[SEP] identifier[destination] , identifier[origin] , identifier[avoid] , identifier[connections] , identifier[datasource] , identifier[flag] , identifier[ifNoneMatch] operator[SEP] operator[SEP] Keyword[return] identifier[resp] operator[SEP] identifier[getData] operator[SEP] operator[SEP] operator[SEP] }
public <T> T doInTransaction(final TxConfig config, final TxAction<T> action) { T res = null; if (transactionManager.isTransactionActive()) { // execution inside of other transaction try { res = action.execute(); } catch (Throwable th) { throwRuntime(th); } } else { try { transactionManager.begin(config); res = action.execute(); transactionManager.end(); } catch (Throwable th) { // transaction may be not active if exception happened during commit and // tm already performed rollback action if (transactionManager.isTransactionActive()) { // calling once for nested transactions (or in case it was done manually transactionManager.rollback(resolveErrorToAnalyze(th)); } throwRuntime(th); } } return res; }
class class_name[name] begin[{] method[doInTransaction, return_type[type[T]], modifier[public], parameter[config, action]] begin[{] local_variable[type[T], res] if[call[transactionManager.isTransactionActive, parameter[]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=execute, postfix_operators=[], prefix_operators=[], qualifier=action, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=th, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=throwRuntime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=th, types=['Throwable']))], finally_block=None, label=None, resources=None) else begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=config, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=begin, postfix_operators=[], prefix_operators=[], qualifier=transactionManager, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=res, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=execute, postfix_operators=[], prefix_operators=[], qualifier=action, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=end, postfix_operators=[], prefix_operators=[], qualifier=transactionManager, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[IfStatement(condition=MethodInvocation(arguments=[], member=isTransactionActive, postfix_operators=[], prefix_operators=[], qualifier=transactionManager, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=th, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=resolveErrorToAnalyze, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=rollback, postfix_operators=[], prefix_operators=[], qualifier=transactionManager, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=th, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=throwRuntime, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=th, types=['Throwable']))], finally_block=None, label=None, resources=None) end[}] return[member[.res]] end[}] END[}]
Keyword[public] operator[<] identifier[T] operator[>] identifier[T] identifier[doInTransaction] operator[SEP] Keyword[final] identifier[TxConfig] identifier[config] , Keyword[final] identifier[TxAction] operator[<] identifier[T] operator[>] identifier[action] operator[SEP] { identifier[T] identifier[res] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[transactionManager] operator[SEP] identifier[isTransactionActive] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[res] operator[=] identifier[action] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[th] operator[SEP] { identifier[throwRuntime] operator[SEP] identifier[th] operator[SEP] operator[SEP] } } Keyword[else] { Keyword[try] { identifier[transactionManager] operator[SEP] identifier[begin] operator[SEP] identifier[config] operator[SEP] operator[SEP] identifier[res] operator[=] identifier[action] operator[SEP] identifier[execute] operator[SEP] operator[SEP] operator[SEP] identifier[transactionManager] operator[SEP] identifier[end] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[th] operator[SEP] { Keyword[if] operator[SEP] identifier[transactionManager] operator[SEP] identifier[isTransactionActive] operator[SEP] operator[SEP] operator[SEP] { identifier[transactionManager] operator[SEP] identifier[rollback] operator[SEP] identifier[resolveErrorToAnalyze] operator[SEP] identifier[th] operator[SEP] operator[SEP] operator[SEP] } identifier[throwRuntime] operator[SEP] identifier[th] operator[SEP] operator[SEP] } } Keyword[return] identifier[res] operator[SEP] }
public synchronized void passiveConnect(DataSink sink, TransferContext context, int connections, ServerSocket serverSocket) throws ServerException { // things would get messed up if more than 1 file was transfered // simultaneously with the same transfer manager if (transferThreadCount != 0) { throw new ServerException( ServerException.PREVIOUS_TRANSFER_ACTIVE); } for (int i = 0; i < connections; i++) { Task task = new GridFTPPassiveConnectTask( serverSocket, sink, localControlChannel, gSession, dataChannelFactory, (EBlockParallelTransferContext) context); runTask(task); } }
class class_name[name] begin[{] method[passiveConnect, return_type[void], modifier[synchronized public], parameter[sink, context, connections, serverSocket]] begin[{] if[binary_operation[member[.transferThreadCount], !=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=PREVIOUS_TRANSFER_ACTIVE, postfix_operators=[], prefix_operators=[], qualifier=ServerException, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ServerException, sub_type=None)), label=None) else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=serverSocket, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sink, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=localControlChannel, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=gSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=dataChannelFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Cast(expression=MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=EBlockParallelTransferContext, sub_type=None))], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=GridFTPPassiveConnectTask, sub_type=None)), name=task)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Task, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=task, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=runTask, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=connections, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[public] Keyword[synchronized] Keyword[void] identifier[passiveConnect] operator[SEP] identifier[DataSink] identifier[sink] , identifier[TransferContext] identifier[context] , Keyword[int] identifier[connections] , identifier[ServerSocket] identifier[serverSocket] operator[SEP] Keyword[throws] identifier[ServerException] { Keyword[if] operator[SEP] identifier[transferThreadCount] operator[!=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[ServerException] operator[SEP] identifier[ServerException] operator[SEP] identifier[PREVIOUS_TRANSFER_ACTIVE] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[connections] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[Task] identifier[task] operator[=] Keyword[new] identifier[GridFTPPassiveConnectTask] operator[SEP] identifier[serverSocket] , identifier[sink] , identifier[localControlChannel] , identifier[gSession] , identifier[dataChannelFactory] , operator[SEP] identifier[EBlockParallelTransferContext] operator[SEP] identifier[context] operator[SEP] operator[SEP] identifier[runTask] operator[SEP] identifier[task] operator[SEP] operator[SEP] } }
public void showValidationInProgress() { validationIcon.setValue(null); validationIcon.addStyleName("show-status-label"); validationIcon.setStyleName(SPUIStyleDefinitions.TARGET_FILTER_SEARCH_PROGRESS_INDICATOR_STYLE); }
class class_name[name] begin[{] method[showValidationInProgress, return_type[void], modifier[public], parameter[]] begin[{] call[validationIcon.setValue, parameter[literal[null]]] call[validationIcon.addStyleName, parameter[literal["show-status-label"]]] call[validationIcon.setStyleName, parameter[member[SPUIStyleDefinitions.TARGET_FILTER_SEARCH_PROGRESS_INDICATOR_STYLE]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[showValidationInProgress] operator[SEP] operator[SEP] { identifier[validationIcon] operator[SEP] identifier[setValue] operator[SEP] Other[null] operator[SEP] operator[SEP] identifier[validationIcon] operator[SEP] identifier[addStyleName] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[validationIcon] operator[SEP] identifier[setStyleName] operator[SEP] identifier[SPUIStyleDefinitions] operator[SEP] identifier[TARGET_FILTER_SEARCH_PROGRESS_INDICATOR_STYLE] operator[SEP] operator[SEP] }
@Nullable public final View getView(@NonNull final ItemType item) { Condition.INSTANCE.ensureNotNull(item, "The item may not be null"); return activeViews.get(item); }
class class_name[name] begin[{] method[getView, return_type[type[View]], modifier[final public], parameter[item]] begin[{] call[Condition.INSTANCE.ensureNotNull, parameter[member[.item], literal["The item may not be null"]]] return[call[activeViews.get, parameter[member[.item]]]] end[}] END[}]
annotation[@] identifier[Nullable] Keyword[public] Keyword[final] identifier[View] identifier[getView] operator[SEP] annotation[@] identifier[NonNull] Keyword[final] identifier[ItemType] identifier[item] operator[SEP] { identifier[Condition] operator[SEP] identifier[INSTANCE] operator[SEP] identifier[ensureNotNull] operator[SEP] identifier[item] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[activeViews] operator[SEP] identifier[get] operator[SEP] identifier[item] operator[SEP] operator[SEP] }
@CodingStyleguideUnaware public static <T extends Map <?, ?>> T notEmptyNoNullValue (final T aValue, final String sName) { if (isEnabled ()) return notEmptyNoNullValue (aValue, () -> sName); return aValue; }
class class_name[name] begin[{] method[notEmptyNoNullValue, return_type[type[T]], modifier[public static], parameter[aValue, sName]] begin[{] if[call[.isEnabled, parameter[]]] begin[{] return[call[.notEmptyNoNullValue, parameter[member[.aValue], LambdaExpression(body=MemberReference(member=sName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), parameters=[])]]] else begin[{] None end[}] return[member[.aValue]] end[}] END[}]
annotation[@] identifier[CodingStyleguideUnaware] Keyword[public] Keyword[static] operator[<] identifier[T] Keyword[extends] identifier[Map] operator[<] operator[?] , operator[?] operator[>] operator[>] identifier[T] identifier[notEmptyNoNullValue] operator[SEP] Keyword[final] identifier[T] identifier[aValue] , Keyword[final] identifier[String] identifier[sName] operator[SEP] { Keyword[if] operator[SEP] identifier[isEnabled] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[notEmptyNoNullValue] operator[SEP] identifier[aValue] , operator[SEP] operator[SEP] operator[->] identifier[sName] operator[SEP] operator[SEP] Keyword[return] identifier[aValue] operator[SEP] }
public static ConfigurableApplicationContext run(Class<?>[] primarySources, String[] args) { return new SpringApplication(primarySources).run(args); }
class class_name[name] begin[{] method[run, return_type[type[ConfigurableApplicationContext]], modifier[public static], parameter[primarySources, args]] begin[{] return[ClassCreator(arguments=[MemberReference(member=primarySources, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=run, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=SpringApplication, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[ConfigurableApplicationContext] identifier[run] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[primarySources] , identifier[String] operator[SEP] operator[SEP] identifier[args] operator[SEP] { Keyword[return] Keyword[new] identifier[SpringApplication] operator[SEP] identifier[primarySources] operator[SEP] operator[SEP] identifier[run] operator[SEP] identifier[args] operator[SEP] operator[SEP] }
public int getPort() { final Connector[] connectors = this.server.getConnectors(); checkState(connectors.length >= 1, "Server must have at least 1 connector"); // The first connector is created upon initializing the server. That's the one that has the port. return connectors[0].getLocalPort(); }
class class_name[name] begin[{] method[getPort, return_type[type[int]], modifier[public], parameter[]] begin[{] local_variable[type[Connector], connectors] call[.checkState, parameter[binary_operation[member[connectors.length], >=, literal[1]], literal["Server must have at least 1 connector"]]] return[member[.connectors]] end[}] END[}]
Keyword[public] Keyword[int] identifier[getPort] operator[SEP] operator[SEP] { Keyword[final] identifier[Connector] operator[SEP] operator[SEP] identifier[connectors] operator[=] Keyword[this] operator[SEP] identifier[server] operator[SEP] identifier[getConnectors] operator[SEP] operator[SEP] operator[SEP] identifier[checkState] operator[SEP] identifier[connectors] operator[SEP] identifier[length] operator[>=] Other[1] , literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[connectors] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[getLocalPort] operator[SEP] operator[SEP] operator[SEP] }
private void datePopupChanged(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_datePopupChanged if (evt.getNewValue() instanceof Date) setDateTime((Date)evt.getNewValue()); }
class class_name[name] begin[{] method[datePopupChanged, return_type[void], modifier[private], parameter[evt]] begin[{] if[binary_operation[call[evt.getNewValue, parameter[]], instanceof, type[Date]]] begin[{] call[.setDateTime, parameter[Cast(expression=MethodInvocation(arguments=[], member=getNewValue, postfix_operators=[], prefix_operators=[], qualifier=evt, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=Date, sub_type=None))]] else begin[{] None end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[datePopupChanged] operator[SEP] identifier[java] operator[SEP] identifier[beans] operator[SEP] identifier[PropertyChangeEvent] identifier[evt] operator[SEP] { Keyword[if] operator[SEP] identifier[evt] operator[SEP] identifier[getNewValue] operator[SEP] operator[SEP] Keyword[instanceof] identifier[Date] operator[SEP] identifier[setDateTime] operator[SEP] operator[SEP] identifier[Date] operator[SEP] identifier[evt] operator[SEP] identifier[getNewValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public void downloadFileUsingRequesterPays( String projectId, String bucketName, String srcFilename, Path destFilePath) throws IOException { // [START storage_download_file_requester_pays] // The project ID to bill // String projectId = "my-billable-project-id"; // The name of the bucket to access // String bucketName = "my-bucket"; // The name of the remote file to download // String srcFilename = "file.txt"; // The path to which the file should be downloaded // Path destFilePath = Paths.get("/local/path/to/file.txt"); // Instantiate a Google Cloud Storage client Storage storage = StorageOptions.getDefaultInstance().getService(); // Get specific file from specified bucket Blob blob = storage.get(BlobId.of(bucketName, srcFilename)); // Download file to specified path blob.downloadTo(destFilePath, Blob.BlobSourceOption.userProject(projectId)); // [END storage_download_file_requester_pays] }
class class_name[name] begin[{] method[downloadFileUsingRequesterPays, return_type[void], modifier[public], parameter[projectId, bucketName, srcFilename, destFilePath]] begin[{] local_variable[type[Storage], storage] local_variable[type[Blob], blob] call[blob.downloadTo, parameter[member[.destFilePath], call[Blob.BlobSourceOption.userProject, parameter[member[.projectId]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[downloadFileUsingRequesterPays] operator[SEP] identifier[String] identifier[projectId] , identifier[String] identifier[bucketName] , identifier[String] identifier[srcFilename] , identifier[Path] identifier[destFilePath] operator[SEP] Keyword[throws] identifier[IOException] { identifier[Storage] identifier[storage] operator[=] identifier[StorageOptions] operator[SEP] identifier[getDefaultInstance] operator[SEP] operator[SEP] operator[SEP] identifier[getService] operator[SEP] operator[SEP] operator[SEP] identifier[Blob] identifier[blob] operator[=] identifier[storage] operator[SEP] identifier[get] operator[SEP] identifier[BlobId] operator[SEP] identifier[of] operator[SEP] identifier[bucketName] , identifier[srcFilename] operator[SEP] operator[SEP] operator[SEP] identifier[blob] operator[SEP] identifier[downloadTo] operator[SEP] identifier[destFilePath] , identifier[Blob] operator[SEP] identifier[BlobSourceOption] operator[SEP] identifier[userProject] operator[SEP] identifier[projectId] operator[SEP] operator[SEP] operator[SEP] }
public Object eval( BSHType typeNode, Modifiers modifiers, CallStack callstack, Interpreter interpreter) throws EvalError { // null value means no value Object value = modifiers.hasModifier("final") ? null : Primitive.getDefaultValue(typeNode.getBaseType()); if ( jjtGetNumChildren() > 0 ) { SimpleNode initializer = (SimpleNode)jjtGetChild(0); /* If we have type info and the child is an array initializer pass it along... Else use the default eval style. (This allows array initializer to handle the problem... allowing for future enhancements in loosening types there). */ if ( initializer instanceof BSHArrayInitializer ) value = ((BSHArrayInitializer)initializer).eval(typeNode.getBaseType(), this.getArrayDims(typeNode), callstack, interpreter); else value = initializer.eval( callstack, interpreter); } if ( value == Primitive.VOID ) throw new EvalError("Void initializer.", this, callstack ); return value; }
class class_name[name] begin[{] method[eval, return_type[type[Object]], modifier[public], parameter[typeNode, modifiers, callstack, interpreter]] begin[{] local_variable[type[Object], value] if[binary_operation[call[.jjtGetNumChildren, parameter[]], >, literal[0]]] begin[{] local_variable[type[SimpleNode], initializer] if[binary_operation[member[.initializer], instanceof, type[BSHArrayInitializer]]] begin[{] assign[member[.value], Cast(expression=MemberReference(member=initializer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BSHArrayInitializer, sub_type=None))] else begin[{] assign[member[.value], call[initializer.eval, parameter[member[.callstack], member[.interpreter]]]] end[}] else begin[{] None end[}] if[binary_operation[member[.value], ==, member[Primitive.VOID]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Void initializer."), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), MemberReference(member=callstack, 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=EvalError, sub_type=None)), label=None) else begin[{] None end[}] return[member[.value]] end[}] END[}]
Keyword[public] identifier[Object] identifier[eval] operator[SEP] identifier[BSHType] identifier[typeNode] , identifier[Modifiers] identifier[modifiers] , identifier[CallStack] identifier[callstack] , identifier[Interpreter] identifier[interpreter] operator[SEP] Keyword[throws] identifier[EvalError] { identifier[Object] identifier[value] operator[=] identifier[modifiers] operator[SEP] identifier[hasModifier] operator[SEP] literal[String] operator[SEP] operator[?] Other[null] operator[:] identifier[Primitive] operator[SEP] identifier[getDefaultValue] operator[SEP] identifier[typeNode] operator[SEP] identifier[getBaseType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[jjtGetNumChildren] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { identifier[SimpleNode] identifier[initializer] operator[=] operator[SEP] identifier[SimpleNode] operator[SEP] identifier[jjtGetChild] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[initializer] Keyword[instanceof] identifier[BSHArrayInitializer] operator[SEP] identifier[value] operator[=] operator[SEP] operator[SEP] identifier[BSHArrayInitializer] operator[SEP] identifier[initializer] operator[SEP] operator[SEP] identifier[eval] operator[SEP] identifier[typeNode] operator[SEP] identifier[getBaseType] operator[SEP] operator[SEP] , Keyword[this] operator[SEP] identifier[getArrayDims] operator[SEP] identifier[typeNode] operator[SEP] , identifier[callstack] , identifier[interpreter] operator[SEP] operator[SEP] Keyword[else] identifier[value] operator[=] identifier[initializer] operator[SEP] identifier[eval] operator[SEP] identifier[callstack] , identifier[interpreter] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[value] operator[==] identifier[Primitive] operator[SEP] identifier[VOID] operator[SEP] Keyword[throw] Keyword[new] identifier[EvalError] operator[SEP] literal[String] , Keyword[this] , identifier[callstack] operator[SEP] operator[SEP] Keyword[return] identifier[value] operator[SEP] }
public DescribeWorkspaceImagesResult withImages(WorkspaceImage... images) { if (this.images == null) { setImages(new com.amazonaws.internal.SdkInternalList<WorkspaceImage>(images.length)); } for (WorkspaceImage ele : images) { this.images.add(ele); } return this; }
class class_name[name] begin[{] method[withImages, return_type[type[DescribeWorkspaceImagesResult]], modifier[public], parameter[images]] begin[{] if[binary_operation[THIS[member[None.images]], ==, literal[null]]] begin[{] call[.setImages, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=images, 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=WorkspaceImage, sub_type=None))], dimensions=None, name=SdkInternalList, sub_type=None)))))]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=images, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=ele, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=images, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ele)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WorkspaceImage, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[DescribeWorkspaceImagesResult] identifier[withImages] operator[SEP] identifier[WorkspaceImage] operator[...] identifier[images] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[images] operator[==] Other[null] operator[SEP] { identifier[setImages] operator[SEP] Keyword[new] identifier[com] operator[SEP] identifier[amazonaws] operator[SEP] identifier[internal] operator[SEP] identifier[SdkInternalList] operator[<] identifier[WorkspaceImage] operator[>] operator[SEP] identifier[images] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[WorkspaceImage] identifier[ele] operator[:] identifier[images] operator[SEP] { Keyword[this] operator[SEP] identifier[images] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
private EsRequest find(String nodeKey) throws IOException { return client.getDocument(name(), workspace, nodeKey); }
class class_name[name] begin[{] method[find, return_type[type[EsRequest]], modifier[private], parameter[nodeKey]] begin[{] return[call[client.getDocument, parameter[call[.name, parameter[]], member[.workspace], member[.nodeKey]]]] end[}] END[}]
Keyword[private] identifier[EsRequest] identifier[find] operator[SEP] identifier[String] identifier[nodeKey] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[return] identifier[client] operator[SEP] identifier[getDocument] operator[SEP] identifier[name] operator[SEP] operator[SEP] , identifier[workspace] , identifier[nodeKey] operator[SEP] operator[SEP] }
@Generated(value = "com.sun.tools.xjc.Driver", date = "2018-10-12T02:54:50+02:00", comments = "JAXB RI v2.2.11") public List<Distanzen> getDistanzen() { if (distanzen == null) { distanzen = new ArrayList<Distanzen>(); } return this.distanzen; }
class class_name[name] begin[{] method[getDistanzen, return_type[type[List]], modifier[public], parameter[]] begin[{] if[binary_operation[member[.distanzen], ==, literal[null]]] begin[{] assign[member[.distanzen], 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=Distanzen, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))] else begin[{] None end[}] return[THIS[member[None.distanzen]]] end[}] END[}]
annotation[@] identifier[Generated] operator[SEP] identifier[value] operator[=] literal[String] , identifier[date] operator[=] literal[String] , identifier[comments] operator[=] literal[String] operator[SEP] Keyword[public] identifier[List] operator[<] identifier[Distanzen] operator[>] identifier[getDistanzen] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[distanzen] operator[==] Other[null] operator[SEP] { identifier[distanzen] operator[=] Keyword[new] identifier[ArrayList] operator[<] identifier[Distanzen] operator[>] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] identifier[distanzen] operator[SEP] }
public void advise(long position, long length) throws IOException { final long ap = address+position; final long a = (ap)/PAGE_SIZE*PAGE_SIZE; final long l = Math.min(length+(ap-a), address+memory.length()-ap); final int err = madvise(a, l); if (err != 0) { throw new IOException("madvise failed with error code: "+err); } }
class class_name[name] begin[{] method[advise, return_type[void], modifier[public], parameter[position, length]] begin[{] local_variable[type[long], ap] local_variable[type[long], a] local_variable[type[long], l] local_variable[type[int], err] if[binary_operation[member[.err], !=, literal[0]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="madvise failed with error code: "), operandr=MemberReference(member=err, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[advise] operator[SEP] Keyword[long] identifier[position] , Keyword[long] identifier[length] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[final] Keyword[long] identifier[ap] operator[=] identifier[address] operator[+] identifier[position] operator[SEP] Keyword[final] Keyword[long] identifier[a] operator[=] operator[SEP] identifier[ap] operator[SEP] operator[/] identifier[PAGE_SIZE] operator[*] identifier[PAGE_SIZE] operator[SEP] Keyword[final] Keyword[long] identifier[l] operator[=] identifier[Math] operator[SEP] identifier[min] operator[SEP] identifier[length] operator[+] operator[SEP] identifier[ap] operator[-] identifier[a] operator[SEP] , identifier[address] operator[+] identifier[memory] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] identifier[ap] operator[SEP] operator[SEP] Keyword[final] Keyword[int] identifier[err] operator[=] identifier[madvise] operator[SEP] identifier[a] , identifier[l] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[err] operator[!=] Other[0] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[err] operator[SEP] operator[SEP] } }
public static long durationMS(LocalDateTime start,LocalDateTime end) { if(start == null || end == null) { return 0; } return Duration.between(start, end).toMillis(); }
class class_name[name] begin[{] method[durationMS, return_type[type[long]], modifier[public static], parameter[start, end]] begin[{] if[binary_operation[binary_operation[member[.start], ==, literal[null]], ||, binary_operation[member[.end], ==, literal[null]]]] begin[{] return[literal[0]] else begin[{] None end[}] return[call[Duration.between, parameter[member[.start], member[.end]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[long] identifier[durationMS] operator[SEP] identifier[LocalDateTime] identifier[start] , identifier[LocalDateTime] identifier[end] operator[SEP] { Keyword[if] operator[SEP] identifier[start] operator[==] Other[null] operator[||] identifier[end] operator[==] Other[null] operator[SEP] { Keyword[return] Other[0] operator[SEP] } Keyword[return] identifier[Duration] operator[SEP] identifier[between] operator[SEP] identifier[start] , identifier[end] operator[SEP] operator[SEP] identifier[toMillis] operator[SEP] operator[SEP] operator[SEP] }
public void setKeys(java.util.Collection<DimensionKeyDescription> keys) { if (keys == null) { this.keys = null; return; } this.keys = new java.util.ArrayList<DimensionKeyDescription>(keys); }
class class_name[name] begin[{] method[setKeys, return_type[void], modifier[public], parameter[keys]] begin[{] if[binary_operation[member[.keys], ==, literal[null]]] begin[{] assign[THIS[member[None.keys]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.keys]], ClassCreator(arguments=[MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=DimensionKeyDescription, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setKeys] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[DimensionKeyDescription] operator[>] identifier[keys] operator[SEP] { Keyword[if] operator[SEP] identifier[keys] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[keys] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[keys] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[DimensionKeyDescription] operator[>] operator[SEP] identifier[keys] operator[SEP] operator[SEP] }
public static void v(String msg, Throwable tr) { assertInitialization(); sLogger.v(msg, tr); }
class class_name[name] begin[{] method[v, return_type[void], modifier[public static], parameter[msg, tr]] begin[{] call[.assertInitialization, parameter[]] call[sLogger.v, parameter[member[.msg], member[.tr]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[v] operator[SEP] identifier[String] identifier[msg] , identifier[Throwable] identifier[tr] operator[SEP] { identifier[assertInitialization] operator[SEP] operator[SEP] operator[SEP] identifier[sLogger] operator[SEP] identifier[v] operator[SEP] identifier[msg] , identifier[tr] operator[SEP] operator[SEP] }
@Override public int compareTo(Identifier that) { if (mValue.length != that.mValue.length) { return mValue.length < that.mValue.length ? -1 : 1; } for (int i = 0; i < mValue.length; i++) { if (mValue[i] != that.mValue[i]) { return mValue[i] < that.mValue[i] ? -1 : 1; } } return 0; }
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[public], parameter[that]] begin[{] if[binary_operation[member[mValue.length], !=, member[that.mValue.length]]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=mValue, selectors=[]), operandr=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=that.mValue, selectors=[]), operator=<), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), if_true=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1))] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=mValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=mValue, postfix_operators=[], prefix_operators=[], qualifier=that, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=mValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=mValue, postfix_operators=[], prefix_operators=[], qualifier=that, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=<), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), if_true=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), 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=mValue, 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[0]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Identifier] identifier[that] operator[SEP] { Keyword[if] operator[SEP] identifier[mValue] operator[SEP] identifier[length] operator[!=] identifier[that] operator[SEP] identifier[mValue] operator[SEP] identifier[length] operator[SEP] { Keyword[return] identifier[mValue] operator[SEP] identifier[length] operator[<] identifier[that] operator[SEP] identifier[mValue] operator[SEP] identifier[length] operator[?] operator[-] Other[1] operator[:] Other[1] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[mValue] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[mValue] operator[SEP] identifier[i] operator[SEP] operator[!=] identifier[that] operator[SEP] identifier[mValue] operator[SEP] identifier[i] operator[SEP] operator[SEP] { Keyword[return] identifier[mValue] operator[SEP] identifier[i] operator[SEP] operator[<] identifier[that] operator[SEP] identifier[mValue] operator[SEP] identifier[i] operator[SEP] operator[?] operator[-] Other[1] operator[:] Other[1] operator[SEP] } } Keyword[return] Other[0] operator[SEP] }
public static <D> Async<D> async(final Callable<D> task) { return async(null, task); }
class class_name[name] begin[{] method[async, return_type[type[Async]], modifier[public static], parameter[task]] begin[{] return[call[.async, parameter[literal[null], member[.task]]]] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[D] operator[>] identifier[Async] operator[<] identifier[D] operator[>] identifier[async] operator[SEP] Keyword[final] identifier[Callable] operator[<] identifier[D] operator[>] identifier[task] operator[SEP] { Keyword[return] identifier[async] operator[SEP] Other[null] , identifier[task] operator[SEP] operator[SEP] }
public void setCrawlerMetricsList(java.util.Collection<CrawlerMetrics> crawlerMetricsList) { if (crawlerMetricsList == null) { this.crawlerMetricsList = null; return; } this.crawlerMetricsList = new java.util.ArrayList<CrawlerMetrics>(crawlerMetricsList); }
class class_name[name] begin[{] method[setCrawlerMetricsList, return_type[void], modifier[public], parameter[crawlerMetricsList]] begin[{] if[binary_operation[member[.crawlerMetricsList], ==, literal[null]]] begin[{] assign[THIS[member[None.crawlerMetricsList]], literal[null]] return[None] else begin[{] None end[}] assign[THIS[member[None.crawlerMetricsList]], ClassCreator(arguments=[MemberReference(member=crawlerMetricsList, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=java, sub_type=ReferenceType(arguments=None, dimensions=None, name=util, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=CrawlerMetrics, sub_type=None))], dimensions=None, name=ArrayList, sub_type=None))))] end[}] END[}]
Keyword[public] Keyword[void] identifier[setCrawlerMetricsList] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Collection] operator[<] identifier[CrawlerMetrics] operator[>] identifier[crawlerMetricsList] operator[SEP] { Keyword[if] operator[SEP] identifier[crawlerMetricsList] operator[==] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[crawlerMetricsList] operator[=] Other[null] operator[SEP] Keyword[return] operator[SEP] } Keyword[this] operator[SEP] identifier[crawlerMetricsList] operator[=] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[CrawlerMetrics] operator[>] operator[SEP] identifier[crawlerMetricsList] operator[SEP] operator[SEP] }
public static List<Nengo> parseRomaji(String romaji) { String query = hepburn(romaji, 0); String prefix = ROMAJI_TO_NENGO.longestPrefixOf(query, 0); return ROMAJI_TO_NENGO.find(prefix); }
class class_name[name] begin[{] method[parseRomaji, return_type[type[List]], modifier[public static], parameter[romaji]] begin[{] local_variable[type[String], query] local_variable[type[String], prefix] return[call[ROMAJI_TO_NENGO.find, parameter[member[.prefix]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[Nengo] operator[>] identifier[parseRomaji] operator[SEP] identifier[String] identifier[romaji] operator[SEP] { identifier[String] identifier[query] operator[=] identifier[hepburn] operator[SEP] identifier[romaji] , Other[0] operator[SEP] operator[SEP] identifier[String] identifier[prefix] operator[=] identifier[ROMAJI_TO_NENGO] operator[SEP] identifier[longestPrefixOf] operator[SEP] identifier[query] , Other[0] operator[SEP] operator[SEP] Keyword[return] identifier[ROMAJI_TO_NENGO] operator[SEP] identifier[find] operator[SEP] identifier[prefix] operator[SEP] operator[SEP] }
public List<HivePartitionDataset> findDatasets() throws IOException { List<HivePartitionDataset> list = new ArrayList<>(); for (HivePartitionDataset hivePartitionDataset : super.findDatasets()) { CleanableHivePartitionDataset dataset = new CleanableHivePartitionDataset(hivePartitionDataset, this.fs, this.state); list.add(dataset); } return list; }
class class_name[name] begin[{] method[findDatasets, return_type[type[List]], modifier[public], parameter[]] begin[{] local_variable[type[List], list] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MemberReference(member=hivePartitionDataset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=fs, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=state, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CleanableHivePartitionDataset, sub_type=None)), name=dataset)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CleanableHivePartitionDataset, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dataset, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=add, postfix_operators=[], prefix_operators=[], qualifier=list, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=SuperMethodInvocation(arguments=[], member=findDatasets, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=hivePartitionDataset)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=HivePartitionDataset, sub_type=None))), label=None) return[member[.list]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[HivePartitionDataset] operator[>] identifier[findDatasets] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { identifier[List] operator[<] identifier[HivePartitionDataset] operator[>] identifier[list] operator[=] Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[HivePartitionDataset] identifier[hivePartitionDataset] operator[:] Keyword[super] operator[SEP] identifier[findDatasets] operator[SEP] operator[SEP] operator[SEP] { identifier[CleanableHivePartitionDataset] identifier[dataset] operator[=] Keyword[new] identifier[CleanableHivePartitionDataset] operator[SEP] identifier[hivePartitionDataset] , Keyword[this] operator[SEP] identifier[fs] , Keyword[this] operator[SEP] identifier[state] operator[SEP] operator[SEP] identifier[list] operator[SEP] identifier[add] operator[SEP] identifier[dataset] operator[SEP] operator[SEP] } Keyword[return] identifier[list] operator[SEP] }
public static String andWith(final String str, final String boolString) { if (Strings.isEmpty(str)) { return null; } if (Strings.isEmpty(boolString)) { return str; } if (str.length() < boolString.length()) { return str; } final StringBuilder buffer = new StringBuilder(str); for (int i = 0; i < buffer.length(); i++) { if (boolString.charAt(i) == '0') { buffer.setCharAt(i, '0'); } } return buffer.toString(); }
class class_name[name] begin[{] method[andWith, return_type[type[String]], modifier[public static], parameter[str, boolString]] begin[{] if[call[Strings.isEmpty, parameter[member[.str]]]] begin[{] return[literal[null]] else begin[{] None end[}] if[call[Strings.isEmpty, parameter[member[.boolString]]]] begin[{] return[member[.str]] else begin[{] None end[}] if[binary_operation[call[str.length, parameter[]], <, call[boolString.length, parameter[]]]] begin[{] return[member[.str]] else begin[{] None end[}] local_variable[type[StringBuilder], buffer] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=charAt, postfix_operators=[], prefix_operators=[], qualifier=boolString, selectors=[], type_arguments=None), 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=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='0')], member=setCharAt, postfix_operators=[], prefix_operators=[], qualifier=buffer, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=buffer, 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[call[buffer.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[andWith] operator[SEP] Keyword[final] identifier[String] identifier[str] , Keyword[final] identifier[String] identifier[boolString] operator[SEP] { Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isEmpty] operator[SEP] identifier[str] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isEmpty] operator[SEP] identifier[boolString] operator[SEP] operator[SEP] { Keyword[return] identifier[str] operator[SEP] } Keyword[if] operator[SEP] identifier[str] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[<] identifier[boolString] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[str] operator[SEP] } Keyword[final] identifier[StringBuilder] identifier[buffer] operator[=] Keyword[new] identifier[StringBuilder] operator[SEP] identifier[str] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[buffer] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[boolString] operator[SEP] identifier[charAt] operator[SEP] identifier[i] operator[SEP] operator[==] literal[String] operator[SEP] { identifier[buffer] operator[SEP] identifier[setCharAt] operator[SEP] identifier[i] , literal[String] operator[SEP] operator[SEP] } } Keyword[return] identifier[buffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void auditAuditLogUsed(RFC3881EventOutcomeCodes eventOutcome, String accessingUser, String accessingProcess, String auditLogUri) { if (!isAuditorEnabled()) { return; } AuditLogUsedEvent auditLogUsedEvent = new AuditLogUsedEvent(eventOutcome); auditLogUsedEvent.setAuditSourceId(getAuditSourceId(), getAuditEnterpriseSiteId()); if (!EventUtils.isEmptyOrNull(accessingUser)) { auditLogUsedEvent.addAccessingParticipant(accessingUser, null, null, getSystemNetworkId()); } if (!EventUtils.isEmptyOrNull(accessingProcess)) { auditLogUsedEvent.addAccessingParticipant(accessingProcess, null, null, getSystemNetworkId()); } auditLogUsedEvent.addAuditLogIdentity(auditLogUri); audit(auditLogUsedEvent); }
class class_name[name] begin[{] method[auditAuditLogUsed, return_type[void], modifier[public], parameter[eventOutcome, accessingUser, accessingProcess, auditLogUri]] begin[{] if[call[.isAuditorEnabled, parameter[]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[AuditLogUsedEvent], auditLogUsedEvent] call[auditLogUsedEvent.setAuditSourceId, parameter[call[.getAuditSourceId, parameter[]], call[.getAuditEnterpriseSiteId, parameter[]]]] if[call[EventUtils.isEmptyOrNull, parameter[member[.accessingUser]]]] begin[{] call[auditLogUsedEvent.addAccessingParticipant, parameter[member[.accessingUser], literal[null], literal[null], call[.getSystemNetworkId, parameter[]]]] else begin[{] None end[}] if[call[EventUtils.isEmptyOrNull, parameter[member[.accessingProcess]]]] begin[{] call[auditLogUsedEvent.addAccessingParticipant, parameter[member[.accessingProcess], literal[null], literal[null], call[.getSystemNetworkId, parameter[]]]] else begin[{] None end[}] call[auditLogUsedEvent.addAuditLogIdentity, parameter[member[.auditLogUri]]] call[.audit, parameter[member[.auditLogUsedEvent]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[auditAuditLogUsed] operator[SEP] identifier[RFC3881EventOutcomeCodes] identifier[eventOutcome] , identifier[String] identifier[accessingUser] , identifier[String] identifier[accessingProcess] , identifier[String] identifier[auditLogUri] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[isAuditorEnabled] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[AuditLogUsedEvent] identifier[auditLogUsedEvent] operator[=] Keyword[new] identifier[AuditLogUsedEvent] operator[SEP] identifier[eventOutcome] operator[SEP] operator[SEP] identifier[auditLogUsedEvent] operator[SEP] identifier[setAuditSourceId] operator[SEP] identifier[getAuditSourceId] operator[SEP] operator[SEP] , identifier[getAuditEnterpriseSiteId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[EventUtils] operator[SEP] identifier[isEmptyOrNull] operator[SEP] identifier[accessingUser] operator[SEP] operator[SEP] { identifier[auditLogUsedEvent] operator[SEP] identifier[addAccessingParticipant] operator[SEP] identifier[accessingUser] , Other[null] , Other[null] , identifier[getSystemNetworkId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[EventUtils] operator[SEP] identifier[isEmptyOrNull] operator[SEP] identifier[accessingProcess] operator[SEP] operator[SEP] { identifier[auditLogUsedEvent] operator[SEP] identifier[addAccessingParticipant] operator[SEP] identifier[accessingProcess] , Other[null] , Other[null] , identifier[getSystemNetworkId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[auditLogUsedEvent] operator[SEP] identifier[addAuditLogIdentity] operator[SEP] identifier[auditLogUri] operator[SEP] operator[SEP] identifier[audit] operator[SEP] identifier[auditLogUsedEvent] operator[SEP] operator[SEP] }
@Override public Set<V> get(Object key) { return (Set<V>) super.get(key); }
class class_name[name] begin[{] method[get, return_type[type[Set]], modifier[public], parameter[key]] begin[{] return[Cast(expression=SuperMethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=V, sub_type=None))], dimensions=[], name=Set, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Set] operator[<] identifier[V] operator[>] identifier[get] operator[SEP] identifier[Object] identifier[key] operator[SEP] { Keyword[return] operator[SEP] identifier[Set] operator[<] identifier[V] operator[>] operator[SEP] Keyword[super] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] }
private void validate(Concept concept) { validateParam(concept, TYPE, Thing.class, Thing::type); validateParam(concept, SUPER_CONCEPT, SchemaConcept.class, SchemaConcept::sup); validateParam(concept, LABEL, SchemaConcept.class, SchemaConcept::label); validateParam(concept, ID, Concept.class, Concept::id); validateParam(concept, VALUE, Attribute.class, Attribute::value); validateParam(concept, DATA_TYPE, AttributeType.class, AttributeType::dataType); validateParam(concept, WHEN, Rule.class, Rule::when); validateParam(concept, THEN, Rule.class, Rule::then); }
class class_name[name] begin[{] method[validate, return_type[void], modifier[private], parameter[concept]] begin[{] call[.validateParam, parameter[member[.concept], member[.TYPE], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Thing, sub_type=None)), MethodReference(expression=MemberReference(member=Thing, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] call[.validateParam, parameter[member[.concept], member[.SUPER_CONCEPT], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SchemaConcept, sub_type=None)), MethodReference(expression=MemberReference(member=SchemaConcept, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=sup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] call[.validateParam, parameter[member[.concept], member[.LABEL], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SchemaConcept, sub_type=None)), MethodReference(expression=MemberReference(member=SchemaConcept, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=label, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] call[.validateParam, parameter[member[.concept], member[.ID], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Concept, sub_type=None)), MethodReference(expression=MemberReference(member=Concept, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=id, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] call[.validateParam, parameter[member[.concept], member[.VALUE], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None)), MethodReference(expression=MemberReference(member=Attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] call[.validateParam, parameter[member[.concept], member[.DATA_TYPE], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AttributeType, sub_type=None)), MethodReference(expression=MemberReference(member=AttributeType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=dataType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] call[.validateParam, parameter[member[.concept], member[.WHEN], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Rule, sub_type=None)), MethodReference(expression=MemberReference(member=Rule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=when, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] call[.validateParam, parameter[member[.concept], member[.THEN], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Rule, sub_type=None)), MethodReference(expression=MemberReference(member=Rule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), method=MemberReference(member=then, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])]] end[}] END[}]
Keyword[private] Keyword[void] identifier[validate] operator[SEP] identifier[Concept] identifier[concept] operator[SEP] { identifier[validateParam] operator[SEP] identifier[concept] , identifier[TYPE] , identifier[Thing] operator[SEP] Keyword[class] , identifier[Thing] operator[::] identifier[type] operator[SEP] operator[SEP] identifier[validateParam] operator[SEP] identifier[concept] , identifier[SUPER_CONCEPT] , identifier[SchemaConcept] operator[SEP] Keyword[class] , identifier[SchemaConcept] operator[::] identifier[sup] operator[SEP] operator[SEP] identifier[validateParam] operator[SEP] identifier[concept] , identifier[LABEL] , identifier[SchemaConcept] operator[SEP] Keyword[class] , identifier[SchemaConcept] operator[::] identifier[label] operator[SEP] operator[SEP] identifier[validateParam] operator[SEP] identifier[concept] , identifier[ID] , identifier[Concept] operator[SEP] Keyword[class] , identifier[Concept] operator[::] identifier[id] operator[SEP] operator[SEP] identifier[validateParam] operator[SEP] identifier[concept] , identifier[VALUE] , identifier[Attribute] operator[SEP] Keyword[class] , identifier[Attribute] operator[::] identifier[value] operator[SEP] operator[SEP] identifier[validateParam] operator[SEP] identifier[concept] , identifier[DATA_TYPE] , identifier[AttributeType] operator[SEP] Keyword[class] , identifier[AttributeType] operator[::] identifier[dataType] operator[SEP] operator[SEP] identifier[validateParam] operator[SEP] identifier[concept] , identifier[WHEN] , identifier[Rule] operator[SEP] Keyword[class] , identifier[Rule] operator[::] identifier[when] operator[SEP] operator[SEP] identifier[validateParam] operator[SEP] identifier[concept] , identifier[THEN] , identifier[Rule] operator[SEP] Keyword[class] , identifier[Rule] operator[::] identifier[then] operator[SEP] operator[SEP] }
public void finishSynch() throws IOException { if (finishing != null) { finishing.blockException(0); return; } finishing = new SynchronizationPoint<>(); try { AsyncWork<Integer, IOException> lastWrite = writeOps.getLastPendingOperation(); if (lastWrite != null) { lastWrite.blockException(0); } deflater.finish(); if (!deflater.finished()) { byte[] writeBuf = new byte[8192]; do { int nb = deflater.deflate(writeBuf, 0, writeBuf.length); if (nb <= 0) break; output.writeSync(ByteBuffer.wrap(writeBuf, 0, nb)); } while (!deflater.finished()); } finishing.unblock(); } catch (IOException e) { finishing.error(e); throw e; } }
class class_name[name] begin[{] method[finishSynch, return_type[void], modifier[public], parameter[]] begin[{] if[binary_operation[member[.finishing], !=, literal[null]]] begin[{] call[finishing.blockException, parameter[literal[0]]] return[None] else begin[{] None end[}] assign[member[.finishing], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=SynchronizationPoint, sub_type=None))] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getLastPendingOperation, postfix_operators=[], prefix_operators=[], qualifier=writeOps, selectors=[], type_arguments=None), name=lastWrite)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IOException, sub_type=None))], dimensions=[], name=AsyncWork, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=lastWrite, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=blockException, postfix_operators=[], prefix_operators=[], qualifier=lastWrite, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=finish, postfix_operators=[], prefix_operators=[], qualifier=deflater, selectors=[], type_arguments=None), label=None), IfStatement(condition=MethodInvocation(arguments=[], member=finished, postfix_operators=[], prefix_operators=['!'], qualifier=deflater, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ArrayCreator(dimensions=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=8192)], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=BasicType(dimensions=None, name=byte)), name=writeBuf)], modifiers=set(), type=BasicType(dimensions=[None], name=byte)), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=writeBuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=writeBuf, selectors=[])], member=deflate, postfix_operators=[], prefix_operators=[], qualifier=deflater, selectors=[], type_arguments=None), name=nb)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=nb, 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=BreakStatement(goto=None, label=None)), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=writeBuf, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), MemberReference(member=nb, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=wrap, postfix_operators=[], prefix_operators=[], qualifier=ByteBuffer, selectors=[], type_arguments=None)], member=writeSync, postfix_operators=[], prefix_operators=[], qualifier=output, selectors=[], type_arguments=None), label=None)]), condition=MethodInvocation(arguments=[], member=finished, postfix_operators=[], prefix_operators=['!'], qualifier=deflater, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[], member=unblock, postfix_operators=[], prefix_operators=[], qualifier=finishing, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=finishing, selectors=[], type_arguments=None), label=None), ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IOException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[finishSynch] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[finishing] operator[!=] Other[null] operator[SEP] { identifier[finishing] operator[SEP] identifier[blockException] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } identifier[finishing] operator[=] Keyword[new] identifier[SynchronizationPoint] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[AsyncWork] operator[<] identifier[Integer] , identifier[IOException] operator[>] identifier[lastWrite] operator[=] identifier[writeOps] operator[SEP] identifier[getLastPendingOperation] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lastWrite] operator[!=] Other[null] operator[SEP] { identifier[lastWrite] operator[SEP] identifier[blockException] operator[SEP] Other[0] operator[SEP] operator[SEP] } identifier[deflater] operator[SEP] identifier[finish] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[deflater] operator[SEP] identifier[finished] operator[SEP] operator[SEP] operator[SEP] { Keyword[byte] operator[SEP] operator[SEP] identifier[writeBuf] operator[=] Keyword[new] Keyword[byte] operator[SEP] Other[8192] operator[SEP] operator[SEP] Keyword[do] { Keyword[int] identifier[nb] operator[=] identifier[deflater] operator[SEP] identifier[deflate] operator[SEP] identifier[writeBuf] , Other[0] , identifier[writeBuf] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[nb] operator[<=] Other[0] operator[SEP] Keyword[break] operator[SEP] identifier[output] operator[SEP] identifier[writeSync] operator[SEP] identifier[ByteBuffer] operator[SEP] identifier[wrap] operator[SEP] identifier[writeBuf] , Other[0] , identifier[nb] operator[SEP] operator[SEP] operator[SEP] } Keyword[while] operator[SEP] operator[!] identifier[deflater] operator[SEP] identifier[finished] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[finishing] operator[SEP] identifier[unblock] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[e] operator[SEP] { identifier[finishing] operator[SEP] identifier[error] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } }
public void shutdown () { log.info("Client manager shutting down", "ccount", _usermap.size()); // inform all of our clients that they are being shut down synchronized (_usermap) { for (PresentsSession pc : _usermap.values()) { try { pc.shutdown(); } catch (Exception e) { log.warning("Client choked in shutdown()", "client", StringUtil.safeToString(pc), e); } } } }
class class_name[name] begin[{] method[shutdown, return_type[void], modifier[public], parameter[]] begin[{] call[log.info, parameter[literal["Client manager shutting down"], literal["ccount"], call[_usermap.size, parameter[]]]] SYNCHRONIZED[member[._usermap]] BEGIN[{] ForStatement(body=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[], member=shutdown, postfix_operators=[], prefix_operators=[], qualifier=pc, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Client choked in shutdown()"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="client"), MethodInvocation(arguments=[MemberReference(member=pc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=safeToString, postfix_operators=[], prefix_operators=[], qualifier=StringUtil, selectors=[], type_arguments=None), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=warning, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=values, postfix_operators=[], prefix_operators=[], qualifier=_usermap, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=pc)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PresentsSession, sub_type=None))), label=None) END[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[shutdown] operator[SEP] operator[SEP] { identifier[log] operator[SEP] identifier[info] operator[SEP] literal[String] , literal[String] , identifier[_usermap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[synchronized] operator[SEP] identifier[_usermap] operator[SEP] { Keyword[for] operator[SEP] identifier[PresentsSession] identifier[pc] operator[:] identifier[_usermap] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[pc] operator[SEP] identifier[shutdown] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[log] operator[SEP] identifier[warning] operator[SEP] literal[String] , literal[String] , identifier[StringUtil] operator[SEP] identifier[safeToString] operator[SEP] identifier[pc] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } } } }
public ResourceadapterType<ConnectorType<T>> getOrCreateResourceadapter() { Node node = childNode.getOrCreate("resourceadapter"); ResourceadapterType<ConnectorType<T>> resourceadapter = new ResourceadapterTypeImpl<ConnectorType<T>>(this, "resourceadapter", childNode, node); return resourceadapter; }
class class_name[name] begin[{] method[getOrCreateResourceadapter, return_type[type[ResourceadapterType]], modifier[public], parameter[]] begin[{] local_variable[type[Node], node] local_variable[type[ResourceadapterType], resourceadapter] return[member[.resourceadapter]] end[}] END[}]
Keyword[public] identifier[ResourceadapterType] operator[<] identifier[ConnectorType] operator[<] identifier[T] operator[>] operator[>] identifier[getOrCreateResourceadapter] operator[SEP] operator[SEP] { identifier[Node] identifier[node] operator[=] identifier[childNode] operator[SEP] identifier[getOrCreate] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[ResourceadapterType] operator[<] identifier[ConnectorType] operator[<] identifier[T] operator[>] operator[>] identifier[resourceadapter] operator[=] Keyword[new] identifier[ResourceadapterTypeImpl] operator[<] identifier[ConnectorType] operator[<] identifier[T] operator[>] operator[>] operator[SEP] Keyword[this] , literal[String] , identifier[childNode] , identifier[node] operator[SEP] operator[SEP] Keyword[return] identifier[resourceadapter] operator[SEP] }
@Override protected void write(JsonGenerator g, JacksonJrsTreeCodec codec) throws IOException { g.writeStartObject(); if (!_values.isEmpty()) { for (Map.Entry<String,JrsValue> entry : _values.entrySet()) { g.writeFieldName(entry.getKey()); codec.writeTree(g, entry.getValue()); } } g.writeEndObject(); }
class class_name[name] begin[{] method[write, return_type[void], modifier[protected], parameter[g, codec]] begin[{] call[g.writeStartObject, parameter[]] if[call[_values.isEmpty, parameter[]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getKey, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=writeFieldName, postfix_operators=[], prefix_operators=[], qualifier=g, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=g, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=entry, selectors=[], type_arguments=None)], member=writeTree, postfix_operators=[], prefix_operators=[], qualifier=codec, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=entrySet, postfix_operators=[], prefix_operators=[], qualifier=_values, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=entry)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Map, sub_type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=JrsValue, sub_type=None))], dimensions=None, name=Entry, sub_type=None)))), label=None) else begin[{] None end[}] call[g.writeEndObject, parameter[]] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[write] operator[SEP] identifier[JsonGenerator] identifier[g] , identifier[JacksonJrsTreeCodec] identifier[codec] operator[SEP] Keyword[throws] identifier[IOException] { identifier[g] operator[SEP] identifier[writeStartObject] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[_values] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[for] operator[SEP] identifier[Map] operator[SEP] identifier[Entry] operator[<] identifier[String] , identifier[JrsValue] operator[>] identifier[entry] operator[:] identifier[_values] operator[SEP] identifier[entrySet] operator[SEP] operator[SEP] operator[SEP] { identifier[g] operator[SEP] identifier[writeFieldName] operator[SEP] identifier[entry] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[codec] operator[SEP] identifier[writeTree] operator[SEP] identifier[g] , identifier[entry] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } identifier[g] operator[SEP] identifier[writeEndObject] operator[SEP] operator[SEP] operator[SEP] }
@Override public SuperToast setOnDismissListener(String tag, @NonNull OnDismissListener onDismissListener) { return super.setOnDismissListener(tag, onDismissListener); }
class class_name[name] begin[{] method[setOnDismissListener, return_type[type[SuperToast]], modifier[public], parameter[tag, onDismissListener]] begin[{] return[SuperMethodInvocation(arguments=[MemberReference(member=tag, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=onDismissListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setOnDismissListener, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None)] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[SuperToast] identifier[setOnDismissListener] operator[SEP] identifier[String] identifier[tag] , annotation[@] identifier[NonNull] identifier[OnDismissListener] identifier[onDismissListener] operator[SEP] { Keyword[return] Keyword[super] operator[SEP] identifier[setOnDismissListener] operator[SEP] identifier[tag] , identifier[onDismissListener] operator[SEP] operator[SEP] }
public SipSession getCorrespondingSipSession(SipSession sipSession, String headerName) { MobicentsSipSession correspondingSipSession = null; if(headerName.equalsIgnoreCase(JoinHeader.NAME)) { correspondingSipSession = joinSession.get(((MobicentsSipSession) sipSession).getKey()); } else if (headerName.equalsIgnoreCase(ReplacesHeader.NAME)) { correspondingSipSession = replacesSession.get(((MobicentsSipSession) sipSession).getKey()); } else { throw new IllegalArgumentException("headerName argument should either be one of Join or Replaces"); } return correspondingSipSession; }
class class_name[name] begin[{] method[getCorrespondingSipSession, return_type[type[SipSession]], modifier[public], parameter[sipSession, headerName]] begin[{] local_variable[type[MobicentsSipSession], correspondingSipSession] if[call[headerName.equalsIgnoreCase, parameter[member[JoinHeader.NAME]]]] begin[{] assign[member[.correspondingSipSession], call[joinSession.get, parameter[Cast(expression=MemberReference(member=sipSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=MobicentsSipSession, sub_type=None))]]] else begin[{] if[call[headerName.equalsIgnoreCase, parameter[member[ReplacesHeader.NAME]]]] begin[{] assign[member[.correspondingSipSession], call[replacesSession.get, parameter[Cast(expression=MemberReference(member=sipSession, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=MobicentsSipSession, sub_type=None))]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="headerName argument should either be one of Join or Replaces")], 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) end[}] end[}] return[member[.correspondingSipSession]] end[}] END[}]
Keyword[public] identifier[SipSession] identifier[getCorrespondingSipSession] operator[SEP] identifier[SipSession] identifier[sipSession] , identifier[String] identifier[headerName] operator[SEP] { identifier[MobicentsSipSession] identifier[correspondingSipSession] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[headerName] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[JoinHeader] operator[SEP] identifier[NAME] operator[SEP] operator[SEP] { identifier[correspondingSipSession] operator[=] identifier[joinSession] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[MobicentsSipSession] operator[SEP] identifier[sipSession] operator[SEP] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[headerName] operator[SEP] identifier[equalsIgnoreCase] operator[SEP] identifier[ReplacesHeader] operator[SEP] identifier[NAME] operator[SEP] operator[SEP] { identifier[correspondingSipSession] operator[=] identifier[replacesSession] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[MobicentsSipSession] operator[SEP] identifier[sipSession] operator[SEP] operator[SEP] identifier[getKey] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[correspondingSipSession] operator[SEP] }
public PurchaseOfferingRequest withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
class class_name[name] begin[{] method[withTags, return_type[type[PurchaseOfferingRequest]], modifier[public], parameter[tags]] begin[{] call[.setTags, parameter[member[.tags]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[PurchaseOfferingRequest] identifier[withTags] operator[SEP] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[tags] operator[SEP] { identifier[setTags] operator[SEP] identifier[tags] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public static CommercePaymentMethodGroupRel findByGroupId_Last( long groupId, OrderByComparator<CommercePaymentMethodGroupRel> orderByComparator) throws com.liferay.commerce.payment.exception.NoSuchPaymentMethodGroupRelException { return getPersistence().findByGroupId_Last(groupId, orderByComparator); }
class class_name[name] begin[{] method[findByGroupId_Last, return_type[type[CommercePaymentMethodGroupRel]], modifier[public static], parameter[groupId, orderByComparator]] begin[{] return[call[.getPersistence, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[CommercePaymentMethodGroupRel] identifier[findByGroupId_Last] operator[SEP] Keyword[long] identifier[groupId] , identifier[OrderByComparator] operator[<] identifier[CommercePaymentMethodGroupRel] operator[>] identifier[orderByComparator] operator[SEP] Keyword[throws] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[payment] operator[SEP] identifier[exception] operator[SEP] identifier[NoSuchPaymentMethodGroupRelException] { Keyword[return] identifier[getPersistence] operator[SEP] operator[SEP] operator[SEP] identifier[findByGroupId_Last] operator[SEP] identifier[groupId] , identifier[orderByComparator] operator[SEP] operator[SEP] }
public AddOns getAddOns(final String planCode) { return doGET(Plan.PLANS_RESOURCE + "/" + planCode + AddOn.ADDONS_RESOURCE, AddOns.class, new QueryParams()); }
class class_name[name] begin[{] method[getAddOns, return_type[type[AddOns]], modifier[public], parameter[planCode]] begin[{] return[call[.doGET, parameter[binary_operation[binary_operation[binary_operation[member[Plan.PLANS_RESOURCE], +, literal["/"]], +, member[.planCode]], +, member[AddOn.ADDONS_RESOURCE]], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AddOns, sub_type=None)), ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=QueryParams, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[AddOns] identifier[getAddOns] operator[SEP] Keyword[final] identifier[String] identifier[planCode] operator[SEP] { Keyword[return] identifier[doGET] operator[SEP] identifier[Plan] operator[SEP] identifier[PLANS_RESOURCE] operator[+] literal[String] operator[+] identifier[planCode] operator[+] identifier[AddOn] operator[SEP] identifier[ADDONS_RESOURCE] , identifier[AddOns] operator[SEP] Keyword[class] , Keyword[new] identifier[QueryParams] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public final void remove(FeatureProvider featurable) { toDelete.add(featurable.getFeature(Identifiable.class).getId()); willDelete = true; }
class class_name[name] begin[{] method[remove, return_type[void], modifier[final public], parameter[featurable]] begin[{] call[toDelete.add, parameter[call[featurable.getFeature, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Identifiable, sub_type=None))]]]] assign[member[.willDelete], literal[true]] end[}] END[}]
Keyword[public] Keyword[final] Keyword[void] identifier[remove] operator[SEP] identifier[FeatureProvider] identifier[featurable] operator[SEP] { identifier[toDelete] operator[SEP] identifier[add] operator[SEP] identifier[featurable] operator[SEP] identifier[getFeature] operator[SEP] identifier[Identifiable] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[willDelete] operator[=] literal[boolean] operator[SEP] }
private void train2(Attribute[] attributes, double[][] x, int[] y) { int n = x.length; int[] nc = new int[k]; for (int i = 0; i < n; i++) { nc[y[i]]++; } int[] y2 = new int[n]; for (int i = 0; i < n; i++) { if (y[i] == 1) { y2[i] = 1; } else { y2[i] = -1; } } double[] h = new double[n]; // current F(x_i) double[] response = new double[n]; // response variable for regression tree. double mu = Math.mean(y2); b = 0.5 * Math.log((1 + mu) / (1 - mu)); for (int i = 0; i < n; i++) { h[i] = b; } int[][] order = SmileUtils.sort(attributes, x); RegressionTree.NodeOutput output = new L2NodeOutput(response); trees = new RegressionTree[ntrees]; int[] perm = new int[n]; int[] samples = new int[n]; for (int i = 0; i < n; i++) { perm[i] = i; } for (int m = 0; m < ntrees; m++) { Arrays.fill(samples, 0); Math.permutate(perm); for (int l = 0; l < k; l++) { int subj = (int) Math.round(nc[l] * subsample); int count = 0; for (int i = 0; i < n && count < subj; i++) { int xi = perm[i]; if (y[xi] == l) { samples[xi] = 1; count++; } } } for (int i = 0; i < n; i++) { response[i] = 2.0 * y2[i] / (1 + Math.exp(2 * y2[i] * h[i])); } trees[m] = new RegressionTree(attributes, x, response, maxNodes, 5, x[0].length, order, samples, output); for (int i = 0; i < n; i++) { h[i] += shrinkage * trees[m].predict(x[i]); } } }
class class_name[name] begin[{] method[train2, return_type[void], modifier[private], parameter[attributes, x, y]] begin[{] local_variable[type[int], n] local_variable[type[int], nc] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MemberReference(member=nc, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]))]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, 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) local_variable[type[int], y2] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=y, 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=1), operator===), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=y2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=['-'], qualifier=None, selectors=[], value=1)), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=y2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, 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) local_variable[type[double], h] local_variable[type[double], response] local_variable[type[double], mu] assign[member[.b], binary_operation[literal[0.5], *, call[Math.log, parameter[binary_operation[binary_operation[literal[1], +, member[.mu]], /, binary_operation[literal[1], -, member[.mu]]]]]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=b, 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=n, 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) local_variable[type[int], order] local_variable[type[RegressionTree], output] assign[member[.trees], ArrayCreator(dimensions=[MemberReference(member=ntrees, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RegressionTree, sub_type=None))] local_variable[type[int], perm] local_variable[type[int], samples] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=perm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, 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) ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=samples, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)], member=fill, postfix_operators=[], prefix_operators=[], qualifier=Arrays, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=perm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=permutate, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MethodInvocation(arguments=[BinaryOperation(operandl=MemberReference(member=nc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=subsample, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=*)], member=round, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), type=BasicType(dimensions=[], name=int)), name=subj)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=count)], modifiers=set(), type=BasicType(dimensions=[], name=int)), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MemberReference(member=perm, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), name=xi)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=xi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operandr=MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=samples, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=xi, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None), StatementExpression(expression=MemberReference(member=count, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operandr=BinaryOperation(operandl=MemberReference(member=count, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=subj, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=l, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=k, 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=l)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=l, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2.0), operandr=MemberReference(member=y2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operandr=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), operandr=MemberReference(member=y2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*), operandr=MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), operator=*)], member=exp, postfix_operators=[], prefix_operators=[], qualifier=Math, selectors=[], type_arguments=None), operator=+), operator=/)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, 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), StatementExpression(expression=Assignment(expressionl=MemberReference(member=trees, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=ClassCreator(arguments=[MemberReference(member=attributes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=response, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=maxNodes, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=5), MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0)), MemberReference(member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=order, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=samples, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=output, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=RegressionTree, sub_type=None))), label=None), ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=h, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=+=, value=BinaryOperation(operandl=MemberReference(member=shrinkage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=trees, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=predict, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), operator=*)), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=n, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=m, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=ntrees, 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=m)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=m, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) end[}] END[}]
Keyword[private] Keyword[void] identifier[train2] operator[SEP] identifier[Attribute] operator[SEP] operator[SEP] identifier[attributes] , Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[x] , Keyword[int] operator[SEP] operator[SEP] identifier[y] operator[SEP] { Keyword[int] identifier[n] operator[=] identifier[x] operator[SEP] identifier[length] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[nc] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[k] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[nc] operator[SEP] identifier[y] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[++] operator[SEP] } Keyword[int] operator[SEP] operator[SEP] identifier[y2] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[if] operator[SEP] identifier[y] operator[SEP] identifier[i] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[y2] operator[SEP] identifier[i] operator[SEP] operator[=] Other[1] operator[SEP] } Keyword[else] { identifier[y2] operator[SEP] identifier[i] operator[SEP] operator[=] operator[-] Other[1] operator[SEP] } } Keyword[double] operator[SEP] operator[SEP] identifier[h] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[response] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[double] identifier[mu] operator[=] identifier[Math] operator[SEP] identifier[mean] operator[SEP] identifier[y2] operator[SEP] operator[SEP] identifier[b] operator[=] literal[Float] operator[*] identifier[Math] operator[SEP] identifier[log] operator[SEP] operator[SEP] Other[1] operator[+] identifier[mu] operator[SEP] operator[/] operator[SEP] Other[1] operator[-] identifier[mu] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[h] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[b] operator[SEP] } Keyword[int] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[order] operator[=] identifier[SmileUtils] operator[SEP] identifier[sort] operator[SEP] identifier[attributes] , identifier[x] operator[SEP] operator[SEP] identifier[RegressionTree] operator[SEP] identifier[NodeOutput] identifier[output] operator[=] Keyword[new] identifier[L2NodeOutput] operator[SEP] identifier[response] operator[SEP] operator[SEP] identifier[trees] operator[=] Keyword[new] identifier[RegressionTree] operator[SEP] identifier[ntrees] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[perm] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[samples] operator[=] Keyword[new] Keyword[int] operator[SEP] identifier[n] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[perm] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[i] operator[SEP] } Keyword[for] operator[SEP] Keyword[int] identifier[m] operator[=] Other[0] operator[SEP] identifier[m] operator[<] identifier[ntrees] operator[SEP] identifier[m] operator[++] operator[SEP] { identifier[Arrays] operator[SEP] identifier[fill] operator[SEP] identifier[samples] , Other[0] operator[SEP] operator[SEP] identifier[Math] operator[SEP] identifier[permutate] operator[SEP] identifier[perm] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[l] operator[=] Other[0] operator[SEP] identifier[l] operator[<] identifier[k] operator[SEP] identifier[l] operator[++] operator[SEP] { Keyword[int] identifier[subj] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[Math] operator[SEP] identifier[round] operator[SEP] identifier[nc] operator[SEP] identifier[l] operator[SEP] operator[*] identifier[subsample] operator[SEP] operator[SEP] Keyword[int] identifier[count] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[&&] identifier[count] operator[<] identifier[subj] operator[SEP] identifier[i] operator[++] operator[SEP] { Keyword[int] identifier[xi] operator[=] identifier[perm] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[y] operator[SEP] identifier[xi] operator[SEP] operator[==] identifier[l] operator[SEP] { identifier[samples] operator[SEP] identifier[xi] operator[SEP] operator[=] Other[1] operator[SEP] identifier[count] operator[++] operator[SEP] } } } Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[response] operator[SEP] identifier[i] operator[SEP] operator[=] literal[Float] operator[*] identifier[y2] operator[SEP] identifier[i] operator[SEP] operator[/] operator[SEP] Other[1] operator[+] identifier[Math] operator[SEP] identifier[exp] operator[SEP] Other[2] operator[*] identifier[y2] operator[SEP] identifier[i] operator[SEP] operator[*] identifier[h] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[trees] operator[SEP] identifier[m] operator[SEP] operator[=] Keyword[new] identifier[RegressionTree] operator[SEP] identifier[attributes] , identifier[x] , identifier[response] , identifier[maxNodes] , Other[5] , identifier[x] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[length] , identifier[order] , identifier[samples] , identifier[output] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[n] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[h] operator[SEP] identifier[i] operator[SEP] operator[+=] identifier[shrinkage] operator[*] identifier[trees] operator[SEP] identifier[m] operator[SEP] operator[SEP] identifier[predict] operator[SEP] identifier[x] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } } }
@Nonnull public static <T1, T2, R> LObjIntObjFunction<T1, T2, R> objIntObjFunctionFrom(Consumer<LObjIntObjFunctionBuilder<T1, T2, R>> buildingFunction) { LObjIntObjFunctionBuilder builder = new LObjIntObjFunctionBuilder(); buildingFunction.accept(builder); return builder.build(); }
class class_name[name] begin[{] method[objIntObjFunctionFrom, return_type[type[LObjIntObjFunction]], modifier[public static], parameter[buildingFunction]] begin[{] local_variable[type[LObjIntObjFunctionBuilder], builder] call[buildingFunction.accept, parameter[member[.builder]]] return[call[builder.build, parameter[]]] end[}] END[}]
annotation[@] identifier[Nonnull] Keyword[public] Keyword[static] operator[<] identifier[T1] , identifier[T2] , identifier[R] operator[>] identifier[LObjIntObjFunction] operator[<] identifier[T1] , identifier[T2] , identifier[R] operator[>] identifier[objIntObjFunctionFrom] operator[SEP] identifier[Consumer] operator[<] identifier[LObjIntObjFunctionBuilder] operator[<] identifier[T1] , identifier[T2] , identifier[R] operator[>] operator[>] identifier[buildingFunction] operator[SEP] { identifier[LObjIntObjFunctionBuilder] identifier[builder] operator[=] Keyword[new] identifier[LObjIntObjFunctionBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[buildingFunction] operator[SEP] identifier[accept] operator[SEP] identifier[builder] operator[SEP] operator[SEP] Keyword[return] identifier[builder] operator[SEP] identifier[build] operator[SEP] operator[SEP] operator[SEP] }
public Set<Class<?>> findAndAddClassesInPackageByFile(String packageName, String packagePath, final boolean recursive) { LOGGER.debug("扫描包{}下、目录{}下的所有class", packageName, packagePath); Set<Class<?>> classes = new LinkedHashSet<>(); // 获取此包的目录 建立一个File File dir = new File(packagePath); // 如果不存在或者 也不是目录就直接返回 if (!dir.exists() || !dir.isDirectory()) { LOGGER.debug("用户定义包名 " + packageName + " 下没有任何文件"); return Collections.emptySet(); } // 如果存在 就获取包下的所有文件 包括目录 File[] dirfiles = dir.listFiles(file -> (recursive && file.isDirectory()) || (file.getName().endsWith("" + "" + ".class"))); if (dirfiles == null || dirfiles.length == 0) { return Collections.emptySet(); } // 循环所有文件 for (File file : dirfiles) { // 如果是目录 则继续扫描 if (file.isDirectory()) { classes.addAll(findAndAddClassesInPackageByFile(packageName + "/" + file.getName(), file.getAbsolutePath(), recursive)); } else { // 如果是java类文件 去掉后面的.class 只留下类名 String className = file.getName().substring(0, file.getName().length() - 6); try { packageName = packageName.replaceAll("/", "."); className = packageName + '.' + className; classes.add(classLoader.loadClass(className)); } catch (Throwable e) { LOGGER.error("添加用户自定义视图类错误 找不到此类的.class文件", e); } } } return classes; }
class class_name[name] begin[{] method[findAndAddClassesInPackageByFile, return_type[type[Set]], modifier[public], parameter[packageName, packagePath, recursive]] begin[{] call[LOGGER.debug, parameter[literal["扫描包{}下、目录{}下的所有class"], member[.packageName], member[.packagePath]]] local_variable[type[Set], classes] local_variable[type[File], dir] if[binary_operation[call[dir.exists, parameter[]], ||, call[dir.isDirectory, parameter[]]]] begin[{] call[LOGGER.debug, parameter[binary_operation[binary_operation[literal["用户定义包名 "], +, member[.packageName]], +, literal[" 下没有任何文件"]]]] return[call[Collections.emptySet, parameter[]]] else begin[{] None end[}] local_variable[type[File], dirfiles] if[binary_operation[binary_operation[member[.dirfiles], ==, literal[null]], ||, binary_operation[member[dirfiles.length], ==, literal[0]]]] begin[{] return[call[Collections.emptySet, parameter[]]] else begin[{] None end[}] ForStatement(body=BlockStatement(label=None, statements=[IfStatement(condition=MethodInvocation(arguments=[], member=isDirectory, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), else_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), BinaryOperation(operandl=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[MethodInvocation(arguments=[], member=length, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=6), operator=-)], member=substring, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=className)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=packageName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".")], member=replaceAll, postfix_operators=[], prefix_operators=[], qualifier=packageName, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=packageName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value='.'), operator=+), operandr=MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=className, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadClass, postfix_operators=[], prefix_operators=[], qualifier=classLoader, selectors=[], type_arguments=None)], member=add, postfix_operators=[], prefix_operators=[], qualifier=classes, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="添加用户自定义视图类错误 找不到此类的.class文件"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=LOGGER, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Throwable']))], finally_block=None, label=None, resources=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=packageName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="/"), operator=+), operandr=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), operator=+), MethodInvocation(arguments=[], member=getAbsolutePath, postfix_operators=[], prefix_operators=[], qualifier=file, selectors=[], type_arguments=None), MemberReference(member=recursive, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findAndAddClassesInPackageByFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=classes, selectors=[], type_arguments=None), label=None)]))]), control=EnhancedForControl(iterable=MemberReference(member=dirfiles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=file)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=File, sub_type=None))), label=None) return[member[.classes]] end[}] END[}]
Keyword[public] identifier[Set] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[findAndAddClassesInPackageByFile] operator[SEP] identifier[String] identifier[packageName] , identifier[String] identifier[packagePath] , Keyword[final] Keyword[boolean] identifier[recursive] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[packageName] , identifier[packagePath] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[classes] operator[=] Keyword[new] identifier[LinkedHashSet] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[File] identifier[dir] operator[=] Keyword[new] identifier[File] operator[SEP] identifier[packagePath] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[dir] operator[SEP] identifier[exists] operator[SEP] operator[SEP] operator[||] operator[!] identifier[dir] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[packageName] operator[+] literal[String] operator[SEP] operator[SEP] Keyword[return] identifier[Collections] operator[SEP] identifier[emptySet] operator[SEP] operator[SEP] operator[SEP] } identifier[File] operator[SEP] operator[SEP] identifier[dirfiles] operator[=] identifier[dir] operator[SEP] identifier[listFiles] operator[SEP] identifier[file] operator[->] operator[SEP] identifier[recursive] operator[&&] identifier[file] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] operator[||] operator[SEP] identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[endsWith] operator[SEP] literal[String] operator[+] literal[String] operator[+] literal[String] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dirfiles] operator[==] Other[null] operator[||] identifier[dirfiles] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] { Keyword[return] identifier[Collections] operator[SEP] identifier[emptySet] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[File] identifier[file] operator[:] identifier[dirfiles] operator[SEP] { Keyword[if] operator[SEP] identifier[file] operator[SEP] identifier[isDirectory] operator[SEP] operator[SEP] operator[SEP] { identifier[classes] operator[SEP] identifier[addAll] operator[SEP] identifier[findAndAddClassesInPackageByFile] operator[SEP] identifier[packageName] operator[+] literal[String] operator[+] identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[file] operator[SEP] identifier[getAbsolutePath] operator[SEP] operator[SEP] , identifier[recursive] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[String] identifier[className] operator[=] identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[file] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[-] Other[6] operator[SEP] operator[SEP] Keyword[try] { identifier[packageName] operator[=] identifier[packageName] operator[SEP] identifier[replaceAll] operator[SEP] literal[String] , literal[String] operator[SEP] operator[SEP] identifier[className] operator[=] identifier[packageName] operator[+] literal[String] operator[+] identifier[className] operator[SEP] identifier[classes] operator[SEP] identifier[add] operator[SEP] identifier[classLoader] operator[SEP] identifier[loadClass] operator[SEP] identifier[className] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Throwable] identifier[e] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } } } Keyword[return] identifier[classes] operator[SEP] }
public void save(OutputStream stream, boolean header, boolean flush) throws IOException { OutputStreamWriter out = new OutputStreamWriter(stream, "UTF-8"); save(out, header, flush); }
class class_name[name] begin[{] method[save, return_type[void], modifier[public], parameter[stream, header, flush]] begin[{] local_variable[type[OutputStreamWriter], out] call[.save, parameter[member[.out], member[.header], member[.flush]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[save] operator[SEP] identifier[OutputStream] identifier[stream] , Keyword[boolean] identifier[header] , Keyword[boolean] identifier[flush] operator[SEP] Keyword[throws] identifier[IOException] { identifier[OutputStreamWriter] identifier[out] operator[=] Keyword[new] identifier[OutputStreamWriter] operator[SEP] identifier[stream] , literal[String] operator[SEP] operator[SEP] identifier[save] operator[SEP] identifier[out] , identifier[header] , identifier[flush] operator[SEP] operator[SEP] }
@SuppressWarnings({"unchecked", "varargs"}) /*public*/ static void handle(final Throwable pThrowable, final ThrowableHandler<? extends Throwable>... pHandlers) { handleImpl(pThrowable, (ThrowableHandler<Throwable>[]) pHandlers); }
class class_name[name] begin[{] method[handle, return_type[void], modifier[static], parameter[pThrowable, pHandlers]] begin[{] call[.handleImpl, parameter[member[.pThrowable], Cast(expression=MemberReference(member=pHandlers, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=Throwable, sub_type=None))], dimensions=[None], name=ThrowableHandler, sub_type=None))]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[static] Keyword[void] identifier[handle] operator[SEP] Keyword[final] identifier[Throwable] identifier[pThrowable] , Keyword[final] identifier[ThrowableHandler] operator[<] operator[?] Keyword[extends] identifier[Throwable] operator[>] operator[...] identifier[pHandlers] operator[SEP] { identifier[handleImpl] operator[SEP] identifier[pThrowable] , operator[SEP] identifier[ThrowableHandler] operator[<] identifier[Throwable] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[pHandlers] operator[SEP] operator[SEP] }
@Override public final synchronized AnycastOutputHandler getAnycastOutputHandler(DestinationDefinition definition, boolean restartFromStaleBackup) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "getAnycastOutputHandler", new Object[] { definition, Boolean.valueOf(restartFromStaleBackup), this }); AnycastOutputHandler anycastOutputHandler = _remoteSupport.getAnycastOutputHandler(definition, restartFromStaleBackup); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(tc, "getAnycastOutputHandler", anycastOutputHandler); return anycastOutputHandler; }
class class_name[name] begin[{] method[getAnycastOutputHandler, return_type[type[AnycastOutputHandler]], modifier[synchronized final public], parameter[definition, restartFromStaleBackup]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[member[.tc], literal["getAnycastOutputHandler"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=definition, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=restartFromStaleBackup, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=valueOf, postfix_operators=[], prefix_operators=[], qualifier=Boolean, selectors=[], type_arguments=None), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] local_variable[type[AnycastOutputHandler], anycastOutputHandler] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[member[.tc], literal["getAnycastOutputHandler"], member[.anycastOutputHandler]]] else begin[{] None end[}] return[member[.anycastOutputHandler]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[final] Keyword[synchronized] identifier[AnycastOutputHandler] identifier[getAnycastOutputHandler] operator[SEP] identifier[DestinationDefinition] identifier[definition] , Keyword[boolean] identifier[restartFromStaleBackup] operator[SEP] { Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[entry] operator[SEP] identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[definition] , identifier[Boolean] operator[SEP] identifier[valueOf] operator[SEP] identifier[restartFromStaleBackup] operator[SEP] , Keyword[this] } operator[SEP] operator[SEP] identifier[AnycastOutputHandler] identifier[anycastOutputHandler] operator[=] identifier[_remoteSupport] operator[SEP] identifier[getAnycastOutputHandler] operator[SEP] identifier[definition] , identifier[restartFromStaleBackup] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] identifier[tc] , literal[String] , identifier[anycastOutputHandler] operator[SEP] operator[SEP] Keyword[return] identifier[anycastOutputHandler] operator[SEP] }
public Packer fillx(final double wtx) { gc.fill = GridBagConstraints.HORIZONTAL; gc.weightx = wtx; setConstraints(comp, gc); return this; }
class class_name[name] begin[{] method[fillx, return_type[type[Packer]], modifier[public], parameter[wtx]] begin[{] assign[member[gc.fill], member[GridBagConstraints.HORIZONTAL]] assign[member[gc.weightx], member[.wtx]] call[.setConstraints, parameter[member[.comp], member[.gc]]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Packer] identifier[fillx] operator[SEP] Keyword[final] Keyword[double] identifier[wtx] operator[SEP] { identifier[gc] operator[SEP] identifier[fill] operator[=] identifier[GridBagConstraints] operator[SEP] identifier[HORIZONTAL] operator[SEP] identifier[gc] operator[SEP] identifier[weightx] operator[=] identifier[wtx] operator[SEP] identifier[setConstraints] operator[SEP] identifier[comp] , identifier[gc] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public ApiResponse<List<CorporationCustomsOfficesResponse>> getCorporationsCorporationIdCustomsOfficesWithHttpInfo( Integer corporationId, String datasource, String ifNoneMatch, Integer page, String token) throws ApiException { com.squareup.okhttp.Call call = getCorporationsCorporationIdCustomsOfficesValidateBeforeCall(corporationId, datasource, ifNoneMatch, page, token, null); Type localVarReturnType = new TypeToken<List<CorporationCustomsOfficesResponse>>() { }.getType(); return apiClient.execute(call, localVarReturnType); }
class class_name[name] begin[{] method[getCorporationsCorporationIdCustomsOfficesWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[corporationId, datasource, ifNoneMatch, page, token]] begin[{] local_variable[type[com], call] local_variable[type[Type], localVarReturnType] return[call[apiClient.execute, parameter[member[.call], member[.localVarReturnType]]]] end[}] END[}]
Keyword[public] identifier[ApiResponse] operator[<] identifier[List] operator[<] identifier[CorporationCustomsOfficesResponse] operator[>] operator[>] identifier[getCorporationsCorporationIdCustomsOfficesWithHttpInfo] operator[SEP] identifier[Integer] identifier[corporationId] , identifier[String] identifier[datasource] , identifier[String] identifier[ifNoneMatch] , identifier[Integer] identifier[page] , identifier[String] identifier[token] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[getCorporationsCorporationIdCustomsOfficesValidateBeforeCall] operator[SEP] identifier[corporationId] , identifier[datasource] , identifier[ifNoneMatch] , identifier[page] , identifier[token] , Other[null] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[List] operator[<] identifier[CorporationCustomsOfficesResponse] operator[>] operator[>] operator[SEP] operator[SEP] { } operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[apiClient] operator[SEP] identifier[execute] operator[SEP] identifier[call] , identifier[localVarReturnType] operator[SEP] operator[SEP] }
@Override public DisassociateResolverEndpointIpAddressResult disassociateResolverEndpointIpAddress(DisassociateResolverEndpointIpAddressRequest request) { request = beforeClientExecution(request); return executeDisassociateResolverEndpointIpAddress(request); }
class class_name[name] begin[{] method[disassociateResolverEndpointIpAddress, return_type[type[DisassociateResolverEndpointIpAddressResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeDisassociateResolverEndpointIpAddress, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[DisassociateResolverEndpointIpAddressResult] identifier[disassociateResolverEndpointIpAddress] operator[SEP] identifier[DisassociateResolverEndpointIpAddressRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeDisassociateResolverEndpointIpAddress] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
public static void validateXMLSchema(InputStream xsdStream, InputStream xmlStream) throws IOException, SAXException { SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); Schema schema = factory.newSchema(new StreamSource(xsdStream)); Validator validator = schema.newValidator(); validator.validate(new StreamSource(xmlStream)); }
class class_name[name] begin[{] method[validateXMLSchema, return_type[void], modifier[public static], parameter[xsdStream, xmlStream]] begin[{] local_variable[type[SchemaFactory], factory] local_variable[type[Schema], schema] local_variable[type[Validator], validator] call[validator.validate, parameter[ClassCreator(arguments=[MemberReference(member=xmlStream, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StreamSource, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[validateXMLSchema] operator[SEP] identifier[InputStream] identifier[xsdStream] , identifier[InputStream] identifier[xmlStream] operator[SEP] Keyword[throws] identifier[IOException] , identifier[SAXException] { identifier[SchemaFactory] identifier[factory] operator[=] identifier[SchemaFactory] operator[SEP] identifier[newInstance] operator[SEP] identifier[XMLConstants] operator[SEP] identifier[W3C_XML_SCHEMA_NS_URI] operator[SEP] operator[SEP] identifier[Schema] identifier[schema] operator[=] identifier[factory] operator[SEP] identifier[newSchema] operator[SEP] Keyword[new] identifier[StreamSource] operator[SEP] identifier[xsdStream] operator[SEP] operator[SEP] operator[SEP] identifier[Validator] identifier[validator] operator[=] identifier[schema] operator[SEP] identifier[newValidator] operator[SEP] operator[SEP] operator[SEP] identifier[validator] operator[SEP] identifier[validate] operator[SEP] Keyword[new] identifier[StreamSource] operator[SEP] identifier[xmlStream] operator[SEP] operator[SEP] operator[SEP] }
@Override public void setActive(boolean active) { super.setActive(active); if (this.gitFlowGraphMonitor != null) { this.gitFlowGraphMonitor.setActive(active); } }
class class_name[name] begin[{] method[setActive, return_type[void], modifier[public], parameter[active]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=active, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setActive, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) if[binary_operation[THIS[member[None.gitFlowGraphMonitor]], !=, literal[null]]] begin[{] THIS[member[None.gitFlowGraphMonitor]call[None.setActive, parameter[member[.active]]]] else begin[{] None end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setActive] operator[SEP] Keyword[boolean] identifier[active] operator[SEP] { Keyword[super] operator[SEP] identifier[setActive] operator[SEP] identifier[active] operator[SEP] operator[SEP] Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[gitFlowGraphMonitor] operator[!=] Other[null] operator[SEP] { Keyword[this] operator[SEP] identifier[gitFlowGraphMonitor] operator[SEP] identifier[setActive] operator[SEP] identifier[active] operator[SEP] operator[SEP] } }
protected static void printDataSet(DataSet dataSet) { final String SPACER = "| \t |"; if (dataSet == null) System.out.println("DataSet is null"); if (dataSet.getRowCount() == 0) System.out.println("DataSet is empty"); List<DataColumn> dataSetColumns = dataSet.getColumns(); int colColunt = dataSetColumns.size(); int rowCount = dataSet.getRowCount(); System.out.println("********************************************************************************************************************************************************"); for (int row = 0; row < rowCount; row++) { System.out.print(SPACER); for (int col= 0; col< colColunt; col++) { Object value = dataSet.getValueAt(row, col); String colId = dataSet.getColumnByIndex(col).getId(); System.out.print(colId + ": " + value); System.out.print(SPACER); } System.out.println(""); } System.out.println("********************************************************************************************************************************************************"); }
class class_name[name] begin[{] method[printDataSet, return_type[void], modifier[static protected], parameter[dataSet]] begin[{] local_variable[type[String], SPACER] if[binary_operation[member[.dataSet], ==, literal[null]]] begin[{] call[System.out.println, parameter[literal["DataSet is null"]]] else begin[{] None end[}] if[binary_operation[call[dataSet.getRowCount, parameter[]], ==, literal[0]]] begin[{] call[System.out.println, parameter[literal["DataSet is empty"]]] else begin[{] None end[}] local_variable[type[List], dataSetColumns] local_variable[type[int], colColunt] local_variable[type[int], rowCount] call[System.out.println, parameter[literal["********************************************************************************************************************************************************"]]] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SPACER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=print, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getValueAt, postfix_operators=[], prefix_operators=[], qualifier=dataSet, selectors=[], type_arguments=None), name=value)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Object, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getColumnByIndex, postfix_operators=[], prefix_operators=[], qualifier=dataSet, selectors=[MethodInvocation(arguments=[], member=getId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), name=colId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=colId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=": "), operator=+), operandr=MemberReference(member=value, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], member=print, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=SPACER, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=print, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=col, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=colColunt, 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=col)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=col, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="")], member=println, postfix_operators=[], prefix_operators=[], qualifier=System.out, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=row, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=rowCount, 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=row)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=row, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[System.out.println, parameter[literal["********************************************************************************************************************************************************"]]] end[}] END[}]
Keyword[protected] Keyword[static] Keyword[void] identifier[printDataSet] operator[SEP] identifier[DataSet] identifier[dataSet] operator[SEP] { Keyword[final] identifier[String] identifier[SPACER] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[dataSet] operator[==] Other[null] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[dataSet] operator[SEP] identifier[getRowCount] operator[SEP] operator[SEP] operator[==] Other[0] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[DataColumn] operator[>] identifier[dataSetColumns] operator[=] identifier[dataSet] operator[SEP] identifier[getColumns] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[colColunt] operator[=] identifier[dataSetColumns] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[rowCount] operator[=] identifier[dataSet] operator[SEP] identifier[getRowCount] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[row] operator[=] Other[0] operator[SEP] identifier[row] operator[<] identifier[rowCount] operator[SEP] identifier[row] operator[++] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[SPACER] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[col] operator[=] Other[0] operator[SEP] identifier[col] operator[<] identifier[colColunt] operator[SEP] identifier[col] operator[++] operator[SEP] { identifier[Object] identifier[value] operator[=] identifier[dataSet] operator[SEP] identifier[getValueAt] operator[SEP] identifier[row] , identifier[col] operator[SEP] operator[SEP] identifier[String] identifier[colId] operator[=] identifier[dataSet] operator[SEP] identifier[getColumnByIndex] operator[SEP] identifier[col] operator[SEP] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[colId] operator[+] literal[String] operator[+] identifier[value] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[print] operator[SEP] identifier[SPACER] operator[SEP] operator[SEP] } identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] } identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[SEP] operator[SEP] }
public T nextInSequence() { T result = null; // Loop until a filtered element is found, or the source iterator is exhausted. while (source.hasNext()) { S next = source.next(); result = mapping.apply(next); if (result != null) { break; } } return result; }
class class_name[name] begin[{] method[nextInSequence, return_type[type[T]], modifier[public], parameter[]] begin[{] local_variable[type[T], result] while[call[source.hasNext, parameter[]]] begin[{] local_variable[type[S], next] assign[member[.result], call[mapping.apply, parameter[member[.next]]]] if[binary_operation[member[.result], !=, literal[null]]] begin[{] BreakStatement(goto=None, label=None) else begin[{] None end[}] end[}] return[member[.result]] end[}] END[}]
Keyword[public] identifier[T] identifier[nextInSequence] operator[SEP] operator[SEP] { identifier[T] identifier[result] operator[=] Other[null] operator[SEP] Keyword[while] operator[SEP] identifier[source] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[S] identifier[next] operator[=] identifier[source] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[result] operator[=] identifier[mapping] operator[SEP] identifier[apply] operator[SEP] identifier[next] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[!=] Other[null] operator[SEP] { Keyword[break] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
public static HttpConnection connect(String requestMethod, URL url, String contentType) { return new HttpConnection(requestMethod, url, contentType); }
class class_name[name] begin[{] method[connect, return_type[type[HttpConnection]], modifier[public static], parameter[requestMethod, url, contentType]] begin[{] return[ClassCreator(arguments=[MemberReference(member=requestMethod, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=url, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=contentType, 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=HttpConnection, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] identifier[HttpConnection] identifier[connect] operator[SEP] identifier[String] identifier[requestMethod] , identifier[URL] identifier[url] , identifier[String] identifier[contentType] operator[SEP] { Keyword[return] Keyword[new] identifier[HttpConnection] operator[SEP] identifier[requestMethod] , identifier[url] , identifier[contentType] operator[SEP] operator[SEP] }