code
stringlengths
63
466k
code_sememe
stringlengths
141
3.79M
token_type
stringlengths
274
1.23M
public void check(String locator) { getDispatcher().beforeCheck(this, locator); this.check(); validatePresenceOfAlert(); WebDriverWaitUtils.waitUntilElementIsPresent(locator); getDispatcher().afterUncheck(this, locator); }
class class_name[name] begin[{] method[check, return_type[void], modifier[public], parameter[locator]] begin[{] call[.getDispatcher, parameter[]] THIS[call[None.check, parameter[]]] call[.validatePresenceOfAlert, parameter[]] call[WebDriverWaitUtils.waitUntilElementIsPresent, parameter[member[.locator]]] call[.getDispatcher, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[check] operator[SEP] identifier[String] identifier[locator] operator[SEP] { identifier[getDispatcher] operator[SEP] operator[SEP] operator[SEP] identifier[beforeCheck] operator[SEP] Keyword[this] , identifier[locator] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[check] operator[SEP] operator[SEP] operator[SEP] identifier[validatePresenceOfAlert] operator[SEP] operator[SEP] operator[SEP] identifier[WebDriverWaitUtils] operator[SEP] identifier[waitUntilElementIsPresent] operator[SEP] identifier[locator] operator[SEP] operator[SEP] identifier[getDispatcher] operator[SEP] operator[SEP] operator[SEP] identifier[afterUncheck] operator[SEP] Keyword[this] , identifier[locator] operator[SEP] operator[SEP] }
public void addFlush() { // There is no need to process all entries if there was already a flush before and no new messages // where added in the meantime. // // See https://github.com/netty/netty/issues/2577 Entry entry = unflushedEntry; if (entry != null) { if (flushedEntry == null) { // there is no flushedEntry yet, so start with the entry flushedEntry = entry; } do { flushed ++; if (!entry.promise.setUncancellable()) { // Was cancelled so make sure we free up memory and notify about the freed bytes int pending = entry.cancel(); decrementPendingOutboundBytes(pending, false, true); } entry = entry.next; } while (entry != null); // All flushed so reset unflushedEntry unflushedEntry = null; } }
class class_name[name] begin[{] method[addFlush, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[Entry], entry] if[binary_operation[member[.entry], !=, literal[null]]] begin[{] if[binary_operation[member[.flushedEntry], ==, literal[null]]] begin[{] assign[member[.flushedEntry], member[.entry]] else begin[{] None end[}] do[binary_operation[member[.entry], !=, literal[null]]] begin[{] member[.flushed] if[call[entry.promise.setUncancellable, parameter[]]] begin[{] local_variable[type[int], pending] call[.decrementPendingOutboundBytes, parameter[member[.pending], literal[false], literal[true]]] else begin[{] None end[}] assign[member[.entry], member[entry.next]] end[}] assign[member[.unflushedEntry], literal[null]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[addFlush] operator[SEP] operator[SEP] { identifier[Entry] identifier[entry] operator[=] identifier[unflushedEntry] operator[SEP] Keyword[if] operator[SEP] identifier[entry] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[flushedEntry] operator[==] Other[null] operator[SEP] { identifier[flushedEntry] operator[=] identifier[entry] operator[SEP] } Keyword[do] { identifier[flushed] operator[++] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[entry] operator[SEP] identifier[promise] operator[SEP] identifier[setUncancellable] operator[SEP] operator[SEP] operator[SEP] { Keyword[int] identifier[pending] operator[=] identifier[entry] operator[SEP] identifier[cancel] operator[SEP] operator[SEP] operator[SEP] identifier[decrementPendingOutboundBytes] operator[SEP] identifier[pending] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] } identifier[entry] operator[=] identifier[entry] operator[SEP] identifier[next] operator[SEP] } Keyword[while] operator[SEP] identifier[entry] operator[!=] Other[null] operator[SEP] operator[SEP] identifier[unflushedEntry] operator[=] Other[null] operator[SEP] } }
@Override public GetSMSAttributesResult getSMSAttributes(GetSMSAttributesRequest request) { request = beforeClientExecution(request); return executeGetSMSAttributes(request); }
class class_name[name] begin[{] method[getSMSAttributes, return_type[type[GetSMSAttributesResult]], modifier[public], parameter[request]] begin[{] assign[member[.request], call[.beforeClientExecution, parameter[member[.request]]]] return[call[.executeGetSMSAttributes, parameter[member[.request]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[GetSMSAttributesResult] identifier[getSMSAttributes] operator[SEP] identifier[GetSMSAttributesRequest] identifier[request] operator[SEP] { identifier[request] operator[=] identifier[beforeClientExecution] operator[SEP] identifier[request] operator[SEP] operator[SEP] Keyword[return] identifier[executeGetSMSAttributes] operator[SEP] identifier[request] operator[SEP] operator[SEP] }
@Override public Long rpush(final byte[] key, final byte[]... strings) { checkIsInMultiOrPipeline(); client.rpush(key, strings); return client.getIntegerReply(); }
class class_name[name] begin[{] method[rpush, return_type[type[Long]], modifier[public], parameter[key, strings]] begin[{] call[.checkIsInMultiOrPipeline, parameter[]] call[client.rpush, parameter[member[.key], member[.strings]]] return[call[client.getIntegerReply, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Long] identifier[rpush] operator[SEP] Keyword[final] Keyword[byte] operator[SEP] operator[SEP] identifier[key] , Keyword[final] Keyword[byte] operator[SEP] operator[SEP] operator[...] identifier[strings] operator[SEP] { identifier[checkIsInMultiOrPipeline] operator[SEP] operator[SEP] operator[SEP] identifier[client] operator[SEP] identifier[rpush] operator[SEP] identifier[key] , identifier[strings] operator[SEP] operator[SEP] Keyword[return] identifier[client] operator[SEP] identifier[getIntegerReply] operator[SEP] operator[SEP] operator[SEP] }
public static void writeField(final Field field, final Object target, final Object value) throws IllegalAccessException { writeField(field, target, value, false); }
class class_name[name] begin[{] method[writeField, return_type[void], modifier[public static], parameter[field, target, value]] begin[{] call[.writeField, parameter[member[.field], member[.target], member[.value], literal[false]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[writeField] operator[SEP] Keyword[final] identifier[Field] identifier[field] , Keyword[final] identifier[Object] identifier[target] , Keyword[final] identifier[Object] identifier[value] operator[SEP] Keyword[throws] identifier[IllegalAccessException] { identifier[writeField] operator[SEP] identifier[field] , identifier[target] , identifier[value] , literal[boolean] operator[SEP] operator[SEP] }
public static String guessMimeTypeFromExtension(String extension) { if (extension == null || extension.isEmpty()) { return null; } return extensionToMimeTypeMap.get(extension); }
class class_name[name] begin[{] method[guessMimeTypeFromExtension, return_type[type[String]], modifier[public static], parameter[extension]] begin[{] if[binary_operation[binary_operation[member[.extension], ==, literal[null]], ||, call[extension.isEmpty, parameter[]]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[extensionToMimeTypeMap.get, parameter[member[.extension]]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[guessMimeTypeFromExtension] operator[SEP] identifier[String] identifier[extension] operator[SEP] { Keyword[if] operator[SEP] identifier[extension] operator[==] Other[null] operator[||] identifier[extension] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[extensionToMimeTypeMap] operator[SEP] identifier[get] operator[SEP] identifier[extension] operator[SEP] operator[SEP] }
public TaskCounts getTaskCounts(String jobId, Iterable<BatchClientBehavior> additionalBehaviors) throws BatchErrorException, IOException { JobGetTaskCountsOptions options = new JobGetTaskCountsOptions(); BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors); bhMgr.applyRequestBehaviors(options); return this.parentBatchClient.protocolLayer().jobs().getTaskCounts(jobId, options); }
class class_name[name] begin[{] method[getTaskCounts, return_type[type[TaskCounts]], modifier[public], parameter[jobId, additionalBehaviors]] begin[{] local_variable[type[JobGetTaskCountsOptions], options] local_variable[type[BehaviorManager], bhMgr] call[bhMgr.applyRequestBehaviors, parameter[member[.options]]] return[THIS[member[None.parentBatchClient]call[None.protocolLayer, parameter[]]call[None.jobs, parameter[]]call[None.getTaskCounts, parameter[member[.jobId], member[.options]]]]] end[}] END[}]
Keyword[public] identifier[TaskCounts] identifier[getTaskCounts] operator[SEP] identifier[String] identifier[jobId] , identifier[Iterable] operator[<] identifier[BatchClientBehavior] operator[>] identifier[additionalBehaviors] operator[SEP] Keyword[throws] identifier[BatchErrorException] , identifier[IOException] { identifier[JobGetTaskCountsOptions] identifier[options] operator[=] Keyword[new] identifier[JobGetTaskCountsOptions] operator[SEP] operator[SEP] operator[SEP] identifier[BehaviorManager] identifier[bhMgr] operator[=] Keyword[new] identifier[BehaviorManager] operator[SEP] Keyword[this] operator[SEP] identifier[customBehaviors] operator[SEP] operator[SEP] , identifier[additionalBehaviors] operator[SEP] operator[SEP] identifier[bhMgr] operator[SEP] identifier[applyRequestBehaviors] operator[SEP] identifier[options] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] identifier[parentBatchClient] operator[SEP] identifier[protocolLayer] operator[SEP] operator[SEP] operator[SEP] identifier[jobs] operator[SEP] operator[SEP] operator[SEP] identifier[getTaskCounts] operator[SEP] identifier[jobId] , identifier[options] operator[SEP] operator[SEP] }
public String convertIfcWorkScheduleTypeEnumToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); }
class class_name[name] begin[{] method[convertIfcWorkScheduleTypeEnumToString, return_type[type[String]], modifier[public], parameter[eDataType, instanceValue]] begin[{] return[TernaryExpression(condition=BinaryOperation(operandl=MemberReference(member=instanceValue, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), if_false=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=instanceValue, selectors=[], type_arguments=None), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null))] end[}] END[}]
Keyword[public] identifier[String] identifier[convertIfcWorkScheduleTypeEnumToString] operator[SEP] identifier[EDataType] identifier[eDataType] , identifier[Object] identifier[instanceValue] operator[SEP] { Keyword[return] identifier[instanceValue] operator[==] Other[null] operator[?] Other[null] operator[:] identifier[instanceValue] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public static PdfAction createSubmitForm(String file, Object names[], int flags) { PdfAction action = new PdfAction(); action.put(PdfName.S, PdfName.SUBMITFORM); PdfDictionary dic = new PdfDictionary(); dic.put(PdfName.F, new PdfString(file)); dic.put(PdfName.FS, PdfName.URL); action.put(PdfName.F, dic); if (names != null) action.put(PdfName.FIELDS, buildArray(names)); action.put(PdfName.FLAGS, new PdfNumber(flags)); return action; }
class class_name[name] begin[{] method[createSubmitForm, return_type[type[PdfAction]], modifier[public static], parameter[file, names, flags]] begin[{] local_variable[type[PdfAction], action] call[action.put, parameter[member[PdfName.S], member[PdfName.SUBMITFORM]]] local_variable[type[PdfDictionary], dic] call[dic.put, parameter[member[PdfName.F], ClassCreator(arguments=[MemberReference(member=file, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PdfString, sub_type=None))]] call[dic.put, parameter[member[PdfName.FS], member[PdfName.URL]]] call[action.put, parameter[member[PdfName.F], member[.dic]]] if[binary_operation[member[.names], !=, literal[null]]] begin[{] call[action.put, parameter[member[PdfName.FIELDS], call[.buildArray, parameter[member[.names]]]]] else begin[{] None end[}] call[action.put, parameter[member[PdfName.FLAGS], ClassCreator(arguments=[MemberReference(member=flags, 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=PdfNumber, sub_type=None))]] return[member[.action]] end[}] END[}]
Keyword[public] Keyword[static] identifier[PdfAction] identifier[createSubmitForm] operator[SEP] identifier[String] identifier[file] , identifier[Object] identifier[names] operator[SEP] operator[SEP] , Keyword[int] identifier[flags] operator[SEP] { identifier[PdfAction] identifier[action] operator[=] Keyword[new] identifier[PdfAction] operator[SEP] operator[SEP] operator[SEP] identifier[action] operator[SEP] identifier[put] operator[SEP] identifier[PdfName] operator[SEP] identifier[S] , identifier[PdfName] operator[SEP] identifier[SUBMITFORM] operator[SEP] operator[SEP] identifier[PdfDictionary] identifier[dic] operator[=] Keyword[new] identifier[PdfDictionary] operator[SEP] operator[SEP] operator[SEP] identifier[dic] operator[SEP] identifier[put] operator[SEP] identifier[PdfName] operator[SEP] identifier[F] , Keyword[new] identifier[PdfString] operator[SEP] identifier[file] operator[SEP] operator[SEP] operator[SEP] identifier[dic] operator[SEP] identifier[put] operator[SEP] identifier[PdfName] operator[SEP] identifier[FS] , identifier[PdfName] operator[SEP] identifier[URL] operator[SEP] operator[SEP] identifier[action] operator[SEP] identifier[put] operator[SEP] identifier[PdfName] operator[SEP] identifier[F] , identifier[dic] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[names] operator[!=] Other[null] operator[SEP] identifier[action] operator[SEP] identifier[put] operator[SEP] identifier[PdfName] operator[SEP] identifier[FIELDS] , identifier[buildArray] operator[SEP] identifier[names] operator[SEP] operator[SEP] operator[SEP] identifier[action] operator[SEP] identifier[put] operator[SEP] identifier[PdfName] operator[SEP] identifier[FLAGS] , Keyword[new] identifier[PdfNumber] operator[SEP] identifier[flags] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[action] operator[SEP] }
public List<MeasureDto> selectPastMeasures(DbSession dbSession, PastMeasureQuery query) { return mapper(dbSession).selectPastMeasuresOnSeveralAnalyses(query); }
class class_name[name] begin[{] method[selectPastMeasures, return_type[type[List]], modifier[public], parameter[dbSession, query]] begin[{] return[call[.mapper, parameter[member[.dbSession]]]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[MeasureDto] operator[>] identifier[selectPastMeasures] operator[SEP] identifier[DbSession] identifier[dbSession] , identifier[PastMeasureQuery] identifier[query] operator[SEP] { Keyword[return] identifier[mapper] operator[SEP] identifier[dbSession] operator[SEP] operator[SEP] identifier[selectPastMeasuresOnSeveralAnalyses] operator[SEP] identifier[query] operator[SEP] operator[SEP] }
public static Certificate readCertificate(String type, InputStream in) { try { return getCertificateFactory(type).generateCertificate(in); } catch (CertificateException e) { throw new CryptoException(e); } }
class class_name[name] begin[{] method[readCertificate, return_type[type[Certificate]], modifier[public static], parameter[type, in]] begin[{] TryStatement(block=[ReturnStatement(expression=MethodInvocation(arguments=[MemberReference(member=type, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getCertificateFactory, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[MemberReference(member=in, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=generateCertificate, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=CryptoException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CertificateException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[static] identifier[Certificate] identifier[readCertificate] operator[SEP] identifier[String] identifier[type] , identifier[InputStream] identifier[in] operator[SEP] { Keyword[try] { Keyword[return] identifier[getCertificateFactory] operator[SEP] identifier[type] operator[SEP] operator[SEP] identifier[generateCertificate] operator[SEP] identifier[in] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CertificateException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[CryptoException] operator[SEP] identifier[e] operator[SEP] operator[SEP] } }
public CertificateAuthSettings x509HostnameVerifier(X509HostnameVerifier x509HostnameVerifier) { return new CertificateAuthSettings(keystoreType, trustStoreType, port, trustStore, keyStore, x509HostnameVerifier, sslSocketFactory); }
class class_name[name] begin[{] method[x509HostnameVerifier, return_type[type[CertificateAuthSettings]], modifier[public], parameter[x509HostnameVerifier]] begin[{] return[ClassCreator(arguments=[MemberReference(member=keystoreType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=trustStoreType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=port, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=trustStore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=keyStore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=x509HostnameVerifier, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sslSocketFactory, 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=CertificateAuthSettings, sub_type=None))] end[}] END[}]
Keyword[public] identifier[CertificateAuthSettings] identifier[x509HostnameVerifier] operator[SEP] identifier[X509HostnameVerifier] identifier[x509HostnameVerifier] operator[SEP] { Keyword[return] Keyword[new] identifier[CertificateAuthSettings] operator[SEP] identifier[keystoreType] , identifier[trustStoreType] , identifier[port] , identifier[trustStore] , identifier[keyStore] , identifier[x509HostnameVerifier] , identifier[sslSocketFactory] operator[SEP] operator[SEP] }
public org.glassfish.jersey.server.monitoring.RequestEvent.ExceptionCause getExceptionCause() { return event.getExceptionCause(); }
class class_name[name] begin[{] method[getExceptionCause, return_type[type[org]], modifier[public], parameter[]] begin[{] return[call[event.getExceptionCause, parameter[]]] end[}] END[}]
Keyword[public] identifier[org] operator[SEP] identifier[glassfish] operator[SEP] identifier[jersey] operator[SEP] identifier[server] operator[SEP] identifier[monitoring] operator[SEP] identifier[RequestEvent] operator[SEP] identifier[ExceptionCause] identifier[getExceptionCause] operator[SEP] operator[SEP] { Keyword[return] identifier[event] operator[SEP] identifier[getExceptionCause] operator[SEP] operator[SEP] operator[SEP] }
private void executeTaskAsync() { final String taskId = currentTask.getId(); ListenableFuture<?> future = taskExecutorService.submit(currentTask); pendingTasks.put(taskId, future); future.addListener(new Runnable() { @Override public void run() { pendingTasks.remove(taskId); } }, MoreExecutors.sameThreadExecutor()); hasCurrentTask = false; }
class class_name[name] begin[{] method[executeTaskAsync, return_type[void], modifier[private], parameter[]] begin[{] local_variable[type[String], taskId] local_variable[type[ListenableFuture], future] call[pendingTasks.put, parameter[member[.taskId], member[.future]]] call[future.addListener, parameter[ClassCreator(arguments=[], body=[MethodDeclaration(annotations=[Annotation(element=None, name=Override)], body=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=taskId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=remove, postfix_operators=[], prefix_operators=[], qualifier=pendingTasks, selectors=[], type_arguments=None), label=None)], documentation=None, modifiers={'public'}, name=run, parameters=[], return_type=None, throws=None, type_parameters=None)], constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Runnable, sub_type=None)), call[MoreExecutors.sameThreadExecutor, parameter[]]]] assign[member[.hasCurrentTask], literal[false]] end[}] END[}]
Keyword[private] Keyword[void] identifier[executeTaskAsync] operator[SEP] operator[SEP] { Keyword[final] identifier[String] identifier[taskId] operator[=] identifier[currentTask] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] identifier[ListenableFuture] operator[<] operator[?] operator[>] identifier[future] operator[=] identifier[taskExecutorService] operator[SEP] identifier[submit] operator[SEP] identifier[currentTask] operator[SEP] operator[SEP] identifier[pendingTasks] operator[SEP] identifier[put] operator[SEP] identifier[taskId] , identifier[future] operator[SEP] operator[SEP] identifier[future] operator[SEP] identifier[addListener] operator[SEP] Keyword[new] identifier[Runnable] operator[SEP] operator[SEP] { annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[run] operator[SEP] operator[SEP] { identifier[pendingTasks] operator[SEP] identifier[remove] operator[SEP] identifier[taskId] operator[SEP] operator[SEP] } } , identifier[MoreExecutors] operator[SEP] identifier[sameThreadExecutor] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[hasCurrentTask] operator[=] literal[boolean] operator[SEP] }
public void subscribe(final Class<? extends Notification> notificationClass, final Subscription subscription) { if (!SUBSCRIPTION_MAP.containsKey(notificationClass)) { SUBSCRIPTION_MAP.put(notificationClass, new ArrayList<>()); } final ArrayList<Subscription> subscriptions = SUBSCRIPTION_MAP.get(notificationClass); if (!subscriptions.contains(subscription)) { subscriptions.add(subscription); } }
class class_name[name] begin[{] method[subscribe, return_type[void], modifier[public], parameter[notificationClass, subscription]] begin[{] if[call[SUBSCRIPTION_MAP.containsKey, parameter[member[.notificationClass]]]] begin[{] call[SUBSCRIPTION_MAP.put, parameter[member[.notificationClass], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=ArrayList, sub_type=None))]] else begin[{] None end[}] local_variable[type[ArrayList], subscriptions] if[call[subscriptions.contains, parameter[member[.subscription]]]] begin[{] call[subscriptions.add, parameter[member[.subscription]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[subscribe] operator[SEP] Keyword[final] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[Notification] operator[>] identifier[notificationClass] , Keyword[final] identifier[Subscription] identifier[subscription] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[SUBSCRIPTION_MAP] operator[SEP] identifier[containsKey] operator[SEP] identifier[notificationClass] operator[SEP] operator[SEP] { identifier[SUBSCRIPTION_MAP] operator[SEP] identifier[put] operator[SEP] identifier[notificationClass] , Keyword[new] identifier[ArrayList] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[final] identifier[ArrayList] operator[<] identifier[Subscription] operator[>] identifier[subscriptions] operator[=] identifier[SUBSCRIPTION_MAP] operator[SEP] identifier[get] operator[SEP] identifier[notificationClass] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[subscriptions] operator[SEP] identifier[contains] operator[SEP] identifier[subscription] operator[SEP] operator[SEP] { identifier[subscriptions] operator[SEP] identifier[add] operator[SEP] identifier[subscription] operator[SEP] operator[SEP] } }
public AwsSecurityFindingFilters withNetworkDestinationPort(NumberFilter... networkDestinationPort) { if (this.networkDestinationPort == null) { setNetworkDestinationPort(new java.util.ArrayList<NumberFilter>(networkDestinationPort.length)); } for (NumberFilter ele : networkDestinationPort) { this.networkDestinationPort.add(ele); } return this; }
class class_name[name] begin[{] method[withNetworkDestinationPort, return_type[type[AwsSecurityFindingFilters]], modifier[public], parameter[networkDestinationPort]] begin[{] if[binary_operation[THIS[member[None.networkDestinationPort]], ==, literal[null]]] begin[{] call[.setNetworkDestinationPort, parameter[ClassCreator(arguments=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=networkDestinationPort, 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=NumberFilter, 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=networkDestinationPort, 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=networkDestinationPort, 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=NumberFilter, sub_type=None))), label=None) return[THIS[]] end[}] END[}]
Keyword[public] identifier[AwsSecurityFindingFilters] identifier[withNetworkDestinationPort] operator[SEP] identifier[NumberFilter] operator[...] identifier[networkDestinationPort] operator[SEP] { Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[networkDestinationPort] operator[==] Other[null] operator[SEP] { identifier[setNetworkDestinationPort] operator[SEP] Keyword[new] identifier[java] operator[SEP] identifier[util] operator[SEP] identifier[ArrayList] operator[<] identifier[NumberFilter] operator[>] operator[SEP] identifier[networkDestinationPort] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] } Keyword[for] operator[SEP] identifier[NumberFilter] identifier[ele] operator[:] identifier[networkDestinationPort] operator[SEP] { Keyword[this] operator[SEP] identifier[networkDestinationPort] operator[SEP] identifier[add] operator[SEP] identifier[ele] operator[SEP] operator[SEP] } Keyword[return] Keyword[this] operator[SEP] }
protected boolean getBufferEnabled(Dsn dsn) { String bufferEnabled = Lookup.lookup(BUFFER_ENABLED_OPTION, dsn); if (bufferEnabled != null) { return Boolean.parseBoolean(bufferEnabled); } return BUFFER_ENABLED_DEFAULT; }
class class_name[name] begin[{] method[getBufferEnabled, return_type[type[boolean]], modifier[protected], parameter[dsn]] begin[{] local_variable[type[String], bufferEnabled] if[binary_operation[member[.bufferEnabled], !=, literal[null]]] begin[{] return[call[Boolean.parseBoolean, parameter[member[.bufferEnabled]]]] else begin[{] None end[}] return[member[.BUFFER_ENABLED_DEFAULT]] end[}] END[}]
Keyword[protected] Keyword[boolean] identifier[getBufferEnabled] operator[SEP] identifier[Dsn] identifier[dsn] operator[SEP] { identifier[String] identifier[bufferEnabled] operator[=] identifier[Lookup] operator[SEP] identifier[lookup] operator[SEP] identifier[BUFFER_ENABLED_OPTION] , identifier[dsn] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[bufferEnabled] operator[!=] Other[null] operator[SEP] { Keyword[return] identifier[Boolean] operator[SEP] identifier[parseBoolean] operator[SEP] identifier[bufferEnabled] operator[SEP] operator[SEP] } Keyword[return] identifier[BUFFER_ENABLED_DEFAULT] operator[SEP] }
private static <S, L> void updateBlockReferences(Block<S, L> block) { UnorderedCollection<State<S, L>> states = block.getStates(); for (ElementReference ref : states.references()) { State<S, L> state = states.get(ref); state.setBlockReference(ref); state.setBlock(block); } }
class class_name[name] begin[{] method[updateBlockReferences, return_type[void], modifier[private static], parameter[block]] begin[{] local_variable[type[UnorderedCollection], states] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=states, selectors=[], type_arguments=None), name=state)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=S, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=L, sub_type=None))], dimensions=[], name=State, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=ref, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setBlockReference, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=block, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setBlock, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=references, postfix_operators=[], prefix_operators=[], qualifier=states, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=ref)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ElementReference, sub_type=None))), label=None) end[}] END[}]
Keyword[private] Keyword[static] operator[<] identifier[S] , identifier[L] operator[>] Keyword[void] identifier[updateBlockReferences] operator[SEP] identifier[Block] operator[<] identifier[S] , identifier[L] operator[>] identifier[block] operator[SEP] { identifier[UnorderedCollection] operator[<] identifier[State] operator[<] identifier[S] , identifier[L] operator[>] operator[>] identifier[states] operator[=] identifier[block] operator[SEP] identifier[getStates] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[ElementReference] identifier[ref] operator[:] identifier[states] operator[SEP] identifier[references] operator[SEP] operator[SEP] operator[SEP] { identifier[State] operator[<] identifier[S] , identifier[L] operator[>] identifier[state] operator[=] identifier[states] operator[SEP] identifier[get] operator[SEP] identifier[ref] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[setBlockReference] operator[SEP] identifier[ref] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[setBlock] operator[SEP] identifier[block] operator[SEP] operator[SEP] } }
public WebElement findExpectedElement(By by, boolean includeHiddenElements) { log.debug("findExpectedElement() called with: " + by); waitForLoaders(); try { WebElement foundElement = new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout()) .until(ExpectedConditions.presenceOfElementLocated(by)); if (includeHiddenElements || foundElement.isDisplayed()) { return foundElement; } else { // the element is found but not visible. Wait to see if it // becomes visible try { new WebDriverWait(getWebDriver(), getSeleniumManager().getTimeout()).until(ExpectedConditions .visibilityOfElementLocated(by)); return foundElement; } catch (WebDriverException toe) { fail("Element: " + by.toString() + " is found but not visible"); } } } catch (WebDriverException wde) { log.error("Expected element not found: ", wde); fail("Element: " + by.toString() + " not found after waiting for " + getSeleniumManager().getTimeout() + " seconds. Webdriver though exception: " + wde.getClass().getCanonicalName() + " with error message: " + wde.getMessage()); } return null; }
class class_name[name] begin[{] method[findExpectedElement, return_type[type[WebElement]], modifier[public], parameter[by, includeHiddenElements]] begin[{] call[log.debug, parameter[binary_operation[literal["findExpectedElement() called with: "], +, member[.by]]]] call[.waitForLoaders, parameter[]] TryStatement(block=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getWebDriver, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getSeleniumManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getTimeout, 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=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=by, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=presenceOfElementLocated, postfix_operators=[], prefix_operators=[], qualifier=ExpectedConditions, selectors=[], type_arguments=None)], member=until, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=WebDriverWait, sub_type=None)), name=foundElement)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=WebElement, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=includeHiddenElements, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=isDisplayed, postfix_operators=[], prefix_operators=[], qualifier=foundElement, selectors=[], type_arguments=None), operator=||), else_statement=BlockStatement(label=None, statements=[TryStatement(block=[StatementExpression(expression=ClassCreator(arguments=[MethodInvocation(arguments=[], member=getWebDriver, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MethodInvocation(arguments=[], member=getSeleniumManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getTimeout, 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=[MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=by, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=visibilityOfElementLocated, postfix_operators=[], prefix_operators=[], qualifier=ExpectedConditions, selectors=[], type_arguments=None)], member=until, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=WebDriverWait, sub_type=None)), label=None), ReturnStatement(expression=MemberReference(member=foundElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Element: "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=by, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is found but not visible"), operator=+)], member=fail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=toe, types=['WebDriverException']))], finally_block=None, label=None, resources=None)]), label=None, then_statement=BlockStatement(label=None, statements=[ReturnStatement(expression=MemberReference(member=foundElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Expected element not found: "), MemberReference(member=wde, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=error, postfix_operators=[], prefix_operators=[], qualifier=log, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Element: "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=by, selectors=[], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" not found after waiting for "), operator=+), operandr=MethodInvocation(arguments=[], member=getSeleniumManager, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[MethodInvocation(arguments=[], member=getTimeout, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" seconds. Webdriver though exception: "), operator=+), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=wde, selectors=[MethodInvocation(arguments=[], member=getCanonicalName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" with error message: "), operator=+), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=wde, selectors=[], type_arguments=None), operator=+)], member=fail, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=wde, types=['WebDriverException']))], finally_block=None, label=None, resources=None) return[literal[null]] end[}] END[}]
Keyword[public] identifier[WebElement] identifier[findExpectedElement] operator[SEP] identifier[By] identifier[by] , Keyword[boolean] identifier[includeHiddenElements] operator[SEP] { identifier[log] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[+] identifier[by] operator[SEP] operator[SEP] identifier[waitForLoaders] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { identifier[WebElement] identifier[foundElement] operator[=] Keyword[new] identifier[WebDriverWait] operator[SEP] identifier[getWebDriver] operator[SEP] operator[SEP] , identifier[getSeleniumManager] operator[SEP] operator[SEP] operator[SEP] identifier[getTimeout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[until] operator[SEP] identifier[ExpectedConditions] operator[SEP] identifier[presenceOfElementLocated] operator[SEP] identifier[by] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[includeHiddenElements] operator[||] identifier[foundElement] operator[SEP] identifier[isDisplayed] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] identifier[foundElement] operator[SEP] } Keyword[else] { Keyword[try] { Keyword[new] identifier[WebDriverWait] operator[SEP] identifier[getWebDriver] operator[SEP] operator[SEP] , identifier[getSeleniumManager] operator[SEP] operator[SEP] operator[SEP] identifier[getTimeout] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[until] operator[SEP] identifier[ExpectedConditions] operator[SEP] identifier[visibilityOfElementLocated] operator[SEP] identifier[by] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[foundElement] operator[SEP] } Keyword[catch] operator[SEP] identifier[WebDriverException] identifier[toe] operator[SEP] { identifier[fail] operator[SEP] literal[String] operator[+] identifier[by] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[SEP] operator[SEP] } } } Keyword[catch] operator[SEP] identifier[WebDriverException] identifier[wde] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[wde] operator[SEP] operator[SEP] identifier[fail] operator[SEP] literal[String] operator[+] identifier[by] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[getSeleniumManager] operator[SEP] operator[SEP] operator[SEP] identifier[getTimeout] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[wde] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getCanonicalName] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[wde] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
private int read() { int curByte = 0; try { curByte = rawData.get() & 0xFF; } catch (Exception e) { header.status = GifDecoder.STATUS_FORMAT_ERROR; } return curByte; }
class class_name[name] begin[{] method[read, return_type[type[int]], modifier[private], parameter[]] begin[{] local_variable[type[int], curByte] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=curByte, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=BinaryOperation(operandl=MethodInvocation(arguments=[], member=get, postfix_operators=[], prefix_operators=[], qualifier=rawData, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0xFF), operator=&)), label=None)], catches=[CatchClause(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=status, postfix_operators=[], prefix_operators=[], qualifier=header, selectors=[]), type==, value=MemberReference(member=STATUS_FORMAT_ERROR, postfix_operators=[], prefix_operators=[], qualifier=GifDecoder, selectors=[])), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) return[member[.curByte]] end[}] END[}]
Keyword[private] Keyword[int] identifier[read] operator[SEP] operator[SEP] { Keyword[int] identifier[curByte] operator[=] Other[0] operator[SEP] Keyword[try] { identifier[curByte] operator[=] identifier[rawData] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[&] literal[Integer] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { identifier[header] operator[SEP] identifier[status] operator[=] identifier[GifDecoder] operator[SEP] identifier[STATUS_FORMAT_ERROR] operator[SEP] } Keyword[return] identifier[curByte] operator[SEP] }
public void setPosition(String position) { if (position == null) { String message = Logging.getMessage("nullValue.PositionIsNull"); Logging.logger().severe(message); throw new IllegalArgumentException(message); } this.position = position; clearControls(); }
class class_name[name] begin[{] method[setPosition, return_type[void], modifier[public], parameter[position]] begin[{] if[binary_operation[member[.position], ==, literal[null]]] begin[{] local_variable[type[String], message] call[Logging.logger, parameter[]] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=message, 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=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] assign[THIS[member[None.position]], member[.position]] call[.clearControls, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setPosition] operator[SEP] identifier[String] identifier[position] operator[SEP] { Keyword[if] operator[SEP] identifier[position] operator[==] Other[null] operator[SEP] { identifier[String] identifier[message] operator[=] identifier[Logging] operator[SEP] identifier[getMessage] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Logging] operator[SEP] identifier[logger] operator[SEP] operator[SEP] operator[SEP] identifier[severe] operator[SEP] identifier[message] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[message] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[position] operator[=] identifier[position] operator[SEP] identifier[clearControls] operator[SEP] operator[SEP] operator[SEP] }
@RequiresPermission(Manifest.permission.ACCESS_NETWORK_STATE) public static Observable<Connectivity> observeNetworkConnectivity(final Context context) { final NetworkObservingStrategy strategy; if (Preconditions.isAtLeastAndroidMarshmallow()) { strategy = new MarshmallowNetworkObservingStrategy(); } else if (Preconditions.isAtLeastAndroidLollipop()) { strategy = new LollipopNetworkObservingStrategy(); } else { strategy = new PreLollipopNetworkObservingStrategy(); } return observeNetworkConnectivity(context, strategy); }
class class_name[name] begin[{] method[observeNetworkConnectivity, return_type[type[Observable]], modifier[public static], parameter[context]] begin[{] local_variable[type[NetworkObservingStrategy], strategy] if[call[Preconditions.isAtLeastAndroidMarshmallow, parameter[]]] begin[{] assign[member[.strategy], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=MarshmallowNetworkObservingStrategy, sub_type=None))] else begin[{] if[call[Preconditions.isAtLeastAndroidLollipop, parameter[]]] begin[{] assign[member[.strategy], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LollipopNetworkObservingStrategy, sub_type=None))] else begin[{] assign[member[.strategy], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=PreLollipopNetworkObservingStrategy, sub_type=None))] end[}] end[}] return[call[.observeNetworkConnectivity, parameter[member[.context], member[.strategy]]]] end[}] END[}]
annotation[@] identifier[RequiresPermission] operator[SEP] identifier[Manifest] operator[SEP] identifier[permission] operator[SEP] identifier[ACCESS_NETWORK_STATE] operator[SEP] Keyword[public] Keyword[static] identifier[Observable] operator[<] identifier[Connectivity] operator[>] identifier[observeNetworkConnectivity] operator[SEP] Keyword[final] identifier[Context] identifier[context] operator[SEP] { Keyword[final] identifier[NetworkObservingStrategy] identifier[strategy] operator[SEP] Keyword[if] operator[SEP] identifier[Preconditions] operator[SEP] identifier[isAtLeastAndroidMarshmallow] operator[SEP] operator[SEP] operator[SEP] { identifier[strategy] operator[=] Keyword[new] identifier[MarshmallowNetworkObservingStrategy] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[Preconditions] operator[SEP] identifier[isAtLeastAndroidLollipop] operator[SEP] operator[SEP] operator[SEP] { identifier[strategy] operator[=] Keyword[new] identifier[LollipopNetworkObservingStrategy] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[strategy] operator[=] Keyword[new] identifier[PreLollipopNetworkObservingStrategy] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[observeNetworkConnectivity] operator[SEP] identifier[context] , identifier[strategy] operator[SEP] operator[SEP] }
public byte[] unsign(byte[] data, Key key) throws AuditSigningException { byte[] unsignedData = null; if (data != null) { try { unsignedData = decrypt(data, key); } catch (AuditDecryptionException ade) { throw new AuditSigningException(ade); } } else { Tr.error(tc, "security.audit.message.digest.error"); throw new AuditSigningException("MessageDigest is invalid"); } return (unsignedData); }
class class_name[name] begin[{] method[unsign, return_type[type[byte]], modifier[public], parameter[data, key]] begin[{] local_variable[type[byte], unsignedData] if[binary_operation[member[.data], !=, literal[null]]] begin[{] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=unsignedData, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=data, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=decrypt, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=ade, 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=AuditSigningException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=ade, types=['AuditDecryptionException']))], finally_block=None, label=None, resources=None) else begin[{] call[Tr.error, parameter[member[.tc], literal["security.audit.message.digest.error"]]] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="MessageDigest is invalid")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=AuditSigningException, sub_type=None)), label=None) end[}] return[member[.unsignedData]] end[}] END[}]
Keyword[public] Keyword[byte] operator[SEP] operator[SEP] identifier[unsign] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[data] , identifier[Key] identifier[key] operator[SEP] Keyword[throws] identifier[AuditSigningException] { Keyword[byte] operator[SEP] operator[SEP] identifier[unsignedData] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[data] operator[!=] Other[null] operator[SEP] { Keyword[try] { identifier[unsignedData] operator[=] identifier[decrypt] operator[SEP] identifier[data] , identifier[key] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[AuditDecryptionException] identifier[ade] operator[SEP] { Keyword[throw] Keyword[new] identifier[AuditSigningException] operator[SEP] identifier[ade] operator[SEP] operator[SEP] } } Keyword[else] { identifier[Tr] operator[SEP] identifier[error] operator[SEP] identifier[tc] , literal[String] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[AuditSigningException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] operator[SEP] identifier[unsignedData] operator[SEP] operator[SEP] }
@VisibleForTesting boolean couldUseFlatGlob(Path fixedPath) { // Only works for filesystems where the base Hadoop Path scheme matches the underlying URI // scheme for GCS. if (!getUri().getScheme().equals(GoogleCloudStorageFileSystem.SCHEME)) { logger.atFine().log( "Flat glob is on, but doesn't work for scheme '%s'; using default behavior.", getUri().getScheme()); return false; } // The full pattern should have a wildcard, otherwise there's no point doing the flat glob. GlobPattern fullPattern = new GlobPattern(fixedPath.toString()); if (!fullPattern.hasWildcard()) { logger.atFine().log( "Flat glob is on, but Path '%s' has no wildcard; using default behavior.", fixedPath); return false; } // To use a flat glob, there must be an authority defined. if (Strings.isNullOrEmpty(fixedPath.toUri().getAuthority())) { logger.atInfo().log( "Flat glob is on, but Path '%s' has a empty authority, using default behavior.", fixedPath); return false; } // And the authority must not contain a wildcard. GlobPattern authorityPattern = new GlobPattern(fixedPath.toUri().getAuthority()); if (authorityPattern.hasWildcard()) { logger.atInfo().log( "Flat glob is on, but Path '%s' has a wildcard authority, using default behavior.", fixedPath); return false; } return true; }
class class_name[name] begin[{] method[couldUseFlatGlob, return_type[type[boolean]], modifier[default], parameter[fixedPath]] begin[{] if[call[.getUri, parameter[]]] begin[{] call[logger.atFine, parameter[]] return[literal[false]] else begin[{] None end[}] local_variable[type[GlobPattern], fullPattern] if[call[fullPattern.hasWildcard, parameter[]]] begin[{] call[logger.atFine, parameter[]] return[literal[false]] else begin[{] None end[}] if[call[Strings.isNullOrEmpty, parameter[call[fixedPath.toUri, parameter[]]]]] begin[{] call[logger.atInfo, parameter[]] return[literal[false]] else begin[{] None end[}] local_variable[type[GlobPattern], authorityPattern] if[call[authorityPattern.hasWildcard, parameter[]]] begin[{] call[logger.atInfo, parameter[]] return[literal[false]] else begin[{] None end[}] return[literal[true]] end[}] END[}]
annotation[@] identifier[VisibleForTesting] Keyword[boolean] identifier[couldUseFlatGlob] operator[SEP] identifier[Path] identifier[fixedPath] operator[SEP] { Keyword[if] operator[SEP] operator[!] identifier[getUri] operator[SEP] operator[SEP] operator[SEP] identifier[getScheme] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[GoogleCloudStorageFileSystem] operator[SEP] identifier[SCHEME] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[atFine] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] literal[String] , identifier[getUri] operator[SEP] operator[SEP] operator[SEP] identifier[getScheme] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[GlobPattern] identifier[fullPattern] operator[=] Keyword[new] identifier[GlobPattern] operator[SEP] identifier[fixedPath] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[fullPattern] operator[SEP] identifier[hasWildcard] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[atFine] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] literal[String] , identifier[fixedPath] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] identifier[Strings] operator[SEP] identifier[isNullOrEmpty] operator[SEP] identifier[fixedPath] operator[SEP] identifier[toUri] operator[SEP] operator[SEP] operator[SEP] identifier[getAuthority] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[atInfo] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] literal[String] , identifier[fixedPath] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } identifier[GlobPattern] identifier[authorityPattern] operator[=] Keyword[new] identifier[GlobPattern] operator[SEP] identifier[fixedPath] operator[SEP] identifier[toUri] operator[SEP] operator[SEP] operator[SEP] identifier[getAuthority] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[authorityPattern] operator[SEP] identifier[hasWildcard] operator[SEP] operator[SEP] operator[SEP] { identifier[logger] operator[SEP] identifier[atInfo] operator[SEP] operator[SEP] operator[SEP] identifier[log] operator[SEP] literal[String] , identifier[fixedPath] operator[SEP] operator[SEP] Keyword[return] literal[boolean] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] }
@Override public com.liferay.commerce.product.model.CPRuleAssetCategoryRel addCPRuleAssetCategoryRel( com.liferay.commerce.product.model.CPRuleAssetCategoryRel cpRuleAssetCategoryRel) { return _cpRuleAssetCategoryRelLocalService.addCPRuleAssetCategoryRel(cpRuleAssetCategoryRel); }
class class_name[name] begin[{] method[addCPRuleAssetCategoryRel, return_type[type[com]], modifier[public], parameter[cpRuleAssetCategoryRel]] begin[{] return[call[_cpRuleAssetCategoryRelLocalService.addCPRuleAssetCategoryRel, parameter[member[.cpRuleAssetCategoryRel]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[model] operator[SEP] identifier[CPRuleAssetCategoryRel] identifier[addCPRuleAssetCategoryRel] operator[SEP] identifier[com] operator[SEP] identifier[liferay] operator[SEP] identifier[commerce] operator[SEP] identifier[product] operator[SEP] identifier[model] operator[SEP] identifier[CPRuleAssetCategoryRel] identifier[cpRuleAssetCategoryRel] operator[SEP] { Keyword[return] identifier[_cpRuleAssetCategoryRelLocalService] operator[SEP] identifier[addCPRuleAssetCategoryRel] operator[SEP] identifier[cpRuleAssetCategoryRel] operator[SEP] operator[SEP] }
private static Status getStatus(Throwable throwable) { Status status = Status.UNKNOWN; if (throwable instanceof StatusRuntimeException) { status = ((StatusRuntimeException) throwable).getStatus(); } else if (throwable instanceof StatusException) { status = ((StatusException) throwable).getStatus(); } return status; }
class class_name[name] begin[{] method[getStatus, return_type[type[Status]], modifier[private static], parameter[throwable]] begin[{] local_variable[type[Status], status] if[binary_operation[member[.throwable], instanceof, type[StatusRuntimeException]]] begin[{] assign[member[.status], Cast(expression=MemberReference(member=throwable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=StatusRuntimeException, sub_type=None))] else begin[{] if[binary_operation[member[.throwable], instanceof, type[StatusException]]] begin[{] assign[member[.status], Cast(expression=MemberReference(member=throwable, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=StatusException, sub_type=None))] else begin[{] None end[}] end[}] return[member[.status]] end[}] END[}]
Keyword[private] Keyword[static] identifier[Status] identifier[getStatus] operator[SEP] identifier[Throwable] identifier[throwable] operator[SEP] { identifier[Status] identifier[status] operator[=] identifier[Status] operator[SEP] identifier[UNKNOWN] operator[SEP] Keyword[if] operator[SEP] identifier[throwable] Keyword[instanceof] identifier[StatusRuntimeException] operator[SEP] { identifier[status] operator[=] operator[SEP] operator[SEP] identifier[StatusRuntimeException] operator[SEP] identifier[throwable] operator[SEP] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[throwable] Keyword[instanceof] identifier[StatusException] operator[SEP] { identifier[status] operator[=] operator[SEP] operator[SEP] identifier[StatusException] operator[SEP] identifier[throwable] operator[SEP] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[status] operator[SEP] }
@Override public AudioFileFormat getAudioFileFormat(InputStream inputStream, long medialength) throws UnsupportedAudioFileException, IOException { return getAudioFileFormat(inputStream, (int) medialength, AudioSystem.NOT_SPECIFIED); }
class class_name[name] begin[{] method[getAudioFileFormat, return_type[type[AudioFileFormat]], modifier[public], parameter[inputStream, medialength]] begin[{] return[call[.getAudioFileFormat, parameter[member[.inputStream], Cast(expression=MemberReference(member=medialength, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int)), member[AudioSystem.NOT_SPECIFIED]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[AudioFileFormat] identifier[getAudioFileFormat] operator[SEP] identifier[InputStream] identifier[inputStream] , Keyword[long] identifier[medialength] operator[SEP] Keyword[throws] identifier[UnsupportedAudioFileException] , identifier[IOException] { Keyword[return] identifier[getAudioFileFormat] operator[SEP] identifier[inputStream] , operator[SEP] Keyword[int] operator[SEP] identifier[medialength] , identifier[AudioSystem] operator[SEP] identifier[NOT_SPECIFIED] operator[SEP] operator[SEP] }
@Override public int compareTo(Vulnerability v) { return new CompareToBuilder() .append(this.name, v.name) .toComparison(); }
class class_name[name] begin[{] method[compareTo, return_type[type[int]], modifier[public], parameter[v]] begin[{] return[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=name, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=v, selectors=[])], member=append, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=toComparison, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=CompareToBuilder, sub_type=None))] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[int] identifier[compareTo] operator[SEP] identifier[Vulnerability] identifier[v] operator[SEP] { Keyword[return] Keyword[new] identifier[CompareToBuilder] operator[SEP] operator[SEP] operator[SEP] identifier[append] operator[SEP] Keyword[this] operator[SEP] identifier[name] , identifier[v] operator[SEP] identifier[name] operator[SEP] operator[SEP] identifier[toComparison] operator[SEP] operator[SEP] operator[SEP] }
public JSONArray construct(boolean server) { JSONArray dnd = new JSONArray(); if (server){ JSONObject srv = new JSONObject(); srv.put("start_hour", start.getHourOfDay()); srv.put("start_minute", start.getMinuteOfHour()); srv.put("end_hour", end.getHourOfDay()); srv.put("end_minute", end.getMinuteOfHour()); srv.put("enabled", enabled ? 1 : 0); dnd.put(srv); } else { dnd.put(start.getHourOfDay()); dnd.put(start.getMinuteOfHour()); dnd.put(end.getHourOfDay()); dnd.put(end.getMinuteOfHour()); } return dnd; }
class class_name[name] begin[{] method[construct, return_type[type[JSONArray]], modifier[public], parameter[server]] begin[{] local_variable[type[JSONArray], dnd] if[member[.server]] begin[{] local_variable[type[JSONObject], srv] call[srv.put, parameter[literal["start_hour"], call[start.getHourOfDay, parameter[]]]] call[srv.put, parameter[literal["start_minute"], call[start.getMinuteOfHour, parameter[]]]] call[srv.put, parameter[literal["end_hour"], call[end.getHourOfDay, parameter[]]]] call[srv.put, parameter[literal["end_minute"], call[end.getMinuteOfHour, parameter[]]]] call[srv.put, parameter[literal["enabled"], TernaryExpression(condition=MemberReference(member=enabled, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), if_false=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), if_true=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1))]] call[dnd.put, parameter[member[.srv]]] else begin[{] call[dnd.put, parameter[call[start.getHourOfDay, parameter[]]]] call[dnd.put, parameter[call[start.getMinuteOfHour, parameter[]]]] call[dnd.put, parameter[call[end.getHourOfDay, parameter[]]]] call[dnd.put, parameter[call[end.getMinuteOfHour, parameter[]]]] end[}] return[member[.dnd]] end[}] END[}]
Keyword[public] identifier[JSONArray] identifier[construct] operator[SEP] Keyword[boolean] identifier[server] operator[SEP] { identifier[JSONArray] identifier[dnd] operator[=] Keyword[new] identifier[JSONArray] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[server] operator[SEP] { identifier[JSONObject] identifier[srv] operator[=] Keyword[new] identifier[JSONObject] operator[SEP] operator[SEP] operator[SEP] identifier[srv] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[start] operator[SEP] identifier[getHourOfDay] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[srv] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[start] operator[SEP] identifier[getMinuteOfHour] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[srv] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[end] operator[SEP] identifier[getHourOfDay] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[srv] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[end] operator[SEP] identifier[getMinuteOfHour] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[srv] operator[SEP] identifier[put] operator[SEP] literal[String] , identifier[enabled] operator[?] Other[1] operator[:] Other[0] operator[SEP] operator[SEP] identifier[dnd] operator[SEP] identifier[put] operator[SEP] identifier[srv] operator[SEP] operator[SEP] } Keyword[else] { identifier[dnd] operator[SEP] identifier[put] operator[SEP] identifier[start] operator[SEP] identifier[getHourOfDay] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dnd] operator[SEP] identifier[put] operator[SEP] identifier[start] operator[SEP] identifier[getMinuteOfHour] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dnd] operator[SEP] identifier[put] operator[SEP] identifier[end] operator[SEP] identifier[getHourOfDay] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[dnd] operator[SEP] identifier[put] operator[SEP] identifier[end] operator[SEP] identifier[getMinuteOfHour] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] identifier[dnd] operator[SEP] }
public void start(int requestNumber, boolean deliverImmediately, boolean sendReply, SendListener sendListener, boolean restart) //471642 { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "start", new Object[]{requestNumber, deliverImmediately, sendReply, sendListener, restart //471642 }); if (restart && stoppableSessionStopped) { //471642 if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Stoppable session now stopped so ignoring the restart request"); } else { //471642 stoppableSessionStopped = false; //471642 // We need to lock this down with a mutex lock here as it is possible that we could call // start on the sub consumer (or super class) causing the client to get notified that we // have started. If the client then decides to perform another operation which requires // checking if the session is started (say by calling isStarted()) we still may not have set // the started flag to true by the time they call this - causing really weird results (see // defect 347591). // As such, we lock around the start call by waiting on the semaphore before entering the // critical region. We then send the start and the SessionStartSendListener() will post the // semaphore when the data is actually sent. The started flag is updated just before the // semaphore is posted. checkNotBrowserSession(); SessionStartSendListener listener = new SessionStartSendListener(); startSemaphore.waitOnIgnoringInterruptions(); try { if (subConsumer != null) { subConsumer.start(requestNumber, deliverImmediately, sendReply, listener); } else { super.start(requestNumber, deliverImmediately, sendReply, listener); } } catch (RuntimeException e) { FFDCFilter.processException(e, CLASS_NAME + ".start", CommsConstants.CATMAINCONSUMER_START_01, this, new Object[]{subConsumer}); // the listener may never post because of this, so we post now // to ensure the semaphore is not left dangling listener.errorOccurred(e); if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start", e); throw e; } } if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "start"); }
class class_name[name] begin[{] method[start, return_type[void], modifier[public], parameter[requestNumber, deliverImmediately, sendReply, sendListener, restart]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.entry, parameter[THIS[], member[.tc], literal["start"], ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deliverImmediately, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sendReply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sendListener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=restart, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))]] else begin[{] None end[}] if[binary_operation[member[.restart], &&, member[.stoppableSessionStopped]]] begin[{] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isDebugEnabled, parameter[]]]] begin[{] call[SibTr.debug, parameter[THIS[], member[.tc], literal["Stoppable session now stopped so ignoring the restart request"]]] else begin[{] None end[}] else begin[{] assign[member[.stoppableSessionStopped], literal[false]] call[.checkNotBrowserSession, parameter[]] local_variable[type[SessionStartSendListener], listener] call[startSemaphore.waitOnIgnoringInterruptions, parameter[]] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=subConsumer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), else_statement=BlockStatement(label=None, statements=[StatementExpression(expression=SuperMethodInvocation(arguments=[MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deliverImmediately, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sendReply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=start, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None), label=None)]), label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=requestNumber, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=deliverImmediately, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sendReply, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=listener, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=start, postfix_operators=[], prefix_operators=[], qualifier=subConsumer, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), BinaryOperation(operandl=MemberReference(member=CLASS_NAME, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=".start"), operator=+), MemberReference(member=CATMAINCONSUMER_START_01, postfix_operators=[], prefix_operators=[], qualifier=CommsConstants, selectors=[]), This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[]), ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=subConsumer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=processException, postfix_operators=[], prefix_operators=[], qualifier=FFDCFilter, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=errorOccurred, postfix_operators=[], prefix_operators=[], qualifier=listener, selectors=[], type_arguments=None), label=None), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=isAnyTracingEnabled, postfix_operators=[], prefix_operators=[], qualifier=TraceComponent, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[], member=isEntryEnabled, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[], type_arguments=None), operator=&&), else_statement=None, label=None, then_statement=StatementExpression(expression=MethodInvocation(arguments=[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="start"), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=exit, postfix_operators=[], prefix_operators=[], qualifier=SibTr, 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=['RuntimeException']))], finally_block=None, label=None, resources=None) end[}] if[binary_operation[call[TraceComponent.isAnyTracingEnabled, parameter[]], &&, call[tc.isEntryEnabled, parameter[]]]] begin[{] call[SibTr.exit, parameter[THIS[], member[.tc], literal["start"]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[start] operator[SEP] Keyword[int] identifier[requestNumber] , Keyword[boolean] identifier[deliverImmediately] , Keyword[boolean] identifier[sendReply] , identifier[SendListener] identifier[sendListener] , Keyword[boolean] identifier[restart] 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] Keyword[this] , identifier[tc] , literal[String] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[requestNumber] , identifier[deliverImmediately] , identifier[sendReply] , identifier[sendListener] , identifier[restart] } operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[restart] operator[&&] identifier[stoppableSessionStopped] 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] } Keyword[else] { identifier[stoppableSessionStopped] operator[=] literal[boolean] operator[SEP] identifier[checkNotBrowserSession] operator[SEP] operator[SEP] operator[SEP] identifier[SessionStartSendListener] identifier[listener] operator[=] Keyword[new] identifier[SessionStartSendListener] operator[SEP] operator[SEP] operator[SEP] identifier[startSemaphore] operator[SEP] identifier[waitOnIgnoringInterruptions] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { Keyword[if] operator[SEP] identifier[subConsumer] operator[!=] Other[null] operator[SEP] { identifier[subConsumer] operator[SEP] identifier[start] operator[SEP] identifier[requestNumber] , identifier[deliverImmediately] , identifier[sendReply] , identifier[listener] operator[SEP] operator[SEP] } Keyword[else] { Keyword[super] operator[SEP] identifier[start] operator[SEP] identifier[requestNumber] , identifier[deliverImmediately] , identifier[sendReply] , identifier[listener] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RuntimeException] identifier[e] operator[SEP] { identifier[FFDCFilter] operator[SEP] identifier[processException] operator[SEP] identifier[e] , identifier[CLASS_NAME] operator[+] literal[String] , identifier[CommsConstants] operator[SEP] identifier[CATMAINCONSUMER_START_01] , Keyword[this] , Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[subConsumer] } operator[SEP] operator[SEP] identifier[listener] operator[SEP] identifier[errorOccurred] operator[SEP] identifier[e] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] , identifier[e] operator[SEP] operator[SEP] Keyword[throw] identifier[e] operator[SEP] } } Keyword[if] operator[SEP] identifier[TraceComponent] operator[SEP] identifier[isAnyTracingEnabled] operator[SEP] operator[SEP] operator[&&] identifier[tc] operator[SEP] identifier[isEntryEnabled] operator[SEP] operator[SEP] operator[SEP] identifier[SibTr] operator[SEP] identifier[exit] operator[SEP] Keyword[this] , identifier[tc] , literal[String] operator[SEP] operator[SEP] }
public RequestMatcher endpointsMatcher() { ServiceProviderEndpoints endpoints = Optional.of(serviceProviderBuilder) .map(builder -> builder.getSharedObject(ServiceProviderEndpoints.class)) .orElseThrow(() -> new IllegalStateException("Can't find SAML Endpoints")); return new LazyEndpointsRequestMatcher(endpoints); }
class class_name[name] begin[{] method[endpointsMatcher, return_type[type[RequestMatcher]], modifier[public], parameter[]] begin[{] local_variable[type[ServiceProviderEndpoints], endpoints] return[ClassCreator(arguments=[MemberReference(member=endpoints, 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=LazyEndpointsRequestMatcher, sub_type=None))] end[}] END[}]
Keyword[public] identifier[RequestMatcher] identifier[endpointsMatcher] operator[SEP] operator[SEP] { identifier[ServiceProviderEndpoints] identifier[endpoints] operator[=] identifier[Optional] operator[SEP] identifier[of] operator[SEP] identifier[serviceProviderBuilder] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[builder] operator[->] identifier[builder] operator[SEP] identifier[getSharedObject] operator[SEP] identifier[ServiceProviderEndpoints] operator[SEP] Keyword[class] operator[SEP] operator[SEP] operator[SEP] identifier[orElseThrow] operator[SEP] operator[SEP] operator[SEP] operator[->] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[LazyEndpointsRequestMatcher] operator[SEP] identifier[endpoints] operator[SEP] operator[SEP] }
public Iterable<DContact> queryByFirstName(Object parent, java.lang.String firstName) { return queryByField(parent, DContactMapper.Field.FIRSTNAME.getFieldName(), firstName); }
class class_name[name] begin[{] method[queryByFirstName, return_type[type[Iterable]], modifier[public], parameter[parent, firstName]] begin[{] return[call[.queryByField, parameter[member[.parent], call[DContactMapper.Field.FIRSTNAME.getFieldName, parameter[]], member[.firstName]]]] end[}] END[}]
Keyword[public] identifier[Iterable] operator[<] identifier[DContact] operator[>] identifier[queryByFirstName] operator[SEP] identifier[Object] identifier[parent] , identifier[java] operator[SEP] identifier[lang] operator[SEP] identifier[String] identifier[firstName] operator[SEP] { Keyword[return] identifier[queryByField] operator[SEP] identifier[parent] , identifier[DContactMapper] operator[SEP] identifier[Field] operator[SEP] identifier[FIRSTNAME] operator[SEP] identifier[getFieldName] operator[SEP] operator[SEP] , identifier[firstName] operator[SEP] operator[SEP] }
protected void includeClassFile(PackageSymbol p, JavaFileObject file) { if ((p.flags_field & EXISTS) == 0) for (Symbol q = p; q != null && q.kind == PCK; q = q.owner) q.flags_field |= EXISTS; JavaFileObject.Kind kind = file.getKind(); int seen; if (kind == JavaFileObject.Kind.CLASS) seen = CLASS_SEEN; else seen = SOURCE_SEEN; String binaryName = fileManager.inferBinaryName(currentLoc, file); int lastDot = binaryName.lastIndexOf("."); Name classname = names.fromString(binaryName.substring(lastDot + 1)); boolean isPkgInfo = classname == names.package_info; ClassSymbol c = isPkgInfo ? p.package_info : (ClassSymbol) p.members_field.lookup(classname).sym; if (c == null) { c = enterClass(classname, p); if (c.classfile == null) // only update the file if's it's newly created c.classfile = file; if (isPkgInfo) { p.package_info = c; } else { if (c.owner == p) // it might be an inner class p.members_field.enter(c); } } else if (c.classfile != null && (c.flags_field & seen) == 0) { // if c.classfile == null, we are currently compiling this class // and no further action is necessary. // if (c.flags_field & seen) != 0, we have already encountered // a file of the same kind; again no further action is necessary. if ((c.flags_field & (CLASS_SEEN | SOURCE_SEEN)) != 0) c.classfile = preferredFileObject(file, c.classfile); } c.flags_field |= seen; }
class class_name[name] begin[{] method[includeClassFile, return_type[void], modifier[protected], parameter[p, file]] begin[{] if[binary_operation[binary_operation[member[p.flags_field], &, member[.EXISTS]], ==, literal[0]]] begin[{] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=flags_field, postfix_operators=[], prefix_operators=[], qualifier=q, selectors=[]), type=|=, value=MemberReference(member=EXISTS, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), control=ForControl(condition=BinaryOperation(operandl=BinaryOperation(operandl=MemberReference(member=q, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), operandr=BinaryOperation(operandl=MemberReference(member=kind, postfix_operators=[], prefix_operators=[], qualifier=q, selectors=[]), operandr=MemberReference(member=PCK, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator===), operator=&&), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), name=q)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Symbol, sub_type=None)), update=[Assignment(expressionl=MemberReference(member=q, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=owner, postfix_operators=[], prefix_operators=[], qualifier=q, selectors=[]))]), label=None) else begin[{] None end[}] local_variable[type[JavaFileObject], kind] local_variable[type[int], seen] if[binary_operation[member[.kind], ==, member[JavaFileObject.Kind.CLASS]]] begin[{] assign[member[.seen], member[.CLASS_SEEN]] else begin[{] assign[member[.seen], member[.SOURCE_SEEN]] end[}] local_variable[type[String], binaryName] local_variable[type[int], lastDot] local_variable[type[Name], classname] local_variable[type[boolean], isPkgInfo] local_variable[type[ClassSymbol], c] if[binary_operation[member[.c], ==, literal[null]]] begin[{] assign[member[.c], call[.enterClass, parameter[member[.classname], member[.p]]]] if[binary_operation[member[c.classfile], ==, literal[null]]] begin[{] assign[member[c.classfile], member[.file]] else begin[{] None end[}] if[member[.isPkgInfo]] begin[{] assign[member[p.package_info], member[.c]] else begin[{] if[binary_operation[member[c.owner], ==, member[.p]]] begin[{] call[p.members_field.enter, parameter[member[.c]]] else begin[{] None end[}] end[}] else begin[{] if[binary_operation[binary_operation[member[c.classfile], !=, literal[null]], &&, binary_operation[binary_operation[member[c.flags_field], &, member[.seen]], ==, literal[0]]]] begin[{] if[binary_operation[binary_operation[member[c.flags_field], &, binary_operation[member[.CLASS_SEEN], |, member[.SOURCE_SEEN]]], !=, literal[0]]] begin[{] assign[member[c.classfile], call[.preferredFileObject, parameter[member[.file], member[c.classfile]]]] else begin[{] None end[}] else begin[{] None end[}] end[}] assign[member[c.flags_field], member[.seen]] end[}] END[}]
Keyword[protected] Keyword[void] identifier[includeClassFile] operator[SEP] identifier[PackageSymbol] identifier[p] , identifier[JavaFileObject] identifier[file] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[p] operator[SEP] identifier[flags_field] operator[&] identifier[EXISTS] operator[SEP] operator[==] Other[0] operator[SEP] Keyword[for] operator[SEP] identifier[Symbol] identifier[q] operator[=] identifier[p] operator[SEP] identifier[q] operator[!=] Other[null] operator[&&] identifier[q] operator[SEP] identifier[kind] operator[==] identifier[PCK] operator[SEP] identifier[q] operator[=] identifier[q] operator[SEP] identifier[owner] operator[SEP] identifier[q] operator[SEP] identifier[flags_field] operator[|=] identifier[EXISTS] operator[SEP] identifier[JavaFileObject] operator[SEP] identifier[Kind] identifier[kind] operator[=] identifier[file] operator[SEP] identifier[getKind] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[seen] operator[SEP] Keyword[if] operator[SEP] identifier[kind] operator[==] identifier[JavaFileObject] operator[SEP] identifier[Kind] operator[SEP] identifier[CLASS] operator[SEP] identifier[seen] operator[=] identifier[CLASS_SEEN] operator[SEP] Keyword[else] identifier[seen] operator[=] identifier[SOURCE_SEEN] operator[SEP] identifier[String] identifier[binaryName] operator[=] identifier[fileManager] operator[SEP] identifier[inferBinaryName] operator[SEP] identifier[currentLoc] , identifier[file] operator[SEP] operator[SEP] Keyword[int] identifier[lastDot] operator[=] identifier[binaryName] operator[SEP] identifier[lastIndexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[Name] identifier[classname] operator[=] identifier[names] operator[SEP] identifier[fromString] operator[SEP] identifier[binaryName] operator[SEP] identifier[substring] operator[SEP] identifier[lastDot] operator[+] Other[1] operator[SEP] operator[SEP] operator[SEP] Keyword[boolean] identifier[isPkgInfo] operator[=] identifier[classname] operator[==] identifier[names] operator[SEP] identifier[package_info] operator[SEP] identifier[ClassSymbol] identifier[c] operator[=] identifier[isPkgInfo] operator[?] identifier[p] operator[SEP] identifier[package_info] operator[:] operator[SEP] identifier[ClassSymbol] operator[SEP] identifier[p] operator[SEP] identifier[members_field] operator[SEP] identifier[lookup] operator[SEP] identifier[classname] operator[SEP] operator[SEP] identifier[sym] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[==] Other[null] operator[SEP] { identifier[c] operator[=] identifier[enterClass] operator[SEP] identifier[classname] , identifier[p] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[c] operator[SEP] identifier[classfile] operator[==] Other[null] operator[SEP] identifier[c] operator[SEP] identifier[classfile] operator[=] identifier[file] operator[SEP] Keyword[if] operator[SEP] identifier[isPkgInfo] operator[SEP] { identifier[p] operator[SEP] identifier[package_info] operator[=] identifier[c] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[c] operator[SEP] identifier[owner] operator[==] identifier[p] operator[SEP] identifier[p] operator[SEP] identifier[members_field] operator[SEP] identifier[enter] operator[SEP] identifier[c] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[c] operator[SEP] identifier[classfile] operator[!=] Other[null] operator[&&] operator[SEP] identifier[c] operator[SEP] identifier[flags_field] operator[&] identifier[seen] operator[SEP] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] operator[SEP] identifier[c] operator[SEP] identifier[flags_field] operator[&] operator[SEP] identifier[CLASS_SEEN] operator[|] identifier[SOURCE_SEEN] operator[SEP] operator[SEP] operator[!=] Other[0] operator[SEP] identifier[c] operator[SEP] identifier[classfile] operator[=] identifier[preferredFileObject] operator[SEP] identifier[file] , identifier[c] operator[SEP] identifier[classfile] operator[SEP] operator[SEP] } identifier[c] operator[SEP] identifier[flags_field] operator[|=] identifier[seen] operator[SEP] }
public static void fill( DMatrix4 a , double v ) { a.a1 = v; a.a2 = v; a.a3 = v; a.a4 = v; }
class class_name[name] begin[{] method[fill, return_type[void], modifier[public static], parameter[a, v]] begin[{] assign[member[a.a1], member[.v]] assign[member[a.a2], member[.v]] assign[member[a.a3], member[.v]] assign[member[a.a4], member[.v]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[fill] operator[SEP] identifier[DMatrix4] identifier[a] , Keyword[double] identifier[v] operator[SEP] { identifier[a] operator[SEP] identifier[a1] operator[=] identifier[v] operator[SEP] identifier[a] operator[SEP] identifier[a2] operator[=] identifier[v] operator[SEP] identifier[a] operator[SEP] identifier[a3] operator[=] identifier[v] operator[SEP] identifier[a] operator[SEP] identifier[a4] operator[=] identifier[v] operator[SEP] }
private void handleResponse(Sms message, Response response) throws IOException, JsonProcessingException, MessageNotSentException { if (response.getStatus().isSuccess()) { JsonNode json = mapper.readTree(response.getBody()); int ovhStatus = json.get("status").asInt(); // 100 <= ovh status < 200 ====> OK -> just log response // 200 <= ovh status ====> KO -> throw an exception if (ovhStatus >= OK_STATUS) { LOG.error("SMS failed to be sent through OVH"); LOG.debug("Sent SMS: {}", message); LOG.debug("Response status {}", response.getStatus()); LOG.debug("Response body {}", response.getBody()); throw new MessageNotSentException("SMS couldn't be sent through OVH: " + json.get("message").asText(), message); } else { LOG.info("SMS successfully sent through OVH"); LOG.debug("Sent SMS: {}", message); LOG.debug("Response: {}", response.getBody()); } } else { LOG.error("Response status {}", response.getStatus()); LOG.error("Response body {}", response.getBody()); throw new MessageNotSentException("SMS couldn't be sent. Response status is " + response.getStatus(), message); } }
class class_name[name] begin[{] method[handleResponse, return_type[void], modifier[private], parameter[message, response]] begin[{] if[call[response.getStatus, parameter[]]] begin[{] local_variable[type[JsonNode], json] local_variable[type[int], ovhStatus] if[binary_operation[member[.ovhStatus], >=, member[.OK_STATUS]]] begin[{] call[LOG.error, parameter[literal["SMS failed to be sent through OVH"]]] call[LOG.debug, parameter[literal["Sent SMS: {}"], member[.message]]] call[LOG.debug, parameter[literal["Response status {}"], call[response.getStatus, parameter[]]]] call[LOG.debug, parameter[literal["Response body {}"], call[response.getBody, parameter[]]]] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SMS couldn't be sent through OVH: "), operandr=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="message")], member=get, postfix_operators=[], prefix_operators=[], qualifier=json, selectors=[MethodInvocation(arguments=[], member=asText, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), MemberReference(member=message, 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=MessageNotSentException, sub_type=None)), label=None) else begin[{] call[LOG.info, parameter[literal["SMS successfully sent through OVH"]]] call[LOG.debug, parameter[literal["Sent SMS: {}"], member[.message]]] call[LOG.debug, parameter[literal["Response: {}"], call[response.getBody, parameter[]]]] end[}] else begin[{] call[LOG.error, parameter[literal["Response status {}"], call[response.getStatus, parameter[]]]] call[LOG.error, parameter[literal["Response body {}"], call[response.getBody, parameter[]]]] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="SMS couldn't be sent. Response status is "), operandr=MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=response, selectors=[], type_arguments=None), operator=+), MemberReference(member=message, 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=MessageNotSentException, sub_type=None)), label=None) end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[handleResponse] operator[SEP] identifier[Sms] identifier[message] , identifier[Response] identifier[response] operator[SEP] Keyword[throws] identifier[IOException] , identifier[JsonProcessingException] , identifier[MessageNotSentException] { Keyword[if] operator[SEP] identifier[response] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] identifier[isSuccess] operator[SEP] operator[SEP] operator[SEP] { identifier[JsonNode] identifier[json] operator[=] identifier[mapper] operator[SEP] identifier[readTree] operator[SEP] identifier[response] operator[SEP] identifier[getBody] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[ovhStatus] operator[=] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asInt] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[ovhStatus] operator[>=] identifier[OK_STATUS] operator[SEP] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[message] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[response] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[response] operator[SEP] identifier[getBody] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[MessageNotSentException] operator[SEP] literal[String] operator[+] identifier[json] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[asText] operator[SEP] operator[SEP] , identifier[message] operator[SEP] operator[SEP] } Keyword[else] { identifier[LOG] operator[SEP] identifier[info] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[message] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[response] operator[SEP] identifier[getBody] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[else] { identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[response] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[LOG] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[response] operator[SEP] identifier[getBody] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[MessageNotSentException] operator[SEP] literal[String] operator[+] identifier[response] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] , identifier[message] operator[SEP] operator[SEP] } }
public void addNotBetween(Object attribute, Object value1, Object value2) { // PAW // addSelectionCriteria(ValueCriteria.buildNotBeweenCriteria(attribute, value1, value2, getAlias())); addSelectionCriteria(ValueCriteria.buildNotBeweenCriteria(attribute, value1, value2, getUserAlias(attribute))); }
class class_name[name] begin[{] method[addNotBetween, return_type[void], modifier[public], parameter[attribute, value1, value2]] begin[{] call[.addSelectionCriteria, parameter[call[ValueCriteria.buildNotBeweenCriteria, parameter[member[.attribute], member[.value1], member[.value2], call[.getUserAlias, parameter[member[.attribute]]]]]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[addNotBetween] operator[SEP] identifier[Object] identifier[attribute] , identifier[Object] identifier[value1] , identifier[Object] identifier[value2] operator[SEP] { identifier[addSelectionCriteria] operator[SEP] identifier[ValueCriteria] operator[SEP] identifier[buildNotBeweenCriteria] operator[SEP] identifier[attribute] , identifier[value1] , identifier[value2] , identifier[getUserAlias] operator[SEP] identifier[attribute] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
public static double[] flatten(double[][] array) { int size = 0; for (double[] a : array) { size += a.length; } double[] newArray = new double[size]; int i = 0; for (double[] a : array) { for (double d : a) { newArray[i++] = d; } } return newArray; }
class class_name[name] begin[{] method[flatten, return_type[type[double]], modifier[public static], parameter[array]] begin[{] local_variable[type[int], size] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=+=, value=MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=a, selectors=[])), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=a)], modifiers=set(), type=BasicType(dimensions=[None], name=double))), label=None) local_variable[type[double], newArray] local_variable[type[int], i] ForStatement(body=BlockStatement(label=None, statements=[ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=newArray, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MemberReference(member=d, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=a, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=d)], modifiers=set(), type=BasicType(dimensions=[], name=double))), label=None)]), control=EnhancedForControl(iterable=MemberReference(member=array, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=a)], modifiers=set(), type=BasicType(dimensions=[None], name=double))), label=None) return[member[.newArray]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[double] operator[SEP] operator[SEP] identifier[flatten] operator[SEP] Keyword[double] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[array] operator[SEP] { Keyword[int] identifier[size] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[a] operator[:] identifier[array] operator[SEP] { identifier[size] operator[+=] identifier[a] operator[SEP] identifier[length] operator[SEP] } Keyword[double] operator[SEP] operator[SEP] identifier[newArray] operator[=] Keyword[new] Keyword[double] operator[SEP] identifier[size] operator[SEP] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] Keyword[for] operator[SEP] Keyword[double] operator[SEP] operator[SEP] identifier[a] operator[:] identifier[array] operator[SEP] { Keyword[for] operator[SEP] Keyword[double] identifier[d] operator[:] identifier[a] operator[SEP] { identifier[newArray] operator[SEP] identifier[i] operator[++] operator[SEP] operator[=] identifier[d] operator[SEP] } } Keyword[return] identifier[newArray] operator[SEP] }
public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case RESULT_CODE: return isSetResultCode(); case MESSAGE: return isSetMessage(); } throw new IllegalStateException(); }
class class_name[name] begin[{] method[isSet, return_type[type[boolean]], modifier[public], parameter[field]] begin[{] if[binary_operation[member[.field], ==, 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=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] SwitchStatement(cases=[SwitchStatementCase(case=['RESULT_CODE'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=isSetResultCode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]), SwitchStatementCase(case=['MESSAGE'], statements=[ReturnStatement(expression=MethodInvocation(arguments=[], member=isSetMessage, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])], expression=MemberReference(member=field, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) ThrowStatement(expression=ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) end[}] END[}]
Keyword[public] Keyword[boolean] identifier[isSet] operator[SEP] identifier[_Fields] identifier[field] operator[SEP] { Keyword[if] operator[SEP] identifier[field] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] operator[SEP] operator[SEP] } Keyword[switch] operator[SEP] identifier[field] operator[SEP] { Keyword[case] identifier[RESULT_CODE] operator[:] Keyword[return] identifier[isSetResultCode] operator[SEP] operator[SEP] operator[SEP] Keyword[case] identifier[MESSAGE] operator[:] Keyword[return] identifier[isSetMessage] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] operator[SEP] operator[SEP] }
public T header(final String name, final String value) { headers.put(name, value); return _this(); }
class class_name[name] begin[{] method[header, return_type[type[T]], modifier[public], parameter[name, value]] begin[{] call[headers.put, parameter[member[.name], member[.value]]] return[call[._this, parameter[]]] end[}] END[}]
Keyword[public] identifier[T] identifier[header] operator[SEP] Keyword[final] identifier[String] identifier[name] , Keyword[final] identifier[String] identifier[value] operator[SEP] { identifier[headers] operator[SEP] identifier[put] operator[SEP] identifier[name] , identifier[value] operator[SEP] operator[SEP] Keyword[return] identifier[_this] operator[SEP] operator[SEP] operator[SEP] }
public OvhSOTPAccount accessRestriction_backupCode_GET() throws IOException { String qPath = "/me/accessRestriction/backupCode"; StringBuilder sb = path(qPath); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhSOTPAccount.class); }
class class_name[name] begin[{] method[accessRestriction_backupCode_GET, return_type[type[OvhSOTPAccount]], modifier[public], parameter[]] begin[{] local_variable[type[String], qPath] local_variable[type[StringBuilder], sb] local_variable[type[String], resp] return[call[.convertTo, parameter[member[.resp], ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=OvhSOTPAccount, sub_type=None))]]] end[}] END[}]
Keyword[public] identifier[OvhSOTPAccount] identifier[accessRestriction_backupCode_GET] operator[SEP] 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] operator[SEP] operator[SEP] identifier[String] identifier[resp] operator[=] identifier[exec] operator[SEP] identifier[qPath] , literal[String] , identifier[sb] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] Keyword[return] identifier[convertTo] operator[SEP] identifier[resp] , identifier[OvhSOTPAccount] operator[SEP] Keyword[class] operator[SEP] operator[SEP] }
public ApiResponse<ApiSuccessResponse> deleteAllStandardResponseFavoritesWithHttpInfo(RemoveAllFavoritesData removeAllFavoritesData) throws ApiException { com.squareup.okhttp.Call call = deleteAllStandardResponseFavoritesValidateBeforeCall(removeAllFavoritesData, null, null); Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
class class_name[name] begin[{] method[deleteAllStandardResponseFavoritesWithHttpInfo, return_type[type[ApiResponse]], modifier[public], parameter[removeAllFavoritesData]] 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[ApiSuccessResponse] operator[>] identifier[deleteAllStandardResponseFavoritesWithHttpInfo] operator[SEP] identifier[RemoveAllFavoritesData] identifier[removeAllFavoritesData] operator[SEP] Keyword[throws] identifier[ApiException] { identifier[com] operator[SEP] identifier[squareup] operator[SEP] identifier[okhttp] operator[SEP] identifier[Call] identifier[call] operator[=] identifier[deleteAllStandardResponseFavoritesValidateBeforeCall] operator[SEP] identifier[removeAllFavoritesData] , Other[null] , Other[null] operator[SEP] operator[SEP] identifier[Type] identifier[localVarReturnType] operator[=] Keyword[new] identifier[TypeToken] operator[<] identifier[ApiSuccessResponse] 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] }
public ZealotKhala likePattern(String field, String pattern) { return this.doLikePattern(ZealotConst.ONE_SPACE, field, pattern, true, true); }
class class_name[name] begin[{] method[likePattern, return_type[type[ZealotKhala]], modifier[public], parameter[field, pattern]] begin[{] return[THIS[call[None.doLikePattern, parameter[member[ZealotConst.ONE_SPACE], member[.field], member[.pattern], literal[true], literal[true]]]]] end[}] END[}]
Keyword[public] identifier[ZealotKhala] identifier[likePattern] operator[SEP] identifier[String] identifier[field] , identifier[String] identifier[pattern] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[doLikePattern] operator[SEP] identifier[ZealotConst] operator[SEP] identifier[ONE_SPACE] , identifier[field] , identifier[pattern] , literal[boolean] , literal[boolean] operator[SEP] operator[SEP] }
public List<PointIndex2D_F64> getLandmarkByIndex( QrCode qr) { pixelControl.get(0).set(qr.ppCorner.get(0)); pixelControl.get(1).set(qr.ppCorner.get(1)); pixelControl.get(2).set(qr.ppCorner.get(2)); pixelControl.get(3).set(qr.ppCorner.get(3)); pixelControl.get(4).set(qr.ppRight.get(0)); pixelControl.get(5).set(qr.ppRight.get(1)); pixelControl.get(6).set(qr.ppRight.get(2)); pixelControl.get(7).set(qr.ppRight.get(3)); pixelControl.get(8).set(qr.ppDown.get(0)); pixelControl.get(9).set(qr.ppDown.get(1)); pixelControl.get(10).set(qr.ppDown.get(2)); pixelControl.get(11).set(qr.ppDown.get(3)); // put it back into distorted pixels. Required by FiducialDetectorPnP for (int i = 0; i < pixelControl.size(); i++) { PointIndex2D_F64 p = pixelControl.get(i); undistToDist.compute(p.x,p.y,p); } return pixelControl; }
class class_name[name] begin[{] method[getLandmarkByIndex, return_type[type[List]], modifier[public], parameter[qr]] begin[{] call[pixelControl.get, parameter[literal[0]]] call[pixelControl.get, parameter[literal[1]]] call[pixelControl.get, parameter[literal[2]]] call[pixelControl.get, parameter[literal[3]]] call[pixelControl.get, parameter[literal[4]]] call[pixelControl.get, parameter[literal[5]]] call[pixelControl.get, parameter[literal[6]]] call[pixelControl.get, parameter[literal[7]]] call[pixelControl.get, parameter[literal[8]]] call[pixelControl.get, parameter[literal[9]]] call[pixelControl.get, parameter[literal[10]]] call[pixelControl.get, parameter[literal[11]]] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=pixelControl, selectors=[], type_arguments=None), name=p)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=PointIndex2D_F64, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[]), MemberReference(member=y, postfix_operators=[], prefix_operators=[], qualifier=p, selectors=[]), MemberReference(member=p, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=compute, postfix_operators=[], prefix_operators=[], qualifier=undistToDist, selectors=[], type_arguments=None), label=None)]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MethodInvocation(arguments=[], member=size, postfix_operators=[], prefix_operators=[], qualifier=pixelControl, selectors=[], type_arguments=None), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) return[member[.pixelControl]] end[}] END[}]
Keyword[public] identifier[List] operator[<] identifier[PointIndex2D_F64] operator[>] identifier[getLandmarkByIndex] operator[SEP] identifier[QrCode] identifier[qr] operator[SEP] { identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppCorner] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppCorner] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[2] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppCorner] operator[SEP] identifier[get] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[3] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppCorner] operator[SEP] identifier[get] operator[SEP] Other[3] operator[SEP] operator[SEP] operator[SEP] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[4] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppRight] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[5] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppRight] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[6] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppRight] operator[SEP] identifier[get] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[7] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppRight] operator[SEP] identifier[get] operator[SEP] Other[3] operator[SEP] operator[SEP] operator[SEP] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[8] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppDown] operator[SEP] identifier[get] operator[SEP] Other[0] operator[SEP] operator[SEP] operator[SEP] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[9] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppDown] operator[SEP] identifier[get] operator[SEP] Other[1] operator[SEP] operator[SEP] operator[SEP] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[10] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppDown] operator[SEP] identifier[get] operator[SEP] Other[2] operator[SEP] operator[SEP] operator[SEP] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] Other[11] operator[SEP] operator[SEP] identifier[set] operator[SEP] identifier[qr] operator[SEP] identifier[ppDown] operator[SEP] identifier[get] operator[SEP] Other[3] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[pixelControl] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[PointIndex2D_F64] identifier[p] operator[=] identifier[pixelControl] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] identifier[undistToDist] operator[SEP] identifier[compute] operator[SEP] identifier[p] operator[SEP] identifier[x] , identifier[p] operator[SEP] identifier[y] , identifier[p] operator[SEP] operator[SEP] } Keyword[return] identifier[pixelControl] operator[SEP] }
@Override protected void doIterationProcedure (final int n) { if (n == 1) return; // already initialized if (m_fFalse < 0) { m_fXNeg = m_fXFalse; // the root is in the xPos side m_fNeg = m_fFalse; } else { m_fXPos = m_fXFalse; // the root is in the xNeg side m_fPos = m_fFalse; } }
class class_name[name] begin[{] method[doIterationProcedure, return_type[void], modifier[protected], parameter[n]] begin[{] if[binary_operation[member[.n], ==, literal[1]]] begin[{] return[None] else begin[{] None end[}] if[binary_operation[member[.m_fFalse], <, literal[0]]] begin[{] assign[member[.m_fXNeg], member[.m_fXFalse]] assign[member[.m_fNeg], member[.m_fFalse]] else begin[{] assign[member[.m_fXPos], member[.m_fXFalse]] assign[member[.m_fPos], member[.m_fFalse]] end[}] end[}] END[}]
annotation[@] identifier[Override] Keyword[protected] Keyword[void] identifier[doIterationProcedure] operator[SEP] Keyword[final] Keyword[int] identifier[n] operator[SEP] { Keyword[if] operator[SEP] identifier[n] operator[==] Other[1] operator[SEP] Keyword[return] operator[SEP] Keyword[if] operator[SEP] identifier[m_fFalse] operator[<] Other[0] operator[SEP] { identifier[m_fXNeg] operator[=] identifier[m_fXFalse] operator[SEP] identifier[m_fNeg] operator[=] identifier[m_fFalse] operator[SEP] } Keyword[else] { identifier[m_fXPos] operator[=] identifier[m_fXFalse] operator[SEP] identifier[m_fPos] operator[=] identifier[m_fFalse] operator[SEP] } }
public static boolean datasetAlreadyCompacted(FileSystem fs, Dataset dataset, boolean renameSourceEnable) { if (renameSourceEnable) { return checkAlreadyCompactedBasedOnSourceDirName (fs, dataset); } else { return checkAlreadyCompactedBasedOnCompletionFile(fs, dataset); } }
class class_name[name] begin[{] method[datasetAlreadyCompacted, return_type[type[boolean]], modifier[public static], parameter[fs, dataset, renameSourceEnable]] begin[{] if[member[.renameSourceEnable]] begin[{] return[call[.checkAlreadyCompactedBasedOnSourceDirName, parameter[member[.fs], member[.dataset]]]] else begin[{] return[call[.checkAlreadyCompactedBasedOnCompletionFile, parameter[member[.fs], member[.dataset]]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[boolean] identifier[datasetAlreadyCompacted] operator[SEP] identifier[FileSystem] identifier[fs] , identifier[Dataset] identifier[dataset] , Keyword[boolean] identifier[renameSourceEnable] operator[SEP] { Keyword[if] operator[SEP] identifier[renameSourceEnable] operator[SEP] { Keyword[return] identifier[checkAlreadyCompactedBasedOnSourceDirName] operator[SEP] identifier[fs] , identifier[dataset] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[checkAlreadyCompactedBasedOnCompletionFile] operator[SEP] identifier[fs] , identifier[dataset] operator[SEP] operator[SEP] } }
public static List<List<Writable>> toRecords(DataSet dataSet) { if (isClassificationDataSet(dataSet)) { return getClassificationWritableMatrix(dataSet); } else { return getRegressionWritableMatrix(dataSet); } }
class class_name[name] begin[{] method[toRecords, return_type[type[List]], modifier[public static], parameter[dataSet]] begin[{] if[call[.isClassificationDataSet, parameter[member[.dataSet]]]] begin[{] return[call[.getClassificationWritableMatrix, parameter[member[.dataSet]]]] else begin[{] return[call[.getRegressionWritableMatrix, parameter[member[.dataSet]]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] identifier[List] operator[<] identifier[List] operator[<] identifier[Writable] operator[>] operator[>] identifier[toRecords] operator[SEP] identifier[DataSet] identifier[dataSet] operator[SEP] { Keyword[if] operator[SEP] identifier[isClassificationDataSet] operator[SEP] identifier[dataSet] operator[SEP] operator[SEP] { Keyword[return] identifier[getClassificationWritableMatrix] operator[SEP] identifier[dataSet] operator[SEP] operator[SEP] } Keyword[else] { Keyword[return] identifier[getRegressionWritableMatrix] operator[SEP] identifier[dataSet] operator[SEP] operator[SEP] } }
public void example() { News news = new News(); // tag::cache-set[] cache.set("item.key", news, 60 * 15); // end::cache-set[] // tag::cache-get[] News cached = cache.get("item.key"); // end::cache-get[] // tag::cache-remove[] cache.remove("item.key"); // end::cache-remove[] }
class class_name[name] begin[{] method[example, return_type[void], modifier[public], parameter[]] begin[{] local_variable[type[News], news] call[cache.set, parameter[literal["item.key"], member[.news], binary_operation[literal[60], *, literal[15]]]] local_variable[type[News], cached] call[cache.remove, parameter[literal["item.key"]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[example] operator[SEP] operator[SEP] { identifier[News] identifier[news] operator[=] Keyword[new] identifier[News] operator[SEP] operator[SEP] operator[SEP] identifier[cache] operator[SEP] identifier[set] operator[SEP] literal[String] , identifier[news] , Other[60] operator[*] Other[15] operator[SEP] operator[SEP] identifier[News] identifier[cached] operator[=] identifier[cache] operator[SEP] identifier[get] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[cache] operator[SEP] identifier[remove] operator[SEP] literal[String] operator[SEP] operator[SEP] }
@Deprecated public Membership addUserToProject(int projectId, int userId, Collection<Role> roles) throws RedmineException { return new Membership(transport) .setProject(new Project(transport).setId(projectId)) .setUserId(userId) .addRoles(roles) .create(); }
class class_name[name] begin[{] method[addUserToProject, return_type[type[Membership]], modifier[public], parameter[projectId, userId, roles]] begin[{] return[ClassCreator(arguments=[MemberReference(member=transport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[ClassCreator(arguments=[MemberReference(member=transport, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MethodInvocation(arguments=[MemberReference(member=projectId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Project, sub_type=None))], member=setProject, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=userId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=setUserId, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=roles, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=addRoles, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=create, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type=ReferenceType(arguments=None, dimensions=None, name=Membership, sub_type=None))] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] identifier[Membership] identifier[addUserToProject] operator[SEP] Keyword[int] identifier[projectId] , Keyword[int] identifier[userId] , identifier[Collection] operator[<] identifier[Role] operator[>] identifier[roles] operator[SEP] Keyword[throws] identifier[RedmineException] { Keyword[return] Keyword[new] identifier[Membership] operator[SEP] identifier[transport] operator[SEP] operator[SEP] identifier[setProject] operator[SEP] Keyword[new] identifier[Project] operator[SEP] identifier[transport] operator[SEP] operator[SEP] identifier[setId] operator[SEP] identifier[projectId] operator[SEP] operator[SEP] operator[SEP] identifier[setUserId] operator[SEP] identifier[userId] operator[SEP] operator[SEP] identifier[addRoles] operator[SEP] identifier[roles] operator[SEP] operator[SEP] identifier[create] operator[SEP] operator[SEP] operator[SEP] }
protected void handleOperation(Map<String, String> map, String operation) throws Exception { int index=operation.indexOf('.'); if(index == -1) throw new IllegalArgumentException("operation " + operation + " is missing the protocol name"); String prot_name=operation.substring(0, index); Protocol prot=ch.getProtocolStack().findProtocol(prot_name); if(prot == null) { log.error("protocol %s not found", prot_name); return; // less drastic than throwing an exception... } int args_index=operation.indexOf('['); String method_name; if(args_index != -1) method_name=operation.substring(index +1, args_index).trim(); else method_name=operation.substring(index+1).trim(); String[] args=null; if(args_index != -1) { int end_index=operation.indexOf(']'); if(end_index == -1) throw new IllegalArgumentException("] not found"); List<String> str_args=Util.parseCommaDelimitedStrings(operation.substring(args_index + 1, end_index)); Object[] strings=str_args.toArray(); args=new String[strings.length]; for(int i=0; i < strings.length; i++) args[i]=(String)strings[i]; } Method method=findMethod(prot, method_name, args); MethodCall call=new MethodCall(method); Object[] converted_args=null; if(args != null) { converted_args=new Object[args.length]; Class<?>[] types=method.getParameterTypes(); for(int i=0; i < args.length; i++) converted_args[i]=Util.convert(args[i], types[i]); } Object retval=call.invoke(prot, converted_args); if(retval != null) map.put(prot_name + "." + method_name, retval.toString()); }
class class_name[name] begin[{] method[handleOperation, return_type[void], modifier[protected], parameter[map, operation]] begin[{] local_variable[type[int], index] if[binary_operation[member[.index], ==, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="operation "), operandr=MemberReference(member=operation, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" is missing the protocol name"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[String], prot_name] local_variable[type[Protocol], prot] if[binary_operation[member[.prot], ==, literal[null]]] begin[{] call[log.error, parameter[literal["protocol %s not found"], member[.prot_name]]] return[None] else begin[{] None end[}] local_variable[type[int], args_index] local_variable[type[String], method_name] if[binary_operation[member[.args_index], !=, literal[1]]] begin[{] assign[member[.method_name], call[operation.substring, parameter[binary_operation[member[.index], +, literal[1]], member[.args_index]]]] else begin[{] assign[member[.method_name], call[operation.substring, parameter[binary_operation[member[.index], +, literal[1]]]]] end[}] local_variable[type[String], args] if[binary_operation[member[.args_index], !=, literal[1]]] begin[{] local_variable[type[int], end_index] if[binary_operation[member[.end_index], ==, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="] not found")], 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[List], str_args] local_variable[type[Object], strings] assign[member[.args], ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=strings, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=String, sub_type=None))] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=Cast(expression=MemberReference(member=strings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=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=strings, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] local_variable[type[Method], method] local_variable[type[MethodCall], call] local_variable[type[Object], converted_args] if[binary_operation[member[.args], !=, literal[null]]] begin[{] assign[member[.converted_args], ArrayCreator(dimensions=[MemberReference(member=length, postfix_operators=[], prefix_operators=[], qualifier=args, selectors=[])], initializer=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))] local_variable[type[Class], types] ForStatement(body=StatementExpression(expression=Assignment(expressionl=MemberReference(member=converted_args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), type==, value=MethodInvocation(arguments=[MemberReference(member=args, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))]), MemberReference(member=types, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[ArraySelector(index=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))])], member=convert, postfix_operators=[], prefix_operators=[], qualifier=Util, 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=args, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) else begin[{] None end[}] local_variable[type[Object], retval] if[binary_operation[member[.retval], !=, literal[null]]] begin[{] call[map.put, parameter[binary_operation[binary_operation[member[.prot_name], +, literal["."]], +, member[.method_name]], call[retval.toString, parameter[]]]] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[handleOperation] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[map] , identifier[String] identifier[operation] operator[SEP] Keyword[throws] identifier[Exception] { Keyword[int] identifier[index] operator[=] identifier[operation] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[index] operator[==] operator[-] Other[1] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[operation] operator[+] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[prot_name] operator[=] identifier[operation] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[index] operator[SEP] operator[SEP] identifier[Protocol] identifier[prot] operator[=] identifier[ch] operator[SEP] identifier[getProtocolStack] operator[SEP] operator[SEP] operator[SEP] identifier[findProtocol] operator[SEP] identifier[prot_name] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[prot] operator[==] Other[null] operator[SEP] { identifier[log] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[prot_name] operator[SEP] operator[SEP] Keyword[return] operator[SEP] } Keyword[int] identifier[args_index] operator[=] identifier[operation] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[String] identifier[method_name] operator[SEP] Keyword[if] operator[SEP] identifier[args_index] operator[!=] operator[-] Other[1] operator[SEP] identifier[method_name] operator[=] identifier[operation] operator[SEP] identifier[substring] operator[SEP] identifier[index] operator[+] Other[1] , identifier[args_index] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] Keyword[else] identifier[method_name] operator[=] identifier[operation] operator[SEP] identifier[substring] operator[SEP] identifier[index] operator[+] Other[1] operator[SEP] operator[SEP] identifier[trim] operator[SEP] operator[SEP] operator[SEP] identifier[String] operator[SEP] operator[SEP] identifier[args] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[args_index] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[int] identifier[end_index] operator[=] identifier[operation] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[end_index] operator[==] operator[-] Other[1] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[String] operator[>] identifier[str_args] operator[=] identifier[Util] operator[SEP] identifier[parseCommaDelimitedStrings] operator[SEP] identifier[operation] operator[SEP] identifier[substring] operator[SEP] identifier[args_index] operator[+] Other[1] , identifier[end_index] operator[SEP] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[strings] operator[=] identifier[str_args] operator[SEP] identifier[toArray] operator[SEP] operator[SEP] operator[SEP] identifier[args] operator[=] Keyword[new] identifier[String] operator[SEP] identifier[strings] operator[SEP] identifier[length] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[strings] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[args] operator[SEP] identifier[i] operator[SEP] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[strings] operator[SEP] identifier[i] operator[SEP] operator[SEP] } identifier[Method] identifier[method] operator[=] identifier[findMethod] operator[SEP] identifier[prot] , identifier[method_name] , identifier[args] operator[SEP] operator[SEP] identifier[MethodCall] identifier[call] operator[=] Keyword[new] identifier[MethodCall] operator[SEP] identifier[method] operator[SEP] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[converted_args] operator[=] Other[null] operator[SEP] Keyword[if] operator[SEP] identifier[args] operator[!=] Other[null] operator[SEP] { identifier[converted_args] operator[=] Keyword[new] identifier[Object] operator[SEP] identifier[args] operator[SEP] identifier[length] operator[SEP] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] operator[SEP] operator[SEP] identifier[types] operator[=] identifier[method] operator[SEP] identifier[getParameterTypes] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[args] operator[SEP] identifier[length] operator[SEP] identifier[i] operator[++] operator[SEP] identifier[converted_args] operator[SEP] identifier[i] operator[SEP] operator[=] identifier[Util] operator[SEP] identifier[convert] operator[SEP] identifier[args] operator[SEP] identifier[i] operator[SEP] , identifier[types] operator[SEP] identifier[i] operator[SEP] operator[SEP] operator[SEP] } identifier[Object] identifier[retval] operator[=] identifier[call] operator[SEP] identifier[invoke] operator[SEP] identifier[prot] , identifier[converted_args] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[retval] operator[!=] Other[null] operator[SEP] identifier[map] operator[SEP] identifier[put] operator[SEP] identifier[prot_name] operator[+] literal[String] operator[+] identifier[method_name] , identifier[retval] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Beta public static <T> boolean isInOrder(Iterable<? extends T> iterable, Comparator<T> comparator) { checkNotNull(comparator); Iterator<? extends T> it = iterable.iterator(); if (it.hasNext()) { T prev = it.next(); while (it.hasNext()) { T next = it.next(); if (comparator.compare(prev, next) > 0) { return false; } prev = next; } } return true; }
class class_name[name] begin[{] method[isInOrder, return_type[type[boolean]], modifier[public static], parameter[iterable, comparator]] begin[{] call[.checkNotNull, parameter[member[.comparator]]] local_variable[type[Iterator], it] if[call[it.hasNext, parameter[]]] begin[{] local_variable[type[T], prev] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[T], next] if[binary_operation[call[comparator.compare, parameter[member[.prev], member[.next]]], >, literal[0]]] begin[{] return[literal[false]] else begin[{] None end[}] assign[member[.prev], member[.next]] end[}] else begin[{] None end[}] return[literal[true]] end[}] END[}]
annotation[@] identifier[Beta] Keyword[public] Keyword[static] operator[<] identifier[T] operator[>] Keyword[boolean] identifier[isInOrder] operator[SEP] identifier[Iterable] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[iterable] , identifier[Comparator] operator[<] identifier[T] operator[>] identifier[comparator] operator[SEP] { identifier[checkNotNull] operator[SEP] identifier[comparator] operator[SEP] operator[SEP] identifier[Iterator] operator[<] operator[?] Keyword[extends] identifier[T] operator[>] identifier[it] operator[=] identifier[iterable] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[T] identifier[prev] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[T] identifier[next] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[comparator] operator[SEP] identifier[compare] operator[SEP] identifier[prev] , identifier[next] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[prev] operator[=] identifier[next] operator[SEP] } } Keyword[return] literal[boolean] operator[SEP] }
public final EObject ruleXOrExpression() throws RecognitionException { EObject current = null; EObject this_XAndExpression_0 = null; EObject lv_rightOperand_3_0 = null; enterRule(); try { // InternalPureXbase.g:1027:2: ( (this_XAndExpression_0= ruleXAndExpression ( ( ( ( () ( ( ruleOpOr ) ) ) )=> ( () ( ( ruleOpOr ) ) ) ) ( (lv_rightOperand_3_0= ruleXAndExpression ) ) )* ) ) // InternalPureXbase.g:1028:2: (this_XAndExpression_0= ruleXAndExpression ( ( ( ( () ( ( ruleOpOr ) ) ) )=> ( () ( ( ruleOpOr ) ) ) ) ( (lv_rightOperand_3_0= ruleXAndExpression ) ) )* ) { // InternalPureXbase.g:1028:2: (this_XAndExpression_0= ruleXAndExpression ( ( ( ( () ( ( ruleOpOr ) ) ) )=> ( () ( ( ruleOpOr ) ) ) ) ( (lv_rightOperand_3_0= ruleXAndExpression ) ) )* ) // InternalPureXbase.g:1029:3: this_XAndExpression_0= ruleXAndExpression ( ( ( ( () ( ( ruleOpOr ) ) ) )=> ( () ( ( ruleOpOr ) ) ) ) ( (lv_rightOperand_3_0= ruleXAndExpression ) ) )* { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXOrExpressionAccess().getXAndExpressionParserRuleCall_0()); } pushFollow(FOLLOW_20); this_XAndExpression_0=ruleXAndExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { current = this_XAndExpression_0; afterParserOrEnumRuleCall(); } // InternalPureXbase.g:1037:3: ( ( ( ( () ( ( ruleOpOr ) ) ) )=> ( () ( ( ruleOpOr ) ) ) ) ( (lv_rightOperand_3_0= ruleXAndExpression ) ) )* loop22: do { int alt22=2; int LA22_0 = input.LA(1); if ( (LA22_0==31) ) { int LA22_2 = input.LA(2); if ( (synpred10_InternalPureXbase()) ) { alt22=1; } } switch (alt22) { case 1 : // InternalPureXbase.g:1038:4: ( ( ( () ( ( ruleOpOr ) ) ) )=> ( () ( ( ruleOpOr ) ) ) ) ( (lv_rightOperand_3_0= ruleXAndExpression ) ) { // InternalPureXbase.g:1038:4: ( ( ( () ( ( ruleOpOr ) ) ) )=> ( () ( ( ruleOpOr ) ) ) ) // InternalPureXbase.g:1039:5: ( ( () ( ( ruleOpOr ) ) ) )=> ( () ( ( ruleOpOr ) ) ) { // InternalPureXbase.g:1049:5: ( () ( ( ruleOpOr ) ) ) // InternalPureXbase.g:1050:6: () ( ( ruleOpOr ) ) { // InternalPureXbase.g:1050:6: () // InternalPureXbase.g:1051:7: { if ( state.backtracking==0 ) { current = forceCreateModelElementAndSet( grammarAccess.getXOrExpressionAccess().getXBinaryOperationLeftOperandAction_1_0_0_0(), current); } } // InternalPureXbase.g:1057:6: ( ( ruleOpOr ) ) // InternalPureXbase.g:1058:7: ( ruleOpOr ) { // InternalPureXbase.g:1058:7: ( ruleOpOr ) // InternalPureXbase.g:1059:8: ruleOpOr { if ( state.backtracking==0 ) { if (current==null) { current = createModelElement(grammarAccess.getXOrExpressionRule()); } } if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXOrExpressionAccess().getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0()); } pushFollow(FOLLOW_3); ruleOpOr(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { afterParserOrEnumRuleCall(); } } } } } // InternalPureXbase.g:1075:4: ( (lv_rightOperand_3_0= ruleXAndExpression ) ) // InternalPureXbase.g:1076:5: (lv_rightOperand_3_0= ruleXAndExpression ) { // InternalPureXbase.g:1076:5: (lv_rightOperand_3_0= ruleXAndExpression ) // InternalPureXbase.g:1077:6: lv_rightOperand_3_0= ruleXAndExpression { if ( state.backtracking==0 ) { newCompositeNode(grammarAccess.getXOrExpressionAccess().getRightOperandXAndExpressionParserRuleCall_1_1_0()); } pushFollow(FOLLOW_20); lv_rightOperand_3_0=ruleXAndExpression(); state._fsp--; if (state.failed) return current; if ( state.backtracking==0 ) { if (current==null) { current = createModelElementForParent(grammarAccess.getXOrExpressionRule()); } set( current, "rightOperand", lv_rightOperand_3_0, "org.eclipse.xtext.xbase.Xbase.XAndExpression"); afterParserOrEnumRuleCall(); } } } } break; default : break loop22; } } while (true); } } if ( state.backtracking==0 ) { leaveRule(); } } catch (RecognitionException re) { recover(input,re); appendSkippedTokens(); } finally { } return current; }
class class_name[name] begin[{] method[ruleXOrExpression, return_type[type[EObject]], modifier[final public], parameter[]] begin[{] local_variable[type[EObject], current] local_variable[type[EObject], this_XAndExpression_0] local_variable[type[EObject], lv_rightOperand_3_0] call[.enterRule, parameter[]] TryStatement(block=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXOrExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getXAndExpressionParserRuleCall_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_20, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=this_XAndExpression_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXAndExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MemberReference(member=this_XAndExpression_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), DoStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2), name=alt22)], modifiers=set(), type=BasicType(dimensions=[], name=int)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA22_0)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=LA22_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=31), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=2)], member=LA, postfix_operators=[], prefix_operators=[], qualifier=input, selectors=[], type_arguments=None), name=LA22_2)], modifiers=set(), type=BasicType(dimensions=[], name=int)), IfStatement(condition=MethodInvocation(arguments=[], member=synpred10_InternalPureXbase, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=alt22, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)), label=None)]))])), SwitchStatement(cases=[SwitchStatementCase(case=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1)], statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXOrExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getXBinaryOperationLeftOperandAction_1_0_0_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=forceCreateModelElementAndSet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))]), BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXOrExpressionRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElement, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)]))])), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXOrExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=ruleOpOr, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])])])]), BlockStatement(label=None, statements=[BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXOrExpressionAccess, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[MethodInvocation(arguments=[], member=getRightOperandXAndExpressionParserRuleCall_1_1_0, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None)], member=newCompositeNode, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=FOLLOW_20, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=pushFollow, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=Assignment(expressionl=MemberReference(member=lv_rightOperand_3_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[], member=ruleXAndExpression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None), StatementExpression(expression=MemberReference(member=_fsp, postfix_operators=['--'], prefix_operators=[], qualifier=state, selectors=[]), label=None), IfStatement(condition=MemberReference(member=failed, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), else_statement=None, label=None, then_statement=ReturnStatement(expression=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getXOrExpressionRule, postfix_operators=[], prefix_operators=[], qualifier=grammarAccess, selectors=[], type_arguments=None)], member=createModelElementForParent, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=current, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="rightOperand"), MemberReference(member=lv_rightOperand_3_0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="org.eclipse.xtext.xbase.Xbase.XAndExpression")], member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=afterParserOrEnumRuleCall, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))])])]), BreakStatement(goto=None, label=None)]), SwitchStatementCase(case=[], statements=[BreakStatement(goto=loop22, label=None)])], expression=MemberReference(member=alt22, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)]), condition=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true), label=loop22)])]), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=backtracking, postfix_operators=[], prefix_operators=[], qualifier=state, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), operator===), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[], member=leaveRule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)]))], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=input, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=re, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=recover, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[], member=appendSkippedTokens, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=re, types=['RecognitionException']))], finally_block=[], label=None, resources=None) return[member[.current]] end[}] END[}]
Keyword[public] Keyword[final] identifier[EObject] identifier[ruleXOrExpression] operator[SEP] operator[SEP] Keyword[throws] identifier[RecognitionException] { identifier[EObject] identifier[current] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[this_XAndExpression_0] operator[=] Other[null] operator[SEP] identifier[EObject] identifier[lv_rightOperand_3_0] operator[=] Other[null] operator[SEP] identifier[enterRule] operator[SEP] operator[SEP] operator[SEP] Keyword[try] { { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXOrExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getXAndExpressionParserRuleCall_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_20] operator[SEP] operator[SEP] identifier[this_XAndExpression_0] operator[=] identifier[ruleXAndExpression] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[this_XAndExpression_0] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } identifier[loop22] operator[:] Keyword[do] { Keyword[int] identifier[alt22] operator[=] Other[2] operator[SEP] Keyword[int] identifier[LA22_0] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[LA22_0] operator[==] Other[31] operator[SEP] operator[SEP] { Keyword[int] identifier[LA22_2] operator[=] identifier[input] operator[SEP] identifier[LA] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[synpred10_InternalPureXbase] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[alt22] operator[=] Other[1] operator[SEP] } } Keyword[switch] operator[SEP] identifier[alt22] operator[SEP] { Keyword[case] Other[1] operator[:] { { { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[current] operator[=] identifier[forceCreateModelElementAndSet] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXOrExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getXBinaryOperationLeftOperandAction_1_0_0_0] operator[SEP] operator[SEP] , identifier[current] operator[SEP] operator[SEP] } } { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElement] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXOrExpressionRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXOrExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getFeatureJvmIdentifiableElementCrossReference_1_0_0_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_3] operator[SEP] operator[SEP] identifier[ruleOpOr] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } } } { { Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[newCompositeNode] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXOrExpressionAccess] operator[SEP] operator[SEP] operator[SEP] identifier[getRightOperandXAndExpressionParserRuleCall_1_1_0] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[pushFollow] operator[SEP] identifier[FOLLOW_20] operator[SEP] operator[SEP] identifier[lv_rightOperand_3_0] operator[=] identifier[ruleXAndExpression] operator[SEP] operator[SEP] operator[SEP] identifier[state] operator[SEP] identifier[_fsp] operator[--] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[failed] operator[SEP] Keyword[return] identifier[current] operator[SEP] Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { Keyword[if] operator[SEP] identifier[current] operator[==] Other[null] operator[SEP] { identifier[current] operator[=] identifier[createModelElementForParent] operator[SEP] identifier[grammarAccess] operator[SEP] identifier[getXOrExpressionRule] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[set] operator[SEP] identifier[current] , literal[String] , identifier[lv_rightOperand_3_0] , literal[String] operator[SEP] operator[SEP] identifier[afterParserOrEnumRuleCall] operator[SEP] operator[SEP] operator[SEP] } } } } Keyword[break] operator[SEP] Keyword[default] operator[:] Keyword[break] identifier[loop22] operator[SEP] } } Keyword[while] operator[SEP] literal[boolean] operator[SEP] operator[SEP] } } Keyword[if] operator[SEP] identifier[state] operator[SEP] identifier[backtracking] operator[==] Other[0] operator[SEP] { identifier[leaveRule] operator[SEP] operator[SEP] operator[SEP] } } Keyword[catch] operator[SEP] identifier[RecognitionException] identifier[re] operator[SEP] { identifier[recover] operator[SEP] identifier[input] , identifier[re] operator[SEP] operator[SEP] identifier[appendSkippedTokens] operator[SEP] operator[SEP] operator[SEP] } Keyword[finally] { } Keyword[return] identifier[current] operator[SEP] }
@SuppressWarnings("unchecked") @Override public EList<IfcPhysicalQuantity> getQuantities() { return (EList<IfcPhysicalQuantity>) eGet(Ifc4Package.Literals.IFC_ELEMENT_QUANTITY__QUANTITIES, true); }
class class_name[name] begin[{] method[getQuantities, return_type[type[EList]], modifier[public], parameter[]] begin[{] return[Cast(expression=MethodInvocation(arguments=[MemberReference(member=IFC_ELEMENT_QUANTITY__QUANTITIES, postfix_operators=[], prefix_operators=[], qualifier=Ifc4Package.Literals, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=eGet, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=IfcPhysicalQuantity, sub_type=None))], dimensions=[], name=EList, sub_type=None))] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] literal[String] operator[SEP] annotation[@] identifier[Override] Keyword[public] identifier[EList] operator[<] identifier[IfcPhysicalQuantity] operator[>] identifier[getQuantities] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] identifier[EList] operator[<] identifier[IfcPhysicalQuantity] operator[>] operator[SEP] identifier[eGet] operator[SEP] identifier[Ifc4Package] operator[SEP] identifier[Literals] operator[SEP] identifier[IFC_ELEMENT_QUANTITY__QUANTITIES] , literal[boolean] operator[SEP] operator[SEP] }
public static void fe_sq(int[] h, int[] f) { int f0 = f[0]; int f1 = f[1]; int f2 = f[2]; int f3 = f[3]; int f4 = f[4]; int f5 = f[5]; int f6 = f[6]; int f7 = f[7]; int f8 = f[8]; int f9 = f[9]; int f0_2 = 2 * f0; int f1_2 = 2 * f1; int f2_2 = 2 * f2; int f3_2 = 2 * f3; int f4_2 = 2 * f4; int f5_2 = 2 * f5; int f6_2 = 2 * f6; int f7_2 = 2 * f7; int f5_38 = 38 * f5; /* 1.959375*2^30 */ int f6_19 = 19 * f6; /* 1.959375*2^30 */ int f7_38 = 38 * f7; /* 1.959375*2^30 */ int f8_19 = 19 * f8; /* 1.959375*2^30 */ int f9_38 = 38 * f9; /* 1.959375*2^30 */ long f0f0 = f0 * (long) f0; long f0f1_2 = f0_2 * (long) f1; long f0f2_2 = f0_2 * (long) f2; long f0f3_2 = f0_2 * (long) f3; long f0f4_2 = f0_2 * (long) f4; long f0f5_2 = f0_2 * (long) f5; long f0f6_2 = f0_2 * (long) f6; long f0f7_2 = f0_2 * (long) f7; long f0f8_2 = f0_2 * (long) f8; long f0f9_2 = f0_2 * (long) f9; long f1f1_2 = f1_2 * (long) f1; long f1f2_2 = f1_2 * (long) f2; long f1f3_4 = f1_2 * (long) f3_2; long f1f4_2 = f1_2 * (long) f4; long f1f5_4 = f1_2 * (long) f5_2; long f1f6_2 = f1_2 * (long) f6; long f1f7_4 = f1_2 * (long) f7_2; long f1f8_2 = f1_2 * (long) f8; long f1f9_76 = f1_2 * (long) f9_38; long f2f2 = f2 * (long) f2; long f2f3_2 = f2_2 * (long) f3; long f2f4_2 = f2_2 * (long) f4; long f2f5_2 = f2_2 * (long) f5; long f2f6_2 = f2_2 * (long) f6; long f2f7_2 = f2_2 * (long) f7; long f2f8_38 = f2_2 * (long) f8_19; long f2f9_38 = f2 * (long) f9_38; long f3f3_2 = f3_2 * (long) f3; long f3f4_2 = f3_2 * (long) f4; long f3f5_4 = f3_2 * (long) f5_2; long f3f6_2 = f3_2 * (long) f6; long f3f7_76 = f3_2 * (long) f7_38; long f3f8_38 = f3_2 * (long) f8_19; long f3f9_76 = f3_2 * (long) f9_38; long f4f4 = f4 * (long) f4; long f4f5_2 = f4_2 * (long) f5; long f4f6_38 = f4_2 * (long) f6_19; long f4f7_38 = f4 * (long) f7_38; long f4f8_38 = f4_2 * (long) f8_19; long f4f9_38 = f4 * (long) f9_38; long f5f5_38 = f5 * (long) f5_38; long f5f6_38 = f5_2 * (long) f6_19; long f5f7_76 = f5_2 * (long) f7_38; long f5f8_38 = f5_2 * (long) f8_19; long f5f9_76 = f5_2 * (long) f9_38; long f6f6_19 = f6 * (long) f6_19; long f6f7_38 = f6 * (long) f7_38; long f6f8_38 = f6_2 * (long) f8_19; long f6f9_38 = f6 * (long) f9_38; long f7f7_38 = f7 * (long) f7_38; long f7f8_38 = f7_2 * (long) f8_19; long f7f9_76 = f7_2 * (long) f9_38; long f8f8_19 = f8 * (long) f8_19; long f8f9_38 = f8 * (long) f9_38; long f9f9_38 = f9 * (long) f9_38; long h0 = f0f0 + f1f9_76 + f2f8_38 + f3f7_76 + f4f6_38 + f5f5_38; long h1 = f0f1_2 + f2f9_38 + f3f8_38 + f4f7_38 + f5f6_38; long h2 = f0f2_2 + f1f1_2 + f3f9_76 + f4f8_38 + f5f7_76 + f6f6_19; long h3 = f0f3_2 + f1f2_2 + f4f9_38 + f5f8_38 + f6f7_38; long h4 = f0f4_2 + f1f3_4 + f2f2 + f5f9_76 + f6f8_38 + f7f7_38; long h5 = f0f5_2 + f1f4_2 + f2f3_2 + f6f9_38 + f7f8_38; long h6 = f0f6_2 + f1f5_4 + f2f4_2 + f3f3_2 + f7f9_76 + f8f8_19; long h7 = f0f7_2 + f1f6_2 + f2f5_2 + f3f4_2 + f8f9_38; long h8 = f0f8_2 + f1f7_4 + f2f6_2 + f3f5_4 + f4f4 + f9f9_38; long h9 = f0f9_2 + f1f8_2 + f2f7_2 + f3f6_2 + f4f5_2; long carry0; long carry1; long carry2; long carry3; long carry4; long carry5; long carry6; long carry7; long carry8; long carry9; carry0 = (h0 + (long) (1 << 25)) >> 26; h1 += carry0; h0 -= carry0 << 26; carry4 = (h4 + (long) (1 << 25)) >> 26; h5 += carry4; h4 -= carry4 << 26; carry1 = (h1 + (long) (1 << 24)) >> 25; h2 += carry1; h1 -= carry1 << 25; carry5 = (h5 + (long) (1 << 24)) >> 25; h6 += carry5; h5 -= carry5 << 25; carry2 = (h2 + (long) (1 << 25)) >> 26; h3 += carry2; h2 -= carry2 << 26; carry6 = (h6 + (long) (1 << 25)) >> 26; h7 += carry6; h6 -= carry6 << 26; carry3 = (h3 + (long) (1 << 24)) >> 25; h4 += carry3; h3 -= carry3 << 25; carry7 = (h7 + (long) (1 << 24)) >> 25; h8 += carry7; h7 -= carry7 << 25; carry4 = (h4 + (long) (1 << 25)) >> 26; h5 += carry4; h4 -= carry4 << 26; carry8 = (h8 + (long) (1 << 25)) >> 26; h9 += carry8; h8 -= carry8 << 26; carry9 = (h9 + (long) (1 << 24)) >> 25; h0 += carry9 * 19; h9 -= carry9 << 25; carry0 = (h0 + (long) (1 << 25)) >> 26; h1 += carry0; h0 -= carry0 << 26; h[0] = (int) h0; h[1] = (int) h1; h[2] = (int) h2; h[3] = (int) h3; h[4] = (int) h4; h[5] = (int) h5; h[6] = (int) h6; h[7] = (int) h7; h[8] = (int) h8; h[9] = (int) h9; }
class class_name[name] begin[{] method[fe_sq, return_type[void], modifier[public static], parameter[h, f]] begin[{] local_variable[type[int], f0] local_variable[type[int], f1] local_variable[type[int], f2] local_variable[type[int], f3] local_variable[type[int], f4] local_variable[type[int], f5] local_variable[type[int], f6] local_variable[type[int], f7] local_variable[type[int], f8] local_variable[type[int], f9] local_variable[type[int], f0_2] local_variable[type[int], f1_2] local_variable[type[int], f2_2] local_variable[type[int], f3_2] local_variable[type[int], f4_2] local_variable[type[int], f5_2] local_variable[type[int], f6_2] local_variable[type[int], f7_2] local_variable[type[int], f5_38] local_variable[type[int], f6_19] local_variable[type[int], f7_38] local_variable[type[int], f8_19] local_variable[type[int], f9_38] local_variable[type[long], f0f0] local_variable[type[long], f0f1_2] local_variable[type[long], f0f2_2] local_variable[type[long], f0f3_2] local_variable[type[long], f0f4_2] local_variable[type[long], f0f5_2] local_variable[type[long], f0f6_2] local_variable[type[long], f0f7_2] local_variable[type[long], f0f8_2] local_variable[type[long], f0f9_2] local_variable[type[long], f1f1_2] local_variable[type[long], f1f2_2] local_variable[type[long], f1f3_4] local_variable[type[long], f1f4_2] local_variable[type[long], f1f5_4] local_variable[type[long], f1f6_2] local_variable[type[long], f1f7_4] local_variable[type[long], f1f8_2] local_variable[type[long], f1f9_76] local_variable[type[long], f2f2] local_variable[type[long], f2f3_2] local_variable[type[long], f2f4_2] local_variable[type[long], f2f5_2] local_variable[type[long], f2f6_2] local_variable[type[long], f2f7_2] local_variable[type[long], f2f8_38] local_variable[type[long], f2f9_38] local_variable[type[long], f3f3_2] local_variable[type[long], f3f4_2] local_variable[type[long], f3f5_4] local_variable[type[long], f3f6_2] local_variable[type[long], f3f7_76] local_variable[type[long], f3f8_38] local_variable[type[long], f3f9_76] local_variable[type[long], f4f4] local_variable[type[long], f4f5_2] local_variable[type[long], f4f6_38] local_variable[type[long], f4f7_38] local_variable[type[long], f4f8_38] local_variable[type[long], f4f9_38] local_variable[type[long], f5f5_38] local_variable[type[long], f5f6_38] local_variable[type[long], f5f7_76] local_variable[type[long], f5f8_38] local_variable[type[long], f5f9_76] local_variable[type[long], f6f6_19] local_variable[type[long], f6f7_38] local_variable[type[long], f6f8_38] local_variable[type[long], f6f9_38] local_variable[type[long], f7f7_38] local_variable[type[long], f7f8_38] local_variable[type[long], f7f9_76] local_variable[type[long], f8f8_19] local_variable[type[long], f8f9_38] local_variable[type[long], f9f9_38] local_variable[type[long], h0] local_variable[type[long], h1] local_variable[type[long], h2] local_variable[type[long], h3] local_variable[type[long], h4] local_variable[type[long], h5] local_variable[type[long], h6] local_variable[type[long], h7] local_variable[type[long], h8] local_variable[type[long], h9] local_variable[type[long], carry0] local_variable[type[long], carry1] local_variable[type[long], carry2] local_variable[type[long], carry3] local_variable[type[long], carry4] local_variable[type[long], carry5] local_variable[type[long], carry6] local_variable[type[long], carry7] local_variable[type[long], carry8] local_variable[type[long], carry9] assign[member[.carry0], binary_operation[binary_operation[member[.h0], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[26]]] assign[member[.h1], member[.carry0]] assign[member[.h0], binary_operation[member[.carry0], <<, literal[26]]] assign[member[.carry4], binary_operation[binary_operation[member[.h4], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[26]]] assign[member[.h5], member[.carry4]] assign[member[.h4], binary_operation[member[.carry4], <<, literal[26]]] assign[member[.carry1], binary_operation[binary_operation[member[.h1], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[25]]] assign[member[.h2], member[.carry1]] assign[member[.h1], binary_operation[member[.carry1], <<, literal[25]]] assign[member[.carry5], binary_operation[binary_operation[member[.h5], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[25]]] assign[member[.h6], member[.carry5]] assign[member[.h5], binary_operation[member[.carry5], <<, literal[25]]] assign[member[.carry2], binary_operation[binary_operation[member[.h2], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[26]]] assign[member[.h3], member[.carry2]] assign[member[.h2], binary_operation[member[.carry2], <<, literal[26]]] assign[member[.carry6], binary_operation[binary_operation[member[.h6], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[26]]] assign[member[.h7], member[.carry6]] assign[member[.h6], binary_operation[member[.carry6], <<, literal[26]]] assign[member[.carry3], binary_operation[binary_operation[member[.h3], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[25]]] assign[member[.h4], member[.carry3]] assign[member[.h3], binary_operation[member[.carry3], <<, literal[25]]] assign[member[.carry7], binary_operation[binary_operation[member[.h7], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[25]]] assign[member[.h8], member[.carry7]] assign[member[.h7], binary_operation[member[.carry7], <<, literal[25]]] assign[member[.carry4], binary_operation[binary_operation[member[.h4], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[26]]] assign[member[.h5], member[.carry4]] assign[member[.h4], binary_operation[member[.carry4], <<, literal[26]]] assign[member[.carry8], binary_operation[binary_operation[member[.h8], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[26]]] assign[member[.h9], member[.carry8]] assign[member[.h8], binary_operation[member[.carry8], <<, literal[26]]] assign[member[.carry9], binary_operation[binary_operation[member[.h9], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=24), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[25]]] assign[member[.h0], binary_operation[member[.carry9], *, literal[19]]] assign[member[.h9], binary_operation[member[.carry9], <<, literal[25]]] assign[member[.carry0], binary_operation[binary_operation[member[.h0], +, Cast(expression=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=25), operator=<<), type=BasicType(dimensions=[], name=long))], >>, literal[26]]] assign[member[.h1], member[.carry0]] assign[member[.h0], binary_operation[member[.carry0], <<, literal[26]]] assign[member[.h], Cast(expression=MemberReference(member=h0, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] assign[member[.h], Cast(expression=MemberReference(member=h1, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] assign[member[.h], Cast(expression=MemberReference(member=h2, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] assign[member[.h], Cast(expression=MemberReference(member=h3, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] assign[member[.h], Cast(expression=MemberReference(member=h4, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] assign[member[.h], Cast(expression=MemberReference(member=h5, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] assign[member[.h], Cast(expression=MemberReference(member=h6, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] assign[member[.h], Cast(expression=MemberReference(member=h7, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] assign[member[.h], Cast(expression=MemberReference(member=h8, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] assign[member[.h], Cast(expression=MemberReference(member=h9, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=BasicType(dimensions=[], name=int))] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[fe_sq] operator[SEP] Keyword[int] operator[SEP] operator[SEP] identifier[h] , Keyword[int] operator[SEP] operator[SEP] identifier[f] operator[SEP] { Keyword[int] identifier[f0] operator[=] identifier[f] operator[SEP] Other[0] operator[SEP] operator[SEP] Keyword[int] identifier[f1] operator[=] identifier[f] operator[SEP] Other[1] operator[SEP] operator[SEP] Keyword[int] identifier[f2] operator[=] identifier[f] operator[SEP] Other[2] operator[SEP] operator[SEP] Keyword[int] identifier[f3] operator[=] identifier[f] operator[SEP] Other[3] operator[SEP] operator[SEP] Keyword[int] identifier[f4] operator[=] identifier[f] operator[SEP] Other[4] operator[SEP] operator[SEP] Keyword[int] identifier[f5] operator[=] identifier[f] operator[SEP] Other[5] operator[SEP] operator[SEP] Keyword[int] identifier[f6] operator[=] identifier[f] operator[SEP] Other[6] operator[SEP] operator[SEP] Keyword[int] identifier[f7] operator[=] identifier[f] operator[SEP] Other[7] operator[SEP] operator[SEP] Keyword[int] identifier[f8] operator[=] identifier[f] operator[SEP] Other[8] operator[SEP] operator[SEP] Keyword[int] identifier[f9] operator[=] identifier[f] operator[SEP] Other[9] operator[SEP] operator[SEP] Keyword[int] identifier[f0_2] operator[=] Other[2] operator[*] identifier[f0] operator[SEP] Keyword[int] identifier[f1_2] operator[=] Other[2] operator[*] identifier[f1] operator[SEP] Keyword[int] identifier[f2_2] operator[=] Other[2] operator[*] identifier[f2] operator[SEP] Keyword[int] identifier[f3_2] operator[=] Other[2] operator[*] identifier[f3] operator[SEP] Keyword[int] identifier[f4_2] operator[=] Other[2] operator[*] identifier[f4] operator[SEP] Keyword[int] identifier[f5_2] operator[=] Other[2] operator[*] identifier[f5] operator[SEP] Keyword[int] identifier[f6_2] operator[=] Other[2] operator[*] identifier[f6] operator[SEP] Keyword[int] identifier[f7_2] operator[=] Other[2] operator[*] identifier[f7] operator[SEP] Keyword[int] identifier[f5_38] operator[=] Other[38] operator[*] identifier[f5] operator[SEP] Keyword[int] identifier[f6_19] operator[=] Other[19] operator[*] identifier[f6] operator[SEP] Keyword[int] identifier[f7_38] operator[=] Other[38] operator[*] identifier[f7] operator[SEP] Keyword[int] identifier[f8_19] operator[=] Other[19] operator[*] identifier[f8] operator[SEP] Keyword[int] identifier[f9_38] operator[=] Other[38] operator[*] identifier[f9] operator[SEP] Keyword[long] identifier[f0f0] operator[=] identifier[f0] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f0] operator[SEP] Keyword[long] identifier[f0f1_2] operator[=] identifier[f0_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f1] operator[SEP] Keyword[long] identifier[f0f2_2] operator[=] identifier[f0_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f2] operator[SEP] Keyword[long] identifier[f0f3_2] operator[=] identifier[f0_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f3] operator[SEP] Keyword[long] identifier[f0f4_2] operator[=] identifier[f0_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f4] operator[SEP] Keyword[long] identifier[f0f5_2] operator[=] identifier[f0_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f5] operator[SEP] Keyword[long] identifier[f0f6_2] operator[=] identifier[f0_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f6] operator[SEP] Keyword[long] identifier[f0f7_2] operator[=] identifier[f0_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f7] operator[SEP] Keyword[long] identifier[f0f8_2] operator[=] identifier[f0_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f8] operator[SEP] Keyword[long] identifier[f0f9_2] operator[=] identifier[f0_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f9] operator[SEP] Keyword[long] identifier[f1f1_2] operator[=] identifier[f1_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f1] operator[SEP] Keyword[long] identifier[f1f2_2] operator[=] identifier[f1_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f2] operator[SEP] Keyword[long] identifier[f1f3_4] operator[=] identifier[f1_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f3_2] operator[SEP] Keyword[long] identifier[f1f4_2] operator[=] identifier[f1_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f4] operator[SEP] Keyword[long] identifier[f1f5_4] operator[=] identifier[f1_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f5_2] operator[SEP] Keyword[long] identifier[f1f6_2] operator[=] identifier[f1_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f6] operator[SEP] Keyword[long] identifier[f1f7_4] operator[=] identifier[f1_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f7_2] operator[SEP] Keyword[long] identifier[f1f8_2] operator[=] identifier[f1_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f8] operator[SEP] Keyword[long] identifier[f1f9_76] operator[=] identifier[f1_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f9_38] operator[SEP] Keyword[long] identifier[f2f2] operator[=] identifier[f2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f2] operator[SEP] Keyword[long] identifier[f2f3_2] operator[=] identifier[f2_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f3] operator[SEP] Keyword[long] identifier[f2f4_2] operator[=] identifier[f2_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f4] operator[SEP] Keyword[long] identifier[f2f5_2] operator[=] identifier[f2_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f5] operator[SEP] Keyword[long] identifier[f2f6_2] operator[=] identifier[f2_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f6] operator[SEP] Keyword[long] identifier[f2f7_2] operator[=] identifier[f2_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f7] operator[SEP] Keyword[long] identifier[f2f8_38] operator[=] identifier[f2_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f8_19] operator[SEP] Keyword[long] identifier[f2f9_38] operator[=] identifier[f2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f9_38] operator[SEP] Keyword[long] identifier[f3f3_2] operator[=] identifier[f3_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f3] operator[SEP] Keyword[long] identifier[f3f4_2] operator[=] identifier[f3_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f4] operator[SEP] Keyword[long] identifier[f3f5_4] operator[=] identifier[f3_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f5_2] operator[SEP] Keyword[long] identifier[f3f6_2] operator[=] identifier[f3_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f6] operator[SEP] Keyword[long] identifier[f3f7_76] operator[=] identifier[f3_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f7_38] operator[SEP] Keyword[long] identifier[f3f8_38] operator[=] identifier[f3_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f8_19] operator[SEP] Keyword[long] identifier[f3f9_76] operator[=] identifier[f3_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f9_38] operator[SEP] Keyword[long] identifier[f4f4] operator[=] identifier[f4] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f4] operator[SEP] Keyword[long] identifier[f4f5_2] operator[=] identifier[f4_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f5] operator[SEP] Keyword[long] identifier[f4f6_38] operator[=] identifier[f4_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f6_19] operator[SEP] Keyword[long] identifier[f4f7_38] operator[=] identifier[f4] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f7_38] operator[SEP] Keyword[long] identifier[f4f8_38] operator[=] identifier[f4_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f8_19] operator[SEP] Keyword[long] identifier[f4f9_38] operator[=] identifier[f4] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f9_38] operator[SEP] Keyword[long] identifier[f5f5_38] operator[=] identifier[f5] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f5_38] operator[SEP] Keyword[long] identifier[f5f6_38] operator[=] identifier[f5_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f6_19] operator[SEP] Keyword[long] identifier[f5f7_76] operator[=] identifier[f5_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f7_38] operator[SEP] Keyword[long] identifier[f5f8_38] operator[=] identifier[f5_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f8_19] operator[SEP] Keyword[long] identifier[f5f9_76] operator[=] identifier[f5_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f9_38] operator[SEP] Keyword[long] identifier[f6f6_19] operator[=] identifier[f6] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f6_19] operator[SEP] Keyword[long] identifier[f6f7_38] operator[=] identifier[f6] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f7_38] operator[SEP] Keyword[long] identifier[f6f8_38] operator[=] identifier[f6_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f8_19] operator[SEP] Keyword[long] identifier[f6f9_38] operator[=] identifier[f6] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f9_38] operator[SEP] Keyword[long] identifier[f7f7_38] operator[=] identifier[f7] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f7_38] operator[SEP] Keyword[long] identifier[f7f8_38] operator[=] identifier[f7_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f8_19] operator[SEP] Keyword[long] identifier[f7f9_76] operator[=] identifier[f7_2] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f9_38] operator[SEP] Keyword[long] identifier[f8f8_19] operator[=] identifier[f8] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f8_19] operator[SEP] Keyword[long] identifier[f8f9_38] operator[=] identifier[f8] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f9_38] operator[SEP] Keyword[long] identifier[f9f9_38] operator[=] identifier[f9] operator[*] operator[SEP] Keyword[long] operator[SEP] identifier[f9_38] operator[SEP] Keyword[long] identifier[h0] operator[=] identifier[f0f0] operator[+] identifier[f1f9_76] operator[+] identifier[f2f8_38] operator[+] identifier[f3f7_76] operator[+] identifier[f4f6_38] operator[+] identifier[f5f5_38] operator[SEP] Keyword[long] identifier[h1] operator[=] identifier[f0f1_2] operator[+] identifier[f2f9_38] operator[+] identifier[f3f8_38] operator[+] identifier[f4f7_38] operator[+] identifier[f5f6_38] operator[SEP] Keyword[long] identifier[h2] operator[=] identifier[f0f2_2] operator[+] identifier[f1f1_2] operator[+] identifier[f3f9_76] operator[+] identifier[f4f8_38] operator[+] identifier[f5f7_76] operator[+] identifier[f6f6_19] operator[SEP] Keyword[long] identifier[h3] operator[=] identifier[f0f3_2] operator[+] identifier[f1f2_2] operator[+] identifier[f4f9_38] operator[+] identifier[f5f8_38] operator[+] identifier[f6f7_38] operator[SEP] Keyword[long] identifier[h4] operator[=] identifier[f0f4_2] operator[+] identifier[f1f3_4] operator[+] identifier[f2f2] operator[+] identifier[f5f9_76] operator[+] identifier[f6f8_38] operator[+] identifier[f7f7_38] operator[SEP] Keyword[long] identifier[h5] operator[=] identifier[f0f5_2] operator[+] identifier[f1f4_2] operator[+] identifier[f2f3_2] operator[+] identifier[f6f9_38] operator[+] identifier[f7f8_38] operator[SEP] Keyword[long] identifier[h6] operator[=] identifier[f0f6_2] operator[+] identifier[f1f5_4] operator[+] identifier[f2f4_2] operator[+] identifier[f3f3_2] operator[+] identifier[f7f9_76] operator[+] identifier[f8f8_19] operator[SEP] Keyword[long] identifier[h7] operator[=] identifier[f0f7_2] operator[+] identifier[f1f6_2] operator[+] identifier[f2f5_2] operator[+] identifier[f3f4_2] operator[+] identifier[f8f9_38] operator[SEP] Keyword[long] identifier[h8] operator[=] identifier[f0f8_2] operator[+] identifier[f1f7_4] operator[+] identifier[f2f6_2] operator[+] identifier[f3f5_4] operator[+] identifier[f4f4] operator[+] identifier[f9f9_38] operator[SEP] Keyword[long] identifier[h9] operator[=] identifier[f0f9_2] operator[+] identifier[f1f8_2] operator[+] identifier[f2f7_2] operator[+] identifier[f3f6_2] operator[+] identifier[f4f5_2] operator[SEP] Keyword[long] identifier[carry0] operator[SEP] Keyword[long] identifier[carry1] operator[SEP] Keyword[long] identifier[carry2] operator[SEP] Keyword[long] identifier[carry3] operator[SEP] Keyword[long] identifier[carry4] operator[SEP] Keyword[long] identifier[carry5] operator[SEP] Keyword[long] identifier[carry6] operator[SEP] Keyword[long] identifier[carry7] operator[SEP] Keyword[long] identifier[carry8] operator[SEP] Keyword[long] identifier[carry9] operator[SEP] identifier[carry0] operator[=] operator[SEP] identifier[h0] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[25] operator[SEP] operator[SEP] operator[>] operator[>] Other[26] operator[SEP] identifier[h1] operator[+=] identifier[carry0] operator[SEP] identifier[h0] operator[-=] identifier[carry0] operator[<<] Other[26] operator[SEP] identifier[carry4] operator[=] operator[SEP] identifier[h4] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[25] operator[SEP] operator[SEP] operator[>] operator[>] Other[26] operator[SEP] identifier[h5] operator[+=] identifier[carry4] operator[SEP] identifier[h4] operator[-=] identifier[carry4] operator[<<] Other[26] operator[SEP] identifier[carry1] operator[=] operator[SEP] identifier[h1] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[24] operator[SEP] operator[SEP] operator[>] operator[>] Other[25] operator[SEP] identifier[h2] operator[+=] identifier[carry1] operator[SEP] identifier[h1] operator[-=] identifier[carry1] operator[<<] Other[25] operator[SEP] identifier[carry5] operator[=] operator[SEP] identifier[h5] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[24] operator[SEP] operator[SEP] operator[>] operator[>] Other[25] operator[SEP] identifier[h6] operator[+=] identifier[carry5] operator[SEP] identifier[h5] operator[-=] identifier[carry5] operator[<<] Other[25] operator[SEP] identifier[carry2] operator[=] operator[SEP] identifier[h2] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[25] operator[SEP] operator[SEP] operator[>] operator[>] Other[26] operator[SEP] identifier[h3] operator[+=] identifier[carry2] operator[SEP] identifier[h2] operator[-=] identifier[carry2] operator[<<] Other[26] operator[SEP] identifier[carry6] operator[=] operator[SEP] identifier[h6] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[25] operator[SEP] operator[SEP] operator[>] operator[>] Other[26] operator[SEP] identifier[h7] operator[+=] identifier[carry6] operator[SEP] identifier[h6] operator[-=] identifier[carry6] operator[<<] Other[26] operator[SEP] identifier[carry3] operator[=] operator[SEP] identifier[h3] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[24] operator[SEP] operator[SEP] operator[>] operator[>] Other[25] operator[SEP] identifier[h4] operator[+=] identifier[carry3] operator[SEP] identifier[h3] operator[-=] identifier[carry3] operator[<<] Other[25] operator[SEP] identifier[carry7] operator[=] operator[SEP] identifier[h7] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[24] operator[SEP] operator[SEP] operator[>] operator[>] Other[25] operator[SEP] identifier[h8] operator[+=] identifier[carry7] operator[SEP] identifier[h7] operator[-=] identifier[carry7] operator[<<] Other[25] operator[SEP] identifier[carry4] operator[=] operator[SEP] identifier[h4] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[25] operator[SEP] operator[SEP] operator[>] operator[>] Other[26] operator[SEP] identifier[h5] operator[+=] identifier[carry4] operator[SEP] identifier[h4] operator[-=] identifier[carry4] operator[<<] Other[26] operator[SEP] identifier[carry8] operator[=] operator[SEP] identifier[h8] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[25] operator[SEP] operator[SEP] operator[>] operator[>] Other[26] operator[SEP] identifier[h9] operator[+=] identifier[carry8] operator[SEP] identifier[h8] operator[-=] identifier[carry8] operator[<<] Other[26] operator[SEP] identifier[carry9] operator[=] operator[SEP] identifier[h9] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[24] operator[SEP] operator[SEP] operator[>] operator[>] Other[25] operator[SEP] identifier[h0] operator[+=] identifier[carry9] operator[*] Other[19] operator[SEP] identifier[h9] operator[-=] identifier[carry9] operator[<<] Other[25] operator[SEP] identifier[carry0] operator[=] operator[SEP] identifier[h0] operator[+] operator[SEP] Keyword[long] operator[SEP] operator[SEP] Other[1] operator[<<] Other[25] operator[SEP] operator[SEP] operator[>] operator[>] Other[26] operator[SEP] identifier[h1] operator[+=] identifier[carry0] operator[SEP] identifier[h0] operator[-=] identifier[carry0] operator[<<] Other[26] operator[SEP] identifier[h] operator[SEP] Other[0] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[h0] operator[SEP] identifier[h] operator[SEP] Other[1] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[h1] operator[SEP] identifier[h] operator[SEP] Other[2] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[h2] operator[SEP] identifier[h] operator[SEP] Other[3] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[h3] operator[SEP] identifier[h] operator[SEP] Other[4] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[h4] operator[SEP] identifier[h] operator[SEP] Other[5] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[h5] operator[SEP] identifier[h] operator[SEP] Other[6] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[h6] operator[SEP] identifier[h] operator[SEP] Other[7] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[h7] operator[SEP] identifier[h] operator[SEP] Other[8] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[h8] operator[SEP] identifier[h] operator[SEP] Other[9] operator[SEP] operator[=] operator[SEP] Keyword[int] operator[SEP] identifier[h9] operator[SEP] }
public <T extends FMLEvent> void registerCallback(Class<T> clazz, IFMLEventCallback<T> consumer) { super.registerCallback(consumer, CallbackOption.of((FMLEventPredicate<T>) clazz::isInstance)); }
class class_name[name] begin[{] method[registerCallback, return_type[void], modifier[public], parameter[clazz, consumer]] begin[{] SuperMethodInvocation(arguments=[MemberReference(member=consumer, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MethodReference(expression=Cast(expression=MemberReference(member=clazz, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=[TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=T, sub_type=None))], dimensions=[], name=FMLEventPredicate, sub_type=None)), method=MemberReference(member=isInstance, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type_arguments=[])], member=of, postfix_operators=[], prefix_operators=[], qualifier=CallbackOption, selectors=[], type_arguments=None)], member=registerCallback, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type_arguments=None) end[}] END[}]
Keyword[public] operator[<] identifier[T] Keyword[extends] identifier[FMLEvent] operator[>] Keyword[void] identifier[registerCallback] operator[SEP] identifier[Class] operator[<] identifier[T] operator[>] identifier[clazz] , identifier[IFMLEventCallback] operator[<] identifier[T] operator[>] identifier[consumer] operator[SEP] { Keyword[super] operator[SEP] identifier[registerCallback] operator[SEP] identifier[consumer] , identifier[CallbackOption] operator[SEP] identifier[of] operator[SEP] operator[SEP] identifier[FMLEventPredicate] operator[<] identifier[T] operator[>] operator[SEP] identifier[clazz] operator[::] identifier[isInstance] operator[SEP] operator[SEP] operator[SEP] }
public void setTemplate(ElemTemplate v) { if (null == m_templates) m_templates = new Vector(); m_templates.addElement(v); v.setStylesheet(this); }
class class_name[name] begin[{] method[setTemplate, return_type[void], modifier[public], parameter[v]] begin[{] if[binary_operation[literal[null], ==, member[.m_templates]]] begin[{] assign[member[.m_templates], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Vector, sub_type=None))] else begin[{] None end[}] call[m_templates.addElement, parameter[member[.v]]] call[v.setStylesheet, parameter[THIS[]]] end[}] END[}]
Keyword[public] Keyword[void] identifier[setTemplate] operator[SEP] identifier[ElemTemplate] identifier[v] operator[SEP] { Keyword[if] operator[SEP] Other[null] operator[==] identifier[m_templates] operator[SEP] identifier[m_templates] operator[=] Keyword[new] identifier[Vector] operator[SEP] operator[SEP] operator[SEP] identifier[m_templates] operator[SEP] identifier[addElement] operator[SEP] identifier[v] operator[SEP] operator[SEP] identifier[v] operator[SEP] identifier[setStylesheet] operator[SEP] Keyword[this] operator[SEP] operator[SEP] }
public GV3CompressedFunction<T> build() throws IOException { if (built) throw new IllegalStateException("This builder has been already used"); if (codec == null) codec = new Codec.Huffman(); built = true; if (transform == null) { if (chunkedHashStore != null) transform = chunkedHashStore.transform(); else throw new IllegalArgumentException("You must specify a TransformationStrategy, either explicitly or via a given ChunkedHashStore"); } return new GV3CompressedFunction<>(keys, transform, values, indirect, tempDir, chunkedHashStore, codec); }
class class_name[name] begin[{] method[build, return_type[type[GV3CompressedFunction]], modifier[public], parameter[]] begin[{] if[member[.built]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="This builder has been already used")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.codec], ==, literal[null]]] begin[{] assign[member[.codec], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Codec, sub_type=ReferenceType(arguments=None, dimensions=None, name=Huffman, sub_type=None)))] else begin[{] None end[}] assign[member[.built], literal[true]] if[binary_operation[member[.transform], ==, literal[null]]] begin[{] if[binary_operation[member[.chunkedHashStore], !=, literal[null]]] begin[{] assign[member[.transform], call[chunkedHashStore.transform, parameter[]]] else begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="You must specify a TransformationStrategy, either explicitly or via a given ChunkedHashStore")], 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[}] else begin[{] None end[}] return[ClassCreator(arguments=[MemberReference(member=keys, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=transform, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=values, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=indirect, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=tempDir, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=chunkedHashStore, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=codec, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=GV3CompressedFunction, sub_type=None))] end[}] END[}]
Keyword[public] identifier[GV3CompressedFunction] operator[<] identifier[T] operator[>] identifier[build] operator[SEP] operator[SEP] Keyword[throws] identifier[IOException] { Keyword[if] operator[SEP] identifier[built] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[codec] operator[==] Other[null] operator[SEP] identifier[codec] operator[=] Keyword[new] identifier[Codec] operator[SEP] identifier[Huffman] operator[SEP] operator[SEP] operator[SEP] identifier[built] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] identifier[transform] operator[==] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[chunkedHashStore] operator[!=] Other[null] operator[SEP] identifier[transform] operator[=] identifier[chunkedHashStore] operator[SEP] identifier[transform] operator[SEP] operator[SEP] operator[SEP] Keyword[else] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] Keyword[new] identifier[GV3CompressedFunction] operator[<] operator[>] operator[SEP] identifier[keys] , identifier[transform] , identifier[values] , identifier[indirect] , identifier[tempDir] , identifier[chunkedHashStore] , identifier[codec] operator[SEP] operator[SEP] }
private static RowMapper getMapper(Class<? extends RowMapper> rowMapper, ResultSet rs, Class returnType, Calendar cal) { Constructor c = null; try { c = rowMapper.getDeclaredConstructor(_params); return (RowMapper) c.newInstance(new Object[]{rs, returnType, cal}); } catch (NoSuchMethodException e) { throw new ControlException("Failure creating new instance of RowMapper, " + e.toString(), e); } catch (InstantiationException e) { throw new ControlException("Failure creating new instance of RowMapper, " + e.toString(), e); } catch (IllegalAccessException e) { throw new ControlException("Failure creating new instance of RowMapper, " + e.toString(), e); } catch (InvocationTargetException e) { throw new ControlException("Failure creating new instance of RowMapper, " + e.getCause().toString(), e); } }
class class_name[name] begin[{] method[getMapper, return_type[type[RowMapper]], modifier[private static], parameter[rowMapper, rs, returnType, cal]] begin[{] local_variable[type[Constructor], c] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=c, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MemberReference(member=_params, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getDeclaredConstructor, postfix_operators=[], prefix_operators=[], qualifier=rowMapper, selectors=[], type_arguments=None)), label=None), ReturnStatement(expression=Cast(expression=MethodInvocation(arguments=[ArrayCreator(dimensions=[None], initializer=ArrayInitializer(initializers=[MemberReference(member=rs, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=returnType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cal, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])]), postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Object, sub_type=None))], member=newInstance, postfix_operators=[], prefix_operators=[], qualifier=c, selectors=[], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=RowMapper, sub_type=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failure creating new instance of RowMapper, "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ControlException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['NoSuchMethodException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failure creating new instance of RowMapper, "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ControlException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InstantiationException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failure creating new instance of RowMapper, "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ControlException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['IllegalAccessException'])), CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Failure creating new instance of RowMapper, "), operandr=MethodInvocation(arguments=[], member=getCause, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[MethodInvocation(arguments=[], member=toString, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=ControlException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['InvocationTargetException']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[private] Keyword[static] identifier[RowMapper] identifier[getMapper] operator[SEP] identifier[Class] operator[<] operator[?] Keyword[extends] identifier[RowMapper] operator[>] identifier[rowMapper] , identifier[ResultSet] identifier[rs] , identifier[Class] identifier[returnType] , identifier[Calendar] identifier[cal] operator[SEP] { identifier[Constructor] identifier[c] operator[=] Other[null] operator[SEP] Keyword[try] { identifier[c] operator[=] identifier[rowMapper] operator[SEP] identifier[getDeclaredConstructor] operator[SEP] identifier[_params] operator[SEP] operator[SEP] Keyword[return] operator[SEP] identifier[RowMapper] operator[SEP] identifier[c] operator[SEP] identifier[newInstance] operator[SEP] Keyword[new] identifier[Object] operator[SEP] operator[SEP] { identifier[rs] , identifier[returnType] , identifier[cal] } operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[NoSuchMethodException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ControlException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InstantiationException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ControlException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IllegalAccessException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ControlException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[InvocationTargetException] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[ControlException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getCause] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@SuppressWarnings({ "unchecked", "rawtypes" }) public Option<ReactiveSeq<V>> reactiveSeq(final K key) { return get(key).map(a -> a.stream()); }
class class_name[name] begin[{] method[reactiveSeq, return_type[type[Option]], modifier[public], parameter[key]] begin[{] return[call[.get, parameter[member[.key]]]] end[}] END[}]
annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] Keyword[public] identifier[Option] operator[<] identifier[ReactiveSeq] operator[<] identifier[V] operator[>] operator[>] identifier[reactiveSeq] operator[SEP] Keyword[final] identifier[K] identifier[key] operator[SEP] { Keyword[return] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] identifier[map] operator[SEP] identifier[a] operator[->] identifier[a] operator[SEP] identifier[stream] operator[SEP] operator[SEP] operator[SEP] operator[SEP] }
@Override @InService(PageServiceImpl.class) void writeImpl(TableKelp table, PageServiceImpl pageServiceImpl, TableWriterService readWrite, SegmentStream sOut, long oldSequence, int saveLength, int saveTail) { Objects.requireNonNull(sOut); // System.out.println("WIMPL:" + this + " "+ Long.toHexString(System.identityHashCode(this)) + " " + _stub); if (saveLength <= 0 || oldSequence != sOut.getSequence() || _stub == null || ! _stub.allowDelta()) { PageLeafImpl newPage; if (! isDirty() && (_blocks.length == 0 || _blocks[0].isCompact())) { newPage = copy(getSequence()); } else { newPage = compact(table); } int sequenceWrite = newPage.nextWriteSequence(); if (! pageServiceImpl.compareAndSetLeaf(this, newPage) && ! pageServiceImpl.compareAndSetLeaf(_stub, newPage)) { System.out.println("HMPH: " + pageServiceImpl.getPage(getId()) + " " + this + " " + _stub); } saveLength = newPage.getDataLengthWritten(); // newPage.write(db, pageActor, sOut, saveLength); // oldSequence = newPage.getSequence(); saveTail = newPage.getSaveTail(); newPage.clearDirty(); readWrite.writePage(newPage, sOut, oldSequence, saveLength, saveTail, sequenceWrite, Result.of(x->newPage.afterDataFlush(pageServiceImpl, sequenceWrite))); } else { int sequenceWrite = nextWriteSequence(); clearDirty(); readWrite.writePage(this, sOut, oldSequence, saveLength, saveTail, sequenceWrite, Result.of(x->afterDataFlush(pageServiceImpl, sequenceWrite))); } }
class class_name[name] begin[{] method[writeImpl, return_type[void], modifier[default], parameter[table, pageServiceImpl, readWrite, sOut, oldSequence, saveLength, saveTail]] begin[{] call[Objects.requireNonNull, parameter[member[.sOut]]] if[binary_operation[binary_operation[binary_operation[binary_operation[member[.saveLength], <=, literal[0]], ||, binary_operation[member[.oldSequence], !=, call[sOut.getSequence, parameter[]]]], ||, binary_operation[member[._stub], ==, literal[null]]], ||, call[_stub.allowDelta, parameter[]]]] begin[{] local_variable[type[PageLeafImpl], newPage] if[binary_operation[call[.isDirty, parameter[]], &&, binary_operation[binary_operation[member[_blocks.length], ==, literal[0]], ||, member[._blocks]]]] begin[{] assign[member[.newPage], call[.copy, parameter[call[.getSequence, parameter[]]]]] else begin[{] assign[member[.newPage], call[.compact, parameter[member[.table]]]] end[}] local_variable[type[int], sequenceWrite] if[binary_operation[call[pageServiceImpl.compareAndSetLeaf, parameter[THIS[], member[.newPage]]], &&, call[pageServiceImpl.compareAndSetLeaf, parameter[member[._stub], member[.newPage]]]]] begin[{] call[System.out.println, parameter[binary_operation[binary_operation[binary_operation[binary_operation[binary_operation[literal["HMPH: "], +, call[pageServiceImpl.getPage, parameter[call[.getId, parameter[]]]]], +, literal[" "]], +, THIS[]], +, literal[" "]], +, member[._stub]]]] else begin[{] None end[}] assign[member[.saveLength], call[newPage.getDataLengthWritten, parameter[]]] assign[member[.saveTail], call[newPage.getSaveTail, parameter[]]] call[newPage.clearDirty, parameter[]] call[readWrite.writePage, parameter[member[.newPage], member[.sOut], member[.oldSequence], member[.saveLength], member[.saveTail], member[.sequenceWrite], call[Result.of, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=pageServiceImpl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sequenceWrite, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=afterDataFlush, postfix_operators=[], prefix_operators=[], qualifier=newPage, selectors=[], type_arguments=None), parameters=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]]] else begin[{] local_variable[type[int], sequenceWrite] call[.clearDirty, parameter[]] call[readWrite.writePage, parameter[THIS[], member[.sOut], member[.oldSequence], member[.saveLength], member[.saveTail], member[.sequenceWrite], call[Result.of, parameter[LambdaExpression(body=MethodInvocation(arguments=[MemberReference(member=pageServiceImpl, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=sequenceWrite, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=afterDataFlush, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), parameters=[MemberReference(member=x, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])]]]] end[}] end[}] END[}]
annotation[@] identifier[Override] annotation[@] identifier[InService] operator[SEP] identifier[PageServiceImpl] operator[SEP] Keyword[class] operator[SEP] Keyword[void] identifier[writeImpl] operator[SEP] identifier[TableKelp] identifier[table] , identifier[PageServiceImpl] identifier[pageServiceImpl] , identifier[TableWriterService] identifier[readWrite] , identifier[SegmentStream] identifier[sOut] , Keyword[long] identifier[oldSequence] , Keyword[int] identifier[saveLength] , Keyword[int] identifier[saveTail] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[sOut] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[saveLength] operator[<=] Other[0] operator[||] identifier[oldSequence] operator[!=] identifier[sOut] operator[SEP] identifier[getSequence] operator[SEP] operator[SEP] operator[||] identifier[_stub] operator[==] Other[null] operator[||] operator[!] identifier[_stub] operator[SEP] identifier[allowDelta] operator[SEP] operator[SEP] operator[SEP] { identifier[PageLeafImpl] identifier[newPage] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isDirty] operator[SEP] operator[SEP] operator[&&] operator[SEP] identifier[_blocks] operator[SEP] identifier[length] operator[==] Other[0] operator[||] identifier[_blocks] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[isCompact] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { identifier[newPage] operator[=] identifier[copy] operator[SEP] identifier[getSequence] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[newPage] operator[=] identifier[compact] operator[SEP] identifier[table] operator[SEP] operator[SEP] } Keyword[int] identifier[sequenceWrite] operator[=] identifier[newPage] operator[SEP] identifier[nextWriteSequence] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[pageServiceImpl] operator[SEP] identifier[compareAndSetLeaf] operator[SEP] Keyword[this] , identifier[newPage] operator[SEP] operator[&&] operator[!] identifier[pageServiceImpl] operator[SEP] identifier[compareAndSetLeaf] operator[SEP] identifier[_stub] , identifier[newPage] operator[SEP] operator[SEP] { identifier[System] operator[SEP] identifier[out] operator[SEP] identifier[println] operator[SEP] literal[String] operator[+] identifier[pageServiceImpl] operator[SEP] identifier[getPage] operator[SEP] identifier[getId] operator[SEP] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] Keyword[this] operator[+] literal[String] operator[+] identifier[_stub] operator[SEP] operator[SEP] } identifier[saveLength] operator[=] identifier[newPage] operator[SEP] identifier[getDataLengthWritten] operator[SEP] operator[SEP] operator[SEP] identifier[saveTail] operator[=] identifier[newPage] operator[SEP] identifier[getSaveTail] operator[SEP] operator[SEP] operator[SEP] identifier[newPage] operator[SEP] identifier[clearDirty] operator[SEP] operator[SEP] operator[SEP] identifier[readWrite] operator[SEP] identifier[writePage] operator[SEP] identifier[newPage] , identifier[sOut] , identifier[oldSequence] , identifier[saveLength] , identifier[saveTail] , identifier[sequenceWrite] , identifier[Result] operator[SEP] identifier[of] operator[SEP] identifier[x] operator[->] identifier[newPage] operator[SEP] identifier[afterDataFlush] operator[SEP] identifier[pageServiceImpl] , identifier[sequenceWrite] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { Keyword[int] identifier[sequenceWrite] operator[=] identifier[nextWriteSequence] operator[SEP] operator[SEP] operator[SEP] identifier[clearDirty] operator[SEP] operator[SEP] operator[SEP] identifier[readWrite] operator[SEP] identifier[writePage] operator[SEP] Keyword[this] , identifier[sOut] , identifier[oldSequence] , identifier[saveLength] , identifier[saveTail] , identifier[sequenceWrite] , identifier[Result] operator[SEP] identifier[of] operator[SEP] identifier[x] operator[->] identifier[afterDataFlush] operator[SEP] identifier[pageServiceImpl] , identifier[sequenceWrite] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } }
@TargetApi(Build.VERSION_CODES.JELLY_BEAN) public int getMaxWidth (){ if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) return mInputView.getMaxWidth(); return -1; }
class class_name[name] begin[{] method[getMaxWidth, return_type[type[int]], modifier[public], parameter[]] begin[{] if[binary_operation[member[Build.VERSION.SDK_INT], >=, member[Build.VERSION_CODES.JELLY_BEAN]]] begin[{] return[call[mInputView.getMaxWidth, parameter[]]] else begin[{] None end[}] return[literal[1]] end[}] END[}]
annotation[@] identifier[TargetApi] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[JELLY_BEAN] operator[SEP] Keyword[public] Keyword[int] identifier[getMaxWidth] operator[SEP] operator[SEP] { Keyword[if] operator[SEP] identifier[Build] operator[SEP] identifier[VERSION] operator[SEP] identifier[SDK_INT] operator[>=] identifier[Build] operator[SEP] identifier[VERSION_CODES] operator[SEP] identifier[JELLY_BEAN] operator[SEP] Keyword[return] identifier[mInputView] operator[SEP] identifier[getMaxWidth] operator[SEP] operator[SEP] operator[SEP] Keyword[return] operator[-] Other[1] operator[SEP] }
protected String getAlternatePrincipal(final X509Certificate certificate) { if (alternatePrincipalAttribute == null) { return null; } val attributes = extractPersonAttributes(certificate); val attribute = attributes.get(alternatePrincipalAttribute); if (attribute == null) { LOGGER.debug("Attempt to get alternate principal with attribute [{}] was unsuccessful.", alternatePrincipalAttribute); return null; } val optionalAttribute = CollectionUtils.firstElement(attribute); if (optionalAttribute.isEmpty()) { LOGGER.debug("Alternate attribute list for [{}] was empty.", alternatePrincipalAttribute); return null; } val alternatePrincipal = optionalAttribute.get().toString(); if (StringUtils.isNotEmpty(alternatePrincipal)) { LOGGER.debug("Using alternate principal attribute [{}]", alternatePrincipal); return alternatePrincipal; } LOGGER.debug("Returning null principal id..."); return null; }
class class_name[name] begin[{] method[getAlternatePrincipal, return_type[type[String]], modifier[protected], parameter[certificate]] begin[{] if[binary_operation[member[.alternatePrincipalAttribute], ==, literal[null]]] begin[{] return[literal[null]] else begin[{] None end[}] local_variable[type[val], attributes] local_variable[type[val], attribute] if[binary_operation[member[.attribute], ==, literal[null]]] begin[{] call[LOGGER.debug, parameter[literal["Attempt to get alternate principal with attribute [{}] was unsuccessful."], member[.alternatePrincipalAttribute]]] return[literal[null]] else begin[{] None end[}] local_variable[type[val], optionalAttribute] if[call[optionalAttribute.isEmpty, parameter[]]] begin[{] call[LOGGER.debug, parameter[literal["Alternate attribute list for [{}] was empty."], member[.alternatePrincipalAttribute]]] return[literal[null]] else begin[{] None end[}] local_variable[type[val], alternatePrincipal] if[call[StringUtils.isNotEmpty, parameter[member[.alternatePrincipal]]]] begin[{] call[LOGGER.debug, parameter[literal["Using alternate principal attribute [{}]"], member[.alternatePrincipal]]] return[member[.alternatePrincipal]] else begin[{] None end[}] call[LOGGER.debug, parameter[literal["Returning null principal id..."]]] return[literal[null]] end[}] END[}]
Keyword[protected] identifier[String] identifier[getAlternatePrincipal] operator[SEP] Keyword[final] identifier[X509Certificate] identifier[certificate] operator[SEP] { Keyword[if] operator[SEP] identifier[alternatePrincipalAttribute] operator[==] Other[null] operator[SEP] { Keyword[return] Other[null] operator[SEP] } identifier[val] identifier[attributes] operator[=] identifier[extractPersonAttributes] operator[SEP] identifier[certificate] operator[SEP] operator[SEP] identifier[val] identifier[attribute] operator[=] identifier[attributes] operator[SEP] identifier[get] operator[SEP] identifier[alternatePrincipalAttribute] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attribute] operator[==] Other[null] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[alternatePrincipalAttribute] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } identifier[val] identifier[optionalAttribute] operator[=] identifier[CollectionUtils] operator[SEP] identifier[firstElement] operator[SEP] identifier[attribute] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[optionalAttribute] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[alternatePrincipalAttribute] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] } identifier[val] identifier[alternatePrincipal] operator[=] identifier[optionalAttribute] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isNotEmpty] operator[SEP] identifier[alternatePrincipal] operator[SEP] operator[SEP] { identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[alternatePrincipal] operator[SEP] operator[SEP] Keyword[return] identifier[alternatePrincipal] operator[SEP] } identifier[LOGGER] operator[SEP] identifier[debug] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Other[null] operator[SEP] }
@Override public NavigableMap<Integer, IScan> getScansByNumSpanAtMsLevel(int numStart, int numEnd, int msLevel) { NavigableMap<Integer, IScan> subMap = null; TreeMap<Integer, IScan> msLevelMap = getMapMsLevel2index().get(msLevel).getNum2scan(); if (msLevelMap != null) { subMap = msLevelMap.subMap(numStart, true, numEnd, true); } if (subMap != null && subMap.size() > 0) { return subMap; } return null; }
class class_name[name] begin[{] method[getScansByNumSpanAtMsLevel, return_type[type[NavigableMap]], modifier[public], parameter[numStart, numEnd, msLevel]] begin[{] local_variable[type[NavigableMap], subMap] local_variable[type[TreeMap], msLevelMap] if[binary_operation[member[.msLevelMap], !=, literal[null]]] begin[{] assign[member[.subMap], call[msLevelMap.subMap, parameter[member[.numStart], literal[true], member[.numEnd], literal[true]]]] else begin[{] None end[}] if[binary_operation[binary_operation[member[.subMap], !=, literal[null]], &&, binary_operation[call[subMap.size, parameter[]], >, literal[0]]]] begin[{] return[member[.subMap]] else begin[{] None end[}] return[literal[null]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[NavigableMap] operator[<] identifier[Integer] , identifier[IScan] operator[>] identifier[getScansByNumSpanAtMsLevel] operator[SEP] Keyword[int] identifier[numStart] , Keyword[int] identifier[numEnd] , Keyword[int] identifier[msLevel] operator[SEP] { identifier[NavigableMap] operator[<] identifier[Integer] , identifier[IScan] operator[>] identifier[subMap] operator[=] Other[null] operator[SEP] identifier[TreeMap] operator[<] identifier[Integer] , identifier[IScan] operator[>] identifier[msLevelMap] operator[=] identifier[getMapMsLevel2index] operator[SEP] operator[SEP] operator[SEP] identifier[get] operator[SEP] identifier[msLevel] operator[SEP] operator[SEP] identifier[getNum2scan] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[msLevelMap] operator[!=] Other[null] operator[SEP] { identifier[subMap] operator[=] identifier[msLevelMap] operator[SEP] identifier[subMap] operator[SEP] identifier[numStart] , literal[boolean] , identifier[numEnd] , literal[boolean] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[subMap] operator[!=] Other[null] operator[&&] identifier[subMap] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[>] Other[0] operator[SEP] { Keyword[return] identifier[subMap] operator[SEP] } Keyword[return] Other[null] operator[SEP] }
public static void setLogStdOut(boolean log) { if (log) { if (!(System.out instanceof LogStream)) System.setOut(new LogStream.STDOUT()); } else System.setOut(STDOUT_STREAM); }
class class_name[name] begin[{] method[setLogStdOut, return_type[void], modifier[public static], parameter[log]] begin[{] if[member[.log]] begin[{] if[binary_operation[member[System.out], instanceof, type[LogStream]]] begin[{] call[System.setOut, parameter[ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LogStream, sub_type=ReferenceType(arguments=None, dimensions=None, name=STDOUT, sub_type=None)))]] else begin[{] None end[}] else begin[{] call[System.setOut, parameter[member[.STDOUT_STREAM]]] end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[setLogStdOut] operator[SEP] Keyword[boolean] identifier[log] operator[SEP] { Keyword[if] operator[SEP] identifier[log] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[System] operator[SEP] identifier[out] Keyword[instanceof] identifier[LogStream] operator[SEP] operator[SEP] identifier[System] operator[SEP] identifier[setOut] operator[SEP] Keyword[new] identifier[LogStream] operator[SEP] identifier[STDOUT] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] identifier[System] operator[SEP] identifier[setOut] operator[SEP] identifier[STDOUT_STREAM] operator[SEP] operator[SEP] }
@Override public void setupModule(SetupContext context) { FindSerializers serializers = new FindSerializers(jsonContext); locator.inject(serializers); locator.postConstruct(serializers); context.addSerializers(serializers); FindDeserializers deserializers = new FindDeserializers(jsonContext); locator.inject(deserializers); locator.postConstruct(deserializers); context.addDeserializers(deserializers); }
class class_name[name] begin[{] method[setupModule, return_type[void], modifier[public], parameter[context]] begin[{] local_variable[type[FindSerializers], serializers] call[locator.inject, parameter[member[.serializers]]] call[locator.postConstruct, parameter[member[.serializers]]] call[context.addSerializers, parameter[member[.serializers]]] local_variable[type[FindDeserializers], deserializers] call[locator.inject, parameter[member[.deserializers]]] call[locator.postConstruct, parameter[member[.deserializers]]] call[context.addDeserializers, parameter[member[.deserializers]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[setupModule] operator[SEP] identifier[SetupContext] identifier[context] operator[SEP] { identifier[FindSerializers] identifier[serializers] operator[=] Keyword[new] identifier[FindSerializers] operator[SEP] identifier[jsonContext] operator[SEP] operator[SEP] identifier[locator] operator[SEP] identifier[inject] operator[SEP] identifier[serializers] operator[SEP] operator[SEP] identifier[locator] operator[SEP] identifier[postConstruct] operator[SEP] identifier[serializers] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[addSerializers] operator[SEP] identifier[serializers] operator[SEP] operator[SEP] identifier[FindDeserializers] identifier[deserializers] operator[=] Keyword[new] identifier[FindDeserializers] operator[SEP] identifier[jsonContext] operator[SEP] operator[SEP] identifier[locator] operator[SEP] identifier[inject] operator[SEP] identifier[deserializers] operator[SEP] operator[SEP] identifier[locator] operator[SEP] identifier[postConstruct] operator[SEP] identifier[deserializers] operator[SEP] operator[SEP] identifier[context] operator[SEP] identifier[addDeserializers] operator[SEP] identifier[deserializers] operator[SEP] operator[SEP] }
protected @Nonnull <T> Provider<T> getBeanProvider(@Nullable BeanResolutionContext resolutionContext, @Nonnull Class<T> beanType) { return getBeanProvider(resolutionContext, beanType, null); }
class class_name[name] begin[{] method[getBeanProvider, return_type[type[Provider]], modifier[protected], parameter[resolutionContext, beanType]] begin[{] return[call[.getBeanProvider, parameter[member[.resolutionContext], member[.beanType], literal[null]]]] end[}] END[}]
Keyword[protected] annotation[@] identifier[Nonnull] operator[<] identifier[T] operator[>] identifier[Provider] operator[<] identifier[T] operator[>] identifier[getBeanProvider] operator[SEP] annotation[@] identifier[Nullable] identifier[BeanResolutionContext] identifier[resolutionContext] , annotation[@] identifier[Nonnull] identifier[Class] operator[<] identifier[T] operator[>] identifier[beanType] operator[SEP] { Keyword[return] identifier[getBeanProvider] operator[SEP] identifier[resolutionContext] , identifier[beanType] , Other[null] operator[SEP] operator[SEP] }
public void setFormatForDatesBeforeCommonEra(DateTimeFormatter formatForDatesBeforeCommonEra) { this.formatForDatesBeforeCommonEraStrict = formatForDatesBeforeCommonEra.withResolverStyle(ResolverStyle.STRICT); if (parentDatePicker != null) { parentDatePicker.setTextFieldToValidStateIfNeeded(); } }
class class_name[name] begin[{] method[setFormatForDatesBeforeCommonEra, return_type[void], modifier[public], parameter[formatForDatesBeforeCommonEra]] begin[{] assign[THIS[member[None.formatForDatesBeforeCommonEraStrict]], call[formatForDatesBeforeCommonEra.withResolverStyle, parameter[member[ResolverStyle.STRICT]]]] if[binary_operation[member[.parentDatePicker], !=, literal[null]]] begin[{] call[parentDatePicker.setTextFieldToValidStateIfNeeded, parameter[]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[setFormatForDatesBeforeCommonEra] operator[SEP] identifier[DateTimeFormatter] identifier[formatForDatesBeforeCommonEra] operator[SEP] { Keyword[this] operator[SEP] identifier[formatForDatesBeforeCommonEraStrict] operator[=] identifier[formatForDatesBeforeCommonEra] operator[SEP] identifier[withResolverStyle] operator[SEP] identifier[ResolverStyle] operator[SEP] identifier[STRICT] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[parentDatePicker] operator[!=] Other[null] operator[SEP] { identifier[parentDatePicker] operator[SEP] identifier[setTextFieldToValidStateIfNeeded] operator[SEP] operator[SEP] operator[SEP] } }
@Override public void sendCommand(final BitfinexCommand command) { try { if (command instanceof BitfinexStreamSymbolToChannelIdResolverAware) { final BitfinexStreamSymbolToChannelIdResolverAware aware = (BitfinexStreamSymbolToChannelIdResolverAware) command; aware.setResolver(symbol -> { final Integer channelId = getChannelForSymbol(symbol); if (channelId == null) { throw new IllegalArgumentException("Unknown symbol: " + symbol); } return channelId; }); } final String json = command.getCommand(this); logger.debug("Sent: {}", command); websocketEndpoint.sendMessage(json); } catch (final BitfinexCommandException e) { logger.error("Got Exception while sending command", e); } }
class class_name[name] begin[{] method[sendCommand, return_type[void], modifier[public], parameter[command]] begin[{] TryStatement(block=[IfStatement(condition=BinaryOperation(operandl=MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=ReferenceType(arguments=None, dimensions=[], name=BitfinexStreamSymbolToChannelIdResolverAware, sub_type=None), operator=instanceof), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=Cast(expression=MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=BitfinexStreamSymbolToChannelIdResolverAware, sub_type=None)), name=aware)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=BitfinexStreamSymbolToChannelIdResolverAware, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[LambdaExpression(body=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=symbol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getChannelForSymbol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=channelId)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=Integer, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MemberReference(member=channelId, 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=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unknown symbol: "), operandr=MemberReference(member=symbol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)])), ReturnStatement(expression=MemberReference(member=channelId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], parameters=[MemberReference(member=symbol, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])])], member=setResolver, postfix_operators=[], prefix_operators=[], qualifier=aware, selectors=[], type_arguments=None), label=None)])), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[])], member=getCommand, postfix_operators=[], prefix_operators=[], qualifier=command, selectors=[], type_arguments=None), name=json)], modifiers={'final'}, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Sent: {}"), MemberReference(member=command, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=debug, postfix_operators=[], prefix_operators=[], qualifier=logger, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=json, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=sendMessage, postfix_operators=[], prefix_operators=[], qualifier=websocketEndpoint, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[StatementExpression(expression=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Got Exception while sending command"), 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=['BitfinexCommandException']))], finally_block=None, label=None, resources=None) end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[void] identifier[sendCommand] operator[SEP] Keyword[final] identifier[BitfinexCommand] identifier[command] operator[SEP] { Keyword[try] { Keyword[if] operator[SEP] identifier[command] Keyword[instanceof] identifier[BitfinexStreamSymbolToChannelIdResolverAware] operator[SEP] { Keyword[final] identifier[BitfinexStreamSymbolToChannelIdResolverAware] identifier[aware] operator[=] operator[SEP] identifier[BitfinexStreamSymbolToChannelIdResolverAware] operator[SEP] identifier[command] operator[SEP] identifier[aware] operator[SEP] identifier[setResolver] operator[SEP] identifier[symbol] operator[->] { Keyword[final] identifier[Integer] identifier[channelId] operator[=] identifier[getChannelForSymbol] operator[SEP] identifier[symbol] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[channelId] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[symbol] operator[SEP] operator[SEP] } Keyword[return] identifier[channelId] operator[SEP] } operator[SEP] operator[SEP] } Keyword[final] identifier[String] identifier[json] operator[=] identifier[command] operator[SEP] identifier[getCommand] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[logger] operator[SEP] identifier[debug] operator[SEP] literal[String] , identifier[command] operator[SEP] operator[SEP] identifier[websocketEndpoint] operator[SEP] identifier[sendMessage] operator[SEP] identifier[json] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] Keyword[final] identifier[BitfinexCommandException] identifier[e] operator[SEP] { identifier[logger] operator[SEP] identifier[error] operator[SEP] literal[String] , identifier[e] operator[SEP] operator[SEP] } }
public void setMappings(Map<String, String> patternMap) { this.mappings = new HashMap<String, String>(patternMap); for (String key : mappings.keySet()) { String result = mappings.get(key); if (result.startsWith(FORWARD)) { result = result.substring(FORWARD.length()); } if (result.startsWith(REDIRECT)) { result = result.substring(REDIRECT.length()); } mappings.put(key, result); } }
class class_name[name] begin[{] method[setMappings, return_type[void], modifier[public], parameter[patternMap]] begin[{] assign[THIS[member[None.mappings]], ClassCreator(arguments=[MemberReference(member=patternMap, 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=String, sub_type=None)), TypeArgument(pattern_type=None, type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))], dimensions=None, name=HashMap, sub_type=None))] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=mappings, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=FORWARD, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=FORWARD, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)), label=None)])), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=REDIRECT, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=length, postfix_operators=[], prefix_operators=[], qualifier=REDIRECT, selectors=[], type_arguments=None)], member=substring, postfix_operators=[], prefix_operators=[], qualifier=result, selectors=[], type_arguments=None)), label=None)])), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=key, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=put, postfix_operators=[], prefix_operators=[], qualifier=mappings, selectors=[], type_arguments=None), label=None)]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=keySet, postfix_operators=[], prefix_operators=[], qualifier=mappings, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=key)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))), label=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[setMappings] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[patternMap] operator[SEP] { Keyword[this] operator[SEP] identifier[mappings] operator[=] Keyword[new] identifier[HashMap] operator[<] identifier[String] , identifier[String] operator[>] operator[SEP] identifier[patternMap] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[String] identifier[key] operator[:] identifier[mappings] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[result] operator[=] identifier[mappings] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[startsWith] operator[SEP] identifier[FORWARD] operator[SEP] operator[SEP] { identifier[result] operator[=] identifier[result] operator[SEP] identifier[substring] operator[SEP] identifier[FORWARD] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[result] operator[SEP] identifier[startsWith] operator[SEP] identifier[REDIRECT] operator[SEP] operator[SEP] { identifier[result] operator[=] identifier[result] operator[SEP] identifier[substring] operator[SEP] identifier[REDIRECT] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[mappings] operator[SEP] identifier[put] operator[SEP] identifier[key] , identifier[result] operator[SEP] operator[SEP] } }
@Override public Request<ModifyVolumeRequest> getDryRunRequest() { Request<ModifyVolumeRequest> request = new ModifyVolumeRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; }
class class_name[name] begin[{] method[getDryRunRequest, return_type[type[Request]], modifier[public], parameter[]] begin[{] local_variable[type[Request], request] call[request.addParameter, parameter[literal["DryRun"], call[Boolean.toString, parameter[literal[true]]]]] return[member[.request]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[Request] operator[<] identifier[ModifyVolumeRequest] operator[>] identifier[getDryRunRequest] operator[SEP] operator[SEP] { identifier[Request] operator[<] identifier[ModifyVolumeRequest] operator[>] identifier[request] operator[=] Keyword[new] identifier[ModifyVolumeRequestMarshaller] operator[SEP] operator[SEP] operator[SEP] identifier[marshall] operator[SEP] Keyword[this] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[addParameter] operator[SEP] literal[String] , identifier[Boolean] operator[SEP] identifier[toString] operator[SEP] literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[request] operator[SEP] }
private static List<String> toList(String propertyName, ValueExpression expression, Object value) { if (value instanceof String) { String strValue = (String)value; // If the value contains no spaces, we can optimize. // This is worthwhile, since the execute/render lists // will often only contain a single value. if (strValue.indexOf(' ') == -1) { return toSingletonList(propertyName, strValue); } // We're stuck splitting up the string. String[] values = SPLIT_PATTERN.split(strValue); if ((values == null) || (values.length == 0)) { return null; } // Note that we could create a Set out of the values if // we care about removing duplicates. However, the // presence of duplicates does not real harm. They will // be consolidated during the partial view traversal. So, // just create an list - garbage in, garbage out. return Collections.unmodifiableList(Arrays.asList(values)); } // RELEASE_PENDING i18n ; throw new FacesException(expression.toString() + " : '" + propertyName + "' attribute value must be either a String or a Collection"); }
class class_name[name] begin[{] method[toList, return_type[type[List]], modifier[private static], parameter[propertyName, expression, value]] begin[{] if[binary_operation[member[.value], instanceof, type[String]]] begin[{] local_variable[type[String], strValue] if[binary_operation[call[strValue.indexOf, parameter[literal[' ']]], ==, literal[1]]] begin[{] return[call[.toSingletonList, parameter[member[.propertyName], member[.strValue]]]] else begin[{] None end[}] local_variable[type[String], values] if[binary_operation[binary_operation[member[.values], ==, literal[null]], ||, binary_operation[member[values.length], ==, literal[0]]]] begin[{] return[literal[null]] else begin[{] None end[}] return[call[Collections.unmodifiableList, parameter[call[Arrays.asList, parameter[member[.values]]]]]] else begin[{] None end[}] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=expression, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" : '"), operator=+), operandr=MemberReference(member=propertyName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="' attribute value must be either a String or a Collection"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=FacesException, sub_type=None)), label=None) end[}] END[}]
Keyword[private] Keyword[static] identifier[List] operator[<] identifier[String] operator[>] identifier[toList] operator[SEP] identifier[String] identifier[propertyName] , identifier[ValueExpression] identifier[expression] , identifier[Object] identifier[value] operator[SEP] { Keyword[if] operator[SEP] identifier[value] Keyword[instanceof] identifier[String] operator[SEP] { identifier[String] identifier[strValue] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[value] operator[SEP] Keyword[if] operator[SEP] identifier[strValue] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[==] operator[-] Other[1] operator[SEP] { Keyword[return] identifier[toSingletonList] operator[SEP] identifier[propertyName] , identifier[strValue] operator[SEP] operator[SEP] } identifier[String] operator[SEP] operator[SEP] identifier[values] operator[=] identifier[SPLIT_PATTERN] operator[SEP] identifier[split] operator[SEP] identifier[strValue] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[values] operator[==] Other[null] operator[SEP] operator[||] operator[SEP] identifier[values] operator[SEP] identifier[length] operator[==] Other[0] operator[SEP] operator[SEP] { Keyword[return] Other[null] operator[SEP] } Keyword[return] identifier[Collections] operator[SEP] identifier[unmodifiableList] operator[SEP] identifier[Arrays] operator[SEP] identifier[asList] operator[SEP] identifier[values] operator[SEP] operator[SEP] operator[SEP] } Keyword[throw] Keyword[new] identifier[FacesException] operator[SEP] identifier[expression] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[+] literal[String] operator[+] identifier[propertyName] operator[+] literal[String] operator[SEP] operator[SEP] }
@Override public boolean hasLink(String name1, String name2, String... domain) { if (domain.length == 1) { name1 = domain[0] + "::" + name1; name2 = domain[0] + "::" + name2; } else if (domain.length > 1) { throw new Error("error: domain should be 1 parameter"); } if (name1.equals(name2)) { return true; } if (!hasRole(name1) || !hasRole(name2)) { return false; } Role role1 = createRole(name1); return role1.hasRole(name2, maxHierarchyLevel); }
class class_name[name] begin[{] method[hasLink, return_type[type[boolean]], modifier[public], parameter[name1, name2, domain]] begin[{] if[binary_operation[member[domain.length], ==, literal[1]]] begin[{] assign[member[.name1], binary_operation[binary_operation[member[.domain], +, literal["::"]], +, member[.name1]]] assign[member[.name2], binary_operation[binary_operation[member[.domain], +, literal["::"]], +, member[.name2]]] else begin[{] if[binary_operation[member[domain.length], >, literal[1]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="error: domain should be 1 parameter")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Error, sub_type=None)), label=None) else begin[{] None end[}] end[}] if[call[name1.equals, parameter[member[.name2]]]] begin[{] return[literal[true]] else begin[{] None end[}] if[binary_operation[call[.hasRole, parameter[member[.name1]]], ||, call[.hasRole, parameter[member[.name2]]]]] begin[{] return[literal[false]] else begin[{] None end[}] local_variable[type[Role], role1] return[call[role1.hasRole, parameter[member[.name2], member[.maxHierarchyLevel]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] Keyword[boolean] identifier[hasLink] operator[SEP] identifier[String] identifier[name1] , identifier[String] identifier[name2] , identifier[String] operator[...] identifier[domain] operator[SEP] { Keyword[if] operator[SEP] identifier[domain] operator[SEP] identifier[length] operator[==] Other[1] operator[SEP] { identifier[name1] operator[=] identifier[domain] operator[SEP] Other[0] operator[SEP] operator[+] literal[String] operator[+] identifier[name1] operator[SEP] identifier[name2] operator[=] identifier[domain] operator[SEP] Other[0] operator[SEP] operator[+] literal[String] operator[+] identifier[name2] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[domain] operator[SEP] identifier[length] operator[>] Other[1] operator[SEP] { Keyword[throw] Keyword[new] identifier[Error] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[name1] operator[SEP] identifier[equals] operator[SEP] identifier[name2] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[hasRole] operator[SEP] identifier[name1] operator[SEP] operator[||] operator[!] identifier[hasRole] operator[SEP] identifier[name2] operator[SEP] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } identifier[Role] identifier[role1] operator[=] identifier[createRole] operator[SEP] identifier[name1] operator[SEP] operator[SEP] Keyword[return] identifier[role1] operator[SEP] identifier[hasRole] operator[SEP] identifier[name2] , identifier[maxHierarchyLevel] operator[SEP] operator[SEP] }
public static <K, VV, EV> Graph<K, VV, EV> fromDataSet(DataSet<Edge<K, EV>> edges, final MapFunction<K, VV> vertexValueInitializer, ExecutionEnvironment context) { TypeInformation<K> keyType = ((TupleTypeInfo<?>) edges.getType()).getTypeAt(0); TypeInformation<VV> valueType = TypeExtractor.createTypeInfo( MapFunction.class, vertexValueInitializer.getClass(), 1, keyType, null); @SuppressWarnings({ "unchecked", "rawtypes" }) TypeInformation<Vertex<K, VV>> returnType = (TypeInformation<Vertex<K, VV>>) new TupleTypeInfo( Vertex.class, keyType, valueType); DataSet<Vertex<K, VV>> vertices = edges .flatMap(new EmitSrcAndTargetAsTuple1<>()) .name("Source and target IDs") .distinct() .name("IDs") .map(new MapFunction<Tuple1<K>, Vertex<K, VV>>() { private Vertex<K, VV> output = new Vertex<>(); public Vertex<K, VV> map(Tuple1<K> value) throws Exception { output.f0 = value.f0; output.f1 = vertexValueInitializer.map(value.f0); return output; } }).returns(returnType).withForwardedFields("f0").name("Initialize vertex values"); return new Graph<>(vertices, edges, context); }
class class_name[name] begin[{] method[fromDataSet, return_type[type[Graph]], modifier[public static], parameter[edges, vertexValueInitializer, context]] begin[{] local_variable[type[TypeInformation], keyType] local_variable[type[TypeInformation], valueType] local_variable[type[TypeInformation], returnType] local_variable[type[DataSet], vertices] return[ClassCreator(arguments=[MemberReference(member=vertices, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=edges, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=context, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=[], dimensions=None, name=Graph, sub_type=None))] end[}] END[}]
Keyword[public] Keyword[static] operator[<] identifier[K] , identifier[VV] , identifier[EV] operator[>] identifier[Graph] operator[<] identifier[K] , identifier[VV] , identifier[EV] operator[>] identifier[fromDataSet] operator[SEP] identifier[DataSet] operator[<] identifier[Edge] operator[<] identifier[K] , identifier[EV] operator[>] operator[>] identifier[edges] , Keyword[final] identifier[MapFunction] operator[<] identifier[K] , identifier[VV] operator[>] identifier[vertexValueInitializer] , identifier[ExecutionEnvironment] identifier[context] operator[SEP] { identifier[TypeInformation] operator[<] identifier[K] operator[>] identifier[keyType] operator[=] operator[SEP] operator[SEP] identifier[TupleTypeInfo] operator[<] operator[?] operator[>] operator[SEP] identifier[edges] operator[SEP] identifier[getType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[getTypeAt] operator[SEP] Other[0] operator[SEP] operator[SEP] identifier[TypeInformation] operator[<] identifier[VV] operator[>] identifier[valueType] operator[=] identifier[TypeExtractor] operator[SEP] identifier[createTypeInfo] operator[SEP] identifier[MapFunction] operator[SEP] Keyword[class] , identifier[vertexValueInitializer] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] , Other[1] , identifier[keyType] , Other[null] operator[SEP] operator[SEP] annotation[@] identifier[SuppressWarnings] operator[SEP] { literal[String] , literal[String] } operator[SEP] identifier[TypeInformation] operator[<] identifier[Vertex] operator[<] identifier[K] , identifier[VV] operator[>] operator[>] identifier[returnType] operator[=] operator[SEP] identifier[TypeInformation] operator[<] identifier[Vertex] operator[<] identifier[K] , identifier[VV] operator[>] operator[>] operator[SEP] Keyword[new] identifier[TupleTypeInfo] operator[SEP] identifier[Vertex] operator[SEP] Keyword[class] , identifier[keyType] , identifier[valueType] operator[SEP] operator[SEP] identifier[DataSet] operator[<] identifier[Vertex] operator[<] identifier[K] , identifier[VV] operator[>] operator[>] identifier[vertices] operator[=] identifier[edges] operator[SEP] identifier[flatMap] operator[SEP] Keyword[new] identifier[EmitSrcAndTargetAsTuple1] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[distinct] operator[SEP] operator[SEP] operator[SEP] identifier[name] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[map] operator[SEP] Keyword[new] identifier[MapFunction] operator[<] identifier[Tuple1] operator[<] identifier[K] operator[>] , identifier[Vertex] operator[<] identifier[K] , identifier[VV] operator[>] operator[>] operator[SEP] operator[SEP] { Keyword[private] identifier[Vertex] operator[<] identifier[K] , identifier[VV] operator[>] identifier[output] operator[=] Keyword[new] identifier[Vertex] operator[<] operator[>] operator[SEP] operator[SEP] operator[SEP] Keyword[public] identifier[Vertex] operator[<] identifier[K] , identifier[VV] operator[>] identifier[map] operator[SEP] identifier[Tuple1] operator[<] identifier[K] operator[>] identifier[value] operator[SEP] Keyword[throws] identifier[Exception] { identifier[output] operator[SEP] identifier[f0] operator[=] identifier[value] operator[SEP] identifier[f0] operator[SEP] identifier[output] operator[SEP] identifier[f1] operator[=] identifier[vertexValueInitializer] operator[SEP] identifier[map] operator[SEP] identifier[value] operator[SEP] identifier[f0] operator[SEP] operator[SEP] Keyword[return] identifier[output] operator[SEP] } } operator[SEP] operator[SEP] identifier[returns] operator[SEP] identifier[returnType] operator[SEP] operator[SEP] identifier[withForwardedFields] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[name] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Graph] operator[<] operator[>] operator[SEP] identifier[vertices] , identifier[edges] , identifier[context] operator[SEP] operator[SEP] }
private void processClassesInWebXML(EndpointInfoBuilder endpointInfoBuilder, EndpointInfoBuilderContext ctx, WebAppConfig webAppConfig, JaxWsModuleInfo jaxWsModuleInfo, Set<String> presentedServices) throws UnableToAdaptException { Iterator<IServletConfig> cfgIter = webAppConfig.getServletInfos(); while (cfgIter.hasNext()) { IServletConfig servletCfg = cfgIter.next(); String servletClassName = servletCfg.getClassName(); if (servletClassName == null || presentedServices.contains(servletClassName) || !JaxWsUtils.isWebService(ctx.getInfoStore().getDelayableClassInfo(servletClassName))) { continue; } String servletName = servletCfg.getServletName(); // add the servletName into EndpointInfoContext env ctx.addContextEnv(JaxWsConstants.ENV_ATTRIBUTE_ENDPOINT_SERVLET_NAME, servletName); jaxWsModuleInfo.addEndpointInfo(servletName, endpointInfoBuilder.build(ctx, servletClassName, EndpointType.SERVLET)); } }
class class_name[name] begin[{] method[processClassesInWebXML, return_type[void], modifier[private], parameter[endpointInfoBuilder, ctx, webAppConfig, jaxWsModuleInfo, presentedServices]] begin[{] local_variable[type[Iterator], cfgIter] while[call[cfgIter.hasNext, parameter[]]] begin[{] local_variable[type[IServletConfig], servletCfg] local_variable[type[String], servletClassName] if[binary_operation[binary_operation[binary_operation[member[.servletClassName], ==, literal[null]], ||, call[presentedServices.contains, parameter[member[.servletClassName]]]], ||, call[JaxWsUtils.isWebService, parameter[call[ctx.getInfoStore, parameter[]]]]]] begin[{] ContinueStatement(goto=None, label=None) else begin[{] None end[}] local_variable[type[String], servletName] call[ctx.addContextEnv, parameter[member[JaxWsConstants.ENV_ATTRIBUTE_ENDPOINT_SERVLET_NAME], member[.servletName]]] call[jaxWsModuleInfo.addEndpointInfo, parameter[member[.servletName], call[endpointInfoBuilder.build, parameter[member[.ctx], member[.servletClassName], member[EndpointType.SERVLET]]]]] end[}] end[}] END[}]
Keyword[private] Keyword[void] identifier[processClassesInWebXML] operator[SEP] identifier[EndpointInfoBuilder] identifier[endpointInfoBuilder] , identifier[EndpointInfoBuilderContext] identifier[ctx] , identifier[WebAppConfig] identifier[webAppConfig] , identifier[JaxWsModuleInfo] identifier[jaxWsModuleInfo] , identifier[Set] operator[<] identifier[String] operator[>] identifier[presentedServices] operator[SEP] Keyword[throws] identifier[UnableToAdaptException] { identifier[Iterator] operator[<] identifier[IServletConfig] operator[>] identifier[cfgIter] operator[=] identifier[webAppConfig] operator[SEP] identifier[getServletInfos] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[cfgIter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[IServletConfig] identifier[servletCfg] operator[=] identifier[cfgIter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[servletClassName] operator[=] identifier[servletCfg] operator[SEP] identifier[getClassName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[servletClassName] operator[==] Other[null] operator[||] identifier[presentedServices] operator[SEP] identifier[contains] operator[SEP] identifier[servletClassName] operator[SEP] operator[||] operator[!] identifier[JaxWsUtils] operator[SEP] identifier[isWebService] operator[SEP] identifier[ctx] operator[SEP] identifier[getInfoStore] operator[SEP] operator[SEP] operator[SEP] identifier[getDelayableClassInfo] operator[SEP] identifier[servletClassName] operator[SEP] operator[SEP] operator[SEP] { Keyword[continue] operator[SEP] } identifier[String] identifier[servletName] operator[=] identifier[servletCfg] operator[SEP] identifier[getServletName] operator[SEP] operator[SEP] operator[SEP] identifier[ctx] operator[SEP] identifier[addContextEnv] operator[SEP] identifier[JaxWsConstants] operator[SEP] identifier[ENV_ATTRIBUTE_ENDPOINT_SERVLET_NAME] , identifier[servletName] operator[SEP] operator[SEP] identifier[jaxWsModuleInfo] operator[SEP] identifier[addEndpointInfo] operator[SEP] identifier[servletName] , identifier[endpointInfoBuilder] operator[SEP] identifier[build] operator[SEP] identifier[ctx] , identifier[servletClassName] , identifier[EndpointType] operator[SEP] identifier[SERVLET] operator[SEP] operator[SEP] operator[SEP] } }
public void fillPublishList(CmsDbContext dbc, CmsPublishList publishList) throws CmsException { if (!publishList.isDirectPublish()) { // when publishing a project // all modified resources with the last change done in the current project are candidates if unlocked List<CmsResource> folderList = getVfsDriver(dbc).readResourceTree( dbc, dbc.currentProject().getUuid(), CmsDriverManager.READ_IGNORE_PARENT, CmsDriverManager.READ_IGNORE_TYPE, CmsResource.STATE_UNCHANGED, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READMODE_INCLUDE_TREE | CmsDriverManager.READMODE_INCLUDE_PROJECT | CmsDriverManager.READMODE_EXCLUDE_STATE | CmsDriverManager.READMODE_ONLY_FOLDERS); List<CmsResource> fileList = getVfsDriver(dbc).readResourceTree( dbc, dbc.currentProject().getUuid(), CmsDriverManager.READ_IGNORE_PARENT, CmsDriverManager.READ_IGNORE_TYPE, CmsResource.STATE_UNCHANGED, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READ_IGNORE_TIME, CmsDriverManager.READMODE_INCLUDE_TREE | CmsDriverManager.READMODE_INCLUDE_PROJECT | CmsDriverManager.READMODE_EXCLUDE_STATE | CmsDriverManager.READMODE_ONLY_FILES); CmsRequestContext context = dbc.getRequestContext(); if ((context != null) && (context.getAttribute(CmsDefaultWorkflowManager.ATTR_CHECK_PUBLISH_RESOURCE_LIMIT) != null)) { // check if total size and if it exceeds the resource limit and the request // context attribute is set, throw an exception. // we do it here since filterResources() can be very expensive on large resource lists int limit = OpenCms.getWorkflowManager().getResourceLimit(); int total = fileList.size() + folderList.size(); if (total > limit) { throw new CmsTooManyPublishResourcesException(total); } } publishList.addAll(filterResources(dbc, null, folderList), true); publishList.addAll(filterResources(dbc, publishList, fileList), true); } else { // this is a direct publish Iterator<CmsResource> it = publishList.getDirectPublishResources().iterator(); while (it.hasNext()) { // iterate all resources in the direct publish list CmsResource directPublishResource = it.next(); if (directPublishResource.isFolder()) { // when publishing a folder directly, // the folder and all modified resources within the tree below this folder // and with the last change done in the current project are candidates if lockable CmsLock lock = getLock(dbc, directPublishResource); if (!directPublishResource.getState().isUnchanged() && lock.isLockableBy(dbc.currentUser())) { try { m_securityManager.checkPermissions( dbc, directPublishResource, CmsPermissionSet.ACCESS_DIRECT_PUBLISH, false, CmsResourceFilter.ALL); publishList.add(directPublishResource, true); } catch (CmsException e) { // skip if not enough permissions } } boolean shouldPublishDeletedSubResources = publishList.isUserPublishList() && directPublishResource.getState().isDeleted(); if (publishList.isPublishSubResources() || shouldPublishDeletedSubResources) { addSubResources(dbc, publishList, directPublishResource); } } else if (directPublishResource.isFile() && !directPublishResource.getState().isUnchanged()) { // when publishing a file directly this file is the only candidate // if it is modified and lockable CmsLock lock = getLock(dbc, directPublishResource); if (lock.isLockableBy(dbc.currentUser())) { // check permissions try { m_securityManager.checkPermissions( dbc, directPublishResource, CmsPermissionSet.ACCESS_DIRECT_PUBLISH, false, CmsResourceFilter.ALL); publishList.add(directPublishResource, true); } catch (CmsException e) { // skip if not enough permissions } } } } } // Step 2: if desired, extend the list of files to publish with related siblings if (publishList.isPublishSiblings()) { List<CmsResource> publishFiles = publishList.getFileList(); int size = publishFiles.size(); // Improved: first calculate closure of all siblings, then filter and add them Set<CmsResource> siblingsClosure = new HashSet<CmsResource>(publishFiles); for (int i = 0; i < size; i++) { CmsResource currentFile = publishFiles.get(i); if (currentFile.getSiblingCount() > 1) { siblingsClosure.addAll(readSiblings(dbc, currentFile, CmsResourceFilter.ALL_MODIFIED)); } } publishList.addAll(filterSiblings(dbc, publishList, siblingsClosure), true); } publishList.initialize(); }
class class_name[name] begin[{] method[fillPublishList, return_type[void], modifier[public], parameter[dbc, publishList]] begin[{] if[call[publishList.isDirectPublish, parameter[]]] begin[{] local_variable[type[List], folderList] local_variable[type[List], fileList] local_variable[type[CmsRequestContext], context] if[binary_operation[binary_operation[member[.context], !=, literal[null]], &&, binary_operation[call[context.getAttribute, parameter[member[CmsDefaultWorkflowManager.ATTR_CHECK_PUBLISH_RESOURCE_LIMIT]]], !=, literal[null]]]] begin[{] local_variable[type[int], limit] local_variable[type[int], total] if[binary_operation[member[.total], >, member[.limit]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=total, 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=CmsTooManyPublishResourcesException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] call[publishList.addAll, parameter[call[.filterResources, parameter[member[.dbc], literal[null], member[.folderList]]], literal[true]]] call[publishList.addAll, parameter[call[.filterResources, parameter[member[.dbc], member[.publishList], member[.fileList]]], literal[true]]] else begin[{] local_variable[type[Iterator], it] while[call[it.hasNext, parameter[]]] begin[{] local_variable[type[CmsResource], directPublishResource] if[call[directPublishResource.isFolder, parameter[]]] begin[{] local_variable[type[CmsLock], lock] if[binary_operation[call[directPublishResource.getState, parameter[]], &&, call[lock.isLockableBy, parameter[call[dbc.currentUser, parameter[]]]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dbc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=directPublishResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ACCESS_DIRECT_PUBLISH, postfix_operators=[], prefix_operators=[], qualifier=CmsPermissionSet, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=ALL, postfix_operators=[], prefix_operators=[], qualifier=CmsResourceFilter, selectors=[])], member=checkPermissions, postfix_operators=[], prefix_operators=[], qualifier=m_securityManager, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=directPublishResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=add, postfix_operators=[], prefix_operators=[], qualifier=publishList, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] local_variable[type[boolean], shouldPublishDeletedSubResources] if[binary_operation[call[publishList.isPublishSubResources, parameter[]], ||, member[.shouldPublishDeletedSubResources]]] begin[{] call[.addSubResources, parameter[member[.dbc], member[.publishList], member[.directPublishResource]]] else begin[{] None end[}] else begin[{] if[binary_operation[call[directPublishResource.isFile, parameter[]], &&, call[directPublishResource.getState, parameter[]]]] begin[{] local_variable[type[CmsLock], lock] if[call[lock.isLockableBy, parameter[call[dbc.currentUser, parameter[]]]]] begin[{] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=dbc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=directPublishResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ACCESS_DIRECT_PUBLISH, postfix_operators=[], prefix_operators=[], qualifier=CmsPermissionSet, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false), MemberReference(member=ALL, postfix_operators=[], prefix_operators=[], qualifier=CmsResourceFilter, selectors=[])], member=checkPermissions, postfix_operators=[], prefix_operators=[], qualifier=m_securityManager, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MemberReference(member=directPublishResource, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=true)], member=add, postfix_operators=[], prefix_operators=[], qualifier=publishList, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['CmsException']))], finally_block=None, label=None, resources=None) else begin[{] None end[}] else begin[{] None end[}] end[}] end[}] end[}] if[call[publishList.isPublishSiblings, parameter[]]] begin[{] local_variable[type[List], publishFiles] local_variable[type[int], size] local_variable[type[Set], siblingsClosure] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=get, postfix_operators=[], prefix_operators=[], qualifier=publishFiles, selectors=[], type_arguments=None), name=currentFile)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=CmsResource, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[], member=getSiblingCount, postfix_operators=[], prefix_operators=[], qualifier=currentFile, selectors=[], type_arguments=None), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=1), operator=>), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[MemberReference(member=dbc, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=currentFile, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=ALL_MODIFIED, postfix_operators=[], prefix_operators=[], qualifier=CmsResourceFilter, selectors=[])], member=readSiblings, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)], member=addAll, postfix_operators=[], prefix_operators=[], qualifier=siblingsClosure, selectors=[], type_arguments=None), label=None)]))]), control=ForControl(condition=BinaryOperation(operandl=MemberReference(member=i, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=MemberReference(member=size, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=<), init=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=0), name=i)], modifiers=set(), type=BasicType(dimensions=[], name=int)), update=[MemberReference(member=i, postfix_operators=['++'], prefix_operators=[], qualifier=, selectors=[])]), label=None) call[publishList.addAll, parameter[call[.filterSiblings, parameter[member[.dbc], member[.publishList], member[.siblingsClosure]]], literal[true]]] else begin[{] None end[}] call[publishList.initialize, parameter[]] end[}] END[}]
Keyword[public] Keyword[void] identifier[fillPublishList] operator[SEP] identifier[CmsDbContext] identifier[dbc] , identifier[CmsPublishList] identifier[publishList] operator[SEP] Keyword[throws] identifier[CmsException] { Keyword[if] operator[SEP] operator[!] identifier[publishList] operator[SEP] identifier[isDirectPublish] operator[SEP] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[folderList] operator[=] identifier[getVfsDriver] operator[SEP] identifier[dbc] operator[SEP] operator[SEP] identifier[readResourceTree] operator[SEP] identifier[dbc] , identifier[dbc] operator[SEP] identifier[currentProject] operator[SEP] operator[SEP] operator[SEP] identifier[getUuid] operator[SEP] operator[SEP] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_PARENT] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TYPE] , identifier[CmsResource] operator[SEP] identifier[STATE_UNCHANGED] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READMODE_INCLUDE_TREE] operator[|] identifier[CmsDriverManager] operator[SEP] identifier[READMODE_INCLUDE_PROJECT] operator[|] identifier[CmsDriverManager] operator[SEP] identifier[READMODE_EXCLUDE_STATE] operator[|] identifier[CmsDriverManager] operator[SEP] identifier[READMODE_ONLY_FOLDERS] operator[SEP] operator[SEP] identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[fileList] operator[=] identifier[getVfsDriver] operator[SEP] identifier[dbc] operator[SEP] operator[SEP] identifier[readResourceTree] operator[SEP] identifier[dbc] , identifier[dbc] operator[SEP] identifier[currentProject] operator[SEP] operator[SEP] operator[SEP] identifier[getUuid] operator[SEP] operator[SEP] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_PARENT] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TYPE] , identifier[CmsResource] operator[SEP] identifier[STATE_UNCHANGED] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READ_IGNORE_TIME] , identifier[CmsDriverManager] operator[SEP] identifier[READMODE_INCLUDE_TREE] operator[|] identifier[CmsDriverManager] operator[SEP] identifier[READMODE_INCLUDE_PROJECT] operator[|] identifier[CmsDriverManager] operator[SEP] identifier[READMODE_EXCLUDE_STATE] operator[|] identifier[CmsDriverManager] operator[SEP] identifier[READMODE_ONLY_FILES] operator[SEP] operator[SEP] identifier[CmsRequestContext] identifier[context] operator[=] identifier[dbc] operator[SEP] identifier[getRequestContext] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[context] operator[!=] Other[null] operator[SEP] operator[&&] operator[SEP] identifier[context] operator[SEP] identifier[getAttribute] operator[SEP] identifier[CmsDefaultWorkflowManager] operator[SEP] identifier[ATTR_CHECK_PUBLISH_RESOURCE_LIMIT] operator[SEP] operator[!=] Other[null] operator[SEP] operator[SEP] { Keyword[int] identifier[limit] operator[=] identifier[OpenCms] operator[SEP] identifier[getWorkflowManager] operator[SEP] operator[SEP] operator[SEP] identifier[getResourceLimit] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[total] operator[=] identifier[fileList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[+] identifier[folderList] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[total] operator[>] identifier[limit] operator[SEP] { Keyword[throw] Keyword[new] identifier[CmsTooManyPublishResourcesException] operator[SEP] identifier[total] operator[SEP] operator[SEP] } } identifier[publishList] operator[SEP] identifier[addAll] operator[SEP] identifier[filterResources] operator[SEP] identifier[dbc] , Other[null] , identifier[folderList] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] identifier[publishList] operator[SEP] identifier[addAll] operator[SEP] identifier[filterResources] operator[SEP] identifier[dbc] , identifier[publishList] , identifier[fileList] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] } Keyword[else] { identifier[Iterator] operator[<] identifier[CmsResource] operator[>] identifier[it] operator[=] identifier[publishList] operator[SEP] identifier[getDirectPublishResources] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[it] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsResource] identifier[directPublishResource] operator[=] identifier[it] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[directPublishResource] operator[SEP] identifier[isFolder] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsLock] identifier[lock] operator[=] identifier[getLock] operator[SEP] identifier[dbc] , identifier[directPublishResource] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[directPublishResource] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[SEP] identifier[isUnchanged] operator[SEP] operator[SEP] operator[&&] identifier[lock] operator[SEP] identifier[isLockableBy] operator[SEP] identifier[dbc] operator[SEP] identifier[currentUser] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[m_securityManager] operator[SEP] identifier[checkPermissions] operator[SEP] identifier[dbc] , identifier[directPublishResource] , identifier[CmsPermissionSet] operator[SEP] identifier[ACCESS_DIRECT_PUBLISH] , literal[boolean] , identifier[CmsResourceFilter] operator[SEP] identifier[ALL] operator[SEP] operator[SEP] identifier[publishList] operator[SEP] identifier[add] operator[SEP] identifier[directPublishResource] , literal[boolean] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmsException] identifier[e] operator[SEP] { } } Keyword[boolean] identifier[shouldPublishDeletedSubResources] operator[=] identifier[publishList] operator[SEP] identifier[isUserPublishList] operator[SEP] operator[SEP] operator[&&] identifier[directPublishResource] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[SEP] identifier[isDeleted] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[publishList] operator[SEP] identifier[isPublishSubResources] operator[SEP] operator[SEP] operator[||] identifier[shouldPublishDeletedSubResources] operator[SEP] { identifier[addSubResources] operator[SEP] identifier[dbc] , identifier[publishList] , identifier[directPublishResource] operator[SEP] operator[SEP] } } Keyword[else] Keyword[if] operator[SEP] identifier[directPublishResource] operator[SEP] identifier[isFile] operator[SEP] operator[SEP] operator[&&] operator[!] identifier[directPublishResource] operator[SEP] identifier[getState] operator[SEP] operator[SEP] operator[SEP] identifier[isUnchanged] operator[SEP] operator[SEP] operator[SEP] { identifier[CmsLock] identifier[lock] operator[=] identifier[getLock] operator[SEP] identifier[dbc] , identifier[directPublishResource] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[lock] operator[SEP] identifier[isLockableBy] operator[SEP] identifier[dbc] operator[SEP] identifier[currentUser] operator[SEP] operator[SEP] operator[SEP] operator[SEP] { Keyword[try] { identifier[m_securityManager] operator[SEP] identifier[checkPermissions] operator[SEP] identifier[dbc] , identifier[directPublishResource] , identifier[CmsPermissionSet] operator[SEP] identifier[ACCESS_DIRECT_PUBLISH] , literal[boolean] , identifier[CmsResourceFilter] operator[SEP] identifier[ALL] operator[SEP] operator[SEP] identifier[publishList] operator[SEP] identifier[add] operator[SEP] identifier[directPublishResource] , literal[boolean] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[CmsException] identifier[e] operator[SEP] { } } } } } Keyword[if] operator[SEP] identifier[publishList] operator[SEP] identifier[isPublishSiblings] operator[SEP] operator[SEP] operator[SEP] { identifier[List] operator[<] identifier[CmsResource] operator[>] identifier[publishFiles] operator[=] identifier[publishList] operator[SEP] identifier[getFileList] operator[SEP] operator[SEP] operator[SEP] Keyword[int] identifier[size] operator[=] identifier[publishFiles] operator[SEP] identifier[size] operator[SEP] operator[SEP] operator[SEP] identifier[Set] operator[<] identifier[CmsResource] operator[>] identifier[siblingsClosure] operator[=] Keyword[new] identifier[HashSet] operator[<] identifier[CmsResource] operator[>] operator[SEP] identifier[publishFiles] operator[SEP] operator[SEP] Keyword[for] operator[SEP] Keyword[int] identifier[i] operator[=] Other[0] operator[SEP] identifier[i] operator[<] identifier[size] operator[SEP] identifier[i] operator[++] operator[SEP] { identifier[CmsResource] identifier[currentFile] operator[=] identifier[publishFiles] operator[SEP] identifier[get] operator[SEP] identifier[i] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[currentFile] operator[SEP] identifier[getSiblingCount] operator[SEP] operator[SEP] operator[>] Other[1] operator[SEP] { identifier[siblingsClosure] operator[SEP] identifier[addAll] operator[SEP] identifier[readSiblings] operator[SEP] identifier[dbc] , identifier[currentFile] , identifier[CmsResourceFilter] operator[SEP] identifier[ALL_MODIFIED] operator[SEP] operator[SEP] operator[SEP] } } identifier[publishList] operator[SEP] identifier[addAll] operator[SEP] identifier[filterSiblings] operator[SEP] identifier[dbc] , identifier[publishList] , identifier[siblingsClosure] operator[SEP] , literal[boolean] operator[SEP] operator[SEP] } identifier[publishList] operator[SEP] identifier[initialize] operator[SEP] operator[SEP] operator[SEP] }
public static void notNull(Object object, String message) { if (object == null) throw new IllegalArgumentException(message); /* * 如果是字符串,我不希望你的字符串是一个空字符串,那样没有任何意义, * 但是你仍然坚持要为空,那你可以添加一个空格(" ")试试 * */ if (object instanceof String) if (StringUtils.isEmpty((String) object)) throw new IllegalArgumentException(message); }
class class_name[name] begin[{] method[notNull, return_type[void], modifier[public static], parameter[object, message]] begin[{] if[binary_operation[member[.object], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=message, 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=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.object], instanceof, type[String]]] begin[{] if[call[StringUtils.isEmpty, parameter[Cast(expression=MemberReference(member=object, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None))]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[MemberReference(member=message, 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=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[notNull] operator[SEP] identifier[Object] identifier[object] , identifier[String] identifier[message] operator[SEP] { Keyword[if] operator[SEP] identifier[object] operator[==] Other[null] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[message] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[object] Keyword[instanceof] identifier[String] operator[SEP] Keyword[if] operator[SEP] identifier[StringUtils] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] identifier[String] operator[SEP] identifier[object] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[message] operator[SEP] operator[SEP] }
@Deprecated public static Scriptable newObjectLiteral(Object[] propertyIds, Object[] propertyValues, Context cx, Scriptable scope) { // Passing null for getterSetters means no getters or setters return newObjectLiteral(propertyIds, propertyValues, null, cx, scope); }
class class_name[name] begin[{] method[newObjectLiteral, return_type[type[Scriptable]], modifier[public static], parameter[propertyIds, propertyValues, cx, scope]] begin[{] return[call[.newObjectLiteral, parameter[member[.propertyIds], member[.propertyValues], literal[null], member[.cx], member[.scope]]]] end[}] END[}]
annotation[@] identifier[Deprecated] Keyword[public] Keyword[static] identifier[Scriptable] identifier[newObjectLiteral] operator[SEP] identifier[Object] operator[SEP] operator[SEP] identifier[propertyIds] , identifier[Object] operator[SEP] operator[SEP] identifier[propertyValues] , identifier[Context] identifier[cx] , identifier[Scriptable] identifier[scope] operator[SEP] { Keyword[return] identifier[newObjectLiteral] operator[SEP] identifier[propertyIds] , identifier[propertyValues] , Other[null] , identifier[cx] , identifier[scope] operator[SEP] operator[SEP] }
public final Module loadAddonModule(Addon addon) throws ModuleLoadException { try { this.currentAddon.set(addon); ModuleIdentifier moduleId = moduleCache.getModuleId(addon); Module result = loadModule(moduleId); return result; } catch (ModuleLoadException e) { throw e; } finally { this.currentAddon.remove(); } }
class class_name[name] begin[{] method[loadAddonModule, return_type[type[Module]], modifier[final public], parameter[addon]] begin[{] TryStatement(block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=currentAddon, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[MemberReference(member=addon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=set, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=addon, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getModuleId, postfix_operators=[], prefix_operators=[], qualifier=moduleCache, selectors=[], type_arguments=None), name=moduleId)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=ModuleIdentifier, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[MemberReference(member=moduleId, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=loadModule, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), name=result)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=Module, sub_type=None)), ReturnStatement(expression=MemberReference(member=result, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['ModuleLoadException']))], finally_block=[StatementExpression(expression=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=currentAddon, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=remove, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)]), label=None)], label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[final] identifier[Module] identifier[loadAddonModule] operator[SEP] identifier[Addon] identifier[addon] operator[SEP] Keyword[throws] identifier[ModuleLoadException] { Keyword[try] { Keyword[this] operator[SEP] identifier[currentAddon] operator[SEP] identifier[set] operator[SEP] identifier[addon] operator[SEP] operator[SEP] identifier[ModuleIdentifier] identifier[moduleId] operator[=] identifier[moduleCache] operator[SEP] identifier[getModuleId] operator[SEP] identifier[addon] operator[SEP] operator[SEP] identifier[Module] identifier[result] operator[=] identifier[loadModule] operator[SEP] identifier[moduleId] operator[SEP] operator[SEP] Keyword[return] identifier[result] operator[SEP] } Keyword[catch] operator[SEP] identifier[ModuleLoadException] identifier[e] operator[SEP] { Keyword[throw] identifier[e] operator[SEP] } Keyword[finally] { Keyword[this] operator[SEP] identifier[currentAddon] operator[SEP] identifier[remove] operator[SEP] operator[SEP] operator[SEP] } }
protected ServiceRegistration registerProxy(Object objectProxy, Class clazz) { Dictionary<String, Object> props = new Hashtable<String, Object>(); ServiceRegistration registration; registration = context.registerService(clazz, objectProxy, props); return registration; }
class class_name[name] begin[{] method[registerProxy, return_type[type[ServiceRegistration]], modifier[protected], parameter[objectProxy, clazz]] begin[{] local_variable[type[Dictionary], props] local_variable[type[ServiceRegistration], registration] assign[member[.registration], call[context.registerService, parameter[member[.clazz], member[.objectProxy], member[.props]]]] return[member[.registration]] end[}] END[}]
Keyword[protected] identifier[ServiceRegistration] identifier[registerProxy] operator[SEP] identifier[Object] identifier[objectProxy] , identifier[Class] identifier[clazz] operator[SEP] { identifier[Dictionary] operator[<] identifier[String] , identifier[Object] operator[>] identifier[props] operator[=] Keyword[new] identifier[Hashtable] operator[<] identifier[String] , identifier[Object] operator[>] operator[SEP] operator[SEP] operator[SEP] identifier[ServiceRegistration] identifier[registration] operator[SEP] identifier[registration] operator[=] identifier[context] operator[SEP] identifier[registerService] operator[SEP] identifier[clazz] , identifier[objectProxy] , identifier[props] operator[SEP] operator[SEP] Keyword[return] identifier[registration] operator[SEP] }
public void initialize(URI name, Configuration conf) throws IOException { //decode the name underLyingURI = decodeHarURI(name, conf); // we got the right har Path- now check if this is //truly a har filesystem Path harPath = archivePath( new Path(name.getScheme(), name.getAuthority(), name.getPath())); if (harPath == null) { throw new IOException("Invalid path for the Har Filesystem. " + name.toString()); } if (fs == null) { fs = FileSystem.get(underLyingURI, conf); } this.uri = harPath.toUri(); this.archivePath = new Path(this.uri.getPath()); this.harAuth = getHarAuth(this.underLyingURI); //check for the underlying fs containing // the index file this.masterIndex = new Path(archivePath, HarFileSystem.MASTER_INDEX_NAME); this.archiveIndex = new Path(archivePath, HarFileSystem.INDEX_NAME); if (!fs.exists(masterIndex) || !fs.exists(archiveIndex)) { throw new IOException("Invalid path for the Har Filesystem. " + "No index file in " + harPath); } try{ this.version = getHarVersion(); } catch(IOException io) { throw new IOException("Unable to " + "read the version of the Har file system: " + this.archivePath); } // make it always backwards-compatible if (this.version > HarFileSystem.VERSION) { throw new IOException("Invalid version " + this.version + " expected " + HarFileSystem.VERSION); } }
class class_name[name] begin[{] method[initialize, return_type[void], modifier[public], parameter[name, conf]] begin[{] assign[member[.underLyingURI], call[.decodeHarURI, parameter[member[.name], member[.conf]]]] local_variable[type[Path], harPath] if[binary_operation[member[.harPath], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid path for the Har Filesystem. "), operandr=MethodInvocation(arguments=[], member=toString, postfix_operators=[], prefix_operators=[], qualifier=name, selectors=[], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IOException, sub_type=None)), label=None) else begin[{] None end[}] if[binary_operation[member[.fs], ==, literal[null]]] begin[{] assign[member[.fs], call[FileSystem.get, parameter[member[.underLyingURI], member[.conf]]]] else begin[{] None end[}] assign[THIS[member[None.uri]], call[harPath.toUri, parameter[]]] assign[THIS[member[None.archivePath]], ClassCreator(arguments=[This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=uri, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None), MethodInvocation(arguments=[], member=getPath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Path, sub_type=None))] assign[THIS[member[None.harAuth]], call[.getHarAuth, parameter[THIS[member[None.underLyingURI]]]]] assign[THIS[member[None.masterIndex]], ClassCreator(arguments=[MemberReference(member=archivePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=MASTER_INDEX_NAME, postfix_operators=[], prefix_operators=[], qualifier=HarFileSystem, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Path, sub_type=None))] assign[THIS[member[None.archiveIndex]], ClassCreator(arguments=[MemberReference(member=archivePath, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=INDEX_NAME, postfix_operators=[], prefix_operators=[], qualifier=HarFileSystem, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Path, sub_type=None))] if[binary_operation[call[fs.exists, parameter[member[.masterIndex]]], ||, call[fs.exists, parameter[member[.archiveIndex]]]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid path for the Har Filesystem. "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No index file in "), operator=+), operandr=MemberReference(member=harPath, 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[}] TryStatement(block=[StatementExpression(expression=Assignment(expressionl=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=version, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), type==, value=MethodInvocation(arguments=[], member=getHarVersion, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None)), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to "), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="read the version of the Har file system: "), operator=+), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=archivePath, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), 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)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=io, types=['IOException']))], finally_block=None, label=None, resources=None) if[binary_operation[THIS[member[None.version]], >, member[HarFileSystem.VERSION]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=BinaryOperation(operandl=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid version "), operandr=This(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[MemberReference(member=version, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None)]), operator=+), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" expected "), operator=+), operandr=MemberReference(member=VERSION, postfix_operators=[], prefix_operators=[], qualifier=HarFileSystem, 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[initialize] operator[SEP] identifier[URI] identifier[name] , identifier[Configuration] identifier[conf] operator[SEP] Keyword[throws] identifier[IOException] { identifier[underLyingURI] operator[=] identifier[decodeHarURI] operator[SEP] identifier[name] , identifier[conf] operator[SEP] operator[SEP] identifier[Path] identifier[harPath] operator[=] identifier[archivePath] operator[SEP] Keyword[new] identifier[Path] operator[SEP] identifier[name] operator[SEP] identifier[getScheme] operator[SEP] operator[SEP] , identifier[name] operator[SEP] identifier[getAuthority] operator[SEP] operator[SEP] , identifier[name] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[harPath] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] identifier[name] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[fs] operator[==] Other[null] operator[SEP] { identifier[fs] operator[=] identifier[FileSystem] operator[SEP] identifier[get] operator[SEP] identifier[underLyingURI] , identifier[conf] operator[SEP] operator[SEP] } Keyword[this] operator[SEP] identifier[uri] operator[=] identifier[harPath] operator[SEP] identifier[toUri] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[archivePath] operator[=] Keyword[new] identifier[Path] operator[SEP] Keyword[this] operator[SEP] identifier[uri] operator[SEP] identifier[getPath] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[harAuth] operator[=] identifier[getHarAuth] operator[SEP] Keyword[this] operator[SEP] identifier[underLyingURI] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[masterIndex] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[archivePath] , identifier[HarFileSystem] operator[SEP] identifier[MASTER_INDEX_NAME] operator[SEP] operator[SEP] Keyword[this] operator[SEP] identifier[archiveIndex] operator[=] Keyword[new] identifier[Path] operator[SEP] identifier[archivePath] , identifier[HarFileSystem] operator[SEP] identifier[INDEX_NAME] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[fs] operator[SEP] identifier[exists] operator[SEP] identifier[masterIndex] operator[SEP] operator[||] operator[!] identifier[fs] operator[SEP] identifier[exists] operator[SEP] identifier[archiveIndex] operator[SEP] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] literal[String] operator[+] identifier[harPath] operator[SEP] operator[SEP] } Keyword[try] { Keyword[this] operator[SEP] identifier[version] operator[=] identifier[getHarVersion] operator[SEP] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[IOException] identifier[io] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] literal[String] operator[+] Keyword[this] operator[SEP] identifier[archivePath] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] Keyword[this] operator[SEP] identifier[version] operator[>] identifier[HarFileSystem] operator[SEP] identifier[VERSION] operator[SEP] { Keyword[throw] Keyword[new] identifier[IOException] operator[SEP] literal[String] operator[+] Keyword[this] operator[SEP] identifier[version] operator[+] literal[String] operator[+] identifier[HarFileSystem] operator[SEP] identifier[VERSION] operator[SEP] operator[SEP] } }
private Context current(boolean fail) { Context context = Context.CONTEXT.get(); if (context == null && fail) { throw new IllegalStateException("No context"); } return context; }
class class_name[name] begin[{] method[current, return_type[type[Context]], modifier[private], parameter[fail]] begin[{] local_variable[type[Context], context] if[binary_operation[binary_operation[member[.context], ==, literal[null]], &&, member[.fail]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="No context")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] return[member[.context]] end[}] END[}]
Keyword[private] identifier[Context] identifier[current] operator[SEP] Keyword[boolean] identifier[fail] operator[SEP] { identifier[Context] identifier[context] operator[=] identifier[Context] operator[SEP] identifier[CONTEXT] operator[SEP] identifier[get] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[context] operator[==] Other[null] operator[&&] identifier[fail] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[context] operator[SEP] }
private boolean removeFromNewEntries(final OIdentifiable identifiable) { OModifiableInteger counter = newEntries.get(identifiable); if (counter == null) { return false; } else { if (counter.getValue() == 1) { newEntries.remove(identifiable); } else { counter.decrement(); } return true; } }
class class_name[name] begin[{] method[removeFromNewEntries, return_type[type[boolean]], modifier[private], parameter[identifiable]] begin[{] local_variable[type[OModifiableInteger], counter] if[binary_operation[member[.counter], ==, literal[null]]] begin[{] return[literal[false]] else begin[{] if[binary_operation[call[counter.getValue, parameter[]], ==, literal[1]]] begin[{] call[newEntries.remove, parameter[member[.identifiable]]] else begin[{] call[counter.decrement, parameter[]] end[}] return[literal[true]] end[}] end[}] END[}]
Keyword[private] Keyword[boolean] identifier[removeFromNewEntries] operator[SEP] Keyword[final] identifier[OIdentifiable] identifier[identifiable] operator[SEP] { identifier[OModifiableInteger] identifier[counter] operator[=] identifier[newEntries] operator[SEP] identifier[get] operator[SEP] identifier[identifiable] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[counter] operator[==] Other[null] operator[SEP] { Keyword[return] literal[boolean] operator[SEP] } Keyword[else] { Keyword[if] operator[SEP] identifier[counter] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[==] Other[1] operator[SEP] { identifier[newEntries] operator[SEP] identifier[remove] operator[SEP] identifier[identifiable] operator[SEP] operator[SEP] } Keyword[else] { identifier[counter] operator[SEP] identifier[decrement] operator[SEP] operator[SEP] operator[SEP] } Keyword[return] literal[boolean] operator[SEP] } }
public void marshall(BackupPlansListMember backupPlansListMember, ProtocolMarshaller protocolMarshaller) { if (backupPlansListMember == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(backupPlansListMember.getBackupPlanArn(), BACKUPPLANARN_BINDING); protocolMarshaller.marshall(backupPlansListMember.getBackupPlanId(), BACKUPPLANID_BINDING); protocolMarshaller.marshall(backupPlansListMember.getCreationDate(), CREATIONDATE_BINDING); protocolMarshaller.marshall(backupPlansListMember.getDeletionDate(), DELETIONDATE_BINDING); protocolMarshaller.marshall(backupPlansListMember.getVersionId(), VERSIONID_BINDING); protocolMarshaller.marshall(backupPlansListMember.getBackupPlanName(), BACKUPPLANNAME_BINDING); protocolMarshaller.marshall(backupPlansListMember.getCreatorRequestId(), CREATORREQUESTID_BINDING); protocolMarshaller.marshall(backupPlansListMember.getLastExecutionDate(), LASTEXECUTIONDATE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[backupPlansListMember, protocolMarshaller]] begin[{] if[binary_operation[member[.backupPlansListMember], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBackupPlanArn, postfix_operators=[], prefix_operators=[], qualifier=backupPlansListMember, selectors=[], type_arguments=None), MemberReference(member=BACKUPPLANARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBackupPlanId, postfix_operators=[], prefix_operators=[], qualifier=backupPlansListMember, selectors=[], type_arguments=None), MemberReference(member=BACKUPPLANID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCreationDate, postfix_operators=[], prefix_operators=[], qualifier=backupPlansListMember, selectors=[], type_arguments=None), MemberReference(member=CREATIONDATE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getDeletionDate, postfix_operators=[], prefix_operators=[], qualifier=backupPlansListMember, selectors=[], type_arguments=None), MemberReference(member=DELETIONDATE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getVersionId, postfix_operators=[], prefix_operators=[], qualifier=backupPlansListMember, selectors=[], type_arguments=None), MemberReference(member=VERSIONID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getBackupPlanName, postfix_operators=[], prefix_operators=[], qualifier=backupPlansListMember, selectors=[], type_arguments=None), MemberReference(member=BACKUPPLANNAME_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getCreatorRequestId, postfix_operators=[], prefix_operators=[], qualifier=backupPlansListMember, selectors=[], type_arguments=None), MemberReference(member=CREATORREQUESTID_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLastExecutionDate, postfix_operators=[], prefix_operators=[], qualifier=backupPlansListMember, selectors=[], type_arguments=None), MemberReference(member=LASTEXECUTIONDATE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[BackupPlansListMember] identifier[backupPlansListMember] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[backupPlansListMember] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[backupPlansListMember] operator[SEP] identifier[getBackupPlanArn] operator[SEP] operator[SEP] , identifier[BACKUPPLANARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[backupPlansListMember] operator[SEP] identifier[getBackupPlanId] operator[SEP] operator[SEP] , identifier[BACKUPPLANID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[backupPlansListMember] operator[SEP] identifier[getCreationDate] operator[SEP] operator[SEP] , identifier[CREATIONDATE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[backupPlansListMember] operator[SEP] identifier[getDeletionDate] operator[SEP] operator[SEP] , identifier[DELETIONDATE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[backupPlansListMember] operator[SEP] identifier[getVersionId] operator[SEP] operator[SEP] , identifier[VERSIONID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[backupPlansListMember] operator[SEP] identifier[getBackupPlanName] operator[SEP] operator[SEP] , identifier[BACKUPPLANNAME_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[backupPlansListMember] operator[SEP] identifier[getCreatorRequestId] operator[SEP] operator[SEP] , identifier[CREATORREQUESTID_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[backupPlansListMember] operator[SEP] identifier[getLastExecutionDate] operator[SEP] operator[SEP] , identifier[LASTEXECUTIONDATE_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }
@Override public INDArray exec(RandomOp op, Random rng) { if (!(rng instanceof CpuNativeRandom)) throw new IllegalStateException( "You should use one of NativeRandom classes for NativeOperations execution. Op class: " + op.getClass().getName()); long st = profilingConfigurableHookIn(op); //validateDataType(Nd4j.dataType(), op); Preconditions.checkArgument(op.z().isR(), "Op.Z must have one of floating point types"); if (op.x() != null && op.y() != null && op.z() != null) { // triple arg call loop.execRandom(null, op.opNum(), rng.getStatePointer(), // rng state ptr op.x().data().addressPointer(), (LongPointer) op.x().shapeInfoDataBuffer().addressPointer(), null, null, op.y().data().addressPointer(), (LongPointer) op.y().shapeInfoDataBuffer().addressPointer(), null, null, op.z().data().addressPointer(), (LongPointer) op.z().shapeInfoDataBuffer().addressPointer(), null, null, op.extraArgsDataBuff(op.z().dataType()).addressPointer()); } else if (op.x() != null && op.z() != null) { //double arg call loop.execRandom(null, op.opNum(), rng.getStatePointer(), // rng state ptr op.x().data().addressPointer(), (LongPointer) op.x().shapeInfoDataBuffer().addressPointer(), null, null, op.z().data().addressPointer(), (LongPointer) op.z().shapeInfoDataBuffer().addressPointer(), null, null, op.extraArgsDataBuff(op.z().dataType()).addressPointer()); } else { // single arg call loop.execRandom(null, op.opNum(), rng.getStatePointer(), // rng state ptr op.z().data().addressPointer(), (LongPointer) op.z().shapeInfoDataBuffer().addressPointer(), null, null, op.extraArgsDataBuff(op.z().dataType()).addressPointer()); } profilingConfigurableHookOut(op, st); return op.z(); }
class class_name[name] begin[{] method[exec, return_type[type[INDArray]], modifier[public], parameter[op, rng]] begin[{] if[binary_operation[member[.rng], instanceof, type[CpuNativeRandom]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="You should use one of NativeRandom classes for NativeOperations execution. Op class: "), operandr=MethodInvocation(arguments=[], member=getClass, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalStateException, sub_type=None)), label=None) else begin[{] None end[}] local_variable[type[long], st] call[Preconditions.checkArgument, parameter[call[op.z, parameter[]], literal["Op.Z must have one of floating point types"]]] if[binary_operation[binary_operation[binary_operation[call[op.x, parameter[]], !=, literal[null]], &&, binary_operation[call[op.y, parameter[]], !=, literal[null]]], &&, binary_operation[call[op.z, parameter[]], !=, literal[null]]]] begin[{] call[loop.execRandom, parameter[literal[null], call[op.opNum, parameter[]], call[rng.getStatePointer, parameter[]], call[op.x, parameter[]], Cast(expression=MethodInvocation(arguments=[], member=x, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), literal[null], literal[null], call[op.y, parameter[]], Cast(expression=MethodInvocation(arguments=[], member=y, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), literal[null], literal[null], call[op.z, parameter[]], Cast(expression=MethodInvocation(arguments=[], member=z, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), literal[null], literal[null], call[op.extraArgsDataBuff, parameter[call[op.z, parameter[]]]]]] else begin[{] if[binary_operation[binary_operation[call[op.x, parameter[]], !=, literal[null]], &&, binary_operation[call[op.z, parameter[]], !=, literal[null]]]] begin[{] call[loop.execRandom, parameter[literal[null], call[op.opNum, parameter[]], call[rng.getStatePointer, parameter[]], call[op.x, parameter[]], Cast(expression=MethodInvocation(arguments=[], member=x, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), literal[null], literal[null], call[op.z, parameter[]], Cast(expression=MethodInvocation(arguments=[], member=z, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), literal[null], literal[null], call[op.extraArgsDataBuff, parameter[call[op.z, parameter[]]]]]] else begin[{] call[loop.execRandom, parameter[literal[null], call[op.opNum, parameter[]], call[rng.getStatePointer, parameter[]], call[op.z, parameter[]], Cast(expression=MethodInvocation(arguments=[], member=z, postfix_operators=[], prefix_operators=[], qualifier=op, selectors=[MethodInvocation(arguments=[], member=shapeInfoDataBuffer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[], member=addressPointer, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), type=ReferenceType(arguments=None, dimensions=[], name=LongPointer, sub_type=None)), literal[null], literal[null], call[op.extraArgsDataBuff, parameter[call[op.z, parameter[]]]]]] end[}] end[}] call[.profilingConfigurableHookOut, parameter[member[.op], member[.st]]] return[call[op.z, parameter[]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[INDArray] identifier[exec] operator[SEP] identifier[RandomOp] identifier[op] , identifier[Random] identifier[rng] operator[SEP] { Keyword[if] operator[SEP] operator[!] operator[SEP] identifier[rng] Keyword[instanceof] identifier[CpuNativeRandom] operator[SEP] operator[SEP] Keyword[throw] Keyword[new] identifier[IllegalStateException] operator[SEP] literal[String] operator[+] identifier[op] operator[SEP] identifier[getClass] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[long] identifier[st] operator[=] identifier[profilingConfigurableHookIn] operator[SEP] identifier[op] operator[SEP] operator[SEP] identifier[Preconditions] operator[SEP] identifier[checkArgument] operator[SEP] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[isR] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[op] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[loop] operator[SEP] identifier[execRandom] operator[SEP] Other[null] , identifier[op] operator[SEP] identifier[opNum] operator[SEP] operator[SEP] , identifier[rng] operator[SEP] identifier[getStatePointer] operator[SEP] operator[SEP] , identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[op] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[y] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[op] operator[SEP] identifier[extraArgsDataBuff] operator[SEP] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[dataType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[!=] Other[null] operator[&&] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[loop] operator[SEP] identifier[execRandom] operator[SEP] Other[null] , identifier[op] operator[SEP] identifier[opNum] operator[SEP] operator[SEP] , identifier[rng] operator[SEP] identifier[getStatePointer] operator[SEP] operator[SEP] , identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[x] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[op] operator[SEP] identifier[extraArgsDataBuff] operator[SEP] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[dataType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } Keyword[else] { identifier[loop] operator[SEP] identifier[execRandom] operator[SEP] Other[null] , identifier[op] operator[SEP] identifier[opNum] operator[SEP] operator[SEP] , identifier[rng] operator[SEP] identifier[getStatePointer] operator[SEP] operator[SEP] , identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[data] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , operator[SEP] identifier[LongPointer] operator[SEP] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[shapeInfoDataBuffer] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] , Other[null] , Other[null] , identifier[op] operator[SEP] identifier[extraArgsDataBuff] operator[SEP] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] identifier[dataType] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[addressPointer] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } identifier[profilingConfigurableHookOut] operator[SEP] identifier[op] , identifier[st] operator[SEP] operator[SEP] Keyword[return] identifier[op] operator[SEP] identifier[z] operator[SEP] operator[SEP] operator[SEP] }
public void doAddListener(BaseListener listener) { if (m_nextListener != null) m_nextListener.doAddListener(listener); else m_nextListener = listener; }
class class_name[name] begin[{] method[doAddListener, return_type[void], modifier[public], parameter[listener]] begin[{] if[binary_operation[member[.m_nextListener], !=, literal[null]]] begin[{] call[m_nextListener.doAddListener, parameter[member[.listener]]] else begin[{] assign[member[.m_nextListener], member[.listener]] end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[doAddListener] operator[SEP] identifier[BaseListener] identifier[listener] operator[SEP] { Keyword[if] operator[SEP] identifier[m_nextListener] operator[!=] Other[null] operator[SEP] identifier[m_nextListener] operator[SEP] identifier[doAddListener] operator[SEP] identifier[listener] operator[SEP] operator[SEP] Keyword[else] identifier[m_nextListener] operator[=] identifier[listener] operator[SEP] }
private Attribute getGlobalAttribute(MappedField configuredField, Class<?> configuredClass){ Global global = null; Map<String, Global> globals = loadGlobals(); for (Class<?> clazz : getAllsuperClasses(configuredClass)) { global = globals.get(clazz.getName()); if(!isNull(global))break; } if(!isNull(global) && !isNull(global.getAttributes())) for (SimplyAttribute globalAttribute : global.getAttributes()) { String name = globalAttribute.getName(); if(configuredField.getValue().getName().equals(name)){ String get = globalAttribute.getGet(); String set = globalAttribute.getSet(); if(!isNull(get) || !isNull(set)) return new Attribute(name, null, get, set, null, null); } } return null; }
class class_name[name] begin[{] method[getGlobalAttribute, return_type[type[Attribute]], modifier[private], parameter[configuredField, configuredClass]] begin[{] local_variable[type[Global], global] local_variable[type[Map], globals] ForStatement(body=BlockStatement(label=None, statements=[StatementExpression(expression=Assignment(expressionl=MemberReference(member=global, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), type==, value=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=clazz, selectors=[], type_arguments=None)], member=get, postfix_operators=[], prefix_operators=[], qualifier=globals, selectors=[], type_arguments=None)), label=None), IfStatement(condition=MethodInvocation(arguments=[MemberReference(member=global, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNull, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), else_statement=None, label=None, then_statement=BreakStatement(goto=None, label=None))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[MemberReference(member=configuredClass, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=getAllsuperClasses, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=clazz)], modifiers=set(), type=ReferenceType(arguments=[TypeArgument(pattern_type=?, type=None)], dimensions=[], name=Class, sub_type=None))), label=None) if[binary_operation[call[.isNull, parameter[member[.global]]], &&, call[.isNull, parameter[call[global.getAttributes, parameter[]]]]]] begin[{] ForStatement(body=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getName, postfix_operators=[], prefix_operators=[], qualifier=globalAttribute, selectors=[], type_arguments=None), name=name)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=MethodInvocation(arguments=[], member=getValue, postfix_operators=[], prefix_operators=[], qualifier=configuredField, selectors=[MethodInvocation(arguments=[], member=getName, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None), MethodInvocation(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=equals, postfix_operators=None, prefix_operators=None, qualifier=None, selectors=None, type_arguments=None)], type_arguments=None), else_statement=None, label=None, then_statement=BlockStatement(label=None, statements=[LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getGet, postfix_operators=[], prefix_operators=[], qualifier=globalAttribute, selectors=[], type_arguments=None), name=get)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), LocalVariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=[], initializer=MethodInvocation(arguments=[], member=getSet, postfix_operators=[], prefix_operators=[], qualifier=globalAttribute, selectors=[], type_arguments=None), name=set)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=String, sub_type=None)), IfStatement(condition=BinaryOperation(operandl=MethodInvocation(arguments=[MemberReference(member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNull, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), operandr=MethodInvocation(arguments=[MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=isNull, postfix_operators=[], prefix_operators=['!'], qualifier=, selectors=[], type_arguments=None), operator=||), else_statement=None, label=None, then_statement=ReturnStatement(expression=ClassCreator(arguments=[MemberReference(member=name, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), MemberReference(member=get, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=set, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Attribute, sub_type=None)), label=None))]))]), control=EnhancedForControl(iterable=MethodInvocation(arguments=[], member=getAttributes, postfix_operators=[], prefix_operators=[], qualifier=global, selectors=[], type_arguments=None), var=VariableDeclaration(annotations=[], declarators=[VariableDeclarator(dimensions=None, initializer=None, name=globalAttribute)], modifiers=set(), type=ReferenceType(arguments=None, dimensions=[], name=SimplyAttribute, sub_type=None))), label=None) else begin[{] None end[}] return[literal[null]] end[}] END[}]
Keyword[private] identifier[Attribute] identifier[getGlobalAttribute] operator[SEP] identifier[MappedField] identifier[configuredField] , identifier[Class] operator[<] operator[?] operator[>] identifier[configuredClass] operator[SEP] { identifier[Global] identifier[global] operator[=] Other[null] operator[SEP] identifier[Map] operator[<] identifier[String] , identifier[Global] operator[>] identifier[globals] operator[=] identifier[loadGlobals] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[Class] operator[<] operator[?] operator[>] identifier[clazz] operator[:] identifier[getAllsuperClasses] operator[SEP] identifier[configuredClass] operator[SEP] operator[SEP] { identifier[global] operator[=] identifier[globals] operator[SEP] identifier[get] operator[SEP] identifier[clazz] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isNull] operator[SEP] identifier[global] operator[SEP] operator[SEP] Keyword[break] operator[SEP] } Keyword[if] operator[SEP] operator[!] identifier[isNull] operator[SEP] identifier[global] operator[SEP] operator[&&] operator[!] identifier[isNull] operator[SEP] identifier[global] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[for] operator[SEP] identifier[SimplyAttribute] identifier[globalAttribute] operator[:] identifier[global] operator[SEP] identifier[getAttributes] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[name] operator[=] identifier[globalAttribute] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[configuredField] operator[SEP] identifier[getValue] operator[SEP] operator[SEP] operator[SEP] identifier[getName] operator[SEP] operator[SEP] operator[SEP] identifier[equals] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[String] identifier[get] operator[=] identifier[globalAttribute] operator[SEP] identifier[getGet] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[set] operator[=] identifier[globalAttribute] operator[SEP] identifier[getSet] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[isNull] operator[SEP] identifier[get] operator[SEP] operator[||] operator[!] identifier[isNull] operator[SEP] identifier[set] operator[SEP] operator[SEP] Keyword[return] Keyword[new] identifier[Attribute] operator[SEP] identifier[name] , Other[null] , identifier[get] , identifier[set] , Other[null] , Other[null] operator[SEP] operator[SEP] } } Keyword[return] Other[null] operator[SEP] }
protected HTTPResponse submitHTTPRequestImpl(HTTPRequest httpRequest,HTTPMethod httpMethod) { return this.httpClient.submitHTTPRequest(httpRequest,this.httpClientConfiguration,httpMethod); }
class class_name[name] begin[{] method[submitHTTPRequestImpl, return_type[type[HTTPResponse]], modifier[protected], parameter[httpRequest, httpMethod]] begin[{] return[THIS[member[None.httpClient]call[None.submitHTTPRequest, parameter[member[.httpRequest], THIS[member[None.httpClientConfiguration]], member[.httpMethod]]]]] end[}] END[}]
Keyword[protected] identifier[HTTPResponse] identifier[submitHTTPRequestImpl] operator[SEP] identifier[HTTPRequest] identifier[httpRequest] , identifier[HTTPMethod] identifier[httpMethod] operator[SEP] { Keyword[return] Keyword[this] operator[SEP] identifier[httpClient] operator[SEP] identifier[submitHTTPRequest] operator[SEP] identifier[httpRequest] , Keyword[this] operator[SEP] identifier[httpClientConfiguration] , identifier[httpMethod] operator[SEP] operator[SEP] }
protected void checkSpecifiedUrlPattern(Method executeMethod, String specifiedUrlPattern, List<Class<?>> pathParamTypeList) { if (specifiedUrlPattern != null) { if (canBeAbbreviatedUrlPattern(specifiedUrlPattern)) { throwUrlPatternNonsenseSettingException(executeMethod, specifiedUrlPattern); } if (hasFrontOrRearSlashUrlPattern(specifiedUrlPattern)) { throwUrlPatternFrontOrRearSlashUnneededException(executeMethod, specifiedUrlPattern); } if (hasMethodKeywordWithOptionalArg(specifiedUrlPattern, pathParamTypeList)) { throwUrlPatternMethodKeywordWithOptionalArgException(executeMethod, specifiedUrlPattern); } } }
class class_name[name] begin[{] method[checkSpecifiedUrlPattern, return_type[void], modifier[protected], parameter[executeMethod, specifiedUrlPattern, pathParamTypeList]] begin[{] if[binary_operation[member[.specifiedUrlPattern], !=, literal[null]]] begin[{] if[call[.canBeAbbreviatedUrlPattern, parameter[member[.specifiedUrlPattern]]]] begin[{] call[.throwUrlPatternNonsenseSettingException, parameter[member[.executeMethod], member[.specifiedUrlPattern]]] else begin[{] None end[}] if[call[.hasFrontOrRearSlashUrlPattern, parameter[member[.specifiedUrlPattern]]]] begin[{] call[.throwUrlPatternFrontOrRearSlashUnneededException, parameter[member[.executeMethod], member[.specifiedUrlPattern]]] else begin[{] None end[}] if[call[.hasMethodKeywordWithOptionalArg, parameter[member[.specifiedUrlPattern], member[.pathParamTypeList]]]] begin[{] call[.throwUrlPatternMethodKeywordWithOptionalArgException, parameter[member[.executeMethod], member[.specifiedUrlPattern]]] else begin[{] None end[}] else begin[{] None end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[checkSpecifiedUrlPattern] operator[SEP] identifier[Method] identifier[executeMethod] , identifier[String] identifier[specifiedUrlPattern] , identifier[List] operator[<] identifier[Class] operator[<] operator[?] operator[>] operator[>] identifier[pathParamTypeList] operator[SEP] { Keyword[if] operator[SEP] identifier[specifiedUrlPattern] operator[!=] Other[null] operator[SEP] { Keyword[if] operator[SEP] identifier[canBeAbbreviatedUrlPattern] operator[SEP] identifier[specifiedUrlPattern] operator[SEP] operator[SEP] { identifier[throwUrlPatternNonsenseSettingException] operator[SEP] identifier[executeMethod] , identifier[specifiedUrlPattern] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[hasFrontOrRearSlashUrlPattern] operator[SEP] identifier[specifiedUrlPattern] operator[SEP] operator[SEP] { identifier[throwUrlPatternFrontOrRearSlashUnneededException] operator[SEP] identifier[executeMethod] , identifier[specifiedUrlPattern] operator[SEP] operator[SEP] } Keyword[if] operator[SEP] identifier[hasMethodKeywordWithOptionalArg] operator[SEP] identifier[specifiedUrlPattern] , identifier[pathParamTypeList] operator[SEP] operator[SEP] { identifier[throwUrlPatternMethodKeywordWithOptionalArgException] operator[SEP] identifier[executeMethod] , identifier[specifiedUrlPattern] operator[SEP] operator[SEP] } } }
public Where<T, ID> notIn(String columnName, Iterable<?> objects) throws SQLException { addClause(new In(columnName, findColumnFieldType(columnName), objects, false)); return this; }
class class_name[name] begin[{] method[notIn, return_type[type[Where]], modifier[public], parameter[columnName, objects]] begin[{] call[.addClause, parameter[ClassCreator(arguments=[MemberReference(member=columnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MethodInvocation(arguments=[MemberReference(member=columnName, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=findColumnFieldType, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type_arguments=None), MemberReference(member=objects, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=false)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=In, sub_type=None))]] return[THIS[]] end[}] END[}]
Keyword[public] identifier[Where] operator[<] identifier[T] , identifier[ID] operator[>] identifier[notIn] operator[SEP] identifier[String] identifier[columnName] , identifier[Iterable] operator[<] operator[?] operator[>] identifier[objects] operator[SEP] Keyword[throws] identifier[SQLException] { identifier[addClause] operator[SEP] Keyword[new] identifier[In] operator[SEP] identifier[columnName] , identifier[findColumnFieldType] operator[SEP] identifier[columnName] operator[SEP] , identifier[objects] , literal[boolean] operator[SEP] operator[SEP] operator[SEP] Keyword[return] Keyword[this] operator[SEP] }
public void registerMetrics(MetricRegistry metricRegistry) { if (id() != null) { metricName = MetricRegistry.name(Pipeline.class, id(), "executed"); executed = metricRegistry.meter(metricName); } }
class class_name[name] begin[{] method[registerMetrics, return_type[void], modifier[public], parameter[metricRegistry]] begin[{] if[binary_operation[call[.id, parameter[]], !=, literal[null]]] begin[{] assign[member[.metricName], call[MetricRegistry.name, parameter[ClassReference(postfix_operators=[], prefix_operators=[], qualifier=, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=Pipeline, sub_type=None)), call[.id, parameter[]], literal["executed"]]]] assign[member[.executed], call[metricRegistry.meter, parameter[member[.metricName]]]] else begin[{] None end[}] end[}] END[}]
Keyword[public] Keyword[void] identifier[registerMetrics] operator[SEP] identifier[MetricRegistry] identifier[metricRegistry] operator[SEP] { Keyword[if] operator[SEP] identifier[id] operator[SEP] operator[SEP] operator[!=] Other[null] operator[SEP] { identifier[metricName] operator[=] identifier[MetricRegistry] operator[SEP] identifier[name] operator[SEP] identifier[Pipeline] operator[SEP] Keyword[class] , identifier[id] operator[SEP] operator[SEP] , literal[String] operator[SEP] operator[SEP] identifier[executed] operator[=] identifier[metricRegistry] operator[SEP] identifier[meter] operator[SEP] identifier[metricName] operator[SEP] operator[SEP] } }
protected void ensureColumns(List columns, List existingColumns) { if (columns == null || columns.isEmpty()) { return; } Iterator iter = columns.iterator(); while (iter.hasNext()) { FieldHelper cf = (FieldHelper) iter.next(); if (!existingColumns.contains(cf.name)) { getAttributeInfo(cf.name, false, null, getQuery().getPathClasses()); } } }
class class_name[name] begin[{] method[ensureColumns, return_type[void], modifier[protected], parameter[columns, existingColumns]] begin[{] if[binary_operation[binary_operation[member[.columns], ==, literal[null]], ||, call[columns.isEmpty, parameter[]]]] begin[{] return[None] else begin[{] None end[}] local_variable[type[Iterator], iter] while[call[iter.hasNext, parameter[]]] begin[{] local_variable[type[FieldHelper], cf] if[call[existingColumns.contains, parameter[member[cf.name]]]] begin[{] call[.getAttributeInfo, parameter[member[cf.name], literal[false], literal[null], call[.getQuery, parameter[]]]] else begin[{] None end[}] end[}] end[}] END[}]
Keyword[protected] Keyword[void] identifier[ensureColumns] operator[SEP] identifier[List] identifier[columns] , identifier[List] identifier[existingColumns] operator[SEP] { Keyword[if] operator[SEP] identifier[columns] operator[==] Other[null] operator[||] identifier[columns] operator[SEP] identifier[isEmpty] operator[SEP] operator[SEP] operator[SEP] { Keyword[return] operator[SEP] } identifier[Iterator] identifier[iter] operator[=] identifier[columns] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iter] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[FieldHelper] identifier[cf] operator[=] operator[SEP] identifier[FieldHelper] operator[SEP] identifier[iter] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[existingColumns] operator[SEP] identifier[contains] operator[SEP] identifier[cf] operator[SEP] identifier[name] operator[SEP] operator[SEP] { identifier[getAttributeInfo] operator[SEP] identifier[cf] operator[SEP] identifier[name] , literal[boolean] , Other[null] , identifier[getQuery] operator[SEP] operator[SEP] operator[SEP] identifier[getPathClasses] operator[SEP] operator[SEP] operator[SEP] operator[SEP] } } }
public boolean validLogin(String identifier, String password, String hash) { Objects.requireNonNull(identifier, Required.USERNAME.toString()); Objects.requireNonNull(password, Required.PASSWORD.toString()); Objects.requireNonNull(hash, Required.HASH.toString()); Cache cache = Application.getInstance(CacheProvider.class).getCache(CacheName.AUTH); boolean authenticated = false; if (!userHasLock(identifier) && CodecUtils.checkJBCrypt(password, hash)) { authenticated = true; } else { cache.increment(identifier); } return authenticated; }
class class_name[name] begin[{] method[validLogin, return_type[type[boolean]], modifier[public], parameter[identifier, password, hash]] begin[{] call[Objects.requireNonNull, parameter[member[.identifier], call[Required.USERNAME.toString, parameter[]]]] call[Objects.requireNonNull, parameter[member[.password], call[Required.PASSWORD.toString, parameter[]]]] call[Objects.requireNonNull, parameter[member[.hash], call[Required.HASH.toString, parameter[]]]] local_variable[type[Cache], cache] local_variable[type[boolean], authenticated] if[binary_operation[call[.userHasLock, parameter[member[.identifier]]], &&, call[CodecUtils.checkJBCrypt, parameter[member[.password], member[.hash]]]]] begin[{] assign[member[.authenticated], literal[true]] else begin[{] call[cache.increment, parameter[member[.identifier]]] end[}] return[member[.authenticated]] end[}] END[}]
Keyword[public] Keyword[boolean] identifier[validLogin] operator[SEP] identifier[String] identifier[identifier] , identifier[String] identifier[password] , identifier[String] identifier[hash] operator[SEP] { identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[identifier] , identifier[Required] operator[SEP] identifier[USERNAME] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[password] , identifier[Required] operator[SEP] identifier[PASSWORD] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Objects] operator[SEP] identifier[requireNonNull] operator[SEP] identifier[hash] , identifier[Required] operator[SEP] identifier[HASH] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Cache] identifier[cache] operator[=] identifier[Application] operator[SEP] identifier[getInstance] operator[SEP] identifier[CacheProvider] operator[SEP] Keyword[class] operator[SEP] operator[SEP] identifier[getCache] operator[SEP] identifier[CacheName] operator[SEP] identifier[AUTH] operator[SEP] operator[SEP] Keyword[boolean] identifier[authenticated] operator[=] literal[boolean] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[userHasLock] operator[SEP] identifier[identifier] operator[SEP] operator[&&] identifier[CodecUtils] operator[SEP] identifier[checkJBCrypt] operator[SEP] identifier[password] , identifier[hash] operator[SEP] operator[SEP] { identifier[authenticated] operator[=] literal[boolean] operator[SEP] } Keyword[else] { identifier[cache] operator[SEP] identifier[increment] operator[SEP] identifier[identifier] operator[SEP] operator[SEP] } Keyword[return] identifier[authenticated] operator[SEP] }
public static void addBindingUpdateError( ServletRequest request, String expression, String message, Throwable cause ) { Map errors = ( Map ) request.getAttribute( BINDING_UPDATE_ERRORS_ATTR ); if ( errors == null ) { errors = new LinkedHashMap(); request.setAttribute( BINDING_UPDATE_ERRORS_ATTR, errors ); } errors.put( expression, new BindingUpdateError( expression, message, cause ) ); }
class class_name[name] begin[{] method[addBindingUpdateError, return_type[void], modifier[public static], parameter[request, expression, message, cause]] begin[{] local_variable[type[Map], errors] if[binary_operation[member[.errors], ==, literal[null]]] begin[{] assign[member[.errors], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=LinkedHashMap, sub_type=None))] call[request.setAttribute, parameter[member[.BINDING_UPDATE_ERRORS_ATTR], member[.errors]]] else begin[{] None end[}] call[errors.put, parameter[member[.expression], ClassCreator(arguments=[MemberReference(member=expression, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=message, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=cause, 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=BindingUpdateError, sub_type=None))]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[void] identifier[addBindingUpdateError] operator[SEP] identifier[ServletRequest] identifier[request] , identifier[String] identifier[expression] , identifier[String] identifier[message] , identifier[Throwable] identifier[cause] operator[SEP] { identifier[Map] identifier[errors] operator[=] operator[SEP] identifier[Map] operator[SEP] identifier[request] operator[SEP] identifier[getAttribute] operator[SEP] identifier[BINDING_UPDATE_ERRORS_ATTR] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[errors] operator[==] Other[null] operator[SEP] { identifier[errors] operator[=] Keyword[new] identifier[LinkedHashMap] operator[SEP] operator[SEP] operator[SEP] identifier[request] operator[SEP] identifier[setAttribute] operator[SEP] identifier[BINDING_UPDATE_ERRORS_ATTR] , identifier[errors] operator[SEP] operator[SEP] } identifier[errors] operator[SEP] identifier[put] operator[SEP] identifier[expression] , Keyword[new] identifier[BindingUpdateError] operator[SEP] identifier[expression] , identifier[message] , identifier[cause] operator[SEP] operator[SEP] operator[SEP] }
private static int toContext(int style) { switch (style) { case Calendar.SHORT_FORMAT: case Calendar.NARROW_FORMAT: case Calendar.LONG_FORMAT: return DateFormatSymbols.FORMAT; case Calendar.SHORT_STANDALONE: case Calendar.NARROW_STANDALONE: case Calendar.LONG_STANDALONE: return DateFormatSymbols.STANDALONE; default: throw new IllegalArgumentException("Invalid style: " + style); } }
class class_name[name] begin[{] method[toContext, return_type[type[int]], modifier[private static], parameter[style]] begin[{] SwitchStatement(cases=[SwitchStatementCase(case=[MemberReference(member=SHORT_FORMAT, postfix_operators=[], prefix_operators=[], qualifier=Calendar, selectors=[]), MemberReference(member=NARROW_FORMAT, postfix_operators=[], prefix_operators=[], qualifier=Calendar, selectors=[]), MemberReference(member=LONG_FORMAT, postfix_operators=[], prefix_operators=[], qualifier=Calendar, selectors=[])], statements=[ReturnStatement(expression=MemberReference(member=FORMAT, postfix_operators=[], prefix_operators=[], qualifier=DateFormatSymbols, selectors=[]), label=None)]), SwitchStatementCase(case=[MemberReference(member=SHORT_STANDALONE, postfix_operators=[], prefix_operators=[], qualifier=Calendar, selectors=[]), MemberReference(member=NARROW_STANDALONE, postfix_operators=[], prefix_operators=[], qualifier=Calendar, selectors=[]), MemberReference(member=LONG_STANDALONE, postfix_operators=[], prefix_operators=[], qualifier=Calendar, selectors=[])], statements=[ReturnStatement(expression=MemberReference(member=STANDALONE, postfix_operators=[], prefix_operators=[], qualifier=DateFormatSymbols, selectors=[]), label=None)]), SwitchStatementCase(case=[], statements=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid style: "), operandr=MemberReference(member=style, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None)])], expression=MemberReference(member=style, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), label=None) end[}] END[}]
Keyword[private] Keyword[static] Keyword[int] identifier[toContext] operator[SEP] Keyword[int] identifier[style] operator[SEP] { Keyword[switch] operator[SEP] identifier[style] operator[SEP] { Keyword[case] identifier[Calendar] operator[SEP] identifier[SHORT_FORMAT] operator[:] Keyword[case] identifier[Calendar] operator[SEP] identifier[NARROW_FORMAT] operator[:] Keyword[case] identifier[Calendar] operator[SEP] identifier[LONG_FORMAT] operator[:] Keyword[return] identifier[DateFormatSymbols] operator[SEP] identifier[FORMAT] operator[SEP] Keyword[case] identifier[Calendar] operator[SEP] identifier[SHORT_STANDALONE] operator[:] Keyword[case] identifier[Calendar] operator[SEP] identifier[NARROW_STANDALONE] operator[:] Keyword[case] identifier[Calendar] operator[SEP] identifier[LONG_STANDALONE] operator[:] Keyword[return] identifier[DateFormatSymbols] operator[SEP] identifier[STANDALONE] operator[SEP] Keyword[default] operator[:] Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] literal[String] operator[+] identifier[style] operator[SEP] operator[SEP] } }
private int processTemplate() { ServletRequest req = pageContext.getRequest(); Template.TemplateContext tc = (Template.TemplateContext) req.getAttribute(TEMPLATE_SECTIONS); if (tc.secs == null) { tc.secs = new HashMap(); } assert (tc.secs != null); if (!_visible) { // set the section so that it doesn't contain anything tc.secs.put(_name,""); localRelease(); return EVAL_PAGE; } if (hasErrors()) { String s = getErrorsReport(); tc.secs.put(_name,s); localRelease(); return EVAL_PAGE; } BodyContent bc = getBodyContent(); String content = (bc != null) ? bc.getString() : ""; tc.secs.put(_name,content); localRelease(); return EVAL_PAGE; }
class class_name[name] begin[{] method[processTemplate, return_type[type[int]], modifier[private], parameter[]] begin[{] local_variable[type[ServletRequest], req] local_variable[type[Template], tc] if[binary_operation[member[tc.secs], ==, literal[null]]] begin[{] assign[member[tc.secs], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=HashMap, sub_type=None))] else begin[{] None end[}] AssertStatement(condition=BinaryOperation(operandl=MemberReference(member=secs, postfix_operators=[], prefix_operators=[], qualifier=tc, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=null), operator=!=), label=None, value=None) if[member[._visible]] begin[{] call[tc.secs.put, parameter[member[._name], literal[""]]] call[.localRelease, parameter[]] return[member[.EVAL_PAGE]] else begin[{] None end[}] if[call[.hasErrors, parameter[]]] begin[{] local_variable[type[String], s] call[tc.secs.put, parameter[member[._name], member[.s]]] call[.localRelease, parameter[]] return[member[.EVAL_PAGE]] else begin[{] None end[}] local_variable[type[BodyContent], bc] local_variable[type[String], content] call[tc.secs.put, parameter[member[._name], member[.content]]] call[.localRelease, parameter[]] return[member[.EVAL_PAGE]] end[}] END[}]
Keyword[private] Keyword[int] identifier[processTemplate] operator[SEP] operator[SEP] { identifier[ServletRequest] identifier[req] operator[=] identifier[pageContext] operator[SEP] identifier[getRequest] operator[SEP] operator[SEP] operator[SEP] identifier[Template] operator[SEP] identifier[TemplateContext] identifier[tc] operator[=] operator[SEP] identifier[Template] operator[SEP] identifier[TemplateContext] operator[SEP] identifier[req] operator[SEP] identifier[getAttribute] operator[SEP] identifier[TEMPLATE_SECTIONS] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[tc] operator[SEP] identifier[secs] operator[==] Other[null] operator[SEP] { identifier[tc] operator[SEP] identifier[secs] operator[=] Keyword[new] identifier[HashMap] operator[SEP] operator[SEP] operator[SEP] } Keyword[assert] operator[SEP] identifier[tc] operator[SEP] identifier[secs] operator[!=] Other[null] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[!] identifier[_visible] operator[SEP] { identifier[tc] operator[SEP] identifier[secs] operator[SEP] identifier[put] operator[SEP] identifier[_name] , literal[String] operator[SEP] operator[SEP] identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[EVAL_PAGE] operator[SEP] } Keyword[if] operator[SEP] identifier[hasErrors] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[s] operator[=] identifier[getErrorsReport] operator[SEP] operator[SEP] operator[SEP] identifier[tc] operator[SEP] identifier[secs] operator[SEP] identifier[put] operator[SEP] identifier[_name] , identifier[s] operator[SEP] operator[SEP] identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[EVAL_PAGE] operator[SEP] } identifier[BodyContent] identifier[bc] operator[=] identifier[getBodyContent] operator[SEP] operator[SEP] operator[SEP] identifier[String] identifier[content] operator[=] operator[SEP] identifier[bc] operator[!=] Other[null] operator[SEP] operator[?] identifier[bc] operator[SEP] identifier[getString] operator[SEP] operator[SEP] operator[:] literal[String] operator[SEP] identifier[tc] operator[SEP] identifier[secs] operator[SEP] identifier[put] operator[SEP] identifier[_name] , identifier[content] operator[SEP] operator[SEP] identifier[localRelease] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[EVAL_PAGE] operator[SEP] }
public static final long getLongAttribute(Path path, String attribute, long def, LinkOption... options) throws IOException { attribute = attribute.startsWith("user:") ? attribute : "user:"+attribute; byte[] attr = (byte[]) Files.getAttribute(path, attribute, options); if (attr == null) { return def; } if (attr.length != 8) { throw new IllegalArgumentException(attribute+" not correct type"); } return Primitives.readLong(attr); }
class class_name[name] begin[{] method[getLongAttribute, return_type[type[long]], modifier[final public static], parameter[path, attribute, def, options]] begin[{] assign[member[.attribute], TernaryExpression(condition=MethodInvocation(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="user:")], member=startsWith, postfix_operators=[], prefix_operators=[], qualifier=attribute, selectors=[], type_arguments=None), if_false=BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="user:"), operandr=MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operator=+), if_true=MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]))] local_variable[type[byte], attr] if[binary_operation[member[.attr], ==, literal[null]]] begin[{] return[member[.def]] else begin[{] None end[}] if[binary_operation[member[attr.length], !=, literal[8]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=MemberReference(member=attribute, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), operandr=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value=" not correct type"), operator=+)], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=IllegalArgumentException, sub_type=None)), label=None) else begin[{] None end[}] return[call[Primitives.readLong, parameter[member[.attr]]]] end[}] END[}]
Keyword[public] Keyword[static] Keyword[final] Keyword[long] identifier[getLongAttribute] operator[SEP] identifier[Path] identifier[path] , identifier[String] identifier[attribute] , Keyword[long] identifier[def] , identifier[LinkOption] operator[...] identifier[options] operator[SEP] Keyword[throws] identifier[IOException] { identifier[attribute] operator[=] identifier[attribute] operator[SEP] identifier[startsWith] operator[SEP] literal[String] operator[SEP] operator[?] identifier[attribute] operator[:] literal[String] operator[+] identifier[attribute] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] identifier[attr] operator[=] operator[SEP] Keyword[byte] operator[SEP] operator[SEP] operator[SEP] identifier[Files] operator[SEP] identifier[getAttribute] operator[SEP] identifier[path] , identifier[attribute] , identifier[options] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[attr] operator[==] Other[null] operator[SEP] { Keyword[return] identifier[def] operator[SEP] } Keyword[if] operator[SEP] identifier[attr] operator[SEP] identifier[length] operator[!=] Other[8] operator[SEP] { Keyword[throw] Keyword[new] identifier[IllegalArgumentException] operator[SEP] identifier[attribute] operator[+] literal[String] operator[SEP] operator[SEP] } Keyword[return] identifier[Primitives] operator[SEP] identifier[readLong] operator[SEP] identifier[attr] operator[SEP] operator[SEP] }
public static String doPost(String url, Map<String, String> header, String param) throws KeyManagementException, NoSuchAlgorithmException, IOException { String result = null; HttpClient httpClient = new SSLClient(); httpClient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, Constant.DEFAULT_CONN_TIMEOUT); httpClient.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, Constant.DEFAULT_READ_TIMEOUT); HttpPost httpPost = new HttpPost(url); Iterator iterator; if (header != null) { Set<String> keys = header.keySet(); iterator = keys.iterator(); while(iterator.hasNext()) { String key = (String)iterator.next(); httpPost.setHeader(key, header.get(key)); } } httpPost.setEntity(new StringEntity(param, Constant.DEFAULT_CHARSET)); HttpResponse response = httpClient.execute(httpPost); if (response != null) { HttpEntity resEntity = response.getEntity(); if (resEntity != null) { result = EntityUtils.toString(resEntity, Constant.DEFAULT_CHARSET); } } return result; }
class class_name[name] begin[{] method[doPost, return_type[type[String]], modifier[public static], parameter[url, header, param]] begin[{] local_variable[type[String], result] local_variable[type[HttpClient], httpClient] call[httpClient.getParams, parameter[]] call[httpClient.getParams, parameter[]] local_variable[type[HttpPost], httpPost] local_variable[type[Iterator], iterator] if[binary_operation[member[.header], !=, literal[null]]] begin[{] local_variable[type[Set], keys] assign[member[.iterator], call[keys.iterator, parameter[]]] while[call[iterator.hasNext, parameter[]]] begin[{] local_variable[type[String], key] call[httpPost.setHeader, parameter[member[.key], call[header.get, parameter[member[.key]]]]] end[}] else begin[{] None end[}] call[httpPost.setEntity, parameter[ClassCreator(arguments=[MemberReference(member=param, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[]), MemberReference(member=DEFAULT_CHARSET, postfix_operators=[], prefix_operators=[], qualifier=Constant, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringEntity, sub_type=None))]] local_variable[type[HttpResponse], response] if[binary_operation[member[.response], !=, literal[null]]] begin[{] local_variable[type[HttpEntity], resEntity] if[binary_operation[member[.resEntity], !=, literal[null]]] begin[{] assign[member[.result], call[EntityUtils.toString, parameter[member[.resEntity], member[Constant.DEFAULT_CHARSET]]]] else begin[{] None end[}] else begin[{] None end[}] return[member[.result]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[doPost] operator[SEP] identifier[String] identifier[url] , identifier[Map] operator[<] identifier[String] , identifier[String] operator[>] identifier[header] , identifier[String] identifier[param] operator[SEP] Keyword[throws] identifier[KeyManagementException] , identifier[NoSuchAlgorithmException] , identifier[IOException] { identifier[String] identifier[result] operator[=] Other[null] operator[SEP] identifier[HttpClient] identifier[httpClient] operator[=] Keyword[new] identifier[SSLClient] operator[SEP] operator[SEP] operator[SEP] identifier[httpClient] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] identifier[setParameter] operator[SEP] identifier[CoreConnectionPNames] operator[SEP] identifier[CONNECTION_TIMEOUT] , identifier[Constant] operator[SEP] identifier[DEFAULT_CONN_TIMEOUT] operator[SEP] operator[SEP] identifier[httpClient] operator[SEP] identifier[getParams] operator[SEP] operator[SEP] operator[SEP] identifier[setParameter] operator[SEP] identifier[CoreConnectionPNames] operator[SEP] identifier[SO_TIMEOUT] , identifier[Constant] operator[SEP] identifier[DEFAULT_READ_TIMEOUT] operator[SEP] operator[SEP] identifier[HttpPost] identifier[httpPost] operator[=] Keyword[new] identifier[HttpPost] operator[SEP] identifier[url] operator[SEP] operator[SEP] identifier[Iterator] identifier[iterator] operator[SEP] Keyword[if] operator[SEP] identifier[header] operator[!=] Other[null] operator[SEP] { identifier[Set] operator[<] identifier[String] operator[>] identifier[keys] operator[=] identifier[header] operator[SEP] identifier[keySet] operator[SEP] operator[SEP] operator[SEP] identifier[iterator] operator[=] identifier[keys] operator[SEP] identifier[iterator] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] identifier[iterator] operator[SEP] identifier[hasNext] operator[SEP] operator[SEP] operator[SEP] { identifier[String] identifier[key] operator[=] operator[SEP] identifier[String] operator[SEP] identifier[iterator] operator[SEP] identifier[next] operator[SEP] operator[SEP] operator[SEP] identifier[httpPost] operator[SEP] identifier[setHeader] operator[SEP] identifier[key] , identifier[header] operator[SEP] identifier[get] operator[SEP] identifier[key] operator[SEP] operator[SEP] operator[SEP] } } identifier[httpPost] operator[SEP] identifier[setEntity] operator[SEP] Keyword[new] identifier[StringEntity] operator[SEP] identifier[param] , identifier[Constant] operator[SEP] identifier[DEFAULT_CHARSET] operator[SEP] operator[SEP] operator[SEP] identifier[HttpResponse] identifier[response] operator[=] identifier[httpClient] operator[SEP] identifier[execute] operator[SEP] identifier[httpPost] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[response] operator[!=] Other[null] operator[SEP] { identifier[HttpEntity] identifier[resEntity] operator[=] identifier[response] operator[SEP] identifier[getEntity] operator[SEP] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[resEntity] operator[!=] Other[null] operator[SEP] { identifier[result] operator[=] identifier[EntityUtils] operator[SEP] identifier[toString] operator[SEP] identifier[resEntity] , identifier[Constant] operator[SEP] identifier[DEFAULT_CHARSET] operator[SEP] operator[SEP] } } Keyword[return] identifier[result] operator[SEP] }
private static String patternMatching(String ptnName, String input) { String suffix = ""; if (ptnNumber == null) patternCompile(); Matcher matcher; if (ptnName.equals("number")) { matcher = ptnNumber.matcher(input); if (matcher.matches()) suffix = ":number"; } else if (ptnName.equals("short_date")) { matcher = ptnShortDate.matcher(input); if (matcher.matches()) suffix = ":short-date"; } else if (ptnName.equals("long_date")) { matcher = ptnLongDate.matcher(input); if (matcher.matches()) suffix = ":long-date"; } else if (ptnName.equals("percentage")) { matcher = ptnPercentage.matcher(input); if (matcher.matches()) suffix = ":percentage"; } else if (ptnName.equals("currency")) { matcher = ptnCurrency.matcher(input); if (matcher.matches()) suffix = ":currency"; else { matcher = ptnViCurrency.matcher(input); if (matcher.matches()) { suffix = ":currency"; } } } return suffix; }
class class_name[name] begin[{] method[patternMatching, return_type[type[String]], modifier[private static], parameter[ptnName, input]] begin[{] local_variable[type[String], suffix] if[binary_operation[member[.ptnNumber], ==, literal[null]]] begin[{] call[.patternCompile, parameter[]] else begin[{] None end[}] local_variable[type[Matcher], matcher] if[call[ptnName.equals, parameter[literal["number"]]]] begin[{] assign[member[.matcher], call[ptnNumber.matcher, parameter[member[.input]]]] if[call[matcher.matches, parameter[]]] begin[{] assign[member[.suffix], literal[":number"]] else begin[{] None end[}] else begin[{] if[call[ptnName.equals, parameter[literal["short_date"]]]] begin[{] assign[member[.matcher], call[ptnShortDate.matcher, parameter[member[.input]]]] if[call[matcher.matches, parameter[]]] begin[{] assign[member[.suffix], literal[":short-date"]] else begin[{] None end[}] else begin[{] if[call[ptnName.equals, parameter[literal["long_date"]]]] begin[{] assign[member[.matcher], call[ptnLongDate.matcher, parameter[member[.input]]]] if[call[matcher.matches, parameter[]]] begin[{] assign[member[.suffix], literal[":long-date"]] else begin[{] None end[}] else begin[{] if[call[ptnName.equals, parameter[literal["percentage"]]]] begin[{] assign[member[.matcher], call[ptnPercentage.matcher, parameter[member[.input]]]] if[call[matcher.matches, parameter[]]] begin[{] assign[member[.suffix], literal[":percentage"]] else begin[{] None end[}] else begin[{] if[call[ptnName.equals, parameter[literal["currency"]]]] begin[{] assign[member[.matcher], call[ptnCurrency.matcher, parameter[member[.input]]]] if[call[matcher.matches, parameter[]]] begin[{] assign[member[.suffix], literal[":currency"]] else begin[{] assign[member[.matcher], call[ptnViCurrency.matcher, parameter[member[.input]]]] if[call[matcher.matches, parameter[]]] begin[{] assign[member[.suffix], literal[":currency"]] else begin[{] None end[}] end[}] else begin[{] None end[}] end[}] end[}] end[}] end[}] return[member[.suffix]] end[}] END[}]
Keyword[private] Keyword[static] identifier[String] identifier[patternMatching] operator[SEP] identifier[String] identifier[ptnName] , identifier[String] identifier[input] operator[SEP] { identifier[String] identifier[suffix] operator[=] literal[String] operator[SEP] Keyword[if] operator[SEP] identifier[ptnNumber] operator[==] Other[null] operator[SEP] identifier[patternCompile] operator[SEP] operator[SEP] operator[SEP] identifier[Matcher] identifier[matcher] operator[SEP] Keyword[if] operator[SEP] identifier[ptnName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[matcher] operator[=] identifier[ptnNumber] operator[SEP] identifier[matcher] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] identifier[suffix] operator[=] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ptnName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[matcher] operator[=] identifier[ptnShortDate] operator[SEP] identifier[matcher] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] identifier[suffix] operator[=] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ptnName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[matcher] operator[=] identifier[ptnLongDate] operator[SEP] identifier[matcher] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] identifier[suffix] operator[=] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ptnName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[matcher] operator[=] identifier[ptnPercentage] operator[SEP] identifier[matcher] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] identifier[suffix] operator[=] literal[String] operator[SEP] } Keyword[else] Keyword[if] operator[SEP] identifier[ptnName] operator[SEP] identifier[equals] operator[SEP] literal[String] operator[SEP] operator[SEP] { identifier[matcher] operator[=] identifier[ptnCurrency] operator[SEP] identifier[matcher] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] identifier[suffix] operator[=] literal[String] operator[SEP] Keyword[else] { identifier[matcher] operator[=] identifier[ptnViCurrency] operator[SEP] identifier[matcher] operator[SEP] identifier[input] operator[SEP] operator[SEP] Keyword[if] operator[SEP] identifier[matcher] operator[SEP] identifier[matches] operator[SEP] operator[SEP] operator[SEP] { identifier[suffix] operator[=] literal[String] operator[SEP] } } } Keyword[return] identifier[suffix] operator[SEP] }
@Override public ConfListVo getConfVo(Long configId) { Config config = configDao.get(configId); App app = appMgr.getById(config.getAppId()); Env env = envMgr.getById(config.getEnvId()); return convert(config, app.getName(), env.getName(), null); }
class class_name[name] begin[{] method[getConfVo, return_type[type[ConfListVo]], modifier[public], parameter[configId]] begin[{] local_variable[type[Config], config] local_variable[type[App], app] local_variable[type[Env], env] return[call[.convert, parameter[member[.config], call[app.getName, parameter[]], call[env.getName, parameter[]], literal[null]]]] end[}] END[}]
annotation[@] identifier[Override] Keyword[public] identifier[ConfListVo] identifier[getConfVo] operator[SEP] identifier[Long] identifier[configId] operator[SEP] { identifier[Config] identifier[config] operator[=] identifier[configDao] operator[SEP] identifier[get] operator[SEP] identifier[configId] operator[SEP] operator[SEP] identifier[App] identifier[app] operator[=] identifier[appMgr] operator[SEP] identifier[getById] operator[SEP] identifier[config] operator[SEP] identifier[getAppId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] identifier[Env] identifier[env] operator[=] identifier[envMgr] operator[SEP] identifier[getById] operator[SEP] identifier[config] operator[SEP] identifier[getEnvId] operator[SEP] operator[SEP] operator[SEP] operator[SEP] Keyword[return] identifier[convert] operator[SEP] identifier[config] , identifier[app] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , identifier[env] operator[SEP] identifier[getName] operator[SEP] operator[SEP] , Other[null] operator[SEP] operator[SEP] }
public static String convertNewLines(String string) { int index; // Replace with \n StringBuffer newStringBuffer = new StringBuffer(); while ((index = string.indexOf('\n')) != -1) { if (index > 0) { newStringBuffer.append(string.substring(0, index)); } newStringBuffer.append('\\'); newStringBuffer.append('n'); if ((index + 1) < string.length()) { string = string.substring(index + 1); } else { string = ""; } } newStringBuffer.append(string); string = newStringBuffer.toString(); // Replace with \r newStringBuffer = new StringBuffer(); while ((index = string.indexOf('\r')) != -1) { if (index > 0) { newStringBuffer.append(string.substring(0, index)); } newStringBuffer.append('\\'); newStringBuffer.append('r'); if ((index + 1) < string.length()){ string = string.substring(index + 1); } else { string = ""; } } newStringBuffer.append(string); return newStringBuffer.toString(); }
class class_name[name] begin[{] method[convertNewLines, return_type[type[String]], modifier[public static], parameter[string]] begin[{] local_variable[type[int], index] local_variable[type[StringBuffer], newStringBuffer] while[binary_operation[assign[member[.index], call[string.indexOf, parameter[literal['\n']]]], !=, literal[1]]] begin[{] if[binary_operation[member[.index], >, literal[0]]] begin[{] call[newStringBuffer.append, parameter[call[string.substring, parameter[literal[0], member[.index]]]]] else begin[{] None end[}] call[newStringBuffer.append, parameter[literal['\\']]] call[newStringBuffer.append, parameter[literal['n']]] if[binary_operation[binary_operation[member[.index], +, literal[1]], <, call[string.length, parameter[]]]] begin[{] assign[member[.string], call[string.substring, parameter[binary_operation[member[.index], +, literal[1]]]]] else begin[{] assign[member[.string], literal[""]] end[}] end[}] call[newStringBuffer.append, parameter[member[.string]]] assign[member[.string], call[newStringBuffer.toString, parameter[]]] assign[member[.newStringBuffer], ClassCreator(arguments=[], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=StringBuffer, sub_type=None))] while[binary_operation[assign[member[.index], call[string.indexOf, parameter[literal['\r']]]], !=, literal[1]]] begin[{] if[binary_operation[member[.index], >, literal[0]]] begin[{] call[newStringBuffer.append, parameter[call[string.substring, parameter[literal[0], member[.index]]]]] else begin[{] None end[}] call[newStringBuffer.append, parameter[literal['\\']]] call[newStringBuffer.append, parameter[literal['r']]] if[binary_operation[binary_operation[member[.index], +, literal[1]], <, call[string.length, parameter[]]]] begin[{] assign[member[.string], call[string.substring, parameter[binary_operation[member[.index], +, literal[1]]]]] else begin[{] assign[member[.string], literal[""]] end[}] end[}] call[newStringBuffer.append, parameter[member[.string]]] return[call[newStringBuffer.toString, parameter[]]] end[}] END[}]
Keyword[public] Keyword[static] identifier[String] identifier[convertNewLines] operator[SEP] identifier[String] identifier[string] operator[SEP] { Keyword[int] identifier[index] operator[SEP] identifier[StringBuffer] identifier[newStringBuffer] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[index] operator[=] identifier[string] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[>] Other[0] operator[SEP] { identifier[newStringBuffer] operator[SEP] identifier[append] operator[SEP] identifier[string] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[index] operator[SEP] operator[SEP] operator[SEP] } identifier[newStringBuffer] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[newStringBuffer] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[index] operator[+] Other[1] operator[SEP] operator[<] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[string] operator[=] identifier[string] operator[SEP] identifier[substring] operator[SEP] identifier[index] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[string] operator[=] literal[String] operator[SEP] } } identifier[newStringBuffer] operator[SEP] identifier[append] operator[SEP] identifier[string] operator[SEP] operator[SEP] identifier[string] operator[=] identifier[newStringBuffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] identifier[newStringBuffer] operator[=] Keyword[new] identifier[StringBuffer] operator[SEP] operator[SEP] operator[SEP] Keyword[while] operator[SEP] operator[SEP] identifier[index] operator[=] identifier[string] operator[SEP] identifier[indexOf] operator[SEP] literal[String] operator[SEP] operator[SEP] operator[!=] operator[-] Other[1] operator[SEP] { Keyword[if] operator[SEP] identifier[index] operator[>] Other[0] operator[SEP] { identifier[newStringBuffer] operator[SEP] identifier[append] operator[SEP] identifier[string] operator[SEP] identifier[substring] operator[SEP] Other[0] , identifier[index] operator[SEP] operator[SEP] operator[SEP] } identifier[newStringBuffer] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] identifier[newStringBuffer] operator[SEP] identifier[append] operator[SEP] literal[String] operator[SEP] operator[SEP] Keyword[if] operator[SEP] operator[SEP] identifier[index] operator[+] Other[1] operator[SEP] operator[<] identifier[string] operator[SEP] identifier[length] operator[SEP] operator[SEP] operator[SEP] { identifier[string] operator[=] identifier[string] operator[SEP] identifier[substring] operator[SEP] identifier[index] operator[+] Other[1] operator[SEP] operator[SEP] } Keyword[else] { identifier[string] operator[=] literal[String] operator[SEP] } } identifier[newStringBuffer] operator[SEP] identifier[append] operator[SEP] identifier[string] operator[SEP] operator[SEP] Keyword[return] identifier[newStringBuffer] operator[SEP] identifier[toString] operator[SEP] operator[SEP] operator[SEP] }
public void marshall(Connection connection, ProtocolMarshaller protocolMarshaller) { if (connection == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(connection.getReplicationInstanceArn(), REPLICATIONINSTANCEARN_BINDING); protocolMarshaller.marshall(connection.getEndpointArn(), ENDPOINTARN_BINDING); protocolMarshaller.marshall(connection.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(connection.getLastFailureMessage(), LASTFAILUREMESSAGE_BINDING); protocolMarshaller.marshall(connection.getEndpointIdentifier(), ENDPOINTIDENTIFIER_BINDING); protocolMarshaller.marshall(connection.getReplicationInstanceIdentifier(), REPLICATIONINSTANCEIDENTIFIER_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
class class_name[name] begin[{] method[marshall, return_type[void], modifier[public], parameter[connection, protocolMarshaller]] begin[{] if[binary_operation[member[.connection], ==, literal[null]]] begin[{] ThrowStatement(expression=ClassCreator(arguments=[Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Invalid argument passed to marshall(...)")], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None) else begin[{] None end[}] TryStatement(block=[StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getReplicationInstanceArn, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), MemberReference(member=REPLICATIONINSTANCEARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEndpointArn, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), MemberReference(member=ENDPOINTARN_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getStatus, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), MemberReference(member=STATUS_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getLastFailureMessage, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), MemberReference(member=LASTFAILUREMESSAGE_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getEndpointIdentifier, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), MemberReference(member=ENDPOINTIDENTIFIER_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None), StatementExpression(expression=MethodInvocation(arguments=[MethodInvocation(arguments=[], member=getReplicationInstanceIdentifier, postfix_operators=[], prefix_operators=[], qualifier=connection, selectors=[], type_arguments=None), MemberReference(member=REPLICATIONINSTANCEIDENTIFIER_BINDING, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], member=marshall, postfix_operators=[], prefix_operators=[], qualifier=protocolMarshaller, selectors=[], type_arguments=None), label=None)], catches=[CatchClause(block=[ThrowStatement(expression=ClassCreator(arguments=[BinaryOperation(operandl=Literal(postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], value="Unable to marshall request to JSON: "), operandr=MethodInvocation(arguments=[], member=getMessage, postfix_operators=[], prefix_operators=[], qualifier=e, selectors=[], type_arguments=None), operator=+), MemberReference(member=e, postfix_operators=[], prefix_operators=[], qualifier=, selectors=[])], body=None, constructor_type_arguments=None, postfix_operators=[], prefix_operators=[], qualifier=None, selectors=[], type=ReferenceType(arguments=None, dimensions=None, name=SdkClientException, sub_type=None)), label=None)], label=None, parameter=CatchClauseParameter(annotations=None, modifiers=None, name=e, types=['Exception']))], finally_block=None, label=None, resources=None) end[}] END[}]
Keyword[public] Keyword[void] identifier[marshall] operator[SEP] identifier[Connection] identifier[connection] , identifier[ProtocolMarshaller] identifier[protocolMarshaller] operator[SEP] { Keyword[if] operator[SEP] identifier[connection] operator[==] Other[null] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[SEP] operator[SEP] } Keyword[try] { identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[connection] operator[SEP] identifier[getReplicationInstanceArn] operator[SEP] operator[SEP] , identifier[REPLICATIONINSTANCEARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[connection] operator[SEP] identifier[getEndpointArn] operator[SEP] operator[SEP] , identifier[ENDPOINTARN_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[connection] operator[SEP] identifier[getStatus] operator[SEP] operator[SEP] , identifier[STATUS_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[connection] operator[SEP] identifier[getLastFailureMessage] operator[SEP] operator[SEP] , identifier[LASTFAILUREMESSAGE_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[connection] operator[SEP] identifier[getEndpointIdentifier] operator[SEP] operator[SEP] , identifier[ENDPOINTIDENTIFIER_BINDING] operator[SEP] operator[SEP] identifier[protocolMarshaller] operator[SEP] identifier[marshall] operator[SEP] identifier[connection] operator[SEP] identifier[getReplicationInstanceIdentifier] operator[SEP] operator[SEP] , identifier[REPLICATIONINSTANCEIDENTIFIER_BINDING] operator[SEP] operator[SEP] } Keyword[catch] operator[SEP] identifier[Exception] identifier[e] operator[SEP] { Keyword[throw] Keyword[new] identifier[SdkClientException] operator[SEP] literal[String] operator[+] identifier[e] operator[SEP] identifier[getMessage] operator[SEP] operator[SEP] , identifier[e] operator[SEP] operator[SEP] } }